/* =========================================================================
   NOISEBOX — glass archive
   Ink background with a slow coloured glow per room, frosted glass with film
   grain for everything that floats, the yellow kept for what matters most.
   Rooms: body.room-video (ice), body.room-image (ember), body.room-mix (violet).
   ========================================================================= */

:root {
  /* Base */
  --bg: #07070A;
  --text: #F5F5F7;
  --dim: rgba(245, 245, 247, 0.64);
  --faint: rgba(245, 245, 247, 0.40);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --surface: rgba(255, 255, 255, 0.035);
  --elevated: rgba(255, 255, 255, 0.07);
  --border: var(--line);

  /* Brand + room colours */
  --accent: #FFF700;
  --accent-hover: #FFFA5C;
  --accent-dim: rgba(255, 247, 0, 0.12);
  --on-accent: #0B0B00;
  --ice: #7DB7FF;
  --ember: #FF7B54;
  --violet: #9A86FF;
  --room: var(--violet);
  --room-2: var(--ice);
  --danger: #FF6B6B;

  /* Shape */
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --radius-xl: 30px;

  /* Glass: film grain, a top-lit sheen and a dark tint, frosted over what sits behind */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.10'/%3E%3C/svg%3E");
  --glass-bg: var(--noise), linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)), rgba(18, 18, 24, 0.46);
  --glass-strong-bg: var(--noise), linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)), rgba(16, 16, 22, 0.72);
  --blur: blur(22px) saturate(160%);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  --float: 0 24px 60px -18px rgba(0, 0, 0, 0.7), 0 4px 14px -4px rgba(0, 0, 0, 0.4);

  /* Motion */
  --ease: cubic-bezier(.22, .8, .24, 1);
  --spring: cubic-bezier(.34, 1.45, .64, 1);

  /* Type */
  --font: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'Instrument Serif', 'Times New Roman', serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}
@property --room { syntax: '<color>'; inherits: true; initial-value: #9A86FF; }
@property --room-2 { syntax: '<color>'; inherits: true; initial-value: #7DB7FF; }
body { transition: --room 1s var(--ease), --room-2 1s var(--ease); }
body.room-video { --room: var(--ice); --room-2: var(--violet); }
body.room-image { --room: var(--ember); --room-2: var(--violet); }
body.room-mix   { --room: var(--violet); --room-2: var(--ember); }

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { background: var(--bg); color-scheme: dark; }
body { min-height: 100vh; color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; letter-spacing: -0.005em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 14px; width: 100%; transition: border-color .2s, background .2s, box-shadow .2s; }
input:hover, textarea:hover, select:hover { border-color: var(--line-strong); }
input:focus, textarea:focus, select:focus { outline: none; background: rgba(255, 255, 255, 0.06); border-color: color-mix(in oklab, var(--room) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--room) 14%, transparent); }
select option { background: #121218; }
::placeholder { color: var(--faint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: color-mix(in oklab, var(--room) 45%, transparent); }
h1 em, h2 em { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -0.01em; padding-right: 0.06em; background: linear-gradient(100deg, var(--text) 10%, color-mix(in oklab, var(--room) 85%, white)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* The room's light: a slow drifting glow, with film grain on top of it. */
body::before { content: ""; position: fixed; inset: -12%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(38% 34% at 12% 2%, color-mix(in oklab, var(--room) 24%, transparent), transparent 70%),
    radial-gradient(32% 38% at 92% 12%, color-mix(in oklab, var(--room-2) 17%, transparent), transparent 70%),
    radial-gradient(46% 36% at 62% 108%, color-mix(in oklab, var(--room) 12%, transparent), transparent 72%);
  animation: aurora 38s ease-in-out infinite alternate; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--noise); opacity: .55; }
@keyframes aurora { to { transform: translate3d(3%, 2.5%, 0) scale(1.08) rotate(2deg); } }

/* ---------- Motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.96); } }
@keyframes fade { from { opacity: 0; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes float { 50% { transform: translateY(-3px); } }
@keyframes breathe { 50% { opacity: .35; } }

.hero > *, .search-wrap, .controls, .chip-row, .page-head, .form > *, .player-glow, .detail-grid > *, .admin-grid { animation: rise .9s var(--ease) both; }
.hero > :nth-child(2) { animation-delay: .06s; }
.hero > :nth-child(3) { animation-delay: .12s; }
.search-wrap { animation-delay: .16s; }
.controls, .chip-row { animation-delay: .22s; }
.detail-grid > :nth-child(2) { animation-delay: .1s; }
.form > :nth-child(2) { animation-delay: .04s; }
.form > :nth-child(3) { animation-delay: .08s; }
.form > :nth-child(4) { animation-delay: .12s; }
.form > :nth-child(5) { animation-delay: .16s; }
.form > :nth-child(n+6) { animation-delay: .2s; }

/* Cards rise in as they scroll into view (common.js adds .in, with a small stagger). */
html.js-reveal .vcard, html.js-reveal .img-card { opacity: 0; transform: translateY(26px) scale(.975); }
html.js-reveal .vcard.in, html.js-reveal .img-card.in { opacity: 1; transform: none;
  transition: opacity .8s var(--ease) var(--d, 0ms), transform 1s var(--ease) var(--d, 0ms), box-shadow .5s var(--ease); }
/* Images fade in once they have actually loaded; until then a soft shimmer holds their place. */
html.js-reveal .card > img, html.js-reveal .img-frame img, html.js-reveal .frame img { opacity: 0; }
html.js-reveal .card > img.loaded, html.js-reveal .img-frame img.loaded, html.js-reveal .frame img.loaded { opacity: 1; }
.card, .img-frame, .frame, .take-thumb { background: linear-gradient(110deg, rgba(255, 255, 255, 0.025) 30%, rgba(255, 255, 255, 0.07) 45%, rgba(255, 255, 255, 0.025) 60%) 0 0 / 200% 100%, rgba(255, 255, 255, 0.02); animation: shimmer 1.8s linear infinite; }
.card:has(img.loaded), .card:has(img.img-failed), .card:has(.card-placeholder), .img-frame:has(img.loaded), .img-frame:has(img.img-failed), .frame:has(img.loaded), .take-thumb:has(img.loaded) { animation: none; background: rgba(255, 255, 255, 0.03); }
img.img-failed { opacity: 0 !important; }

/* Smooth page-to-page navigation; the floating nav stays put. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: .22s var(--ease) both vt-out; }
::view-transition-new(root) { animation: .4s var(--ease) both fade; }
@keyframes vt-out { to { opacity: 0; } }

/* ---------- Nav: a floating glass pill ---------- */
.nav { position: sticky; top: 14px; z-index: 30; padding: 0 24px; margin-top: 14px; }
.nav-inner { view-transition-name: nav; max-width: 1600px; margin: 0 auto; padding: 7px 7px 7px 22px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: 999px;
  background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-edge), var(--float); }
.logo { font-weight: 700; font-size: 15px; letter-spacing: 0.16em; white-space: nowrap; }
.logo span { color: var(--accent); text-shadow: 0 0 18px rgba(255, 247, 0, 0.45); }
.nav-links { display: flex; gap: 2px; }
.nav-links a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 999px; color: var(--dim); font-weight: 500; transition: color .2s, background .2s; white-space: nowrap; }
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav-links a.active { color: var(--text); background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
/* Room colour dots: ice for Video, ember for Image */
.nav-links a[href="/"]::before, .nav-links a[href="/images"]::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--ice); box-shadow: 0 0 10px var(--ice); opacity: .55; transition: opacity .2s; }
.nav-links a[href="/images"]::before { background: var(--ember); box-shadow: 0 0 10px var(--ember); }
.nav-links a.active::before, .nav-links a:hover::before { opacity: 1; }
.container { max-width: 1600px; margin: 0 auto; padding: 40px 24px 120px; }

/* ---------- Hero ---------- */
.hero { padding: 36px 0 40px; max-width: 880px; }
.kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px; padding: 6px 13px 6px 11px; border-radius: 999px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim);
  background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-edge); }
.kicker i { width: 7px; height: 7px; border-radius: 999px; background: var(--room); box-shadow: 0 0 12px var(--room); animation: breathe 2.6s ease-in-out infinite; }
.hero h1 { font-size: clamp(36px, 5.6vw, 76px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.0; margin-bottom: 18px; }
.hero p { color: var(--dim); font-size: 16px; line-height: 1.6; max-width: 560px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; transition: transform .25s var(--spring), box-shadow .3s var(--ease), background .2s, color .2s, border-color .2s; }
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(180deg, #FFFB6E, #FFF200); color: var(--on-accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 28px -10px rgba(255, 247, 0, 0.6); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 16px 36px -10px rgba(255, 247, 0, 0.75); }
.btn-primary:disabled { opacity: .5; cursor: default; transform: none; }
.btn-ghost { background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-edge); color: var(--text); }
.btn-ghost:hover { background: var(--noise), rgba(255, 255, 255, 0.12); transform: translateY(-1px); }
.btn-ghost.on { color: var(--accent); }
.btn-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 999px; color: var(--dim); transition: .2s var(--ease);
  background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-edge); }
.btn-icon:hover { color: var(--text); background: var(--noise), rgba(255, 255, 255, 0.12); }
.btn-outline { background: rgba(255, 247, 0, 0.04); border: 1px solid rgba(255, 247, 0, 0.45); color: var(--accent); }
.btn-outline:hover { background: var(--accent-dim); box-shadow: 0 0 28px -6px rgba(255, 247, 0, 0.45); }
.dot { position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ---------- Search ---------- */
.search-wrap { position: relative; margin-bottom: 22px; }
.search-wrap svg { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; z-index: 1; transition: color .2s; }
.search-wrap:focus-within svg { color: var(--room); }
.search { height: 64px; padding: 0 24px 0 58px; font-size: 16px; border-radius: 999px; border: 0;
  background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-edge), var(--float); }
.search:hover { border: 0; }
.search:focus { border: 0; background: var(--noise), linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)), rgba(18, 18, 24, 0.55);
  box-shadow: var(--glass-edge), 0 0 0 1px color-mix(in oklab, var(--room) 55%, transparent), 0 0 40px -8px color-mix(in oklab, var(--room) 40%, transparent), var(--float); }

/* ---------- Controls ---------- */
.controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
  /* Its entrance animation makes it a stacking context; lift the whole row so the filter popover floats over the grid. */
  position: relative; z-index: 20; }
