/* youtubethumbnailtool.com - single stylesheet, no build step */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-latin.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  accent-color: var(--accent);
  --bg: #ffffff;
  --bg-elev: #ffffff;
  --bg-sunk: #f6f5f2;
  --fg: #1c1b19;
  --fg-muted: #66635c;
  --border: rgba(28, 27, 25, .10);
  --border-strong: rgba(28, 27, 25, .20);
  --accent: #c8420f;
  --accent-hover: #a8360c;
  --accent-soft: #fbeae2;
  --accent-fg: #ffffff;
  --ok: #1d8a4d;
  --warn: #b7791f;
  --danger: #c2342f;
  --danger-soft: #fbe9e8;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 72px;
  --font-sans: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow-1: 0 1px 2px rgba(20, 18, 10, .06), 0 1px 6px rgba(20, 18, 10, .04);
  --shadow-2: 0 8px 28px rgba(20, 18, 10, .10);
  --max-w: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211;
    --bg-elev: #1b1b19;
    --bg-sunk: #0c0c0b;
    --fg: #ecebe6;
    --fg-muted: #a3a099;
    --border: rgba(255, 255, 255, .10);
    --border-strong: rgba(255, 255, 255, .22);
    --accent: #ff8a5b;
    --accent-hover: #ffa07c;
    --accent-soft: #35201a;
    --accent-fg: #1a0c06;
    --ok: #4cc47e;
    --warn: #e0a84a;
    --danger: #ef6b66;
    --danger-soft: #3a1c1b;
    --shadow-1: none;
    --shadow-2: none;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --bg-elev: #1b1b19; --bg-sunk: #0c0c0b; --fg: #ecebe6; --fg-muted: #a3a099;
  --border: rgba(255,255,255,.10); --border-strong: rgba(255,255,255,.22); --accent: #ff8a5b; --accent-hover: #ffa07c;
  --accent-soft: #35201a; --accent-fg: #1a0c06; --ok: #4cc47e; --warn: #e0a84a; --danger: #ef6b66; --danger-soft: #3a1c1b;
  --shadow-1: none; --shadow-2: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.0625rem);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, video, canvas, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 var(--space-3); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem); margin-top: var(--space-6); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 var(--space-4); text-wrap: pretty; }
small, .muted { color: var(--fg-muted); }
code { font-family: var(--font-mono); font-size: .9em; background: var(--bg-sunk); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-s); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--space-4); }
.narrow { max-width: 46rem; }
main { flex: 1; padding-bottom: var(--space-8); }

::selection { background: var(--accent-soft); color: var(--fg); }
.hero-form { margin-top: var(--space-5); max-width: 46rem; }
.hero-form .hint a { font-weight: 600; }
.section-title { margin-top: var(--space-4); }
.tool-rows { display: grid; gap: var(--space-3); }
.tool-row { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4); align-items: center; padding: var(--space-4) var(--space-5); background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-l); color: inherit; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.tool-row:hover { color: inherit; box-shadow: var(--shadow-2); transform: translateY(-1px); }
.tool-row .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.tool-row .icon svg { width: 22px; height: 22px; }
.tool-row .text { display: flex; flex-direction: column; gap: 2px; }
.tool-row .text strong { font-size: 1.1rem; }
.tool-row .text span { color: var(--fg-muted); font-size: .95rem; max-width: 60ch; }
.tool-row .arrow { color: var(--accent); width: 22px; height: 22px; transition: transform .15s ease; }
.tool-row:hover .arrow { transform: translateX(3px); }
@media (max-width: 40rem) { .tool-row { grid-template-columns: auto 1fr; } .tool-row .arrow { display: none; } }

