/* Omni Clip interface.
   One restrained system (approved by Darma, 2026-11-12): graphite surfaces, warm
   off-white text, a single orange accent, hairline borders, no shadows or gradients.
   Motion is short and purposeful, and switched off for people who ask for less. */

@font-face { font-family: "Instrument Sans"; font-weight: 400 700; font-display: swap; src: url("fonts/instrument-sans-3.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-2.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: #0d0e0f; --surface: #141617; --raised: #1b1e20;
  --line: #25282b; --line-strong: #33373b;
  --text: #eceae6; --muted: #9da2a8; --faint: #6a7077;
  --accent: #ff6a3d; --accent-ink: #1a0d07;
  --keep: #46c28a; --reject: #e5595d;
  --radius: 8px;
  --sans: "Instrument Sans", system-ui, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --fast: 140ms cubic-bezier(.2, .7, .3, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.label { font-size: 11px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.muted { color: var(--muted); }
.error { color: var(--reject); }

.app { display: grid; grid-template-columns: 208px minmax(0, 1fr); height: 100vh; }

/* ---------- Navigation ---------- */
.nav { display: flex; flex-direction: column; border-right: 1px solid var(--line); padding: 16px 10px 14px; min-height: 0; }
.brand { display: flex; align-items: center; gap: 9px; padding: 2px 8px 18px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand svg { flex: none; }
.nav a.item { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; border-radius: 6px; color: var(--muted); transition: background var(--fast), color var(--fast); }
.nav a.item:hover { background: var(--surface); color: var(--text); }
.nav a.item[aria-current="page"] { background: var(--raised); color: var(--text); }
.nav .count { font-size: 12px; color: var(--accent); }
.nav-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.nav-foot .row { display: flex; justify-content: space-between; gap: 8px; }
.nav-foot .activity { display: grid; gap: 5px; padding-bottom: 6px; color: var(--text); }
.nav-foot .activity span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Main column ---------- */
main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 16px; padding: 0 20px; height: 56px; border-bottom: 1px solid var(--line); flex: none; }
.top h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top .spacer { margin-left: auto; }
.chips { display: flex; gap: 6px; flex: none; }
.chip { font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.top .progress { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; font-size: 12px; color: var(--muted); }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; font-weight: 500; font-size: 13px; white-space: nowrap; transition: background var(--fast), border-color var(--fast), color var(--fast), opacity var(--fast); }
.btn:hover { background: var(--raised); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { background: #ff7c54; }
/* A switched-off button looks switched off and cannot be pressed: this is what stops click-spam. */
button:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; pointer-events: none; }
kbd { font: 500 11px var(--mono); color: var(--faint); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 5px; line-height: 16px; }
.linkbtn { font-size: 12px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.linkbtn:hover { color: var(--text); }

/* ---------- Progress: always a real measurement, never a timer ---------- */
.meter { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; min-width: 60px; }
.meter i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width 420ms linear; }
.meter.done i { background: var(--keep); }
.meter.thin { height: 3px; }
.working { display: grid; gap: 6px; min-width: 0; }
.working .line { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }
.working .line span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }

/* ---------- Videos ---------- */
.videos { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; display: grid; gap: 18px; align-content: start; }
.add { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 12px; transition: border-color var(--fast), background var(--fast); }
.add.over { border-color: var(--accent); background: var(--surface); }
.add .rowline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.add .grow { flex: 1; min-width: 220px; color: var(--muted); }
.add strong { color: var(--text); font-weight: 500; }
.add input[type=url] { flex: 1; min-width: 240px; height: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; transition: border-color var(--fast); }
.add input[type=url]:focus { outline: none; border-color: var(--accent); }
.add label.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); cursor: pointer; }
.add input[type=checkbox] { accent-color: var(--accent); width: 14px; height: 14px; }
.styleinfo { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.styleinfo .about strong { color: var(--text); font-weight: 500; }
.styleinfo details summary { cursor: pointer; font-size: 12px; color: var(--faint); width: fit-content; }
.styleinfo details summary:hover { color: var(--text); }
.styleinfo dl { margin: 8px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; }
.styleinfo dt { color: var(--text); font-weight: 500; }
.styleinfo dd { margin: 0; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); padding: 0 12px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.rowlink { cursor: pointer; transition: background var(--fast); }
tr.rowlink:hover { background: var(--surface); }
td.pic { width: 120px; }
td.pic img, td.pic .blank { width: 96px; height: 54px; object-fit: cover; border-radius: 4px; display: block; background: var(--surface); }
td .vt { font-weight: 500; overflow-wrap: anywhere; }
td .vs { font-size: 12px; color: var(--muted); margin-top: 2px; }
td.wide { min-width: 260px; }
.right { text-align: right; }
td.act { width: 1%; white-space: nowrap; text-align: right; }
.rowdel { font-size: 12px; color: var(--muted); padding: 5px 8px; border-radius: 5px; transition: color var(--fast), background var(--fast); }
.rowdel:hover, .rowdel:focus-visible { color: var(--reject); background: var(--raised); }
.btn.danger { background: var(--reject); border-color: var(--reject); color: #1c0607; font-weight: 600; }
.btn.danger:hover { filter: brightness(1.08); }
dialog.confirm { width: min(420px, calc(100vw - 40px)); padding: 0; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); }
dialog.confirm::backdrop { background: rgba(0, 0, 0, .62); }
dialog.confirm .inner { padding: 18px 20px 16px; }
dialog.confirm h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
dialog.confirm p { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
dialog.confirm p.what { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
dialog.confirm .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.empty { flex: 1; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 40px; }
.empty div { max-width: 400px; }
.empty h2 { margin: 0 0 6px; font-size: 15px; font-weight: 600; color: var(--text); }
.empty p { margin: 0 0 16px; }

/* ---------- Review: queue | stage | detail ---------- */
.review { flex: 1; min-height: 0; display: grid; grid-template-columns: 312px minmax(340px, 1fr) 388px; }
.queue { margin: 0; padding: 10px; list-style: none; overflow-y: auto; border-right: 1px solid var(--line); }
.queue li button { display: grid; grid-template-columns: 22px 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; padding: 8px; border-radius: var(--radius); text-align: left; border: 1px solid transparent; transition: background var(--fast), border-color var(--fast); }
.queue li button:hover { background: var(--surface); }
.queue li button[aria-selected="true"] { background: var(--raised); border-color: var(--line-strong); }
.queue .rank { color: var(--faint); font-size: 12px; }
.queue img { width: 40px; height: 71px; object-fit: cover; border-radius: 4px; background: #000; display: block; }
.queue .t { font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.queue .m { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.queue .score { font-size: 15px; font-weight: 500; }
.state { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--faint); flex: none; }
.state.kept { background: var(--keep); border-color: var(--keep); }
.state.rejected { background: var(--reject); border-color: var(--reject); }
li.is-rejected .t { color: var(--faint); text-decoration: line-through; text-decoration-color: var(--line-strong); }
li.is-rejected img { opacity: .45; }

.stage { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px 20px 16px; min-height: 0; min-width: 0; }
/* The player and its time slider: together they are what goes full screen. */
.screen { flex: 1; min-height: 0; min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.screen:fullscreen { background: #000; padding: 16px 16px 14px; }
.screen:fullscreen .player { border-color: transparent; border-radius: 0; }
.screen:fullscreen .transport { width: min(100%, 760px); }
.player .full-btn { position: absolute; top: 10px; right: 10px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; background: rgba(13, 14, 15, .72); border: 1px solid rgba(255, 255, 255, .16); border-radius: 6px; opacity: .7; transition: opacity var(--fast); }
.player .full-btn:hover, .player .full-btn:focus-visible { opacity: 1; }
.player { position: relative; flex: 1; min-height: 0; aspect-ratio: 9 / 16; max-width: 100%; background: #000; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.player video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.player .big-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .18); transition: opacity var(--fast); }
.player.playing .big-play { opacity: 0; }
.big-play span { width: 56px; height: 56px; border-radius: 50%; background: rgba(13, 14, 15, .72); display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .16); }
/* Shown over the player while a clip is being re-cut: what is happening and how far along. */
.player .busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(13, 14, 15, .82); padding: 24px; z-index: 3; }
.player .preview-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .preview-badge { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 5px 9px; font-size: 11px; letter-spacing: .03em; color: var(--text); background: rgba(13, 14, 15, .84); border: 1px solid var(--line-strong); border-radius: 6px; }
.preview-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.preview-badge button { font-size: 11px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.preview-badge button:hover { color: var(--text); }
.player .busy .working { width: min(100%, 260px); }
.transport { display: flex; align-items: center; gap: 10px; width: min(100%, 420px); font-size: 12px; color: var(--muted); flex: none; }
.transport input[type=range] { flex: 1; appearance: none; height: 3px; background: var(--line-strong); border-radius: 2px; }
.transport input[type=range]::-webkit-slider-thumb { appearance: none; width: 11px; height: 11px; border-radius: 50%; background: var(--text); border: 0; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: min(100%, 420px); flex: none; }
.actions .btn { height: 40px; font-size: 14px; }
.btn.keep.on { background: var(--keep); border-color: var(--keep); color: #06180f; }
.btn.rejectb.on { background: var(--reject); border-color: var(--reject); color: #1c0607; }
.reasons { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; justify-content: space-between; font-size: 12px; color: var(--muted); }
.reasons button { border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 8px; font-size: 12px; color: var(--text); white-space: nowrap; transition: background var(--fast), border-color var(--fast); }
.reasons button:hover { background: var(--raised); border-color: var(--reject); }
.tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: min(100%, 420px); font-size: 12px; color: var(--muted); flex: none; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.seg button { padding: 4px 10px; font-size: 12px; color: var(--muted); transition: background var(--fast), color var(--fast); }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--text); }
.nudge { display: inline-flex; align-items: center; gap: 6px; }
.nudge button { width: 24px; height: 24px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--muted); }
.nudge button:hover { background: var(--raised); color: var(--text); }
.nudge .gap { margin-left: 8px; }
.note { min-height: 18px; width: min(100%, 420px); font-size: 12px; color: var(--faint); text-align: center; flex: none; }
.note.error { color: var(--reject); }

.detail { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.tabs { display: flex; gap: 2px; padding: 10px 14px 0; border-bottom: 1px solid var(--line); flex: none; }
.tabs button { padding: 8px 12px 10px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--fast), border-color var(--fast); }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.pane { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 28px; display: grid; gap: 20px; align-content: start; }
.pane .seg { display: flex; }
.pane .seg button { flex: 1; padding: 6px 8px; white-space: nowrap; }
.pane .seg.wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.pane .seg.wrap button:nth-child(3n+1) { border-left: 0; }
.pane .seg.wrap button:nth-child(n+4) { border-top: 1px solid var(--line-strong); }
.pane .rows { display: grid; gap: 20px; padding-left: 12px; border-left: 2px solid var(--line-strong); }
.pane .group { display: grid; gap: 20px; }
.pane .grouphead { font-size: 13px; font-weight: 600; color: var(--text); }
.field .hint.attention { color: var(--accent); }
.field .hint a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.pane .seg.pair { display: grid; grid-template-columns: 1fr 1fr; }
.pane .seg.pair button { white-space: normal; line-height: 1.25; padding: 7px 8px; }
.pane .seg.pair button:nth-child(odd) { border-left: 0; }
.pane .seg.pair button:nth-child(n+3) { border-top: 1px solid var(--line-strong); }
.pane .rowline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pane label.check, label.inline { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); cursor: pointer; }
.pane input[type=checkbox] { accent-color: var(--accent); width: 14px; height: 14px; }
.headline-stage { border: 1px solid var(--line); border-radius: 6px; background: #000; overflow: hidden; }
.headline-preview { width: 100%; display: block; min-height: 44px; }
/* The preview moves the way the headline will move in the clip. People who have asked their
   computer for less motion get a still picture; the clip itself is not affected. */
@media (prefers-reduced-motion: no-preference) {
  .headline-preview.m-pulse { animation: hl-pulse .9s ease-in-out infinite; }
  .headline-preview.m-breathe { animation: hl-breathe 1.8s ease-in-out infinite; }
  .headline-preview.m-flicker { animation: hl-flicker 3.3s step-end infinite; }
  .headline-preview.m-blink { animation: hl-blink 1.1s step-end infinite; }
  .headline-preview.m-shake { animation: hl-shake .18s linear infinite; }
  .headline-preview.m-bounce { animation: hl-bounce .5s ease-out infinite alternate; }
  .headline-preview.m-float { animation: hl-float 2.6s ease-in-out infinite; }
  .headline-preview.m-pop { animation: hl-pop 2.4s ease-out infinite; }
  .headline-preview.m-fade { animation: hl-fade 2.6s linear infinite; }
  .headline-preview.m-slide { animation: hl-slide 2.4s ease-out infinite; }
  .headline-preview.m-rainbow { animation: hl-rainbow 3s linear infinite; }
}
@keyframes hl-pulse { 0%, 100% { transform: scale(.95); } 50% { transform: scale(1.05); } }
@keyframes hl-breathe { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(.3); } }
@keyframes hl-flicker { 0% { opacity: 1; } 3% { opacity: 0; } 4.9% { opacity: 1; } 8.5% { opacity: 0; } 10% { opacity: 1; } 62% { opacity: 0; } 63.7% { opacity: 1; } }
@keyframes hl-blink { 0% { opacity: 1; } 68% { opacity: 0; } }
@keyframes hl-shake { 0% { transform: translate(2px, -1px); } 50% { transform: translate(-2px, 1px); } 100% { transform: translate(2px, -1px); } }
@keyframes hl-bounce { from { transform: translateY(0); } to { transform: translateY(-7px); } }
@keyframes hl-float { 0%, 100% { transform: translateY(-3px); } 50% { transform: translateY(3px); } }
@keyframes hl-pop { 0% { transform: scale(.35); } 12% { transform: scale(1.08); } 17%, 100% { transform: scale(1); } }
@keyframes hl-fade { 0% { opacity: 0; } 27%, 100% { opacity: 1; } }
@keyframes hl-slide { 0% { transform: translateY(-110%); } 19%, 100% { transform: translateY(0); } }
@keyframes hl-rainbow { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }
.emojis { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); max-height: 204px; overflow-y: auto; }
.emojis button { height: 30px; border-radius: 5px; font-size: 17px; line-height: 1; transition: background var(--fast); }
.emojis button:hover, .emojis button:focus-visible { background: var(--raised); }
.dots { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); flex: none; }
.dot[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.field input.anycolor { width: 30px; height: 24px; padding: 0; border-radius: 5px; background: none; cursor: pointer; flex: none; }
.pane .select { width: 100%; }
.slider { display: grid; grid-template-columns: minmax(0, 1fr) 68px; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); }
.slider span { text-align: right; white-space: nowrap; }
.field .slider input[type=range] { appearance: none; width: 100%; height: 3px; padding: 0; border: 0; border-radius: 2px; background: var(--line-strong); cursor: pointer; }
.field .slider input[type=range]::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--text); border: 0; }
.field .slider input[type=range]:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.field .slider input[type=range]:disabled { opacity: .4; cursor: not-allowed; }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px 8px; }
.logo-item { display: grid; gap: 4px; justify-items: center; }
.logo-pick { width: 100%; height: 58px; display: grid; place-items: center; padding: 6px; background: #000; border: 1px solid var(--line-strong); border-radius: 6px; transition: border-color var(--fast); }
.logo-pick img { max-width: 100%; max-height: 44px; display: block; }
.logo-pick:hover { border-color: var(--muted); }
.logo-pick[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.logo-add { height: 58px; border: 1px dashed var(--line-strong); border-radius: 6px; font-size: 12px; color: var(--muted); transition: color var(--fast), border-color var(--fast); }
.logo-add:hover { color: var(--text); border-color: var(--muted); }
.btn.small { height: 26px; padding: 0 10px; font-size: 12px; }
.btn.warn { border-color: var(--accent); color: var(--accent); }
.select { height: 32px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 8px; font-size: 13px; color: var(--text); transition: border-color var(--fast); }
.select:focus { outline: none; border-color: var(--accent); }
.select:disabled { opacity: .4; cursor: not-allowed; }
.scorehead { display: flex; align-items: baseline; gap: 12px; }
.scorehead .big { font-size: 40px; font-weight: 500; line-height: 1; }
.axes { display: grid; gap: 7px; margin-top: 12px; }
.axis { display: grid; grid-template-columns: 86px 1fr 26px; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.axis .track { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; }
.axis .track i { display: block; height: 100%; background: var(--text); opacity: .78; }
.axis .v { text-align: right; color: var(--text); }
.field { display: grid; gap: 6px; }
.field .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.field input, .field textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; resize: vertical; transition: border-color var(--fast); }
.field input:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field .hint { font-size: 12px; color: var(--faint); }
.field .links { display: inline-flex; align-items: center; gap: 12px; }
.warn-note { border: 1px solid var(--reject); border-radius: 6px; padding: 9px 11px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.warn-note strong { color: var(--reject); font-weight: 600; }
.parts { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.parts ol { margin: 0; padding-left: 20px; display: grid; gap: 3px; color: var(--text); }
.why p { margin: 6px 0 0; color: var(--muted); }
.quote { margin: 6px 0 0; padding-left: 10px; border-left: 2px solid var(--line-strong); }
.quote + .label { margin-top: 12px; display: block; }
.src { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Captions set by hand: a list of captions, the selected one opens its timing ---------- */
.toolbtns { display: inline-flex; gap: 6px; }
.pane.caps { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.caps .hint { font-size: 12px; color: var(--faint); }
.caps .hint.attention { color: var(--accent); }
.caps-head { display: grid; gap: 10px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); flex: none; }
.caps-words { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.caps-tools { flex: none; display: grid; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.caps-look { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 28px; display: grid; gap: 20px; align-content: start; }
.caps-look .rows { padding-left: 0; border-left: 0; }
.emoji-pick { display: grid; gap: 6px; }
.caps-tools .emojis { max-height: 132px; }
.emoji-groups { display: flex; flex-wrap: wrap; gap: 4px; }
.emoji-groups button { font-size: 11px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 2px 8px; white-space: nowrap; transition: background var(--fast), color var(--fast); }
.emoji-groups button:hover { color: var(--text); }
.emoji-groups button[aria-pressed="true"] { background: var(--raised); color: var(--text); border-color: var(--muted); }
.caps-head .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cap-notice { display: grid; gap: 8px; justify-items: start; border: 1px solid var(--line-strong); border-radius: 6px; padding: 9px 11px; font-size: 13px; color: var(--muted); }
.caps-list { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 6px 8px; list-style: none; display: grid; gap: 1px; align-content: start; }
.cap { border: 1px solid transparent; border-radius: 6px; transition: background var(--fast), border-color var(--fast); }
.cap:hover { background: var(--surface); }
.cap.is-active { background: var(--raised); border-color: var(--line-strong); }
.cap-line { display: grid; grid-template-columns: 52px minmax(0, 1fr) 6px; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; }
.cap-chip { font-size: 11px; color: var(--faint); text-align: left; padding: 7px 6px; border-radius: 4px; transition: color var(--fast); }
.cap-chip:hover { color: var(--text); }
.cap.is-now .cap-chip { color: var(--accent); }
.cap-text { width: 100%; min-width: 0; background: none; border: 1px solid transparent; border-radius: 5px; padding: 5px 7px; transition: border-color var(--fast), background var(--fast); }
.cap-text:hover { border-color: var(--line-strong); }
.cap-text:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.cap-text:disabled { opacity: .5; }
.cap-mark { width: 6px; height: 6px; border-radius: 50%; }
.cap.is-changed .cap-mark { background: var(--accent); }
.cap.is-empty .cap-mark { background: none; border: 1.5px solid var(--faint); }
.cap-strip { flex: none; display: grid; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.cap-strip .row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cap-edge { display: grid; grid-template-columns: 40px auto minmax(0, 1fr); align-items: center; gap: 10px; }
.cap-edge .linkbtn { justify-self: start; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.stepper button { width: 28px; height: 26px; color: var(--muted); font-size: 15px; line-height: 1; transition: background var(--fast), color var(--fast); }
.stepper button:hover { background: var(--surface); color: var(--text); }
.stepper span { min-width: 64px; padding: 0 6px; text-align: center; font-size: 12px; line-height: 26px; border-left: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); }
.cap-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.linkbtn.danger:hover { color: var(--reject); }
.caps-foot { flex: none; display: grid; gap: 8px; padding: 12px 20px 14px; border-top: 1px solid var(--line); }

/* ---------- Trends ---------- */
.page { flex: 1; min-height: 0; overflow-y: auto; padding: 24px 20px 40px; }
.page .inner { max-width: 720px; display: grid; gap: 16px; }
.brief { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; line-height: 1.6; }

/* ---------- Sign in, settings ---------- */
.app.signed-out { grid-template-columns: minmax(0, 1fr); }
.app.signed-out .nav { display: none; }
.signin { flex: 1; display: grid; place-items: center; padding: 40px 20px; }
.signin .inner { width: min(100%, 400px); display: grid; gap: 14px; }
.signin h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.signin p { margin: 0; }
.signin .rowline, .page .rowline { display: flex; gap: 8px; align-items: center; }
.signin input, .page input[type=email] { flex: 1; min-width: 0; height: 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; transition: border-color var(--fast); }
.signin input:focus, .page input[type=email]:focus { outline: none; border-color: var(--accent); }
.page .inner + .inner { margin-top: 32px; }
.page h2.section { margin: 0; font-size: 15px; font-weight: 600; }
.page .field textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; resize: vertical; line-height: 1.5; transition: border-color var(--fast); }
.page .field textarea:focus { outline: none; border-color: var(--accent); }
.page .hint { font-size: 12px; color: var(--faint); }
.page p { margin: 0; }
.nav-foot .account { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; }
.nav-foot .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 9px 14px; font-size: 13px; max-width: min(560px, 90vw); z-index: 10; }
.toast.error { border-color: var(--reject); }

@media (max-width: 1180px) {
  .review { grid-template-columns: 264px minmax(300px, 1fr); overflow-y: auto; }
  .detail { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .pane { overflow: visible; }
  .pane.caps { overflow: visible; }
  .caps-list { max-height: 60vh; }
}
@media (max-width: 1400px) { .top .chips { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.page input[type=checkbox] { accent-color: var(--accent); width: 14px; height: 14px; padding: 0; }
