.cz { max-width: 860px; }
.cz-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.lang { display: flex; gap: 2px; }
.lang button { padding: 4px 8px; text-decoration: none; }
.lang button[aria-pressed="true"] { color: var(--fg); font-weight: 700; }

.drop { display: grid; gap: 4px; place-items: center; text-align: center; padding: 28px 16px; border: 2px dashed var(--line); border-radius: 14px;
  background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop strong { font-size: 17px; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-top: 16px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.list-head h2 { margin: 0; font-size: 16px; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
#list { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
#list th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 4px 6px; border-bottom: 1px solid var(--line); }
#list td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
#list tr:last-child td { border-bottom: 0; }
#list .fname { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
#list .sub { margin: 0; color: var(--muted); font-size: 12px; }
#list .warn { color: var(--err); font-size: 12px; margin: 2px 0 0; }
#list .ok { color: var(--ok); }
#list progress { width: 120px; height: 6px; }
#list button.x { padding: 0 6px; color: var(--muted); background: none; font-size: 18px; line-height: 1; }

.size-block { padding-bottom: 4px; }
.size-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 600; }
.size-val input { width: 90px; font-size: 22px; font-weight: 700; text-align: right; padding: 2px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); }
#size { width: 100%; margin: 10px 0 4px; accent-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.chips button { padding: 4px 10px; font-size: 13px; font-weight: 500; background: var(--bar); color: var(--fg); border-radius: 999px; }

.note { margin: 10px 0; padding: 8px 12px; border-radius: 10px; background: var(--bar); font-size: 14px; }
.note.err { color: var(--err); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-top: 14px; }
.check, .radio { display: flex; gap: 8px; align-items: center; margin: 4px 0; flex-wrap: wrap; }
.field { display: grid; gap: 2px; margin: 6px 0; font-size: 14px; }
.field > span:first-child { font-weight: 600; font-size: 13px; }
.field select, .field input[type="text"], .field input[type="number"] { width: 100%; padding: 8px 10px; margin: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); font: inherit; }
.num { width: 90px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); font: inherit; }
.field .num { width: 100%; }
.inline-sel { width: auto !important; padding: 6px 8px !important; margin: 0 !important; }
.save-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 14px 0 4px; }
.adv-toggle { margin-top: 12px; font-weight: 600; }

#advPanel { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.adv-top { display: grid; gap: 6px; }
.spec { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; margin: 6px 0 4px; }
.spec p { margin: 4px 0 8px; }
.spec textarea { width: 100%; margin: 6px 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); font: 13px/1.4 ui-monospace, Consolas, monospace; }
.spec-res { display: grid; gap: 8px; margin-top: 8px; font-size: 14px; }
.spec-res h4 { margin: 0 0 2px; font-size: 13px; }
.spec-res ul { margin: 0; padding-left: 18px; }
.spec-res li { margin: 1px 0; }
.spec-res .bad h4 { color: var(--err); }
.spec-res .good h4 { color: var(--ok); }
.spec-res .raw { color: var(--muted); font-size: 12px; }
.spec-res details pre { white-space: pre-wrap; font-size: 12px; max-height: 240px; overflow: auto; background: var(--bar); padding: 8px; border-radius: 8px; }
.adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.adv-grid fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px 10px; margin: 0; min-width: 0; }
.adv-grid legend { font-weight: 700; padding: 0 4px; }
#boxRow { gap: 6px; margin: 2px 0 6px; flex-wrap: wrap; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
#go { min-width: 220px; }

@media (max-width: 640px) {
  .grid2, .adv-grid { grid-template-columns: 1fr; }
  #list .fname { max-width: 140px; }
  #go { width: 100%; }
}
.size-block.off { opacity: .45; }