/* Header */
.site-header { border-bottom: 1px solid var(--border); background: var(--bg-elev); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; gap: var(--space-4); min-height: 3.6rem; }
.brand { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 700; text-decoration: none; color: var(--fg); letter-spacing: -0.01em; }
.brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: var(--accent-fg); }
.brand .logo svg { width: 16px; height: 16px; }
.brand span b { color: var(--accent); }
.site-nav { margin-left: auto; display: flex; gap: var(--space-1); flex-wrap: wrap; }
.site-nav a { color: var(--fg-muted); text-decoration: none; padding: 6px 10px; border-radius: var(--radius-s); font-weight: 500; font-size: .95rem; }
.site-nav a:hover { color: var(--fg); background: var(--bg-sunk); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
@media (max-width: 48rem) {
  .site-header { position: static; }
  .site-nav { margin-left: 0; width: 100%; gap: 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-header .container { flex-wrap: wrap; padding-top: 8px; }
  .site-nav a { white-space: nowrap; font-size: .9rem; }
}

/* Hero / page intro */
.hero { padding-top: var(--space-7); padding-bottom: var(--space-5); }
.hero p.lede { font-size: 1.15rem; color: var(--fg-muted); max-width: 46rem; margin-bottom: var(--space-5); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.pill.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }

/* Cards */
.tool-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.tool-card { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-l); text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border); color: inherit; }
.tool-card .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.tool-card .icon svg { width: 22px; height: 22px; }
.tool-card h2, .tool-card h3 { margin: var(--space-2) 0 0; font-size: 1.15rem; }
.tool-card p { margin: 0; color: var(--fg-muted); font-size: .95rem; }
.tool-card .cta { margin-top: auto; padding-top: var(--space-3); color: var(--accent); font-weight: 600; font-size: .95rem; }

/* Panels & layout helpers */
.panel { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-l); padding: var(--space-5); }
.panel + .panel { margin-top: var(--space-4); }
.stack > * + * { margin-top: var(--space-4); }
.row { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid-2 { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.section { margin-top: var(--space-7); }
.section-tight { margin-top: var(--space-5); }

/* Buttons */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 2.5rem; padding: 0 12px; border-radius: var(--radius-m); border: 1px solid transparent; background: var(--accent); color: var(--accent-fg); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .12s ease, border-color .12s ease, color .12s ease; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); color: var(--accent-fg); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--bg-elev); color: var(--fg); border-color: var(--border-strong); }
.btn.secondary:hover { background: var(--bg-sunk); color: var(--fg); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: transparent; color: var(--danger); border-color: transparent; }
.btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn.small { min-height: 2rem; padding: 0 10px; font-size: .9rem; border-radius: var(--radius-s); }
.btn.small svg { width: 16px; height: 16px; }
.btn.large { min-height: 3rem; padding: 0 18px; font-size: 1.05rem; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-group { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-m); overflow: hidden; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.seg span { display: inline-block; padding: 6px 12px; font-size: .92rem; font-weight: 500; cursor: pointer; color: var(--fg-muted); background: var(--bg-elev); border-right: 1px solid var(--border); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--accent-soft); color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field .label { font-weight: 600; font-size: .92rem; }
.field .hint { font-size: .85rem; color: var(--fg-muted); }
.input, input[type="text"], input[type="url"], input[type="number"], textarea, select {
  font: inherit; color: var(--fg); background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--radius-m); padding: 10px 12px; min-height: 2.5rem; width: 100%; }
.input:focus, input[type="text"]:focus, input[type="url"]:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
.input-row { display: flex; gap: var(--space-2); }
.input-row .input { flex: 1; }
@media (max-width: 40rem) { .input-row { flex-direction: column; } .input-row .btn { width: 100%; } }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.error-text { color: var(--danger); font-size: .92rem; }
.notice { padding: var(--space-3) var(--space-4); border-radius: var(--radius-m); background: var(--accent-soft); color: var(--fg); font-size: .95rem; border: 1px solid transparent; }
.notice.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.notice.error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.notice p:last-child { margin: 0; }

