/* ══════════════════════════════════════════════════════════════════════════
   Loma Sub — subtitle editor. App styles on top of the design-system tokens
   (css/tokens.css). Component classes port the DS React components (Button,
   Chip, Logo, Waveform, TrialDialog, Callout); the hf-* classes come from the
   "Subtitle Editor Wireframes" file verbatim.
   ══════════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { min-height: 100vh; overflow-x: hidden; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.center { display: flex; justify-content: center; }
.spacer { flex: 1; }
.card-title { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--text-card-title); letter-spacing: var(--tracking-display); }
.muted-sm { font-size: 12.5px; color: var(--ink-400); }
.desktop-only { }
.icon { display: block; }
.icon-wrap { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ocean-ic { color: var(--ocean-500); display: inline-flex; }

/* ── DS: Button (pill — the only button shape) ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-pill); border: 0;
  font-family: var(--font-sans); font-weight: var(--fw-medium);
  cursor: pointer; user-select: none; text-decoration: none; white-space: nowrap;
  transition: all var(--dur-fast) var(--ease-ocean);
  height: 44px; padding: 0 20px; font-size: 15px;
}
.btn.sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn.lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn.full { width: 100%; }
.btn.primary { background: var(--ocean-500); color: #fff; box-shadow: var(--shadow-btn-ocean); }
.btn.primary:hover { background: var(--ocean-600); box-shadow: var(--shadow-btn-ocean-hover); transform: translateY(-2px); }
.btn.dark { background: var(--ink-900); color: #fff; box-shadow: var(--elev-3); }
.btn.dark:hover { background: var(--ink-700); transform: translateY(-2px); }
.btn.outline { background: rgba(255,255,255,.7); color: var(--ink-900); box-shadow: inset 0 0 0 1px var(--ink-100); backdrop-filter: blur(8px); }
.btn.outline:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--ocean-300); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--ink-700); }
.btn.ghost:hover { background: rgba(255,255,255,.6); color: var(--ink-900); }
.btn.ghost.danger { color: var(--coral-500); }
.btn.coral { background: var(--coral-500); color: #fff; box-shadow: var(--shadow-btn-coral); }
.btn.coral:hover { background: var(--coral-400); transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn:focus-visible, .key-chip:focus-visible, .hf-preset:focus-visible, .input:focus-visible { outline: 2px solid var(--ring-focus); outline-offset: 2px; }
.btn a, a.btn { color: inherit; }
.btn-row { display: flex; gap: 10px; align-items: center; }
.btn-row.center { justify-content: center; }
.btn-row.wrap { flex-wrap: wrap; }

/* ── DS: Chip ───────────────────────────────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-weight: var(--fw-medium); line-height: 1.5; white-space: nowrap;
  padding: 4px 12px; font-size: 12px;
}
.chip.sm { padding: 2px 10px; font-size: 11px; }
.chip.lg { padding: 6px 16px; font-size: 14px; }
.chip.ocean { background: var(--ocean-100); color: var(--ocean-700); box-shadow: inset 0 0 0 1px var(--ring-accent); }
.chip.glass { background: var(--glass-strong-bg); color: var(--ocean-700); backdrop-filter: saturate(150%) blur(16px); box-shadow: var(--elev-1), inset 0 0 0 1px var(--ring-accent); }
.chip.success { background: var(--success-bg); color: var(--success); }
.chip.coral { background: var(--coral-100); color: var(--coral-500); box-shadow: inset 0 0 0 1px var(--coral-200); }
.chip.warn { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-border); }
.chip.neutral { background: var(--ink-100); color: var(--ink-500); }
.chip.dark { background: rgba(255,255,255,.10); color: var(--ocean-300); box-shadow: inset 0 0 0 1px var(--border-on-dark); }

/* ── DS: Logo ───────────────────────────────────────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-900); text-decoration: none; flex: none; }
.logo img { height: 26px; width: auto; display: block; }
.logo .wordmark { font-family: var(--font-display); font-size: 15px; line-height: 1; letter-spacing: var(--tracking-display); font-weight: var(--fw-regular); opacity: .95; }
.logo .wordmark b { font-weight: var(--fw-semibold); }

/* ── DS: Waveform (28 bars, bars #11 and #16 coral) ─────────────────────── */
.waveform { display: flex; align-items: center; gap: 3px; }
.waveform span { width: 4px; border-radius: var(--radius-pill); background: var(--ocean-400); transform-origin: center; }
.waveform span.coral { background: var(--coral-400); }
.waveform-slot { display: inline-flex; justify-content: center; }
.waveform-slot.dim { opacity: .55; }
.waveform-slot.center { align-self: center; opacity: .6; }

/* ── DS: inputs ─────────────────────────────────────────────────────────── */
.input {
  height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border-input);
  background: var(--surface-ghost); color: var(--ink-900); font-size: 14px; outline: none;
  transition: border-color var(--dur-fast) var(--ease-ocean), box-shadow var(--dur-fast) var(--ease-ocean);
}
.input:focus { border-color: var(--ocean-300); box-shadow: 0 0 0 3px var(--ring-accent); }
.input.full { width: 100%; height: 44px; }
input[type="number"].input { width: 84px; -moz-appearance: textfield; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track { width: 34px; height: 20px; border-radius: 999px; background: var(--ink-100); position: relative; transition: background var(--dur-fast) var(--ease-ocean); flex: none; }
.toggle-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--elev-1); transition: transform var(--dur-fast) var(--ease-ocean); }
.toggle input:checked + .toggle-track { background: var(--ocean-500); }
.toggle input:checked + .toggle-track::after { transform: translateX(14px); }

