:root {
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --quiet: #86868b;
    --line: #d9d9df;
    --soft-line: #e7e7ec;
    --page: #fbfbfd;
    --card: #ffffff;
    --blue: #0071e3;
    --blue-dark: #0062c4;
    --blue-soft: #eef7ff;
    --green: #168754;
    --green-soft: #edf9f3;
    --red: #c9342d;
    --red-soft: #fff1f0;
    --amber: #9a6200;
    --amber-soft: #fff7e6;
    --radius: 18px;
    --shadow: 0 16px 50px rgba(25, 28, 36, 0.08);
    --text-meta: 13px;
    --text-control: 14px;
    --text-item: 15px;
    --text-body: 16px;
    --text-section: 20px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    background: var(--page);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: var(--text-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a,
input {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
.drop-card:focus-within {
    outline: 3px solid rgba(0, 113, 227, 0.28);
    outline-offset: 3px;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
p,
fieldset {
    margin: 0;
}

fieldset {
    min-width: 0;
    padding: 0;
    border: 0;
}

[hidden] {
    display: none !important;
}

.tool-header {
    height: 64px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(210, 210, 215, 0.78);
}

.tool-header-inner,
.tool-shell {
    width: min(1180px, calc(100% - 64px));
    margin-inline: auto;
}

.tool-header-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 680;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--ink);
    border-radius: 9px;
    font-size: 15px;
    font-weight: 760;
}

.home-link {
    color: var(--muted);
    font-size: 14px;
}

.home-link::before {
    content: "←";
    margin-right: 7px;
}

.tool-shell {
    padding: 50px 0 72px;
}

.status-panel {
    min-height: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.status-panel h1 {
    margin-top: 20px;
    font-size: 28px;
    line-height: 1.25;
}

.status-panel p {
    max-width: 480px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 15px;
}

.status-panel .button {
    margin-top: 24px;
}

#toolUnavailable h1 {
    margin-top: 0;
}

.status-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #dfe8f1;
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.tool-title-copy h1 {
    font-size: 36px;
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.tool-title-copy > p:last-child {
    margin-top: 11px;
    color: var(--muted);
    font-size: var(--text-body);
}

.shield {
    width: 29px;
    height: 29px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--green);
    border-radius: 9px 9px 13px 13px;
    font-size: 15px;
    font-weight: 700;
}

.settings-card {
    margin-top: 32px;
    padding: 24px 28px 26px;
    background: var(--card);
    border: 1px solid var(--soft-line);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(25, 28, 36, 0.045);
}

.file-section-header h2,
.progress-card h2 {
    font-size: var(--text-section);
}

.file-section-header p {
    margin-top: 4px;
    color: var(--quiet);
    font-size: var(--text-meta);
}

.settings-grid {
    display: block;
}

.settings-options {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 14px;
    overflow: clip;
}

.settings-options > .setting-block {
    min-width: 0;
    min-height: 136px;
    padding: 14px 16px;
    background: #fbfbfc;
    border: 1px solid #e4e5e9;
    border-radius: 12px;
}

.quality-setting {
    grid-column: 1;
}

.background-setting,
.png-setting {
    grid-column: 2;
}

.setting-block legend,
.setting-block > label,
.setting-label-row label {
    display: block;
    margin-bottom: 10px;
    color: #3b3b40;
    font-size: var(--text-control);
    font-weight: 650;
}

.segmented-control {
    height: 42px;
    padding: 3px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #f1f2f5;
    border-radius: 10px;
}

.segmented-control label {
    min-width: 0;
    position: relative;
    cursor: pointer;
}

.segmented-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-control span {
    height: 36px;
    padding-inline: 7px;
    display: grid;
    place-items: center;
    color: var(--muted);
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: var(--text-control);
    white-space: nowrap;
}

.segmented-control input:checked + span {
    color: var(--ink);
    background: #fff;
    box-shadow: 0 2px 8px rgba(25, 28, 36, 0.12);
    font-weight: 650;
}

.segmented-control input:focus-visible + span {
    outline: 3px solid rgba(0, 113, 227, 0.28);
    outline-offset: 1px;
}

.setting-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.setting-label-row output {
    color: var(--blue);
    font-size: var(--text-control);
    font-weight: 720;
}

.quality-setting input[type="range"] {
    width: 100%;
    height: 24px;
    accent-color: var(--blue);
    cursor: pointer;
}

.setting-hint {
    margin-top: 3px;
    color: var(--quiet);
    font-size: var(--text-meta);
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.choice-card {
    min-height: 64px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 11px;
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
}

.choice-card > input {
    position: absolute;
    opacity: 0;
}

.choice-dot {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    border: 1.5px solid #a2a2a8;
    border-radius: 50%;
}

.choice-card:has(input:checked) {
    background: #f7fbff;
    border-color: var(--blue);
    box-shadow: 0 0 0 1px var(--blue) inset;
}

.choice-card input:checked + .choice-dot {
    border: 5px solid var(--blue);
}

.choice-card:has(input:focus-visible) {
    outline: 3px solid rgba(0, 113, 227, 0.28);
    outline-offset: 2px;
}

.choice-card strong,
.choice-card small {
    display: block;
}

.choice-card strong {
    font-size: var(--text-control);
}

.choice-card small {
    margin-top: 4px;
    color: var(--quiet);
    font-size: var(--text-meta);
}

.color-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-control input {
    width: 48px;
    height: 40px;
    padding: 3px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    cursor: pointer;
}

.color-control output {
    color: var(--muted);
    font-size: var(--text-control);
    font-variant-numeric: tabular-nums;
}

.drop-card {
    min-height: 282px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1.5px dashed #b8bac2;
    border-radius: var(--radius);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.drop-card.is-dragging {
    background: #f6fbff;
    border-color: var(--blue);
}

.upload-illustration {
    width: 76px;
    height: 58px;
    position: relative;
    margin-bottom: 17px;
}

.image-sheet {
    width: 48px;
    height: 40px;
    position: absolute;
    background: #fff;
    border: 2px solid #9da0aa;
    border-radius: 8px;
}

.image-sheet-back {
    top: 0;
    left: 8px;
    opacity: 0.55;
    transform: rotate(-7deg);
}

.image-sheet-front {
    top: 10px;
    left: 18px;
}

.image-sheet-front::after {
    content: "";
    width: 23px;
    height: 14px;
    position: absolute;
    left: 10px;
    bottom: 7px;
    background: #d9eaff;
    clip-path: polygon(0 100%, 42% 30%, 60% 58%, 73% 40%, 100% 100%);
}

.upload-illustration b {
    width: 25px;
    height: 25px;
    position: absolute;
    right: 0;
    bottom: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--blue);
    border: 3px solid #fff;
    border-radius: 50%;
    font-size: 16px;
}

.drop-card h2 {
    font-size: var(--text-section);
}

.drop-card > p {
    margin-top: 8px;
    color: var(--quiet);
    font-size: var(--text-meta);
}

.drop-card .button {
    margin-top: 20px;
}

.button {
    min-height: 40px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font-size: var(--text-control);
    font-weight: 650;
}

.button-primary {
    color: #fff;
    background: var(--blue);
}

.button-primary:hover:not(:disabled) {
    background: var(--blue-dark);
}

.button-secondary {
    color: #3b3b40;
    background: #fff;
    border-color: #cfd0d6;
}

.button-danger {
    color: var(--red);
    border-color: #efc9c6;
}

.button:disabled {
    color: #9c9ca2;
    background: #e5e5e9;
    border-color: transparent;
    cursor: not-allowed;
}

.file-section {
    margin-top: 20px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--soft-line);
    border-radius: var(--radius);
}

.file-section-header,
.result-list-header {
    min-height: 72px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #ececf0;
}

.file-section-actions {
    display: flex;
    gap: 9px;
}

.file-table-head,
.file-row {
    display: grid;
    grid-template-columns: 48px minmax(160px, 1.3fr) 72px 112px minmax(126px, 0.9fr) minmax(160px, 1.1fr) 82px;
    align-items: center;
    gap: 14px;
}

.file-table-head {
    min-height: 38px;
    padding: 0 18px;
    color: var(--quiet);
    background: #fafafd;
    border-bottom: 1px solid #ececf0;
    font-size: var(--text-meta);
    font-weight: 650;
}

.file-table-head span:last-child {
    grid-column: 6 / 8;
}

.file-row {
    min-height: 70px;
    padding: 10px 18px 12px;
    position: relative;
    border-bottom: 1px solid #ececf0;
}

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

.file-thumb {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--quiet);
    background: #f0f1f4;
    border-radius: 11px;
    font-size: var(--text-meta);
}

.file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-name,
.file-row-details,
.file-row-actions {
    min-width: 0;
}

.file-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-item);
}

