/* =====================================================================
   ImageConvert — style.css
   自适应（移动优先）+ 亮/暗色 + RTL 支持 + 广告位占位
   ===================================================================== */

:root {
    --bg:            #ffffff;
    --bg-soft:       #f6f7fb;
    --bg-elev:       #ffffff;
    --border:        #e6e8f0;
    --border-strong: #d3d7e5;
    --text:          #111827;
    --text-soft:     #4b5563;
    --text-mute:     #8b93a5;
    --brand:         #4f46e5;
    --brand-dark:    #4338ca;
    --brand-soft:    #eef0ff;
    --accent:        #0ea5e9;
    --ok:            #059669;
    --warn:          #b45309;
    --err:           #dc2626;
    --ring:          rgba(79, 70, 229, .35);
    --shadow-sm:     0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    --shadow-md:     0 4px 16px rgba(16, 24, 40, .07), 0 2px 6px rgba(16, 24, 40, .05);
    --shadow-lg:     0 18px 48px rgba(16, 24, 40, .10);
    --radius:        14px;
    --radius-sm:     9px;
    --radius-lg:     22px;
    --wrap:          1180px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
            "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg:            #0e1117;
        --bg-soft:       #151a22;
        --bg-elev:       #161c25;
        --border:        #262f3d;
        --border-strong: #33405180;
        --text:          #e8ecf3;
        --text-soft:     #a9b4c4;
        --text-mute:     #7c8798;
        --brand:         #818cf8;
        --brand-dark:    #a5b4fc;
        --brand-soft:    #1d2440;
        --accent:        #38bdf8;
        --ring:          rgba(129, 140, 248, .4);
        --shadow-sm:     0 1px 2px rgba(0, 0, 0, .4);
        --shadow-md:     0 4px 18px rgba(0, 0, 0, .45);
        --shadow-lg:     0 18px 48px rgba(0, 0, 0, .55);
    }
}

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.65rem, 4.4vw, 2.6rem); }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
h3 { font-size: 1.06rem; }
p { margin: 0 0 1em; }

code, kbd { font-family: var(--mono); font-size: .875em; background: var(--bg-soft); padding: .12em .42em; border-radius: 5px; border: 1px solid var(--border); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link {
    position: absolute; inset-inline-start: -9999px; top: 8px; z-index: 100;
    background: var(--brand); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { inset-inline-start: 12px; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }

/* ============================ Header ============================ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .site-header { background: var(--bg); }
}
.header-inner { display: flex; align-items: center; gap: 14px; min-height: 62px; }

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; flex: 0 0 auto; }
.brand-text { font-size: 1.06rem; }

.site-nav { display: flex; gap: 2px; margin-inline-start: auto; }
.site-nav a {
    padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text-soft);
    font-size: .92rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.site-nav a:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--brand); background: var(--brand-soft); }

.nav-toggle { display: none; width: 40px; height: 38px; border: 1px solid var(--border); background: var(--bg-elev); border-radius: 10px; cursor: pointer; padding: 9px 9px; margin-inline-start: auto; }
.nav-toggle span { display: block; height: 2px; background: var(--text-soft); border-radius: 2px; margin: 3px 0; }

.lang-switch { position: relative; flex: 0 0 auto; }
.lang-button {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 11px; font: inherit; font-size: .88rem; color: var(--text-soft);
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
.lang-button:hover { color: var(--text); border-color: var(--border-strong); }
.lang-menu {
    position: absolute; inset-inline-end: 0; top: calc(100% + 8px); z-index: 60;
    min-width: 240px; max-height: min(70vh, 520px); overflow-y: auto;
    margin: 0; padding: 6px; list-style: none;
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); display: none;
}
.lang-switch.open .lang-menu,
.lang-switch:focus-within .lang-menu { display: block; }
.lang-menu a { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text); font-size: .9rem; text-decoration: none; }
.lang-menu a:hover { background: var(--bg-soft); text-decoration: none; }
.lang-menu a[aria-current="true"] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.lang-label { font-size: .74rem; color: var(--text-mute); }

/* ============================ Hero ============================ */
.hero { padding: 52px 0 26px; background: radial-gradient(900px 380px at 12% -10%, var(--brand-soft), transparent 65%); }
.eyebrow { font-size: .82rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--brand); margin: 0 0 12px; }
.hero h1 { max-width: 20ch; }
.lead { font-size: clamp(1rem, 1.9vw, 1.16rem); color: var(--text-soft); max-width: 68ch; margin-bottom: 22px; }
.hero-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 22px; margin: 0 0 26px; padding: 0; list-style: none; }
.hero-points li { position: relative; padding-inline-start: 24px; font-size: .93rem; color: var(--text-soft); }
.hero-points li::before {
    content: ""; position: absolute; inset-inline-start: 0; top: .45em;
    width: 15px; height: 15px; border-radius: 50%;
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 2px var(--brand);
}

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0 0 8px; }
.stats > div { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 15px; box-shadow: var(--shadow-sm); }
.stats dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute); }
.stats dd { margin: 2px 0 0; font-size: 1.35rem; font-weight: 800; color: var(--text); }
.stats dd.dd-sm { font-size: .95rem; font-weight: 700; color: var(--brand); }