.tabs { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-edge); }
.tab { padding: 9px 18px; border-radius: 999px; color: var(--dim); font-weight: 500; transition: color .2s, background .25s var(--ease), box-shadow .25s; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--text); color: #08080B; box-shadow: 0 6px 18px -6px rgba(255, 255, 255, 0.35); }

.filter-wrap { position: relative; }
.popover { position: absolute; top: calc(100% + 10px); right: 0; width: min(340px, calc(100vw - 32px)); z-index: 25; padding: 20px; border-radius: var(--radius-lg); transform-origin: top right; animation: pop .3s var(--spring);
  /* Near-solid: the animated .controls row is a backdrop root, so a blur here cannot reach the videos behind it. */
  background: var(--noise), linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)), #0F0F14; box-shadow: var(--glass-edge), 0 30px 70px -20px rgba(0, 0, 0, 0.85), 0 6px 18px -6px rgba(0, 0, 0, 0.6); }
.popover h4 { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 10px; }
.popover-row + .popover-row { margin-top: 18px; }
.dur-readout { display: flex; align-items: baseline; justify-content: center; gap: 6px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dur-readout b { font-size: 22px; font-weight: 500; color: var(--text); letter-spacing: 0.02em; }
.dur-readout span { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.dur-wheel { margin: 2px -8px 0; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-btn { padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); color: var(--dim); font-size: 13px; transition: .2s; }
.seg-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.09); }
.seg-btn.active { background: var(--text); color: #08080B; box-shadow: none; }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { padding: 7px 15px; border-radius: 999px; color: var(--dim); font-size: 13px; transition: color .2s, background .2s, transform .25s var(--spring);
  background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-edge); }
.chip:hover { color: var(--text); transform: translateY(-1px); }
.chip.active { background: var(--text); color: #08080B; box-shadow: 0 6px 18px -6px rgba(255, 255, 255, 0.35); }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--text); animation: pop .3s var(--spring);
  background: color-mix(in oklab, var(--room) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--room) 40%, transparent); }
.pill span { opacity: .6; }
.pill-clear { color: var(--dim); font-size: 13px; padding: 5px 8px; border-radius: 999px; }
.pill-clear:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }

/* ---------- Grid + video cards ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1280px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 560px)  { .grid { grid-template-columns: 1fr; } }

.card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; cursor: pointer; isolation: isolate;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8); }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.08); pointer-events: none; z-index: 3; }
.card:hover { transform: translateY(-6px); box-shadow: 0 34px 60px -24px color-mix(in oklab, var(--room) 50%, transparent), 0 14px 30px -14px rgba(0, 0, 0, 0.8); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .7s var(--ease), transform .8s var(--ease); }
.card:hover > img { transform: scale(1.03); }
.card-placeholder { width: 100%; height: 100%; background: radial-gradient(120% 90% at 30% 20%, rgba(255, 255, 255, 0.06), transparent 60%), rgba(255, 255, 255, 0.02); display: flex; align-items: center; justify-content: center; color: var(--faint); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.duration, .demo-badge, .takes-badge, .take-num, .frame-label, .img-pick-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.duration { position: absolute; left: 10px; bottom: 10px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 500; color: var(--text); z-index: 2;
  background: rgba(10, 10, 14, 0.5); backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.demo-badge { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); z-index: 2;
  background: rgba(10, 10, 14, 0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.hover-actions { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(5, 5, 8, 0.75)); opacity: 0; transition: opacity .3s var(--ease); display: flex; align-items: flex-end; justify-content: flex-end; gap: 6px; padding: 10px; z-index: 1; }
.card:hover .hover-actions, .card:focus-within .hover-actions { opacity: 1; }
.hover-btn { padding: 7px 12px; border-radius: 999px; color: var(--text); font-size: 12px; font-weight: 500; transition: background .2s, color .2s, transform .25s var(--spring);
  background: rgba(14, 14, 20, 0.5); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.card:hover .hover-btn { animation: pop .35s var(--spring) both; }
.card:hover .hover-btn:nth-child(2) { animation-delay: .04s; }
.card:hover .hover-btn:nth-child(3) { animation-delay: .08s; }
.hover-btn:hover, .hover-btn.on { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 20px -6px rgba(255, 247, 0, 0.6); }
@media (hover: none) { .hover-actions { opacity: 1; background: none; } }

/* A video card is the shot plus a quiet one-line caption. */
.vcard { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.vcard > .card { z-index: 1; }
.vcard-cap { display: flex; flex-direction: column; gap: 3px; padding: 0 2px; min-width: 0; }
.vcard-title { font-size: 13.5px; font-weight: 500; letter-spacing: -0.005em; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vcard-meta { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1em; }
.grid > .vcard { padding-top: 12px; }

/* Scene card: one card for every take of a scene.
   Two plates peek out above the frame like a stack of prints; on hover they lift apart,
   moving across the frame skims through the takes, and the segments show where you are. */
.vcard-plate { position: absolute; top: 6px; left: 5%; right: 5%; height: 30px; border-radius: var(--radius) var(--radius) 0 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: transform .5s var(--ease), opacity .5s var(--ease); }
.vcard-plate.p2 { top: 0; left: 10%; right: 10%; background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)); }
.vcard.scene:hover .vcard-plate.p1, .vcard.scene:focus-within .vcard-plate.p1 { transform: translateY(-9px); }
.vcard.scene:hover .vcard-plate.p2, .vcard.scene:focus-within .vcard-plate.p2 { transform: translateY(-15px); }
.vcard.scene .card { cursor: pointer; }
.vcard.scene .card > img { transition: opacity .7s var(--ease), transform .8s var(--ease); }
.vcard.scene .card.skimming > img { transition: none; transform: none; }
.scene-count { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 10.5px; font-variant-numeric: tabular-nums; letter-spacing: 0.06em; color: var(--dim);
  background: rgba(10, 10, 14, 0.5); backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: color .2s, box-shadow .2s; }
.scene-count b { color: var(--text); font-weight: 500; }
.card.skimming .scene-count { color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 247, 0, 0.45); }
.scene-open { position: absolute; right: 10px; bottom: 12px; z-index: 2; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--on-accent);
  background: var(--accent); opacity: 0; transform: translateY(4px); transition: opacity .25s var(--ease), transform .3s var(--spring); pointer-events: none; }
.card:hover .scene-open, .card:focus-visible .scene-open { opacity: 1; transform: none; }
.scene-ticks { position: absolute; left: 10px; right: 10px; bottom: 5px; z-index: 2; display: flex; gap: 3px; pointer-events: none; opacity: .55; transition: opacity .25s; }
.scene-ticks i { flex: 1; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.35); transition: background .15s; }
.scene-ticks i.on { background: var(--accent); box-shadow: 0 0 8px rgba(255, 247, 0, 0.6); }
.card:hover .scene-ticks { opacity: 1; }
.vcard.scene .duration { bottom: 14px; }
.vcard.scene .card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: none) { .scene-open { opacity: 1; transform: none; } .scene-ticks { opacity: 1; } }

/* ---------- Takes ---------- */
.takes-badge { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; color: var(--dim); font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; transition: color .2s, background .2s, box-shadow .2s;
  background: rgba(10, 10, 14, 0.45); backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.card:hover .takes-badge, .card:focus-within .takes-badge { color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--room) 60%, transparent), 0 0 18px -4px color-mix(in oklab, var(--room) 60%, transparent); }
.takes-badge:hover { background: var(--accent) !important; color: var(--on-accent) !important; box-shadow: 0 6px 20px -6px rgba(255, 247, 0, 0.6) !important; }
.takes-link { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; color: var(--text); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; background: color-mix(in oklab, var(--room) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--room) 40%, transparent); transition: .2s; }
.takes-link:hover { background: var(--accent); color: var(--on-accent); box-shadow: none; }

body.no-scroll { overflow: hidden; }
.takes-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 28px; overflow: hidden; animation: fade .3s var(--ease);
  background: rgba(5, 5, 8, 0.55); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); }
.takes-overlay::before { content: ""; position: absolute; inset: -15%; background: var(--ambient, none) center / cover; filter: blur(90px) saturate(1.6); opacity: .4; pointer-events: none; transition: opacity .6s; }
@keyframes takes-in { from { opacity: 0; } }
.takes-panel { position: relative; width: min(1240px, 100%); max-height: 100%; overflow-y: auto; padding: 28px; border-radius: var(--radius-xl); animation: rise .6s var(--ease) both;
  background: var(--glass-strong-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-edge), 0 40px 100px -30px rgba(0, 0, 0, 0.8); }
.takes-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.takes-head .side-title { margin-bottom: 8px; color: var(--room); }
.takes-head h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.takes-sub { color: var(--dim); font-size: 13px; margin-top: 6px; }
.takes-close { flex-shrink: 0; }
.takes-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; }
.takes-stage { position: relative; background: #000; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.takes-player, .takes-player iframe, .takes-player img { width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.takes-player > * { animation: fade .5s var(--ease); }
.takes-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: var(--text); opacity: 0; transition: opacity .25s, background .2s, color .2s;
  background: rgba(14, 14, 20, 0.5); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); }
