/* ============================================================================
   WuSi Web · style.css
   轻量、响应式、支持深色模式
   ========================================================================== */

/* ------------------------------ 设计变量 ------------------------------ */
:root {
    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --font-mono: "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Consolas,
        "Liberation Mono", monospace;

    --bg: #f4f4f2;
    --bg-soft: #ececea;
    --surface: #ffffff;
    --surface-2: #fafaf8;
    --surface-3: #f0f0ed;
    --text: #1d1d1b;
    --text-2: #4f4f4a;
    --muted: #77776f;
    --border: #dcdcd6;
    --border-strong: #c3c3bb;

    --accent: #1a5fb4;
    --accent-2: #1a5fb4;
    --accent-ink: #ffffff;
    --accent-soft: #eaf1f9;
    --accent-ring: rgba(26, 95, 180, 0.16);

    --success: #1a7f55;
    --success-soft: #e9f5ef;
    --danger: #b42318;
    --danger-soft: #fbeae8;
    --warn: #8a5a00;
    --warn-soft: #f7f1e3;

    --code-bg: #1d1d1b;
    --code-text: #d6d6cf;

    --shadow-sm: none;
    --shadow: none;
    --shadow-lift: 0 4px 14px rgba(0, 0, 0, 0.12);

    --radius: 8px;
    --radius-md: 8px;
    --radius-sm: 6px;
}

html[data-theme="dark"] {
    --bg: #161615;
    --bg-soft: #1d1d1b;
    --surface: #1f1f1d;
    --surface-2: #242422;
    --surface-3: #2b2b28;
    --text: #ecece8;
    --text-2: #b9b9b1;
    --muted: #8f8f86;
    --border: #35352f;
    --border-strong: #4b4b43;

    --accent: #7aa7e0;
    --accent-2: #7aa7e0;
    --accent-ink: #10233b;
    --accent-soft: #1c2b3d;
    --accent-ring: rgba(122, 167, 224, 0.2);

    --success: #6ecf9f;
    --success-soft: #173228;
    --danger: #f28b82;
    --danger-soft: #3a1e1c;
    --warn: #e0b357;
    --warn-soft: #352c18;

    --code-bg: #10100f;
    --code-text: #d6d6cf;

    --shadow-sm: none;
    --shadow: none;
    --shadow-lift: 0 4px 16px rgba(0, 0, 0, 0.5);

    --radius: 8px;
    --radius-md: 8px;
    --radius-sm: 6px;
}

html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

/* ------------------------------ 基础 ------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--accent);
    color: #fff;
}

h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--surface-3);
    border: 1px solid var(--border);
    color: var(--text-2);
    white-space: nowrap;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.15em;
}

/* ------------------------------ 顶栏 ------------------------------ */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.brand-icon {
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 4px;
    object-fit: contain;
}

.brand-name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0;
    white-space: nowrap;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.compat {
    font-size: 11.5px;
    color: var(--muted);
    white-space: nowrap;
}

.icon-btn {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.icon-btn:hover {
    color: var(--text);
    border-color: var(--border);
    background: var(--surface-3);
}

.icon-sun { display: none; }
.icon-moon { display: block; }
html[data-theme="dark"] .icon-sun { display: block; }
html[data-theme="dark"] .icon-moon { display: none; }

/* ------------------------------ 容器 / 标题 ------------------------------ */
.wrap {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px 32px;
}

.intro {
    max-width: 820px;
    padding: 28px 0 16px;
}

.intro h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.intro p {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-2);
}

/* ------------------------------ 布局 ------------------------------ */
.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: 16px;
    align-items: start;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: none;
    padding: 18px;
}

.panel { min-width: 0; }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.card-head h2 {
    font-size: 15px;
    font-weight: 600;
}

.card-head h3 {
    font-size: 13px;
    font-weight: 600;
}

.meta {
    font-size: 11.5px;
    color: var(--muted);
    text-align: right;
    white-space: nowrap;
}

.queue-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

.queue-tools .link-btn {
    padding: 3px 0;
    font-size: 11px;
}

/* ------------------------------ 拖放区 ------------------------------ */
.dropzone {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    text-align: left;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover,
.dropzone:focus-visible {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.dropzone.is-dragover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.dz-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 6px;
    color: var(--accent);
    background: var(--surface);
    border: 1px solid var(--border);
}

.dz-icon .icon { width: 18px; height: 18px; }

.dz-copy { min-width: 0; }

.dz-title {
    font-size: 13.5px;
    font-weight: 600;
}

.dz-sub {
    font-size: 11.5px;
    color: var(--muted);
}

/* 文件列表 */
.file-list {
    margin-top: 10px;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-2);
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

.file-item:last-child { border-bottom: 0; }

.file-item[data-status="working"] { background: var(--surface); }

.file-ico {
    width: 32px;
    height: 32px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    background: var(--surface-3);
    color: var(--text-2);
    border: 1px solid var(--border);
}

.file-main {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 1px;
    font-size: 11px;
    color: var(--muted);
    min-width: 0;
}

.meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
}