.file-row-details {
    display: contents;
}

.file-type,
.file-dimensions,
.file-size,
.file-status-text {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: var(--text-meta);
    font-variant-numeric: tabular-nums;
}

.file-status-text:empty {
    display: block;
}

.file-row.is-error .file-status-text {
    color: var(--red);
}

.file-row.is-warning .file-status-text {
    color: var(--amber);
}

.file-row.is-success .file-status-text {
    color: var(--green);
}

.file-row.is-processing .file-status-text {
    color: var(--blue);
    font-weight: 650;
}

.file-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.row-action-button {
    min-width: 52px;
    min-height: 34px;
    padding: 0 10px;
    color: var(--blue);
    background: var(--blue-soft);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: var(--text-meta);
    font-weight: 650;
    white-space: nowrap;
}

.row-action-button:disabled {
    color: #9c9ca2;
    background: #e5e5e9;
    cursor: not-allowed;
}

.icon-button {
    width: 34px;
    height: 34px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
}

.file-progress-track {
    height: 3px;
    position: absolute;
    right: 18px;
    bottom: 0;
    left: 80px;
    overflow: hidden;
    background: #eceef1;
    border-radius: 999px;
}

.file-progress-bar {
    width: 0;
    height: 100%;
    display: block;
    background: var(--blue);
    border-radius: inherit;
    transition: width 0.18s linear;
}