.takes-nav.prev { left: 14px; }
.takes-nav.next { right: 14px; }
.takes-stage:hover .takes-nav, .takes-nav:focus-visible { opacity: 1; }
.takes-nav:hover { background: var(--accent); color: var(--on-accent); }
@media (hover: none) { .takes-nav { opacity: 1; } }
.take-count { font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.take-count span { color: var(--faint); }
.take-desc { font-size: 16px; line-height: 1.5; margin-bottom: 18px; }
.take-meta { display: grid; grid-template-columns: max-content 1fr; gap: 0 18px; font-size: 13px; margin-bottom: 18px; }
.take-meta dt { color: var(--faint); padding: 7px 0; border-top: 1px solid var(--line); }
.take-meta dd { padding: 7px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.take-locked { color: var(--faint); }
.take-locked::before { content: "🔒"; margin-right: 6px; font-size: 11px; }
.takes-info .labels { margin-bottom: 20px; }
.take-open { width: 100%; }
.takes-left { min-width: 0; }
.takes-strip { display: flex; gap: 10px; overflow-x: auto; margin-top: 16px; padding: 4px 4px 10px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.take-thumb { position: relative; flex: 0 0 152px; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; outline: 2px solid transparent; outline-offset: 3px; opacity: .5; transition: opacity .25s, outline-color .25s, transform .3s var(--spring); scroll-snap-align: start; }
.take-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.take-thumb:hover { opacity: 1; transform: translateY(-2px); }
.take-thumb.active { opacity: 1; outline-color: var(--accent); }
.take-num { position: absolute; left: 6px; bottom: 6px; padding: 1px 7px; border-radius: 999px; font-size: 10px; background: rgba(10, 10, 14, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.take-thumb.active .take-num { color: var(--accent); }
.take-origin { position: absolute; top: 4px; right: 7px; color: var(--room); font-size: 10px; text-shadow: 0 0 8px var(--room); }
@media (max-width: 900px) {
  .takes-overlay { padding: 0; }
  .takes-panel { border-radius: 0; height: 100%; padding: 16px; }
  .takes-main { grid-template-columns: 1fr; gap: 18px; }
  .take-thumb { flex-basis: 116px; }
}

/* ---------- Asset page ---------- */
.player-glow { position: relative; margin-bottom: 36px; }
.player-glow::before { content: ""; position: absolute; inset: 8% 4% -6%; background: var(--ambient, none) center / cover; filter: blur(70px) saturate(1.6); opacity: .5; z-index: -1; pointer-events: none; }
.player-wrap { position: relative; background: #000; border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.player-wrap iframe, .player-wrap img { width: 100%; height: 100%; border: 0; object-fit: cover; display: block; }
.notice { padding: 13px 18px; border-radius: 999px; font-size: 13px; margin-bottom: 22px; color: var(--text); background: color-mix(in oklab, var(--room) 14%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--room) 35%, transparent); }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.description { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.4; letter-spacing: -0.015em; margin-bottom: 22px; }
.meta-row { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; color: var(--text); font-size: 13px; margin-bottom: 24px; }
.meta-row strong { color: var(--faint); font-family: var(--font-mono); font-size: 11px; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; margin-right: 8px; }
.meta-row a:hover { color: var(--accent); }
.labels { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 28px; }
.label { padding: 6px 12px; border-radius: 999px; font-size: 12px; color: var(--dim); background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 0 0 1px var(--line); transition: .2s; }
.label:hover { color: var(--text); background: color-mix(in oklab, var(--room) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--room) 45%, transparent); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.side-title { font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--faint); margin-bottom: 14px; }
.side-hint { color: var(--faint); font-size: 12px; margin: -8px 0 14px; }
.multi-shot-note { margin-bottom: 24px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--line); line-height: 1.5; }
.multi-shot-note b { color: var(--text); font-weight: 600; }
.frames { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
.frame { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16 / 9; position: relative; box-shadow: inset 0 0 0 1px var(--line); }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .7s var(--ease); }
.frame-label { position: absolute; top: 7px; left: 7px; padding: 2px 8px; border-radius: 999px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(10, 10, 14, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.frame-dl { position: absolute; bottom: 7px; right: 7px; padding: 4px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; }
/* Sidebar panels float as glass cards */
.public-prompt { margin: 0 0 26px; padding: 18px 20px; border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line); }
.public-prompt p { font-size: 14px; line-height: 1.6; color: var(--dim); white-space: pre-wrap; margin: 6px 0 8px; }
.passport, .premium, .breakdown { padding: 20px 22px; border-radius: var(--radius-lg); background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-edge), var(--float); }
.breakdown { margin-top: 8px; }
.breakdown dl, .passport dl { display: grid; grid-template-columns: max-content 1fr; gap: 0 18px; font-size: 13px; }
.breakdown dt, .passport dt { color: var(--faint); padding: 8px 0; border-top: 1px solid var(--line); }
.breakdown dd, .passport dd { color: var(--text); padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.breakdown dl > :nth-child(-n+2), .passport dl > :nth-child(-n+2) { border-top: 0; }
.breakdown dd::first-letter { text-transform: uppercase; }
.passport { margin-bottom: 24px; }
.passport dd a:hover { color: var(--accent); }
.passport .approved { color: var(--accent); font-weight: 600; }
.premium { position: relative; overflow: hidden; }
.premium::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1; background: radial-gradient(circle, rgba(255, 247, 0, 0.16), transparent 65%); pointer-events: none; }
.premium-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--accent-dim); color: var(--accent); font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px; }
.premium h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.premium p { color: var(--dim); font-size: 13px; margin-bottom: 14px; }
.premium ul { list-style: none; margin-bottom: 18px; }
.premium li { color: var(--dim); font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line); }
.premium li::before { content: "✓"; color: var(--accent); margin-right: 10px; }
.premium .btn { width: 100%; }
.section { margin-top: 72px; }
.section-title { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; margin-bottom: 20px; }
.section-title span { color: var(--faint); font-weight: 400; }

/* ---------- Upload: a floating glass sheet ---------- */
.form { max-width: 640px; margin: 44px auto 120px; padding: 40px; border-radius: var(--radius-xl);
  background: var(--glass-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-edge), var(--float); }
.form h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 10px; }
.form .lead { color: var(--dim); font-size: 15px; margin-bottom: 28px; }
.field { margin-bottom: 20px; }
.field > label:not(.file-drop), .admin-label { display: block; font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); margin-bottom: 9px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12px; color: var(--faint); margin-top: 7px; }
textarea { min-height: 110px; resize: vertical; }
.file-drop { display: block; border: 1.5px dashed rgba(255, 255, 255, 0.14); border-radius: var(--radius-lg); padding: 46px 24px; text-align: center; cursor: pointer; background: rgba(255, 255, 255, 0.02); transition: border-color .25s, background .25s, box-shadow .25s, transform .3s var(--spring); }
.file-drop:hover, .file-drop.drag { border-color: color-mix(in oklab, var(--room) 70%, transparent); background: color-mix(in oklab, var(--room) 8%, transparent); box-shadow: 0 0 50px -16px color-mix(in oklab, var(--room) 60%, transparent); }
.file-drop.drag { transform: scale(1.01); }
.file-drop input { display: none; }
.file-drop p { color: var(--dim); }
.file-drop strong { color: var(--text); font-weight: 600; }
.progress { height: 6px; border-radius: 999px; overflow: hidden; margin-top: 18px; background: rgba(255, 255, 255, 0.06); }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--room), var(--accent)); box-shadow: 0 0 16px color-mix(in oklab, var(--room) 60%, transparent); transition: width .3s var(--ease); }
.status { padding: 14px 18px; border-radius: var(--radius); margin-top: 16px; font-size: 13px; animation: pop .35s var(--spring); background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.status.ok { box-shadow: inset 0 0 0 1px rgba(255, 247, 0, 0.4); background: rgba(255, 247, 0, 0.05); }
.status.ok a { color: var(--accent); font-weight: 600; }
.status.err { box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.45); background: rgba(255, 107, 107, 0.06); color: #FF9A9A; }

/* ---------- Image room ---------- */
.masonry { columns: 4 260px; column-gap: 22px; }
.masonry > * { break-inside: avoid; margin-bottom: 30px; }
.masonry > .card, .masonry > .vcard { display: block; }
.masonry .vcard-cap { margin-top: 10px; }
.img-card { cursor: pointer; display: block; transition: transform .5s var(--ease); }
.img-card:focus-visible { outline-offset: 4px; border-radius: var(--radius); }
.img-frame { position: relative; overflow: hidden; border-radius: var(--radius-lg); isolation: isolate; box-shadow: 0 14px 34px -20px rgba(0, 0, 0, 0.9); transition: box-shadow .5s var(--ease), transform .5s var(--ease); }
.img-frame::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.08); pointer-events: none; z-index: 3; }
.img-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .7s var(--ease), transform .9s var(--ease); }
.img-card:hover .img-frame { transform: translateY(-6px); box-shadow: 0 36px 64px -26px color-mix(in oklab, var(--room) 55%, transparent), 0 16px 34px -16px rgba(0, 0, 0, 0.85); }
.img-card:hover .img-frame img { transform: scale(1.035); }
.img-save { position: absolute; top: 10px; right: 10px; z-index: 2; opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .3s var(--spring), background .2s, color .2s; }
.img-card:hover .img-save, .img-card:focus-within .img-save, .img-save.on { opacity: 1; transform: none; }
@media (hover: none) { .img-save { opacity: 1; transform: none; } }
.img-card figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 13px 4px 0; }
.img-title { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-meta { flex-shrink: 0; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); transition: color .25s; }
.img-card:hover .img-meta { color: var(--room); }
@media (max-width: 560px) {
  .masonry { columns: 2 150px; column-gap: 12px; }
  .masonry > * { margin-bottom: 22px; }
  .img-frame { border-radius: var(--radius); }
}

/* ---------- Slidebox ----------
   A dark, neutral studio: the take is the object being examined, the controls recede.
   Hierarchy: take → wheel → take overview. No colour is taken from the image. */
.sb { --sb-gap: 96px; --sb-bg: #08080A; --sb-panel: #111114; --sb-line: rgba(255, 255, 255, 0.07);
  position: fixed; inset: 0; z-index: 50; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; background: var(--sb-bg); animation: fade .3s var(--ease); scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
.sb::after { content: ""; position: fixed; inset: 0; background: var(--noise); opacity: .35; pointer-events: none; }
.sb > * { position: relative; z-index: 1; }

/* First screen: everything needed to examine one take */
.sb-screen { position: relative; height: 100vh; height: 100dvh; min-height: 520px; display: flex; flex-direction: column; }
.sb-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 18px 24px 8px; animation: rise .5s var(--ease) both; }
.sb-heading { min-width: 0; }
.sb-kicker { display: block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 3px; }
.sb-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-icon { justify-self: end; width: 40px; height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: var(--dim); background: rgba(255, 255, 255, 0.05); transition: color .2s, background .2s, transform .3s var(--spring); }
.sb-icon:hover { color: var(--text); background: rgba(255, 255, 255, 0.1); transform: rotate(90deg); }