/* ── DS: Callout ────────────────────────────────────────────────────────── */
.callout { display: flex; gap: 14px; border-radius: var(--radius-xl); padding: 20px; text-align: left; font-size: var(--text-ui); line-height: var(--lh-relaxed); color: var(--ink-700); }
.callout.danger { background: rgba(253,240,239,.7); box-shadow: inset 0 0 0 1px var(--coral-200); }
.callout.danger .callout-icon { color: var(--coral-500); margin-top: 2px; }
.callout-title { margin: 0 0 6px; font-weight: var(--fw-semibold); color: var(--ink-900); }
.callout.warn { background: var(--warn-bg); box-shadow: inset 0 0 0 1px var(--warn-border); align-items: center; }
.callout.warn .callout-icon { color: var(--warn); }

/* ── DS: TrialDialog pattern (the only dialog) ──────────────────────────── */
.dialog { border: 0; padding: 0; background: transparent; max-width: 448px; width: calc(100% - 40px); }
.dialog::backdrop { background: rgba(26,29,33,.4); backdrop-filter: blur(4px); }
.dialog form { position: relative; border-radius: var(--radius-2xl); background: var(--surface-card); padding: 32px; box-shadow: var(--elev-4), inset 0 0 0 1px rgba(0,0,0,.06); }
.dialog-close { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: var(--radius-pill); color: var(--ink-500); display: flex; align-items: center; justify-content: center; }
.dialog-close:hover { background: var(--ink-100); color: var(--ink-900); }
.dialog h2 { margin: 16px 0 0; font-family: var(--font-display); font-size: var(--text-h4); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-display); color: var(--ink-900); }
.dialog-body { margin-top: 12px; font-size: var(--text-ui); line-height: var(--lh-relaxed); color: var(--ink-700); }
.dialog-body code { font-family: var(--font-mono); font-size: 13px; }
.dialog .input { margin-top: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.dialog .hint { margin: 16px 0 0; font-size: 12.5px; color: var(--ink-400); }
.key-error { margin-top: 10px; font-size: 13px; color: var(--coral-500); }
.icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--ocean-100); color: var(--ocean-600); flex: none; }

/* ── key chip (nav) ─────────────────────────────────────────────────────── */
.key-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px;
  border-radius: var(--radius-pill); background: rgba(255,255,255,.7); color: var(--ink-700);
  box-shadow: inset 0 0 0 1px var(--border-input); font-size: 12.5px; transition: all var(--dur-fast) var(--ease-ocean);
}
.key-chip:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--ocean-300); color: var(--ink-900); }
.key-chip b { font-family: var(--font-mono); font-weight: 500; font-size: 11.5px; color: var(--ocean-600); }
.key-chip.missing b { color: var(--coral-500); }
.key-chip .icon-wrap { color: var(--ocean-600); }

/* ══════════════════════════════════════════════════════════════════════════
   Screens
   ══════════════════════════════════════════════════════════════════════════ */
.screen { position: relative; min-height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.screen-edit, .screen-style { background: var(--surface-ghost); overflow: visible; }

/* gradient screens: blobs, nav pill, protection fade */
.blob { position: absolute; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.blob-tl { width: 380px; height: 380px; background: rgba(46,196,212,.16); top: -90px; left: -70px; }
.blob-br { width: 320px; height: 320px; background: rgba(232,101,90,.11); bottom: -70px; right: -50px; }
.blob-tr { width: 340px; height: 340px; background: rgba(46,196,212,.14); top: -80px; right: -60px; }
.fade-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(transparent, var(--surface-ghost)); pointer-events: none; }
.hero-center { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; padding: 24px 16px 96px; }
.dolphin { position: absolute; pointer-events: none; filter: drop-shadow(0 12px 24px rgba(10,126,140,.18)); }
.dolphin-hero { width: 112px; right: 132px; top: 54px; }
.dolphin-done { width: 92px; right: 150px; top: 64px; }
.card { background: var(--surface-card); border-radius: 24px; box-shadow: var(--elev-4), inset 0 0 0 1px var(--border-card); }

/* ── 1 · Upload ─────────────────────────────────────────────────────────── */
.upload-card { width: 640px; max-width: 100%; padding: 30px 32px 26px; position: relative; }
.upload-card .chip { margin-bottom: 18px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; cursor: pointer;
  border: 2px dashed var(--ocean-300); border-radius: 20px; background: rgba(212,244,248,.22); padding: 36px 32px 28px;
  transition: background var(--dur-fast) var(--ease-ocean), border-color var(--dur-fast) var(--ease-ocean);
}
.dropzone:hover, .screen-upload.dragover .dropzone { background: rgba(212,244,248,.5); border-color: var(--ocean-400); }
.dropzone .icon-tile { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 4px; }
.drop-title { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; line-height: 1.2; color: var(--ink-900); }
.drop-title-m { display: none; }
.drop-sub { font-size: 14px; color: var(--ink-500); }
.drop-sub .mono { font-size: 13px; }
.drop-btn { margin-top: 12px; }
.dropzone .waveform-slot { margin-top: 10px; }
.upload-error { margin: 14px 0 0; font-size: 13px; color: var(--coral-500); text-align: center; }
.hf-dots { display: none; }

/* stepper (hf-step) */
.steps { display: flex; align-items: center; gap: 12px; }
.hf-step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-400); white-space: nowrap; }
.hf-step .dot { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; background: var(--ink-100); color: var(--ink-500); flex: none; }
.hf-step.done { color: var(--ink-500); }
.hf-step.done .dot { background: var(--ocean-100); color: var(--ocean-600); }
.hf-step.now { color: var(--ink-900); font-weight: 600; }
.hf-step.now .dot { background: var(--ocean-500); color: #fff; box-shadow: var(--shadow-btn-ocean); }
/* reachable steps read as enabled (ocean tint); unreachable stay grey */
.hf-step.link { cursor: pointer; border-radius: 999px; color: var(--ink-600); transition: color var(--dur-fast) var(--ease-ocean); }
.hf-step.link .dot { background: var(--ocean-100); color: var(--ocean-600); }
.hf-step.link:hover { color: var(--ink-900); }
.hf-step.link:hover .dot { box-shadow: 0 0 0 2px var(--ocean-300); }
.hf-step.link:focus-visible { outline: 2px solid var(--ring-focus); outline-offset: 2px; }
.resume-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 12px 14px 12px 16px; border-radius: 14px; background: var(--ocean-100); box-shadow: inset 0 0 0 1px var(--ocean-300); text-align: left; font-size: 12.5px; color: var(--ink-700); }
.resume-bar .mono { font-size: 11.5px; color: var(--ink-900); }
.resume-hint { font-size: 11px; color: var(--ink-500); }
.stale-note { margin: 18px 0 -6px; padding: 14px 16px; text-align: left; font-size: 12.5px; }
.stale-note .stale-body { flex: 1; }
.stale-note .callout-title { margin-bottom: 2px; font-size: 13px; }
.stale-note .btn { flex: none; }
.done-nav { gap: 8px; }
.hf-sep { width: 20px; height: 1px; background: var(--border-hairline); flex: none; }

