/* Fish Video Skill stage. Every colour and font is a CSS variable set from
   the project's design system (timeline.theme) at init, so a brand swap is
   data, not code. Sizes are in px on a design canvas whose short side is
   1080 (u = 1); scenes multiply by c.u when they need to. */
:root {
  --bg: #f3ede2; --surface: #faf7f0; --paper: #f8f4ec; --ink: #1a1714; --fg: #1c1915;
  --muted: #58524a; --dim: #847c70; --line: rgba(28,25,20,.12); --line2: rgba(28,25,20,.24);
  --accent: #d9481e; --accent2: #15858d; --accent-soft: rgba(217,72,30,.14); --ok: #1f8a46;
  --dark: #12100d; --dark-fg: #f2ece0;
  --sans: "Inter", "Noto Sans Devanagari", system-ui, sans-serif;
  --display: var(--sans);
  --serif: "Fraunces", "Noto Sans Devanagari", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --hand: "Caveat", "Noto Sans Devanagari", "Comic Sans MS", cursive;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); overflow: hidden; }
body { font-family: var(--sans); color: var(--fg); -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision; }
#stage { position: relative; overflow: hidden; background: var(--bg); }
#stage > div { position: absolute; inset: 0; }
.abs { position: absolute; }
.layer { position: absolute; inset: 0; overflow: hidden; }
.safe { position: absolute; display: flex; flex-direction: column; }

/* backgrounds */
#bg .wash { position: absolute; inset: -10%; }
#bg .dots { position: absolute; inset: 0; background-image: radial-gradient(var(--line2) 1.2px, transparent 1.4px); background-size: 28px 28px; opacity: .5; -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 85%); }
#grain { mix-blend-mode: multiply; opacity: .05; background-size: 220px 220px; pointer-events: none; }
.theme-dark #grain { mix-blend-mode: screen; opacity: .04; }
#vign { pointer-events: none; background: radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(0,0,0,.12) 100%); }

/* type */
.kt { line-height: 1.04; }
.kt-m { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.06em 0.03em 0.16em; margin: -0.06em -0.03em -0.16em; }
.kt-w { display: inline-block; will-change: transform; }
.kl { display: inline-block; white-space: nowrap; }
.kl-c { display: inline-block; }
.display { font-family: var(--display); font-weight: 700; letter-spacing: -0.035em; color: var(--ink); }
.serif-it { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; }
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; }
.eyebrow { font-family: var(--mono); font-size: 20px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; display: inline-block; width: 46px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 16px; opacity: .7; }
.mono { font-family: var(--mono); }
.hand { font-family: var(--hand); font-weight: 700; color: var(--ink); }
.acc { color: var(--accent); }
.caret { display: inline-block; width: .09em; height: 1em; background: var(--accent); vertical-align: -0.12em; margin-left: .04em; border-radius: 1px; }
.lede { font-size: 34px; line-height: 1.3; color: var(--muted); font-weight: 450; }
.foot { font-family: var(--mono); font-size: 18px; color: var(--dim); letter-spacing: .04em; }

