/* Brawl Studio — "arcade locker": ink base, Lilita One for numbers that matter, semantic colour only. */
@font-face { font-family: "Lilita One"; src: url("/fonts/LilitaOne-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  color-scheme: dark;
  --ink-0: #0a0d16; --ink-1: #121827; --ink-2: #182033; --ink-3: #232c44;
  --line: #ffffff12; --line-2: #ffffff22;
  --text: #f3f5fb; --text-2: #bac3d4; --text-3: #8592aa; --text-4: #5b6880;
  --lime: #c5ff62; --lime-deep: #7aa82a; --lime-ink: #14200a;
  --gold: #ffd23f; --gold-deep: #b48700; --gold-ink: #261b00;
  --coral: #ff5c6c; --coral-deep: #a92a3a; --coral-ink: #2a0007;
  --sky: #5cc8ff; --violet: #b29cff;
  --font-display: "Lilita One", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r-poster: 12px; --r-card: 18px; --r-sheet: 28px; --r-btn: 14px;
  --ease-out: cubic-bezier(.16, 1, .3, 1); --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 140ms; --nav-h: 66px;
  --bottom-safe: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink-0); }
body {
  margin: 0; min-height: 100dvh; color: var(--text); background: var(--ink-0);
  font: 15px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 420px at 85% -8%, #b29cff1c, transparent 62%), radial-gradient(800px 380px at -10% -5%, #c5ff6214, transparent 60%); }
body::after { content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
[hidden] { display: none !important; }
a { color: var(--sky); }
p { text-wrap: pretty; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
::selection { background: #c5ff6255; }
.offscreen { position: fixed; left: -9999px; top: 0; width: 2px; height: 2px; opacity: 0; }

/* ---------- type ---------- */
.kicker { margin: 0 0 6px; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.page-title, .login-title, .sheet-title, .block-head h2, .block-title, .review-title, .listen-title, .game-name {
  font-family: var(--font-display); font-weight: 400; letter-spacing: .005em; }
.page-title { margin: 0; font-size: clamp(42px, 11vw, 66px); line-height: .9; text-shadow: 0 4px 0 #000; }
.page-sub { margin: 8px 0 14px; max-width: 62ch; color: var(--text-2); font-size: 14px; }
.hint { margin: 8px 0; font-size: 12.5px; line-height: 1.6; color: var(--text-3); }
.muted { color: var(--text-3); }
.optional { font-weight: 500; font-size: 12px; color: var(--text-4); }
.readable { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13px; line-height: 1.75; color: var(--text-2); margin: 8px 0; }

/* ---------- buttons ---------- */
.btn { appearance: none; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 16px;
  border-radius: var(--r-btn); font: inherit; font-size: 14px; font-weight: 750; color: var(--text); background: var(--ink-3); cursor: pointer;
  text-decoration: none; user-select: none; -webkit-user-select: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), background-color var(--dur-fast), color var(--dur-fast); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-key { background: var(--lime); color: var(--lime-ink); font-family: var(--font-display); font-weight: 400; font-size: 17px; letter-spacing: .01em;
  box-shadow: 0 4px 0 var(--lime-deep), 0 12px 26px #c5ff621f; }
.btn-key:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--lime-deep); }
.btn-key .i { stroke-width: 2.6; }
.btn-gold { background: var(--gold); color: var(--gold-ink); font-family: var(--font-display); font-weight: 400; font-size: 16px; box-shadow: 0 4px 0 var(--gold-deep); }
.btn-gold:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-deep); }
.btn-danger { background: var(--coral); color: var(--coral-ink); box-shadow: 0 4px 0 var(--coral-deep); }
.btn-soft { background: #ffffff0d; border: 1px solid var(--line); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-sm { min-height: 38px; padding: 8px 12px; font-size: 13px; border-radius: 12px; }
.btn-key.btn-sm, .btn-gold.btn-sm { font-size: 15px; }
.btn-wide { width: 100%; }
.btn.is-done { background: #c5ff6220; color: var(--lime); }
.btn-icon { appearance: none; border: 0; width: 42px; height: 42px; flex: none; display: inline-grid; place-items: center; border-radius: 50%;
  background: #ffffff0a; color: var(--text-2); cursor: pointer; transition: background-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast); }
.btn-icon:active { transform: scale(.92); }
.btn-icon:disabled { opacity: .3; cursor: default; }
@media (hover: hover) {
  .btn-soft:hover { background: #ffffff17; } .btn-ghost:hover { background: #ffffff0b; color: var(--text); }
  .btn-icon:hover:not(:disabled) { background: #ffffff17; color: var(--text); }
  .btn-quiet-danger:hover { color: var(--coral); }
  .btn-key:hover { filter: brightness(1.05); }
}

/* ---------- form controls ---------- */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ink-0);
  color: var(--text); font: inherit; font-size: 16px; transition: border-color var(--dur-fast); }
input:focus, select:focus, textarea:focus { border-color: #5cc8ff88; }
textarea { resize: vertical; }
select { appearance: none; padding-right: 34px; background-repeat: no-repeat; background-position: right 12px center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238592aa' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); }
input[type=checkbox] { width: 20px; height: 20px; flex: none; accent-color: var(--lime); margin: 2px 0 0; }
input[type=range] { width: 100%; accent-color: var(--lime); }
input[type=file] { font: inherit; font-size: 13px; color: var(--text-2); }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; margin-right: 10px; border: 1px solid var(--line-2); background: var(--ink-3); color: var(--text); border-radius: 10px; padding: 8px 12px; }
.field { display: grid; gap: 7px; margin: 0 0 14px; font-size: 13px; font-weight: 650; color: var(--text-2); }
.field-label { display: block; font-size: 13px; font-weight: 650; color: var(--text-2); margin-bottom: 7px; }
.brief-grid { display: grid; gap: 0 12px; }
@media (min-width: 640px) { .brief-grid { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 12px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check.is-strong { padding: 12px; border-radius: 12px; border: 1px solid #ffd23f44; background: #ffd23f0b; color: var(--text); }
.inline-form { display: flex; gap: 8px; align-items: stretch; }
.inline-form input { flex: 1; min-width: 0; }
.inline-form select { width: auto; }
.inline-form button { flex: none; }
.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.time-pair input { font-family: var(--font-mono); }
.range-value { font-family: var(--font-mono); color: var(--lime); margin-left: 4px; }

/* ---------- segmented, chips, stamps ---------- */
.seg { display: flex; gap: 3px; padding: 4px; border-radius: 14px; background: var(--ink-1); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg-item { position: relative; flex: 1 0 auto; }
.seg-item input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg-item span { display: block; padding: 9px 12px; border-radius: 10px; text-align: center; white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--text-3); transition: background-color var(--dur-fast), color var(--dur-fast); }
.seg-item input:checked + span { background: var(--ink-3); color: var(--text); box-shadow: inset 0 1px 0 #ffffff14, 0 2px 6px #0006; }
.seg-item input:focus-visible + span { outline: 2px solid var(--sky); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line-2);
  background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 650; text-decoration: none; cursor: pointer; transition: border-color var(--dur-fast), color var(--dur-fast), background-color var(--dur-fast); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip .i { width: 15px; height: 15px; }
.chip small { color: var(--text-4); font-weight: 700; }
.chip.is-on, .chip[aria-pressed=true], .chip:has(input:checked) { border-color: var(--lime); color: var(--lime); background: #c5ff6210; }
.chip:has(input:focus-visible) { outline: 2px solid var(--sky); }
.chip-form { display: inline-flex; gap: 6px; align-items: center; }
.chip-form input { min-height: 36px !important; padding: 6px 12px !important; border-radius: 999px !important; width: 150px !important; font-size: 14px !important; }
.chip-select { position: relative; flex: none; display: inline-flex; align-items: center; gap: 2px; padding-left: 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.chip-select select { width: auto; min-height: 36px; border: 0; background-color: transparent; padding: 6px 30px 6px 6px; font-size: 13.5px; text-transform: none; letter-spacing: 0; font-weight: 650; }
.chip-select.is-on { border-color: var(--lime); color: var(--lime); background: #c5ff620d; }
.stamp { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; background: #ffffff12; color: var(--text-2); font-size: 10.5px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; }
.stamp-lime { background: #c5ff621c; color: var(--lime); }
.stamp-coral { background: #ff5c6c1f; color: var(--coral); }
.stamps { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- login ---------- */
.login { min-height: 100dvh; max-width: 540px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) 24px 40px; display: flex; flex-direction: column; justify-content: center; }
.login .kicker { margin-top: 44px; }
.login-title { margin: 14px 0 18px; font-size: clamp(66px, 20vw, 108px); line-height: .86; text-shadow: 0 6px 0 #000; }
.login-title span { display: inline-block; color: var(--lime); transform: rotate(-3deg); transform-origin: left bottom; }
.login-intro { margin: 0; max-width: 34ch; font-size: 17px; line-height: 1.6; color: var(--text-2); }
.login-form { display: grid; gap: 10px; margin-top: 26px; }
.login-form label { font-size: 13px; font-weight: 650; color: var(--text-2); }

/* ---------- shell ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-size: 12px; font-weight: 850; letter-spacing: .18em; }
.brand img { border-radius: 9px; }
.app { min-height: 100dvh; padding-bottom: calc(var(--nav-h) + 34px + var(--bottom-safe)); }
body.has-player .app { padding-bottom: calc(var(--nav-h) + 110px + var(--bottom-safe)); }
body.has-tray .app { padding-bottom: calc(var(--nav-h) + 150px + var(--bottom-safe)); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 12px; background: #0a0d16e8; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid #ffffff08; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.private-tag { padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text-3); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.views { max-width: 1180px; margin: 0 auto; padding: 4px 16px 32px; }
.tabbar { position: fixed; z-index: 40; left: 50%; bottom: calc(10px + var(--bottom-safe)); transform: translateX(-50%); width: min(500px, calc(100% - 16px));
  display: flex; gap: 2px; padding: 6px; border-radius: 24px; border: 1px solid var(--line-2); background: #121827dc;
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 14px 40px #000a; }
.tabbar a { flex: 1; min-width: 0; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 18px;
  color: var(--text-3); font-size: 10.5px; font-weight: 750; text-decoration: none; transition: color var(--dur-fast), background-color var(--dur-fast); }
.tabbar a .i { width: 22px; height: 22px; }
.tabbar a[aria-current=page] { background: var(--lime); color: var(--lime-ink); box-shadow: 0 3px 0 var(--lime-deep); }
.tabbar a[aria-current=page] .i { stroke-width: 2.4; }
@media (hover: hover) { .tabbar a:not([aria-current]):hover { color: var(--text); background: #ffffff0a; } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 18px; margin: 10px 0 18px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: var(--text-3); text-decoration: none; font-size: 13px; font-weight: 750; }
.block { margin: 34px 0; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
.block-head h2, .block-title { margin: 0; font-size: 25px; display: flex; align-items: center; gap: 8px; }
.block-title { margin: 26px 0 12px; }
.block-note { font-size: 12px; color: var(--text-3); }
.link-more { font-size: 13px; font-weight: 750; color: var(--violet); text-decoration: none; }
.empty { display: grid; justify-items: center; gap: 12px; padding: 28px 18px; border-radius: 18px; border: 1px dashed var(--line-2); text-align: center; color: var(--text-3); font-size: 14px; }
.empty p { margin: 0; max-width: 46ch; }
.skeletons { display: grid; gap: 10px; }
.skeleton { height: 84px; border-radius: 16px; background: linear-gradient(90deg, var(--ink-1), var(--ink-2), var(--ink-1)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.grid-skeleton { grid-template-columns: repeat(2, 1fr); }
.grid-skeleton .skeleton { height: auto; aspect-ratio: 16 / 11; }
@media (min-width: 700px) { .grid-skeleton { grid-template-columns: repeat(3, 1fr); } }
.notice { position: fixed; z-index: 90; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); width: min(560px, calc(100% - 20px)); margin: 0;
  padding: 12px 40px 12px 14px; border-radius: 14px; border: 1px solid #ffd23f55; background: #2a2313f5; color: #ffe8a3; font-size: 13.5px; line-height: 1.5; box-shadow: 0 14px 40px #000a; cursor: pointer; }
.notice::after { content: "×"; position: absolute; right: 14px; top: 9px; font-size: 20px; color: #ffe8a399; }
.notice:empty { display: none; }

/* ---------- studio layout: one column on phones (upload → queue → stories → shelf → recordings), control room on wide screens ---------- */
#view-studio { display: flex; flex-direction: column; }
.studio-side, .studio-main { display: contents; }
#view-studio .block { margin: 30px 0 0; }
#drop { order: 1; } #works-block { order: 2; } #stories-block { order: 3; } #shelf-block { order: 4; } #recordings-block { order: 5; } .howto { order: 6; }
@media (min-width: 1200px) {
  #view-studio { display: grid; grid-template-columns: minmax(380px, 440px) minmax(0, 1fr); column-gap: 32px; align-items: start; }
  #view-studio > .page-head, #studio-ledger, #studio-nudge { grid-column: 1 / -1; }
  .studio-side { display: block; grid-column: 1; }
  .studio-main { display: block; grid-column: 2; min-width: 0; }
  .studio-main > .block:first-child, .studio-main > .block[hidden] + .block { margin-top: 0; }
  .studio-side .format-pick { grid-template-columns: 1fr; }
  .studio-main .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-main .story-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- studio: drop zone ---------- */
.card { border-radius: var(--r-sheet); border: 1px solid var(--line); background: linear-gradient(180deg, var(--ink-2), var(--ink-1)); box-shadow: inset 0 1px 0 #ffffff0d, 0 22px 50px #0006; }
.drop { position: relative; padding: 16px; margin-bottom: 8px; }
.drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; clip-path: inset(50%); }
.drop-zone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 12px 24px; border-radius: 20px; border: 1.5px dashed #ffffff2e; text-align: center; cursor: pointer;
  background: radial-gradient(70% 90% at 50% 0%, #c5ff6212, transparent 70%); transition: border-color .2s, background-color .2s; }
.drop-zone.is-over, .drop-zone:hover { border-color: var(--lime); background-color: #c5ff620b; }
.drop-zone:has(+ input:focus-visible) { outline: 3px solid var(--sky); outline-offset: 3px; }
.drop-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; background: var(--lime); color: var(--lime-ink); box-shadow: 0 4px 0 var(--lime-deep); transform: rotate(-5deg); margin-bottom: 6px; transition: transform .3s var(--ease-spring); }
.drop-zone:hover .drop-icon, .drop-zone.is-over .drop-icon { transform: rotate(0) translateY(-3px); }
.drop-icon .i { width: 28px; height: 28px; stroke-width: 2.6; }
.drop-zone strong { font-family: var(--font-display); font-weight: 400; font-size: 25px; }
.drop-sub { font-size: 12px; color: var(--text-3); }
.drop-selected { margin: 12px 0; text-align: center; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.upload-list { list-style: none; display: grid; gap: 6px; margin: 0 0 12px; padding: 0; }
.upload-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px; padding: 10px 12px; border-radius: 12px; background: var(--ink-0); font-size: 13px; }
.up-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.up-status { font-size: 10.5px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); text-align: right; }
.up-detail { grid-column: 1 / -1; font-size: 12px; color: var(--text-3); overflow-wrap: anywhere; }
.up-bar { grid-column: 1 / -1; width: 100%; height: 5px; appearance: none; border: 0; border-radius: 6px; background: #2b3650; overflow: hidden; }
.up-bar::-webkit-progress-bar { background: #2b3650; } .up-bar::-webkit-progress-value { background: var(--sky); } .up-bar::-moz-progress-bar { background: var(--sky); }
.up-action { justify-self: start; appearance: none; border: 1px solid var(--line-2); background: transparent; color: var(--text-2); border-radius: 10px; min-height: 36px; padding: 6px 12px; font: inherit; font-size: 12.5px; font-weight: 750; cursor: pointer; }
.up-row .up-action + .up-action { grid-column: 2; justify-self: end; }
@media (pointer: coarse) { .up-action { min-height: 44px; } }
span.up-queued { color: var(--lime); } span.up-uploading, span.up-checking, span.up-verifying, span.up-finishing { color: var(--sky); }
span.up-paused { color: var(--gold); } span.up-failed { color: var(--coral); } span.up-skipped { color: var(--text-3); }
li.up-failed { box-shadow: inset 3px 0 0 var(--coral); } li.up-queued { box-shadow: inset 3px 0 0 var(--lime); } li.up-uploading { box-shadow: inset 3px 0 0 var(--sky); }
.format-pick { display: grid; gap: 10px; margin: 16px 0 6px; padding: 0; border: 0; }
.format-pick legend { padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 750; color: var(--text-2); }
.format-card { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 3px 12px; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--line-2); background: var(--ink-1); cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.format-card input { position: absolute; opacity: 0; }
.format-card:has(input:checked) { border-color: var(--lime); background: #c5ff620a; box-shadow: 0 0 0 4px #c5ff6212; }
.format-card:has(input:focus-visible) { outline: 2px solid var(--sky); outline-offset: 2px; }
.format-card:has(input:disabled) { opacity: .6; cursor: default; }
.format-name { font-size: 15px; font-weight: 800; }
.format-card:has(input:checked) .format-name { color: var(--lime); }
.format-desc { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.5; color: var(--text-3); }
.format-card .stamp { grid-row: 1; grid-column: 2; align-self: start; }
@media (min-width: 760px) { .format-pick { grid-template-columns: 1.15fr 1fr .85fr; } }
#other-format-field { margin-top: 10px; }
.brief { margin: 4px 0 14px; padding: 2px 14px; border-radius: 16px; border: 1px solid var(--line); }
.brief summary, .howto summary, .brief-box summary, .shelf-files summary, .posted > summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 750; color: var(--text-2); list-style: none; }
summary::-webkit-details-marker { display: none; }
.upload-progress progress { width: 100%; height: 8px; margin-top: 16px; appearance: none; border: 0; border-radius: 10px; background: #2b3650; overflow: hidden; }
.upload-progress progress::-webkit-progress-bar { background: #2b3650; border-radius: 10px; }
.upload-progress progress::-webkit-progress-value { background: var(--lime); border-radius: 10px; }
.upload-progress progress::-moz-progress-bar { background: var(--lime); }
#progress-label { font-size: 13px; color: var(--lime); overflow-wrap: anywhere; }
#upload { margin-top: 6px; }
.drop-foot { margin: 14px 2px 0; }
.howto { margin: 40px 0 8px; padding: 6px 16px; border-radius: 18px; border: 1px solid var(--line); color: var(--text-3); font-size: 13px; line-height: 1.7; }

/* ---------- studio: ledger, nudge, works ---------- */
.ledger { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0 0 16px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
.ledger-item { display: flex; flex-direction: column; padding: 10px 14px 12px; background: var(--ink-1); color: var(--text-3); text-decoration: none; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ledger-item strong { font-family: var(--font-display); font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: 0; color: var(--text); }
a.ledger-item:hover strong { color: var(--lime); }
@media (min-width: 720px) { .ledger { grid-template-columns: repeat(6, 1fr); } }
.nudge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; margin: 0 0 18px; border-radius: 20px;
  border: 1px solid #b29cff44; background: linear-gradient(115deg, #b29cff24, #c5ff6210); }
.nudge strong { font-size: 16px; } .nudge p { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.work-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--ink-1); }
.work-row strong { font-size: 14px; overflow-wrap: anywhere; }
.work-row p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); }
.breath { display: inline-block; width: 10px; height: 10px; flex: none; margin-top: 6px; border-radius: 50%; background: var(--sky); animation: breath 2.6s ease-in-out infinite; }
.work-row[data-status=paused] .breath, .work-row[data-status=uploading] .breath { background: var(--gold); animation: none; }
.work-row[data-status=queued] .breath { background: var(--text-3); animation-duration: 4s; }

/* ---------- shelf ---------- */
.shelf { display: grid; gap: 16px; }
@media (min-width: 720px) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shelf > .empty { grid-column: 1 / -1; }
.shelf-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; border: 1px solid var(--line); background: var(--ink-1); box-shadow: 0 18px 40px #0005; }
.shelf-card.is-new { border-color: #c5ff6250; }
.shelf-card.is-paused { border-color: #ff5c6c44; }
.shelf-poster { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #05070c; }
.shelf-poster img, .shelf-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shelf-video { object-fit: contain; background: #000; }
.shelf-stamp { position: absolute; left: 10px; top: 10px; background: #0a0d16d0; color: var(--text); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.shelf-poster[data-format=short] .shelf-stamp { color: var(--lime); } .shelf-poster[data-format=native] .shelf-stamp { color: var(--sky); } .shelf-poster[data-format=episode] .shelf-stamp { color: var(--gold); }
.shelf-dur, .clip-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; background: #000b; font: 600 12px var(--font-mono); }
.new-tag { position: absolute; right: 10px; top: 10px; padding: 1px 9px; border-radius: 8px; background: var(--lime); color: var(--lime-ink); font-family: var(--font-display); font-size: 14px; transform: rotate(5deg); box-shadow: 0 3px 0 var(--lime-deep); transition: opacity .6s, transform .6s; }
.shelf-card.is-seen .new-tag { opacity: 0; transform: rotate(5deg) scale(.6); }
.shelf-play { position: absolute; inset: 0; margin: auto; width: 66px; height: 66px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: #0a0d16b8; color: #fff; box-shadow: 0 0 0 2px #ffffff30; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .2s var(--ease-spring), background-color .15s, color .15s; }
.shelf-play .i, .track-play .i, .np-toggle .i, .mini-play .i { fill: currentColor; }
.shelf-play .i { width: 28px; height: 28px; }
.shelf-play:hover { background: var(--lime); color: var(--lime-ink); transform: scale(1.06); }
.preview-note { position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 6px; background: #000b; font-size: 11px; font-weight: 700; color: var(--text-2); pointer-events: none; }
.shelf-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.shelf-body > .stamp { align-self: flex-start; }
.shelf-title { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.shelf-meta { margin: 0; font-size: 12.5px; color: var(--text-3); }
.shelf-why { margin: 0; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.shelf-story { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--gold); font-size: 13px; font-weight: 750; }
.shelf-actions { display: grid; gap: 8px; margin-top: 6px; }
.btn-download { justify-content: flex-start; }
.btn-download small { margin-left: auto; font-family: var(--font-ui); font-size: 12px; font-weight: 800; opacity: .7; }
.shelf-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.thumbs { display: flex; gap: 6px; }
.thumb[aria-pressed=true][data-rating="1"] { background: #c5ff6222; color: var(--lime); }
.thumb[aria-pressed=true][data-rating="-1"] { background: #ff5c6c22; color: var(--coral); }
.shelf-foot [aria-pressed=true] { color: var(--lime); }
.shelf-files { font-size: 12.5px; color: var(--text-3); }
.shelf-files ul { margin: 0; padding-left: 18px; }
.posted { grid-column: 1 / -1; margin-top: 8px; }
.posted > summary { color: var(--text-3); }

/* ---------- stories ---------- */
.story-rail { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 340px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
.story-rail::-webkit-scrollbar { display: none; }
.story-rail > * { scroll-snap-align: start; }
.story-grid { display: grid; gap: 14px; margin-bottom: 8px; }
@media (min-width: 760px) { .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.story-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; overflow: hidden; border-radius: 22px; border: 1px solid var(--line); background: var(--ink-1); }
.story-card.is-push { border-color: #ffd23f4d; background: radial-gradient(120% 90% at 100% 0%, #ffd23f22, transparent 60%), var(--ink-1); }
.story-head { display: flex; align-items: flex-end; gap: 10px; min-height: 30px; }
.story-delta { font-family: var(--font-display); font-size: 58px; line-height: .86; color: var(--gold); text-shadow: 0 4px 0 #5e4300; }
.story-unit { display: inline-flex; align-items: center; gap: 5px; padding-bottom: 6px; color: var(--gold); font-size: 11.5px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.story-unit .i { width: 16px; height: 16px; }
.story-record { font-family: var(--font-display); font-size: 22px; color: var(--text-2); }
.story-title { margin: 0; font-size: 16px; font-weight: 800; }
.story-facts, .story-reason { margin: 0; font-size: 12.5px; color: var(--text-3); }
.story-proof { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: 12.5px; color: var(--lime); }
.story-proof .i { width: 16px; height: 16px; margin-top: 1px; }
.story-proof.is-plain { color: var(--text-3); }
.story-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.trophy-line { width: 100%; height: 56px; overflow: visible; }
.tl-line { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.tl-area { fill: #ffd23f17; }
.tl-win { fill: var(--lime); } .tl-loss { fill: var(--coral); } .tl-other { fill: var(--text-3); }
.beads { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0; padding: 0; list-style: none; }
.bead { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--text-4); }
.bead[data-result=win] { background: var(--lime); box-shadow: 0 0 10px #c5ff6250; }
.bead[data-result=loss] { background: transparent; border: 2px solid var(--coral); }

/* ---------- recordings ---------- */
.recordings { display: grid; gap: 10px; }
.rec-row { padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--ink-1); }
.rec-main { display: flex; gap: 12px; }
.rec-name { margin: 0; font-size: 14.5px; font-weight: 750; overflow-wrap: anywhere; }
.rec-meta, .rec-phase { margin: 3px 0 0; font-size: 12.5px; color: var(--text-3); }
.rec-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-left: 22px; }
.rec-actions:empty { display: none; }
.status-dot { display: inline-block; width: 10px; height: 10px; flex: none; margin-top: 6px; border-radius: 50%; background: var(--text-4); }
.status-dot[data-status=complete] { background: var(--lime); }
.status-dot[data-status=processing], .status-dot[data-status=queued] { background: var(--sky); animation: breath 2.6s ease-in-out infinite; }
.status-dot[data-status=needs_review], .status-dot[data-status=uploading] { background: var(--gold); }

/* ---------- clips vault ---------- */
.filters { display: grid; gap: 10px; margin-bottom: 10px; }
.search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--ink-1); color: var(--text-3); }
.search:focus-within { border-color: #5cc8ff88; }
.search input { border: 0 !important; background: transparent !important; padding-left: 0 !important; outline: none; }
.facet-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.facet-row::-webkit-scrollbar { display: none; }
.results-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 38px; margin: 2px 0 12px; font-size: 13px; color: var(--text-2); }
.results-line .btn { margin-left: auto; }
.clip-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
@media (min-width: 700px) { .clip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .clip-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.clip-grid > .empty, .clip-grid > .skeletons { grid-column: 1 / -1; }
.clip-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; border-radius: 14px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: transform var(--dur-fast) var(--ease-out); }
.clip-card:active { transform: scale(.975); }
.clip-poster { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-poster); background: #05070c; box-shadow: 0 0 0 1px var(--line); transition: transform .22s var(--ease-out), box-shadow .22s; }
@media (hover: hover) { .clip-card:hover .clip-poster { transform: translateY(-3px); box-shadow: 0 16px 30px #0009, 0 0 0 1px #ffffff2a; } }
.clip-poster img, .clip-hover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; background: repeating-linear-gradient(135deg, #161d2e 0 12px, #121827 12px 24px); color: var(--text-4); font-family: var(--font-display); font-size: 17px; }
.clip-kind { position: absolute; left: 6px; top: 6px; padding: 3px 6px; border-radius: 5px; background: #0a0d16d6; font-size: 9.5px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.clip-win { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 5px; background: var(--lime); color: var(--lime-ink); font-family: var(--font-display); font-size: 12px; }
.clip-mark { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; box-shadow: 0 2px 8px #0008; }
.clip-mark .i { width: 15px; height: 15px; stroke-width: 2.6; }
.clip-card[data-state=liked] .clip-mark { background: var(--lime); color: var(--lime-ink); }
.clip-card[data-state=saved] .clip-mark { background: var(--gold); color: var(--gold-ink); }
.clip-card[data-state=benched] .clip-mark { background: var(--coral); color: var(--coral-ink); }
.clip-card[data-state=liked] .clip-mark .i, .clip-card[data-state=saved] .clip-mark .i { fill: currentColor; }
.clip-card[data-state=benched] .clip-poster img { filter: grayscale(1) brightness(.55); }
.clip-card[data-state=benched] .clip-title { color: var(--text-3); text-decoration: line-through; text-decoration-color: #ff5c6c99; }
.clip-card.is-withheld .clip-poster { opacity: .5; }
.clip-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 0 2px; }
.clip-title, .clip-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip-title { font-size: 13.5px; font-weight: 750; }
.clip-sub { font-size: 12px; color: var(--text-3); }
.clip-check { position: absolute; left: 8px; top: 8px; z-index: 2; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; border: 2px solid #fff; background: #0009; color: transparent; }
.clip-check .i { width: 16px; height: 16px; stroke-width: 3; }
.clip-card[aria-pressed] .clip-kind { display: none; }
.clip-card[aria-pressed=true] .clip-check { border-color: var(--lime); background: var(--lime); color: var(--lime-ink); }
.clip-card[aria-pressed=true] .clip-poster { box-shadow: 0 0 0 3px var(--lime); }
.more { margin-top: 18px; }
.tray, .nowplaying { position: fixed; left: 50%; transform: translateX(-50%); z-index: 39; }
.tray { bottom: calc(var(--nav-h) + 24px + var(--bottom-safe)); width: min(660px, calc(100% - 20px)); }
.tray-inner { display: grid; gap: 10px; padding: 12px; border-radius: 20px; border: 1px solid var(--line-2); background: #1a2236f2; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 18px 50px #000b; }
.tray-count { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.tray-count span { font-family: var(--font-mono); color: var(--text-3); }
.tray-actions { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tray-actions .btn { flex: none; }

/* ---------- sheets ---------- */
dialog.sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: min(94dvh, 100%); margin: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden;
  border: 0; border-top: 1px solid var(--line-2); border-radius: var(--r-sheet) var(--r-sheet) 0 0; background: #131a2b; color: var(--text); box-shadow: 0 -20px 60px #000c; }
dialog.sheet:not([open]) { display: none; }
dialog.sheet[open] { animation: sheet-up .34s var(--ease-out); }
dialog.sheet::backdrop { background: #05070cb8; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet-grab { flex: none; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: #ffffff2a; }
.sheet-head { display: flex; align-items: flex-start; gap: 8px; padding: 10px 16px 4px; }
.sheet-titles { flex: 1; min-width: 0; }
.sheet-titles .kicker { margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-title { margin: 0; font-size: 27px; line-height: 1.05; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 10px 16px 20px; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 16px calc(12px + var(--bottom-safe)); border-top: 1px solid var(--line); background: #131a2b; }
.sheet-foot .btn-wide { flex: 1; }
.sheet-text { color: var(--text-2); font-size: 14.5px; }
.sheet-sub { margin: 20px 0 8px; font-size: 11.5px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.sheet-body > .btn:first-child { width: 100%; }
@media (min-width: 760px) {
  dialog.sheet { inset: 0; width: min(620px, calc(100% - 48px)); max-height: min(88vh, 940px); margin: auto; border: 1px solid var(--line-2); border-radius: var(--r-sheet); }
  dialog.sheet[open] { animation: sheet-pop .26s var(--ease-out); }
  .sheet-grab { display: none; }
  dialog.sheet-small { width: min(470px, calc(100% - 48px)); }
  dialog.sheet-review { width: min(1080px, calc(100% - 48px)); }
}
.copy-list { display: grid; gap: 6px; }
.copy-row { appearance: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ink-1); color: var(--text); font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
@media (hover: hover) { .copy-row:hover { border-color: var(--lime); } }
.copy-block { max-height: 220px; overflow: auto; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--ink-0); }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.thumb-option { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); text-decoration: none; font-size: 12px; font-weight: 750; }
.thumb-option img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.thumb-option span { display: flex; align-items: center; gap: 4px; }
.thumb-option .i { width: 15px; height: 15px; }

/* ---------- build sheet ---------- */
.format-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.format-tile { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line-2); background: var(--ink-1); cursor: pointer; }
.format-tile input { position: absolute; opacity: 0; }
.format-tile:has(input:checked) { border-color: var(--lime); background: #c5ff620d; }
.format-tile:has(input:focus-visible) { outline: 2px solid var(--sky); }
.format-tile strong { font-family: var(--font-display); font-weight: 400; font-size: 19px; }
.format-tile:has(input:checked) strong { color: var(--lime); }
.format-tile small { font-size: 11.5px; line-height: 1.4; color: var(--text-3); }
.make-length { margin-bottom: 4px; }
.make-honest { margin: 10px 0 16px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line-2); background: var(--ink-0); color: var(--text-2); font-size: 13px; }
.track-picker { display: grid; gap: 2px; max-height: 300px; overflow: auto; margin-top: 8px; padding: 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-0); }
.pick-row { appearance: none; width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
@media (hover: hover) { .pick-row:hover { background: #ffffff08; } }
.pick-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-text strong { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-text small { font-size: 11.5px; color: var(--text-3); }
.pick-list { display: grid; gap: 6px; margin-bottom: 14px; }
.pick-list .pick-row { border: 1px solid var(--line); background: var(--ink-1); min-height: 52px; }
.mini-play { width: 34px; height: 34px; }

/* ---------- review sheet ---------- */
.review-nav { display: flex; gap: 4px; }
.review-layout { display: grid; gap: 18px; }
@media (min-width: 900px) { .review-layout { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } .review-left { position: sticky; top: 0; } }
.review-video, .review-still, .review-loading { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; display: block; }
.review-loading { display: grid; place-items: center; color: var(--text-3); font-size: 13px; padding: 16px; text-align: center; }
.review-still { position: relative; overflow: hidden; background: #05070c; }
.review-still > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.6); }
.still-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; text-align: center; }
.still-overlay p { margin: 0; max-width: 36ch; font-size: 12px; color: var(--text-2); }
.media-note { margin: 6px 2px 0; font-size: 11.5px; color: var(--text-3); }
.review-verbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.verb { appearance: none; min-height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 16px; border: 1.5px solid var(--line-2);
  background: var(--ink-1); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .12s; }
.verb .i { width: 25px; height: 25px; }
.verb:active { transform: scale(.95); }
.verb[data-verb=like][aria-pressed=true] { background: var(--lime); border-color: var(--lime); color: var(--lime-ink); }
.verb[data-verb=save][aria-pressed=true] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.verb[data-verb=bench][aria-pressed=true] { background: var(--coral); border-color: var(--coral); color: var(--coral-ink); }
.verb[data-verb=like][aria-pressed=true] .i, .verb[data-verb=save][aria-pressed=true] .i { fill: currentColor; }
.verb[aria-pressed=true] { animation: stamp .32s var(--ease-spring); }
@media (hover: hover) { .verb[data-verb=like]:hover { border-color: var(--lime); color: var(--lime); } .verb[data-verb=save]:hover { border-color: var(--gold); color: var(--gold); } .verb[data-verb=bench]:hover { border-color: var(--coral); color: var(--coral); } .verb[aria-pressed=true]:hover { color: inherit; } }
.verb-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.review-title { margin: 0; font-size: 30px; line-height: 1.02; }
.review-labels { margin: 6px 0 10px; font-size: 14px; color: var(--text-2); }
.review-why { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px solid #b29cff33; background: #b29cff12; color: #d9cfff; font-size: 13px; }
.review-why .i { width: 17px; height: 17px; color: var(--violet); margin-top: 1px; }
.review-sections { margin-top: 10px; }
.review-section { padding: 6px 0 12px; border-top: 1px solid var(--line); }
.review-section > summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; list-style: none; font-size: 14px; font-weight: 800; }
.review-section > summary::after, .brief > summary::after, .howto > summary::after, .brief-box > summary::after { content: ""; width: 8px; height: 8px; margin: 0 4px 0 auto; border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
details[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; margin: 4px 0; font-size: 13px; }
.facts dt { color: var(--text-3); } .facts dd { margin: 0; overflow-wrap: anywhere; }
.trim-readout { margin: 4px 0 8px; font: 600 15px var(--font-mono); color: var(--lime); }
.trim-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0; }
.trim-row .btn { min-width: 52px; font-family: var(--font-mono); }
.trim-label { width: 74px; font-size: 12px; font-weight: 800; color: var(--text-3); }
.trim-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; display: block; margin: 6px 0; }
.trim-controls { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.trim-range { width: 100%; height: 36px; accent-color: var(--lime); }

/* ---------- quick sort + quick listen ---------- */
dialog.sheet-sort { height: 100dvh; max-height: 100dvh; border-radius: 0; }
@media (min-width: 760px) { dialog.sheet-sort { width: min(560px, calc(100% - 48px)); height: min(900px, 94vh); border-radius: var(--r-sheet); } }
.sort-top { display: flex; align-items: center; justify-content: space-between; }
.sort-counter, .listen-count { font: 600 12.5px var(--font-mono); color: var(--text-3); }
.sort-stage { position: relative; height: min(56dvh, 520px); margin: 8px 0 18px; touch-action: none; }
.sort-card { --like: 0; --bench: 0; --save: 0; position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 24px; border: 1px solid var(--line-2);
  background: var(--ink-2); box-shadow: 0 24px 60px #000b; cursor: grab; user-select: none; -webkit-user-select: none; transition: transform .26s var(--ease-out), opacity .22s; }
.sort-card.is-next { transform: scale(.93) translateY(16px); opacity: .55; pointer-events: none; }
.sort-card.is-dragging { transition: none; cursor: grabbing; }
.sort-visual { position: relative; flex: 1; min-height: 0; background: #000; }
.sort-visual video, .sort-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.sort-stamp { position: absolute; top: 20px; padding: 2px 14px; border: 4px solid; border-radius: 12px; font-family: var(--font-display); font-size: 34px; pointer-events: none; background: #0a0d1680; }
.stamp-like { left: 18px; color: var(--lime); transform: rotate(-12deg); opacity: var(--like); }
.stamp-bench { right: 18px; color: var(--coral); transform: rotate(12deg); opacity: var(--bench); }
.stamp-save { left: 50%; top: auto; bottom: 26px; translate: -50% 0; color: var(--gold); opacity: var(--save); }
.sort-nopreview { position: absolute; left: 10px; bottom: 10px; padding: 3px 8px; border-radius: 6px; background: #000b; font-size: 11px; color: var(--text-2); }
.sort-meta { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; }
.sort-meta strong { font-size: 16.5px; } .sort-meta span { font-size: 12.5px; color: var(--text-3); }
.sort-controls, .listen-actions { display: flex; align-items: center; justify-content: center; gap: 18px; }
.sort-btn { appearance: none; width: 78px; height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 50%;
  background: var(--ink-3); color: var(--text); font: inherit; font-size: 11px; font-weight: 850; cursor: pointer; box-shadow: 0 5px 0 #070a12; transition: transform .1s, box-shadow .1s; }
.sort-btn .i { width: 27px; height: 27px; stroke-width: 2.5; }
.sort-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #070a12; }
.sort-btn:disabled { opacity: .45; cursor: progress; transform: none; }
.sort-btn[data-verb=like] { background: var(--lime); color: var(--lime-ink); box-shadow: 0 5px 0 var(--lime-deep); }
.sort-btn[data-verb=bench] { background: var(--coral); color: var(--coral-ink); box-shadow: 0 5px 0 var(--coral-deep); }
.sort-btn[data-verb=save] { width: 64px; height: 64px; background: var(--gold); color: var(--gold-ink); box-shadow: 0 5px 0 var(--gold-deep); }
.sort-btn[data-verb=like] .i, .sort-btn[data-verb=save] .i { fill: currentColor; }
.sort-reels { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 16px; }
.sort-help { text-align: center; }
.sort-done { display: grid; justify-items: center; gap: 8px; padding: 40px 10px; text-align: center; }
.sort-done h3 { margin: 6px 0 0; font-family: var(--font-display); font-weight: 400; font-size: 32px; }
.sort-done p { margin: 0 0 10px; max-width: 38ch; color: var(--text-2); font-size: 14px; }
.sort-done-icon { width: 60px; height: 60px; padding: 13px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); stroke-width: 3; }
.listen-stage { display: grid; justify-items: center; gap: 6px; padding: 6px 0 16px; text-align: center; }
.listen-disc { position: relative; width: 190px; height: 190px; margin: 14px 0 8px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #26314a 0 27%, #10151f 28% 100%); box-shadow: 0 20px 50px #000a; }
.listen-disc > .i { position: relative; width: 50px; height: 50px; color: var(--lime); animation: spin 8s linear infinite; }
.listen-ring { position: absolute; inset: -7px; border-radius: 50%; background: conic-gradient(var(--lime) calc(var(--p, 0) * 360deg), #ffffff12 0);
  -webkit-mask: radial-gradient(circle, transparent 63%, #000 64%); mask: radial-gradient(circle, transparent 63%, #000 64%); }
.listen-title { margin: 6px 0 0; font-size: 29px; line-height: 1.05; }
.listen-meta { margin: 0 0 10px; font-size: 13px; color: var(--text-3); }
.listen-actions { margin: 6px 0 8px; }
.listen-actions .sort-btn { width: 72px; height: 72px; }
.listen-actions .sort-btn[data-verb=skip] { color: var(--coral); }

/* ---------- reels ---------- */
.reel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; padding-right: 12px; }
@media (min-width: 820px) { .reel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1150px) { .reel-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.reel-tile { display: flex; flex-direction: column; gap: 14px; color: inherit; text-decoration: none; }
.reel-poster { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 16px; background: #05070c;
  box-shadow: 0 0 0 1px var(--line-2), 6px 6px 0 -1px var(--ink-2), 6px 6px 0 0 var(--line-2), 12px 12px 0 -1px var(--ink-1), 12px 12px 0 0 var(--line); transition: transform .22s var(--ease-out); }
@media (hover: hover) { .reel-tile:hover .reel-poster { transform: translate(-2px, -3px); } }
.reel-poster img { width: 100%; height: 100%; object-fit: cover; }
.reel-count { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 7px; background: var(--gold); color: var(--gold-ink); font-family: var(--font-display); font-size: 14px; }
.reel-text strong { display: block; font-size: 15px; }
.reel-text span { font-size: 12.5px; color: var(--text-3); }
.reel-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--violet); font-size: 13.5px; font-weight: 750; }
.reel-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.reel-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--ink-1); }
.reel-n { text-align: center; font-family: var(--font-display); font-size: 20px; color: var(--text-4); }
.reel-open { appearance: none; display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.reel-row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.reel-row-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reel-row-text span { font-size: 12px; color: var(--text-3); }
.reel-row.is-benched .clip-poster img { filter: grayscale(1) brightness(.55); }
.reel-open .clip-kind { display: none; }
@media (max-width: 420px) { .reel-open { grid-template-columns: 96px minmax(0, 1fr); } }

/* ---------- music ---------- */
.track-list { display: grid; gap: 8px; }
.track-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--ink-1); transition: border-color .2s, background-color .2s, opacity .2s; }
.track-row.is-playing { border-color: #c5ff6288; background: linear-gradient(90deg, #c5ff6214, transparent 65%), var(--ink-1); }
.track-row.is-blocked { opacity: .55; }
.track-row[data-rating="-1"] .track-text strong { color: var(--text-3); }
.track-play { width: 50px; height: 50px; display: grid; place-items: center; border: 0; border-radius: 14px; background: var(--ink-3); color: var(--text); cursor: pointer; transition: background-color .15s, color .15s, transform .12s; }
.track-play:active { transform: scale(.93); }
.track-row.is-playing .track-play { background: var(--lime); color: var(--lime-ink); }
.track-play.is-off { opacity: .4; cursor: default; }
.track-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.track-text strong, .track-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-text strong { font-size: 14.5px; }
.track-meta { font-size: 12px; color: var(--text-3); }
.track-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 3px; }
.licence { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-3); font-size: 10px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.licence.is-verified { color: var(--lime); border-color: #c5ff6244; }
.licence .i { width: 11px; height: 11px; }
.credit-note { font-size: 11px; color: var(--gold); }
.track-actions { display: flex; gap: 2px; }
.track-actions .btn-icon { width: 40px; height: 40px; background: transparent; }
.track-like[aria-pressed=true], .np-like[aria-pressed=true] { color: var(--lime); }
.track-like[aria-pressed=true] .i, .np-like[aria-pressed=true] .i { fill: currentColor; }
.track-dislike[aria-pressed=true], .np-dislike[aria-pressed=true] { color: var(--coral); }
.track-block[aria-pressed=true], .np-block[aria-pressed=true] { color: var(--coral); background: #ff5c6c1a; }
@media (max-width: 440px) { .track-row { grid-template-columns: auto minmax(0, 1fr); } .track-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: -6px; } }
.nowplaying { bottom: calc(var(--nav-h) + 24px + var(--bottom-safe)); width: min(580px, calc(100% - 20px)); }
body.has-tray .nowplaying { bottom: calc(var(--nav-h) + 150px + var(--bottom-safe)); }
.np-inner { display: flex; align-items: center; gap: 4px; padding: 8px; border-radius: 20px; border: 1px solid #c5ff6233; background: #1b2337f2; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 14px 40px #000b; }
.np-toggle { background: var(--lime) !important; color: var(--lime-ink) !important; }
.np-text { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 0 4px; }
.np-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.np-title { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-artist { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-scrub { flex: 1; min-width: 0; height: 18px; }
.np-time { font: 600 11px var(--font-mono); color: var(--text-3); white-space: nowrap; }
.nowplaying .btn-icon:not(.np-toggle) { width: 36px; height: 36px; background: transparent; }
@media (max-width: 440px) { .np-dislike, .np-block { display: none !important; } }

/* ---------- channel + game ---------- */
.channel-body { margin-top: 16px; }
.lane-grid { display: grid; gap: 16px; }
@media (min-width: 960px) { .lane-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.lane-card, .taste-card, .game-hero { padding: 18px; border-radius: 22px; border: 1px solid var(--line); background: var(--ink-1); }
.taste-card { background: radial-gradient(120% 80% at 100% 0%, #b29cff1c, transparent 60%), var(--ink-1); }
.taste-card h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--font-display); font-weight: 400; font-size: 25px; color: var(--violet); }
.taste-summary { margin: 0 0 8px; font-size: 14px; color: var(--text-2); }
.taste-count { margin: 0; font-size: 13px; color: var(--text-3); }
.taste-count strong { font-family: var(--font-display); font-weight: 400; font-size: 34px; color: var(--text); }
.taste-card .btn { margin-top: 14px; }
.plain-list { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-2); }
.switch-row { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; margin: 4px 0 16px; padding: 14px 0; border-block: 1px solid var(--line); cursor: pointer; }
.switch-row small { display: block; margin-top: 2px; font-size: 12px; color: var(--text-3); }
.switch-row input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch { position: relative; width: 50px; height: 30px; border-radius: 999px; background: var(--ink-3); transition: background-color .2s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px #0006; transition: transform .22s var(--ease-out); }
.switch-row input:checked ~ .switch { background: var(--lime); }
.switch-row input:checked ~ .switch::after { transform: translateX(20px); }
.switch-row input:focus-visible ~ .switch { outline: 3px solid var(--sky); outline-offset: 2px; }
.game-hero { margin-bottom: 12px; background: radial-gradient(120% 120% at 0% 0%, #5cc8ff1c, transparent 60%), var(--ink-1); }
.game-name { margin: 0; font-size: 42px; line-height: 1; }
.game-trophies { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--gold); font-size: 15px; }
.game-trophies strong { font-family: var(--font-display); font-weight: 400; font-size: 28px; }
.week-list, .battle-list { display: grid; gap: 6px; margin-bottom: 12px; }
.week-row, .battle-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--ink-1); font-size: 13.5px; }
.battle-row { grid-template-columns: 76px minmax(0, 1fr) auto auto; }
.battle-result { font-weight: 850; text-transform: capitalize; }
.battle-row[data-result=victory] .battle-result { color: var(--lime); } .battle-row[data-result=defeat] .battle-result { color: var(--coral); }
.battle-delta, .is-up, .is-down { font-family: var(--font-mono); }
.is-up { color: var(--lime); } .is-down { color: var(--coral); }
.ideas { margin-top: 10px; }
.idea-list { display: grid; gap: 10px; }
@media (min-width: 760px) { .idea-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.idea-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: var(--ink-1); }
.idea-card h3 { margin: 0; font-size: 15px; } .idea-card p { margin: 0; font-size: 13px; color: var(--text-2); }
.idea-links a { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; font-size: 12px; }
.idea-links .i { width: 12px; height: 12px; }
.brief-box { margin-top: 16px; padding: 4px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--ink-1); }
.catalog-item { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.catalog-item p { margin: 6px 0; color: var(--text-2); }

/* ---------- thumbnail desk ---------- */
.thumbs-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.thumbs-layout > * { min-width: 0; }
@media (min-width: 1040px) { .thumbs-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } .asset-library { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; padding-right: 4px; } }
.composer { padding: 16px; margin-bottom: 18px; }
.composer textarea { font-size: 17px; }
.optional.is-over { color: var(--coral); }
.picked { display: flex; flex-wrap: wrap; gap: 8px; }
.picked .hint { margin: 0; }
.picked-chip { appearance: none; display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--ink-0); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.picked-chip .i { width: 14px; height: 14px; color: var(--text-3); }
.picked-img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: repeating-conic-gradient(#1a2135 0 25%, #121827 0 50%) 0 0 / 12px 12px; }
.kit { scroll-margin-top: 80px; }
.kit:empty { display: none; }
.kit { padding: 18px; margin-bottom: 18px; border-radius: 22px; border: 1px solid #b29cff40; background: radial-gradient(120% 80% at 100% 0%, #b29cff1a, transparent 60%), var(--ink-1); }
.kit-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.kit-head .block-title { margin: 0 0 6px; }
.kit-concept { margin: 0 0 10px; color: var(--text-2); font-size: 14px; font-style: italic; }
.stamp-violet { background: #b29cff22; color: var(--violet); }
.stamp-gold { background: #ffd23f1f; color: var(--gold); }
.kit-coverage .stamp { margin-bottom: 8px; }
.stamp .i { width: 13px; height: 13px; }
.kit-warnings { margin: 6px 0 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid #ffd23f55; background: #ffd23f0f; color: #ffe8a3; font-size: 13px; }
.kit-warnings strong { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.kit-warnings ul { margin: 0; padding-left: 18px; }
.kit-coverage { margin: 0 0 12px; font-size: 12.5px; color: var(--text-3); }
.kit-prompt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.kit-prompt .copy-block { max-height: 260px; }
.kit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.kit-actions small { font-size: 12px; opacity: .7; }
.kit-assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.kit-asset { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.kit-asset figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.kit-asset strong { font-size: 13px; }
.kit-credit { color: var(--text-3); font-size: 11.5px; overflow-wrap: anywhere; }
.kit-dl { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 750; text-decoration: none; }
.kit-dl .i { width: 14px; height: 14px; }
.asset-img, .asset-missing { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: repeating-conic-gradient(#1a2135 0 25%, #121827 0 50%) 0 0 / 16px 16px; }
.asset-missing { display: grid; place-items: center; font-size: 11px; color: var(--text-4); }
.library-head { display: grid; gap: 8px; margin-bottom: 12px; }
.library-head .block-title { margin: 0; }
.library-head .hint { margin: 0; }
.asset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .asset-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .asset-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.asset-grid > .empty { grid-column: 1 / -1; }
.asset-tile { position: relative; appearance: none; display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--ink-1); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .12s; }
.asset-tile:active { transform: scale(.97); }
.asset-tile[aria-pressed=true] { border-color: var(--lime); background: #c5ff620a; }
.asset-tile[aria-pressed=true] .clip-check { border-color: var(--lime); background: var(--lime); color: var(--lime-ink); }
.asset-meta { display: flex; flex-direction: column; min-width: 0; padding: 0 2px 2px; }
.asset-meta strong, .asset-meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-meta strong { font-size: 12.5px; }
.asset-meta small { font-size: 11px; color: var(--text-3); }
.kit-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.kit-row { appearance: none; width: 100%; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--ink-1); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.kit-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kit-row-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kit-row-text small { font-size: 12px; color: var(--text-3); }

/* ---------- example thumbnails (private, reference only) ---------- */
/* A scrapbook, not a shelf: dashed edge + faint hatching says "looked at, not ours". Phone = swipe rail, wider = grid. */
.inspiration { scroll-margin-top: 84px; margin-top: 8px; padding: 18px; border-radius: 22px; border: 1px dashed var(--line-2); background: repeating-linear-gradient(135deg, #ffffff04 0 10px, transparent 10px 20px), var(--ink-0); overflow: hidden; }
.insp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.insp-head .block-title { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.insp-head .block-title .i { color: var(--violet); }
.insp-note { margin: 12px 0 6px; max-width: 62ch; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.insp-honest { margin: 0 0 14px; max-width: 62ch; }
.inspiration .search { margin-bottom: 10px; }
.insp-quick { margin-bottom: 4px; }
.insp-deep { margin-bottom: 12px; }
.insp-deep summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 2px; cursor: pointer; color: var(--text-2); font-size: 13.5px; font-weight: 750; list-style: none; }
.insp-deep summary::-webkit-details-marker { display: none; }
.insp-deep summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform var(--dur-fast); }
.insp-deep[open] summary::before { transform: rotate(45deg); }
.insp-deep summary:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 8px; }
.insp-count:not(:empty) { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--lime); color: var(--lime-ink); font-size: 11.5px; font-weight: 850; }
.insp-deep-body { display: grid; gap: 12px; padding-top: 6px; }
.insp-row { display: grid; gap: 6px; }
.insp-row-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.insp-grid { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 320px); gap: 12px; align-items: stretch; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 18px; margin: 0 -18px; padding: 2px 18px 6px; scrollbar-width: none; }
.insp-grid::-webkit-scrollbar { display: none; }
.insp-grid:has(> .empty, > .skeletons) { display: block; margin: 0; padding: 0; }
.insp-skeleton .skeleton { aspect-ratio: 16 / 13; }
@media (min-width: 700px) { .insp-grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); overflow: visible; margin: 0; padding: 0; } }
.insp-card { scroll-snap-align: start; display: flex; flex-direction: column; min-width: 0; border-radius: 16px; border: 1px solid var(--line); background: var(--ink-1); overflow: hidden; transition: border-color var(--dur-fast); }
.insp-card:hover, .insp-card:focus-within { border-color: var(--line-2); }
.insp-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--ink-2); }
.insp-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.insp-thumb .poster-fallback { font-size: 14px; }
.insp-thumb::after { content: 'REF'; content: 'REF' / ''; position: absolute; left: 8px; top: 8px; padding: 3px 7px; border-radius: 6px; background: #0b0f1ad9; color: var(--text-2); font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.insp-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 12px 2px; }
.insp-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-size: 14px; line-height: 1.35; }
.insp-meta { font-size: 12px; color: var(--text-3); }
.insp-layout { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.insp-layout b { color: var(--violet); font-weight: 750; }
.insp-layout em { font-style: normal; color: var(--text-4); }
.insp-body .stamps { margin-top: 2px; }
.insp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px 10px; }
.insp-actions .btn-icon { width: 40px; height: 40px; background: transparent; color: var(--text-3); }
.insp-actions .btn-icon .i { width: 18px; height: 18px; }
.insp-actions .btn-icon:hover { background: #ffffff0d; color: var(--text); }
.insp-actions .btn-icon:focus-visible { outline: 2px solid var(--sky); outline-offset: 1px; }
.insp-pin[aria-pressed=true] { color: var(--gold); background: #ffd23f17; }
.insp-like[aria-pressed=true] { color: var(--lime); background: #c5ff6217; }
.insp-dislike[aria-pressed=true] { color: var(--coral); background: #ff5c6c17; }
.insp-actions .btn-icon[aria-disabled=true] { opacity: .45; cursor: progress; }
.insp-links { display: flex; gap: 6px; margin-left: auto; }
.insp-links .btn-sm { min-height: 38px; padding: 6px 11px; }
.insp-links .i { width: 14px; height: 14px; }
.insp-more { appearance: none; scroll-snap-align: start; display: grid; place-items: center; min-height: 140px; padding: 16px; border-radius: 16px; border: 1px dashed var(--line-2); background: transparent; color: var(--text-2); font: inherit; font-size: 14px; font-weight: 750; cursor: pointer; }
.insp-more:hover { color: var(--text); border-color: var(--text-4); }
.insp-more:disabled { opacity: .6; cursor: progress; }
.insp-quota { margin: 12px 0 0; }
@media (pointer: coarse) { .insp-actions .btn-icon { width: 44px; height: 44px; } .insp-links .btn-sm { min-height: 44px; } }

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 100; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); width: min(480px, calc(100% - 20px)); display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 14px; border-radius: 16px; border: 1px solid var(--line-2); background: #1f2840f7; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px #000b; font-size: 13.5px; font-weight: 650; pointer-events: auto; animation: toast-in .3s var(--ease-out); transition: opacity .2s, transform .2s; }
.toast > span { flex: 1; }
.toast-error { border-color: #ff5c6c66; } .toast-error > span { color: #ffd0d5; }
.toast-action { appearance: none; padding: 7px 11px; border: 0; border-radius: 10px; background: var(--lime); color: var(--lime-ink); font: inherit; font-size: 12.5px; font-weight: 850; cursor: pointer; }
.toast-close { width: 32px; height: 32px; background: transparent; }
.toast.is-leaving { opacity: 0; transform: translateY(-6px); }

/* ---------- desktop rail ---------- */
@media (min-width: 980px) {
  .app { padding-left: 104px; padding-bottom: 60px; }
  body.has-player .app, body.has-tray .app { padding-bottom: 160px; }
  .topbar { padding-inline: 32px; }
  .views { padding: 4px 32px 40px; }
  .tabbar { left: 16px; top: 50%; bottom: auto; transform: translateY(-50%); width: 78px; flex-direction: column; border-radius: 26px; }
  .tabbar a { min-height: 66px; }
  .tray, .nowplaying { left: calc(50% + 52px); bottom: 20px; }
  body.has-tray .nowplaying { bottom: 140px; }
  .story-rail { margin: 0; padding-inline: 0; grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; }
}

/* ---------- publish queue on shelf cards ---------- */
.publish-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--ink-0); border: 1px solid var(--line); }
.publish-row > .btn:only-child { width: 100%; }
.publish-ready { display: flex; gap: 8px; align-items: center; color: var(--lime); font-size: 13.5px; font-weight: 700; margin: 0 0 12px; }
.publish-status { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.publish-status small { display: block; color: var(--text-3); font-size: 12px; }
.publish-row[data-status=uploaded] .breath { background: var(--lime); animation: none; }
.publish-row[data-status=failed] .breath, .publish-row[data-status=needs_review] .breath, .publish-row[data-status=cancelled] .breath { background: var(--gold); animation: none; }
.publish-error { display: block; margin-top: 4px; color: #ffe8a3; font-size: 12px; }
.publish-dest { margin: 0 0 12px; }
/* Muse review: every field the owner is about to approve, the exact video, one confirm. */
.sheet-muse .publish-row { margin-bottom: 12px; }
.muse-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid #b29cff40; background: #b29cff12; color: var(--text-2); font-size: 13.5px; line-height: 1.5; }
.muse-note .i { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--violet); }
.muse-video { display: block; width: 100%; max-height: 40vh; margin: 14px 0; border-radius: 14px; background: #000; }
.muse-facts { gap: 10px 14px; font-size: 14px; }
.muse-facts dt { padding-top: 1px; }
.muse-desc { white-space: pre-wrap; }
.muse-facts .stamps { gap: 4px; }
.muse-error { padding: 10px 12px; border-radius: 12px; border: 1px solid #ffd23f55; background: #ffd23f0f; font-size: 13px; }
.publish-row[data-status=failed] .breath { background: var(--coral); animation: none; }
.publish-row[data-status=waiting] .breath { background: var(--gold); }

/* ---------- clips: filter tools + filter sheet ---------- */
.filters-dynamic { display: grid; gap: 10px; }
.filter-tools { display: flex; align-items: center; gap: 8px; }
.filter-tools .seg { flex: 1; min-width: 0; }
.filter-tools .filter-open { flex: none; }
.sheet-body:focus { outline: none; }
@media (max-width: 560px) {
  #view-clips .page-head { margin-bottom: 12px; }
  #view-clips .page-title { font-size: 40px; }
  #view-clips .head-actions { width: 100%; flex-wrap: nowrap; }
  #view-clips .head-actions .btn-key { flex: 1; }
  #view-clips .btn-compact .btn-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #view-clips .btn-compact { width: 52px; padding: 0; }
  #view-clips .results-line { margin-bottom: 8px; }
}
.filter-open { position: relative; }
.count-badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--lime); color: var(--lime-ink); font-size: 12px; font-weight: 850; }
.sort-toggle { font-weight: 750; }
.active-filters .chip .i { margin-left: 2px; }
.filter-sheet { display: grid; gap: 6px; }
.filter-group .chips { gap: 8px; }
.filter-group .chip small { color: inherit; opacity: .6; }
.filter-group .sheet-sub { margin-top: 14px; }
.library-body { min-height: 120px; }

/* ---------- touch devices: no iOS focus-zoom, 44 px targets ---------- */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]), select, textarea,
  .chip-select select, .chip-form input { font-size: 16px !important; }
  .btn-sm, .chip, .chip-select select, .seg-item span, .copy-row, .pick-row, .kit-row, .link-more { min-height: 44px; }
  .seg-item span { display: flex; align-items: center; justify-content: center; }
  .btn-icon { width: 44px; height: 44px; }
  .trim-row .btn { min-width: 56px; min-height: 44px; }
  .link-more { display: inline-flex; align-items: center; padding: 0 6px; }
  .tabbar a { min-height: 56px; }
}

/* ---------- sheets follow the visible viewport (on-screen keyboard) and lock the page behind ---------- */
dialog.sheet { bottom: var(--kb, 0px); max-height: min(94dvh, calc(var(--vvh, 100dvh) - 8px)); }
html:has(dialog[open]) { overflow: hidden; }
@media (min-width: 760px) { dialog.sheet { bottom: 0; max-height: min(88vh, 940px); } dialog.sheet-sort { max-height: min(900px, 94vh); } }

/* ---------- content plan, source retention and companion Shorts ---------- */
.content-web { min-width: 0; }
.content-web > .block-head { align-items: center; }
.content-web .block-head .kicker { margin-bottom: 3px; }
.content-web .block-head h2 { margin: 0; }
.content-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 16px 0 10px; }
.content-path > span { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); padding: 10px; border-radius: 12px; color: var(--text-2); background: var(--ink-1); font-size: 12px; font-weight: 700; }
.content-path small { color: var(--lime); font: 18px var(--font-display); }
.content-plan-result:empty { display: none; }
.series-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 12px; margin: 16px 0; }
.series-card { min-width: 0; border: 1px solid var(--line-2); border-radius: 18px; padding: 16px; background: linear-gradient(145deg, #182033, #121827); }
.series-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.series-state { color: var(--text-2); font-size: 11px; }
.series-state.is-ready { color: var(--lime); }
.series-card h3 { font: 24px/1.15 var(--font-display); margin: 14px 0 8px; overflow-wrap: anywhere; }
.series-amount { color: var(--text-2); font-size: 12px; margin: 8px 0; }
.series-amount strong { color: var(--text); font: 30px var(--font-display); }
.series-progress { display: block; appearance: none; width: 100%; height: 7px; border: 0; border-radius: 8px; background: var(--ink-0); overflow: hidden; }
.series-progress::-webkit-progress-bar { background: var(--ink-0); border-radius: 8px; }
.series-progress::-webkit-progress-value { background: var(--lime); border-radius: 8px; }
.series-progress::-moz-progress-bar { background: var(--lime); border-radius: 8px; }
.series-episodes { margin: 12px 0; padding: 0; list-style: none; }
.series-episodes li { display: flex; align-items: flex-start; gap: 9px; padding: 9px 0; border-top: 1px solid var(--line); }
.series-episodes li > div { min-width: 0; }
.series-episodes strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.series-episodes small { display: block; color: var(--text-3); font-size: 11px; }
.episode-part { flex: none; color: var(--gold); font-size: 11px; font-weight: 800; }
.series-first { color: var(--text-3); font-size: 12px; }
.content-inventory, .content-links { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.content-inventory > summary, .content-links > summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-weight: 750; }
.inventory-row, .content-link-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.inventory-info, .content-link-row > div:first-child { min-width: 0; }
.inventory-info h3, .content-link-row strong { display: block; overflow-wrap: anywhere; font-size: 14px; margin: 0 0 4px; }
.inventory-info p, .content-link-row p { margin: 3px 0; color: var(--text-2); font-size: 12px; }
.inventory-info .inventory-used, .content-link-row small { color: var(--text-3); font-size: 11px; }
.retention-note { display: inline-block; margin-top: 5px; color: var(--text-2); font-size: 11px; }
.retention-note.is-soon { color: var(--gold); }
.inventory-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px; flex-shrink: 0; }
.inventory-actions .btn[aria-pressed=true] { color: var(--lime); border-color: #c5ff6244; }
.clip-source, .clip-reuse { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); font-size: 11px; line-height: 1.6; }
.clip-reuse { color: var(--sky); }
.shelf-series { color: var(--gold); font-size: 12px; font-weight: 750; margin: 4px 0; }
.shelf-lineage { font-size: 12px; color: var(--text-2); margin: 6px 0; }
.shelf-lineage summary { padding: 6px 0; cursor: pointer; }
.companion-selection { margin: 18px 0; padding-top: 8px; border-top: 1px solid var(--line-2); }
.companion-pick input { flex: none; width: 20px; height: 20px; accent-color: var(--lime); }
.companion-pick:has(input:disabled) { opacity: .65; }
.companion-pick .pick-text strong { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .content-web .block-head { align-items: flex-start; }
  .content-path { grid-template-columns: 1fr; }
  .content-path > span { min-height: 40px; }
  .inventory-row, .content-link-row { align-items: flex-start; flex-direction: column; }
  .inventory-actions { justify-content: flex-start; width: 100%; }
  .inventory-actions .btn { min-height: 44px; }
  .content-web > .block-head > .btn { width: 100%; }
}

/* ---------- motion ---------- */
@keyframes breath { 50% { transform: scale(.68); opacity: .5; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes sheet-pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
@keyframes toast-in { from { transform: translateY(-10px); opacity: 0; } }
@keyframes stamp { 0% { transform: scale(.9); } 60% { transform: scale(1.06) rotate(-2deg); } 100% { transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