.file-state {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-item[data-status="working"] .file-state { color: var(--accent); }
.file-item[data-status="done"] .file-state { color: var(--success); }
.file-item[data-status="error"] .file-state { color: var(--danger); }

.file-bar {
    height: 2px;
    margin-top: 5px;
    background: var(--surface-3);
    overflow: hidden;
    display: none;
}

.file-item[data-status="working"] .file-bar,
.file-item[data-status="error"] .file-bar { display: block; }

.file-bar > i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.15s;
}

.file-item[data-status="error"] .file-bar > i { background: var(--danger); }

.badge-enc {
    flex: none;
    font-family: var(--font-mono);
    font-size: 8.5px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
    background: transparent;
    color: var(--success);
    border: 1px solid currentColor;
}

.base-badge {
    flex: none;
    font-size: 9.5px;
    color: var(--muted);
    padding: 2px 5px;
    border: 1px solid var(--border);
    border-radius: 3px;
}

.file-remove {
    width: 26px;
    height: 26px;
    flex: none;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    transition: background 0.15s, color 0.15s;
}

.file-remove:hover { background: var(--danger-soft); color: var(--danger); }
.file-remove .icon { width: 14px; height: 14px; }

/* ------------------------------ 表单 ------------------------------ */
.field { margin-top: 14px; }

.field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.field label {
    font-size: 12.5px;
    font-weight: 600;
}

.input-wrap { position: relative; }

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    display: grid;
    place-items: center;
    pointer-events: none;
}

.input-icon .icon { width: 16px; height: 16px; }

.input-wrap input {
    width: 100%;
    height: 42px;
    padding: 0 42px 0 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input-wrap input::placeholder { color: var(--muted); }

.input-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.input-wrap input:disabled { opacity: 0.6; cursor: not-allowed; }

.input-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    transition: background 0.15s, color 0.15s;
}

.input-btn:hover { background: var(--surface-3); color: var(--text); }
.input-btn .icon { width: 16px; height: 16px; }
.input-btn .icon-eye-off { display: none; }
.input-btn[aria-pressed="true"] .icon-eye { display: none; }
.input-btn[aria-pressed="true"] .icon-eye-off { display: block; }

.hint {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 5px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--muted);
}

.hint .icon {
    width: 13px;
    height: 13px;
    margin-top: 1px;
    flex: none;
}

.hint-warn { color: var(--warn); }
.hint-ok { color: var(--success); }

/* 比例滑块 */
.ratio-out {
    font-family: var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent);
}

.range-wrap { margin-top: 10px; }

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 18px;
    margin: 0;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg,
        var(--accent) var(--fill, 25%),
        var(--surface-3) var(--fill, 25%));
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--accent);
}

input[type="range"]::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: var(--surface-3);
}

input[type="range"]::-moz-range-progress {
    height: 4px;
    border-radius: 2px;
    background: var(--accent);
}

input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--accent);
}

input[type="range"]:focus-visible { outline-offset: 4px; }

.presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 7px;
}