/* ── processing (transcribing / rendering) ──────────────────────────────── */
.proc-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 16px 60px; }
.proc-card {
  width: 460px; max-width: 100%; border-radius: 24px; box-shadow: var(--elev-3), inset 0 0 0 1px rgba(255,255,255,.6);
  padding: 30px 32px; text-align: center;
}
.proc-running, .proc-error { display: flex; flex-direction: column; align-items: center; gap: 13px; }
.proc-title { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.01em; color: var(--ink-900); }
.proc-sub { font-size: 13px; color: var(--ink-500); line-height: 1.625; }
.proc-track { width: 100%; height: 8px; border-radius: 999px; background: var(--ink-100); position: relative; overflow: hidden; margin-top: 2px; }
.proc-fill { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 999px; background: linear-gradient(90deg, var(--ocean-600), var(--ocean-400)); overflow: hidden; transition: width .6s var(--ease-surface); }
.hf-shimmer { position: absolute; inset: 0 auto 0 0; width: 45%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: shimmer 1.6s var(--ease-surface) infinite; }
.proc-meta { font-size: 12px; color: var(--ink-500); }
.proc-card[data-state="error"] .proc-running { display: none; }
.proc-error .callout { width: 100%; }

/* ── hf-top bar (all screens: logo · stepper · actions) ──────────────────────────────────────────── */
.hf-top {
  display: flex; align-items: center; gap: 18px; padding: 12px 22px; min-height: 61px; box-sizing: border-box; background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-hairline); position: sticky; top: 0; z-index: 5;
} /* min-height = 12 + btn.sm 36 + 12 + hairline: identical bar on every screen */
.hf-top .steps { margin: 0 auto; }
.ptop-title, .ptop-done, .ptop-back { display: none; }

/* ── 2 · Edit ───────────────────────────────────────────────────────────── */
.edit-body { padding: 22px 24px 26px; }
.hf-grid { display: grid; gap: 22px; align-items: start; }
.hf-grid.a916 { grid-template-columns: 340px 1fr; }
.hf-grid.a11 { grid-template-columns: 420px 1fr; }
.hf-grid.a169 { grid-template-columns: 1fr; }
/* Wide desktop: keep the cue list beside a 16:9 player instead of below it */
@media (min-width: 1200px) {
  .hf-grid.a169 { grid-template-columns: minmax(0, 7fr) minmax(380px, 4fr); }
  .a169 .stage { --stage-h: clamp(280px, 70vh, 760px); }
}
.player-col { display: flex; flex-direction: column; gap: 12px; }
.player { background: var(--ink-900); border-radius: 18px; box-shadow: var(--elev-3); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.stage-slot { display: flex; align-items: center; justify-content: center; }
.stage-wrap { display: flex; align-items: center; justify-content: center; max-width: 100%; }
.hf-stagebg { background: radial-gradient(120% 100% at 50% 0%, #31363d 0%, #1A1D21 72%); }
.stage { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: var(--ar, 16 / 9); --stage-h: clamp(280px, 62vh, 620px); width: calc(var(--stage-h) * var(--arn, 1.7778)); max-width: 100%; transition: width .3s var(--ease-ocean), height .3s var(--ease-ocean); }
.stage-wrap { width: 100%; }
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: fill; background: #000; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.crop-layer { position: absolute; inset: 0; }
.stage-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255,255,255,.13); backdrop-filter: blur(6px); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center; transition: opacity var(--dur-fast) var(--ease-ocean), background var(--dur-fast) var(--ease-ocean); z-index: 2;
}
.stage-play:hover { background: rgba(255,255,255,.22); }
.stage.playing .stage-play { opacity: 0; pointer-events: none; }
.hf-safe { position: absolute; inset: 8.8% 5.5% 14.4%; border: 1.5px dashed rgba(125,220,232,.45); border-radius: 8px; pointer-events: none; z-index: 1; }
.hf-safe.landscape { inset: 6% 4% 6%; }
.hf-safe span { position: absolute; top: -8px; left: 10px; font-family: var(--font-mono); font-size: 8px; letter-spacing: .02em; color: var(--ocean-300); background: #22262b; padding: 0 5px; border-radius: 4px; }
.transport { display: flex; align-items: center; gap: 12px; padding: 2px 4px 2px; }
.play-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--ocean-500); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: var(--shadow-btn-ocean); flex: none; transition: background var(--dur-fast) var(--ease-ocean), transform var(--dur-fast) var(--ease-ocean); }
.play-circle:hover { background: var(--ocean-600); }
.play-circle:active { transform: scale(.97); }
.play-circle.sm { width: 32px; height: 32px; }
.ic-pause { display: none; }
.playing .ic-play, .player.playing .ic-play, .preview-card.playing .ic-play { display: none; }
.playing .ic-pause, .player.playing .ic-pause, .preview-card.playing .ic-pause { display: inline-flex; }
.t-cur { font-size: 13px; color: #fff; }
.t-tot { font-size: 13px; color: var(--ink-500); }
.seek { flex: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); position: relative; cursor: pointer; }
.seek::before { content: ""; position: absolute; inset: -10px 0; }
.seek-fill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--ocean-600), var(--ocean-400)); }
.seek-thumb { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: var(--elev-2); }
.seek-trim { position: absolute; top: -3px; bottom: -3px; border-left: 2px solid rgba(240,137,127,.9); border-right: 2px solid rgba(240,137,127,.9); display: none; pointer-events: none; }
.seek-trim.show { display: block; }
.player-mini { display: none; }
.stage-time, .stage-aspect { display: none; }