/* Dropzone */
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius-l); padding: var(--space-6) var(--space-4); text-align: center; background: var(--bg-elev); cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); }
.dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone .dz-icon { width: 44px; height: 44px; margin: 0 auto var(--space-3); border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.dropzone .dz-icon svg { width: 24px; height: 24px; }
.dropzone strong { display: block; font-size: 1.05rem; }
.dropzone p { margin: 4px 0 0; color: var(--fg-muted); font-size: .92rem; }
.dropzone input[type="file"] { display: none; }

/* Toast */
.toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; pointer-events: none; }
.toast { background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-m); font-size: .95rem; box-shadow: var(--shadow-2); animation: toast-in .18s ease; max-width: min(90vw, 32rem); }
.toast.error { background: var(--danger); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Downloader */
.video-meta { display: flex; gap: var(--space-3); align-items: center; }
.video-meta .thumb { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-s); background: var(--bg-sunk); }
.video-meta h2 { margin: 0; font-size: 1.1rem; }
.video-meta .muted { font-size: .9rem; }
.variant-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.variant { border: 1px solid var(--border); border-radius: var(--radius-m); overflow: hidden; background: var(--bg-elev); display: flex; flex-direction: column; }
.variant.featured { grid-column: 1 / -1; }
.variant .img-wrap { background: var(--bg-sunk); display: grid; place-items: center; aspect-ratio: 16/9; overflow: hidden; }
.variant.featured .img-wrap { max-height: 480px; }
.variant .img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.variant .img-wrap.letterbox img { object-fit: contain; }
.variant .body { padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.variant .title { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.variant .title strong { font-size: 1rem; }
.variant .dims { font-family: var(--font-mono); font-size: .85rem; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.variant .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.variant.missing .img-wrap { aspect-ratio: 16/9; color: var(--fg-muted); font-size: .9rem; padding: var(--space-4); text-align: center; }
details.alt { margin-top: var(--space-4); }
details.alt summary { cursor: pointer; font-weight: 600; padding: var(--space-2) 0; }
details.alt .variant-grid { margin-top: var(--space-3); }
.skeleton { background: linear-gradient(90deg, var(--bg-sunk) 25%, var(--border) 50%, var(--bg-sunk) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--radius-s); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* FAQ / content */
.faq details { border-top: 1px solid var(--border); padding: var(--space-3) 0; }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: var(--space-3); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--fg-muted); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: var(--space-2) 0 0; color: var(--fg-muted); }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.steps li { counter-increment: step; padding: var(--space-4); background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-m); }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); font-weight: 700; margin-bottom: var(--space-2); }
.steps li strong { display: block; }
.specs { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 0; }
.specs > div { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); }
.specs dt { font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.specs dd { margin: 2px 0 0; font-size: .85rem; color: var(--fg-muted); }
@media (min-width: 52rem) { .specs > div { border-top: 0; border-left: 1px solid var(--border); } .specs > div:first-child { border-left: 0; padding-left: 0; } }
.prose p, .prose ul { max-width: 46rem; }
.prose p, .prose li { color: var(--fg-muted); }
.prose ul { padding-left: 1.2rem; }
.other-tools { margin-top: var(--space-7); }
.other-tools .tool-grid { margin-top: var(--space-4); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: var(--space-5) 0; color: var(--fg-muted); font-size: .9rem; }
.site-footer .container { display: flex; gap: var(--space-4); flex-wrap: wrap; justify-content: space-between; }
.site-footer a { color: var(--fg-muted); font-weight: 400; }
.site-footer nav { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* Preview tool mockups (scoped; local variables so global theme changes do not leak in) */
.candidates { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.candidate { position: relative; border: 1px solid var(--border); border-radius: var(--radius-m); overflow: hidden; background: var(--bg-elev); }
.candidate img { aspect-ratio: 16/9; width: 100%; object-fit: cover; }
.candidate .cap { padding: 6px 8px; font-size: .8rem; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.candidate .cap span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.candidate .warn { color: var(--warn); }
.candidate .remove { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 16px; line-height: 1; }
.candidate .badge-letter { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 6px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.preview-controls { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; }
.preview-controls .seg { flex: none; }
.mock-sections { display: grid; gap: var(--space-5); margin-top: var(--space-5); }
.mock-section h3 { display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-3); }
.mock-section h3 .muted { font-weight: 400; font-size: .9rem; }

.mock {
  --m-bg: #ffffff; --m-fg: #0f0f0f; --m-fg2: #606060; --m-line: #e5e5e5; --m-ph: #e8e8e8; --m-ph2: #f2f2f2; --m-chip: #f2f2f2;
  background: var(--m-bg); color: var(--m-fg); border: 1px solid var(--m-line); border-radius: 12px; padding: 16px; overflow: hidden;
  font-family: Roboto, Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.3;
}
.mock[data-theme="dark"] { --m-bg: #0f0f0f; --m-fg: #f1f1f1; --m-fg2: #aaaaaa; --m-line: #272727; --m-ph: #272727; --m-ph2: #1f1f1f; --m-chip: #272727; }
.mock .th { position: relative; aspect-ratio: 16/9; width: 100%; background: var(--m-ph); border-radius: 12px; overflow: hidden; }
.mock .th img { width: 100%; height: 100%; object-fit: cover; }
.mock .th.ph { background: linear-gradient(135deg, var(--m-ph), var(--m-ph2)); }
.mock .th .dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0,0,0,.8); color: #fff; font-size: 12px; font-weight: 500; padding: 2px 4px; border-radius: 4px; line-height: 1.2; }
.mock .th .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.35); }
.mock .th .progress i { display: block; height: 100%; width: 42%; background: #f00; }
.mock.squint .th img { filter: blur(6px); }
.mock.no-dur .dur { display: none; }
.mock .meta { display: flex; gap: 12px; margin-top: 12px; }
.mock .av { width: 36px; height: 36px; border-radius: 50%; background: var(--m-ph); flex: none; display: grid; place-items: center; font-weight: 600; color: var(--m-fg2); overflow: hidden; }
.mock .av img { width: 100%; height: 100%; object-fit: cover; }
.mock .av.ph { background: linear-gradient(135deg, var(--m-ph), var(--m-ph2)); }
.mock .ttl { font-weight: 500; font-size: 16px; line-height: 22px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mock .sub { color: var(--m-fg2); font-size: 14px; margin-top: 4px; }
.mock .ph-line { height: 12px; border-radius: 6px; background: var(--m-ph); margin-top: 6px; }
.mock .ph-line.w60 { width: 60%; } .mock .ph-line.w80 { width: 80%; } .mock .ph-line.w40 { width: 40%; }
.mock .chips { display: flex; gap: 8px; margin-bottom: 16px; overflow: hidden; }
.mock .chips span { background: var(--m-chip); border-radius: 8px; padding: 6px 12px; font-size: 14px; white-space: nowrap; }
.mock .chips span.on { background: var(--m-fg); color: var(--m-bg); }
.mock .home-grid { display: grid; gap: 16px 16px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 40rem) { .mock .home-grid { grid-template-columns: repeat(2, 1fr); } }
.mock .search-row { display: flex; gap: 16px; padding: 8px 0; }
.mock .search-row .th { width: 360px; max-width: 45%; flex: none; }
.mock .search-row .ttl { font-size: 18px; line-height: 26px; }
.mock .search-row .desc { color: var(--m-fg2); font-size: 12px; margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mock .search-row .ch { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--m-fg2); font-size: 12px; }
.mock .search-row .av { width: 24px; height: 24px; font-size: 11px; }
.mock .side-list { display: flex; flex-direction: column; gap: 8px; max-width: 402px; }
.mock .side-row { display: flex; gap: 8px; }
.mock .side-row .th { width: 168px; flex: none; border-radius: 8px; }
.mock .side-row .ttl { font-size: 14px; line-height: 20px; }
.mock .side-row .sub { font-size: 12px; margin-top: 2px; }
.mock .mobile { width: 375px; max-width: 100%; margin: 0 auto; border: 1px solid var(--m-line); border-radius: 24px; padding: 12px 0; background: var(--m-bg); }
.mock .mobile .th { border-radius: 0; }
.mock .mobile .meta { padding: 0 12px; }
.mock .mobile .bar { display: flex; justify-content: space-between; padding: 0 16px 12px; color: var(--m-fg2); font-size: 12px; }
.mock .mobile .bar b { color: var(--m-fg); font-size: 16px; }
.mock .mobile .card + .card { margin-top: 20px; }
.mock .tiny-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.mock .tiny-row .th { width: 120px; border-radius: 6px; }
.mock .tiny-row figure { margin: 0; text-align: center; font-size: 12px; color: var(--m-fg2); }
.mock .tiny-row figcaption { margin-top: 4px; }
.mock .mark { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; border-radius: 5px; background: var(--accent); color: #fff; font: 700 11px/20px var(--font-sans); text-align: center; z-index: 1; }
.mock.no-marks .mark { display: none; }

/* Resize tool */
.crop-stage { position: relative; width: 100%; aspect-ratio: 16/9; background: var(--bg-sunk); border-radius: var(--radius-m); overflow: hidden; touch-action: none; cursor: grab; user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crop-stage canvas.overlay { pointer-events: none; }
.crop-stage.empty { display: grid; place-items: center; color: var(--fg-muted); }
.tool-layout { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); align-items: start; }
@media (max-width: 56rem) { .tool-layout { grid-template-columns: 1fr; } }
.side-panel .field + .field { margin-top: var(--space-4); }
.side-panel .stat { display: flex; justify-content: space-between; font-size: .95rem; padding: 6px 0; border-top: 1px solid var(--border); }
.side-panel .stat:first-of-type { border-top: 0; }
.side-panel .stat b { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat b.over { color: var(--danger); }
.stat b.ok { color: var(--ok); }
.range-label { display: flex; justify-content: space-between; font-size: .9rem; }
.range-label output { font-family: var(--font-mono); }

/* Frame grabber */
.video-stage { position: relative; background: #000; border-radius: var(--radius-m); overflow: hidden; aspect-ratio: 16/9; display: grid; place-items: center; }
.video-stage video { width: 100%; height: 100%; object-fit: contain; }
.timeline { margin-top: var(--space-3); }
.timeline .times { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .85rem; color: var(--fg-muted); margin-top: 4px; }
.transport { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: var(--space-3); }
.transport .spacer { flex: 1; }
.gallery { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); margin-top: var(--space-4); }
.gallery figure { margin: 0; border: 1px solid var(--border); border-radius: var(--radius-m); overflow: hidden; background: var(--bg-elev); }
.gallery img { aspect-ratio: 16/9; width: 100%; object-fit: contain; background: #000; }
.gallery figcaption { padding: 8px 10px; font-size: .85rem; display: flex; flex-direction: column; gap: 6px; }
.gallery figcaption .row { gap: 4px; }
.kbd { font-family: var(--font-mono); font-size: .8rem; background: var(--bg-sunk); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; }

/* Sticky action bar on mobile */
@media (max-width: 56rem) {
  .sticky-actions { position: sticky; bottom: 0; background: var(--bg-elev); border-top: 1px solid var(--border); padding: var(--space-3) var(--space-4); margin: var(--space-4) calc(-1 * var(--space-4)) 0; z-index: 10; }
}

/* 404 */
.center { text-align: center; padding-top: var(--space-8); padding-bottom: var(--space-8); }

.center .btn-group { justify-content: center; }
.center .lede { margin-left: auto; margin-right: auto; }