#list td.acts { white-space: nowrap; text-align: right; }
#list button.gear { padding: 0 6px; background: none; color: var(--muted); font-size: 16px; line-height: 1; }
#list button.gear[aria-expanded="true"] { color: var(--accent); }
#list .own { display: inline-block; margin-top: 2px; padding: 0 6px; border-radius: 999px; background: var(--bar); font-size: 11px; color: var(--accent); }
#list tr.ovr-row > td { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.ovr-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ovr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; }
.ovr-grid .field select, .ovr-grid .field input { padding: 6px 8px; font-size: 13px; }
#dirInfo.need { color: var(--err); font-weight: 600; }
#dirInfo.ok { color: var(--ok); }

.ovr-grid .field.wide { grid-column: 1 / -1; }
.ovr-grid input[type="range"] { width: 100%; accent-color: var(--muted); }
.ovr-grid input[type="range"].own { accent-color: var(--accent); }
.ovr-grid .rv { font-weight: 400; color: var(--muted); }

/* hidden должен побеждать display у .field/.row/.check */
[hidden] { display: none !important; }

.drop #pickFolderBtn { margin-top: 6px; }
.staged-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
#list .own.staged { color: var(--fg); background: var(--accent); color: var(--accent-fg); }
#list .sub.path { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }

.rejected { font-size: 13px; color: var(--muted); }
.rejected summary { cursor: pointer; }
.rejected ul { margin: 6px 0 0; padding-left: 18px; max-height: 200px; overflow: auto; }

