/* ==========================================================================
   Reel Studio design system ("Graphite")
   One file for tokens + components. The three Create layouts (L1, L2, L3)
   use only these tokens and classes; each page adds layout rules only.
   Whole-site kit (2026-11-28): sections 1-15 are the pilot's build-r2 file unchanged;
   sections 16 onward add the kit's core components (class prefix rsk-). Kit builder 2's
   media.css builds on the same tokens with the prefix rskm-.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400..700&family=Instrument+Serif:ital@0;1&family=Chivo+Mono:wght@400;500&display=swap');

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: dark;

  /* Surfaces: neutral graphite with a faint cool cast, darkest at the back */
  --canvas: #0A0B0E;      /* window background, nav */
  --sheet: #0E0F13;       /* the work area */
  --surface-1: #131519;   /* cards */
  --surface-2: #181A1F;   /* raised: composer, detail */
  --surface-3: #1E2026;   /* controls at rest, hover on cards */
  --surface-4: #252830;   /* controls on hover, pressed, chips */
  --well: #0B0C10;        /* inset reading areas (prompt text) */
  --glass: rgba(24, 26, 31, 0.84);
  --glass-strong: rgba(30, 32, 38, 0.94);
  --glass-card: rgba(255, 255, 255, 0.028);       /* cards: thin frosted glass over the sheet */
  --glass-card-hover: rgba(255, 255, 255, 0.05);
  --glass-card-selected: rgba(110, 160, 255, 0.07);
  /* the light-catching edge every glass surface has (brighter top-left, faint middle, a little back at bottom-right) */
  --rim: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05) 36%, rgba(255, 255, 255, 0.04) 64%, rgba(255, 255, 255, 0.11));

  /* Lines: used sparingly; spacing and surface steps separate most things */
  --line-1: rgba(222, 228, 255, 0.07);
  --line-2: rgba(222, 228, 255, 0.12);
  --line-3: rgba(222, 228, 255, 0.2);

  /* Text */
  --fg-1: #EDEFF4;        /* titles, the user's own words, selected */
  --fg-2: #C0C5CF;        /* body */
  --fg-3: #9198A6;        /* metadata, hints (6:1 on cards) */
  --fg-4: #6A7080;        /* disabled and decoration only */

  /* The one accent: blue. Fill for the single primary action and selection. */
  --accent: #2E6BF0;      /* white text on it: 4.7:1 */
  --accent-hover: #2A63E2;
  --accent-press: #2458CC;
  --accent-fg: #9DBEFF;   /* accent as text or icon on dark */
  --accent-wash: rgba(74, 134, 255, 0.16);
  --accent-line: rgba(110, 160, 255, 0.6);
  --ring: #6EA0FF;

  --success: #57D39E;
  --warning: #F2B84B;

  /* Type: Instrument Sans for the interface, Instrument Serif for brand moments,
     Chivo Mono for durations and the @image tokens the user copies
     (its zero has no slash or dot, so 0.6 s never reads as 8.6 s at 13px) */
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "Chivo Mono", ui-monospace, monospace;
  --t-13: 13px;   /* metadata, labels, chips */
  --t-14: 14px;   /* controls, nav */
  --t-15: 15px;   /* body, card text */
  --t-17: 17px;   /* the brief, the selected shot's action */
  --t-20: 20px;   /* section titles */
  --t-32: 32px;   /* serif: wordmark, empty-state headline */

  /* Space: 4 / 8 scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px;
  --s-8: 32px; --s-10: 40px; --s-12: 48px; --s-16: 64px;

  /* Radius: capsule for every control, 14 for cards and menus, 20 for big panels */
  --r-6: 6px; --r-10: 10px; --r-14: 14px; --r-20: 20px; --r-full: 999px;

  /* Control heights */
  --h-28: 28px; --h-32: 32px; --h-36: 36px; --h-40: 40px;

  /* Depth */
  --rim-top: inset 0 1px 0 rgba(255, 255, 255, 0.055);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-float: 0 24px 56px -20px rgba(0, 0, 0, 0.75), 0 2px 8px rgba(0, 0, 0, 0.35);
  --blur: blur(22px) saturate(140%);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-fast: 110ms;
  --t-med: 160ms;

  --nav-w: 224px;
  --topbar-h: 56px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--canvas); }
body {
  background: var(--canvas);
  color: var(--fg-2);
  font: 400 var(--t-15)/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 600; color: var(--fg-1); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.mono { font-family: var(--font-mono); }
/* an image's @ number (@Image1): the normal type, a little weight (2026-11-30: mono read like code) */
.rsk-tok, .rskm-mono.rsk-tok { font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }
.dur { white-space: nowrap; }
.dur .mono { letter-spacing: -0.02em; }
.lens { color: var(--fg-2); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.file-host { position: relative; }
.file-cover { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }
.ref--add:has(.file-cover:focus-visible) .ref__frame, .file-host:has(.file-cover:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Icons: one stroke family, 24 grid, 1.75 stroke, round ends */
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i--16 { width: 16px; height: 16px; }
.i--14 { width: 14px; height: 14px; }
.i--20 { width: 20px; height: 20px; }

/* Glass edge: a 1px gradient ring that catches the light. Used by every floating or card surface. */
.composer::after, .shot::after, .briefbar::after, .detail::after, .menu::after, .toast::after, .dockbar::after, .cutmap::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* ---------- 3. App shell ---------- */
.app { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }

.nav {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: var(--s-1);
  padding: var(--s-5) var(--s-3) var(--s-4);
}
.nav__brand {
  display: block; padding: var(--s-1) var(--s-3) var(--s-6);
  font: 400 var(--t-32)/1 var(--font-serif); letter-spacing: -0.01em;
  color: var(--fg-1); text-decoration: none; white-space: nowrap;
}
.nav__brand em { font-style: italic; color: var(--fg-2); }
.nav__list { display: flex; flex-direction: column; gap: 2px; }
.nav__item {
  display: flex; align-items: center; gap: var(--s-3);
  height: var(--h-36); padding: 0 var(--s-3); border-radius: var(--r-10);
  color: var(--fg-3); font-size: var(--t-14); font-weight: 500; text-decoration: none;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav__item:hover { background: var(--surface-2); color: var(--fg-1); }
.nav__item:active { background: var(--surface-3); }
.nav__item[aria-current="page"] { background: var(--surface-3); color: var(--fg-1); }
.nav__item[aria-current="page"] .i { color: var(--accent-fg); }
.nav__foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.nav__avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--surface-4); color: var(--fg-1);
  font-size: var(--t-13); font-weight: 600;
}

.sheet {
  position: relative; min-width: 0; isolation: isolate;
  margin: 8px 8px 8px 0; min-height: calc(100vh - 16px);
  background: var(--sheet);
  border: 1px solid var(--line-1); border-radius: var(--r-20);
}
.sheet__light {
  /* the one light in the room: a soft cool wash from above, behind the main tool */
  position: absolute; inset: 0 0 auto 0; height: 520px; pointer-events: none; z-index: -1;
  border-radius: var(--r-20) var(--r-20) 0 0;
  background: radial-gradient(60% 100% at 50% 0%, rgba(150, 175, 255, 0.075), rgba(150, 175, 255, 0) 70%);
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--s-3);
  height: var(--topbar-h); padding: 0 var(--s-4) 0 var(--s-5);
  border-bottom: 1px solid var(--line-1); border-radius: var(--r-20) var(--r-20) 0 0;
  background: rgba(14, 15, 19, 0.9); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.topbar__project {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: var(--h-36); padding: 0 var(--s-3); margin-left: calc(var(--s-3) * -1); border-radius: var(--r-full);
  color: var(--fg-1); font-size: var(--t-15); font-weight: 600; white-space: nowrap;
  transition: background var(--t-fast) var(--ease);
}
.topbar__project:hover { background: var(--surface-3); }
.topbar__project .i { color: var(--fg-3); }
.topbar__status { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-3); font-size: var(--t-13); white-space: nowrap; }
.topbar__status .i { color: var(--success); }
.topbar__spacer { flex: 1; }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--h-36); padding: 0 var(--s-4); border-radius: var(--r-full);
  background: var(--surface-3); color: var(--fg-1);
  border: 1px solid var(--line-1); box-shadow: var(--rim-top);
  font-size: var(--t-14); font-weight: 500; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { background: var(--surface-4); border-color: var(--line-2); }