/* chips, cards */
.chip { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line2); font-size: 24px; font-weight: 500; color: var(--fg); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 14px 30px -22px rgba(0,0,0,.35); white-space: nowrap; }
.chip .d { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.chip.ink { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.card { background: var(--surface); border: 1px solid var(--line2); border-radius: 22px; box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 28px 60px -30px rgba(0,0,0,.35); }
.row { display: flex; gap: 18px; flex-wrap: wrap; }

/* terminal */
.term { background: #17140f; border-radius: 18px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.2); color: #f2ece0; font-family: var(--mono); overflow: hidden; }
.term .tb { height: 46px; display: flex; align-items: center; gap: 9px; padding: 0 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.term .tb i { width: 13px; height: 13px; border-radius: 50%; background: #3a332a; }
.term .tb span { margin-left: 12px; font-size: 16px; color: #8a8275; letter-spacing: .04em; }
.term .tl { white-space: pre-wrap; word-break: break-word; }
.term .p { color: #ff6a3d; } .term .c { color: #8a8275; } .term .g { color: #7fd4a0; }

/* browser window */
.win { position: absolute; border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: 0 2px 6px rgba(0,0,0,.06), 0 50px 100px -40px rgba(0,0,0,.55), 0 0 0 1px var(--line2); }
.win.bare { border-radius: 0; box-shadow: none; }
.win-bar { position: absolute; left: 0; right: 0; top: 0; height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 18px; background: color-mix(in srgb, var(--bg) 85%, var(--ink) 6%); border-bottom: 1px solid var(--line); }
.win-bar > i { width: 13px; height: 13px; border-radius: 50%; }
.win-bar > i:nth-child(1) { background: #e0735a; } .win-bar > i:nth-child(2) { background: #e2b65a; } .win-bar > i:nth-child(3) { background: #7cbf7a; }
.win-url { position: absolute; left: 50%; transform: translateX(-50%); min-width: 40%; max-width: 70%; height: 28px; border-radius: 9px; background: rgba(255,255,255,.6); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.win-view { position: absolute; overflow: hidden; background: var(--bg); }
.win-img { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.win-fx { position: absolute; inset: 0; pointer-events: none; }
.cursor { position: absolute; left: 0; top: 0; transform-origin: 5px 3px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.28)); z-index: 3; }
.ripple { position: absolute; border-radius: 50%; border: 3px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ripple.dot { width: 18px; height: 18px; margin: -9px 0 0 -9px; background: var(--accent); opacity: .45; border: 0; box-shadow: none; }
.keys { position: absolute; left: 50%; bottom: 34px; z-index: 5; }
.keycombo { position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-radius: 18px; background: rgba(26,23,20,.88); white-space: nowrap; }
.keycombo kbd { font-family: var(--mono); font-size: 30px; font-weight: 600; color: #1a1714; background: linear-gradient(#fbf8f2, #e9e1d3); border-radius: 10px; padding: 8px 16px 10px; box-shadow: 0 4px 0 #b9ad99; }
.keycombo em { font-style: normal; color: #f2ece0; font-size: 26px; font-weight: 600; }
.callout { position: absolute; display: flex; align-items: center; gap: 12px; padding: 13px 22px 14px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 26px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; box-shadow: 0 24px 40px -22px rgba(0,0,0,.6); z-index: 6; }
.callout b { color: var(--accent); filter: brightness(1.35); }

/* hud */
.chapter { position: absolute; display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 18px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.chapter b { color: var(--accent); font-weight: 600; }
.chapter i { width: 30px; height: 1px; background: var(--line2); }
.rail { position: absolute; height: 4px; background: var(--line); overflow: hidden; }
.rail i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }

/* burned-in captions */
.capbox { position: absolute; text-align: center; }
.cap { display: inline; font-size: 44px; line-height: 1.34; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); background: var(--surface); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 6px 18px; border-radius: 12px; box-shadow: 0 18px 36px -24px rgba(0,0,0,.45); }
.cap .w { opacity: .38; } .cap .w.on { opacity: 1; } .cap .w.now { color: var(--accent); }

/* whiteboard */
.board { position: absolute; inset: 0; background: var(--paper); }
.board .grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; opacity: .45; }
.board svg { position: absolute; left: 0; top: 0; overflow: visible; }
.wb-title { font-family: var(--hand); font-weight: 700; color: var(--ink); line-height: .98; padding-right: .3em; }
.wb-note { position: absolute; padding-right: .35em; font-family: var(--hand); font-weight: 600; color: var(--ink); white-space: nowrap; line-height: 1.05; }
.wb-note.acc { color: var(--accent); }
.step-tag { display: inline-flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 18px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.step-tag b { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 18px; letter-spacing: 0; }

/* charts / diagrams */
.bar { position: absolute; border-radius: 10px 10px 4px 4px; background: var(--ink); }
.bar.hi { background: var(--accent); }
.node { position: absolute; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 16px 20px; border-radius: 18px; background: var(--surface); border: 2px solid var(--ink); }
.node b { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.node span { font-size: 22px; color: var(--muted); margin-top: 6px; line-height: 1.2; }
.node.hi { border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }

.mono, .term, kbd { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }

/* lint helper: elements the overflow check must look at */
[data-text] { }

/* ---------------- caption styles: pop | minimal (karaoke = .cap above) */
.capbox.pop { display: flex; align-items: center; justify-content: center; transform-origin: 50% 50%; }
.capbox.pop > div { transform-origin: 50% 55%; }
.cap-pop { display: inline-block; font-family: var(--display); font-weight: 900; letter-spacing: 0.02em; line-height: 1.02; text-transform: uppercase; color: #fff; -webkit-text-stroke: .078em #0b0b0b; paint-order: stroke fill; text-shadow: 0 .07em 0 #0b0b0b, 0 16px 34px rgba(0,0,0,.5); padding: .1em .32em .14em; border-radius: .2em; }
.cap-pop.plate { background: rgba(0,0,0,.4); }
.fv-strip { background: #f2efe8; color: #111; padding: .05em .16em .07em; margin: .018em .012em; box-shadow: .03em .05em .1em rgba(0,0,0,.42); }
.fv-strip.acc { background: var(--accent); color: #fff; }
.fv-sticker { background: #f2efe8; color: #111; padding: .1em .26em .14em; box-shadow: .04em .07em .14em rgba(0,0,0,.42); }
.fv-sticker.acc-bg { background: var(--accent); color: #fff; }
.fv-cta { display: inline-flex; align-items: center; gap: .4em; font-family: var(--display); font-weight: 900; letter-spacing: -0.02em; line-height: 1; color: #fff; background: var(--accent); padding: .5em .8em .54em; border-radius: 1.2em; white-space: nowrap; box-shadow: 0 .16em .4em rgba(0,0,0,.4); }
.cap-pop .w { display: inline-block; }
.cap-pop .w.now { color: var(--accent); }
.cap.cap-min { background: none; box-shadow: none; color: #fff; font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,.65), 0 0 2px rgba(0,0,0,.8); }
.cap.cap-min .w { opacity: 1; } .cap.cap-min .w.now { color: #fff; }

/* ---------------- looks: collage, studio, neon */
.fv-label { font-family: var(--display); font-weight: 900; letter-spacing: -0.03em; line-height: .95; color: #111; }
.fv-tag { font-family: var(--display); font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: #111; white-space: nowrap; }
.fv-card { position: absolute; transform-origin: 50% 50%; }
.fv-card .face { position: absolute; inset: 0; overflow: hidden; background: #e9e7e2; }
.fv-card .face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fv-card svg.ol { position: absolute; overflow: visible; pointer-events: none; }
.fv-cut { position: absolute; transform-origin: 50% 60%; }
.fv-cut img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fv-ink { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.fv-sw, .fv-sub { will-change: transform; }
.fv-neon { font-family: var(--display); font-weight: 900; letter-spacing: -0.03em; color: #fff; }
.fv-coin { position: absolute; transform-style: preserve-3d; }
.fv-coin > i { position: absolute; inset: 0; border-radius: 50%; }
.fv-coin .cf, .fv-coin .cb { backface-visibility: hidden; display: grid; place-items: center; }
.fv-ball { position: absolute; border-radius: 50%; }
.fv-chip { display: inline-flex; align-items: center; gap: .4em; padding: .38em .8em .42em; border-radius: 999px; background: #111; color: #fff; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.fv-step { font-family: var(--mono); font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.glowcur { position: absolute; left: 0; top: 0; z-index: 4; transform-origin: 5px 3px; filter: drop-shadow(0 0 10px rgba(255,255,255,.9)) drop-shadow(0 4px 8px rgba(0,0,0,.35)); }
.glowcur .halo { position: absolute; left: -26px; top: -26px; width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft) 0%, rgba(255,255,255,.35) 35%, transparent 70%); }
.ripple.glow { border-color: #fff; box-shadow: 0 0 0 3px var(--accent), 0 0 24px 6px var(--accent-soft); }
.hl { position: absolute; pointer-events: none; z-index: 2; transform-origin: 0 50%; }
.hl.box { border: 4px solid var(--accent); border-radius: 10px; box-shadow: 0 0 0 6px var(--accent-soft); }
.hl.marker { background: color-mix(in srgb, var(--accent) 32%, transparent); border-radius: 6px; mix-blend-mode: multiply; }
.hl.underline { height: 6px !important; background: var(--accent); border-radius: 3px; }