.purpose-title { font-weight: 700; margin-bottom: 8px; }
.purposes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.purpose-btn { display: grid; gap: 2px; text-align: left; padding: 10px 12px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 12px; font-weight: 400; }
.purpose-btn b { font-size: 14px; }
.purpose-btn span { font-size: 12px; color: var(--muted); }
.purpose-btn[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.purpose { margin-bottom: 14px; }
#list button.eye { padding: 0 6px; background: none; color: var(--muted); font-size: 14px; line-height: 1; }
.preview .pv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.preview figure { margin: 0; }
.preview figcaption { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.preview video { width: 100%; border-radius: 8px; background: #000; }
@media (max-width: 640px) { .purposes { grid-template-columns: repeat(2, 1fr); } .preview .pv-grid { grid-template-columns: 1fr; } }

button.secondary { background: var(--bar); color: var(--fg); padding: 8px 14px; font-weight: 500; }

/* Сайт CompressLab: бренд, статьи, подвал, место под рекламу */
.brandbar { display: flex; gap: 16px; align-items: baseline; margin-bottom: 14px; font-size: 14px; }
.brandbar .brand { font-weight: 800; font-size: 17px; color: var(--fg); text-decoration: none; }
.brandbar a { color: var(--muted); }
.lang a { padding: 4px 8px; color: var(--muted); text-decoration: none; }
.lang a[aria-current="page"] { color: var(--fg); font-weight: 700; }
.seo { margin-top: 28px; line-height: 1.6; }
.seo h1 { font-size: 26px; }
.seo h2 { font-size: 20px; margin: 26px 0 8px; }
.seo li { margin: 4px 0; }
.seo details { border-bottom: 1px solid var(--line); padding: 8px 0; }
.seo summary { cursor: pointer; font-weight: 600; }
.seo pre { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; font-size: 13px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; display: block; overflow-x: auto; }
.tbl th, .tbl td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.guides li { margin: 10px 0; }
.site-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-foot a { color: var(--muted); }
.ad-slot { margin: 24px 0; min-height: 250px; /* место под адаптивный блок AdSense заранее — без сдвига вёрстки (CLS) */ }
.brandbar .langs { display: flex; gap: 6px; margin-left: auto; font-size: 13px; }
.brandbar .langs a[aria-current="page"] { color: var(--fg); font-weight: 600; text-decoration: none; }
.seo a { color: var(--link); }
.brandbar .langs a { padding: 4px 6px; min-width: 24px; text-align: center; }

/* CompressLab utility design. Scoped to pages that load compress.css;
   shared downloader style.css is intentionally unchanged. */
:root {
  color-scheme: light;
  --bg: #fafaf8; --fg: #161616; --muted: #626870; --card: #fff;
  --line: #d9dde1; --control-line: #858b93; --bar: #eceeed;
  --accent: #d6342c; --accent-fg: #fff; --link: #2459a1;
  --ok: #237044; --err: #b42318; --warn: #855000; --soft: #f0f1ef;
  --primary: #161616; --primary-fg: #fff; --focus: #b02c24;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121416; --fg: #f1f3f5; --muted: #a7adb5; --card: #1b1f23;
    --line: #343a40; --control-line: #79828c; --bar: #343a40;
    --accent: #ff675f; --accent-fg: #121416; --link: #9cc8ff;
    --ok: #79d5a0; --err: #ff9d96; --warn: #f1c16d; --soft: #1b1f23;
    --primary: #f1f3f5; --primary-fg: #14171a; --focus: #ff938c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121416; --fg: #f1f3f5; --muted: #a7adb5; --card: #1b1f23;
  --line: #343a40; --control-line: #79828c; --bar: #343a40;
  --accent: #ff675f; --accent-fg: #121416; --link: #9cc8ff;
  --ok: #79d5a0; --err: #ff9d96; --warn: #f1c16d; --soft: #1b1f23;
  --primary: #f1f3f5; --primary-fg: #14171a; --focus: #ff938c;
}
html { scroll-padding-top: 24px; }
body { background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, "Segoe UI", sans-serif; }
main.cz, main.sr { width: calc(100% - 112px); max-width: 1320px; margin: 0 auto; padding: 0 0 48px; }
button, input, select, textarea { font: inherit; }
button { min-height: 44px; border-radius: 5px; padding: 10px 18px; background: var(--primary); color: var(--primary-fg); font-weight: 550; cursor: pointer; border: 1px solid transparent; }
button:hover:not(:disabled) { filter: brightness(.92); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary { background: transparent; border: 1px solid var(--control-line); color: var(--fg); padding: 9px 14px; font-weight: 450; }
button.ghost, button.link { min-height: 44px; padding: 8px; background: transparent; color: var(--muted); border: 1px solid transparent; font-weight: 400; text-underline-offset: 3px; }
button.ghost:hover, button.link:hover { color: var(--fg); }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), select, textarea,
.field select, .field input[type="text"], .field input[type="number"] {
  min-height: 44px; min-width: 0; border: 1px solid var(--control-line); border-radius: 5px;
  background: var(--card); color: var(--fg); padding: 9px 12px; margin: 0;
}
select { max-width: 100%; }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; flex-shrink: 0; margin: 0; }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
:where(button, a, input, select, textarea) { -webkit-tap-highlight-color: transparent; }
a { text-underline-offset: 3px; }
.small, .hint { font-size: 14px; }
.ui-icon { display: inline-block; width: 22px; height: 22px; flex: 0 0 22px; background: currentColor; mask: var(--icon) center / contain no-repeat; vertical-align: middle; }

.icon-document-plus { --icon: url("vendor/heroicons/document-plus.svg"); }
.icon-folder { --icon: url("vendor/heroicons/folder.svg"); }
.icon-sun { --icon: url("vendor/heroicons/sun.svg"); }
.icon-moon { --icon: url("vendor/heroicons/moon.svg"); }
.icon-computer-desktop { --icon: url("vendor/heroicons/computer-desktop.svg"); }
.icon-cog-6-tooth { --icon: url("vendor/heroicons/cog-6-tooth.svg"); }
.icon-x-mark { --icon: url("vendor/heroicons/x-mark.svg"); }
.icon-play { --icon: url("vendor/heroicons/play.svg"); }
.icon-plus { --icon: url("vendor/heroicons/plus.svg"); }
.icon-chevron-down { --icon: url("vendor/heroicons/chevron-down.svg"); }

.brandbar { display: flex; align-items: center; gap: 32px; min-height: 72px; border-bottom: 1px solid var(--line); margin: 0 0 40px; font-size: 14px; }
.brandbar .brand { color: var(--fg); font-size: 24px; font-weight: 650; letter-spacing: -.9px; white-space: nowrap; text-decoration: none; }
.tool-links { display: flex; align-items: center; gap: 25px; margin: 0 auto; min-width: 0; }
.tool-links > a { position: relative; display: flex; align-items: center; min-height: 72px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.tool-links > a:hover, .tool-links > a[aria-current="page"] { color: var(--fg); }
.tool-links > a[aria-current="page"] { box-shadow: inset 0 -2px var(--accent); }
.nav-utilities { display: flex; gap: 14px; align-items: center; margin-left: auto; }
.brandbar .langs, .brandbar .lang { display: flex; align-items: center; gap: 2px; margin: 0; font-size: 13px; }
.brandbar .langs a, .brandbar .lang a, .brandbar .lang button { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 44px; padding: 7px 5px; background: none; border: 0; color: var(--muted); font-weight: 450; text-decoration: none; }
.brandbar .langs a[aria-current="page"], .brandbar .lang [aria-current="page"], .brandbar .lang [aria-pressed="true"] { color: var(--fg); font-weight: 650; }
button.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; background: transparent; color: var(--fg); border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.theme-moon { display: none; }
:root[data-theme="dark"] .theme-sun { display: none; }
:root[data-theme="dark"] .theme-moon { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun { display: none; }
  :root:not([data-theme="light"]) .theme-moon { display: inline-block; }
}
.cz-head, .sr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 0 24px; }
h1 { font-size: clamp(32px, 3.4vw, 48px); line-height: 1.15; letter-spacing: -1.6px; font-weight: 650; margin: 0; }
h2 { font-size: 23px; line-height: 1.3; letter-spacing: -.55px; font-weight: 600; }
.cz-head .sub, .sr-head .sub { color: var(--muted); font-size: 16px; line-height: 1.55; margin: 8px 0 0; max-width: 64ch; }
.privacy-short { display: flex; align-items: flex-start; gap: 12px; margin: 22px 0 0; color: var(--muted); font-size: 13px; max-width: 360px; flex: 0 0 32%; }
.privacy-short .ui-icon { width: 20px; height: 20px; flex-basis: 20px; }
.compact-drop { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; border: 1px dashed var(--control-line); border-radius: 5px; background: transparent; min-height: 100px; text-align: left; }
.drop { border-width: 1px; border-radius: 5px; background: transparent; }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 4px; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--soft); }
.drop-copy { display: flex; gap: 20px; align-items: center; min-width: 0; cursor: pointer; }
.drop-copy > .ui-icon { width: 36px; height: 36px; flex-basis: 36px; }
.drop-copy > span { min-width: 0; }
.drop-copy strong { display: block; font-size: 16px; font-weight: 550; }
.drop-help { display: block; font-size: 13px; margin-top: 3px; max-width: 60ch; }
.drop-btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.drop-btns button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; white-space: nowrap; }
.drop #pickFolderBtn { margin-top: 0; }
.compress-workspace { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(340px, 1fr); column-gap: 32px; row-gap: 24px; margin-top: 32px; }
.compress-workspace > * { min-width: 0; }
.panel { border-radius: 0; border: 0; padding: 0; margin: 0; background: transparent; }
#listBox { grid-column: 1; grid-row: 1; }
.list-head { min-height: 34px; gap: 12px; margin: 0 0 16px; align-items: flex-start; }
.list-head h2 { margin: 0; font-size: 23px; }
.list-head > span { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.list-head button { margin-top: -5px; }
.table-wrap { width: 100%; overflow-x: auto; margin: 0; }
#list { table-layout: fixed; font-size: 14px; }
#list th { color: var(--muted); font-size: 13px; font-weight: 450; padding: 10px 8px 14px; vertical-align: bottom; }
#list td { padding: 17px 8px; vertical-align: top; }
#list th:first-child { width: 43%; }
#list th:nth-child(2), #list td:nth-child(2) { display: none; }
#list th:nth-child(3) { width: 16%; }
#list th:nth-child(4) { width: 23%; }
#list th:last-child { width: 18%; }
#list .file-cell { display: table-cell; }
.file-cell .file-thumb { float: left; display: grid; place-items: center; width: 48px; height: 36px; margin-right: 12px; color: var(--muted); }
.file-thumb img { display: block; width: 48px; height: 36px; object-fit: cover; border-radius: 3px; }
.file-meta { overflow: hidden; min-width: 0; }
#list .fname { font-weight: 550; max-width: none; margin-bottom: 3px; font-size: 14px; }
#list .sub { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
#list .sub.path { max-width: 100%; }
#list .warn { font-size: 12px; line-height: 1.5; }
#list .acts { white-space: normal; padding: 10px 0; }
#list .acts button { display: inline-flex; justify-content: center; align-items: center; width: 36px; height: 44px; padding: 6px; min-height: 44px; background: transparent; color: var(--muted); border: 0; }
#list .acts .ui-icon { width: 19px; height: 19px; flex-basis: 19px; }
#list .acts button:hover { color: var(--fg); background: var(--soft); }
#list progress { width: 100%; max-width: 120px; accent-color: var(--accent); }
#list tr.ovr-row > td { padding: 16px; border: 1px solid var(--line); border-radius: 0; background: var(--soft); }
#list tr.ovr-row td:nth-child(2) { display: table-cell; }
#settings { grid-column: 2; grid-row: 1; border-left: 1px solid var(--line); padding-left: 28px; }
#settings > h2 { margin: 0 0 20px; }
#settings .field, .size-top { display: grid; grid-template-columns: minmax(100px, .95fr) minmax(0, 1.25fr); align-items: center; gap: 14px; font-weight: 400; }
#settings .field > span:first-child, .size-top > label { font-size: 14px; font-weight: 400; }
#settings .purpose { margin: 0 0 16px; }
.purpose-title { margin: 0; }
#purposeNote:empty, #audioHint:empty, #metaHint:empty, #codecHint:empty, #presetNote:empty { display: none; }
#purposeNote { font-size: 13px; margin: -6px 0 16px; }
.size-val { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--control-line); border-radius: 5px; padding-right: 12px; }
.size-val input#sizeNum { width: 100%; min-width: 0; border: 0; background: transparent; font-size: 25px; font-weight: 550; line-height: 1; text-align: left; padding: 7px 12px; min-height: 48px; }
.size-val span { font-size: 13px; }
#size { width: 100%; min-height: 24px; margin: 8px 0 0; cursor: pointer; }
#sizeHint { font-size: 12px; line-height: 1.5; margin: 0 0 12px; }
#settings .grid2 { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
#settings .grid2 > div:empty { display: none; }
#settings .grid2 > div:has(#res) { order: -1; }
#settings .field select { font-size: 14px; width: 100%; }
.check, .radio { min-height: 32px; gap: 9px; margin: 0; font-size: 14px; align-items: center; }
.check { flex-wrap: nowrap; }
.adv-toggle { position: relative; justify-content: space-between; min-height: 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 20px; cursor: pointer; font-weight: 450; }
.adv-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.adv-toggle:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.adv-toggle::after { content: ""; display: inline-block; width: 21px; height: 21px; background: currentColor; mask: url("vendor/heroicons/plus.svg") center / contain no-repeat; }
.adv-toggle:has(:checked)::after { transform: rotate(45deg); }
#advPanel { grid-column: 1 / -1; margin: 0; padding: 24px 0; border-top: 1px solid var(--line); }
.advanced-common { display: grid; gap: 8px; margin-bottom: 24px; }
.advanced-common > p { margin: 0; }
.adv-grid { gap: 24px; margin-top: 20px; }
.adv-grid fieldset, .spec { border: 1px solid var(--line); border-radius: 5px; padding: 16px; }
.adv-grid legend { font-size: 16px; font-weight: 550; }
.adv-grid .field { margin: 12px 0; gap: 6px; }
.adv-grid .field > span:first-child { font-size: 14px; font-weight: 450; }
.adv-grid .radio { flex-wrap: wrap; margin: 8px 0; }
#previewBox { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 24px 0; }
.preview video { max-height: 320px; object-fit: contain; }
.save-bar { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; margin-top: 0; }
.save-row { margin: 0; gap: 8px 12px; font-size: 14px; max-width: 70%; }
.save-row > span:first-child { display: inline-flex; align-items: center; gap: 12px; }
.save-row > span:first-child::before { content: ""; display: inline-block; width: 26px; height: 26px; background: var(--fg); mask: url("vendor/heroicons/folder.svg") center / contain no-repeat; }
#dirInfo { flex-basis: 100%; font-size: 13px; padding-left: 38px; }
#dirInfo.need { color: var(--muted); font-weight: 400; }
#dirInfo.ok { color: var(--fg); }
.actions { margin: 0; gap: 8px; justify-content: flex-end; flex-shrink: 0; max-width: 48%; }
#go { min-width: 220px; max-width: 350px; min-height: 48px; font-size: 15px; background: var(--primary); color: var(--primary-fg); }
#overall { display: block; width: 100%; text-align: right; font-size: 13px; }
#overall:empty { display: none; }
.note { border-radius: 4px; background: var(--soft); padding: 12px; }
.note.err { border-left: 3px solid var(--err); }
.seo { max-width: 760px; margin: 32px 0 0; line-height: 1.7; overflow-wrap: anywhere; }
.seo h1 { font-size: 32px; }
.seo h2 { font-size: 22px; font-weight: 600; letter-spacing: -.35px; }
.seo h3 { font-size: 18px; }
.seo details { padding: 14px 0; }
.seo summary { min-height: 30px; font-weight: 550; }
.tbl { max-width: 100%; }
.site-foot { margin-top: 48px; }
.ad-slot { min-height: 250px; margin: 48px 0; }
.sr .panel { padding: 24px 0; margin: 0; border-bottom: 1px solid var(--line); }
.sr .panel h2 { font-size: 22px; }
.sr .tabs { margin-top: 28px; margin-bottom: 0; }
.sr .tabs button { border-radius: 0; background: transparent; color: var(--muted); border: 0; }
.sr .tabs button[aria-selected="true"] { color: var(--fg); box-shadow: inset 0 -2px var(--accent); }
.sr .num { background: var(--soft); color: var(--fg); border-radius: 50%; font-size: 13px; }
.sr .dev-card { background: var(--soft); border-radius: 4px; padding: 14px; }
.sr .drop { padding: 22px; }
.sr .drop-btns { justify-content: center; }
.sr .go-row { gap: 12px; }
.sr .step .grid2 { gap: 24px 32px; }
.sr .spec summary { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.sr #list td { overflow-wrap: anywhere; }
.sr #list th:first-child { width: 35%; }
.sr #list th:nth-child(2), .sr #list td:nth-child(2) { display: table-cell; width: 20%; }
.sr #list th:nth-child(3) { width: 37%; }
.sr #list th:last-child { width: 8%; }
@media (max-width: 1100px) {
  main.cz, main.sr { width: calc(100% - 64px); }
  .brandbar { gap: 18px; }
  .tool-links { gap: 18px; }
  .brandbar .langs, .brandbar .lang { max-width: 140px; overflow-x: auto; }
  .compress-workspace { grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 24px; }
  #settings { padding-left: 24px; }
  #list th:first-child { width: 38%; } #list th:last-child { width: 23%; }
  .file-cell .file-thumb { width: 36px; margin-right: 8px; } .file-thumb img { width: 36px; height: 32px; }
  .compact-drop { align-items: flex-start; gap: 18px; }
  .drop-copy { gap: 12px; }
  .drop-help { max-width: 48ch; }
}
@media (max-width: 800px) {
  main.cz, main.sr { width: calc(100% - 40px); }
  .brandbar { flex-wrap: wrap; gap: 0 20px; margin-bottom: 28px; padding-top: 10px; }
  .brandbar .brand { min-height: 44px; display: inline-flex; align-items: center; font-size: 22px; }
  .tool-links { order: 3; width: 100%; flex-basis: 100%; overflow-x: auto; gap: 24px; }
  .tool-links > a { min-height: 48px; }
  .nav-utilities { margin-left: auto; }
  .cz-head, .sr-head { flex-wrap: wrap; gap: 14px; }
  .privacy-short { flex-basis: 100%; max-width: 100%; margin: 0; font-size: 12px; }
  .compact-drop { flex-direction: column; padding: 18px; }
  .drop-btns { flex-shrink: 1; width: 100%; justify-content: flex-start; }
  .drop-btns button { flex: 1; }
  .drop-copy strong { font-size: 15px; }
  .drop-help { max-width: 100%; }
  .compress-workspace { grid-template-columns: minmax(0, 1fr); margin-top: 28px; gap: 24px; }
  #settings { grid-column: 1; grid-row: auto; border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  #listBox { grid-row: auto; }
  #settings .field, .size-top { grid-template-columns: minmax(110px, 1fr) minmax(0, 1.3fr); }
  .save-bar { gap: 16px; flex-direction: column; align-items: stretch; padding: 20px 0; }
  .save-row { max-width: 100%; }
  .actions { max-width: 100%; width: 100%; justify-content: stretch; }
  #go { max-width: none; min-width: 0; width: 100%; }
  #overall { text-align: left; }
  #list th:first-child { width: 42%; } #list th:last-child { width: 20%; }
  .seo { margin-top: 32px; }
  .sr .dev-row, .sr .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  h1 { font-size: 32px; letter-spacing: -1px; }
  h2, .list-head h2, #settings > h2 { font-size: 21px; }
  .cz-head .sub, .sr-head .sub { font-size: 14px; }
  .tool-links { gap: 20px; font-size: 13px; }
  .brandbar .langs, .brandbar .lang { max-width: 128px; }
  .nav-utilities { gap: 4px; }
  button.theme-toggle { width: 38px; padding: 8px; }
  .compact-drop { padding: 16px; }
  .drop-copy > .ui-icon { width: 28px; height: 28px; flex-basis: 28px; }
  .drop-btns { gap: 8px; }
  .drop-btns button { font-size: 13px; padding: 9px 8px; }
  .table-wrap { overflow-x: visible; }
  #list, #list tbody { display: block; width: 100%; }
  #list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #list tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 10px 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
  #list tr:first-child { border-top: 1px solid var(--line); }
  #list td { display: block; padding: 0; border: 0; min-width: 0; }
  #list td.file-cell { display: block; grid-column: 1 / -1; }
  #list td:nth-child(2) { display: none; }
  #list td:nth-child(3) { grid-column: 1; }
  #list td:nth-child(4) { grid-column: 2; }
  #list td:nth-child(3)::before, #list td:nth-child(4)::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; margin-bottom: 3px; }
  #list td.acts { display: flex; grid-column: 3; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; width: 72px; padding: 0; }
  #list .acts .eye { display: none; }
  #list .fname { white-space: normal; overflow-wrap: anywhere; font-size: 14px; }
  .file-cell .file-thumb { width: 48px; margin-right: 12px; }
  .file-thumb img { width: 48px; height: 36px; }
  #list tr.ovr-row { display: block; padding: 12px 0; }
  #list tr.ovr-row > td { display: block; padding: 12px; }
  .ovr-grid { grid-template-columns: 1fr; }
  .ovr-head { align-items: flex-start; flex-wrap: wrap; }
  .adv-grid { grid-template-columns: 1fr; gap: 16px; }
  #boxRow { grid-column: 1 / -1; }
  #settings .field, .size-top { gap: 12px; }
  .size-val input#sizeNum { font-size: 24px; }
  .sr #list .src { min-width: 0; }
  .sr #list td:nth-child(2) { display: block; grid-column: 1; }
  .sr #list td:nth-child(3) { grid-column: 2 / -1; }
  .sr #list td:nth-child(4) { grid-column: 1 / -1; }
  .sr #list td:first-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0s !important; animation-duration: 0s !important; } }
[hidden] { display: none !important; }



/* Fidelity refinements after same-size comparison with the approved PNG. */
.tool-links { margin: 0 0 0 40px; font-size: 16px; }
.brandbar { gap: 24px; }
h1 { font-size: clamp(32px, 4.2vw, 58px); font-weight: 600; letter-spacing: -2px; }
.cz-head .sub, .sr-head .sub { font-size: 18px; }
.privacy-short { font-size: 14px; }
.drop-copy strong { font-size: 18px; font-weight: 500; }
.drop-copy > .ui-icon { width: 40px; height: 40px; flex-basis: 40px; }
.drop-btns button { font-size: 16px; min-height: 48px; }
.list-head h2, #settings > h2 { font-size: 25px; }
#list { font-size: 16px; }
#list th { font-size: 14px; }
#list .fname { font-size: 16px; font-weight: 500; }
#list .sub, #list .warn { font-size: 13px; }
#list .acts .eye { display: none; }
#list .acts .ui-icon { width: 22px; height: 22px; flex-basis: 22px; }
.file-cell button.file-thumb { padding: 0; min-height: 44px; height: 44px; min-width: 48px; border: 0; background: transparent; }
.file-cell button.file-thumb:hover { background: var(--soft); }
.estimates-note { margin: 16px 0 0; font-size: 14px; }
#settings .field > span:first-child, .size-top > label { font-size: 16px; }
#settings .field select, #settings .check, #settings .adv-toggle { font-size: 16px; }
#settings .field, .size-top { grid-template-columns: minmax(130px, 1fr) minmax(0, 1.55fr); gap: 12px; }
#sizeHint, #purposeNote { font-size: 14px; }
#settings .grid2 { gap: 12px; }
#settings .grid2 > div:not(:has(*)) { display: none; }
#settings .adv-toggle { margin-top: 20px; }
#go { font-size: 16px; min-height: 52px; }
#overall { font-size: 14px; }
@media (max-width:1100px) { .tool-links { margin-left: 12px; font-size: 14px; } .brandbar { gap: 12px; } #settings .field, .size-top { grid-template-columns: 1fr 1.25fr; } }
@media (max-width:800px) { .tool-links { margin: 0; } h1 { letter-spacing: -1px; } .privacy-short { font-size: 13px; } .cz-head .sub, .sr-head .sub { font-size: 16px; } }
@media (max-width:540px) { h1 { font-size: 32px; } .tool-links { font-size: 13px; } .drop-copy strong { font-size: 16px; } .drop-btns button { font-size: 14px; } #settings .field > span:first-child, .size-top > label { font-size: 14px; } #settings .field select, #settings .check, #settings .adv-toggle { font-size: 14px; } .list-head h2,#settings > h2 { font-size:22px; } #list {font-size:15px;} #list .fname {font-size:15px;} .file-cell button.file-thumb {min-width:48px;} }

@media(min-width:801px) {
 #list th:first-child {width:50%;} #list th:nth-child(3) {width:20%;} #list th:nth-child(4) {width:18%;} #list th:last-child {width:12%;}
 #list .acts button {width:44px;}
 .file-cell .file-thumb, .file-cell button.file-thumb {width:64px;min-width:64px;height:48px;margin-right:14px;}
 .file-thumb img {width:64px;height:48px;}
 #settings .field, .size-top {grid-template-columns:minmax(130px,.9fr) minmax(0,1.8fr);}
}
#list .estimate-detail {display:none;}
.advanced-open #list .estimate-detail {display:block;}

/* Reset legacy TV-specific header direction and step-number sizing. */
.sr-head {flex-direction:row;}
.sr .brandbar .brand {margin-right:0;font-size:24px;font-weight:650;letter-spacing:-.9px;}
.sr .step h2 > .num {display:inline-grid;place-items:center;width:28px;height:28px;min-width:28px;flex:0 0 28px;padding:0;line-height:1;border:0;font-size:13px;}
.sr article.seo details {border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;margin:0;padding:14px 0;}
.sr article.seo h2 {font-size:22px;}
.sr article.seo table {display:block;max-width:100%;overflow-x:auto;}
.sr #whyOut {overflow-x:auto;}
@media(max-width:800px) {.sr .brandbar .brand {font-size:22px;} }