.btn:active { transform: translateY(1px); background: #2B2E37; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface-2); color: var(--fg-4); border-color: var(--line-1); cursor: not-allowed; transform: none; }
.btn .i { width: 16px; height: 16px; color: var(--fg-2); }
.btn--primary {
  background: var(--accent); color: #fff; border-color: transparent; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.4);
}
.btn--primary .i { color: #fff; }
.btn--primary:hover { background: var(--accent-hover); border-color: transparent; }
.btn--primary:active { background: var(--accent-press); }
.btn--primary:disabled { background: #22345E; color: #8A97B5; box-shadow: none; }
.btn--quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--fg-2); }
.btn--quiet:hover { background: var(--surface-3); border-color: transparent; color: var(--fg-1); }
.btn--lg { height: var(--h-40); padding: 0 var(--s-5); font-size: var(--t-15); }
.btn--sm { height: var(--h-32); padding: 0 var(--s-3); font-size: var(--t-13); }
.btn--icon { width: var(--h-36); padding: 0; }
.btn--icon.btn--sm { width: var(--h-32); }
.btn.is-busy .i { animation: spin 0.9s linear infinite; }
.btn.is-done .i { color: var(--success); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 5. Pills (settings next to the prompt) ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: var(--h-32); padding: 0 10px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--fg-1); border: 1px solid transparent;
  font-size: var(--t-14); font-weight: 500; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.pill .i { width: 16px; height: 16px; color: var(--fg-3); }
.pill .i--chev { width: 14px; height: 14px; margin-right: -2px; }
.pill__key { color: var(--fg-3); font-weight: 400; }
.pill:hover { background: var(--surface-4); }
.pill:active { background: #2B2E37; }
.pill[aria-expanded="true"] { background: var(--surface-4); border-color: var(--accent-line); }
.pill[aria-pressed="true"] { background: var(--accent-wash); border-color: var(--accent-line); }
.pill[aria-pressed="true"] .i { color: var(--accent-fg); }
.pill:disabled { color: var(--fg-4); cursor: not-allowed; }

.stepper { display: inline-flex; align-items: center; gap: 2px; height: var(--h-32); padding: 0 2px; border-radius: var(--r-full); background: var(--surface-3); color: var(--fg-1); }
.stepper__btn { width: var(--h-28); height: var(--h-28); display: grid; place-items: center; border-radius: 50%; color: var(--fg-2); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.stepper__btn:hover { background: var(--surface-4); color: var(--fg-1); }
.stepper__btn:active { background: #2B2E37; }
.stepper__btn:disabled { color: var(--fg-4); cursor: not-allowed; background: none; }
.stepper__value { display: inline-flex; align-items: center; gap: 6px; padding: 0 6px; font-size: var(--t-14); font-weight: 500; white-space: nowrap; }
.stepper__value .i { width: 16px; height: 16px; color: var(--fg-3); }

/* ---------- 6. Composer (the prompt box) ---------- */
.composer {
  position: relative;
  display: flex; flex-direction: column; gap: var(--s-4);
  padding: var(--s-4);
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: var(--r-20);
  box-shadow: var(--rim-top), var(--shadow-float);
  transition: box-shadow var(--t-med) var(--ease);
}
.composer:focus-within { box-shadow: var(--rim-top), 0 0 0 1px rgba(110, 160, 255, 0.4), var(--shadow-float); }
.composer__body { display: flex; flex-direction: column; gap: var(--s-4); min-height: 0; }
.composer__body > * { flex-shrink: 0; }
.composer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 0 var(--s-1); }
/* in a narrow column the box is as tall as the space it gets: its body scrolls, the settings and Write shots stay at its foot */
.composer--column { min-height: 0; }
.composer--column .composer__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; margin: 0 calc(var(--s-4) * -1); padding: 0 var(--s-4) var(--s-1); scrollbar-width: thin; scrollbar-color: var(--surface-4) transparent; }
.composer--column .composer__foot { flex: none; margin: 0 calc(var(--s-4) * -1) calc(var(--s-4) * -1); padding: var(--s-3) var(--s-4) var(--s-4); background: #17191E; border-top: 1px solid var(--line-1); border-radius: 0 0 var(--r-20) var(--r-20); }
.composer--column .composer__notice { justify-content: flex-start; }
.composer--column .more { grid-template-columns: minmax(0, 1fr); }
.composer--column .brief { font-size: var(--t-15); line-height: 1.7; }
.composer__label { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-13); color: var(--fg-2); }
.composer__tools { display: inline-flex; align-items: center; gap: var(--s-1); }
.composer__hint { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-13); color: var(--fg-3); }

.refs { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.ref { position: relative; width: var(--ref-size, 104px); display: flex; flex-direction: column; gap: var(--s-2); }
.ref__frame {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; cursor: pointer;
  border-radius: var(--r-14); overflow: hidden; background: var(--surface-3);
  transition: transform var(--t-fast) var(--ease);
}
.ref.is-active .ref__frame::after { box-shadow: inset 0 0 0 2px var(--accent); }
.ref__frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: none; }
.ref__frame img { width: 100%; height: 100%; object-fit: cover; }
.ref:hover .ref__frame { transform: translateY(-2px); }
.ref__tag { display: inline-block; padding: 2px 8px; border-radius: var(--r-full); background: rgba(8, 9, 13, 0.86); font: 500 var(--t-13)/1.4 var(--font-sans); color: var(--fg-1); white-space: nowrap; }
/* 2026-11-30 (a design review: "@Image1" in mono under the picture read like code): the number sits on the picture, at
   its bottom left, in the normal type; the name, what it is and whether it is used stay under it */
.ref > .ref__meta { position: absolute; z-index: 1; left: 6px; top: calc(var(--ref-size, 104px) - 32px); margin: 0; pointer-events: none; }
/* adding images: a dashed square the size of a picture, at the end of the row */
.ref-addtile { position: relative; flex: none; width: var(--ref-size, 104px); aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: var(--s-2); border-radius: var(--r-14); border: 1px dashed var(--line-3); background: rgba(255, 255, 255, 0.015); color: var(--fg-2); font-size: var(--t-13); font-weight: 500; text-align: center; cursor: pointer; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.ref-addtile:hover { background: var(--accent-wash); border-color: var(--accent-line); color: var(--fg-1); }
.ref-addtile .i { color: var(--accent-fg); }
.ref-addtile:has(.file-cover:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.refs > .ref-addtile { margin-top: 0; }
.ref__name { min-width: 24px; min-height: 24px; padding: 3px 4px; border-radius: var(--r-6); font-size: var(--t-13); line-height: 1.3; color: var(--fg-2); text-align: left; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
button.ref__name:hover { background: var(--surface-3); color: var(--fg-1); }
.ref__meta { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; margin: -2px 0 -6px; }
.ref > .ref__name { align-self: flex-start; margin-left: -2px; }
.ref__type { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: var(--r-6); color: var(--fg-3); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.ref__type:hover, .ref__type[aria-expanded="true"] { background: var(--surface-3); color: var(--fg-1); }
.ref__rename { width: 100%; min-width: 0; height: 26px; padding: 0 6px; border-radius: var(--r-6); border: 1px solid var(--accent-line); background: var(--well); color: var(--fg-1); font-size: var(--t-13); outline: none; }
.ref__state { margin-top: -4px; padding: 0 4px 0 2px; font-size: var(--t-13); line-height: 1.3; color: var(--fg-3); }
.ref__state.is-warn { color: var(--warning); }
.ref__link { align-self: flex-start; min-height: 24px; margin: -6px 0 0 -2px; padding: 2px 4px; border-radius: var(--r-6); font-size: var(--t-13); color: var(--accent-fg); transition: background var(--t-fast) var(--ease); }
.ref__link:hover { background: var(--accent-wash); }
.ref__remove {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(8, 9, 12, 0.78); color: #fff;
  opacity: 0; transition: opacity var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.ref:hover .ref__remove, .ref:focus-within .ref__remove { opacity: 1; }
.ref__remove:hover { background: rgba(8, 9, 12, 0.95); }
.ref--add { cursor: pointer; }
.ref--add .ref__name { padding-left: 2px; }
.ref--add .ref__frame { display: grid; place-items: center; background: transparent; color: var(--fg-3); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.ref--add .ref__frame::after { box-shadow: inset 0 0 0 1px var(--line-3); }
.ref--add:hover .ref__frame { background: var(--surface-3); color: var(--fg-1); }
.ref--add .i { width: 22px; height: 22px; }

.brief {
  min-height: 3.2em; padding: 2px var(--s-1); text-wrap: pretty;
  font-size: var(--t-17); line-height: 1.65; color: var(--fg-1);
  outline: none; white-space: pre-wrap; word-break: break-word;
}
.brief:empty::before { content: attr(data-placeholder); color: var(--fg-3); }
.mention {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 9px 0 3px; margin: 0 2px; border-radius: var(--r-full);
  background: var(--surface-4); color: var(--fg-1);
  /* 2026-11-30: the normal type (mono is for numbers and time codes only, his rule; "@Image1" read like code) */
  font: 500 var(--t-13)/1 var(--font-sans); white-space: nowrap; vertical-align: middle;
  position: relative; top: -2px;
  box-shadow: inset 0 0 0 1px var(--line-1);
}
.mention img { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; }
.mention { cursor: pointer; transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.mention:hover { background: #2C2F38; }
.mention.is-active { background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-line); }
.brief__hint { display: flex; align-items: center; gap: 6px; margin-top: calc(var(--s-2) * -1); padding: 0 var(--s-1); font-size: var(--t-13); color: var(--fg-3); }
.brief__hint .i { color: var(--fg-3); }
.sync-slot:empty { display: none; }
.sync { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); padding: 10px 10px 10px 12px; border-radius: var(--r-10); background: rgba(242, 184, 75, 0.08); box-shadow: inset 0 0 0 1px rgba(242, 184, 75, 0.24); color: var(--fg-1); font-size: var(--t-13); }
.sync > .i { color: var(--warning); }
.sync__text { flex: 1 1 260px; min-width: 0; line-height: 1.45; }
.sync__rule { color: var(--fg-3); }
.sync__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

.composer__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.composer__chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 100%; }
.btn--block { width: 100%; }
.estimate { padding: 0 2px; font-size: var(--t-13); color: var(--fg-3); white-space: nowrap; }
.estimate [data-bind] { color: var(--fg-2); }
.menu__body .estimate { display: block; margin-top: var(--s-2); padding-left: 4px; }
.composer__bar .grow { flex: 1 1 0; min-width: 0; }
.composer__bar > [data-act="write"], .composer__bar > [data-act="write-all"] { margin-left: auto; }
.composer__foot { display: flex; flex-direction: column; gap: var(--s-2); }
.composer__notice { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: var(--t-13); line-height: 1.4; color: var(--warning); }
.notice { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-13); color: var(--warning); white-space: nowrap; }

/* "More": progressive disclosure under the pills; same surface, a hairline above */
.more {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s-5) var(--s-8);
  padding: var(--s-5) var(--s-1) var(--s-1); border-top: 1px solid var(--line-1);
}
.field { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.field__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.field__label { font-size: var(--t-14); font-weight: 500; color: var(--fg-1); }
.field__hint { font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.field__value { font-size: var(--t-14); color: var(--fg-1); }

.switch { position: relative; width: 40px; height: 24px; flex: none; border-radius: var(--r-full); background: var(--surface-4); transition: background var(--t-fast) var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--fg-2); transition: transform var(--t-med) var(--ease), background var(--t-fast) var(--ease); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(16px); background: #fff; }

.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-full); background: var(--surface-3); align-self: flex-start; }
.segmented button { height: var(--h-28); padding: 0 var(--s-3); border-radius: var(--r-full); color: var(--fg-3); font-size: var(--t-13); font-weight: 500; white-space: nowrap; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.segmented button:hover { color: var(--fg-1); }
.segmented button[aria-pressed="true"] { background: var(--surface-1); color: var(--fg-1); box-shadow: var(--rim-top), 0 1px 2px rgba(0, 0, 0, 0.4); }

/* ---------- 7. Menus and tips ---------- */
.menu {
  position: absolute; z-index: 60; min-width: 272px; max-width: 340px; padding: 6px;
  background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: var(--r-14); box-shadow: var(--rim-top), var(--shadow-float);
  animation: pop var(--t-med) var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu__head { padding: 8px 10px 6px; }
.menu__title { font-size: var(--t-13); font-weight: 600; color: var(--fg-1); }
.menu__sub { font-size: var(--t-13); color: var(--fg-3); margin-top: 2px; }
.menu__sep { height: 1px; margin: 6px 4px; background: var(--line-1); }
.menu__item {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  width: 100%; min-height: var(--h-36); padding: 8px 10px; border-radius: var(--r-10);
  color: var(--fg-1); font-size: var(--t-14); text-align: left;
  transition: background var(--t-fast) var(--ease);
}
.menu__item:hover, .menu__item:focus-visible { background: var(--surface-4); outline: none; }
.menu__item .i { color: var(--fg-3); }
.menu__item[aria-checked="true"] .i--check { color: var(--accent-fg); }
.menu__item .menu__thumb { width: 24px; height: 24px; border-radius: 6px; object-fit: cover; }
.menu__desc { display: block; margin-top: 2px; font-size: var(--t-13); color: var(--fg-3); line-height: 1.4; }
.menu__badge { font-size: var(--t-13); color: var(--fg-3); padding: 0 2px; }

.tip-btn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--fg-3); transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.tip-btn:hover, .tip-btn:focus-visible { color: var(--fg-1); background: var(--surface-3); }
.tip {
  position: absolute; z-index: 70; max-width: 300px; padding: 10px 12px;
  background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border: 1px solid var(--line-2); border-radius: var(--r-10); box-shadow: var(--shadow-float);
  color: var(--fg-1); font-size: var(--t-13); line-height: 1.45; pointer-events: none;
}

/* ---------- 8. Shot list: head, meter, parts ---------- */
.shothead { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-6); }
.shothead__title { font-size: var(--t-20); font-weight: 600; color: var(--fg-1); letter-spacing: -0.01em; }
.shothead__stats { display: flex; align-items: center; gap: var(--s-3) var(--s-5); flex-wrap: wrap; }
.shothead__actions { display: flex; gap: var(--s-2); margin-left: auto; flex-wrap: wrap; }
.stat { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.stat__value { font-size: var(--t-15); line-height: 1; color: var(--fg-1); }
.stat__value .mono { font-size: var(--t-15); font-weight: 500; }
.stat__label { font-size: var(--t-13); color: var(--fg-3); }

.timeline { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
/* every segment sits at its real time (left = start, width = length), so the strip and the ruler share one scale */
.timeline__track { position: relative; height: 8px; border-radius: 3px; overflow: hidden; background: var(--surface-3); }
.timeline__seg { position: absolute; top: 0; bottom: 0; background: #4A505E; box-shadow: inset -1px 0 0 var(--sheet); transition: background var(--t-fast) var(--ease); }
.timeline__seg.is-part-start { box-shadow: inset 2px 0 0 var(--sheet), inset -1px 0 0 var(--sheet); }
.timeline__seg.is-selected { background: var(--accent); }
.timeline--meter { width: 220px; }

/* tall version: the cut as a strip with numbers, a ruler and part labels */
.timeline--dock { gap: 6px; }
.timeline--dock .timeline__parts { position: relative; height: 18px; }
.timeline--dock .timeline__part { position: absolute; top: 0; display: flex; align-items: center; gap: 6px; font-size: var(--t-14); color: var(--fg-3); white-space: nowrap; }
.timeline--dock .timeline__part b { color: var(--fg-1); font-weight: 600; }
.timeline--dock .timeline__track { height: 40px; background: transparent; border-radius: 0; overflow: visible; }
.timeline--dock .timeline__seg {
  display: grid; place-items: center; overflow: hidden; cursor: pointer;
  background: transparent; box-shadow: none;
  color: var(--fg-2); font: 500 var(--t-14)/1 var(--font-mono);
}
/* the visible block is inset 1px on each side so neighbours read as separate cuts without moving off the scale */
.timeline--dock .timeline__seg::before { content: ""; position: absolute; inset: 0 1px; border-radius: 4px; background: var(--surface-4); transition: background var(--t-fast) var(--ease); z-index: -1; }
.timeline--dock .timeline__track { isolation: isolate; }
.timeline--dock .timeline__seg:hover::before { background: #383C48; }
.timeline--dock .timeline__seg:hover { color: var(--fg-1); }
.timeline--dock .timeline__seg.is-selected::before { background: var(--accent); }
.timeline--dock .timeline__seg.is-selected { color: #fff; }
.timeline--dock .timeline__seg.is-part-start::before { left: 3px; }
.timeline--dock .timeline__seg.is-empty { cursor: default; }
.timeline--dock .timeline__seg.is-empty::before { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.timeline--dock .timeline__seg > span { position: relative; padding: 0 2px; }
.timeline__ruler { position: relative; height: 18px; }
.timeline__tick { position: absolute; top: 0; height: 18px; padding-left: 4px; border-left: 1px solid var(--line-2); font: 400 var(--t-14)/18px var(--font-mono); color: var(--fg-3); }
.timeline--dock .timeline__parts { height: 20px; }
.timeline__legend { margin-top: 2px; font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.timeline__outline { display: none; position: relative; min-height: 64px; margin-top: var(--s-2); }
.timeline__goal { position: absolute; top: 0; padding: 0 var(--s-4) 0 var(--s-2); border-left: 1px solid var(--line-2); font-size: var(--t-13); line-height: 1.45; color: var(--fg-2); }
.timeline__tick.is-end { padding: 0 4px 0 0; border-left: 0; border-right: 1px solid var(--line-2); transform: translateX(-100%); }

.part { display: flex; align-items: flex-start; gap: var(--s-3); }
.part__badge {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: var(--r-6); background: var(--surface-4); color: var(--fg-1);
  font-size: var(--t-14); font-weight: 600;
}
.part__goal { flex: 1 1 auto; min-width: 0; padding-top: 1px; font-size: var(--t-17); font-weight: 500; line-height: 1.45; color: var(--fg-1); letter-spacing: -0.005em; }
.part__stats { flex: none; display: flex; gap: var(--s-4); padding-top: 5px; font-size: var(--t-13); color: var(--fg-3); white-space: nowrap; }
.part__stats .mono { color: var(--fg-1); }

.parts { display: flex; flex-direction: column; gap: var(--s-10); }
.partsec { display: flex; flex-direction: column; gap: var(--s-4); }
.shotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--card-min, 252px), 1fr)); gap: var(--s-3); align-items: stretch; container-type: inline-size; }

/* ---------- 9. Shot card ---------- */
.shot {
  position: relative; display: flex; flex-direction: column; gap: 0; min-width: 0;
  padding: 0;
  background: var(--glass-card); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border-radius: var(--r-14);
  box-shadow: var(--shadow-card);
  cursor: pointer; text-align: left;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.shot:hover { background: var(--glass-card-hover); transform: translateY(-1px); }
.shot:active { transform: none; }
.shot.is-selected { background: var(--glass-card-selected); box-shadow: 0 0 0 1px var(--accent), var(--shadow-card); }
.shot.is-selected::after { background: var(--accent); }
.shot.is-busy { pointer-events: none; }
.shot.is-busy > :not(.shot__busy) { opacity: 0.35; }
.shot__busy { position: absolute; inset: auto 16px 14px auto; z-index: 3; display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-13); color: var(--fg-1); }
.shot__busy .i { animation: spin 0.9s linear infinite; }
.shot__top { display: flex; align-items: center; gap: var(--s-2); min-height: 20px; }
.shot__no {
  min-width: 24px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center;
  border-radius: var(--r-6); background: var(--surface-3);
  font: 500 var(--t-13)/1 var(--font-mono); color: var(--fg-2);
}
.shot.is-selected .shot__no { background: var(--accent); color: #fff; }
.shot__pic { position: relative; flex: none; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-14) var(--r-14) 0 0; background: #17191E; }
.shot__pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-med) var(--ease); }
.shot:hover .shot__pic img { transform: scale(1.03); }
.shot__pic::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(8, 9, 12, 0) 30%, rgba(8, 9, 12, 0.85) 100%); }
.shot__big { position: absolute; left: 14px; bottom: 12px; z-index: 1; font: 600 var(--t-32)/1 var(--font-sans); letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55); }
.shot__plen { position: absolute; right: 12px; bottom: 13px; z-index: 1; display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: var(--r-full); background: rgba(8, 9, 12, 0.74); color: #fff; font-size: var(--t-13); }
.shot__plen .mono { font-weight: 500; }
.shot__bar { position: absolute; left: 0; bottom: 0; z-index: 2; height: 4px; border-radius: 0 2px 2px 0; background: rgba(255, 255, 255, 0.82); }
.shot.is-selected .shot__bar { background: var(--accent-fg); }
.shot__nopic { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding-bottom: 18px; color: var(--fg-3); font-size: var(--t-13); background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 10px, transparent 10px 20px), #17191E; }
.shot__body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 12px 16px 14px; }
.shot__size { min-width: 0; font-size: var(--t-13); line-height: 1.3; color: var(--fg-2); }
.shot__action { font-size: var(--t-15); line-height: 1.45; color: var(--fg-1); }
.shot__camera { font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.shot__sound { display: flex; gap: 6px; font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.shot__sound .i { width: 14px; height: 14px; margin-top: 2px; }
.shot__foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line-1); }
.shot__reuse { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 9px; border-radius: var(--r-full); background: var(--surface-3); color: var(--fg-2); font-size: var(--t-13); white-space: nowrap; cursor: help; }
.shot__reuse .i { color: var(--fg-3); }

.cast { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.castchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 3px; border-radius: var(--r-full); background: var(--surface-3); }
.castchip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.castchip__no { font: 500 var(--t-13)/1 var(--font-mono); color: var(--fg-1); }
.prop { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px; border-radius: var(--r-full); background: var(--surface-3); color: var(--fg-2); font-size: var(--t-13); white-space: nowrap; cursor: help; }
.prop .i { width: 16px; height: 16px; color: var(--fg-3); }
.prop .i--14 { width: 14px; height: 14px; }
.prop:focus-visible, .shot__reuse:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---------- 10. Shot detail (inline under a row, or as a side inspector) ---------- */
.detail {
  position: relative; display: grid; gap: var(--s-5) var(--s-8);
  padding: var(--s-6);
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: var(--r-20);
  box-shadow: var(--rim-top), var(--shadow-float);
  animation: reveal var(--t-med) var(--ease);
}
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.detail { grid-template-areas: "info" "cast" "prompt"; align-content: start; }
.detail__info { grid-area: info; display: flex; flex-direction: column; gap: var(--s-5); min-width: 0; }
.detail__cast { grid-area: cast; display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }
.detail__prompt { grid-area: prompt; }
.detail--inline { grid-column: 1 / -1; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); grid-template-areas: "info prompt" "cast prompt"; grid-template-rows: auto 1fr; }
.detail--inline .detail__cast { align-self: start; }
.detail--inline::before {
  /* a notch pointing at the selected card */
  content: ""; position: absolute; top: -6px; left: var(--notch-x, 48px); width: 12px; height: 12px;
  background: #1A1C21; border-left: 1px solid rgba(255, 255, 255, 0.12); border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-top-left-radius: 2px; transform: rotate(45deg);
}
/* the side panel: its details scroll, and Copy prompt and Rewrite sit in a footer that never leaves the screen */
.detail--panel { display: flex; flex-direction: column; gap: 0; padding: 0; height: 100%; }
.detail__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: var(--s-5) var(--s-8); padding: var(--s-6); grid-template-columns: minmax(0, 1fr); grid-template-areas: "info" "cast" "prompt" "nbrs"; align-content: start; scrollbar-width: thin; scrollbar-color: var(--surface-4) transparent; }
.detail__foot { flex: none; padding: var(--s-3) var(--s-6) var(--s-4); background: #17191E; border-top: 1px solid var(--line-1); border-radius: 0 0 var(--r-20) var(--r-20); }
.detail__nbrs { grid-area: nbrs; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.detail__nbrs .section-label { margin-bottom: 4px; }
.nbr { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 10px 8px 8px; border-radius: var(--r-10); text-align: left; transition: background var(--t-fast) var(--ease); }
.nbr:hover { background: var(--surface-3); }
.nbr__pic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-3); color: var(--fg-3); overflow: hidden; }
.nbr__pic img { width: 40px; height: 40px; object-fit: cover; }
.nbr__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nbr__label { font-size: var(--t-13); color: var(--fg-3); }
.nbr__action { font-size: var(--t-14); line-height: 1.4; color: var(--fg-1); }
/* in a narrow row the detail stacks: facts and pictures first, then the prompt */
@container (max-width: 860px) { .detail--inline { grid-template-columns: minmax(0, 1fr); grid-template-areas: "info" "cast" "prompt"; grid-template-rows: auto; } }
/* in a very wide row: facts, then the prompt at a readable width, then the pictures large */
@container (min-width: 1500px) {
  .detail--inline { grid-template-columns: minmax(280px, 380px) minmax(0, 920px) minmax(300px, 1fr); grid-template-areas: "info prompt cast"; grid-template-rows: auto; }
  .detail--inline .castlist { --cast-min: 200px; }
}
.detail__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title nav" "sub sub"; align-items: center; gap: 2px var(--s-3); }
.detail__title { grid-area: title; font-size: var(--t-20); font-weight: 600; color: var(--fg-1); letter-spacing: -0.01em; white-space: nowrap; }
.detail__sub { grid-area: sub; font-size: var(--t-13); color: var(--fg-3); white-space: nowrap; }
.detail__nav { grid-area: nav; display: flex; align-items: center; gap: 4px; }
.detail__nav .btn:not(.btn--icon) { margin-right: var(--s-1); }
.detail__action { font-size: var(--t-17); line-height: 1.5; color: var(--fg-1); }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px var(--s-4); margin: 0; }
.facts dt { font-size: var(--t-13); color: var(--fg-3); padding-top: 1px; }
.facts dd { margin: 0; font-size: var(--t-14); line-height: 1.45; color: var(--fg-2); text-wrap: pretty; }
.facts dd .mono { color: var(--fg-1); }
.section-label { font-size: var(--t-13); color: var(--fg-3); }

.castlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--cast-min, 112px), 1fr)); gap: var(--s-3); }
.castcard { display: flex; flex-direction: column; gap: 6px; min-width: 0; max-width: 300px; }
.castcard__img { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--r-14); overflow: hidden; background: var(--surface-3); }
.castcard__img::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line-2); }
.castcard__img img { width: 100%; height: 100%; object-fit: cover; }
.castcard__name { font-size: var(--t-13); color: var(--fg-2); line-height: 1.3; }
.castcard__name .mono { color: var(--fg-3); }
.detail__props { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-1); }

.prompt { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.prompt__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.prompt__box { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4) 18px; background: var(--well); border: 1px solid var(--line-1); border-radius: var(--r-14); }
.prompt__text { font-size: var(--t-15); line-height: 1.7; color: var(--fg-2); }
.prompt__text .mention { height: 24px; }
.prompt__text .mention img { width: 18px; height: 18px; }
.fold { border-radius: var(--r-10); }
.fold__btn { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: var(--h-32); padding: 0 var(--s-2); margin: 0 calc(var(--s-2) * -1); border-radius: var(--r-10); color: var(--fg-3); font-size: var(--t-13); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.fold__btn:hover { background: var(--surface-1); color: var(--fg-1); }
.fold__btn .i { width: 14px; height: 14px; transition: transform var(--t-med) var(--ease); }
.fold[data-open="true"] .fold__btn .i { transform: rotate(90deg); }
.fold__body { padding: var(--s-1) 0 var(--s-2); font-size: var(--t-13); line-height: 1.6; color: var(--fg-3); }
.fold__body p + p { margin-top: var(--s-2); }
.prompt__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- 11. Brief bar (the composer folded to one line) ---------- */
.briefbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); min-height: 64px;
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4);
  position: relative;
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: var(--r-20); box-shadow: var(--rim-top);
}
/* a glass bar for the cut when it is pinned (Storyboard-first layout) */
.dockbar {
  position: relative; padding: var(--s-3) var(--s-4) var(--s-3);
  background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-radius: var(--r-14); box-shadow: var(--rim-top);
}
.briefbar__refs { order: 1; display: flex; flex: none; align-items: center; gap: var(--s-2); padding: 6px 0 0 4px; }
.briefbar__ref { position: relative; width: 40px; height: 40px; padding: 0; border-radius: var(--r-10); cursor: pointer; transition: transform var(--t-fast) var(--ease); }
.briefbar__ref:hover { transform: translateY(-1px); }
.briefbar__ref img { width: 40px; height: 40px; border-radius: var(--r-10); object-fit: cover; box-shadow: 0 0 0 1px var(--line-3); }
.briefbar__ref.is-active img { box-shadow: 0 0 0 2px var(--accent); }
.briefbar__num { position: absolute; left: -6px; top: -7px; min-width: 20px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 10px; background: #262931; box-shadow: 0 0 0 2px #1A1C21; color: var(--fg-1); font: 500 var(--t-13)/1 var(--font-mono); }
.briefbar__add { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r-10); box-shadow: inset 0 0 0 1px var(--line-3); color: var(--fg-3); cursor: pointer; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.briefbar__add:hover { background: var(--surface-3); color: var(--fg-1); }
.briefbar__add:has(.file-cover:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.briefbar__text { order: 2; flex: 1 1 200px; min-width: 200px; font-size: var(--t-15); color: var(--fg-1); line-height: 1.4; }
.briefbar__actions { order: 3; display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.briefbar__chips { order: 4; display: flex; flex-wrap: wrap; gap: 6px; flex: 0 1 auto; }
.briefbar > .sync { order: 5; flex: 1 1 100%; }
.briefbar > .composer__notice { order: 6; flex: 1 1 100%; }
@media (min-width: 2000px) { .briefbar__chips { order: 3; } .briefbar__actions { order: 4; } }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-full); background: var(--surface-3); color: var(--fg-2); font-size: var(--t-13); white-space: nowrap; }
.chip .i { width: 14px; height: 14px; color: var(--fg-3); }
.chip--control { gap: 6px; height: var(--h-32); padding: 0 10px 0 11px; border: 1px solid transparent; color: var(--fg-1); cursor: pointer; transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.chip--control .i--chev { width: 14px; height: 14px; }
.chip--control:hover { background: var(--surface-4); }
.chip--control:active { background: #2B2E37; }
.chip--control[aria-expanded="true"] { background: var(--surface-4); border-color: var(--accent-line); }

/* ---------- 12. Toasts ---------- */
.toasts { display: flex; align-items: center; justify-content: flex-end; min-width: 0; }
.toast {
  position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 36px; max-width: 680px; padding: 4px 4px 4px 14px;
  background: var(--surface-3); border-radius: var(--r-full); box-shadow: var(--rim-top);
  color: var(--fg-1); font-size: var(--t-13); line-height: 1.35;
  animation: toast-in var(--t-med) var(--ease);
}
.toast__text { min-width: 0; }
.toast > .i { color: var(--success); }
.toast:not(:has(.btn)) { padding-right: 18px; }
.toast.is-leaving { opacity: 0; transform: translateY(-4px); transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- 13. Empty and loading states ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); padding: var(--s-12) var(--s-6); text-align: center; }
.empty__art { display: flex; gap: var(--s-3); margin-bottom: var(--s-4); }
.empty__ghost { width: 132px; height: 92px; border-radius: var(--r-14); border: 1px dashed var(--line-3); background: rgba(255, 255, 255, 0.015); }
.empty__ghost:nth-child(2) { width: 172px; }
.empty__title { font: 400 var(--t-32)/1.1 var(--font-serif); color: var(--fg-1); letter-spacing: -0.01em; }
.empty__text { max-width: 46ch; color: var(--fg-3); }

.progress { display: flex; align-items: center; gap: var(--s-3); }
.progress__bar { position: relative; width: 220px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress__fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: inherit; transition: width var(--t-med) var(--ease); }
.progress__label { font-size: var(--t-14); color: var(--fg-1); white-space: nowrap; }

.skeleton { position: relative; overflow: hidden; background: var(--glass-card); box-shadow: inset 0 0 0 1px var(--line-1); border-radius: var(--r-14); min-height: 196px; }
.skeleton::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.035) 50%, transparent 80%); transform: translateX(-100%); animation: sweep 1.5s var(--ease) infinite; }
.skeleton i { position: absolute; left: 16px; height: 10px; border-radius: 5px; background: var(--surface-3); }
.skeleton i:nth-child(1) { top: 18px; width: 30%; }
.skeleton i:nth-child(2) { top: 52px; width: 80%; }
.skeleton i:nth-child(3) { top: 72px; width: 64%; }
.skeleton i:nth-child(4) { top: 110px; width: 52%; }
@keyframes sweep { to { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* ---------- 14. Round 2: filters, target marker, menu extras ---------- */
/* clicking a reference (picture or @ chip) shows its shots: a bar says how many, the rest are dimmed */
.filterbar { display: flex; align-items: center; gap: var(--s-3); padding: 10px 10px 10px 12px; border-radius: var(--r-14); background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-line); }
.filterbar__img { width: 36px; height: 36px; flex: none; border-radius: var(--r-10); object-fit: cover; }
.filterbar__text { flex: 1 1 auto; min-width: 0; font-size: var(--t-14); line-height: 1.4; color: var(--fg-1); }
.filterbar__text b { font-weight: 600; }
.filterbar__text .mono { color: var(--fg-2); font-size: var(--t-13); }
.shot.is-dim { opacity: 0.32; }
.shot.is-dim:hover, .shot.is-dim:focus-visible { opacity: 0.8; }
.timeline__seg.is-dim { opacity: 0.35; }
.timeline--meter .timeline__seg.is-match { background: var(--accent-fg); }
.timeline--dock .timeline__seg.is-match::before { background: rgba(110, 160, 255, 0.3); box-shadow: inset 0 0 0 1px var(--accent-line); }
.timeline--dock .timeline__seg.is-match { color: var(--fg-1); }
/* the length setting as a line on the strip when the cut is longer than it */
.timeline__target { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--warning); z-index: 1; }
.timeline--dock .timeline__target { top: -4px; bottom: -4px; }
.timeline__target-label { position: absolute; top: 0; transform: translateX(-50%); padding: 0 4px; font-size: var(--t-13); line-height: 18px; color: var(--warning); white-space: nowrap; background: var(--glass-strong); border-radius: 4px; }
.stat__label.is-over { color: var(--warning); }
.menu__body { padding: 4px 6px 8px; }
.menu--mention .menu__item.is-active { background: var(--surface-4); }
.menu__empty { padding: 8px 10px 10px; font-size: var(--t-13); color: var(--fg-3); }

