@font-face { font-family: "Unbounded"; font-weight: 900; src: url("fonts/unbounded-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Unbounded"; font-weight: 700; src: url("fonts/unbounded-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; src: url("fonts/space-grotesk-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; src: url("fonts/space-grotesk-700-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; src: url("fonts/jetbrains-400-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 700; src: url("fonts/jetbrains-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 900; src: url("fonts/fraunces-900-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 400; font-style: italic; src: url("fonts/fraunces-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-weight: 700; src: url("fonts/zilla-slab-700-normal.woff2") format("woff2"); }

:root {
  --bg: #08090d; --bg2: #0e1017; --panel: rgba(18, 20, 28, 0.72); --line: rgba(255,255,255,0.08); --line2: rgba(255,255,255,0.16);
  --text: #f2f3f7; --sub: #9aa0ad; --faint: #5c6270; --accent: #7dff9a; --ink: #001a08;
  --ui: "Space Grotesk", system-ui, sans-serif; --display: "Unbounded", sans-serif; --mono: "JetBrains Mono", ui-monospace, monospace;
  --rail: 248px; --theatre: 920px; --r: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
body { overflow-x: hidden; }
::selection { background: var(--accent); color: var(--ink); }
button, input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
kbd { font: 700 11px/1 var(--mono); color: var(--faint); border: 1px solid var(--line2); border-radius: 6px; padding: 3px 6px; }
#app { min-height: 100vh; display: grid; grid-template-columns: var(--rail) 1fr; grid-template-rows: 64px 1fr; }
#app::before { content: ""; position: fixed; inset: -20% -10% auto; height: 70vh; background: radial-gradient(60% 60% at 30% 20%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%); pointer-events: none; transition: background 0.8s ease; z-index: 0; }

/* header */
.top { grid-column: 1 / -1; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 0 22px; background: linear-gradient(180deg, rgba(8,9,13,0.92), rgba(8,9,13,0.6)); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.wordmark { display: flex; align-items: center; gap: 10px; margin-right: 10px; }
.wordmark .mark { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); box-shadow: 0 0 22px color-mix(in oklab, var(--accent) 70%, transparent); transition: background 0.5s, box-shadow 0.5s; }
.wordmark b { font: 900 15px/1 var(--display); letter-spacing: 0.06em; }
.wordmark i { font: 500 13px/1 var(--ui); color: var(--sub); font-style: normal; }
.search { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px 0 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.03); color: var(--sub); transition: border-color 0.2s; }
.search:focus-within { border-color: var(--line2); color: var(--text); }
.search input { flex: 1; background: none; border: 0; outline: 0; }
.filters { display: flex; gap: 6px; margin-left: auto; }
.chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--sub); font: 500 13px/1 var(--ui); cursor: pointer; transition: all 0.15s; }
.chip:hover { border-color: var(--line2); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn { height: 38px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line2); background: rgba(255,255,255,0.04); cursor: pointer; font-weight: 700; transition: transform 0.12s, background 0.2s, border-color 0.2s; }
.btn:hover { background: rgba(255,255,255,0.08); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn.primary { background: var(--accent); color: var(--ink); border-color: transparent; box-shadow: 0 8px 30px color-mix(in oklab, var(--accent) 35%, transparent); }
.btn.ghost { color: var(--sub); }

/* rail */
.rail { position: sticky; top: 64px; height: calc(100vh - 64px); padding: 18px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; overflow: auto; z-index: 1; }
.rail h6 { margin: 10px 12px 6px; font: 700 11px/1 var(--mono); letter-spacing: 0.22em; color: var(--faint); text-transform: uppercase; }
.rail .item { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 12px; cursor: pointer; color: var(--sub); border: 1px solid transparent; transition: all 0.15s; }
.rail .item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.rail .item.on { background: rgba(255,255,255,0.06); color: var(--text); border-color: var(--line); }
.rail .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px color-mix(in oklab, var(--c) 60%, transparent); flex: none; }
.rail .name { flex: 1; font-weight: 700; font-size: 13px; letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail .n { font: 700 12px/1 var(--mono); color: var(--faint); }
.rail .item.sub { height: 34px; padding-left: 32px; font-size: 13px; }
.rail .foot { margin-top: auto; padding: 14px 12px 6px; font: 400 11px/1.6 var(--mono); color: var(--faint); border-top: 1px solid var(--line); }

/* main */
.main { padding: 26px 28px 80px; min-width: 0; z-index: 1; }
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 30px; }
.hero:empty { display: none; }
.hero .lead { position: relative; min-height: 380px; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); background: var(--bg2); cursor: pointer; isolation: isolate; }
.hero .lead video, .hero .lead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; opacity: 0.85; transform: scale(1.02); transition: transform 0.8s ease; }
.hero .lead:hover video, .hero .lead:hover img { transform: scale(1.06); }
.hero .lead .veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,9,13,0.92) 0%, rgba(8,9,13,0.55) 45%, rgba(8,9,13,0.1) 100%); }
.hero .lead .copy { position: absolute; left: 30px; bottom: 28px; right: 40%; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 700 11px/1 var(--mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--c, var(--accent)); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.hero h1 { margin: 12px 0 8px; font: 900 34px/1.1 var(--display); letter-spacing: -0.01em; }
.hero p { margin: 0 0 16px; color: var(--sub); font-size: 15px; max-width: 46ch; }
.hero .side { display: grid; grid-template-rows: 1fr 1fr; gap: 18px; }
.hero .stat { border: 1px solid var(--line); border-radius: 22px; background: var(--panel); padding: 22px 24px; display: flex; flex-direction: column; justify-content: space-between; }
.hero .stat .big { font: 900 44px/1 var(--display); letter-spacing: -0.02em; }
.hero .stat .big small { font: 700 13px/1 var(--mono); color: var(--sub); letter-spacing: 0.1em; margin-left: 8px; }
.hero .stat .rule { color: var(--sub); font-size: 14px; }
.hero .stat .rule b { color: var(--text); }
.hero .stat .bars { display: flex; gap: 6px; margin: 10px 0 14px; height: 6px; }
.hero .stat .bars i { flex: 1; border-radius: 3px; background: var(--line2); }
.hero .stat .bars i.on { background: var(--accent); box-shadow: 0 0 10px color-mix(in oklab, var(--accent) 50%, transparent); }

.shelf .group { margin-bottom: 34px; }
.shelf .ghead { display: flex; align-items: baseline; gap: 14px; margin: 0 0 14px; }
.shelf .ghead h2 { margin: 0; font: 900 18px/1 var(--display); letter-spacing: 0.02em; }
.shelf .ghead .tag { font: 400 12px/1 var(--mono); color: var(--sub); }
.shelf .ghead .line { flex: 1; height: 1px; background: var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 16px; }
.card { position: relative; border-radius: var(--r); overflow: hidden; background: var(--bg2); border: 1px solid var(--line); cursor: pointer; transition: transform 0.25s cubic-bezier(.2,.8,.2,1), border-color 0.2s, box-shadow 0.3s; isolation: isolate; outline: 0; }
.card:hover, .card:focus-visible { transform: translateY(-4px); border-color: var(--line2); box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 0 1px color-mix(in oklab, var(--c) 40%, transparent); }
.card .frame { position: relative; aspect-ratio: 9 / 16; background: #000; }
.card img, .card video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card video { opacity: 0; transition: opacity 0.35s; }
.card.playing video { opacity: 1; }
.card .badge { position: absolute; right: 10px; top: 10px; font: 700 11px/1 var(--mono); padding: 6px 8px; border-radius: 8px; background: rgba(0,0,0,0.55); backdrop-filter: blur(6px); }
.card .status { position: absolute; left: 10px; top: 10px; font: 700 10px/1 var(--mono); letter-spacing: 0.14em; padding: 6px 8px; border-radius: 8px; background: rgba(0,0,0,0.55); backdrop-filter: blur(6px); text-transform: uppercase; }
.card .status.new { background: var(--c); color: var(--ink); }
.card .status.posted { color: #fff; }
.card .status.scheduled { color: var(--c); }
.card .status.superseded { color: var(--faint); }
.card .under { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 12px 12px; background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85)); }
.card h3 { margin: 0; font: 900 14px/1.25 var(--display); }
.card .hook { margin: 6px 0 0; font-size: 12px; color: var(--sub); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { display: flex; gap: 8px; align-items: center; margin-top: 8px; font: 700 10px/1 var(--mono); letter-spacing: 0.12em; color: var(--c); text-transform: uppercase; }
.card .meta .ep { color: var(--faint); }
.card .views { position: absolute; left: 10px; bottom: 10px; display: none; }
.empty { padding: 60px 0; text-align: center; color: var(--faint); }

/* theatre */
.scrim { position: fixed; inset: 0; background: rgba(4,5,8,0.55); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity 0.3s; z-index: 30; }
.scrim.on { opacity: 1; pointer-events: auto; }
.theatre { position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--theatre), 100vw); background: rgba(12,13,19,0.96); border-left: 1px solid var(--line2); transform: translateX(102%); transition: transform 0.38s cubic-bezier(.2,.8,.2,1); z-index: 40; display: grid; grid-template-columns: 380px 1fr; overflow: hidden; }
.theatre.on { transform: translateX(0); }
.theatre .stage { padding: 22px 0 22px 22px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid var(--line); }
.theatre .player { position: relative; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #000; border: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.theatre video { width: 100%; height: 100%; display: block; object-fit: cover; }
.theatre .ctrl { display: flex; align-items: center; gap: 10px; padding-right: 22px; }
.theatre .ctrl button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255,255,255,0.04); cursor: pointer; display: grid; place-items: center; }
.theatre .ctrl button:hover { background: rgba(255,255,255,0.1); }
.theatre .ctrl .time { font: 700 12px/1 var(--mono); color: var(--sub); min-width: 86px; text-align: center; }
.scrub { position: relative; flex: 1; height: 28px; cursor: pointer; }
.scrub .track { position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: var(--line2); }
.scrub .fill { position: absolute; left: 0; top: 12px; height: 4px; border-radius: 2px; background: var(--accent); width: 0; }
.scrub .beat { position: absolute; top: 8px; width: 2px; height: 12px; background: rgba(255,255,255,0.35); border-radius: 1px; }
.scrub .beat:hover::after { content: attr(data-name); position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font: 700 10px/1 var(--mono); padding: 4px 6px; border-radius: 6px; background: var(--text); color: var(--bg); white-space: nowrap; }
.scrub .knob { position: absolute; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); transform: translateX(-50%); }
.theatre .nowline { padding-right: 22px; min-height: 56px; font: 400 15px/1.45 var(--ui); color: var(--sub); }
.theatre .nowline b { color: var(--text); }
.theatre .sheet { overflow: auto; padding: 22px 26px 40px; }
.theatre .close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255,255,255,0.04); cursor: pointer; font-size: 18px; z-index: 2; }
.theatre h2 { margin: 6px 0 4px; font: 900 30px/1.1 var(--display); letter-spacing: -0.01em; padding-right: 60px; }
.theatre .brandline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; font: 700 12px/1 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--c); }
.theatre .brandline .pill { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line2); color: var(--sub); }
.theatre .brandline .pill.new { background: var(--c); color: var(--ink); border-color: transparent; }
.theatre .hookq { font: 900 20px/1.3 var(--display); margin: 0 0 18px; }
.theatre .hookq i { font-style: normal; color: var(--c); }
.theatre .kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; margin: 0 0 20px; font-size: 14px; }
.theatre .kv dt { font: 700 11px/1.6 var(--mono); letter-spacing: 0.16em; color: var(--faint); text-transform: uppercase; }
.theatre .kv dd { margin: 0; color: var(--sub); }
.theatre .kv dd b { color: var(--text); }
.theatre h5 { margin: 22px 0 8px; font: 700 11px/1 var(--mono); letter-spacing: 0.22em; color: var(--faint); text-transform: uppercase; }
.theatre .lines { display: flex; flex-direction: column; gap: 6px; }
.theatre .line { display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; transition: all 0.15s; }
.theatre .line:hover { background: rgba(255,255,255,0.04); }
.theatre .line.on { border-color: var(--c); background: color-mix(in oklab, var(--c) 10%, transparent); }
.theatre .line .t { font: 700 11px/1.6 var(--mono); color: var(--faint); }
.theatre .line .x { font-size: 14px; }
.theatre .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.theatre .chips span { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line2); font-size: 13px; color: var(--sub); }
.theatre .analytics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.theatre .analytics div { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.theatre .analytics b { display: block; font: 900 22px/1 var(--display); }
.theatre .analytics small { font: 700 10px/1 var(--mono); letter-spacing: 0.14em; color: var(--faint); text-transform: uppercase; }
.theatre .actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.theatre .src { font-size: 13px; color: var(--sub); }
.theatre .src b { color: var(--text); }
.theatre .path { font: 400 12px/1.6 var(--mono); color: var(--faint); word-break: break-all; }

/* composer */
.composer { position: fixed; left: 50%; top: 50%; width: min(760px, 94vw); transform: translate(-50%, -46%) scale(0.98); opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(.2,.8,.2,1); z-index: 50; background: rgba(14,16,23,0.98); border: 1px solid var(--line2); border-radius: 26px; padding: 26px 28px; box-shadow: 0 40px 120px rgba(0,0,0,0.7); }
.composer.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.composer h2 { margin: 0 0 4px; font: 900 22px/1.1 var(--display); }
.composer p.lead { margin: 0 0 18px; color: var(--sub); font-size: 14px; }
.composer .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.composer label { display: flex; flex-direction: column; gap: 6px; font: 700 11px/1 var(--mono); letter-spacing: 0.16em; color: var(--faint); text-transform: uppercase; }
.composer input, .composer textarea, .composer select { height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line2); background: rgba(255,255,255,0.03); color: var(--text); outline: 0; font: 500 14px/1.4 var(--ui); }
.composer textarea { height: 96px; padding: 10px 12px; resize: vertical; }
.composer input:focus, .composer textarea:focus, .composer select:focus { border-color: var(--accent); }
.composer .rules { font-size: 12px; color: var(--faint); margin: 6px 0 16px; line-height: 1.7; }
.composer .rules b { color: var(--sub); }
.composer .foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.composer .queue { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; max-height: 160px; overflow: auto; font-size: 13px; color: var(--sub); }
.composer .queue div { display: flex; gap: 10px; padding: 6px 0; }
.composer .queue .b { font: 700 10px/1.8 var(--mono); letter-spacing: 0.14em; color: var(--accent); text-transform: uppercase; min-width: 130px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); opacity: 0; padding: 12px 18px; border-radius: 12px; background: var(--text); color: var(--bg); font-weight: 700; transition: all 0.3s; z-index: 60; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 1100px) { .theatre { grid-template-columns: 1fr; } .theatre .stage { border-right: 0; padding-right: 22px; } .hero { grid-template-columns: 1fr; } }
@media (max-width: 860px) { #app { grid-template-columns: 1fr; } .rail { display: none; } .filters { display: none; } }

.card .gate-dot { position: absolute; right: 12px; bottom: 12px; width: 10px; height: 10px; border-radius: 50%; background: #7dff9a; box-shadow: 0 0 10px #7dff9a; }
.card .gate-dot.bad { background: #ff5a5a; box-shadow: 0 0 10px #ff5a5a; }
.theatre .gate { display: flex; flex-direction: column; gap: 8px; }
.theatre .gate div { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; font-size: 13px; color: var(--sub); }
.theatre .gate div.ok b { color: #7dff9a; } .theatre .gate div.bad b { color: #ff5a5a; }
.theatre .gate b { display: block; font: 700 12px/1.6 var(--mono); letter-spacing: 0.08em; }
.theatre .gate ul { margin: 6px 0 0; padding-left: 18px; color: #ffb3b3; }

.theatre .meta .tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.theatre .meta .tab { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--sub); font: 700 12px/1 var(--ui); cursor: pointer; }
.theatre .meta .tab.on { background: var(--c); color: var(--ink); border-color: transparent; }
.theatre .meta .pane { display: none; } .theatre .meta .pane.on { display: block; }
.theatre .meta .field { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.theatre .meta .fh { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: rgba(255,255,255,0.03); font: 700 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.theatre .meta .fh .n { margin-left: auto; font-weight: 400; }
.theatre .meta .copy { height: 26px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line2); background: transparent; color: var(--text); font: 700 11px/1 var(--ui); cursor: pointer; }
.theatre .meta .copy:hover { background: var(--text); color: var(--bg); }
.theatre .meta pre { margin: 0; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; font: 400 13px/1.55 var(--ui); color: var(--text); }