.file-progress-bar.progress-0 { width: 0; }
.file-progress-bar.progress-5 { width: 5%; }
.file-progress-bar.progress-10 { width: 10%; }
.file-progress-bar.progress-15 { width: 15%; }
.file-progress-bar.progress-20 { width: 20%; }
.file-progress-bar.progress-25 { width: 25%; }
.file-progress-bar.progress-30 { width: 30%; }
.file-progress-bar.progress-35 { width: 35%; }
.file-progress-bar.progress-40 { width: 40%; }
.file-progress-bar.progress-45 { width: 45%; }
.file-progress-bar.progress-50 { width: 50%; }
.file-progress-bar.progress-55 { width: 55%; }
.file-progress-bar.progress-60 { width: 60%; }
.file-progress-bar.progress-65 { width: 65%; }
.file-progress-bar.progress-70 { width: 70%; }
.file-progress-bar.progress-75 { width: 75%; }
.file-progress-bar.progress-80 { width: 80%; }
.file-progress-bar.progress-85 { width: 85%; }
.file-progress-bar.progress-90 { width: 90%; }
.file-progress-bar.progress-95 { width: 95%; }
.file-progress-bar.progress-100 { width: 100%; }

.file-row.is-success .file-progress-bar {
    background: var(--green);
}

.file-row.is-error .file-progress-bar {
    background: var(--red);
}

.progress-card {
    min-height: 92px;
    margin-top: 20px;
    padding: 18px 22px;
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1fr) 52px;
    align-items: center;
    gap: 24px;
    background: #fff;
    border: 1px solid var(--soft-line);
    border-radius: var(--radius);
}