/* ---------- 15. Round 2, part 2: the cut as wrapped numbered blocks (narrow columns) ---------- */
.cutmap { position: relative; display: flex; flex-direction: column; min-height: 0; border-radius: var(--r-20); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--rim-top); }
.cutmap__scroll { display: flex; flex-direction: column; gap: var(--s-4); min-height: 0; padding: var(--s-4); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-4) transparent; }
.cutmap__title { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; }
.cutmap__h { font-size: var(--t-15); font-weight: 600; color: var(--fg-1); }
.cutmap__sub { font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.cutmap__part { display: flex; flex-direction: column; gap: var(--s-2); }
.cutmap__head { display: flex; align-items: flex-start; gap: var(--s-2); font-size: var(--t-13); line-height: 1.45; color: var(--fg-2); }
.cutmap__head b { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: var(--r-6); background: var(--surface-4); color: var(--fg-1); font-weight: 600; }
.cutmap__row { display: flex; flex-wrap: wrap; gap: 4px; }
.cutmap__cut { width: max(30px, calc(var(--sec) * var(--cut-px, 15px))); height: var(--cut-h, 30px); min-width: 30px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-4); color: var(--fg-2); font: 500 var(--t-13)/1 var(--font-mono); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.cutmap__cut:hover { background: #343844; color: var(--fg-1); }
.cutmap__cut.is-selected { background: var(--accent); color: #fff; }
.cutmap__cut.is-match { background: rgba(110, 160, 255, 0.3); box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--fg-1); }
.cutmap__cut.is-dim { opacity: 0.35; }

/* ==========================================================================
   16. Kit core (kit builder 1): shared pieces for the whole-site components
   New values, each with its reason in notes-core.md: --danger (errors; the same value as
   media.css's --rskm-danger so the site has one error colour), --scrim (behind a dialog).
   ========================================================================== */
:root {
  --danger: #F28B82;
  --scrim: rgba(5, 6, 8, 0.72);
  --rsk-top: 0px;          /* how far down sticky parts stop (the top bar's height inside the shell) */
}
.rsk { position: relative; min-width: 0; container-type: inline-size; color: var(--fg-2); }
.rsk *, .rsk *::before, .rsk *::after { box-sizing: border-box; }
/* the same light-catching glass edge as the pilot's surfaces, for the kit's glass surfaces */
.rsk-glass, .rsk-vcard, .rsk-mode, .rsk-modal__card, .rsk-panel, .rsk-libcard, .rsk-cutcard, .rsk-acc, .rsk-later-note, .rsk-start { position: relative; }
.rsk-glass::after, .rsk-vcard::after, .rsk-mode::after, .rsk-modal__card::after, .rsk-panel::after, .rsk-libcard::after, .rsk-cutcard::after, .rsk-acc::after, .rsk-later-note::after, .rsk-start::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: var(--rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.rsk-panel { border-radius: var(--r-20); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--rim-top), var(--shadow-float); }

.rsk-h1 { margin: 0; font: 400 var(--t-32)/1.1 var(--font-serif); color: var(--fg-1); letter-spacing: -0.01em; }
.rsk-h2 { margin: 0; font-size: var(--t-20); font-weight: 600; line-height: 1.3; color: var(--fg-1); letter-spacing: -0.01em; }
.rsk-h3 { margin: 0; font-size: var(--t-17); font-weight: 600; line-height: 1.35; color: var(--fg-1); }
.rsk-lead { font-size: var(--t-15); line-height: 1.55; color: var(--fg-2); max-width: 68ch; }
.rsk-sub { font-size: var(--t-14); line-height: 1.5; color: var(--fg-3); }
.rsk-small { font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.rsk-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); min-width: 0; }
.rsk-head__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rsk-head__tools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-left: auto; }
.rsk-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }
.rsk-vcard__progress, .rsk-vcard__title, .rsk-cutcard__what, .rsk-cutcard__size, .rsk-libcard__used, .rsk-libcard__text, .rsk-libcard__name, .rsk-acc__text, .rsk-mode__text, .rsk-small, .rsk-sub, .rsk-lead, .rsk-state__text, .rsk-error__text, .rsk-check span, .rsk-later-note__text, .nbr__action { text-wrap: pretty; }

.rsk-search { display: inline-flex; align-items: center; gap: var(--s-2); height: var(--h-36); min-width: 0; width: 280px; max-width: 100%; padding: 0 6px 0 12px; border-radius: var(--r-full); background: var(--surface-3); border: 1px solid var(--line-1); transition: border-color var(--t-fast) var(--ease); }
.rsk-search .i { width: 16px; height: 16px; color: var(--fg-3); }
.rsk-search input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; background: transparent; border: 0; outline: none; color: var(--fg-1); font-size: var(--t-14); }
.rsk-search input::placeholder { color: var(--fg-3); }
.rsk-search input::-webkit-search-cancel-button { display: none; }
.rsk-search:focus-within { border-color: var(--accent-line); }
.rsk-search__clear { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--fg-3); }
.rsk-search__clear:hover { background: var(--surface-4); color: var(--fg-1); }

.rsk-badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: var(--r-full); background: var(--accent-wash); color: var(--accent-fg); font-size: var(--t-13); font-weight: 500; white-space: nowrap; }
.rsk-badge--quiet { background: var(--surface-4); color: var(--fg-2); }
.rsk-badge--ok { background: rgba(87, 211, 158, 0.12); color: var(--success); }
.rsk-badge--warn { background: rgba(242, 184, 75, 0.12); color: var(--warning); }
.rsk-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--fg-4); }
.rsk-dot.is-ok { background: var(--success); }
.rsk-dot.is-warn { background: var(--warning); }

/* three-step scales (quality, speed, cost) shown as short bars, the same for every model */
.rsk-meter { display: inline-flex; gap: 3px; flex: none; }
.rsk-meter i { width: 12px; height: 6px; border-radius: 3px; background: var(--surface-4); }
.rsk-meter i.is-on { background: var(--fg-2); }

/* empty, loading and error states shared by every component */
.rsk-state { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); padding: var(--s-10) var(--s-6); text-align: center; }
.rsk-state__title { margin: 0; font: 400 var(--t-32)/1.1 var(--font-serif); color: var(--fg-1); letter-spacing: -0.01em; }
.rsk-state__text { max-width: 52ch; color: var(--fg-2); }
.rsk-state--quiet { align-items: flex-start; padding: var(--s-6) 0 var(--s-4); text-align: left; }
.rsk-state--quiet .rsk-state__title { font: 600 var(--t-20)/1.3 var(--font-sans); letter-spacing: -0.01em; }
.rsk-shots .rsk-state__title { font: 600 var(--t-17)/1.3 var(--font-sans); color: var(--fg-2); letter-spacing: 0; }
.rsk-error { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); padding: 14px 14px 14px 16px; border-radius: var(--r-14); background: rgba(242, 139, 130, 0.08); box-shadow: inset 0 0 0 1px rgba(242, 139, 130, 0.3); color: var(--fg-1); font-size: var(--t-14); line-height: 1.45; }
.rsk-error > .i { color: var(--danger); }
.rsk-error__text { flex: 1 1 280px; min-width: 0; }
.rsk-error__text b { font-weight: 600; }
.rsk-skel { position: relative; overflow: hidden; border-radius: var(--r-14); background: var(--glass-card); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: inset 0 0 0 1px var(--line-1); }
.rsk-skel::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.035) 50%, transparent 80%); transform: translateX(-100%); animation: sweep 1.5s var(--ease) infinite; }
.rsk-skel__pic { aspect-ratio: 16 / 9; background: var(--surface-2); }
.rsk-lib__grid .rsk-skel__pic { aspect-ratio: 4 / 3; }
.rsk-skel__line { height: 10px; margin: 14px 16px 0; border-radius: 5px; background: var(--surface-3); }
.rsk-skel__line + .rsk-skel__line { width: 55%; margin-bottom: 16px; }
/* kit: the shots board's placeholders are made of the same glass as its cards */
.rsk-shots .skeleton { -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); }
/* the wide placeholder for the newest video: same columns as .rsk-vcard--feature */
.rsk-skel--feature { display: grid; grid-template-columns: minmax(280px, 560px) minmax(340px, 1fr); align-items: center; }
.rsk-skel--feature .rsk-skel__pic { border-radius: var(--r-14) 0 0 var(--r-14); }
.rsk-skel__text { display: flex; flex-direction: column; gap: 14px; padding: var(--s-5); max-width: 620px; }
.rsk-skel__text .rsk-skel__line, .rsk-skel__text .rsk-skel__line + .rsk-skel__line { margin: 0; }
.rsk-skel__text .rsk-skel__line:nth-child(1) { width: 28%; }
.rsk-skel__text .rsk-skel__line:nth-child(2) { width: 62%; height: 14px; }
.rsk-skel__text .rsk-skel__line:nth-child(3) { width: 48%; }
@container (max-width: 640px) { .rsk-skel--feature { grid-template-columns: minmax(0, 1fr); } .rsk-skel--feature .rsk-skel__pic { border-radius: 0; } }
.rsk-progress { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }

/* a page body inside the shell's content area (versions may use their own) */
.rsk-page { display: flex; flex-direction: column; gap: var(--s-8); min-width: 0; padding: var(--s-6) var(--s-6) var(--s-10); }
.rsk-shell .rsk-shell__content { --rsk-top: var(--topbar-h); }
/* the one toast host when a component is used without the shell's top bar */
.rsk-toasts { display: flex; justify-content: flex-end; min-height: 36px; }

/* icons drawn for the kit (same stroke family as the pilot's) */
.i--24 { width: 24px; height: 24px; }
.i--28 { width: 28px; height: 28px; }

/* ==========================================================================
   17. Shell: sidebar, coming-later group, top bar
   ========================================================================== */
