/* 在线编译器 /tools/compiler —— 响应式排版与配色 v2
 *
 * 断点策略（尺度变量统一驱动，桌面再做双栏增强）：
 *   < 768px     手机：单列；工具条 3 行网格；触控区 ≥44px；输入 16px 防 iOS 缩放
 *   768–1199px  平板：单列；工具条两行；编辑器按视口高度自适应；字号略放大
 *   1200–1399px 小桌面：单列、内边距加宽、输出区更高，避免频繁滚动
 *   ≥ 1400px    宽桌面：左编辑器 / 右「标准输入 + 输出」双栏，同屏看代码与结果
 *
 * 关键约束：行号、高亮层、textarea 共用 --ce-code-* 变量。任何断点修改
 * 字号 / 行高 / 内边距时三者必须同步，否则高亮与光标会错位。
 *
 * 配色沿用站点主题变量，默认深色、[data-theme="light"] 覆盖浅色；
 * 语法高亮为深浅两套 GitHub 风格配色，另对高对比与减少动效偏好做适配。
 */
.ce-page {
    --ce-gap: 14px;
    --ce-radius: 16px;
    --ce-radius-sm: 10px;
    --ce-border: var(--border-color, #2f3336);
    --ce-muted: color-mix(in srgb, var(--text-primary) 68%, var(--text-secondary));
    --ce-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
    --ce-code-font: 13.5px;
    --ce-code-lh: 1.6;
    --ce-code-pad-y: 12px;
    --ce-code-pad-x: 14px;
    --ce-gutter-w: 52px;
    --ce-ctrl-h: 38px;
    width: 100%;
    /* 遵守站点规范：工具根容器不加 max-width / margin:0 auto；
       超宽屏改由下方断点用内边距限制行长，保持全屏布局 */
    padding: clamp(16px, 2vw, 32px) clamp(14px, 2.4vw, 40px) calc(48px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ---------- Hero ---------- */
.ce-hero { text-align: center; padding: 0 0 clamp(14px, 2vw, 26px); }
.ce-hero-head { display: inline-flex; align-items: center; justify-content: center; gap: 12px; vertical-align: top; }
.ce-hero-ico {
    flex: 0 0 auto;
    width: clamp(38px, 3.6vw, 48px);
    height: clamp(38px, 3.6vw, 48px);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(19px, 2vw, 24px);
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.ce-hero h1 { margin: 0; font-size: clamp(20px, 2vw, 27px); font-weight: 700; letter-spacing: .3px; line-height: 1.3; }
.ce-hero-sub { margin: 8px auto 0; max-width: 780px; font-size: clamp(12.5px, 1vw, 14px); color: var(--ce-muted); line-height: 1.7; }

/* ---------- 顶部操作条 ---------- */
.ce-bar {
    position: sticky;
    top: var(--ce-stick, 12px);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    border: 1px solid var(--ce-border);
    border-radius: var(--ce-radius);
    background: color-mix(in srgb, var(--bg-secondary) 94%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.ce-bar-l, .ce-bar-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.ce-bar-l { flex: 1 1 auto; }
.ce-bar-r { flex: 0 0 auto; margin-left: auto; }

.ce-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: var(--ce-ctrl-h);
    padding: 0 14px;
    border-radius: var(--ce-radius-sm);
    border: 1px solid var(--ce-border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13.5px;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color .15s ease, color .15s ease, background .15s ease, transform .1s ease;
}
.ce-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg-secondary)); }
.ce-btn:active:not(:disabled) { transform: translateY(1px); }
.ce-btn:focus-visible, .ce-select:focus-visible, .ce-tab:focus-visible, .ce-stdin:focus-visible, .ce-input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.ce-btn:disabled { opacity: .55; cursor: not-allowed; }
.ce-btn-pri {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 25%, transparent);
}
.ce-btn-pri:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.ce-btn-sm { height: 32px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.ce-btn.is-on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

.ce-select {
    height: var(--ce-ctrl-h);
    min-width: 0;
    max-width: 220px;
    padding: 0 10px;
    border-radius: var(--ce-radius-sm);
    border: 1px solid var(--ce-border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 13.5px;
    cursor: pointer;
    text-overflow: ellipsis;
}
.ce-select optgroup { font-style: normal; color: var(--text-secondary); }

/* ---------- 状态条 ---------- */
.ce-status {
    display: flex;
    align-items: center;
    gap: 8px 16px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 8px 14px;
    border: 1px solid var(--ce-border);
    border-radius: 12px;
    background: var(--bg-secondary);
    font-size: 12.5px;
    color: var(--ce-muted);
}
.ce-st b { color: var(--text-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.ce-state { color: var(--ce-muted); }
.ce-state.is-run { color: var(--accent); }
.ce-state.is-ok { color: #3fb950; }
.ce-state.is-err { color: #ff7b72; }
[data-theme="light"] .ce-state.is-ok { color: #1a7f37; }
[data-theme="light"] .ce-state.is-err { color: #cf222e; }
.ce-spin {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    vertical-align: -1px;
    border: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: ce-spin .8s linear infinite;
}
@keyframes ce-spin { to { transform: rotate(360deg); } }

/* ---------- 工作区：默认单列；宽桌面双栏（见断点区） ---------- */
.ce-work {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--ce-gap);
    margin-top: var(--ce-gap);
    align-items: start;
}
.ce-side {
    display: flex;
    flex-direction: column;
    gap: var(--ce-gap);
    min-width: 0;
}
.ce-work > *, .ce-side > * { min-width: 0; }
.ce-editor-card, .ce-stdin-card, .ce-out-card { margin-top: 0; }

/* ---------- 编辑器 ---------- */
.ce-editor-card {
    border: 1px solid var(--ce-border);
    border-radius: var(--ce-radius);
    background: var(--bg-primary);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ce-pane-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--ce-border);
    background: var(--bg-secondary);
}
.ce-pane-title { font-size: 12.5px; font-weight: 700; color: var(--ce-muted); white-space: nowrap; }
.ce-pane-file {
    font: 12px/1.4 var(--ce-mono);
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}
.ce-pane-hint { margin-left: auto; font-size: 11.5px; color: var(--ce-muted); text-align: right; }
.ce-code-wrap {
    display: flex;
    height: clamp(340px, 46vh, 620px);
    min-height: 0;
}
.ce-gutter {
    flex: 0 0 auto;
    width: var(--ce-gutter-w);
    padding: var(--ce-code-pad-y) 0;
    box-sizing: border-box;
    text-align: right;
    font: var(--ce-code-font)/var(--ce-code-lh) var(--ce-mono);
    letter-spacing: 0;
    color: var(--ce-muted);
    background: var(--bg-secondary);
    border-right: 1px solid var(--ce-border);
    overflow: hidden;
    user-select: none;
    font-variant-numeric: tabular-nums;
}
.ce-gutter div { padding-right: 10px; }
.ce-code { position: relative; flex: 1 1 auto; min-width: 0; overflow: hidden; }
.ce-hl, .ce-input {
    margin: 0;
    padding: var(--ce-code-pad-y) var(--ce-code-pad-x);
    border: 0;
    font: var(--ce-code-font)/var(--ce-code-lh) var(--ce-mono);
    letter-spacing: 0;
    tab-size: 4;
    white-space: pre;
    word-wrap: normal;
    overflow: auto;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--accent) 45%, transparent) transparent;
}
.ce-hl {
    position: absolute;
    inset: 0;
    color: var(--text-primary);
    pointer-events: none;
    background: transparent;
}
.ce-hl code { display: block; min-height: 100%; font: inherit; letter-spacing: inherit; tab-size: inherit; white-space: inherit; }
.ce-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    resize: none;
    outline: none;
    background: transparent;
    color: transparent;
    caret-color: var(--accent);
    -webkit-text-fill-color: transparent;
}
.ce-input::placeholder { color: var(--ce-muted); opacity: .85; -webkit-text-fill-color: var(--ce-muted); }
.ce-input::selection { background: color-mix(in srgb, var(--accent) 38%, transparent); color: transparent; -webkit-text-fill-color: transparent; }

/* 语法高亮色（默认深色主题） */
.ce-tok-kw { color: #ff7b72; }
.ce-tok-str { color: #a5d6ff; }
.ce-tok-com { color: #9aa4ae; font-style: italic; }
.ce-tok-num { color: #f2cc60; }
.ce-tok-pre { color: #d2a8ff; }
.ce-tok-lit { color: #79c0ff; }
.ce-tok-fn { color: #7ee787; }
/* 浅色主题 */
[data-theme="light"] .ce-tok-kw { color: #cf222e; }
[data-theme="light"] .ce-tok-str { color: #0a3069; }
[data-theme="light"] .ce-tok-com { color: #59636e; }
[data-theme="light"] .ce-tok-num { color: #0550ae; }
[data-theme="light"] .ce-tok-pre { color: #8250df; }
[data-theme="light"] .ce-tok-lit { color: #0550ae; }
[data-theme="light"] .ce-tok-fn { color: #116329; }

/* ---------- 标准输入 ---------- */
.ce-stdin-card {
    border: 1px solid var(--ce-border);
    border-radius: var(--ce-radius);
    background: var(--bg-secondary);
    overflow: hidden;
}
.ce-stdin-card[hidden] { display: none; }
.ce-stdin-body { padding: 10px 14px 14px; }
.ce-stdin {
    display: block;
    width: 100%;
    min-height: 92px;
    padding: 10px 12px;
    border-radius: var(--ce-radius-sm);
    border: 1px solid var(--ce-border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font: 13.5px/1.6 var(--ce-mono);
    resize: vertical;
    box-sizing: border-box;
}
.ce-stdin:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.ce-stdin-hint { margin-top: 7px; font-size: 12px; color: var(--ce-muted); line-height: 1.6; }

/* ---------- 输出区 ---------- */
.ce-out-card {
    border: 1px solid var(--ce-border);
    border-radius: var(--ce-radius);
    background: var(--bg-primary);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ce-out-head {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--ce-border);
    background: var(--bg-secondary);
    flex-wrap: wrap;
}
.ce-tab {
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ce-muted);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.ce-tab:hover { color: var(--text-primary); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.ce-tab.is-on { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; }
.ce-tab .ce-tab-badge {
    display: inline-block;
    margin-left: 6px;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 10.5px;
    line-height: 18px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.ce-out-acts { margin-left: auto; display: flex; gap: 6px; }
.ce-out-body { padding: 0; min-height: 0; }
.ce-out-pre {
    margin: 0;
    padding: 14px 16px;
    min-height: 150px;
    max-height: 360px;
    overflow: auto;
    font: 13.5px/1.65 var(--ce-mono);
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    background: var(--bg-primary);
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--accent) 45%, transparent) transparent;
}
.ce-out-pre[hidden] { display: none; }
.ce-out-pre.is-empty { color: var(--ce-muted); font-style: italic; }
.ce-out-pre.is-err-text { color: #ff7b72; }
[data-theme="light"] .ce-out-pre.is-err-text { color: #cf222e; }
.ce-exit-line {
    padding: 8px 16px;
    border-top: 1px solid var(--ce-border);
    font-size: 12px;
    line-height: 1.6;
    color: var(--ce-muted);
    background: var(--bg-secondary);
}
.ce-exit-line[hidden] { display: none; }
.ce-exit-line b.ok { color: #3fb950; }
.ce-exit-line b.bad { color: #ff7b72; }
[data-theme="light"] .ce-exit-line b.ok { color: #1a7f37; }
[data-theme="light"] .ce-exit-line b.bad { color: #cf222e; }

/* ---------- 帮助 / 关于 ---------- */
.ce-help, .ce-about {
    margin-top: var(--ce-gap);
    border: 1px solid var(--ce-border);
    border-radius: var(--ce-radius);
    background: var(--bg-secondary);
    padding: 14px 18px;
}
.ce-help > summary, .ce-about > summary {
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    user-select: none;
    min-height: 24px;
    line-height: 1.6;
}
.ce-help > summary:focus-visible, .ce-about > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.ce-help > summary::before, .ce-about > summary::before { content: '▾ '; color: var(--accent); }
.ce-help[open] > summary::before, .ce-about[open] > summary::before { content: '▴ '; }
.ce-help-body, .ce-about-body { margin-top: 10px; font-size: 13.5px; color: var(--text-primary); line-height: 1.8; }
.ce-help-body h3, .ce-about-body h3 { margin: 16px 0 6px; font-size: 13.5px; }
.ce-help-body ul, .ce-about-body ul, .ce-help-body ol { margin: 6px 0; padding-left: 22px; }
.ce-help-body li, .ce-about-body li { margin: 4px 0; }
.ce-tip {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent) 9%, var(--bg-primary));
    border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
}
.ce-tip ul { margin: 6px 0 0; padding-left: 20px; }
.ce-note { margin: 10px 0 0; font-size: 12px; color: var(--ce-muted); line-height: 1.7; }
.ce-warn {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: color-mix(in srgb, #e3b341 10%, var(--bg-primary));
    border: 1px solid color-mix(in srgb, #e3b341 34%, transparent);
    font-size: 13px;
    line-height: 1.7;
}

/* ---------- 移动端浮动运行按钮（桌面隐藏） ---------- */
.ce-fab { display: none; }

/* ---------- Toast ---------- */
.ce-toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    max-width: calc(100vw - 32px);
    padding: 10px 18px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--bg-primary) 94%, transparent);
    border: 1px solid var(--ce-border);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
    z-index: 90;
}

/* ======================================================
 * 响应式：三档设备 + 宽桌面双栏
 * ====================================================== */

/* --- 小桌面 1200–1399：单列，但给编辑与输出更多纵向空间 --- */
@media (min-width: 1200px) and (max-width: 1399px) {
    .ce-page { --ce-code-font: 14px; }
    .ce-code-wrap { height: clamp(420px, 52vh, 640px); }
    .ce-out-pre { max-height: 420px; }
}

/* --- 宽桌面 ≥1400：左代码 / 右 stdin+输出，同屏完成「写 → 运行 → 看」 --- */
@media (min-width: 1400px) {
    .ce-page {
        --ce-gap: 16px;
        --ce-code-font: 14px;
        padding-inline: clamp(24px, 2.4vw, 48px);
    }
    .ce-work {
        grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr);
        align-items: stretch;
    }
    .ce-editor-card, .ce-side { height: clamp(520px, calc(100vh - 250px), 820px); }
    .ce-code-wrap { height: auto; flex: 1 1 auto; min-height: 0; }
    .ce-code { min-height: 0; }
    .ce-out-card { flex: 1 1 auto; min-height: 0; }
    .ce-out-body { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
    .ce-out-pre { flex: 1 1 auto; min-height: 0; max-height: none; }
    .ce-out-acts { margin-left: auto; }
}
@media (min-width: 1400px) and (max-height: 760px) {
    .ce-editor-card, .ce-side { height: clamp(420px, calc(100vh - 210px), 620px); }
}
/* 超宽屏（≥2200px）：用内边距把内容行宽控制在 ~2000px 内，避免代码行过长 */
@media (min-width: 2200px) {
    .ce-page { padding-inline: max(40px, calc((100vw - 2000px) / 2)); }
}

/* --- 平板 768–1199：单列、两行工具条、更大的触控与字号 --- */
@media (min-width: 768px) and (max-width: 1199px) {
    .ce-page {
        --ce-ctrl-h: 42px;
        --ce-code-font: 14px;
        --ce-gutter-w: 48px;
        padding: 20px clamp(16px, 3vw, 32px) 48px;
    }
    .ce-bar { gap: 8px; }
    .ce-bar-l, .ce-bar-r { flex: 1 1 100%; margin-left: 0; }
    .ce-bar-r .ce-btn { flex: 1 1 auto; }
    .ce-select { max-width: none; flex: 1 1 190px; }
    .ce-code-wrap { height: clamp(360px, 48vh, 540px); }
    .ce-out-pre { max-height: 320px; }
    .ce-help, .ce-about { padding: 14px 16px; }
}

/* --- 手机 ≤767：紧凑网格工具条、16px 输入防缩放、触控 ≥40/44px --- */
@media (max-width: 767px) {
    .ce-page {
        --ce-gap: 12px;
        --ce-radius: 14px;
        --ce-code-font: 16px;
        --ce-code-lh: 1.55;
        --ce-code-pad-y: 10px;
        --ce-code-pad-x: 12px;
        --ce-gutter-w: 42px;
        --ce-ctrl-h: 44px;
        padding: 14px 12px calc(92px + env(safe-area-inset-bottom));
    }
    .ce-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        right: calc(16px + env(safe-area-inset-right));
        bottom: calc(20px + env(safe-area-inset-bottom));
        width: 56px;
        height: 56px;
        border-radius: 50%;
        border: 0;
        background: var(--accent);
        color: #fff;
        box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 42%, transparent);
        cursor: pointer;
        z-index: 60;
    }
    .ce-fab:active { transform: scale(.96); }
    .ce-fab:disabled { opacity: .6; cursor: not-allowed; }
    .ce-fab:focus-visible { outline: 3px solid var(--text-primary); outline-offset: 3px; }
    .ce-toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
    .ce-hero { padding-bottom: 12px; }
    .ce-hero-ico { width: 36px; height: 36px; font-size: 18px; border-radius: 12px; }
    .ce-hero h1 { font-size: 19px; }
    .ce-hero-sub { margin-top: 6px; font-size: 12.5px; line-height: 1.6; }

    .ce-bar { position: static; top: auto; flex-direction: column; align-items: stretch; gap: 8px; padding: 10px; }
    .ce-bar-l { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 8px; width: 100%; }
    .ce-bar-r { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; margin-left: 0; }
    .ce-select { width: 100%; max-width: none; font-size: 16px; }
    .ce-btn { width: 100%; padding: 0 8px; font-size: 13px; }
    .ce-btn svg { display: none; }
    .ce-bar-r .ce-btn { font-size: 12px; padding: 0 4px; }

    .ce-status { gap: 6px 12px; padding: 8px 10px; font-size: 12px; }
    .ce-pane-head { gap: 8px; padding: 8px 10px; }
    .ce-pane-hint { display: none; }
    .ce-code-wrap { height: clamp(260px, 42vh, 380px); }
    .ce-gutter div { padding-right: 8px; }
    .ce-stdin { font-size: 16px; min-height: 88px; }

    .ce-out-head { gap: 4px; padding: 6px 8px; }
    .ce-tab { flex: 1 1 0; height: 40px; padding: 0 6px; font-size: 12.5px; }
    .ce-out-acts { width: 100%; margin-left: 0; gap: 6px; }
    .ce-out-acts .ce-btn { flex: 1 1 0; height: 40px; }
    .ce-out-pre { min-height: 120px; max-height: 260px; padding: 12px; font-size: 13px; }
    .ce-exit-line { padding: 8px 12px; }

    .ce-help, .ce-about { padding: 12px 14px; }
    .ce-help-body, .ce-about-body { font-size: 13px; }
    .ce-help-body ul, .ce-about-body ul, .ce-help-body ol { padding-left: 18px; }
    .ce-toast { padding: 10px 14px; font-size: 12.5px; }
}
@media (max-width: 360px) {
    .ce-bar-r .ce-btn { font-size: 11.5px; }
    .ce-tab { padding: 0 3px; font-size: 12px; }
}

/* --- 横屏/矮视口：避免编辑器把整屏挤满 --- */
@media (max-height: 620px) and (min-width: 768px) {
    .ce-hero { padding-bottom: 10px; }
    .ce-code-wrap { height: clamp(280px, 40vh, 420px); }
}

/* --- 可访问性偏好 --- */
@media (prefers-reduced-motion: reduce) {
    .ce-btn { transition: none; }
    .ce-btn:active:not(:disabled) { transform: none; }
    .ce-spin { animation: none; border-top-color: var(--accent); }
}
@media (prefers-contrast: more) {
    .ce-page { --ce-border: var(--text-primary); }
    .ce-btn, .ce-select, .ce-tab, .ce-stdin { border-width: 2px; }
}