/* Explore | Frankenstein */
.sb-modes { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 0 0 1px var(--sb-line); }
.sb-modes[hidden] { display: none; }
.sb-modes button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 16px; border-radius: 999px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); transition: color .2s, background .25s var(--ease); }
.sb-modes button:hover { color: var(--text); }
.sb-modes button[aria-selected="true"] { background: var(--text); color: #08080B; }

.sb-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.sb.mode-frankenstein .sb-main { grid-template-columns: minmax(0, 1fr) 340px; gap: 8px; padding-right: 24px; }
.sb-view { min-width: 0; min-height: 0; display: flex; flex-direction: column; }

.sb-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; animation: rise .6s var(--ease) .05s both; }
.sb-stage.dragging { cursor: grabbing; }
.sb.single .sb-stage { cursor: default; }
.sb-track { position: absolute; inset: 10px 96px; }
.sb-track.anim { transition: transform .42s var(--ease); }
.sb-slide { position: absolute; inset: 0; }
.sb-slide[data-pos="-1"] { transform: translateX(calc(-100% - var(--sb-gap))); }
.sb-slide[data-pos="1"] { transform: translateX(calc(100% + var(--sb-gap))); }
.sb-slide img { width: 100%; height: 100%; object-fit: contain; background-size: contain; background-position: center; background-repeat: no-repeat; pointer-events: none; -webkit-user-drag: none;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6)); transition: opacity .42s var(--ease), transform .42s var(--ease); }
.sb-slide[data-pos="-1"] img, .sb-slide[data-pos="1"] img { opacity: .25; transform: scale(.92); }
.sb-stage.dragging .sb-slide[data-pos="-1"] img, .sb-stage.dragging .sb-slide[data-pos="1"] img,
.sb-track.anim .sb-slide[data-pos="-1"] img, .sb-track.anim .sb-slide[data-pos="1"] img { opacity: 1; transform: none; }
.sb-stage.dragging .sb-slide[data-pos="0"] img { transform: scale(.975); }
.sb-track.anim .sb-slide[data-pos="0"] img { opacity: .4; transform: scale(.92); }
.sb-stage.is-selected::after { content: "✓ Selected"; position: absolute; top: 18px; left: 50%; transform: translateX(-50%); padding: 5px 12px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600; pointer-events: none; animation: pop .3s var(--spring); }
.sb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 999px; display: flex; align-items: center; justify-content: center; color: var(--dim); background: rgba(255, 255, 255, 0.05); transition: background .2s, color .2s, opacity .2s; }
.sb-nav.prev { left: 24px; }
.sb-nav.next { right: 24px; }
.sb-nav:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, 0.11); }
.sb-nav:disabled { opacity: .15; cursor: default; }