.rsk-shell { container: rsk-shell / inline-size; min-height: 100vh; background: var(--canvas); }
.rsk-shell[data-frame] { min-height: 0; height: 100%; overflow: hidden; border-radius: var(--r-20); }
.rsk-shell__grid { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }
.rsk-shell[data-frame] .rsk-shell__grid { min-height: 0; height: 100%; }
.rsk-shell .nav { overflow-y: auto; scrollbar-width: none; }
.rsk-shell[data-frame] .nav { position: relative; height: 100%; }
.rsk-shell[data-frame] .sheet { min-height: 0; height: calc(100% - 16px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-4) transparent; }
.rsk-nav__brand { display: flex; align-items: center; }
.rsk-nav__mark { display: none; width: 40px; height: 40px; place-items: center; border-radius: var(--r-10); background: var(--surface-3); font: italic 400 var(--t-20)/1 var(--font-serif); color: var(--fg-1); }
.rsk-nav__group { display: flex; flex-direction: column; gap: 2px; margin-top: var(--s-4); }
.rsk-nav__label { padding: 0 var(--s-3) 6px; font-size: var(--t-13); color: var(--fg-3); }
.rsk-nav .nav__item { position: relative; width: 100%; text-align: left; }
.rsk-nav .nav__item[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-fg); }
.rsk-nav__later .nav__item { color: var(--fg-3); }
.rsk-nav__later .nav__item .i { color: var(--fg-3); }
.rsk-nav__later .nav__item[aria-expanded="true"] { background: var(--surface-3); color: var(--fg-1); }
.rsk-nav__count { margin-left: auto; font-size: var(--t-13); color: var(--fg-3); }
.rsk-topbar { gap: var(--s-3); }
.rsk-topbar__menu { display: none; }
.rsk-topbar__title { margin: 0; font-size: var(--t-15); font-weight: 600; color: var(--fg-1); white-space: nowrap; }
.rsk-crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: var(--t-14); }
.rsk-crumbs__link { height: var(--h-32); padding: 0 8px; border-radius: var(--r-full); color: var(--fg-3); white-space: nowrap; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.rsk-crumbs__link:hover { background: var(--surface-3); color: var(--fg-1); }
.rsk-crumbs__sep { width: 14px; height: 14px; color: var(--fg-4); }
.rsk-crumbs__here { padding: 0 8px; font-weight: 600; color: var(--fg-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsk-topbar__slot { display: flex; align-items: center; min-width: 0; }
.rsk-topbar__slot:empty { display: none; }
.rsk-shell__content { position: relative; min-width: 0; }
.rsk-later-note { z-index: 80; position: absolute; width: 300px; padding: var(--s-4); border-radius: var(--r-14); background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--rim-top), var(--shadow-float); animation: pop var(--t-med) var(--ease); }
.rsk-later-note__title { display: flex; align-items: center; gap: var(--s-2); margin: 0 0 6px; font-size: var(--t-15); font-weight: 600; color: var(--fg-1); }
.rsk-later-note__text { margin: 0 0 var(--s-3); font-size: var(--t-14); line-height: 1.5; color: var(--fg-2); }
.rsk-shell__scrim { display: none; }
/* fix round 1: "Coming later" is one quiet row that folds open; its tools are smaller and muted; a tool's note opens beside
   the sidebar (.rsk-later-note, a small dialog level with its item), so it never moves the list or covers the navigation */
.rsk-nav__later { gap: 0; }
.rsk-nav__laterhead { display: flex; align-items: center; gap: var(--s-3); width: 100%; height: var(--h-32); padding: 0 var(--s-3); border-radius: var(--r-10); color: var(--fg-3); font-size: var(--t-13); font-weight: 500; text-align: left; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.rsk-nav__laterhead:hover { background: var(--surface-2); color: var(--fg-2); }
.rsk-nav__laterhead .i { width: 16px; height: 16px; color: var(--fg-3); }
.rsk-nav__laterhead .rsk-nav__count { margin-left: auto; }
.rsk-nav__laterhead .i--chev { width: 14px; height: 14px; transform: rotate(-90deg); transition: transform var(--t-fast) var(--ease); }
.rsk-nav__laterhead[aria-expanded="true"] .i--chev { transform: none; }
.rsk-nav__laterlist { display: flex; flex-direction: column; gap: 0; }
.rsk-nav .rsk-nav__lateritem { height: var(--h-32); padding-left: 20px; font-size: var(--t-13); font-weight: 400; }
.rsk-nav .rsk-nav__lateritem .i { width: 16px; height: 16px; }
/* narrower: the sidebar becomes a rail of icons; the names show as tips */
@container rsk-shell (max-width: 1180px) {
  .rsk-shell__grid { grid-template-columns: 76px minmax(0, 1fr); }
  .rsk-shell .nav { padding-left: var(--s-2); padding-right: var(--s-2); align-items: center; }
  .rsk-shell .nav__brand { display: none; }
  .rsk-nav__mark { display: grid; margin: 0 auto var(--s-5); }
  .rsk-shell .nav__item { width: 48px; height: 44px; justify-content: center; padding: 0; }
  .rsk-shell .nav__item[aria-current="page"]::before { left: -8px; }
  .rsk-nav__text, .rsk-nav__count { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rsk-nav__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rsk-nav__group { align-items: center; padding-top: var(--s-3); border-top: 1px solid var(--line-1); }
  .rsk-shell .nav__foot { align-items: center; }
  .rsk-nav__laterhead { width: 48px; height: 40px; justify-content: center; padding: 0; }
  .rsk-nav__laterhead .i--chev { display: none; }
  .rsk-nav .rsk-nav__lateritem { padding-left: 0; }
}
/* narrowest: the sidebar slides in from a menu button in the top bar */
@container rsk-shell (max-width: 760px) {
  .rsk-shell__grid { grid-template-columns: minmax(0, 1fr); }
  .rsk-shell .nav, .rsk-shell[data-frame] .nav { position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; height: auto; width: 248px; align-items: stretch; background: var(--canvas); box-shadow: var(--shadow-float); transform: translateX(-105%); transition: transform var(--t-med) var(--ease); padding: var(--s-5) var(--s-3) var(--s-4); }
  .rsk-shell[data-nav-open] .nav { transform: none; }
  .rsk-shell[data-nav-open] .rsk-shell__scrim { display: block; position: fixed; inset: 0; z-index: 60; background: var(--scrim); }
  .rsk-shell .nav__brand { display: block; }
  .rsk-nav__mark { display: none; }
  .rsk-shell .nav__item { width: 100%; height: var(--h-36); justify-content: flex-start; padding: 0 var(--s-3); }
  .rsk-nav__text, .rsk-nav__count, .rsk-nav__label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .rsk-nav__group { align-items: stretch; border-top: 0; }
  .rsk-shell .nav__foot { align-items: stretch; }
  .rsk-shell .sheet { margin: 8px; }
  .rsk-topbar__menu { display: inline-flex; }
  /* the slid-in sidebar has its full width again: Coming later is a row with its name and count, its tools smaller */
  .rsk-nav__laterhead { width: 100%; height: var(--h-32); justify-content: flex-start; padding: 0 var(--s-3); }
  .rsk-nav__laterhead .i--chev { display: block; }
  .rsk-shell .rsk-nav__lateritem { height: var(--h-32); padding-left: 20px; }
}

/* ==========================================================================
   18. Start box (Home): reference video, idea with @, images, video type, writer, Start
   ========================================================================== */
.rsk-start { width: 100%; max-width: 1480px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-20); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--rim-top), var(--shadow-float); }
.rsk-start:focus-within { box-shadow: var(--rim-top), 0 0 0 1px rgba(110, 160, 255, 0.35), var(--shadow-float); }
.rsk-start__title { margin: 0; font: 400 var(--t-32)/1.1 var(--font-serif); color: var(--fg-1); letter-spacing: -0.01em; }
.rsk-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-full); background: var(--surface-2); align-self: flex-start; box-shadow: inset 0 0 0 1px var(--line-1); }
.rsk-tabs button { display: inline-flex; align-items: center; gap: var(--s-2); height: var(--h-36); padding: 0 var(--s-4); border-radius: var(--r-full); color: var(--fg-3); font-size: var(--t-14); font-weight: 500; white-space: nowrap; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.rsk-tabs button .i { width: 16px; height: 16px; }
.rsk-tabs button:hover { color: var(--fg-1); }
.rsk-tabs button[aria-selected="true"] { background: var(--surface-4); color: var(--fg-1); box-shadow: var(--rim-top); }
.rsk-start__body { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: var(--s-5); align-items: stretch; }
.rsk-start__main { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
.rsk-start__idea { min-height: 104px; }
.rsk-start__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rsk-start__foot .grow { flex: 1 1 0; min-width: 0; }
.rsk-start__hint { display: flex; align-items: center; gap: 6px; min-height: 20px; margin: calc(var(--s-2) * -1) 0 0; font-size: var(--t-13); line-height: 1.4; color: var(--fg-3); }
.rsk-start__hint.is-warn { color: var(--warning); }
.rsk-start__hint .i { width: 14px; height: 14px; }
.rsk-go { min-width: 168px; }
.rsk-go__cost { font-weight: 500; }
.rsk-start__side { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.rsk-start__side > .rsk-small { padding: 0 4px; }
.rsk-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s-2); min-height: 224px; padding: var(--s-5) var(--s-4); border-radius: var(--r-14); background: rgba(255, 255, 255, 0.015); box-shadow: inset 0 0 0 1px var(--line-2); text-align: center; color: var(--fg-2); cursor: pointer; transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.rsk-drop::before { content: ""; position: absolute; inset: 6px; border-radius: var(--r-10); border: 1px dashed var(--line-3); pointer-events: none; }
.rsk-drop:hover, .rsk-drop.is-over { background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-line); }
.rsk-drop:has(.file-cover:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }
.rsk-drop__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--fg-1); }
.rsk-drop__title { font-size: var(--t-15); font-weight: 600; color: var(--fg-1); }
.rsk-drop__sub { font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); max-width: 24ch; }
.rsk-drop--page { min-height: 260px; }
.rsk-drop--page .rsk-drop__sub { max-width: 36ch; }
.rsk-drop__btn { margin-top: var(--s-2); pointer-events: none; }
.rsk-vtile { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.rsk-vtile__pic { position: relative; height: 224px; border-radius: var(--r-14); overflow: hidden; background: #050608; }
.rsk-vtile__pic img, .rsk-vtile__pic video { width: 100%; height: 100%; object-fit: contain; }
.rsk-vtile__pic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line-2); pointer-events: none; }
.rsk-vtile__remove { position: absolute; top: 8px; right: 8px; z-index: 1; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(8, 9, 12, 0.8); color: #fff; }
.rsk-vtile__remove:hover { background: rgba(8, 9, 12, 0.95); }
.rsk-vtile__name { font-size: var(--t-14); font-weight: 500; color: var(--fg-1); overflow-wrap: anywhere; }
.rsk-vtile__meta { font-size: var(--t-13); color: var(--fg-3); }
.rsk-vtile__use { display: flex; flex-direction: column; gap: 6px; }
.rsk-vtile__use .segmented { align-self: stretch; }
.rsk-vtile__use .segmented button { flex: 1 1 0; padding: 0 var(--s-2); }
.rsk-start .refs { gap: var(--s-3); }
.rsk-start .ref, .rsk-start .ref-addtile { --ref-size: 120px; }
/* assistant style: one big box that understands plain words */
.rsk-start--assistant { gap: var(--s-4); }
.rsk-start--assistant .rsk-start__idea { min-height: 120px; font-size: var(--t-17); }
.rsk-attach { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-3); }
.rsk-attach:empty, .rsk-attach:not(:has(.rsk-vtile, .ref)) { display: none; }
.rsk-attach .rsk-vtile { width: 168px; }
.rsk-attach .rsk-vtile__pic { height: 168px; }
.rsk-suggest { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.rsk-suggest__chip { display: inline-flex; align-items: center; gap: var(--s-2); height: var(--h-40); padding: 0 var(--s-4) 0 var(--s-3); border-radius: var(--r-full); background: var(--surface-3); color: var(--fg-1); font-size: var(--t-14); font-weight: 500; box-shadow: var(--rim-top); transition: background var(--t-fast) var(--ease); }
.rsk-suggest__chip:hover { background: var(--surface-4); }
.rsk-suggest__chip .i { color: var(--accent-fg); }
.rsk-start__gen { display: flex; flex-direction: column; gap: var(--s-4); }
/* fix round 1: one surface. The whole card takes drops (a wash and a line say so while dragging); what is attached sits on
   top, the idea is two lines that grow, the add buttons are quiet; nothing is boxed inside the card */
.rsk-start--one { gap: var(--s-3); padding: var(--s-4) var(--s-5); }
.rsk-start--one .rsk-start__idea { min-height: 56px; }
.rsk-start__attach { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-4); }
.rsk-start__attach:not(:has(.rsk-vtile, .ref, .ref-addtile)) { display: none; }
.rsk-start__attach .refs:empty { display: none; }
.rsk-start__tools { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.rsk-start__tools .btn { padding: 0 var(--s-3); }
.rsk-start__divider { width: 1px; height: 24px; margin: 0 var(--s-2); background: var(--line-2); }
.rsk-start.is-over { box-shadow: var(--rim-top), 0 0 0 2px var(--accent), var(--shadow-float); }
.rsk-start__over { position: absolute; inset: 0; z-index: 4; display: none; place-items: center; align-content: center; grid-auto-flow: column; gap: var(--s-2); border-radius: inherit; background: rgba(20, 36, 70, 0.92); color: var(--fg-1); font-size: var(--t-15); font-weight: 600; pointer-events: none; }
.rsk-start.is-over .rsk-start__over { display: grid; }
/* the reference video as a row: picture, name, length, and how to use it */
.rsk-vtile__info { display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.rsk-vtile--row { flex-direction: row; align-items: flex-start; gap: var(--s-4); width: min(100%, 440px); }
.rsk-vtile--row .rsk-vtile__pic { flex: none; width: 116px; height: 156px; }
.rsk-vtile--row .rsk-vtile__info { flex: 1 1 auto; padding-top: 2px; }
.rsk-vtile__from { margin-top: 4px; font-size: var(--t-13); color: var(--fg-2); }
.rsk-vtile__ok { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-13); color: var(--success, #7FD69B); }
/* the Reel picked in Find, waiting for its file */
.rsk-pick { display: flex; align-items: flex-start; gap: var(--s-4); }
.rsk-pick__cover { flex: none; width: 96px; aspect-ratio: 9 / 16; display: grid; place-items: center; border-radius: var(--r-10); overflow: hidden; background: #050608; color: var(--fg-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.rsk-pick__cover img { width: 100%; height: 100%; object-fit: cover; }
.rsk-pick__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding-top: 2px; }
.rsk-pick__kicker { font-size: var(--t-13); color: var(--accent-fg); }
.rsk-pick__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s-3); font-size: var(--t-17); font-weight: 600; color: var(--fg-1); }
.rsk-pick__plays { font-size: var(--t-14); font-weight: 500; color: var(--fg-2); }
.rsk-pick__cap { font-size: var(--t-14); line-height: 1.45; color: var(--fg-2); overflow-wrap: anywhere; }
.rsk-pick__why { max-width: 64ch; font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.rsk-pick__acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); margin-top: var(--s-1); }
.rsk-start__foot .rsk-go { margin-left: auto; }
/* "Try a sample" (opts.sample): beside the main button, the two stay together at the right when the row wraps */
.rsk-start__gos { margin-left: auto; display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; }
.rsk-start__foot .rsk-start__gos .rsk-go { margin-left: 0; }
.rsk-go.is-waiting { background: var(--surface-4); color: var(--fg-2); box-shadow: none; }
.rsk-go.is-waiting:hover { background: #2B2E37; }
/* an image says what it is in a word ("Character"), or asks ("What is it?") */
.ref__type.ref__type--word { width: auto; height: 26px; align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin: -2px 0 0 -2px; padding: 0 6px 0 6px; border-radius: var(--r-6); background: var(--surface-3); color: var(--fg-1); font-size: var(--t-13); }
.ref__type--word .i--chev { width: 12px; height: 12px; color: var(--fg-3); }
.ref__type--word.is-missing { background: rgba(240, 180, 90, 0.12); color: var(--warning); }
.ref__type--word.is-missing .i { color: var(--warning); }
/* a rebuild: one locked setting instead of type and length */
.pill--locked { color: var(--fg-1); cursor: default; }
.pill--locked .i { color: var(--fg-3); }
.ref-addbtn { align-self: flex-start; margin-top: 36px; }
/* no image yet (a brief that starts empty): the button sits right under its title, not 36 px down beside no tiles */
.refs > .ref-addbtn:first-child { margin-top: 0; }
.menu__group { padding: var(--s-2) 10px 4px; font-size: var(--t-13); font-weight: 500; color: var(--fg-3); }
/* the Break down tab: the card itself is the drop target, its hint is not a box */
.rsk-start .rsk-drop { min-height: 176px; background: transparent; box-shadow: none; }
.rsk-start .rsk-drop::before { display: none; }
.rsk-start .rsk-drop:hover, .rsk-start .rsk-drop.is-over { background: var(--accent-wash); box-shadow: none; }
/* the separate "Break down a Reel" start (variant breakdown): the Reel is the whole card, a dashed frame says drop it here */
.rsk-start--reel { gap: var(--s-3); padding: var(--s-4) var(--s-5); }
.rsk-start--reel .rsk-drop { min-height: 232px; background: rgba(255, 255, 255, 0.015); box-shadow: inset 0 0 0 1px var(--line-2); }
.rsk-start--reel .rsk-drop::before { display: block; }
.rsk-start--reel .rsk-drop:hover, .rsk-start--reel .rsk-drop.is-over { background: var(--accent-wash); box-shadow: inset 0 0 0 1px var(--accent-line); }
.rsk-start--reel .rsk-drop__sub { max-width: 48ch; }
.rsk-start__reel { display: flex; flex-direction: column; gap: var(--s-3); }
.rsk-start__reel .rsk-vtile--row { width: min(100%, 520px); }
.rsk-start--reel .rsk-drop__title { font-size: var(--t-17); }
/* where a video's pacing comes from (opts.paceChip on the Shots board): the accent icon says it leads somewhere */
.pill--pace .i { color: var(--accent-fg); }
/* a narrow box (a phone): the picture and its name side by side, "Use this video to" under both, full width */
@container (max-width: 480px) {
  .rsk-start--reel .rsk-vtile--row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: var(--s-3) var(--s-3); width: 100%; }
  .rsk-start--reel .rsk-vtile--row .rsk-vtile__pic { width: 88px; height: 120px; }
  .rsk-start--reel .rsk-vtile--row .rsk-vtile__info { display: contents; }
  .rsk-start--reel .rsk-vtile--row .rsk-vtile__use { grid-column: 1 / -1; }
}
@container (max-width: 820px) {
  .rsk-start__body { grid-template-columns: minmax(0, 1fr); }
  .rsk-drop { min-height: 156px; }
  .rsk-vtile__pic { height: 200px; }
}