/* trim & crop disclosures (DS addition) */
.adv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.a916 .adv-row { grid-template-columns: 1fr; }
.adv-ic { display: inline-flex; color: var(--ocean-600); margin-right: 2px; }
.aspect-tiles { display: flex; gap: 8px; flex-wrap: wrap; }
.aspect-tile { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 62px; padding: 8px 10px 6px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--border-input); font-size: 11px; color: var(--ink-500); cursor: pointer; transition: all var(--dur-fast) var(--ease-ocean); }
.aspect-tile svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.aspect-tile:hover { color: var(--ink-900); box-shadow: inset 0 0 0 1px var(--ocean-300); transform: translateY(-1px); }
.aspect-tile.on { background: var(--ocean-100); color: var(--ocean-700); box-shadow: inset 0 0 0 1.5px var(--ocean-300); font-weight: 500; }
.adv { background: var(--surface-card); border-radius: 16px; box-shadow: var(--elev-1), inset 0 0 0 1px var(--border-card); }
.adv-toggle { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--ink-700); cursor: pointer; border-radius: 16px; }
.adv-toggle::-webkit-details-marker { display: none; }
.adv-chevron { width: 7px; height: 7px; border-right: 1.5px solid var(--ink-400); border-bottom: 1.5px solid var(--ink-400); transform: rotate(-45deg); transition: transform var(--dur-fast) var(--ease-ocean); margin-right: 2px; }
.adv[open] .adv-chevron { transform: rotate(45deg); }
.adv-state { margin-left: auto; font-size: 11px; color: var(--ocean-600); font-weight: 500; }
.adv-body { padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 14px; }
.adv-group { display: flex; flex-direction: column; gap: 8px; }
.adv-label { font-size: 12.5px; font-weight: 600; color: var(--ink-700); display: flex; align-items: center; gap: 8px; }
.adv-len { font-weight: 500; font-size: 11px; color: var(--ink-400); }
.timeline { position: relative; height: 26px; border-radius: 8px; background: var(--ink-100); user-select: none; touch-action: none; }
.tl-range { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(10,126,140,.55), rgba(46,196,212,.55)); border-radius: 8px; }
.tl-playhead { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--coral-500); transform: translateX(-50%); pointer-events: none; }
.tl-handle { position: absolute; top: -4px; bottom: -4px; width: 12px; transform: translateX(-50%); background: #fff; border-radius: 6px; box-shadow: var(--elev-2), inset 0 0 0 1px var(--border-input); cursor: ew-resize; touch-action: none; }
.trim-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-500); }
.trim-controls label { display: inline-flex; align-items: center; gap: 6px; }
.trim-controls input { width: 86px; height: 32px; text-align: center; }
.crop-inputs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-500); }
.crop-inputs label { display: inline-flex; align-items: center; gap: 6px; }
.crop-inputs input { width: 74px; height: 32px; }
.crop-box { position: absolute; border: 2px solid var(--ocean-400); box-shadow: 0 0 0 9999px rgba(0,0,0,.45); cursor: move; touch-action: none; }
.crop-handle { position: absolute; width: 12px; height: 12px; background: #fff; box-shadow: 0 0 0 1.5px var(--ocean-400); border-radius: 50%; transform: translate(-50%, -50%); touch-action: none; }
.crop-handle-nw { left: 0; top: 0; cursor: nwse-resize; }
.crop-handle-n  { left: 50%; top: 0; cursor: ns-resize; }
.crop-handle-ne { left: 100%; top: 0; cursor: nesw-resize; }
.crop-handle-e  { left: 100%; top: 50%; cursor: ew-resize; }
.crop-handle-se { left: 100%; top: 100%; cursor: nwse-resize; }
.crop-handle-s  { left: 50%; top: 100%; cursor: ns-resize; }
.crop-handle-sw { left: 0; top: 100%; cursor: nesw-resize; }
.crop-handle-w  { left: 0; top: 50%; cursor: ew-resize; }

/* cue list card */
.cues-card { border-radius: 20px; box-shadow: var(--elev-2), inset 0 0 0 1px var(--border-card); overflow: hidden; display: flex; flex-direction: column; }
.cues-head { display: flex; align-items: center; gap: 10px; padding: 15px 20px; border-bottom: 1px solid var(--border-hairline); }
.cues-hint { margin-left: auto; font-size: 12.5px; color: var(--ink-400); }
.cues-list { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; max-height: calc(100vh - 260px); min-height: 200px; }
.a169 .cues-list { max-height: 46vh; }
@media (min-width: 1200px) { .a169 .cues-list { max-height: calc(100vh - 260px); } }
.cues-foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border-hairline); font-size: 12.5px; color: var(--ink-500); }
.hf-cue { display: flex; gap: 14px; padding: 13px 14px; border-radius: 14px; cursor: pointer; transition: background var(--dur-fast) var(--ease-ocean); }
.hf-cue:hover { background: rgba(212,244,248,.4); }
.hf-cue .tc { font-family: var(--font-mono); font-size: 11px; color: var(--ink-400); padding-top: 4px; flex: none; width: 38px; }
.hf-cue .txwrap { flex: 1; min-width: 0; }
.hf-cue .tx { font-size: 15px; line-height: 1.625; color: var(--ink-700); word-break: break-word; line-break: loose; outline: none; display: inline; white-space: pre-wrap; }
.hf-cue.past .tx { color: var(--ink-400); }
.hf-cue.now { background: rgba(212,244,248,.6); box-shadow: inset 0 0 0 1.5px var(--ocean-300); }
.hf-cue.now .tx { color: var(--ink-900); font-weight: 500; }
.hf-cue:focus-within { background: rgba(212,244,248,.35); box-shadow: inset 0 0 0 1.5px var(--ocean-400); }
.hf-flag { display: none; }
.hf-flag.show { display: inline-flex; background: var(--coral-100); color: var(--coral-600); box-shadow: inset 0 0 0 1px var(--coral-200); border-radius: 999px; font-size: 11px; font-weight: 500; padding: 1px 8px; margin-left: 8px; vertical-align: 2px; white-space: nowrap; }
.mobile-actions, .typing-bar { display: none; }