/* The generation wheel */
.sb-dial { padding: 6px 24px 0; animation: rise .6s var(--ease) .1s both; }
.sb-readout { display: flex; align-items: baseline; justify-content: center; gap: 8px; min-height: 20px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.sb-take { font-size: 12.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); }
.sb-of { font-size: 11px; color: var(--faint); }
.sb-file { font-size: 11px; color: var(--faint); margin-left: 10px; overflow: hidden; text-overflow: ellipsis; max-width: 40ch; }
.sb-wheel { width: min(720px, 100%); margin: 0 auto; }
.wheel { position: relative; height: 78px; cursor: grab; touch-action: pan-y; outline: none; border-radius: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.wheel.grabbing { cursor: grabbing; }
.wheel canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* Fixed centre mark: the take under it is the selected take */
.wheel-mark { position: absolute; left: 50%; top: 30px; width: 2px; height: 38px; margin-left: -1px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 12px rgba(255, 247, 0, 0.45); pointer-events: none; }
.wheel:focus-visible { box-shadow: inset 0 0 0 1px var(--line-strong); }

.sb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 24px 18px; animation: rise .6s var(--ease) .14s both; }
.sb-bar-left, .sb-bar-right { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.sb.single .sb-bar-left, .sb.single .sb-to-overview { visibility: hidden; }
.sb.mode-frankenstein .sb-bar-left { visibility: hidden; }
.sb-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; color: var(--dim); font-size: 13px; font-weight: 500; transition: color .2s, background .2s, transform .25s var(--spring); }
.sb-btn:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.sb-btn:active { transform: scale(.96); }
.sb-btn[aria-pressed="true"] { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.sb-btn.on, .sb-save.on { background: var(--accent); color: var(--on-accent); }
.sb-ghost { color: var(--faint); }
.sb-check { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; transition: .2s; }
.sb-select.on .sb-check::after { content: "✓"; }
.sb-selcount { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin: 0 6px 0 10px; animation: pop .3s var(--spring); }
.sb-save.pulse { animation: sb-pulse .4s var(--spring); }
@keyframes sb-pulse { 40% { transform: scale(1.12); } }

.sb-info { position: absolute; right: 24px; bottom: 70px; width: 310px; max-height: 60vh; overflow-y: auto; padding: 16px 18px; border-radius: var(--radius); z-index: 3; transform-origin: bottom right; animation: pop .3s var(--spring);
  background: var(--sb-panel); box-shadow: inset 0 0 0 1px var(--sb-line), var(--float); }
.sb-info dl { display: grid; grid-template-columns: max-content 1fr; gap: 0 16px; font-size: 13px; }
.sb-info dt { color: var(--faint); padding: 7px 0; border-top: 1px solid var(--line); }
.sb-info dd { padding: 7px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.sb-info dl > :nth-child(-n+2) { border-top: 0; }
.sb-info .labels { margin: 14px 0 0; }

.sb.single .sb-dial, .sb.single .sb-nav, .sb.single .sb-overview { display: none; }

/* ---------- Take overview (grid | list) ---------- */
.sb-overview { padding: 28px 24px 64px; border-top: 1px solid var(--sb-line); }
.tov-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tov-heading { display: flex; align-items: baseline; gap: 10px; }
.tov-kicker { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.tov-count { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.tov-controls { display: flex; gap: 8px; }
.tov-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(255, 255, 255, 0.045); box-shadow: inset 0 0 0 1px var(--sb-line); }
.tov-seg[hidden] { display: none; }
.tov-seg button { min-width: 32px; padding: 6px 12px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); transition: color .2s, background .2s; }
.tov-sizes button { padding: 6px 9px; }
.tov-seg button:hover { color: var(--text); }
.tov-seg button[aria-checked="true"] { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.tov-sizes i { width: var(--s); height: var(--s); border-radius: 2px; border: 1.5px solid currentColor; }

.tov-body { display: grid; gap: 18px 12px; }
.tov-body[data-view="grid"][data-size="s"] { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.tov-body[data-view="grid"][data-size="m"] { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.tov-body[data-view="grid"][data-size="l"] { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tov-item { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 8px; text-align: left; min-width: 0; color: var(--dim); }
.tov-thumb { grid-column: 1 / -1; position: relative; display: block; aspect-ratio: var(--ar); margin-bottom: 6px; border-radius: 8px; overflow: hidden; background: #141418; box-shadow: inset 0 0 0 1px var(--sb-line); transition: box-shadow .2s; }
.tov-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .82; transition: opacity .25s, transform .4s var(--ease); }
.tov-item:hover .tov-thumb img { opacity: 1; }
.tov-num { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.tov-file { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tov-flags { position: absolute; top: 7px; left: 7px; display: flex; gap: 4px; flex-wrap: wrap; pointer-events: none; }
.tov-flag { display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; }
.tov-check { width: 16px; height: 16px; border-radius: 4px; background: var(--text); color: #08080B; font-size: 10px; }
.tov-saved { width: 7px; height: 7px; margin: 4px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.5); }
.tov-slot { padding: 3px 6px; border-radius: 4px; background: rgba(8, 8, 10, 0.82); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.tov-item.on .tov-thumb { box-shadow: 0 0 0 2px var(--accent); }
.tov-item.on .tov-thumb img { opacity: 1; }
.tov-item.on .tov-num { color: var(--accent); }
.tov-item:focus-visible { outline: none; }
.tov-item:focus-visible .tov-thumb { box-shadow: 0 0 0 2px var(--line-strong); }

/* List: the same items, one compact row each */
.tov-body[data-view="list"] { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--sb-line); }
.tov-body[data-view="list"] .tov-item { grid-template-columns: 52px 96px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 7px 10px; border-bottom: 1px solid var(--sb-line); border-radius: 0; transition: background .15s; }
.tov-body[data-view="list"] .tov-item:hover { background: rgba(255, 255, 255, 0.03); }
.tov-body[data-view="list"] .tov-item.on { background: rgba(255, 247, 0, 0.06); box-shadow: inset 2px 0 0 var(--accent); }
.tov-body[data-view="list"] .tov-thumb { grid-column: auto; width: 52px; margin: 0; border-radius: 5px; }
.tov-body[data-view="list"] .tov-item.on .tov-thumb { box-shadow: none; }
.tov-body[data-view="list"] .tov-flags { position: static; justify-content: flex-end; }

/* ---------- Frankenstein ---------- */
.sb-frank { display: none; }
.sb.mode-frankenstein .sb-frank { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 16px 16px 14px; margin: 10px 0 0; border-radius: var(--radius); background: var(--sb-panel); box-shadow: inset 0 0 0 1px var(--sb-line); animation: pop .3s var(--ease); }
.fk-glyph { flex-shrink: 0; }
.sb-modes .fk-glyph { width: 14px; height: 14px; }
.fk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.fk-kicker { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.fk-title { font-family: var(--font-mono); font-size: 22px; font-weight: 500; letter-spacing: 0.02em; line-height: 1.2; }
.fk-pager { display: flex; align-items: center; gap: 4px; }
.fk-pos { font-family: var(--font-mono); font-size: 11px; color: var(--faint); min-width: 28px; text-align: center; }
.fk-icon { width: 26px; height: 26px; border-radius: 999px; color: var(--dim); font-size: 16px; line-height: 1; }
.fk-icon:hover:not(:disabled) { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.fk-icon:disabled { opacity: .25; }
.fk-new { padding: 5px 10px; border-radius: 999px; font-size: 12px; color: var(--dim); box-shadow: inset 0 0 0 1px var(--sb-line); }
.fk-new:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.fk-note { margin: 8px 0 12px; font-size: 12px; line-height: 1.45; color: var(--faint); }
.fk-slots { list-style: none; display: grid; gap: 6px; }
.fk-slot { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px; border-radius: 10px; background: rgba(255, 255, 255, 0.025); box-shadow: inset 0 0 0 1px var(--sb-line); transition: box-shadow .2s; }
.fk-slot.is-current { box-shadow: inset 0 0 0 1px rgba(255, 247, 0, 0.45); }
.fk-thumb { width: 64px; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #18181C; }
.fk-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fk-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px dashed rgba(255, 255, 255, 0.16); color: var(--faint); font-size: 18px; }
.fk-thumb:hover .fk-empty { color: var(--text); border-color: rgba(255, 255, 255, 0.35); }
.fk-text { display: flex; flex-direction: column; min-width: 0; }
.fk-label { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }
.fk-take { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.fk-file { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fk-act { padding: 6px 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); box-shadow: inset 0 0 0 1px var(--line-strong); white-space: nowrap; transition: color .2s, background .2s; }
.fk-act:hover { color: var(--on-accent); background: var(--accent); box-shadow: none; }
.fk-remove { color: var(--faint); box-shadow: none; }
.fk-remove:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.fk-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 14px; }
.fk-btn { padding: 7px 12px; border-radius: 999px; font-size: 12.5px; color: var(--dim); background: rgba(255, 255, 255, 0.05); transition: color .2s, background .2s; }
.fk-btn:hover:not(:disabled) { color: var(--text); background: rgba(255, 255, 255, 0.1); }
.fk-btn:disabled { opacity: .35; cursor: default; }
.fk-btn.fk-ghost { background: none; color: var(--faint); }

/* Laptop / tablet: Frankenstein moves under the wheel, the page scrolls */
@media (max-width: 1000px) {
  .sb.mode-frankenstein .sb-screen { height: auto; }
  .sb.mode-frankenstein .sb-main { grid-template-columns: minmax(0, 1fr); padding: 0; }
  .sb.mode-frankenstein .sb-stage { flex: none; height: 56vh; height: 56dvh; }
  .sb.mode-frankenstein .sb-frank { margin: 12px 24px 0; overflow: visible; }
  .fk-slots { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}
@media (max-width: 700px) {
  .sb { --sb-gap: 24px; }
  .sb-screen { min-height: 460px; }
  .sb-head { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 12px 6px; gap: 8px 10px; }
  .sb-modes { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .sb-icon { grid-row: 1; grid-column: 2; }
  .sb-title { font-size: 16px; }
  .sb-track { inset: 6px 12px; }
  .sb-dial { padding: 4px 12px 0; }
  .sb-file { max-width: 22ch; margin-left: 6px; }
  .wheel { height: 70px; }
  .wheel-mark { top: 26px; height: 34px; }
  .sb-bar { padding: 8px 8px 14px; gap: 4px; }
  .sb-btn { padding: 8px 10px; font-size: 12px; }
  .sb-info { left: 12px; right: 12px; width: auto; bottom: 64px; }
  .sb.mode-frankenstein .sb-stage { height: 46dvh; }
  .sb.mode-frankenstein .sb-frank { margin: 10px 12px 0; padding: 14px 12px 12px; }
  .fk-slots { grid-template-columns: 1fr; }
  .sb-overview { padding: 22px 12px 48px; }
  .tov-body { gap: 14px 8px; }
  .tov-body[data-view="grid"][data-size="s"] { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
  .tov-body[data-view="grid"][data-size="m"] { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .tov-body[data-view="grid"][data-size="l"] { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .tov-body[data-view="grid"] .tov-file { grid-column: 1 / -1; }
  .tov-body[data-view="list"] .tov-item { grid-template-columns: 44px 76px minmax(0, 1fr) auto; gap: 10px; padding: 6px 4px; }
  .tov-body[data-view="list"] .tov-thumb { width: 44px; }
}
@media (hover: none) { .sb-nav { display: none; } .sb-track { inset: 6px 12px; } }

/* ---------- Project upload workspace ----------
   A dark studio like the Slidebox: the thumbnails are the content, the chrome stays quiet. */
body.studio::before { opacity: .35; }
.pu { --pu-panel: #111114; --pu-line: rgba(255, 255, 255, 0.07); width: min(1360px, 100%); margin: 0 auto; padding: 36px 24px 120px; }
.pu-kicker, .pu-label { display: block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.pu-label { margin-bottom: 10px; }
.pu-muted { color: var(--faint); font-size: 12.5px; }
.pu-error { color: var(--danger); font-size: 13px; }
.pu-loading { padding: 80px 0; text-align: center; }
.pu h1 { font-size: clamp(34px, 5vw, 60px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.02; margin: 10px 0 14px; }
.pu h1 em, .pu-drop-big em { font-family: var(--font-display); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.pu-lead { color: var(--dim); font-size: 16px; max-width: 560px; }
.pu-input { background: rgba(255, 255, 255, 0.035); border: 1px solid var(--pu-line); border-radius: 10px; }
.pu-input-xl { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; padding: 14px 16px; margin-bottom: 10px; }
textarea.pu-input { min-height: 0; }
.pu-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--text); background: rgba(255, 255, 255, 0.07); transition: background .2s, color .2s; white-space: nowrap; }
.pu-btn:hover { background: rgba(255, 255, 255, 0.13); }
.pu-btn.ghost { background: none; color: var(--dim); }
.pu-btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.pu-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); background: rgba(255, 255, 255, 0.06); }
.pu-pill.s-processing { color: var(--ice); background: color-mix(in oklab, var(--ice) 14%, transparent); }
.pu-pill.s-published { color: var(--on-accent); background: var(--accent); }
.pu-pill.s-error { color: var(--danger); background: color-mix(in oklab, var(--danger) 14%, transparent); }

/* Key gate */
.pu-gate { max-width: 520px; margin: 8vh auto 0; }
.pu-key-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 26px; }
.pu-check-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }
.pu-check-row input { width: auto; }

/* Home */
.pu-intro { margin-bottom: 34px; }
.pu-new { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; padding: 24px; border-radius: var(--radius-lg); background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); margin-bottom: 48px; }
.pu-new-side { display: flex; flex-direction: column; gap: 10px; }
.pu-new-side .btn { margin-top: auto; }
.pu-kind { display: grid; gap: 6px; }
.pu-kind label { position: relative; cursor: pointer; }
.pu-kind input { position: absolute; opacity: 0; pointer-events: none; }
.pu-kind span { display: flex; flex-direction: column; padding: 11px 14px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--pu-line); transition: box-shadow .2s, background .2s; }
.pu-kind b { font-size: 14px; font-weight: 600; }
.pu-kind i { font-style: normal; font-size: 12px; color: var(--faint); }
.pu-kind input:checked + span { background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1.5px var(--text); }
.pu-kind input:focus-visible + span { box-shadow: inset 0 0 0 1.5px var(--accent); }
.pu-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.pu-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 10px; border-radius: 14px; background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); transition: box-shadow .2s, transform .3s var(--spring); }
.pu-card:hover { box-shadow: inset 0 0 0 1px var(--line-strong); transform: translateY(-2px); }
.pu-card-cover { aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #18181C; }
.pu-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.pu-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-top: 2px; }
.pu-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pu-card-title { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pu-card-meta { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }

/* Workspace */
.pu-ws-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 24px; margin-bottom: 22px; }
.pu-back { font-size: 13px; color: var(--dim); padding-bottom: 10px; }
.pu-back:hover { color: var(--text); }
.pu-ws-title { min-width: 0; }
.pu-title-input { font-size: clamp(26px, 3.4vw, 40px); font-weight: 600; letter-spacing: -0.035em; padding: 2px 0; margin-top: 6px; background: none; border: 0; border-radius: 0; border-bottom: 1px solid transparent; }
.pu-title-input:hover { border-bottom-color: var(--pu-line); }
.pu-title-input:focus { background: none; box-shadow: none; border-bottom-color: var(--line-strong); }
.pu-head-tools { display: flex; align-items: center; gap: 14px; padding-bottom: 6px; }
.pu-head-tools .pu-save { padding-bottom: 0; }
.pu-list-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.pu-list-head .pu-label { margin: 0; }
.pu-new-key .pu-new-side { justify-content: center; }
.pu-save { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--faint); padding-bottom: 12px; white-space: nowrap; }
.pu-save::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 999px; background: #5BD18B; vertical-align: 1px; }
.pu-save.busy::before { background: var(--accent); animation: breathe 1.2s ease-in-out infinite; }
.pu-steps { display: flex; gap: 4px; padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--pu-line); overflow-x: auto; scrollbar-width: none; }
.pu-steps button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--faint); white-space: nowrap; transition: color .2s, background .2s; }
.pu-steps button:hover { color: var(--text); }
.pu-steps button.on { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.pu-steps i { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; width: 20px; height: 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px currentColor; }
.pu-steps button.done i { background: var(--text); color: #08080B; box-shadow: none; }
.pu-empty-note { padding: 60px 0; text-align: center; color: var(--faint); }

/* The drop zone: huge when the project is empty, a slim strip once things are in */
.pu-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 340px; padding: 40px 24px; text-align: center; cursor: pointer; border-radius: var(--radius-lg); border: 1.5px dashed rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.015); transition: border-color .25s, background .25s; }
.pu-drop:hover, .pu-drop.drag { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.035); }
.pu-drop-big { font-size: clamp(30px, 4.4vw, 52px); font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; }
.pu-drop .btn { margin-top: 8px; }
.pu-drop-hint { font-size: 12.5px; color: var(--faint); margin-top: 6px; }
.pu-drop-hint code { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); }
.pu-drop.compact { flex-direction: row; min-height: 0; padding: 14px 18px; gap: 14px; justify-content: flex-start; text-align: left; border-radius: 14px; }
.pu-drop.compact .pu-muted { margin-left: auto; }
.pu-drop.compact u { text-underline-offset: 3px; }
.pu-drop-icon { width: 28px; height: 28px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.08); font-size: 16px; }
.pu-dropveil { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(6, 6, 9, 0.82); pointer-events: none; animation: fade .2s var(--ease); }
.pu-dropveil[hidden] { display: none; }
.pu-dropveil div { width: min(720px, 100%); padding: 70px 24px; border-radius: var(--radius-xl); border: 2px dashed rgba(255, 255, 255, 0.45); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pu-dropveil b { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; }
.pu-dropveil span { color: var(--dim); }

/* Upload queue summary */
.pu-queue { margin-top: 12px; padding: 12px 16px; border-radius: 12px; background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); }
.pu-queue-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.pu-queue-row .pu-btn { margin-left: auto; }
.pu-queue-bar { height: 3px; margin-top: 10px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.pu-queue-bar i { display: block; height: 100%; background: var(--text); transition: width .3s var(--ease); }

.pu-toolbar { position: sticky; top: 86px; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 18px 0 10px; padding: 8px 10px; border-radius: 14px; background: rgba(12, 12, 16, 0.92); box-shadow: inset 0 0 0 1px var(--pu-line); }
.pu-toolbar-left, .pu-toolbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pu-selcount { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.pu-move { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); }
.pu-move select { width: auto; max-width: 240px; padding: 6px 10px; font-size: 12.5px; border-radius: 999px; }
.pu-suggest { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; padding: 10px 14px; border-radius: 12px; font-size: 13px; color: var(--dim); background: rgba(255, 247, 0, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 247, 0, 0.22); }
.pu-suggest b { color: var(--text); }

/* Scenes */
.pu-board { display: grid; gap: 14px; }
.pu-scene { padding: 14px; border-radius: var(--radius); background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); }
.pu-scene.unsorted { background: none; box-shadow: inset 0 0 0 1px var(--pu-line); border: 0; outline: 1px dashed rgba(255, 255, 255, 0.1); outline-offset: -1px; }
.pu-scene-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; min-width: 0; }
.pu-scene-no { font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.pu-scene-no.num { min-width: 30px; padding: 4px 7px; border-radius: 6px; text-align: center; background: rgba(255, 255, 255, 0.08); }
.pu-scene-title { flex: 1; min-width: 0; padding: 4px 8px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; background: none; border-color: transparent; border-radius: 8px; }
.pu-scene-title:hover { border-color: var(--pu-line); }
.pu-scene-title-static { flex: 1; color: var(--faint); font-size: 13px; }
.pu-scene-count { white-space: nowrap; }
.pu-scene-tools { display: flex; gap: 2px; }
.pu-scene-tools button { padding: 5px 9px; border-radius: 999px; font-size: 12px; color: var(--faint); transition: color .2s, background .2s; }
.pu-scene-tools button:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.pu-scene-tools button.armed { color: var(--danger); background: color-mix(in oklab, var(--danger) 12%, transparent); }
.pu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; min-height: 84px; border-radius: 10px; transition: background .2s, box-shadow .2s; }
.pu-grid.drop-into { background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.3); }
.pu-grid-empty { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; min-height: 84px; border-radius: 10px; border: 1px dashed rgba(255, 255, 255, 0.1); color: var(--faint); font-size: 13px; }