/* ==========================================================================
   19. Recent videos: one featured card, then a grid; search and filter
   ========================================================================== */
.rsk-videos { display: flex; flex-direction: column; gap: var(--s-4); }
.rsk-videos__count { font-size: var(--t-14); color: var(--fg-3); }
.rsk-videos__hero { min-width: 0; }
.rsk-videos__body { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
@container (min-width: 2000px) {
  .rsk-videos__body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-4); align-items: start; }
  .rsk-videos__body .rsk-videos__hero { grid-column: span 2; }
  .rsk-videos__body .rsk-videos__grid { display: contents; }
  .rsk-videos__body .rsk-vcard--feature { grid-template-columns: minmax(0, 1fr); }
  .rsk-videos__body .rsk-vcard--feature .rsk-vcard__pic { border-radius: var(--r-14) var(--r-14) 0 0; }
  .rsk-videos__body .rsk-skel--feature { grid-template-columns: minmax(0, 1fr); }
  .rsk-videos__body .rsk-skel--feature .rsk-skel__pic { border-radius: 0; }
}
/* five across from a 1104 px container (inside the shell at 1440 px too), so the row under the big card has no orphan */
.rsk-videos__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(208px, calc((100% - 4 * var(--s-4)) / 5)), 1fr)); gap: var(--s-4); align-items: start; }
.rsk-vcard { display: flex; flex-direction: column; min-width: 0; text-decoration: none; border-radius: var(--r-14); background: var(--glass-card); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: var(--shadow-card); color: inherit; text-align: left; cursor: pointer; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.rsk-vcard:hover { background: var(--glass-card-hover); transform: translateY(-2px); }
.rsk-vcard:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; }
.rsk-vcard__pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-14) var(--r-14) 0 0; background: #17191E; }
.rsk-vcard__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-med) var(--ease); }
.rsk-vcard:hover .rsk-vcard__pic img { transform: scale(1.03); }
.rsk-vcard__body { display: flex; flex-direction: column; gap: var(--s-2); padding: 12px 16px 16px; }
.rsk-vcard__title { margin: 0; font-size: var(--t-15); font-weight: 600; line-height: 1.35; color: var(--fg-1); }
.rsk-vcard__progress { font-size: var(--t-14); line-height: 1.45; color: var(--fg-2); }
.rsk-vcard__meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px var(--s-3); font-size: var(--t-13); color: var(--fg-3); }
.rsk-vsteps { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 3px; }
/* the way a video started (a version that has two: Director, Viral breakdown), on its picture */
.rsk-vcard__way { position: absolute; left: 8px; top: 8px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: var(--r-full); background: rgba(8, 9, 13, 0.86); font-size: var(--t-13); font-weight: 500; color: var(--fg-1); }
.rsk-vcard__way .i { width: 14px; height: 14px; color: var(--accent-fg); }
.rsk-vsteps i { height: 4px; border-radius: 2px; background: var(--surface-4); }
.rsk-vsteps i.is-done { background: var(--fg-2); }
.rsk-vsteps i.is-now { background: var(--accent-fg); }
/* the words beside the picture keep at least 340 px; the picture gives way first */
.rsk-vcard--feature { display: grid; grid-template-columns: minmax(280px, 560px) minmax(340px, 1fr); }
.rsk-vcard--feature .rsk-vcard__pic { aspect-ratio: 16 / 9; border-radius: var(--r-14) 0 0 var(--r-14); }
.rsk-vcard--feature .rsk-vcard__body { max-width: 620px; container-type: inline-size; }
.rsk-vcard--feature .rsk-vcard__body { justify-content: center; gap: var(--s-3); padding: var(--s-5) var(--s-5) var(--s-5) var(--s-5); }
.rsk-vcard--feature .rsk-vcard__title { font-size: var(--t-20); line-height: 1.3; }
.rsk-vcard--feature .rsk-vcard__progress { font-size: var(--t-15); }
.rsk-vcard--feature .rsk-vcard__meta { justify-content: flex-start; gap: 4px var(--s-5); }
.rsk-vsteps__names { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 3px; margin-top: -2px; font-size: var(--t-13); color: var(--fg-3); }
.rsk-vsteps__names .is-now { color: var(--fg-1); font-weight: 500; }
.rsk-vsteps__names span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* too narrow for five step names under the bar: the bar and the progress line below it say the same */
@container (max-width: 349px) { .rsk-vsteps__names { display: none; } }
.rsk-vcard__label { font-size: var(--t-13); color: var(--accent-fg); }
.rsk-vcard__go { align-self: flex-start; margin-top: var(--s-1); }
@container (max-width: 640px) {
  .rsk-vcard--feature { grid-template-columns: minmax(0, 1fr); }
  .rsk-vcard--feature .rsk-vcard__pic { border-radius: var(--r-14) var(--r-14) 0 0; }
}
.rsk-videos__empty { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: var(--s-4); }
.rsk-ghost { aspect-ratio: 16 / 10; border-radius: var(--r-14); border: 1px dashed var(--line-3); background: rgba(255, 255, 255, 0.015); }

/* ==========================================================================
   20. Breakdown of a reference: player, cut strip to scale, one card per cut, the two ways to use it
   ========================================================================== */