/* ============================ Tool ============================ */
.tool { margin-top: -6px; }
.tool-card {
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 22px; box-shadow: var(--shadow-md);
}
.tool-formats { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.fmt-field label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.fmt-control { display: flex; align-items: center; gap: 8px; }
.fmt-control select { flex: 1 1 auto; min-width: 0; }
select, input[type="text"], input[type="number"], input[type="color"] {
    font: inherit; font-size: .93rem; color: var(--text); background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; width: 100%;
    transition: border-color .15s, box-shadow .15s;
}
select:focus, input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); outline: none; }
input[type="color"] { padding: 3px; width: 52px; height: 42px; flex: 0 0 auto; cursor: pointer; }
input[type="range"] { width: 100%; accent-color: var(--brand); }

.fmt-badge {
    flex: 0 0 auto; padding: 6px 10px; border-radius: 8px; font-size: .76rem; font-weight: 700; font-family: var(--mono);
    background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--border);
}
.swap-btn {
    width: 42px; height: 42px; margin-bottom: 24px; display: grid; place-items: center;
    background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px;
    color: var(--text-soft); cursor: pointer; transition: transform .18s, color .18s;
}
.swap-btn:hover { color: var(--brand); transform: rotate(180deg); }
.hint { font-size: .78rem; color: var(--text-mute); margin: 7px 0 0; }

.quick-targets { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0 4px; }
.chip {
    font: inherit; font-size: .83rem; font-weight: 600; color: var(--text-soft);
    background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px;
    padding: 5px 13px; cursor: pointer; transition: all .15s;
}
.chip:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.dropzone {
    margin-top: 16px; border: 2px dashed var(--border-strong); border-radius: var(--radius);
    background: var(--bg-soft); padding: 34px 20px; text-align: center; cursor: pointer;
    transition: border-color .18s, background .18s, transform .18s;
}
.dropzone:hover { border-color: var(--brand); }
.dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); transform: scale(1.005); }
.dz-icon { display: inline-grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--bg-elev); color: var(--brand); margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.dz-title { font-weight: 700; margin: 0 0 4px; }
.dz-sub { font-size: .84rem; color: var(--text-mute); margin: 0 0 14px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-size: .93rem; font-weight: 600; line-height: 1;
    padding: 11px 20px; border-radius: var(--radius-sm); border: 1px solid transparent;
    cursor: pointer; text-decoration: none; transition: all .16s; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand-soft); }
.btn-ghost { background: var(--bg-soft); color: var(--text-soft); border-color: var(--border); }
.btn-lg { padding: 13px 28px; font-size: 1rem; }
.btn-sm { padding: 8px 15px; font-size: .85rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--brand); cursor: pointer; text-decoration: none; }
.link-btn:hover { text-decoration: underline; }

.spinner {
    width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.options { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
.options > summary { padding: 12px 16px; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--text-soft); list-style: none; }
.options > summary::-webkit-details-marker { display: none; }
.options > summary::before { content: "⚙"; margin-inline-end: 8px; }
.options[open] > summary { border-bottom: 1px solid var(--border); }
.options-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; padding: 16px; }
.opt label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.opt output { color: var(--brand); font-family: var(--mono); }
.opt-inline { display: flex; align-items: center; gap: 8px; }
.opt-inline span { color: var(--text-mute); }
.check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .86rem; color: var(--text-soft); }
.check input { width: auto; }