/* A take tile: the thumbnail first, the facts underneath */
.pu-take { position: relative; min-width: 0; cursor: pointer; border-radius: 10px; padding: 4px; transition: background .15s, opacity .2s; user-select: none; -webkit-user-select: none; }
.pu-take:hover { background: rgba(255, 255, 255, 0.035); }
.pu-take.dragging { opacity: .35; }
.pu-take.drop-before::before { content: ""; position: absolute; left: -7px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--accent); }
.pu-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: #18181C; box-shadow: inset 0 0 0 1px var(--pu-line); }
.pu-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.pu-take.sel .pu-thumb { box-shadow: 0 0 0 2px var(--accent); }
.pu-check { position: absolute; top: 7px; left: 7px; width: 18px; height: 18px; border-radius: 5px; background: rgba(8, 8, 10, 0.6); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55); opacity: 0; transition: opacity .15s; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #08080B; }
.pu-take:hover .pu-check, .pu-take.sel .pu-check { opacity: 1; }
.pu-take.sel .pu-check { background: var(--accent); box-shadow: none; }
.pu-take.sel .pu-check::after { content: "✓"; font-weight: 700; }
.pu-dur { position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 10.5px; background: rgba(8, 8, 10, 0.72); }
.pu-state { position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 10.5px; background: rgba(8, 8, 10, 0.78); }
.pu-state:empty { display: none; }
.pu-state b { color: var(--danger); font-weight: 500; }
.pu-state button { text-decoration: underline; text-underline-offset: 2px; color: var(--text); }
.pu-take[data-phase="interrupted"] .pu-state b { color: var(--accent); }
.pu-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0, 0, 0, 0.4); }
.pu-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s linear; }
.pu-ws[data-kind="image"] .pu-thumb { aspect-ratio: 1; background: repeating-conic-gradient(#16161A 0% 25%, #1B1B20 0% 50%) 0 0 / 16px 16px; }
.pu-ws[data-kind="image"] .pu-thumb img { object-fit: contain; }
.pu-ws[data-kind="image"] .pu-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.pu-take-meta { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 8px; padding: 8px 2px 2px; }
.pu-take-no { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.pu-take.sel .pu-take-no { color: var(--accent); }
.pu-tag { justify-self: start; padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); background: rgba(255, 247, 0, 0.08); }
.pu-tag-cover { color: var(--on-accent); background: var(--accent); }
.pu-tools [data-cover].on { color: var(--accent); }
.pu-tag-ms { color: var(--ice); background: color-mix(in oklab, var(--ice) 12%, transparent); }
.pu-fname, .pu-tech { grid-column: 1 / -1; font-family: var(--font-mono); font-size: 10.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pu-fname { color: var(--dim); }
.pu-tech { color: var(--faint); }
.pu-tools { position: absolute; top: 9px; right: 9px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.pu-take:hover .pu-tools, .pu-take:focus-within .pu-tools { opacity: 1; }
.pu-tools button { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; color: var(--text); background: rgba(8, 8, 10, 0.72); }
.pu-tools button:hover { background: rgba(8, 8, 10, 0.95); }
.pu-tools [data-remove]:hover { color: var(--danger); }

/* Reference library: what helped generate the takes. Square cards, the whole image visible. */
.pu-step-count { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); margin-left: 2px; }
.pu-explain { max-width: 720px; margin: -4px 0 16px; font-size: 13.5px; color: var(--dim); }
.pu-explain b { color: var(--text); font-weight: 600; }
.pu-lib { display: grid; gap: 10px; }
.pu-cat { padding: 14px; border-radius: var(--radius); background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); transition: box-shadow .2s, background .2s; }
.pu-cat.empty { padding: 10px 14px; background: none; outline: 1px dashed rgba(255, 255, 255, 0.08); outline-offset: -1px; box-shadow: none; }
.pu-cat.empty .pu-cat-head { margin: 0; }
.pu-cat.drop-into { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.03); }
.pu-cat-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.pu-ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pu-cat.empty .pu-ref-grid { display: none; }
.pu-ref { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 4px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.pu-ref:hover { background: rgba(255, 255, 255, 0.035); }
.pu-ref-thumb { position: relative; aspect-ratio: 1; border-radius: 7px; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: repeating-conic-gradient(#16161A 0% 25%, #1B1B20 0% 50%) 0 0 / 16px 16px; box-shadow: inset 0 0 0 1px var(--pu-line); }
.pu-ref-thumb img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.pu-ref-type { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.14em; color: var(--dim); }
.pu-ref.sel .pu-ref-thumb { box-shadow: 0 0 0 2px var(--accent); }
.pu-ref:hover .pu-check, .pu-ref.sel .pu-check { opacity: 1; }
.pu-ref.sel .pu-check { background: var(--accent); box-shadow: none; }
.pu-ref.sel .pu-check::after { content: "✓"; font-weight: 700; }
.pu-ref:hover .pu-tools, .pu-ref:focus-within .pu-tools { opacity: 1; }
.pu-ref-label { padding: 5px 7px; font-size: 13px; font-weight: 500; border-radius: 6px; background: none; border-color: transparent; }
.pu-ref-label:hover { border-color: var(--pu-line); }
.pu-ref-scene { padding: 4px 7px; font-size: 11.5px; border-radius: 6px; color: var(--dim); background: rgba(255, 255, 255, 0.03); }
.pu-ref .pu-fname { padding: 0 3px; font-family: var(--font-mono); font-size: 10px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 800px) { .pu-ref-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; } }
/* Metadata: a take list and an editor that works on one take or many */
.pu-meta { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.pu-meta-list { min-width: 0; display: grid; gap: 12px; }
.pu-meta-summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; font-size: 13px; background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); }
.pu-meter { width: 120px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.pu-meter i { display: block; height: 100%; background: var(--accent); }
.pu-ok { color: #5BD18B; font-size: 12.5px; }
.pu-meta-group { border-radius: var(--radius); background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); overflow: hidden; }
.pu-meta-group-head { display: flex; align-items: baseline; gap: 12px; width: 100%; padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--pu-line); transition: background .15s; }
.pu-meta-group-head:hover { background: rgba(255, 255, 255, 0.03); }
.pu-row { display: grid; grid-template-columns: 18px 64px 40px minmax(90px, 1.1fr) minmax(0, 2fr) minmax(70px, .7fr) 64px 92px; align-items: center; gap: 12px; padding: 6px 14px; cursor: pointer; border-bottom: 1px solid var(--pu-line); font-size: 12.5px; transition: background .12s; user-select: none; -webkit-user-select: none; }
.pu-row:last-child { border-bottom: 0; }
.pu-row:hover { background: rgba(255, 255, 255, 0.03); }
.pu-row.sel { background: rgba(255, 247, 0, 0.06); box-shadow: inset 2px 0 0 var(--accent); }
.pu-row-check { width: 15px; height: 15px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.3); display: flex; align-items: center; justify-content: center; font-size: 10px; color: #08080B; }
.pu-row.sel .pu-row-check { background: var(--accent); box-shadow: none; }
.pu-row.sel .pu-row-check::after { content: "✓"; font-weight: 700; }
.pu-row-thumb { width: 64px; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #18181C; }
.pu-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pu-row-no { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.pu-row-file, .pu-row-seed { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pu-row-prompt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dim); }
.pu-row-prompt.missing { color: var(--accent); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.pu-row-prompt.missing::before { content: "● "; }
.pu-row-model { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pu-row-vis { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ice); }
.pu-editor { position: sticky; top: 86px; max-height: calc(100vh - 100px); overflow-y: auto; padding: 18px; border-radius: var(--radius-lg); background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); }
.pu-editor-empty p { margin-top: 10px; font-size: 14px; color: var(--dim); }
.pu-editor-empty .pu-muted { font-size: 12.5px; }
.pu-editor-head { margin-bottom: 14px; }
.pu-editor-head h3 { font-size: 16px; font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; }
.pu-field { display: flex; flex-direction: column; margin-bottom: 14px; min-width: 0; }
.pu-field .pu-label { margin-bottom: 7px; }
.pu-label em { font-style: normal; color: var(--accent); margin-left: 6px; }
.pu-field textarea { min-height: 120px; font-size: 13.5px; line-height: 1.5; }
.pu-hint { font-size: 11.5px; color: var(--faint); margin-top: 6px; }
.pu-field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pu-switch { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); cursor: pointer; }
.pu-switch input { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--accent); }
.pu-switch span { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.pu-switch i { font-style: normal; font-size: 11.5px; color: var(--faint); }
.pu-editor-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pu-editor-actions .btn { padding: 10px 18px; }
.pu-tech-block { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--pu-line); }
.pu-tech-block dl { display: grid; grid-template-columns: max-content 1fr; gap: 5px 14px; font-size: 12.5px; }
.pu-tech-block dt { color: var(--faint); }
.pu-tech-block dd { font-family: var(--font-mono); font-size: 11.5px; }
@media (max-width: 1100px) {
  .pu-meta { grid-template-columns: 1fr; }
  .pu-editor { position: sticky; bottom: 0; top: auto; max-height: 62vh; box-shadow: inset 0 0 0 1px var(--line-strong), 0 -20px 50px rgba(0, 0, 0, 0.6); order: 2; }
  .pu-row { grid-template-columns: 18px 56px 36px minmax(0, 1fr) minmax(0, 1.4fr) 60px; }
  .pu-row-seed, .pu-row-vis { display: none; }
}
@media (max-width: 700px) {
  .pu-row { grid-template-columns: 18px 52px minmax(0, 1fr); row-gap: 2px; }
  .pu-row-no { grid-column: 3; grid-row: 1; }
  .pu-row-file, .pu-row-model { display: none; }
  .pu-row-prompt { grid-column: 3; grid-row: 2; }
  .pu-row-check, .pu-row-thumb { grid-row: span 2; }
  .pu-field-pair { grid-template-columns: 1fr; }
}
/* Review: what am I uploading? */
.pu-pill.s-ready { color: #5BD18B; background: rgba(91, 209, 139, 0.12); }
.pu-card-todo { font-size: 11.5px; color: var(--accent); }
.pu-review { display: grid; gap: 22px; }
.pu-review-hero h2 { font-size: clamp(34px, 5vw, 64px); font-weight: 600; letter-spacing: -0.045em; line-height: 1; margin: 8px 0 10px; }
.pu-stats { display: flex; flex-wrap: wrap; gap: 10px 40px; margin-top: 22px; }
.pu-stats div { display: flex; flex-direction: column; }
.pu-stats b { font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pu-stats span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.pu-checks { padding: 16px 18px; border-radius: var(--radius); background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); }
.pu-checks.blocked { box-shadow: inset 0 0 0 1px rgba(255, 247, 0, 0.3); }
.pu-checks.clear { box-shadow: inset 0 0 0 1px rgba(91, 209, 139, 0.35); }
.pu-checks h3 { font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.pu-checks.clear h3::before { content: "✓ "; color: #5BD18B; }
.pu-checks ul { list-style: none; display: grid; gap: 6px; }
.pu-checks li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.025); font-size: 13.5px; }
.pu-flag { display: inline-block; padding: 2px 7px; border-radius: 5px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.pu-flag.block { color: var(--on-accent); background: var(--accent); }
.pu-flag.warn { color: var(--dim); background: rgba(255, 255, 255, 0.08); }
.pu-flag.ok { color: #5BD18B; background: rgba(91, 209, 139, 0.12); }
.pu-review-block { display: grid; gap: 8px; }
.pu-rscene { border-radius: var(--radius); background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); overflow: hidden; }
.pu-rscene summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; list-style: none; }
.pu-rscene summary::-webkit-details-marker { display: none; }
.pu-rscene summary::after { content: "+"; margin-left: auto; color: var(--faint); font-size: 16px; }
.pu-rscene[open] summary::after { content: "–"; }
.pu-rscene summary b { font-size: 14.5px; font-weight: 600; }
.pu-rempty { padding: 0 14px 14px; }
.pu-rt-wrap { overflow-x: auto; border-top: 1px solid var(--pu-line); }
.pu-rtable { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pu-rtable th { text-align: left; font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); padding: 8px 10px; white-space: nowrap; }
.pu-rtable td { padding: 6px 10px; border-top: 1px solid var(--pu-line); vertical-align: middle; white-space: nowrap; }
.pu-rtable tr.has-block td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.pu-rt-thumb { width: 72px; }
.pu-rt-thumb img { width: 64px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; display: block; background: #18181C; }
.pu-rt-no, .pu-rt-mono, .pu-rt-file { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.pu-rt-file { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.pu-rt-prompt { max-width: 340px; overflow: hidden; text-overflow: ellipsis; color: var(--dim); }
.pu-rt-prompt .ok { color: #5BD18B; }
.pu-rt-prompt .no { color: var(--accent); font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.pu-vis { font-style: normal; font-family: var(--font-mono); font-size: 9.5px; color: var(--ice); text-transform: uppercase; letter-spacing: 0.08em; }
.pu-rt-warn .pu-flag { margin-right: 4px; }
.pu-rrefs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; padding: 0 14px 14px; }
.pu-rrefs figure { display: flex; flex-direction: column; gap: 6px; }
.pu-rrefs figcaption { display: flex; flex-direction: column; font-size: 12px; }
.pu-rrefs figcaption span { font-size: 11px; color: var(--faint); }
.pu-review-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--pu-line); }
.pu-danger { margin-left: auto; }
.pu-danger:hover, .pu-danger.armed { color: var(--danger); background: color-mix(in oklab, var(--danger) 12%, transparent); }
@media (max-width: 700px) { .pu-stats { gap: 10px 24px; } .pu-stats b { font-size: 22px; } .pu-checks li { grid-template-columns: 1fr auto; } .pu-checks li .pu-flag { grid-column: 1 / -1; justify-self: start; } .pu-danger { margin-left: 0; } }
/* Rights + Upload project */
.pu-flag.reject { color: #fff; background: color-mix(in oklab, var(--danger) 70%, transparent); }
.pu-review-tally { display: flex; gap: 22px; margin-top: 18px; font-size: 13px; color: var(--faint); }
.pu-review-tally b { font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: var(--text); margin-right: 4px; }
.pu-purge-note { margin-top: 18px; max-width: 620px; }
.pu-result-group { margin-top: 26px; }
.pu-result-group ul { list-style: none; display: grid; gap: 4px; }
.pu-result { display: grid; grid-template-columns: 64px 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); font-size: 12.5px; }
.pu-result.rejected { box-shadow: inset 2px 0 0 color-mix(in oklab, var(--danger) 80%, transparent), inset 0 0 0 1px var(--pu-line); }
.pu-result-thumb { width: 64px; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #18181C; }
.pu-result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pu-result-no { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.pu-result-file { font-family: var(--font-mono); font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pu-why { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 2px 0 4px; font-size: 12.5px; color: var(--dim); }
.pu-why b { color: var(--text); font-weight: 600; }
.pu-why span { color: var(--faint); font-size: 11.5px; }
.pu-done { max-width: 900px; }
.pu-email-label { margin: 14px 0 8px; }
.pu-email-label span { text-transform: none; letter-spacing: 0; font-family: var(--font); color: var(--faint); }
.pu-contact { padding: 16px 18px; border-radius: var(--radius); background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); }
.pu-contact-row { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 16px; align-items: center; }
@media (max-width: 700px) { .pu-contact-row { grid-template-columns: 1fr; gap: 8px; } }
.pu-pill.s-in_review { color: var(--violet); background: color-mix(in oklab, var(--violet) 14%, transparent); }
.pu-pill.s-rejected { color: var(--danger); background: color-mix(in oklab, var(--danger) 12%, transparent); }
#publish-slot { display: grid; gap: 18px; }
.pu-rights { padding: 20px 22px; border-radius: var(--radius-lg); background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--line-strong); }
.pu-rights h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; margin: 6px 0 6px; }
.pu-rights ul { margin: 12px 0 16px 18px; display: grid; gap: 8px; font-size: 13.5px; color: var(--dim); line-height: 1.5; }
.pu-rights-check { margin: 0; background: rgba(255, 247, 0, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 247, 0, 0.25); }
.pu-publish { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.pu-publish-btn { padding: 16px 34px; font-size: 16px; letter-spacing: -0.01em; }
.pu-done { max-width: 760px; margin: 6vh 0 0; }
.pu-done h2 { font-size: clamp(34px, 5vw, 60px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.03; margin: 10px 0 14px; }
.pu-done h2 em { font-family: var(--font-display); font-style: italic; font-weight: 400; }
.pu-done-bar { margin: 22px 0 6px; height: 4px; }
.pu-done-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.pu-done-note { margin-top: 26px; font-family: var(--font-mono); font-size: 11px; }
@media (max-width: 800px) {
  .pu { padding: 22px 16px 96px; }
  .pu-new { grid-template-columns: 1fr; padding: 18px; }
  .pu-ws-head { grid-template-columns: 1fr auto; gap: 8px 14px; }
  .pu-back { grid-column: 1 / -1; padding: 0; }
  .pu-drop { min-height: 260px; }
  .pu-drop.compact .pu-muted { display: none; }
  .pu-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .pu-toolbar { top: 76px; }
  .pu-scene { padding: 10px; }
  .pu-scene-head { flex-wrap: wrap; }
  .pu-scene-title { flex-basis: 100%; order: 3; }
}
@media (hover: none) { .pu-tools, .pu-check { opacity: 1; } }

/* ---------- Review queue ---------- */
.rv { width: min(1500px, 100%); }
.rv-empty { max-width: 640px; margin: 10vh auto 0; text-align: center; }
.rv-empty .pu-btn { margin-top: 18px; }
.rv-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.rv-projects { position: sticky; top: 86px; display: grid; gap: 6px; }
.rv-projects-head { display: flex; align-items: baseline; gap: 8px; padding: 0 4px 8px; }
.rv-projects-head b { font-family: var(--font-mono); font-size: 26px; font-weight: 500; }
.rv-project { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 10px 12px; border-radius: 12px; background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); transition: box-shadow .2s, background .2s; min-width: 0; }
.rv-project:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.rv-project.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.rv-project b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-project span { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-project i { font-style: normal; color: var(--accent); }
.rv-name { margin-top: 14px; display: block; }
.rv-email { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 12px; line-height: 1.45; color: var(--dim); background: rgba(255, 255, 255, 0.03); }
.rv-email.warn { color: var(--accent); background: rgba(255, 247, 0, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 247, 0, 0.2); }
.rv-empty .rv-email { display: inline-block; margin-top: 18px; }
.rv-main { min-width: 0; display: grid; gap: 14px; }
.rv-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.rv-head h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 600; letter-spacing: -0.035em; margin: 4px 0 2px; }
.rv-meta { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; font-size: 12.5px; color: var(--dim); }
.rv-meta a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.rv-rights summary { cursor: pointer; color: #5BD18B; }
.rv-rights ul { margin: 8px 0 0 18px; max-width: 520px; font-size: 12px; color: var(--faint); display: grid; gap: 4px; }
.rv-refs { border-radius: var(--radius); background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--pu-line); padding: 10px 14px; }
.rv-refs summary { cursor: pointer; list-style: none; }
.rv-refs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 10px; }
.rv-refs-grid figure { display: flex; flex-direction: column; gap: 5px; }
.rv-refs-grid figcaption { display: flex; flex-direction: column; font-size: 11.5px; }
.rv-refs-grid figcaption span { color: var(--faint); text-transform: capitalize; }
.rv-work { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 16px; align-items: start; }
.rv-list { display: grid; gap: 12px; max-height: calc(100vh - 120px); overflow-y: auto; position: sticky; top: 86px; padding-right: 4px; scrollbar-width: thin; }
.rv-scene header { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 0 2px 6px; }
.rv-scene-ok { padding: 4px 8px; font-size: 11px; }
.rv-take { display: grid; grid-template-columns: 72px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 5px; margin-bottom: 4px; border-radius: 9px; text-align: left; transition: background .15s, box-shadow .15s; }
.rv-take:hover { background: rgba(255, 255, 255, 0.04); }
.rv-take.on { background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1.5px var(--accent); }
.rv-take-thumb { width: 72px; aspect-ratio: 16 / 9; border-radius: 5px; overflow: hidden; background: #18181C; }
.rv-take-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rv-take-no { font-family: var(--font-mono); font-size: 11px; color: var(--dim); }
.rv-dot { width: 9px; height: 9px; border-radius: 999px; margin-right: 4px; background: var(--accent); box-shadow: 0 0 8px rgba(255, 247, 0, 0.5); }
.rv-take.s-ready .rv-dot { background: #5BD18B; box-shadow: none; }
.rv-take.s-rejected .rv-dot { background: var(--danger); box-shadow: none; }
.rv-take.s-ready, .rv-take.s-rejected { opacity: .62; }
.rv-take.s-ready.on, .rv-take.s-rejected.on { opacity: 1; }
.rv-focus { min-width: 0; display: grid; gap: 14px; }
.rv-media { border-radius: var(--radius); overflow: hidden; background: #000; aspect-ratio: 16 / 9; box-shadow: inset 0 0 0 1px var(--pu-line); }
.rv-media iframe, .rv-media img { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; }
.rv-media .card-placeholder { height: 100%; }
.rv-decide { padding: 14px 16px; border-radius: var(--radius); background: var(--pu-panel); box-shadow: inset 0 0 0 1px var(--line-strong); display: grid; gap: 12px; }
.rv-decide.s-ready { box-shadow: inset 0 0 0 1px rgba(91, 209, 139, 0.45); }
.rv-decide.s-rejected { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--danger) 55%, transparent); }
.rv-decided { font-size: 13.5px; font-weight: 600; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.rv-decided span { font-weight: 400; font-size: 12px; color: var(--faint); }
.rv-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-size: 12.5px; color: var(--dim); }
.rv-checks label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.rv-checks input { width: 15px; height: 15px; accent-color: #5BD18B; }
.rv-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.rv-approve { padding: 12px 22px; }
.rv-reject { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto; gap: 8px; }
.rv-reject .pu-input { padding: 9px 12px; font-size: 13px; }
.rv-reject-btn { color: #fff; background: color-mix(in oklab, var(--danger) 55%, transparent); }
.rv-reject-btn:hover { background: color-mix(in oklab, var(--danger) 75%, transparent); }
kbd { font-family: var(--font-mono); font-size: 10px; padding: 1px 5px; margin-left: 6px; border-radius: 4px; background: rgba(0, 0, 0, 0.18); }
.rv-facts { display: grid; gap: 12px; padding: 4px 2px; }
.rv-prompt p { font-size: 13.5px; line-height: 1.55; color: var(--dim); white-space: pre-wrap; margin-top: 4px; max-height: 220px; overflow-y: auto; }
.rv-facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; font-size: 12.5px; }
.rv-facts dt { color: var(--faint); }
.rv-facts .labels { margin: 0; }
@media (max-width: 1100px) {
  .rv-shell { grid-template-columns: 1fr; }
  .rv-projects { position: static; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .rv-projects-head, .rv-name { grid-column: 1 / -1; }
  .rv-work { grid-template-columns: 1fr; }
  .rv-list { position: static; max-height: none; display: flex; gap: 6px; overflow-x: auto; }
  .rv-scene { flex-shrink: 0; }
  .rv-take { grid-template-columns: 64px auto auto; width: auto; }
  .rv-actions, .rv-reject { grid-template-columns: 1fr; }
  .rv-checks { grid-template-columns: 1fr; }
}

/* ---------- Image upload ---------- */
.upload-tabs { margin-bottom: 26px; }
.form-note { color: var(--dim); font-size: 13px; margin-bottom: 22px; }
.img-sel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 13px; }
.img-picks { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.img-picks li { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); animation: pop .35s var(--spring) both; box-shadow: inset 0 0 0 1px var(--line); }
.img-picks img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-pick-num { position: absolute; top: 5px; left: 5px; padding: 1px 7px; border-radius: 999px; color: var(--accent); font-size: 10px; background: rgba(10, 10, 14, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.img-pick-actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 5px; background: linear-gradient(transparent, rgba(5, 5, 8, 0.8)); opacity: 0; transition: opacity .2s; }
.img-picks li:hover .img-pick-actions, .img-picks li:focus-within .img-pick-actions { opacity: 1; }
@media (hover: none) { .img-pick-actions { opacity: 1; } }
.img-pick-actions button { width: 26px; height: 26px; border-radius: 999px; font-size: 12px; background: rgba(14, 14, 20, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.img-pick-actions button:hover:not(:disabled) { background: var(--accent); color: var(--on-accent); }
.img-pick-actions button:disabled { opacity: .3; cursor: default; }
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 15px 18px; margin-bottom: 22px; border-radius: var(--radius); cursor: pointer; font-size: 13px; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s; animation: pop .35s var(--spring); }
.toggle:hover { background: rgba(255, 255, 255, 0.06); }
.toggle input { width: auto; margin-top: 3px; accent-color: var(--accent); }
.toggle .hint { margin-top: 2px; }
.more { margin-bottom: 24px; }
.more summary { cursor: pointer; font-size: 13px; color: var(--dim); transition: color .2s; }
.more summary:hover { color: var(--text); }
.more[open] > :not(summary) { animation: rise .45s var(--ease) both; }
.more summary span, .optional { color: var(--faint); font-weight: 400; text-transform: none; letter-spacing: 0; font-family: var(--font); }

/* ---------- Admin ---------- */
.admin-key { display: flex; gap: 8px; width: min(380px, 100%); }
.admin-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .admin-grid { grid-template-columns: 1fr; } .page-head { flex-wrap: wrap; } }
.admin-groups { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.admin-group { display: flex; justify-content: space-between; gap: 12px; text-align: left; padding: 11px 14px; border-radius: var(--radius-sm); color: var(--dim); transition: .2s; }
.admin-group:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.admin-group.active { background: var(--glass-bg); color: var(--text); box-shadow: var(--glass-edge), inset 3px 0 0 var(--room); }
.admin-group .count { color: var(--faint); font-family: var(--font-mono); font-size: 11px; white-space: nowrap; }
.admin-takes { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.admin-takes li, .admin-candidate { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius); background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s; }
.admin-takes li { animation: pop .3s var(--spring) both; }
.admin-candidate:hover { background: rgba(255, 255, 255, 0.06); }
.admin-pos { color: var(--accent); font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; width: 22px; }
.admin-thumb { flex: 0 0 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--elevated); }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-desc { flex: 1; min-width: 0; font-size: 13px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.admin-desc em { display: block; font-style: normal; color: var(--faint); font-size: 12px; }
.admin-takes .admin-desc em { display: inline; }
.admin-row-actions { display: flex; gap: 4px; }
.admin-row-actions .btn-icon { width: 34px; height: 34px; }
.admin-row-actions .btn-icon:disabled { opacity: .3; cursor: default; }
.admin-actions { display: flex; gap: 8px; margin-top: 18px; }
.admin-add-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.admin-add-bar .btn { white-space: nowrap; }
.admin-candidates { display: flex; flex-direction: column; gap: 6px; max-height: 520px; overflow-y: auto; }
.admin-candidate { cursor: pointer; }
.admin-candidate input { width: auto; accent-color: var(--accent); }

/* ---------- Misc ---------- */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 16px 0 32px; }
.page-head h1 { font-size: clamp(32px, 4.4vw, 56px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.page-head .count { color: var(--faint); margin-left: 14px; font-family: var(--font-mono); font-size: 13px; font-weight: 400; letter-spacing: 0.06em; vertical-align: middle; }
.empty { padding: 90px 24px; text-align: center; color: var(--dim); animation: rise .7s var(--ease) both; }
.empty h2 { font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.01em; margin-bottom: 10px; color: var(--text); }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px) scale(.96); opacity: 0; padding: 11px 20px; border-radius: 999px; font-size: 13px; pointer-events: none; z-index: 60; transition: opacity .25s var(--ease), transform .4s var(--spring);
  background: var(--glass-strong-bg); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: var(--glass-edge), var(--float); }
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* Phones: a 16px gutter, and four nav links that still fit in 390px. */
@media (max-width: 560px) {
  .nav { padding: 0 8px; top: 8px; margin-top: 8px; }
  .nav-inner { padding: 5px 5px 5px 14px; gap: 8px; }
  .nav-links a { padding: 7px 8px; font-size: 12.5px; gap: 0; }
  .nav-links a::before { display: none; }
  .logo { font-size: 13px; letter-spacing: 0.08em; }
  .container { padding: 28px 16px 96px; }
  .hero { padding: 20px 0 28px; }
  .hero p { font-size: 15px; }
  .search { height: 56px; }
  .form { margin: 20px 8px 80px; padding: 24px 18px; border-radius: var(--radius-lg); }
}

/* Respect reduced motion: everything appears in place. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html.js-reveal .vcard, html.js-reveal .img-card { opacity: 1; transform: none; }
}