/* ── 3 · Style ──────────────────────────────────────────────────────────── */
.style-body { padding: 22px 24px 26px; }
.style-grid { display: grid; grid-template-columns: 1fr 380px; gap: 22px; align-items: start; }
.style-grid > *, .style-controls > *, .ctl-grid2 > * { min-width: 0; }
.style-card { order: -1; border-radius: 20px; box-shadow: var(--elev-2), inset 0 0 0 1px var(--border-card); padding: 22px 24px 24px; }
.title-row { display: flex; align-items: baseline; gap: 10px; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.hf-preset { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; cursor: pointer; background: #fff; box-shadow: inset 0 0 0 1px var(--border-card), var(--elev-1); transition: transform var(--dur-base) var(--ease-ocean), box-shadow var(--dur-base) var(--ease-ocean); text-align: left; padding: 0; }
.hf-preset:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--border-card), var(--elev-3); }
.hf-preset.sel { box-shadow: var(--elev-glow); }
.hf-preset .sw { height: 84px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px; }
.hf-preset .lb { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; font-size: 13px; font-weight: 500; color: var(--ink-900); }
.hf-preset .htick { width: 20px; height: 20px; border-radius: 50%; background: var(--ocean-100); color: var(--ocean-600); display: none; align-items: center; justify-content: center; flex: none; }
.hf-preset.sel .htick { display: inline-flex; }
.presets { --pv-text: #fff; --pv-font: var(--font-sans); --pv-bg: rgba(26,29,33,.92); }
/* dark text is meant for light scenes / boxes — show it on a light mini-stage */
.presets.light .sw { background: linear-gradient(180deg, #e9ecef 0%, #cfd5db 100%); }
.pv { color: var(--pv-text); font-family: var(--pv-font); white-space: nowrap; }
.pv-classic { font-size: 13px; font-weight: 500; text-shadow: 0 1px 4px rgba(0,0,0,.9); }
.pv-bold { font-size: 14px; font-weight: 800; text-shadow: 0 2px 6px rgba(0,0,0,.7); }
.pv-boxed { background: var(--pv-bg); font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 6px; }
.pv-outline { font-size: 14px; font-weight: 800; -webkit-text-stroke: 0; text-shadow: -1px -1px 0 var(--pv-stroke,#000), 1px -1px 0 var(--pv-stroke,#000), -1px 1px 0 var(--pv-stroke,#000), 1px 1px 0 var(--pv-stroke,#000); }
.pv-highlight { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; }
.pv-highlight span { background: var(--pv-bg); padding: 1px 7px; border-radius: 4px; }
.hf-preset .sw.band { padding-bottom: 0; }
.pv-band { display: block; width: 100%; text-align: center; background: var(--pv-bg); font-size: 12.5px; font-weight: 600; padding: 7px 10px 8px; }
/* fine-tune rows under the look cards */
.style-controls { display: flex; flex-direction: column; gap: 18px; margin-top: 22px; }
.seg-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
.ctl-out { font-size: 11px; font-weight: 500; color: var(--ink-400); }
.ctl-hint { font-size: 11.5px; font-weight: 400; color: var(--ink-400); }
.karaoke-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
#karaokeCtl.off .karaoke-row { opacity: .5; pointer-events: none; }
#karaokeColorGroup.off { opacity: .5; pointer-events: none; }
.ctl-grid2 { display: grid; grid-template-columns: minmax(200px, 320px) 1fr; gap: 28px; align-items: start; }
.pair-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pair-tile { width: 54px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px var(--border-card); transition: transform var(--dur-fast) var(--ease-ocean), box-shadow var(--dur-fast) var(--ease-ocean); }
.pair-tile:hover { transform: translateY(-1px); }
.pair-tile:active { transform: scale(.97); }
.pair-tile.on { box-shadow: 0 0 0 2px var(--ocean-500), var(--elev-glow); }
.pair-tile .pp { font-family: var(--font-sans); font-size: 12px; font-weight: 700; line-height: 1; padding: 4px 7px; border-radius: 5px; }
.more { margin-top: 10px; }
.more summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-500); cursor: pointer; user-select: none; padding: 2px 0; }
.more summary::-webkit-details-marker { display: none; }
.more summary:hover { color: var(--ink-900); }
.more[open] .adv-chevron { transform: rotate(45deg); }
.swatch-groups { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 10px; }
.swatch-group { display: flex; align-items: center; gap: 10px; }
.swatch-label { font-size: 12px; color: var(--ink-500); min-width: 52px; }
.swatches { display: flex; gap: 8px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(26,29,33,.14); position: relative; transition: transform var(--dur-fast) var(--ease-ocean); }
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: inset 0 0 0 1px rgba(26,29,33,.14), 0 0 0 2px #fff, 0 0 0 4px var(--ocean-500); }
.swatch.none { background: #fff; }
.swatch.none::after { content: ""; position: absolute; left: 3px; right: 3px; top: 50%; height: 1.5px; background: var(--coral-500); transform: rotate(-45deg); border-radius: 2px; }
.font-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.font-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 7px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--border-card); cursor: pointer; transition: transform var(--dur-fast) var(--ease-ocean), box-shadow var(--dur-fast) var(--ease-ocean), background var(--dur-fast) var(--ease-ocean); }
.font-tile:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--border-card), var(--elev-1); }
.font-tile:active { transform: scale(.97); }
.font-tile.on { background: var(--ocean-100); box-shadow: inset 0 0 0 1.5px var(--ocean-300); }
.font-tile .fs { font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--ink-900); white-space: nowrap; }
.font-tile .fn { font-size: 10.5px; color: var(--ink-500); white-space: nowrap; }
.font-tile.on .fn { color: var(--ocean-700); }
.range-row { display: flex; align-items: center; gap: 10px; }
.range-row .range { flex: 1; width: auto; min-width: 0; }
.range-end { font-size: 11.5px; color: var(--ink-400); white-space: nowrap; }
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 999px; background: var(--ocean-100); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--ocean-500); box-shadow: 0 0 0 3px #fff, var(--shadow-btn-ocean); transition: transform var(--dur-fast) var(--ease-ocean); }
.range::-webkit-slider-thumb:hover { transform: scale(1.1); }
.range::-moz-range-track { height: 4px; border-radius: 999px; background: var(--ocean-100); }
.range::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--ocean-500); box-shadow: 0 0 0 3px #fff, var(--shadow-btn-ocean); }
.range:disabled { opacity: .5; cursor: default; }
.pos-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.pos-pad { width: 90px; height: 60px; border-radius: 10px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 6px; gap: 2px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); flex: none; }
.pos-dot { display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; border-radius: 6px; }
.pos-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.35); transition: all var(--dur-fast) var(--ease-ocean); }
.pos-dot:hover::before { background: rgba(255,255,255,.7); }
.pos-dot.on::before { width: 10px; height: 10px; background: var(--ocean-400); box-shadow: 0 0 0 3px rgba(46,196,212,.3); }
.margin-ctl { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 150px; max-width: 260px; }
.margin-ctl.off { opacity: .5; }
.margin-label { font-size: 12px; color: var(--ink-500); display: flex; gap: 8px; align-items: baseline; }
.hf-seg { display: inline-flex; background: #fff; box-shadow: inset 0 0 0 1px var(--border-input); border-radius: 999px; padding: 3px; gap: 2px; }
.hf-seg span { padding: 5px 14px; border-radius: 999px; font-size: 13px; color: var(--ink-500); cursor: pointer; transition: all var(--dur-fast) var(--ease-ocean); white-space: nowrap; user-select: none; }
.hf-seg span:hover { color: var(--ink-900); }
.hf-seg span.on { background: var(--ocean-500); color: #fff; font-weight: 600; box-shadow: var(--shadow-btn-ocean); }
.hf-seg.mini span { padding: 2px 10px; font-size: 11px; }
.preview-card { background: var(--ink-900); border-radius: 18px; box-shadow: var(--elev-4); padding: 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; position: sticky; top: 82px; }
.preview-head { display: flex; align-items: center; gap: 8px; align-self: stretch; padding: 0 4px; }
.preview-title { font-size: 13px; font-weight: 600; color: #fff; }
.preview-meta { margin-left: auto; font-size: 11px; color: var(--ink-400); }
.style-stage-slot { display: flex; justify-content: center; width: 100%; }
.style-stage-slot .stage-wrap { width: 100%; }
.style-stage-slot .stage { border-radius: 12px; --stage-h: 388px; }
.preview-foot { display: flex; align-items: center; gap: 10px; align-self: stretch; padding: 0 4px; font-size: 12px; color: var(--ink-400); }

/* ── 4 · Download ───────────────────────────────────────────────────────── */
.done-card { width: 560px; max-width: 100%; padding: 34px 36px 28px; text-align: center; position: relative; }
.check-tile { position: relative; width: 72px; height: 72px; margin: 0 auto 16px; }
.check-tile .pulse { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 2px rgba(13,155,168,.35); animation: pulseRing 2.2s var(--ease-surface) infinite; }
.check-core { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(135deg, var(--ocean-600), var(--ocean-400)); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: var(--shadow-btn-ocean); }
.done-title { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; color: var(--ink-900); }
.done-meta { font-size: 12.5px; color: var(--ink-500); margin-top: 6px; font-family: var(--font-sans); }
.done-meta .mono { font-size: 12px; }
.done-actions { margin-top: 22px; }
.done-note { font-size: 12.5px; color: var(--ink-400); line-height: 1.625; margin-top: 18px; }
.time-log { margin: 14px auto 0; font-size: 11px; color: var(--ink-400); line-height: 1.75; font-family: var(--font-sans); display: inline-grid; grid-template-columns: max-content max-content max-content; column-gap: 12px; text-align: left; }
.time-log-row { display: contents; }
.time-log .tl-label { color: var(--ink-400); }
.time-log .tl-value { font-size: 10.5px; color: var(--ink-500); }
.time-log .tl-note { color: var(--ink-300); }
.time-log-row.total .tl-label, .time-log-row.total .tl-value { color: var(--ink-600); font-weight: 500; }
.time-log .mono { font-family: var(--font-mono); }
.time-log b { font-weight: 600; color: var(--ink-700); }
.hr { height: 1px; background: var(--border-hairline); margin: 18px 0 12px; }

/* ══════════════════════════════════════════════════════════════════════════
   Mobile (< 900px) — the phone frames of the wireframe
   ══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 899px) {
  .desktop-only { display: none !important; }
  .logo img { height: 20px; }
  .logo .wordmark { font-size: 12px; }
  .key-chip .key-chip-text { display: none; }
  .key-chip { height: 28px; padding: 0 9px; }
  .hero-center { padding: 16px 16px 24px; align-items: center; }
  .dolphin-hero { width: 62px; right: 16px; top: 12px; }
  .dolphin-done { width: 56px; right: 16px; top: 12px; }
  .blob-tl { width: 200px; height: 200px; top: -60px; left: -50px; filter: blur(48px); }
  .blob-br { width: 180px; height: 180px; bottom: -50px; right: -40px; filter: blur(48px); }
  .blob-tr { width: 180px; height: 180px; top: -50px; right: -40px; filter: blur(48px); }
  .fade-bottom { display: none; }
  .hf-dots { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 10px 0 12px; background: #fff; }
  .hf-dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--ink-100); }
  .hf-dots span.on { width: 18px; background: var(--ocean-500); }

  /* upload */
  .upload-card { border-radius: 20px; padding: 18px 16px; text-align: center; }
  .upload-card .chip { margin-bottom: 10px; }
  .dropzone { border-radius: 16px; padding: 22px 14px 18px; gap: 6px; }
  .dropzone .icon-tile { width: 44px; height: 44px; border-radius: 12px; }
  .drop-title { display: none; }
  .drop-title-m { display: block; font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; color: var(--ink-900); }
  .drop-sub { font-size: 11px; color: var(--ink-400); }
  .drop-btn { width: 100%; margin-top: 8px; }

  /* processing */
  .proc-center { padding: 16px; }
  .proc-card { border-radius: 20px; padding: 22px 18px; }
  .proc-title { font-size: 18px; }

  /* top bars */
  .hf-top { padding: 12px 14px; gap: 10px; min-height: 53px; }
  .hf-top .steps { display: flex; gap: 6px; margin: 0 0 0 auto; }
  .hf-top .steps .hf-step span:not(.dot) { display: none; }
  .hf-top .steps .hf-sep { width: 8px; }
  .hf-top .steps .hf-step .dot { width: 20px; height: 20px; font-size: 10px; }
  .resume-bar { flex-direction: column; align-items: stretch; text-align: center; gap: 10px; }
  .stale-note { flex-wrap: wrap; }
  .done-nav .btn { width: 100%; }
  .screen-style .hf-top .logo { display: none; }
  .screen-style .ptop-back { display: inline-flex; color: var(--ink-500); }
  .screen-style .ptop-title { display: inline; font-size: 13px; font-weight: 600; }

  /* edit */
  .edit-body { padding: 0; }
  .hf-grid, .hf-grid.a916, .hf-grid.a11, .hf-grid.a169 { grid-template-columns: 1fr; gap: 0; }
  .player-col { gap: 0; }
  .player { border-radius: 0; box-shadow: none; padding: 0; gap: 0; }
  .player .waveform-slot, .player .transport { display: none; }
  .stage-slot { background: var(--ink-900); height: 206px; padding: 11px 0; position: relative; }
  .stage { --stage-h: 184px; border-radius: 8px; }
  .stage-wrap { width: auto; }
  .stage-play { width: 34px; height: 34px; }
  .stage-time, .stage-aspect { display: inline-block; position: absolute; right: 10px; bottom: 10px; font-size: 10px; color: var(--ink-300); background: rgba(255,255,255,.08); padding: 2px 7px; border-radius: 999px; }
  .adv-row { grid-template-columns: 1fr; gap: 0; }
  .adv { border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--border-hairline); }
  .adv-toggle { padding: 8px 12px; font-size: 12px; }
  .cues-card { border-radius: 0; box-shadow: none; }
  .cues-head { display: none; }
  .cues-list { padding: 8px; max-height: none; min-height: 0; flex: 1; }
  .a169 .cues-list { max-height: none; }
  .cues-foot { display: none; }
  .hf-cue { padding: 10px; gap: 10px; border-radius: 12px; }
  .hf-cue .tc { width: 34px; font-size: 10px; padding-top: 3px; }
  .hf-cue .tx { font-size: 13.5px; line-height: 1.55; }
  .mobile-actions { display: block; position: sticky; bottom: 0; padding: 10px 12px; border-top: 1px solid var(--border-hairline); background: #fff; z-index: 4; }
  /* typing state: player collapses to a mini bar, merge pill above the keyboard */
  .screen-edit.typing .stage-slot, .screen-edit.typing .adv, .screen-edit.typing .mobile-actions { display: none; }
  .screen-edit.typing .player-mini { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--ink-900); }
  .mini-thumb { width: 26px; height: 46px; border-radius: 5px; flex: none; }
  .mini-play { color: #fff; display: inline-flex; }
  .mini-time { font-size: 11px; color: var(--ocean-300); }
  .mini-text { font-size: 11.5px; color: var(--ink-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .screen-edit.typing .hf-top .steps { display: none; }
  .screen-edit.typing .ptop-title { display: inline; font-size: 13px; font-weight: 600; }
  .screen-edit.typing .ptop-done { display: inline; margin-left: auto; font-size: 13px; color: var(--ocean-600); font-weight: 600; }
  .screen-edit.typing .logo .wordmark { display: none; }
  .screen-edit.typing .typing-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 9px 12px; border-top: 1px solid var(--border-hairline); background: var(--surface-ghost); position: sticky; bottom: 0; z-index: 4; }
  .pill-action { display: inline-flex; align-items: center; gap: 6px; background: #fff; box-shadow: inset 0 0 0 1px var(--border-input); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 500; color: var(--ink-700); }
  .pill-action:disabled { opacity: .5; }

  /* style */
  .style-body { padding: 0; }
  .style-grid { grid-template-columns: 1fr; gap: 0; }
  .preview-card { position: static; border-radius: 0; box-shadow: none; padding: 0; gap: 0; }
  .preview-head, .preview-foot { display: none; }
  .style-stage-slot { background: var(--ink-900); height: 210px; align-items: center; position: relative; }
  .style-stage-slot .stage-wrap { width: auto; }
  .style-stage-slot .stage { --stage-h: 184px; border-radius: 8px; }
  .style-card { order: 0; border-radius: 0; box-shadow: none; padding: 12px 14px; }
  .title-row .card-title { font-size: 12.5px; font-family: var(--font-sans); }
  .title-row .muted-sm { font-size: 11px; }
  .presets { display: flex; gap: 8px; overflow-x: auto; padding: 2px; margin-top: 7px; scrollbar-width: none; }
  .presets::-webkit-scrollbar { display: none; }
  .hf-preset { width: 78px; flex: none; border-radius: 12px; }
  .hf-preset .sw { height: 40px; padding-bottom: 6px; }
  .hf-preset .lb { padding: 4px 6px 6px; font-size: 10.5px; justify-content: center; }
  .hf-preset .htick { display: none !important; }
  .pv-classic { font-size: 9px; } .pv-bold { font-size: 10px; } .pv-boxed { font-size: 9px; padding: 1px 5px; border-radius: 4px; }
  .pv-outline { font-size: 10px; } .pv-highlight { font-size: 8.5px; gap: 2px; } .pv-highlight span { padding: 0 4px; border-radius: 3px; }
  .pv-band { font-size: 9px; padding: 3px 4px 4px; }
  .style-controls { gap: 12px; margin-top: 12px; }
  .seg-label { font-size: 12.5px; margin-bottom: 7px; }
  .pair-row, .swatches { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
  .pair-row::-webkit-scrollbar, .swatches::-webkit-scrollbar { display: none; }
  .pair-tile { flex: none; }
  .swatch { flex: none; }
  .swatch-groups { gap: 8px; }
  .swatch-group { width: 100%; }
  .font-row { display: flex; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
  .font-row::-webkit-scrollbar { display: none; }
  .font-tile { flex: none; min-width: 84px; padding: 6px 8px; }
  .font-tile .fs { font-size: 13px; }
  .ctl-grid2 { grid-template-columns: 1fr; gap: 12px; }
  .pos-row { gap: 14px; }
  .pos-pad { width: 78px; height: 52px; }
  .hf-seg span { padding: 2px 10px; font-size: 11px; }
  .hf-safe { inset: 14px 6px 26px; border-radius: 6px; }
  .hf-safe.landscape { inset: 10px 8px 10px; }
  .hf-safe span { font-size: 7px; top: -7px; left: 6px; }

  /* download */
  .done-card { border-radius: 20px; padding: 22px 18px 18px; }
  .check-tile { width: 56px; height: 56px; margin-bottom: 12px; }
  .done-title { font-size: 18px; }
  .done-meta { font-size: 10.5px; margin-top: 5px; }
  .done-actions { flex-direction: column; gap: 8px; margin-top: 16px; }
  .done-actions .btn { width: 100%; height: 44px; font-size: 15px; }
  .done-note { font-size: 11px; margin-top: 12px; }
  .hr { margin: 12px 0 10px; }
  .hf-top .done-chip { display: none; } /* card itself says done; keeps the bar to logo + dots */
  .hf-top .key-chip { margin-left: 8px; }
}

@media (min-width: 900px) and (max-width: 1100px) {
  .hf-grid.a916 { grid-template-columns: 300px 1fr; }
  .style-grid { grid-template-columns: 1fr 320px; }
  .hf-top .steps .hf-step span:not(.dot) { display: none; }
}