.file-list { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.file-list-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; background: var(--bg-soft); border-bottom: 1px solid var(--border); font-size: .84rem; color: var(--text-soft); }
.file-list ul { margin: 0; padding: 0; list-style: none; max-height: 320px; overflow-y: auto; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.file-row:last-child { border-bottom: 0; }
.file-thumb { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 8px; object-fit: cover; background: var(--bg-soft); border: 1px solid var(--border); }
.file-meta { min-width: 0; flex: 1 1 auto; }
.file-name { font-size: .89rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-sub { font-size: .77rem; color: var(--text-mute); }
.file-remove { background: none; border: 0; color: var(--text-mute); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 5px 8px; border-radius: 7px; }
.file-remove:hover { color: var(--err); background: var(--bg-soft); }

.tool-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 18px; }
.alert { margin-top: 14px; padding: 12px 15px; border-radius: var(--radius-sm); font-size: .88rem; border: 1px solid; }
.alert-error { background: color-mix(in srgb, var(--err) 8%, transparent); border-color: color-mix(in srgb, var(--err) 35%, transparent); color: var(--err); }
.alert-info { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

progress { width: 100%; height: 7px; margin-top: 14px; border-radius: 999px; overflow: hidden; appearance: none; border: 0; background: var(--bg-soft); }
progress::-webkit-progress-bar { background: var(--bg-soft); }
progress::-webkit-progress-value { background: var(--brand); }
progress::-moz-progress-bar { background: var(--brand); }

.results { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.result-row {
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft);
}
.result-row.is-error { border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.result-thumb { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; background: var(--bg-elev); border: 1px solid var(--border); flex: 0 0 auto; }
.result-body { flex: 1 1 200px; min-width: 0; }
.result-title { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-meta { font-size: .78rem; color: var(--text-mute); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.result-meta .saved { color: var(--ok); font-weight: 600; }
.result-meta .grew { color: var(--warn); font-weight: 600; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .72rem; font-weight: 700; font-family: var(--mono); }

.privacy-note { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; font-size: .8rem; color: var(--text-mute); }
.privacy-note svg { flex: 0 0 auto; margin-top: 2px; color: var(--ok); }

/* ============================ Section / cards ============================ */
.section { padding: 42px 0 8px; }
.section-head { margin-bottom: 20px; max-width: 70ch; }
.section-head p { color: var(--text-soft); margin: 0; }
.section-sub { color: var(--text-mute); font-size: .9rem; margin: -14px 0 16px; }

.pair-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pair-card {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    padding: 12px 14px; background: var(--bg-elev); border: 1px solid var(--border);
    border-radius: var(--radius); font-size: .9rem; font-weight: 600; color: var(--text);
    box-shadow: var(--shadow-sm); transition: all .16s;
}
.pair-card:hover { border-color: var(--brand); box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.pair-arrow { color: var(--text-mute); }
.more-link { margin-top: 18px; }

/* 格式配色 */
.fmt-amber  { color: #b45309; background: #fef3c7; border-color: #fcd34d; }
.fmt-blue   { color: #1d4ed8; background: #dbeafe; border-color: #93c5fd; }
.fmt-teal   { color: #0f766e; background: #ccfbf1; border-color: #5eead4; }
.fmt-violet { color: #6d28d9; background: #ede9fe; border-color: #c4b5fd; }
.fmt-cyan   { color: #0e7490; background: #cffafe; border-color: #67e8f9; }
.fmt-indigo { color: #3730a3; background: #e0e7ff; border-color: #a5b4fc; }
.fmt-rose   { color: #be123c; background: #ffe4e6; border-color: #fda4af; }
.fmt-orange { color: #c2410c; background: #ffedd5; border-color: #fdba74; }
.fmt-red    { color: #b91c1c; background: #fee2e2; border-color: #fca5a5; }
.fmt-stone  { color: #57534e; background: #f5f5f4; border-color: #d6d3d1; }
.fmt-slate  { color: #475569; background: #f1f5f9; border-color: #cbd5e1; }
@media (prefers-color-scheme: dark) {
    .fmt-amber  { color: #fcd34d; background: #3b2f10; border-color: #78350f; }
    .fmt-blue   { color: #93c5fd; background: #172554; border-color: #1e40af; }
    .fmt-teal   { color: #5eead4; background: #042f2e; border-color: #115e59; }
    .fmt-violet { color: #c4b5fd; background: #2e1065; border-color: #5b21b6; }
    .fmt-cyan   { color: #67e8f9; background: #083344; border-color: #155e75; }
    .fmt-indigo { color: #a5b4fc; background: #1e1b4b; border-color: #3730a3; }
    .fmt-rose   { color: #fda4af; background: #4c0519; border-color: #9f1239; }
    .fmt-orange { color: #fdba74; background: #431407; border-color: #9a3412; }
    .fmt-red    { color: #fca5a5; background: #450a0a; border-color: #991b1b; }
    .fmt-stone  { color: #d6d3d1; background: #1c1917; border-color: #44403c; }
    .fmt-slate  { color: #cbd5e1; background: #1e293b; border-color: #334155; }
}
.pair-from, .pair-to { padding: 3px 9px; border-radius: 7px; border: 1px solid transparent; font-size: .82rem; }

.format-groups { display: grid; gap: 26px; }
.format-group h3 { font-size: .95rem; color: var(--text-mute); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.format-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.format-pill {
    display: inline-flex; align-items: baseline; gap: 6px;
    padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--bg-elev); color: var(--text); font-size: .87rem; font-weight: 600;
    transition: all .15s;
}
.format-pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; border-color: var(--brand); }
.fp-ext { font-size: .74rem; color: var(--text-mute); font-family: var(--mono); font-weight: 500; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; counter-reset: step; }
.steps li { position: relative; background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 18px 16px; box-shadow: var(--shadow-sm); }
.steps h3 { margin: 8px 0 6px; }
.steps p { margin: 0; font-size: .9rem; color: var(--text-soft); }
.step-num {
    display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    background: var(--brand); color: #fff; font-weight: 700; font-size: .9rem;
}
.steps-compact { grid-template-columns: 1fr; }
.steps-compact li { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: start; }
.steps-compact li h3 { grid-column: 2; margin: 3px 0 4px; }
.steps-compact li p { grid-column: 2; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feature { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; font-size: .89rem; color: var(--text-soft); }

.faq-list { display: grid; gap: 9px; }
.faq-item { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.faq-item > summary { padding: 14px 18px; cursor: pointer; font-weight: 600; font-size: .95rem; list-style: none; display: flex; justify-content: space-between; gap: 14px; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+"; color: var(--brand); font-weight: 700; flex: 0 0 auto; }
.faq-item[open] > summary::after { content: "−"; }
.faq-body { padding: 0 18px 15px; color: var(--text-soft); font-size: .91rem; }
.faq-body p { margin: 0; }
.faq-list-lg .faq-item > summary { font-size: 1rem; }

.section-prose { max-width: 78ch; }
.section-prose p { color: var(--text-soft); }
.prose h2 { margin-top: 1.6em; }
.prose section:first-child h2 { margin-top: 0; }
.prose p { color: var(--text-soft); }
.prose-narrow { max-width: 74ch; }
.guide-block { margin-bottom: 30px; }

.cta-card { margin-top: 34px; padding: 26px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--brand-soft), transparent); border: 1px solid var(--border); }
.cta-card h2 { margin-top: 0; }

/* ============================ 广告位 ============================ */
/* 关键点：预留 min-height，广告加载后不会把正文顶下去（CLS）。
   上线前把 min-height 调成你实际用的尺寸（如 250px 用于 300x250 矩形）。*/
.ad-wrap { margin: 22px auto; }
.ad-wrap-inline { margin: 30px 0 6px; }
.ad-wrap-side { margin: 0; }
.ad-wrap-header { margin-top: 14px; }
.ad-wrap-footer { margin-bottom: 8px; }

.ad-slot {
    position: relative;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    overflow: hidden;
    text-align: center;
}
.ad-slot .ad-body { min-height: 96px; display: flex; align-items: center; justify-content: center; }
.ad-wrap-side .ad-slot .ad-body { min-height: 250px; }
.ad-slot .adsbygoogle { display: block; width: 100%; }
.ad-label {
    display: block;
    font-size: .68rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-mute);
    margin-bottom: 6px;
}
.ad-slot-demo { border-style: dashed; }
.ad-slot-demo .ad-body { color: var(--text-mute); font-size: .84rem; }
.ad-slot-demo code { font-size: .8rem; }

/* ============================ 页面头 / 面包屑 ============================ */
.page-head { padding: 34px 0 10px; }
.page-head-center { text-align: center; }
.page-head h1 { max-width: 30ch; }
.page-head-center h1 { margin-inline: auto; }
.page-head-center .lead { margin-inline: auto; }
.head-note { font-size: .84rem; color: var(--text-mute); }
.err-code { font-size: clamp(3rem, 9vw, 5rem); font-weight: 800; color: var(--brand); margin: 0; line-height: 1; }

.breadcrumb { padding: 14px 0 0; font-size: .82rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--text-mute); }
.breadcrumb li + li::before { content: "/"; margin-inline-end: 6px; color: var(--border-strong); }
.breadcrumb a { color: var(--text-soft); }

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--text-soft); background: var(--bg-elev); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

.spec-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 20px 0 0; }
.spec-list > div { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.spec-list dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-mute); }
.spec-list dd { margin: 3px 0 0; font-size: .9rem; font-weight: 600; }

/* ============================ 两栏布局 ============================ */
.layout-two-col { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 36px; align-items: start; padding-bottom: 40px; }
.col-main { min-width: 0; }
.col-side { display: grid; gap: 16px; position: sticky; top: 78px; }
.side-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.side-card h2 { font-size: .95rem; margin-bottom: 10px; }
.side-card-accent { background: var(--brand-soft); border-color: var(--brand); }
.side-card-accent p { font-size: .88rem; color: var(--text-soft); }
.side-links { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.side-links a { font-size: .87rem; color: var(--text-soft); }
.side-links a:hover { color: var(--brand); }

.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.benefits li { position: relative; padding-inline-start: 26px; color: var(--text-soft); font-size: .93rem; }
.benefits li::before {
    content: "✓"; position: absolute; inset-inline-start: 0; top: 0;
    width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand); font-size: .72rem; font-weight: 700;
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); }
.compare-table { width: 100%; border-collapse: collapse; font-size: .89rem; min-width: 460px; background: var(--bg-elev); }
.compare-table th, .compare-table td { padding: 10px 14px; text-align: start; border-bottom: 1px solid var(--border); }
.compare-table thead th { background: var(--bg-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-mute); }
.compare-table tbody th { font-weight: 600; color: var(--text-soft); width: 34%; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }

/* ============================ 转换索引 ============================ */
.anchor-nav { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 28px; }
.chip-sm { font-size: .78rem; padding: 4px 11px; }
.pairs-by-source { display: grid; gap: 26px; }
.source-block { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.source-block > header h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.source-block > header p { font-size: .8rem; color: var(--text-mute); margin: 0 0 12px; }
.fmt-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; border: 1px solid transparent; }
.pair-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pair-links a {
    display: inline-block; padding: 5px 11px; border-radius: 7px; font-size: .82rem;
    background: var(--bg-soft); color: var(--text-soft); border: 1px solid var(--border);
}
.pair-links a:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); text-decoration: none; }

.format-section { margin-bottom: 40px; }
.format-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.format-card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.format-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.format-card h3 { margin: 0; font-size: 1rem; }
.format-mime { font-size: .76rem; color: var(--text-mute); font-family: var(--mono); margin: 4px 0 10px; word-break: break-all; }
.format-flags { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 12px; padding: 0; list-style: none; }
.format-flags li { font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); color: var(--text-mute); border: 1px solid var(--border); }
.format-flags li.on { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.format-flags li.off { opacity: .6; text-decoration: line-through; }
.format-card-actions { margin-top: auto; display: flex; gap: 14px; }

/* ============================ Footer ============================ */
.site-footer { margin-top: 56px; border-top: 1px solid var(--border); background: var(--bg-soft); padding: 40px 0 22px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; }
.footer-desc { font-size: .86rem; color: var(--text-mute); margin: 12px 0 0; max-width: 34ch; }
.brand-footer { font-size: .95rem; }
.footer-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-mute); margin-bottom: 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-links a { font-size: .87rem; color: var(--text-soft); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .8rem; color: var(--text-mute); }
.footer-bottom p { margin: 0; }

/* ============================ 响应式 ============================ */
@media (max-width: 1024px) {
    .layout-two-col { grid-template-columns: 1fr; gap: 22px; }
    .col-side { position: static; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .site-nav {
        order: 5; flex-direction: column; width: 100%;
        margin: 0; padding: 8px 0 14px; display: none; border-top: 1px solid var(--border);
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: 11px 12px; font-size: .95rem; }
    .header-inner { flex-wrap: wrap; }
    .lang-switch { margin-inline-start: 0; }
    .brand { margin-inline-end: auto; }
    .tool-formats { grid-template-columns: 1fr; }
    .swap-btn { margin: 0 auto; transform: rotate(90deg); }
    .swap-btn:hover { transform: rotate(270deg); }
}

@media (max-width: 620px) {
    body { font-size: 15.5px; }
    .hero { padding: 34px 0 18px; }
    .tool-card { padding: 16px; border-radius: var(--radius); }
    .dropzone { padding: 26px 14px; }
    .dz-icon { width: 52px; height: 52px; }
    .section { padding: 32px 0 6px; }
    .stats { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; }
    .btn-lg { width: 100%; }
    .tool-actions .btn { flex: 1 1 100%; }
    .result-thumb { width: 44px; height: 44px; }
    .col-side { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
    html { scroll-behavior: auto; }
}

/* RTL */
[dir="rtl"] .hero-points li,
[dir="rtl"] .benefits li { padding-inline-start: 26px; padding-inline-end: 0; }
[dir="rtl"] .file-list ul { padding-inline-start: 0; }

@media print {
    .site-header, .site-footer, .tool, .col-side, .lang-switch { display: none !important; }
    body { color: #000; background: #fff; }
    a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