.progress-card p {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.progress-track {
    height: 7px;
    overflow: hidden;
    background: #e2e3e7;
    border-radius: 999px;
}

.progress-track span {
    width: 0;
    height: 100%;
    display: block;
    background: var(--blue);
    border-radius: inherit;
    transition: width 0.2s ease;
}

.progress-card > strong {
    color: var(--blue);
    text-align: right;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.results-section {
    margin-top: 22px;
}

.result-summary {
    min-height: 96px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: linear-gradient(115deg, #eef9f4, #f9fffc);
    border: 1px solid #d5eee2;
    border-radius: var(--radius);
}

.summary-copy {
    display: flex;
    align-items: center;
    gap: 14px;
}

.complete-mark {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--green);
    border-radius: 50%;
    font-weight: 760;
}

.result-summary h2 {
    color: #125f40;
    font-size: var(--text-section);
}

.summary-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.summary-size-flow {
    color: #3d7861;
    font-size: var(--text-control);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.result-summary p {
    margin-top: 5px;
    color: #53816d;
    font-size: var(--text-meta);
}

.summary-saving {
    min-width: 140px;
    padding-left: 24px;
    color: #126c46;
    border-left: 1px solid #cae7d9;
    text-align: right;
}

.summary-saving span,
.summary-saving strong {
    display: block;
}

.summary-saving span {
    color: #53816d;
    font-size: var(--text-meta);
}

.summary-saving strong {
    margin-top: 2px;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
}

.result-list-card {
    margin-top: 18px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--soft-line);
    border-radius: var(--radius);
}

.result-list-header > div {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.result-list-header h2 {
    font-size: 18px;
}

.result-list-header span {
    color: var(--quiet);
    font-size: 12px;
}

.result-row {
    min-height: 94px;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 58px minmax(180px, 1fr) minmax(290px, 1.25fr) 92px 76px;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid #ececf0;
}

.result-row:last-child {
    border-bottom: 0;
}

.size-rail {
    display: grid;
    grid-template-columns: 72px minmax(70px, 1fr) 72px;
    align-items: center;
    gap: 10px;
}

.size-rail > div span,
.size-rail > div strong {
    display: block;
}

.size-rail > div span {
    color: var(--quiet);
    font-size: 12px;
}

.size-rail > div strong {
    margin-top: 3px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.size-rail .new-size strong {
    color: var(--green);
}

.size-arrow {
    height: 4px;
    position: relative;
    background: #e2e3e7;
    border-radius: 5px;
}

.size-arrow span {
    width: 19px;
    height: 19px;
    position: absolute;
    top: -8px;
    right: -2px;
    display: grid;
    place-items: center;
    color: var(--green);
    background: #fff;
    border: 1px solid #cfe6da;
    border-radius: 50%;
    font-size: 12px;
}

.change-badge {
    padding: 5px 8px;
    color: var(--green);
    background: var(--green-soft);
    border-radius: 6px;
    text-align: center;
    font-size: 12px;
    font-weight: 680;
    white-space: nowrap;
}

.change-badge.is-larger {
    color: var(--amber);
    background: var(--amber-soft);
}

.download-button {
    min-height: 38px;
    padding: 0 14px;
    color: var(--blue);
    background: var(--blue-soft);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
}

.failed-result {
    grid-template-columns: 58px minmax(0, 1fr) auto;
}

.failed-result .file-status {
    margin-top: 6px;
}

.download-bar {
    min-height: 76px;
    margin-top: 18px;
    padding: 13px 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    background: #fff;
    border: 1px solid var(--soft-line);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(25, 28, 36, 0.07);
}

.download-actions {
    display: flex;
    gap: 9px;
}

.action-bar {
    min-height: 70px;
    margin-top: 16px;
    padding: 8px 6px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
}

.action-bar .button {
    min-width: 138px;
}

.visually-hidden {
    width: 1px;
    height: 1px;
    padding: 0;
    position: absolute;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 900px) {
    .tool-header-inner,
    .tool-shell {
        width: min(100% - 36px, 720px);
    }

    .tool-shell {
        padding-top: 32px;
    }

    .settings-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .file-table-head {
        display: none;
    }

    .file-row {
        min-height: 80px;
        padding: 10px 14px 13px;
        grid-template-columns: 48px minmax(0, 1fr) auto;
        grid-template-rows: 48px 20px;
        gap: 3px 11px;
    }

    .file-cell-thumb {
        grid-column: 1;
        grid-row: 1;
    }

    .file-name {
        grid-column: 2;
        grid-row: 1;
    }

    .file-row-details {
        min-width: 0;
        grid-column: 1 / 4;
        grid-row: 2;
        display: flex;
        align-items: center;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
        white-space: nowrap;
    }

    .file-row-details::-webkit-scrollbar {
        display: none;
    }

    .file-row-details > span {
        flex: 0 0 auto;
        overflow: visible;
    }

    .file-row-details > span:not(:first-child)::before {
        margin-right: 4px;
        color: #b1b2b7;
        content: "·";
    }

    .file-status-text:empty {
        display: none;
    }

    .file-row-actions {
        grid-column: 3;
        grid-row: 1;
    }

    .file-progress-track {
        right: 14px;
        left: 14px;
    }
}

@media (max-width: 600px) {
    body {
        padding-bottom: 86px;
    }

    .tool-header {
        height: 56px;
    }

    .tool-header-inner {
        height: 56px;
    }

    .brand {
        font-size: 15px;
    }

    .brand-mark {
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 13px;
    }

    .home-link {
        font-size: 13px;
    }

    .home-link::before {
        display: none;
    }

    .tool-shell {
        padding: 25px 0 32px;
    }

    .tool-title-copy h1 {
        max-width: 330px;
        font-size: 30px;
        line-height: 1.18;
    }

    .tool-title-copy > p:last-child {
        font-size: var(--text-body);
        line-height: 1.55;
    }

    .settings-card {
        margin-top: 15px;
        padding: 17px 15px;
        border-radius: 16px;
    }

    .settings-options {
        margin-top: 17px;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .settings-options > .setting-block { min-height: 0; }

    .quality-setting,
    .background-setting,
    .png-setting {
        grid-column: 1;
    }

    .segmented-control span {
        font-size: var(--text-meta);
    }

    .choice-grid {
        grid-template-columns: 1fr;
    }

    .drop-card {
        min-height: 190px;
        margin-top: 15px;
        padding: 20px 14px;
        border-radius: 16px;
        text-align: center;
    }

    .upload-illustration {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }

    .image-sheet {
        display: none;
    }

    .upload-illustration b {
        width: 38px;
        height: 38px;
        position: static;
        color: var(--blue);
        background: var(--blue-soft);
        border: 0;
        border-radius: 11px;
        font-size: 21px;
    }

    .drop-card h2 {
        font-size: 17px;
    }

    .drop-card > p {
        max-width: 290px;
        font-size: var(--text-meta);
    }

    .drop-card .button {
        margin-top: 13px;
    }

    .file-section-header,
    .result-list-header {
        padding: 13px 15px;
        align-items: flex-start;
    }

    .file-section-actions {
        gap: 6px;
    }

    .file-section-actions .button {
        min-height: 36px;
        padding-inline: 12px;
        font-size: var(--text-meta);
        white-space: nowrap;
    }

    .file-row {
        min-height: 84px;
        padding: 9px 10px 11px;
        grid-template-columns: 44px minmax(0, 1fr) auto;
        grid-template-rows: 44px 18px;
        gap: 2px 9px;
    }

    .file-thumb {
        width: 44px;
        height: 44px;
    }

    .file-progress-track {
        right: 10px;
        left: 10px;
    }

    .file-status {
        grid-column: 2 / -1;
    }

    .progress-card {
        padding: 16px;
        grid-template-columns: 1fr auto;
        gap: 13px;
    }

    .progress-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .result-summary {
        padding: 16px;
        align-items: flex-start;
        flex-direction: column;
    }

    .summary-saving {
        width: 100%;
        padding: 11px 0 0;
        border-top: 1px solid #cae7d9;
        border-left: 0;
        text-align: left;
    }

    .result-list-header > div {
        display: block;
    }

    .result-list-header span {
        display: block;
        margin-top: 3px;
    }

    .result-row {
        padding: 14px;
        grid-template-columns: 50px minmax(0, 1fr) 70px;
        gap: 11px;
    }

    .size-rail {
        grid-template-columns: 70px minmax(40px, 1fr) 70px;
        gap: 7px;
    }

    .change-badge {
        justify-self: start;
    }

    .download-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .download-actions {
        display: grid;
        grid-template-columns: 1fr 1.25fr;
    }

    .action-bar {
        min-height: 76px;
        margin: 0;
        padding: 12px 18px;
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 20;
        background: rgba(255, 255, 255, 0.97);
        border-top: 1px solid #dedfe4;
        box-shadow: 0 -8px 24px rgba(25, 28, 36, 0.07);
    }

    .action-bar .button {
        width: 100%;
        min-height: 48px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* 服务端可抓取的页面说明与 FAQ */
.tool-page-intro { width: 100%; max-width: none; margin-bottom: 32px; }
.tool-page-intro h1 { font-size: 36px; line-height: 1.18; letter-spacing: -0.035em; }
.tool-page-intro p { margin-top: 12px; color: var(--muted); line-height: 1.75; }
.status-panel h2 { margin-top: 20px; font-size: 28px; line-height: 1.25; }
#toolUnavailable h2 { margin-top: 0; }
.seo-faq { width: 100%; max-width: none; margin: 64px 0 0; }
.seo-faq h2 { margin-bottom: 20px; font-size: 26px; letter-spacing: -0.025em; }
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--soft-line); border-radius: 14px; }
.faq-item summary { min-height: 48px; padding: 14px 48px 14px 18px; cursor: pointer; font-weight: 650; position: relative; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "＋"; position: absolute; right: 18px; top: 14px; color: var(--quiet); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 18px 18px; color: var(--muted); line-height: 1.75; }
@media (max-width: 640px) {
    .tool-page-intro h1 { font-size: 30px; }
    .tool-page-intro { margin-bottom: 24px; }
    .seo-faq { margin-top: 44px; }
    .seo-faq h2 { font-size: 23px; }
}