.rsk-bd { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.rsk-bd--wide-ref { grid-template-columns: minmax(320px, 480px) minmax(0, 1fr); }
.rsk-bd__side { position: sticky; top: calc(var(--rsk-top) + 16px); display: flex; flex-direction: column; gap: var(--s-3); min-width: 0; }
.rsk-bd__video { display: block; width: 100%; height: 100%; background: transparent; object-fit: contain; }
.rsk-bd__player { max-height: calc(100vh - var(--rsk-top) - 200px); }
/* fix round 1: the kit's own player controls (the browser's black bar and menu looked out of place) */
.rsk-player { position: relative; width: 100%; aspect-ratio: var(--ar, 9 / 16); border-radius: var(--r-14); overflow: hidden; background: transparent; container: rsk-player / inline-size; }
.rsk-player video { display: block; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.rsk-player__big { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; display: grid; place-items: center; border-radius: 50%; background: rgba(8, 9, 12, 0.76); color: #fff; transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.rsk-player__big:hover { transform: scale(1.06); background: rgba(8, 9, 12, 0.92); }
.rsk-player.is-playing .rsk-player__big { opacity: 0; pointer-events: none; }
.rsk-player__bar { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 4px; border-radius: var(--r-10); background: rgba(8, 9, 12, 0.8); color: #fff; }
.rsk-player__btn { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: var(--r-6); color: #fff; transition: background var(--t-fast) var(--ease); }
.rsk-player__btn:hover { background: rgba(255, 255, 255, 0.14); }
.rsk-player__time { flex: none; padding: 0 6px; font: 500 var(--t-13)/1 var(--font-mono); color: #fff; white-space: nowrap; }
.rsk-player__scrub { position: relative; flex: 1 1 auto; min-width: 40px; height: 28px; cursor: pointer; touch-action: none; }
.rsk-player__scrub::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: rgba(255, 255, 255, 0.28); }
.rsk-player__fill { position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: var(--accent-fg); }
.rsk-player__scrub:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }
.rsk-player:fullscreen { border-radius: 0; }
/* a small player keeps every control: the length goes first, then the bar tightens (180 px still fits play, time, position, sound, full screen) */
@container rsk-player (max-width: 299px) { .rsk-player__dur { display: none; } }
@container rsk-player (max-width: 229px) {
  .rsk-player__bar { left: 6px; right: 6px; bottom: 6px; gap: 0; padding: 0 2px; }
  .rsk-player__btn { width: 28px; height: 28px; }
  .rsk-player__time { padding: 0 3px; }
  .rsk-player__scrub { min-width: 32px; }
}
@container rsk-player (max-width: 159px) { .rsk-player__time { display: none; } }
.rsk-bd__who { display: flex; flex-direction: column; gap: 2px; }
.rsk-bd__name { font-size: var(--t-15); font-weight: 600; color: var(--fg-1); overflow-wrap: anywhere; }
.rsk-bd__main { display: flex; flex-direction: column; gap: var(--s-6); min-width: 0; }
.rsk-bd__facts { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); }
.rsk-fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rsk-fact__value { font-size: var(--t-20); font-weight: 600; line-height: 1.2; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.rsk-fact__label { font-size: var(--t-13); color: var(--fg-3); }
.rsk-bd__flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rsk-bd__step { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }   /* an arrow wraps with the step after it */
.rsk-bd__flow .chip { height: 32px; font-size: var(--t-14); color: var(--fg-1); }
.rsk-bd__flow .i { width: 14px; height: 14px; color: var(--fg-4); }
.rsk-bd__why { font-size: var(--t-15); line-height: 1.55; color: var(--fg-2); max-width: 70ch; }
.rsk-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
.rsk-mode { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s-3); align-items: start; padding: var(--s-4); border-radius: var(--r-14); background: var(--glass-card); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: var(--shadow-card); text-align: left; cursor: pointer; transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.rsk-mode:hover { background: var(--glass-card-hover); }
.rsk-mode[aria-checked="true"] { background: var(--glass-card-selected); box-shadow: 0 0 0 1px var(--accent), var(--shadow-card); }
.rsk-mode__radio { width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-3); display: grid; place-items: center; }
.rsk-mode[aria-checked="true"] .rsk-mode__radio { box-shadow: inset 0 0 0 1.5px var(--accent-fg); }
.rsk-mode[aria-checked="true"] .rsk-mode__radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-fg); }
.rsk-mode__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); min-height: 24px; font-size: var(--t-15); font-weight: 600; color: var(--fg-1); }
.rsk-mode__text { margin-top: 4px; font-size: var(--t-14); line-height: 1.5; color: var(--fg-2); }
.rsk-bd__go { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--s-3); }
.rsk-bd__go .rsk-small { flex: 1 1 240px; padding-top: 10px; }
/* the cut strip: every cut at its real length; a cut too narrow for its number gets it in a lane under the strip */
.rsk-strip { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rsk-strip__track { position: relative; height: 40px; isolation: isolate; }
.rsk-strip__cut { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; padding: 0; cursor: pointer; color: var(--fg-2); font: 500 var(--t-13)/1 var(--font-mono); }
.rsk-strip__cut::before { content: ""; position: absolute; inset: 0 1px; border-radius: 4px; background: var(--surface-4); transition: background var(--t-fast) var(--ease); z-index: -1; }
.rsk-strip__cut:hover::before { background: #383C48; }
.rsk-strip__cut:hover { color: var(--fg-1); }
/* a block that repeats an earlier shot (the same clip again): outlined instead of filled; its number stays */
.rsk-strip__cut.is-repeat::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-3); }
.rsk-strip__cut.is-repeat:hover::before { background: var(--surface-3); }
.rsk-strip__cut.is-selected::before { background: var(--accent); }
.rsk-strip__cut.is-selected { color: #fff; }
.rsk-strip__cut.is-match::before { background: rgba(110, 160, 255, 0.3); box-shadow: inset 0 0 0 1px var(--accent-line); }
.rsk-strip__cut.is-dim { color: var(--fg-3); }
.rsk-strip__cut.is-dim::before { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-1); }
.rsk-shots .shot.is-dim, .rsk-shots .shot.is-dim:hover, .rsk-shots .shot.is-dim:focus-visible { opacity: 1; }
.rsk-shots .shot.is-dim { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.rsk-shots .shot.is-dim .shot__pic > img, .rsk-shots .shot.is-dim .shot__nopic .i { opacity: 0.3; filter: grayscale(1); transition: opacity var(--t-fast) var(--ease); }
.rsk-shots .shot.is-dim:hover .shot__pic > img, .rsk-shots .shot.is-dim:focus-visible .shot__pic > img { opacity: 0.75; filter: none; }
.rsk-shots .shot.is-dim .shot__action { color: var(--fg-2); }
.rsk-strip__cut.is-part-start::before { left: 3px; }
.rsk-strip__cut > span { position: relative; padding: 0 2px; }
/* fix round 1: the numbers that do not fit their block sit on one line, in order, each joined to its block by a thin line */
.rsk-strip__lane { position: relative; height: 24px; }
.rsk-strip__leads { position: absolute; left: 0; top: 0; overflow: visible; stroke: var(--line-3); stroke-width: 1; }
.rsk-strip__lab { position: absolute; top: 8px; padding: 0 1px; font: 500 var(--t-13)/16px var(--font-mono); color: var(--fg-3); white-space: nowrap; cursor: pointer; }
.rsk-strip__lab.is-centred { top: 4px; transform: translateX(-50%); }
.rsk-strip__lab.is-centred::before { content: ""; position: absolute; left: 50%; top: -4px; height: 4px; border-left: 1px solid var(--line-3); }
.rsk-strip__lane[data-lane="2"] { height: 20px; }
/* the shots board's cut: one row high; its line of numbers floats under it while the pointer is over the cut */
.rsk-dock { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: var(--s-4); align-items: start; }
.rsk-dock__key { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.rsk-dock__title { font-size: var(--t-14); font-weight: 600; line-height: 18px; color: var(--fg-1); }
.rsk-dock__sub, .rsk-dock__legend { font-size: var(--t-13); line-height: 18px; color: var(--fg-3); }
.rsk-dock__legend { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; border-radius: var(--r-6); cursor: help; }
.rsk-dock__sw { flex: none; width: 16px; height: 11px; border-radius: 3px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-3); }
.rsk-strip--compact .rsk-strip__parts { height: 18px; }
.rsk-strip--compact .rsk-strip__part { font-size: var(--t-13); }
.rsk-strip--compact .rsk-strip__track { height: 30px; }
.rsk-strip__lanes { position: absolute; left: -10px; right: -10px; top: 100%; z-index: 8; display: none; padding: 2px 10px 6px; border-radius: 0 0 var(--r-10) var(--r-10); background: var(--surface-2); box-shadow: var(--shadow-float); }
.rsk-shots__dock:hover .rsk-strip--compact.has-lane .rsk-strip__lanes, .rsk-strip--compact.is-open .rsk-strip__lanes { display: block; }
@container (max-width: 760px) { .rsk-dock { grid-template-columns: minmax(0, 1fr); gap: var(--s-2); } .rsk-dock__key { flex-direction: row; flex-wrap: wrap; gap: 4px var(--s-3); } }
.rsk-strip__lab.is-selected { color: var(--accent-fg); }
.rsk-strip__parts { position: relative; height: 20px; }
.rsk-strip__part { position: absolute; top: 0; display: flex; align-items: center; gap: 6px; font-size: var(--t-14); color: var(--fg-3); white-space: nowrap; }
.rsk-strip__part b { color: var(--fg-1); font-weight: 600; }
.rsk-strip__ruler { position: relative; height: 18px; }
.rsk-strip__tick { position: absolute; top: 0; height: 18px; white-space: nowrap; padding-left: 4px; border-left: 1px solid var(--line-2); font: 400 var(--t-13)/18px var(--font-mono); color: var(--fg-3); }
.rsk-strip__tick.is-end { padding: 0 4px 0 0; border-left: 0; border-right: 1px solid var(--line-2); transform: translateX(-100%); }
.rsk-strip__legend { margin-top: 2px; font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.rsk-strip__target { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--warning); z-index: 1; }
.rsk-cutgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-3); }
.rsk-cutcard { display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-14); background: var(--glass-card); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: var(--shadow-card); text-align: left; cursor: pointer; transition: background var(--t-fast) var(--ease); }
.rsk-cutcard:hover { background: var(--glass-card-hover); }
.rsk-cutcard.is-selected { background: var(--glass-card-selected); box-shadow: 0 0 0 1px var(--accent), var(--shadow-card); }
.rsk-cutcard__pic { position: relative; aspect-ratio: var(--ar, 9 / 16); overflow: hidden; border-radius: var(--r-14) var(--r-14) 0 0; background: #050608; }
.rsk-cutcard__pic img { width: 100%; height: 100%; object-fit: cover; }
.rsk-cutcard__bar { position: absolute; left: 0; bottom: 0; height: 4px; border-radius: 0 2px 2px 0; background: rgba(255, 255, 255, 0.85); }
.rsk-cutcard.is-selected .rsk-cutcard__bar { background: var(--accent-fg); }
.rsk-cutcard__body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; }
.rsk-cutcard__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.rsk-cutcard__no { font-size: var(--t-15); font-weight: 600; color: var(--fg-1); font-variant-numeric: tabular-nums; }
.rsk-cutcard__len { font-size: var(--t-13); color: var(--fg-2); white-space: nowrap; }
.rsk-cutcard__size { font-size: var(--t-13); line-height: 1.35; color: var(--fg-2); }
.rsk-cutcard__what { font-size: var(--t-14); line-height: 1.45; color: var(--fg-1); }
.rsk-cutcard__text { font-size: var(--t-13); line-height: 1.4; color: var(--fg-3); }
@container (max-width: 760px) {
  .rsk-bd, .rsk-bd--wide-ref { grid-template-columns: minmax(0, 1fr); }
  .rsk-bd__side { position: relative; top: 0; flex-direction: row; align-items: flex-start; }
  .rsk-bd__player { width: 180px; flex: none; }
  .rsk-bd--wide-ref .rsk-bd__player { width: min(320px, 100%); }   /* a landscape video at 180 px wide would be 101 px tall, under its own controls */
  .rsk-modes { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   21. Dialog (the rights confirmation before rebuilding a video shot by shot)
   ========================================================================== */
.rsk-modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: var(--s-4); background: var(--scrim); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: rsk-fade var(--t-med) var(--ease); }
@keyframes rsk-fade { from { opacity: 0; } to { opacity: 1; } }
.rsk-scrim { position: fixed; inset: 0; z-index: 59; background: rgba(5, 6, 8, 0.5); animation: rsk-fade var(--t-med) var(--ease); transition: opacity var(--t-fast) var(--ease); }
.rsk-scrim--light { background: rgba(5, 6, 8, 0.32); }
.rsk-modal__card { display: flex; flex-direction: column; gap: var(--s-4); width: min(540px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: var(--s-6); border-radius: var(--r-20); background: var(--glass-strong); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--rim-top), var(--shadow-float); animation: pop var(--t-med) var(--ease); }
.rsk-modal__title { margin: 0; font-size: var(--t-20); font-weight: 600; line-height: 1.3; color: var(--fg-1); }
.rsk-modal__lead { margin: -4px 0 0; font-size: var(--t-14); line-height: 1.5; color: var(--fg-2); }
.rsk-checks { display: flex; flex-direction: column; }
.rsk-check { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: var(--s-3); align-items: start; padding: var(--s-3) 2px; border-top: 1px solid var(--line-1); cursor: pointer; }
.rsk-check:last-child { border-bottom: 1px solid var(--line-1); }
.rsk-check input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; margin: 0; border-radius: var(--r-6); box-shadow: inset 0 0 0 1.5px var(--line-3); background: transparent; display: grid; place-items: center; cursor: pointer; transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.rsk-check input:checked { background: var(--accent); box-shadow: none; }
.rsk-check input:checked::after { content: ""; width: 10px; height: 6px; margin-top: -3px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.rsk-check input:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.rsk-check span { font-size: var(--t-15); line-height: 1.5; color: var(--fg-1); }
.rsk-modal__note { display: flex; gap: var(--s-2); font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.rsk-modal__note .i { width: 16px; height: 16px; margin-top: 1px; color: var(--fg-3); }
.rsk-modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); }

/* ==========================================================================
   22. Writer model picker: a pill, and a menu where every model sits on the same three scales
   ========================================================================== */
.rsk-picker-pill .rsk-picker-pill__cost { color: var(--fg-3); font-weight: 400; }
.menu.rsk-mmenu { width: 780px; min-width: 0; max-width: calc(100vw - 16px); padding: 6px 6px 8px; max-height: calc(100vh - 16px); overflow-y: auto; scrollbar-width: thin; }
.rsk-mrow { display: grid; grid-template-columns: 20px minmax(200px, 1.3fr) minmax(170px, 1.1fr) minmax(130px, 0.85fr) minmax(150px, 1fr); align-items: center; gap: 8px 12px; width: 100%; min-height: 44px; padding: 6px 10px; border-radius: var(--r-10); text-align: left; color: var(--fg-1); transition: background var(--t-fast) var(--ease); }
button.rsk-mrow:hover, button.rsk-mrow:focus-visible { background: var(--surface-4); outline: none; }
.rsk-mrow[aria-checked="true"] .i--check { color: var(--accent-fg); }
.rsk-mrow--head { min-height: 30px; padding-top: 2px; padding-bottom: 2px; font-size: var(--t-13); color: var(--fg-3); }
.rsk-mrow--head span { font-size: var(--t-13); color: var(--fg-3); }
.rsk-mgroup { display: flex; align-items: baseline; gap: var(--s-2); padding: 12px 10px 4px; font-size: var(--t-14); font-weight: 600; color: var(--fg-1); }
.rsk-mgroup span { font-size: var(--t-13); font-weight: 400; color: var(--fg-3); }
.rsk-mname { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; font-size: var(--t-14); font-weight: 500; }
.rsk-mscale { display: flex; align-items: center; gap: var(--s-2); min-width: 0; font-size: var(--t-13); line-height: 1.35; color: var(--fg-2); }
.rsk-mscale.is-untested { color: var(--fg-3); }
/* fix round 1: the models we have not tested wait under one fold */
.rsk-mmore { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: 40px; margin-top: 4px; padding: 6px 10px; border-radius: var(--r-10); color: var(--fg-2); font-size: var(--t-14); font-weight: 500; text-align: left; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.rsk-mmore:hover, .rsk-mmore:focus-visible { background: var(--surface-4); color: var(--fg-1); outline: none; }
.rsk-mmore .i--chev { width: 16px; height: 16px; transform: rotate(-90deg); transition: transform var(--t-fast) var(--ease); }
.rsk-mmore[aria-expanded="true"] .i--chev { transform: none; }
.rsk-mmore__n { font: 500 var(--t-13)/1 var(--font-mono); color: var(--fg-3); }
.rsk-mmenu__foot { margin: 8px 10px 2px; padding-top: 8px; border-top: 1px solid var(--line-1); font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
@media (max-width: 720px) {
  .rsk-mrow { grid-template-columns: 20px minmax(0, 1fr); }
  .rsk-mrow .rsk-mscale { grid-column: 2; }
  .rsk-mrow--head { display: none; }
}

/* ==========================================================================
   23. Library: characters, uploads, clips, video types
   ========================================================================== */
.rsk-lib { display: flex; flex-direction: column; gap: var(--s-5); }
.rsk-lib__bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.rsk-lib__hint { display: flex; align-items: center; gap: 6px; font-size: var(--t-14); color: var(--fg-3); }
.rsk-lib__hint .mono { color: var(--fg-1); }
/* at most six across (four for wide clips), so on a 3072 px screen the cards grow instead of leaving half the row empty */
.rsk-lib__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(208px, calc((100% - 5 * var(--s-4)) / 6)), 1fr)); gap: var(--s-4); align-items: stretch; }
.rsk-lib__grid--wide { grid-template-columns: repeat(auto-fill, minmax(max(280px, calc((100% - 3 * var(--s-4)) / 4)), 1fr)); }
.rsk-libcard { display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-14); background: var(--glass-card); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: var(--shadow-card); }
.rsk-libcard__pic { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-14) var(--r-14) 0 0; background: #17191E; }
.rsk-libcard__pic--wide { aspect-ratio: 16 / 9; }
.rsk-libcard__pic img, .rsk-libcard__pic video { width: 100%; height: 100%; object-fit: cover; }
.rsk-libcard__pic--fit img, .rsk-libcard__pic--fit video { object-fit: contain; background: #050608; }
.rsk-libcard__play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; color: #fff; cursor: pointer; }
.rsk-libcard__play .rsk-libcard__playicon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: rgba(8, 9, 12, 0.72); transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.rsk-libcard__play:hover .rsk-libcard__playicon { transform: scale(1.06); background: rgba(8, 9, 12, 0.9); }
.rsk-libcard__shot { position: absolute; left: 14px; bottom: 14px; z-index: 1; font: 600 var(--t-32)/1 var(--font-sans); color: #fff; letter-spacing: -0.02em; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6); }
.rsk-libcard__dur { position: absolute; right: 10px; bottom: 10px; z-index: 1; display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: var(--r-full); background: rgba(8, 9, 12, 0.78); color: #fff; font-size: var(--t-13); }
.rsk-libcard__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.rsk-libcard__body > .rsk-libcard__used:last-child { margin-top: auto; }
.rsk-libcard__name { margin: 0; font-size: var(--t-15); font-weight: 600; line-height: 1.35; color: var(--fg-1); overflow-wrap: anywhere; }
.rsk-libcard__kind { display: flex; align-items: flex-start; gap: 6px; font-size: var(--t-13); line-height: 1.45; color: var(--fg-2); }
.rsk-libcard__kind .i { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--fg-3); }
.rsk-libcard__kind > span { min-width: 0; overflow-wrap: anywhere; }
.rsk-libcard__used { font-size: var(--t-13); line-height: 1.45; color: var(--fg-3); }
.rsk-libcard__used button { min-height: 24px; color: var(--fg-2); text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.rsk-libcard__used button:hover { color: var(--fg-1); }
.rsk-libcard__text { font-size: var(--t-14); line-height: 1.5; color: var(--fg-2); }
.rsk-libcard--type { padding: 0; }
.rsk-libcard--type .rsk-libcard__body { gap: var(--s-2); padding: var(--s-4) var(--s-4) var(--s-4); }

/* ==========================================================================
   24. Models and accounts page
   ========================================================================== */
/* a settings page: one readable column, so a row of the models table is not spread across a 3072 px screen */
.rsk-accounts { display: flex; flex-direction: column; gap: var(--s-8); max-width: 1280px; }
.rsk-accounts__note { display: flex; gap: var(--s-3); padding: var(--s-4) var(--s-4) var(--s-4) var(--s-4); border-radius: var(--r-14); background: var(--accent-wash); box-shadow: inset 0 0 0 1px rgba(110, 160, 255, 0.3); color: var(--fg-1); font-size: var(--t-14); line-height: 1.5; }
.rsk-accounts__note .i { margin-top: 2px; color: var(--accent-fg); }
.rsk-accounts__note p + p { margin-top: 4px; }
.rsk-accounts__sec { display: flex; flex-direction: column; gap: var(--s-3); }
.rsk-mtable { display: flex; flex-direction: column; padding: 6px; border-radius: var(--r-20); background: var(--glass); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--rim-top), var(--shadow-card); position: relative; }
.rsk-mtable .rsk-mmenu__foot { margin-bottom: 8px; }
.rsk-mtable .rsk-mrow { grid-template-columns: 24px minmax(170px, 1.2fr) minmax(170px, 1.1fr) minmax(150px, 1fr) minmax(150px, 1fr); }
.rsk-radio { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-3); display: grid; place-items: center; }
[aria-checked="true"] > .rsk-radio { box-shadow: inset 0 0 0 1.5px var(--accent-fg); }
[aria-checked="true"] > .rsk-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-fg); }
.rsk-acc__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s-4); }
.rsk-acc { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); border-radius: var(--r-20); background: var(--glass-card); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: var(--shadow-card); }
.rsk-acc__top { display: flex; align-items: center; gap: var(--s-3); }
.rsk-acc__logo { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--r-10); background: var(--surface-3); color: var(--fg-1); }
.rsk-acc__name { font-size: var(--t-17); font-weight: 600; color: var(--fg-1); }
.rsk-acc__status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-13); color: var(--fg-2); }
.rsk-acc__text { font-size: var(--t-14); line-height: 1.5; color: var(--fg-2); }
.rsk-acc__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: auto; }