.presets button {
    padding: 3px 9px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font-size: 11px;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.presets button:hover { border-color: var(--border-strong); background: var(--surface-3); }

.presets button.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

/* 按钮 */
.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 16px;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn .icon { width: 16px; height: 16px; }

.btn-primary {
    color: var(--accent-ink);
    background: var(--accent);
    border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(0.94);
}

.btn-ghost {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
    border-color: var(--border-strong);
    background: var(--surface-3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.is-loading { pointer-events: none; }
.btn.is-loading .icon { display: none; }

.btn.is-loading::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    animation: spin 0.7s linear infinite;
}

.btn-sm {
    height: 30px;
    padding: 0 10px;
    font-size: 11.5px;
    border-radius: 4px;
    gap: 5px;
}

.btn-sm .icon { width: 13px; height: 13px; }

.link-btn {
    border: 0;
    background: transparent;
    padding: 3px 2px;
    font-size: 11.5px;
    color: var(--muted);
    border-radius: 4px;
    transition: color 0.15s;
}

.link-btn:hover:not(:disabled) { color: var(--accent); }
.link-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* 忙碌状态 */
.panel.is-busy .dropzone { opacity: 0.5; pointer-events: none; }
.panel.is-busy .file-remove { pointer-events: none; opacity: 0.4; }
.panel.is-busy .presets button { pointer-events: none; opacity: 0.55; }

/* ------------------------------ 输出面板 ------------------------------ */
.output-wrap {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.output {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.progress {
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}

.progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    font-weight: 500;
}

.progress-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-pct {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent);
}

.progress-track {
    height: 4px;
    margin-top: 8px;
    background: var(--surface-3);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--accent);
    transition: width 0.15s;
}

.progress-file {
    margin-top: 5px;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 深色控制台 */
.log {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 130px;
    max-height: 220px;
    overflow-y: auto;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--code-bg);
    color: var(--code-text);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.65;
    scrollbar-width: thin;
    scrollbar-color: #3a3a34 transparent;
}

.log::-webkit-scrollbar { width: 6px; }
.log::-webkit-scrollbar-thumb { background: #3a3a34; border-radius: 3px; }

.log-empty {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    text-align: center;
    color: #77776f;
}

.log-empty p { font-size: 12px; color: #a3a39a; }
.log-empty span { font-size: 10.5px; margin-top: 2px; }

.log-line {
    display: flex;
    flex: 0 0 auto;
    align-items: baseline;
    gap: 7px;
    padding: 1px 0;
    word-break: break-word;
}

.log-line::before {
    content: "";
    width: 4px;
    height: 4px;
    flex: none;
    border-radius: 50%;
    background: #77776f;
    transform: translateY(-2px);
}

.log-time {
    flex: none;
    font-size: 9.5px;
    color: #77776f;
}

.log-msg { min-width: 0; }

.log-ok::before { background: #6ecf9f; }
.log-ok .log-msg { color: #b7e4cd; }
.log-err::before { background: #f28b82; }
.log-err .log-msg { color: #f5b7b2; }
.log-warn::before { background: #e0b357; }
.log-warn .log-msg { color: #e8cd94; }
.log-info::before { background: #7aa7e0; }
.log-info .log-msg { color: #b9d1ee; }
.log-muted .log-msg { color: #a3a39a; }

/* 结果 */
.results-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.card-head-sm {
    align-items: center;
    margin-bottom: 8px;
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.results {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 2px;
}

.results .empty {
    font-size: 12px;
    color: var(--muted);
    padding: 8px 0 4px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.result-ico {
    width: 30px;
    height: 30px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: var(--surface-3);
    color: var(--success);
}

.result-ico .icon { width: 15px; height: 15px; }

.result-main { flex: 1; min-width: 0; }

.result-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-meta {
    font-size: 10.5px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-save {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 28px;
    padding: 0 9px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font-size: 11px;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.result-save:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.result-save .icon { width: 12px; height: 12px; }

.output-foot {
    margin-top: 6px;
    padding-right: 2px;
    text-align: right;
}

.back-link {
    font-size: 11px;
    color: var(--muted);
}

.back-link:hover {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ------------------------------ 免责声明 ------------------------------ */
.disclaimer {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.disclaimer h2 {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.disclaimer p {
    font-size: 12px;
    line-height: 1.65;
    color: var(--text-2);
}

.disclaimer strong { color: var(--text); }

.small-note {
    margin-top: 8px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--muted);
}

.repo-line {
    margin-top: 6px;
    font-size: 11.5px;
    line-height: 1.6;
    color: var(--muted);
    word-break: break-all;
}

.repo-line a {
    color: var(--text-2);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.repo-line a:hover { color: var(--accent); }

.toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: min(360px, calc(100vw - 40px));
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: var(--shadow-lift);
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-2);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    cursor: pointer;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warn { border-left-color: var(--warn); }
.toast .icon { width: 14px; height: 14px; margin-top: 1px; }
.toast-success .icon { color: var(--success); }
.toast-error .icon { color: var(--danger); }
.toast-warn .icon { color: var(--warn); }
.toast-info .icon { color: var(--accent); }

.noscript {
    position: fixed;
    inset: auto 16px 16px;
    z-index: 300;
    padding: 10px 14px;
    border-radius: 4px;
    background: var(--danger);
    color: #fff;
    font-size: 13px;
    text-align: center;
}

/* ------------------------------ 动画 ------------------------------ */
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------ 响应式 ------------------------------ */
@media (max-width: 960px) {
    .workspace { grid-template-columns: 1fr; }
    .intro { padding-top: 22px; }
    .log { max-height: 220px; }
}

@media (max-width: 640px) {
    body { font-size: 14px; }
    .wrap { padding: 0 14px 28px; }

    .topbar-inner { padding: 10px 14px; }
    .brand-name { font-size: 13px; }

    .intro { padding: 20px 0 14px; }
    .intro h1 { font-size: 20px; }
    .intro p { font-size: 12.5px; line-height: 1.6; }

    .card { padding: 14px; }
    .card-head { margin-bottom: 10px; }
    .meta { display: none; }

    .dropzone { padding: 10px 12px; }
    .dz-icon { width: 32px; height: 32px; }
    .file-list { max-height: 200px; }

    .input-wrap input { font-size: 16px; }

    .actions { margin-top: 14px; }
    .btn { height: 40px; font-size: 13.5px; }

    .log { min-height: 130px; max-height: 200px; }
    .log-empty { min-height: 100px; }
    .results { max-height: 240px; }

    .disclaimer { margin-top: 16px; padding-top: 10px; }

    .toasts {
        left: 14px;
        right: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        width: auto;
    }
}

@media (max-width: 380px) {
    .intro h1 { font-size: 19px; }
    .compat { display: none; }
    .results-actions .link-btn { display: none; }
}

/* 滚动条（桌面） */
.file-list::-webkit-scrollbar,
.results::-webkit-scrollbar {
    width: 6px;
}

.file-list::-webkit-scrollbar-thumb,
.results::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 3px;
}

.file-list::-webkit-scrollbar-track,
.results::-webkit-scrollbar-track { background: transparent; }