/* ==========================================================================
   25. Shots board: the pilot's Create screen as one component (layout 4 with layout 3's lighter cards)
   ========================================================================== */
.rsk-shots { --insp-w: 400px; --rsk-dock-h: 120px; }
.rsk-shots__grid { display: grid; grid-template-columns: minmax(0, 1fr) var(--insp-w); grid-template-areas: "brief brief" "dock dock" "board insp"; gap: var(--s-4) var(--s-6); }
.rsk-shots__brief { grid-area: brief; min-width: 0; }
.rsk-shots__brief > .composer { --ref-size: 120px; }
.rsk-shots__dock { grid-area: dock; position: sticky; top: var(--rsk-top); z-index: 6; }
.rsk-shots__board { grid-area: board; min-width: 0; display: flex; flex-direction: column; gap: var(--s-6); padding-bottom: var(--s-8); }
.rsk-shots__board .shotgrid { --card-min: 220px; }
.rsk-shots__insp { grid-area: insp; align-self: start; position: sticky; top: calc(var(--rsk-top) + var(--rsk-dock-h) + 12px); min-height: 420px; }
.rsk-shots__insp .detail { --cast-min: 104px; }
.rsk-shots.is-inline .rsk-shots__grid, .rsk-shots.is-empty .rsk-shots__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "brief" "dock" "board"; }
.rsk-shots.is-inline .rsk-shots__insp, .rsk-shots.is-empty .rsk-shots__insp { display: none; }
@container (min-width: 1240px) { .rsk-shots__grid { --insp-w: 420px; } }
@container (min-width: 1500px) { .rsk-shots__grid { --insp-w: 460px; } .rsk-shots__board .shotgrid { --card-min: 240px; } }
@container (min-width: 2200px) {
  .rsk-shots__grid { --insp-w: 1040px; }
  .rsk-shots__board .shotgrid { --card-min: 280px; }
  .rsk-shots__insp .detail__scroll { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) minmax(220px, 280px); grid-template-areas: "info prompt cast" "nbrs prompt cast"; grid-template-rows: auto 1fr; }
  .rsk-shots__insp .castlist { --cast-min: 220px; grid-template-columns: minmax(0, 1fr); }
  .rsk-shots__insp .castcard { max-width: none; }
}
/* tall screens: whole four-view sheets in the panel, after the prompt */
@media (min-height: 1400px) {
  .rsk-shots__insp .castlist { --cast-min: 170px; }
  .rsk-shots__insp .castlist:has(.castcard:only-child) { grid-template-columns: minmax(0, 1fr); }
  .rsk-shots__insp .castcard { max-width: none; }
  .rsk-shots__insp .castcard__img { aspect-ratio: auto; }
  .rsk-shots__insp .castcard__img img { height: auto; object-view-box: none !important; }
}
/* the panel's order: the shot and its action, then the prompt, then camera, sound and length, then who is in it */
.rsk-shots .detail__scroll { grid-template-areas: "info" "prompt" "facts" "cast" "nbrs"; }
.rsk-shots .detail__facts { grid-area: facts; }
.rsk-shots .detail--inline { grid-template-areas: "info prompt" "facts prompt" "cast prompt"; grid-template-rows: auto auto 1fr; }
@container (max-width: 860px) { .rsk-shots .detail--inline { grid-template-areas: "info" "prompt" "facts" "cast"; grid-template-rows: auto; } }
@container (min-width: 2200px) { .rsk-shots__insp .detail__scroll { grid-template-areas: "info prompt cast" "facts prompt cast" "nbrs prompt cast"; grid-template-rows: auto auto 1fr; } }
/* one less box: the prompt sits on the panel with a rule on its left, not in a box of its own */
.rsk-shots .prompt__box { padding: 2px 0 2px var(--s-4); background: none; border: 0; border-left: 2px solid var(--line-2); border-radius: 0; }
.rsk-shots .detail__panel-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: 8px 8px 8px 12px; border-radius: var(--r-10); background: var(--accent-wash); color: var(--fg-1); font-size: var(--t-13); }
.rsk-shots .detail__panel-note .i { width: 16px; height: 16px; color: var(--accent-fg); }
.rsk-shots .detail__panel-note span { flex: 1 1 auto; min-width: 0; }
.rsk-shots .detail__oneline { font-size: var(--t-14); line-height: 1.45; color: var(--fg-2); }
.rsk-shots .detail__oneline .mono { color: var(--fg-1); }
.rsk-shots .detail__foot .prompt__actions { flex-wrap: nowrap; }
.rsk-rewrite-btn { min-width: 188px; justify-content: flex-start; }
.rsk-rewrite-btn .grow { flex: 1 1 auto; }
/* shot cards: picture first; the few shots with none of your images show what is in them as an icon */
.shot__pic .shot__nopic { gap: 8px; padding: 0 12px 26px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 10px, transparent 10px 20px), #1B1D23; color: var(--fg-2); font-size: var(--t-13); text-align: center; }
.shot__pic .shot__nopic .i { width: 28px; height: 28px; color: var(--fg-2); }
.shot__pic.is-nopic::after { display: none; }
.shot__pic.is-nopic .shot__big { text-shadow: none; }
.shot__pic .shot__clip { position: absolute; top: 10px; left: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px 0 7px; border-radius: var(--r-full); background: rgba(8, 9, 12, 0.78); color: #fff; font-size: var(--t-13); }
.shot__pic .shot__clip .i { width: 14px; height: 14px; color: var(--success); }
.shot__mark { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; max-width: 100%; min-height: 28px; padding: 4px 10px 4px 8px; border-radius: 14px; background: var(--accent-wash); color: var(--fg-1); font-size: var(--t-13); line-height: 1.4; }
.shot__mark .i { flex: none; }
.shot__mark .i { width: 14px; height: 14px; color: var(--accent-fg); }
.rsk-shots .shot.is-hidden { display: none; }
.rsk-shots .part.is-empty-filter { opacity: 0.5; }
.rsk-shots .partsec.is-hidden { display: none; }
/* the filter by image stays pinned under the cut strip while you scroll, with its count and "Show only these" */
.rsk-shots .filterbar { position: sticky; top: calc(var(--rsk-top) + var(--rsk-dock-h) + 8px); z-index: 4; flex-wrap: wrap; background: #1A2233; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.rsk-shots .filterbar__only { display: inline-flex; align-items: center; gap: var(--s-2); height: var(--h-32); padding: 0 4px 0 10px; border-radius: var(--r-full); font-size: var(--t-13); color: var(--fg-1); cursor: pointer; }
.rsk-shots .filterbar__only:hover { background: rgba(255, 255, 255, 0.06); }
.rsk-shots .filterbar__only .switch { width: 36px; height: 22px; }
.rsk-shots .filterbar__only .switch::after { width: 16px; height: 16px; }
.rsk-shots .filterbar__only .switch[aria-checked="true"]::after { transform: translateX(14px); }
.rsk-shots .part__who { display: flex; flex-wrap: wrap; gap: 6px; }
.rsk-shots .part__who .prop { cursor: default; }
.rsk-shots .part__title { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s-3); }
.rsk-shots .part__name { font-size: var(--t-17); font-weight: 600; line-height: 1.35; color: var(--fg-1); }
.rsk-shots .shothead__by { font-size: var(--t-13); color: var(--fg-3); }
.rsk-shots .briefbar__text { flex: 1 1 160px; min-width: 120px; white-space: nowrap; overflow: hidden; }
/* row 1: pictures, the brief on one line, Edit brief and Rewrite all; row 2: the settings as controls (as in the pilot) */
.rsk-shots .ref__state .i { width: 12px; height: 12px; }
.rsk-shots .composer__notice[hidden] { display: flex !important; visibility: hidden; }
.rsk-shots .briefbar__actions .btn { min-width: 0; }
@container (max-width: 1000px) { .rsk-shots .briefbar__chips { order: 4; } }
