:root {
  --bg: #08090d;
  --panel: #101218;
  --panel-2: #151821;
  --text: #f6f6f3;
  --muted: #8e94a5;
  --line: rgba(255,255,255,.09);
  --lime: #c4f86a;
  --violet: #9481ff;
  --orange: #ff9966;
  --shadow: 0 24px 70px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; }
body { margin: 0; font-family: Manrope, system-ui, sans-serif; background: radial-gradient(circle at 80% -10%, rgba(148,129,255,.13), transparent 34rem), radial-gradient(circle at 8% 35%, rgba(196,248,106,.035), transparent 22rem), var(--bg); min-height: 100vh; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; }
.topbar { height: 76px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; padding: 0 4vw; gap: 52px; border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(8,9,13,.86); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.06em; font-size: 21px; }
.brand-mark { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; background: var(--lime); color: #10120b; font-size: 16px; transform: rotate(-8deg); }
.primary-nav { display: flex; align-items: center; gap: 30px; height: 100%; }
.nav-link { color: var(--muted); font-size: 14px; font-weight: 600; position: relative; }
.nav-link.active, .nav-link:hover { color: var(--text); }
.nav-link.active::after { content: ""; position: absolute; bottom: -29px; left: 0; right: 0; height: 2px; background: var(--lime); box-shadow: 0 0 16px var(--lime); }
.top-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.icon-btn, .avatar, .close-btn { border: 0; background: transparent; color: var(--text); }
.icon-btn { font-size: 25px; width: 38px; height: 38px; }
.credit-pill { border: 1px solid rgba(196,248,106,.25); background: rgba(196,248,106,.09); color: var(--lime); border-radius: 999px; height: 36px; padding: 0 13px; display: flex; gap: 7px; align-items: center; font-family: "DM Mono", monospace; font-size: 12px; }
.spark { font-size: 11px; }
.avatar { width: 37px; height: 37px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--orange)); color: white; font-size: 11px; font-weight: 800; }
.page-wrap { max-width: 1440px; margin: 0 auto; padding: 36px 4vw 90px; }
.eyebrow { font-family: "DM Mono", monospace; font-size: 10px; letter-spacing: .17em; color: var(--lime); text-transform: uppercase; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 12px 0 28px; }
.page-heading h1 { font-size: clamp(30px, 4vw, 52px); line-height: .98; margin: 6px 0 0; letter-spacing: -.065em; }
.page-heading p { max-width: 450px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.section { margin: 42px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.section-head h2 { font-size: 18px; letter-spacing: -.04em; margin: 0; }
.section-head a, .text-btn { color: var(--lime); font-size: 12px; font-weight: 700; background: transparent; border: 0; }
.hero { min-height: 430px; border: 1px solid var(--line); border-radius: 26px; overflow: hidden; position: relative; display: flex; align-items: end; padding: 42px; background: linear-gradient(90deg, rgba(6,7,11,.96) 0%, rgba(6,7,11,.82) 38%, rgba(6,7,11,.42) 60%, rgba(6,7,11,.08) 100%), var(--hero-img, url('assets/hero-keyart.png')) center top/cover; box-shadow: var(--shadow); }
.hero::before { content: ""; position: absolute; width: 58%; aspect-ratio: 1; right: -13%; top: -28%; border: 1px solid rgba(196,248,106,.22); border-radius: 50%; box-shadow: 0 0 0 22px rgba(148,129,255,.05), 0 0 0 65px rgba(148,129,255,.03); transform: rotate(-18deg) scaleY(.48); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 72% 35%, rgba(147,129,255,.3), transparent 24%), linear-gradient(0deg, rgba(8,9,13,.35), transparent 50%); pointer-events: none; }
.hero-copy { position: relative; z-index: 1; max-width: 520px; }
.hero-copy h1 { margin: 9px 0 13px; font-size: clamp(32px, 5vw, 64px); letter-spacing: -.08em; line-height: .95; }
.hero-copy p { color: #ccd0dc; max-width: 430px; line-height: 1.6; margin: 0 0 23px; }
.hero-meta { display: flex; gap: 10px; align-items: center; color: #d9dce6; font-size: 11px; margin-bottom: 22px; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 6px 9px; color: #d9dce6; background: rgba(255,255,255,.07); }
.primary-btn, .secondary-btn { border: 0; border-radius: 10px; padding: 12px 16px; font-size: 12px; font-weight: 800; }
.primary-btn { background: var(--lime); color: #10120b; }
.primary-btn:disabled, .secondary-btn:disabled { opacity: .55; cursor: not-allowed; }
.secondary-btn { background: rgba(255,255,255,.09); color: var(--text); border: 1px solid var(--line); }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.card-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 13px; }
.show-card { min-width: 0; border: 1px solid var(--line); background: var(--panel); border-radius: 14px; overflow: hidden; transition: transform .2s, border-color .2s; }
.show-card:hover, .show-card:focus-within { transform: translateY(-4px); border-color: rgba(196,248,106,.4); box-shadow: 0 14px 35px rgba(0,0,0,.22); }
.poster { aspect-ratio: 2 / 3; position: relative; overflow: hidden; background: #1b1d27; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster::after { content: ""; position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.poster-badge { position: absolute; z-index: 1; top: 9px; left: 9px; background: var(--lime); color: #13150c; padding: 4px 7px; border-radius: 5px; font: 700 9px "DM Mono", monospace; }
.poster-play { position: absolute; z-index: 2; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(8,9,13,.6); color: white; }
.card-copy { padding: 11px; }
.card-copy h3 { margin: 0 0 6px; font-size: 12px; line-height: 1.3; letter-spacing: -.02em; }
.card-copy p { margin: 0; color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-line { color: #a8adbd; font: 10px "DM Mono", monospace; margin-top: 9px; display: flex; justify-content: space-between; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); overflow-x: auto; gap: 13px; padding-bottom: 4px; scrollbar-width: thin; }
.rail .show-card { min-width: 210px; }
.genre-row { display: flex; gap: 8px; overflow-x: auto; padding: 3px 0 10px; }
.genre { flex: none; color: #b9bdca; background: var(--panel); border: 1px solid var(--line); padding: 9px 13px; border-radius: 999px; font-size: 11px; }
.genre.active, .genre:hover { color: #10120b; background: var(--lime); border-color: var(--lime); }
.scroll-layout { max-width: 520px; margin: 0 auto; }
.scroll-card { height: min(82vh, 740px); min-height: 560px; border-radius: 20px; overflow: hidden; position: relative; background: #0d0f17; border: 1px solid rgba(255,255,255,.1); margin-bottom: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.scroll-card img { width: 100%; height: 100%; object-fit: cover; opacity: .88; display: block; }
.scroll-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,6,9,.97) 0%, rgba(5,6,9,.82) 22%, rgba(5,6,9,.45) 42%, rgba(5,6,9,.12) 60%, transparent 78%); pointer-events: none; }
.scroll-copy { position: absolute; z-index: 2; left: 22px; right: 76px; bottom: 28px; }
.scroll-copy h2 { font-size: 30px; line-height: 1.0; letter-spacing: -.065em; margin: 8px 0 10px; font-weight: 800; }
.scroll-copy p { color: rgba(220,224,234,.82); font-size: 12px; line-height: 1.55; margin: 0; max-height: 54px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.scroll-actions { position: absolute; z-index: 3; right: 14px; bottom: 28px; display: flex; flex-direction: column; gap: 18px; align-items: center; }
.round-action { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(8,9,14,.64); color: white; display: grid; place-items: center; font-size: 15px; backdrop-filter: blur(8px); transition: background .18s, border-color .18s; }
.round-action:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); }
.studio { display: grid; grid-template-columns: 330px minmax(0,1fr) 260px; gap: 14px; min-height: 720px; }
.studio-panel { background: rgba(16,18,24,.84); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 0; font-size: 13px; }
.chat-panel { display: flex; flex-direction: column; }
.chat-log { padding: 17px; overflow: auto; flex: 1; display: grid; align-content: start; gap: 13px; }
.bubble { padding: 11px 12px; border-radius: 12px; font-size: 11px; line-height: 1.5; max-width: 92%; }
.bubble.agent { background: #1b1e29; color: #dce0eb; }
.clip-preview-bubble { padding: 10px; max-width: 100%; background: #0f1319; border: 1px solid rgba(196,248,106,.22); }
.clip-preview-card { display: flex; flex-direction: column; gap: 0; }
.clip-preview-video { width: 100%; border-radius: 8px; aspect-ratio: 9/16; object-fit: cover; display: block; max-height: 220px; background: #0a0c10; }
.clip-preview-meta { padding: 7px 2px 2px; display: flex; justify-content: space-between; align-items: baseline; }
.clip-preview-meta strong { font-size: 11px; }
.clip-preview-meta span { font: 9px "DM Mono", monospace; color: var(--muted); }
.bubble.user { background: rgba(196,248,106,.12); border: 1px solid rgba(196,248,106,.18); justify-self: end; color: #e9f5d0; }
.suggestions { padding: 0 13px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.suggestion { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: #bfc4d2; padding: 7px 9px; font-size: 10px; }
.chat-input { margin: 0 12px 0; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--line); background: #0c0e13; color: var(--text); outline: none; resize: none; min-height: 68px; }
.episode-canvas { padding: 16px; overflow: auto; background: radial-gradient(circle at 20% 0%, rgba(148,129,255,.08), transparent 28rem); }
.canvas-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 13px; }
.canvas-toolbar h2 { margin: 0; font-size: 17px; letter-spacing: -.04em; }
.toolbar-actions { display: flex; gap: 7px; }
.mini-btn { border: 1px solid var(--line); color: #bfc4d2; background: var(--panel); border-radius: 8px; padding: 7px 9px; font-size: 10px; }
.episode-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; }
.episode-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.18); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.episode-card.active { border-color: rgba(196,248,106,.55); box-shadow: 0 0 0 1px rgba(196,248,106,.12); }
.episode-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; }
.episode-label { color: var(--lime); font: 11px "DM Mono", monospace; }
.episode-meta { color: var(--muted); font: 10px "DM Mono", monospace; }
.episode-video { aspect-ratio: 16 / 8.3; position: relative; background: linear-gradient(135deg,#242a3c,#151923); overflow: hidden; }
.episode-video img { width: 100%; height: 100%; object-fit: cover; opacity: .84; }
.episode-video::after { content: ""; position: absolute; inset: auto 0 0; height: 38%; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.episode-play { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%,-50%); border: 0; width: 48px; height: 48px; border-radius: 50%; background: rgba(8,9,13,.72); color: var(--lime); font-size: 18px; }
.episode-scrub { position: absolute; z-index: 3; bottom: 11px; left: 13px; right: 13px; height: 3px; border-radius: 9px; background: rgba(255,255,255,.25); }
.episode-scrub span { display: block; height: 100%; width: 12%; background: var(--lime); border-radius: inherit; }
.episode-actions { display: flex; justify-content: space-between; padding: 10px 13px; color: var(--muted); font-size: 10px; }
.episode-actions button { border: 0; background: transparent; color: inherit; font-size: 10px; }
.inspector { overflow: auto; padding-bottom: 15px; position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 112px); }
.inspector-section { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.inspector-section h4 { margin: 0 0 11px; font-size: 11px; color: #dce0eb; }
.kv { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font: 10px "DM Mono", monospace; margin: 8px 0; }
.kv strong { color: var(--text); font-weight: 500; }
.account-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 22px; }
.profile-card, .data-card { border: 1px solid var(--line); border-radius: 18px; background: var(--panel); padding: 22px; }
.profile-card { align-self: start; text-align: center; }
.profile-avatar { width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 22px; display: grid; place-items: center; font-size: 22px; font-weight: 800; background: linear-gradient(135deg, var(--violet), var(--orange)); }
.profile-card h2 { margin: 0 0 4px; font-size: 18px; }
.profile-card p { color: var(--muted); margin: 0 0 22px; font-size: 12px; }
.profile-stats { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); padding-top: 17px; gap: 8px; }
.profile-stats strong { display: block; font-size: 17px; }
.profile-stats span { color: var(--muted); font-size: 9px; }
.data-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.metric-card { border: 1px solid var(--line); background: #141720; border-radius: 13px; padding: 16px; }
.metric-card span { color: var(--muted); font-size: 10px; }
.metric-card strong { display: block; font-size: 25px; letter-spacing: -.06em; margin: 8px 0 3px; }
.metric-card small { color: var(--lime); font-size: 10px; }
.settings-list { margin-top: 14px; border-top: 1px solid var(--line); }
.settings-row { display: flex; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.settings-row span:last-child { color: var(--muted); }
.credits-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 15px; }
.balance-card { border: 1px solid rgba(196,248,106,.25); background: linear-gradient(135deg, rgba(196,248,106,.13), rgba(148,129,255,.08)); border-radius: 18px; padding: 25px; }
.balance-card .balance { font: 700 56px "DM Mono", monospace; letter-spacing: -.09em; margin: 15px 0 4px; }
.balance-card p { color: #bac1cc; font-size: 12px; margin: 0; }
.challenge-card { border: 1px solid var(--line); background: var(--panel); border-radius: 18px; padding: 21px; }
.challenge-card h3 { margin: 0 0 9px; font-size: 15px; }
.challenge-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.pack-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.pack { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 16px; }
.pack strong { font: 22px "DM Mono", monospace; }
.pack p { color: var(--muted); font-size: 11px; margin: 7px 0 18px; }
.market-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; }
.asset-card { border: 1px solid var(--line); background: var(--panel); border-radius: 15px; padding: 13px; }
.asset-cover { aspect-ratio: 1.2; border-radius: 10px; display: grid; place-items: center; font-size: 29px; background: linear-gradient(135deg,#242b49,#422d3d); margin-bottom: 13px; }
.asset-card h3 { margin: 0 0 4px; font-size: 12px; }
.asset-card p { color: var(--muted); font-size: 10px; margin: 0 0 13px; }
.asset-foot { display: flex; justify-content: space-between; align-items: center; font: 11px "DM Mono", monospace; color: var(--lime); }
.company { max-width: 920px; margin: 0 auto; }
.company .large-copy { font-size: clamp(35px, 6vw, 78px); line-height: .92; letter-spacing: -.09em; max-width: 760px; margin: 28px 0 26px; }
.company-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; margin-top: 40px; }
.company-card { border-top: 1px solid var(--line); padding-top: 15px; }
.company-card strong { font-size: 12px; color: var(--lime); }
.company-card p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(2,3,5,.72); backdrop-filter: blur(12px); display: grid; place-items: start center; padding-top: 16vh; }
.modal-backdrop.hidden { display: none; }
.search-modal { width: min(620px, calc(100vw - 30px)); border: 1px solid var(--line); background: #11131a; border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.close-btn { font-size: 24px; color: var(--muted); }
.search-input { width: 100%; margin: 18px 0 13px; border: 1px solid var(--line); border-radius: 10px; background: #0a0b0f; color: var(--text); padding: 15px; outline: none; }
.search-input:focus { border-color: rgba(196,248,106,.55); }
.search-hints { display: flex; flex-wrap: wrap; gap: 7px; }
.search-hints button { border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); padding: 7px 9px; font-size: 10px; }
.search-results { margin-top: 14px; display: grid; gap: 6px; }
.search-result { display: flex; justify-content: space-between; padding: 11px; border-radius: 9px; background: #181b24; font-size: 11px; }
.search-result span { color: var(--muted); }
.mobile-nav { display: none; }
@media (max-width: 1050px) { .card-grid { grid-template-columns: repeat(4, minmax(0,1fr)); } .studio { grid-template-columns: 290px minmax(0,1fr); } .inspector { display: none; } .market-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 720px) { .topbar { height: 64px; padding: 0 18px; gap: 0; } .primary-nav { display: none; } .top-actions { gap: 4px; } .page-wrap { padding: 23px 15px 86px; } .hero { min-height: 500px; padding: 25px; border-radius: 18px; } .hero-copy h1 { font-size: 43px; } .card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .rail { grid-auto-columns: minmax(175px, 1fr); } .rail .show-card { min-width: 175px; } .page-heading { display: block; } .page-heading p { margin-top: 14px; } .studio { display: block; } .chat-panel { min-height: 420px; margin-bottom: 13px; } .episode-canvas { padding: 10px; } .account-layout, .credits-hero { grid-template-columns: 1fr; } .data-grid { grid-template-columns: repeat(2,1fr); } .pack-grid, .market-grid { grid-template-columns: repeat(2,1fr); } .company-grid { grid-template-columns: 1fr; } .mobile-nav { position: fixed; z-index: 30; display: flex; bottom: 0; left: 0; right: 0; height: 68px; justify-content: space-around; background: rgba(10,11,15,.95); border-top: 1px solid var(--line); backdrop-filter: blur(15px); } .mobile-nav a { display: grid; place-items: center; align-content: center; gap: 4px; color: var(--muted); font-size: 17px; min-width: 68px; } .mobile-nav a.active { color: var(--lime); } .mobile-nav small { font-size: 9px; } .mobile-create { background: var(--lime); color: #10120b; border-radius: 9px; width: 27px; height: 27px; display: grid; place-items: center; font-size: 18px; } }

/* editorial visual system: cinematic posters, sharper type, less dashboard chrome */
body { background: #090b10; }
.topbar { background: rgba(9,11,16,.72); border-bottom-color: rgba(255,255,255,.12); }
.brand { letter-spacing: -.075em; }
.brand-mark { border-radius: 7px; box-shadow: 5px 5px 0 rgba(196,248,106,.16); }
.page-wrap { padding-top: 44px; }
@media (max-width: 720px) { .page-wrap { padding-top: 23px; } }
.page-heading h1 { font-weight: 800; }
.page-heading p { color: #aeb4c4; }
.hero { min-height: 510px; border-radius: 10px; border-color: rgba(255,255,255,.17); isolation: isolate; }
.hero-copy { max-width: 560px; }
.hero-copy h1 { font-size: clamp(46px, 7vw, 92px); letter-spacing: -.095em; }
.hero-copy p { font-size: 15px; max-width: 470px; }
.hero-meta { font-family: "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.section { margin: 56px 0; }
.section-head h2 { font-size: 21px; }
.section-head { border-left: 2px solid var(--lime); padding-left: 12px; }
.show-card { position: relative; border-radius: 9px; background: #11151e; border-color: rgba(255,255,255,.13); }
.poster { aspect-ratio: 4 / 5; }
.poster img { filter: saturate(.82) contrast(1.06); transition: transform .5s, filter .5s; }
.show-card:hover .poster img { transform: scale(1.06); filter: saturate(1.12) contrast(1.08); }
.card-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 42px 13px 13px; background: linear-gradient(transparent, rgba(6,8,12,.96) 56%); }
.card-copy h3 { font-size: 14px; }
.card-copy p { color: #d4d7e0; }
.stat-line { color: #c9ceda; }
/* poster stats bar */
.card-copy { padding: 32px 11px 11px; }
.poster-stats { display: flex; align-items: center; gap: 7px; font: 11px "DM Mono", monospace; color: rgba(255,255,255,.75); margin-top: 5px; }
.stat-sep { color: rgba(255,255,255,.25); font-size: 9px; }
/* Brief section */
.brief-chip { display: inline-block; background: rgba(196,248,106,.1); border: 1px solid rgba(196,248,106,.2); color: var(--lime); border-radius: 5px; padding: 3px 7px; font-size: 9px; margin: 2px 2px 0 0; }
.poster-play { opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.show-card:hover .poster-play, .show-card:focus-within .poster-play { opacity: 1; transform: translateY(0); }
.studio { min-height: calc(100vh - 160px); grid-template-columns: 300px minmax(0,1fr) 280px; }
.studio-panel { border-radius: 10px; background: #0f131b; border-color: rgba(255,255,255,.13); }
.chat-panel { background: #0c1017; }
.episode-canvas { background: #0b0e14; }
.episode-card { border-radius: 8px; }
.episode-card.active { box-shadow: inset 3px 0 0 var(--lime), 0 0 0 1px rgba(196,248,106,.2); }
.episode-video { aspect-ratio: 16 / 8.7; }
.inspector { background: #111620; }
.mini-btn, .secondary-btn { border-radius: 7px; }
.primary-btn { border-radius: 7px; box-shadow: 0 7px 20px rgba(196,248,106,.14); }
.mobile-nav { background: rgba(9,11,16,.94); }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; transform: translateY(14px); opacity: 0; pointer-events: none; background: #f7f7f4; color: #10120b; border-radius: 8px; padding: 12px 15px; font-size: 12px; font-weight: 800; box-shadow: 0 18px 45px rgba(0,0,0,.35); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.search-result { width: 100%; border: 0; color: var(--text); text-align: left; cursor: pointer; }
.search-result:hover { background: #222735; }
.search-empty { padding: 16px 11px; color: var(--muted); font-size: 12px; }
.approval-card { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 0; padding: 14px 16px; border: 1px solid rgba(196,248,106,.35); border-radius: 10px; background: linear-gradient(135deg, rgba(196,248,106,.08), rgba(148,129,255,.07)); }
.approval-card-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.approval-card strong { font-size: 13px; }
.approval-card small { color: #c5cad5; font: 10px "DM Mono", monospace; }
.approval-actions { display: flex; gap: 8px; flex: none; align-items: center; }
.series-page { margin: -44px -4vw 0; }
.series-hero { min-height: 580px; position: relative; display: flex; align-items: end; overflow: hidden; border-bottom: 1px solid var(--line); background: #0b0d14; }
.series-hero-art { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,9,13,.97) 0%, rgba(7,9,13,.82) 32%, rgba(7,9,13,.38) 58%, rgba(7,9,13,.06) 100%), linear-gradient(0deg, #090b10 0%, transparent 28%), var(--hero, url('assets/hero-keyart.png')) center top/cover; filter: saturate(.92); }
.series-hero-copy { position: relative; z-index: 1; max-width: 620px; padding: 76px 4vw 54px; }
.series-hero-copy h1 { margin: 10px 0 6px; font-size: clamp(44px, 7vw, 88px); letter-spacing: -.09em; line-height: .93; }
.series-byline { margin: 0 0 20px; color: #d2d6df; font: 11px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .13em; }
.series-description { color: #d2d5de; line-height: 1.65; font-size: 14px; max-width: 520px; }
.series-stats { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 26px; color: var(--muted); font: 10px "DM Mono", monospace; text-transform: uppercase; letter-spacing: .06em; }
.series-stats strong { color: #fff; font-size: 13px; margin-right: 4px; }
.series-body { max-width: 1440px; margin: 0 auto; padding: 34px 4vw 90px; display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 42px; }
.series-body .section-head { border-left: 0; padding-left: 0; }
.episode-list { display: grid; gap: 1px; border-top: 1px solid var(--line); }
.episode-row { display: grid; grid-template-columns: 144px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 13px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left; }
.episode-row:hover, .episode-row.active { background: rgba(255,255,255,.04); }
.episode-thumb { position: relative; display: block; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; background: #171a25; }
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.episode-thumb b { position: absolute; inset: 0; display: grid; place-items: center; color: var(--lime); font-size: 16px; text-shadow: 0 2px 12px #000; }
.episode-row-copy { display: grid; gap: 7px; }
.episode-row-copy strong { font-size: 13px; }
.episode-row-copy small { color: var(--muted); font: 10px "DM Mono", monospace; }
.episode-state { color: var(--lime); font-size: 17px; padding: 0 10px; }
.series-aside { display: grid; align-content: start; gap: 14px; }
.aside-card { padding: 18px; border: 1px solid var(--line); background: #0f131b; border-radius: 10px; }
.aside-card p { color: #b6bcc9; font-size: 12px; line-height: 1.65; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tag-cloud span { border: 1px solid var(--line); border-radius: 999px; color: #c4c9d3; padding: 6px 8px; font-size: 10px; }
.creator-line { display: flex; gap: 10px; align-items: center; margin-top: 16px; }
.creator-line > div { display: grid; gap: 3px; flex: 1; }
.creator-line small { color: var(--muted); font-size: 10px; }
.creator-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--orange)); color: #fff; font-size: 11px; font-weight: 800; }
.is-playing { background: #fff; color: #10120b; }
.player-page { min-height: calc(100vh - 76px); margin: -44px -4vw -90px; background: #050608; color: #f7f7f5; }
.player-topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 4vw; border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(5,6,8,.92); }
.player-back, .player-more { border: 0; background: transparent; color: #dce0e8; font-size: 13px; }
.player-more { font-size: 20px; color: var(--muted); }
.player-stage { max-width: 1280px; margin: 26px auto 0; padding: 0 4vw; }
.player-art { position: relative; aspect-ratio: 16/8.8; overflow: hidden; border: 1px solid rgba(255,255,255,.12); background: #101523; box-shadow: 0 24px 90px rgba(0,0,0,.4); }
.player-art img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; filter: saturate(.84) brightness(.74); }
.player-vignette { position: absolute; inset: 0; background: radial-gradient(circle at 50% 46%, transparent 0 22%, rgba(0,0,0,.25) 64%, rgba(0,0,0,.88) 100%), linear-gradient(0deg, rgba(0,0,0,.72), transparent 35%); }
.player-center { position: absolute; z-index: 2; inset: 0; display: grid; place-content: center; justify-items: center; pointer-events: none; }
.player-big-play { pointer-events: auto; width: 72px; height: 72px; border-radius: 50%; border: 0; background: #fff; color: #111; font-size: 24px; padding-left: 5px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.player-center p { margin: 14px 0 0; color: #fff; font-size: 12px; }
.player-caption { position: absolute; z-index: 2; bottom: 72px; left: 0; right: 0; text-align: center; font-size: 16px; text-shadow: 0 2px 10px #000; }
.player-controls { position: absolute; z-index: 3; left: 24px; right: 24px; bottom: 18px; display: flex; align-items: center; gap: 13px; }
.player-controls button { border: 0; background: transparent; color: #fff; font-size: 14px; }
.timecode { font: 10px "DM Mono", monospace; color: #cfd4df; white-space: nowrap; }
.player-progress { position: absolute; left: 0; right: 0; bottom: 56px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.27); }
.player-progress i { display: block; width: 28%; height: 100%; background: var(--lime); border-radius: inherit; }
.player-controls .volume-btn { margin-left: auto; }
.cc-btn { font: 700 10px "DM Mono", monospace !important; border: 1px solid rgba(255,255,255,.5) !important; padding: 4px 5px; border-radius: 3px; }
.player-below { max-width: 1280px; margin: 0 auto; padding: 34px 4vw 90px; display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 54px; }
.player-below h1 { margin: 10px 0 8px; font-size: clamp(26px, 4vw, 48px); letter-spacing: -.075em; }
.player-below > div > p { color: var(--muted); max-width: 600px; line-height: 1.6; font-size: 13px; }
.player-actions { display: flex; gap: 8px; margin-top: 22px; }
.up-next { border-left: 1px solid var(--line); padding-left: 24px; }
.up-next .section-head { border-left: 0; padding-left: 0; }
.player-queue { display: grid; gap: 1px; }
.player-episode { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 9px; align-items: center; border: 0; border-bottom: 1px solid var(--line); padding: 12px 0; background: transparent; color: #dfe2e9; text-align: left; }
.player-episode:hover, .player-episode.active { color: var(--lime); }
.player-episode span:first-child { font: 11px "DM Mono", monospace; }
.player-episode span:nth-child(2) { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-episode small { color: var(--muted); font: 9px "DM Mono", monospace; }
@media (max-width: 720px) { .player-page { margin: -23px -15px -86px; } .player-topbar { padding: 0 15px; } .player-back span { display: none; } .player-stage { margin-top: 0; padding: 0; } .player-art { border-left: 0; border-right: 0; aspect-ratio: 9/13; } .player-caption { bottom: 76px; font-size: 13px; padding: 0 20px; } .player-below { display: block; padding: 25px 15px 90px; } .up-next { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; margin-top: 30px; } }
@media (max-width: 720px) { .series-page { margin: -23px -15px 0; } .series-hero { min-height: 620px; } .series-hero-copy { padding: 0 20px 34px; } .series-hero-copy h1 { font-size: 54px; } .series-body { display: block; padding: 26px 15px 90px; } .series-aside { margin-top: 28px; } .episode-row { grid-template-columns: 112px minmax(0,1fr) auto; gap: 10px; } .episode-row-copy strong { font-size: 11px; } }
.watch-shell { margin: -14px auto 0; }
.watch-shell .genre-row { position: sticky; top: 76px; z-index: 10; margin: 0 -4vw; padding: 12px 4vw 11px; background: linear-gradient(rgba(9,11,16,.95) 65%, transparent); }
.watch-shell .hero { margin-top: 0; min-height: 460px; border-radius: 0 0 32px 32px; border-left: 0; border-right: 0; border-top: 0; }
.hero-controls { position: absolute; z-index: 3; right: 32px; bottom: 48px; left: auto; top: auto; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.hero-play { border: 0; width: 56px; height: 56px; border-radius: 50%; background: #fff; color: #111; font-weight: 800; padding: 0; font-size: 20px; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.35); padding-left: 3px; }
.hero-add { border: 0; width: 46px; height: 46px; border-radius: 50%; padding: 0; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); color: #fff; font-size: 20px; display: grid; place-items: center; backdrop-filter: blur(6px); }
.rank-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px,1fr); gap: 24px; overflow-x: auto; padding: 0 0 18px; scrollbar-width: thin; }
.rank-card { min-width: 0; position: relative; padding-left: 28px; }
.rank-num { position: absolute; z-index: 0; left: -3px; bottom: 55px; font: 900 clamp(100px, 12vw, 180px)/.7 Manrope, sans-serif; letter-spacing: -.14em; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.9); }
.rank-poster { position: relative; z-index: 1; width: 170px; aspect-ratio: 2 / 3; margin-left: 25px; border-radius: 10px; overflow: hidden; background: #151923; }
.rank-poster img { width: 100%; height: 100%; object-fit: cover; }
.rank-meta { position: relative; z-index: 2; display: grid; gap: 6px; margin: 10px 0 0 25px; }
.rank-meta strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-meta span { color: #bac0cc; font: 10px "DM Mono", monospace; }
.rank-meta small { color: #babfca; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; display: flex; align-items: center; gap: 7px; }
.rank-meta small i { width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--violet), var(--orange)); }
.ranked-section .section-head { border-left: 0; padding-left: 0; }
@media (max-width: 720px) { .watch-shell .genre-row { top: 64px; margin: 0 -15px; padding-left: 15px; padding-right: 15px; } .watch-shell .hero { min-height: 520px; } .hero-controls { right: 18px; bottom: 36px; gap: 10px; } .hero-play { width: 48px; height: 48px; font-size: 17px; } .hero-add { width: 40px; height: 40px; font-size: 17px; } .rank-grid { grid-auto-columns: 190px; gap: 12px; } .rank-poster { width: 142px; } }

/* ── show switcher ─────────────────────────────────────────────────────── */
.show-chip { flex: none; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); padding: 7px 12px; font-size: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: color .15s, background .15s, border-color .15s; letter-spacing: .01em; position: relative; }
.show-chip:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.show-chip.active { background: var(--lime); color: #10120b; border-color: var(--lime); }
.show-chip-badge { position: absolute; top: -5px; right: -5px; background: var(--violet); color: #fff; border-radius: 999px; font-size: 8px; font-weight: 700; min-width: 14px; height: 14px; display: flex; align-items: center; justify-content: center; padding: 0 3px; line-height: 1; pointer-events: none; }
.show-chip.active .show-chip-badge { background: rgba(0,0,0,.35); color: #10120b; }

/* ── approval card ─────────────────────────────────────────────────────── */
.approval-info { display: grid; gap: 4px; flex: 1; }
.approval-brief-tag { font: 9px "DM Mono", monospace; color: #9ba4b8; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 420px; }

/* ── agent dot ─────────────────────────────────────────────────────────── */
.agent-dot { width: 9px; height: 9px; border-radius: 50%; background: #3a3f4f; flex-shrink: 0; }
.agent-dot--active { background: var(--lime); box-shadow: 0 0 0 3px rgba(196,248,106,.22); animation: dot-blink 1.6s ease infinite; }
@keyframes dot-blink { 0%,100% { box-shadow: 0 0 0 3px rgba(196,248,106,.22); } 50% { box-shadow: 0 0 0 7px rgba(196,248,106,.06); } }

/* ── rendering pulse ───────────────────────────────────────────────────── */
.render-pulse { width: 36px; height: 36px; border-radius: 50%; background: rgba(196,248,106,.1); flex-shrink: 0; position: relative; }
.render-pulse::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--lime); animation: pulse-ring 1.4s ease infinite; }
@keyframes pulse-ring { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.8); } }

/* ── gen status banner ─────────────────────────────────────────────────── */
.gen-status-banner { margin: 0 12px 10px; padding: 9px 12px; border-radius: 8px; background: rgba(196,248,106,.07); border: 1px solid rgba(196,248,106,.18); color: var(--lime); font: 10px "DM Mono", monospace; letter-spacing: .03em; display: flex; align-items: center; gap: 8px; }
.gen-status-banner::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); flex-shrink: 0; animation: dot-blink 1.6s ease infinite; }

/* ── chat footer ───────────────────────────────────────────────────────── */
.chat-footer { display: flex; gap: 7px; padding: 0 12px 12px; }
.chat-footer .secondary-btn { font-size: 10px; padding: 9px 10px; }
.chat-footer .primary-btn { flex: 1; font-size: 10px; }

/* ── timeline track ────────────────────────────────────────────────────── */
.tl-track { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.tl-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 44px 24px; color: var(--muted); text-align: center; border: 1px dashed rgba(255,255,255,.1); border-radius: 10px; }
.tl-empty span { font-size: 20px; }
.tl-empty p { margin: 0; font-size: 11px; line-height: 1.6; max-width: 280px; }
.tl-card { flex: none; width: 170px; background: #0f1319; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: border-color .2s, transform .2s; }
.tl-card:hover { border-color: rgba(255,255,255,.2); transform: translateY(-2px); }
.tl-video-wrap { position: relative; aspect-ratio: 16/9; background: #17191f; overflow: hidden; }
.tl-num { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.72); color: #fff; font: 700 8px "DM Mono", monospace; display: flex; align-items: center; justify-content: center; z-index: 2; }
.tl-watch-btn { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0,0,0,0); color: rgba(255,255,255,0); font-size: 20px; display: flex; align-items: center; justify-content: center; transition: color .18s, background .18s; z-index: 1; cursor: pointer; }
.tl-card:hover .tl-watch-btn { background: rgba(0,0,0,.38); color: rgba(255,255,255,.9); }
.tl-meta { padding: 8px 9px 5px; }
.tl-meta strong { display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.tl-meta small { color: var(--muted); font: 9px "DM Mono", monospace; }
.tl-actions { display: flex; align-items: center; gap: 2px; padding: 4px 6px 7px; border-top: 1px solid var(--line); }
.tl-actions button { background: transparent; border: 0; color: var(--muted); font-size: 9px; padding: 4px 5px; border-radius: 5px; cursor: pointer; transition: color .15s, background .15s; }
.tl-actions button:hover { background: rgba(255,255,255,.07); color: var(--text); }

/* ── bin ───────────────────────────────────────────────────────────────── */
.bin-section { margin-top: 22px; }
.bin-section .section-head { margin-bottom: 12px; border-left: 0; padding-left: 0; }
.bin-empty-state { padding: 32px 24px; border: 1px dashed rgba(255,255,255,.1); border-radius: 10px; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
.bin-empty-state p { margin: 0; }
.bin-rendering-state { display: flex; align-items: center; gap: 14px; padding: 18px 16px; border: 1px solid rgba(196,248,106,.2); border-radius: 10px; background: rgba(196,248,106,.04); }
.bin-rendering-state strong { display: block; font-size: 12px; margin-bottom: 4px; color: var(--lime); }
.bin-rendering-state p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.bin-cards-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.bin-card { background: #0f1319; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color .2s; }
.bin-card--ready { border-color: rgba(196,248,106,.28); box-shadow: 0 0 0 1px rgba(196,248,106,.06); }
.bin-video-wrap { position: relative; aspect-ratio: 16/9; background: #17191f; overflow: hidden; }
.bin-pending { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 10px; }
.bin-ready-pill { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: rgba(196,248,106,.18); border: 1px solid rgba(196,248,106,.35); color: var(--lime); border-radius: 999px; padding: 3px 9px; font: 700 8px "DM Mono", monospace; white-space: nowrap; letter-spacing: .08em; }
.bin-ready-pill--wait { background: rgba(255,153,102,.1); border-color: rgba(255,153,102,.28); color: var(--orange); }
.bin-card-body { padding: 11px 12px 12px; }
.bin-card-info { margin-bottom: 9px; }
.bin-card-info strong { display: block; font-size: 11px; margin-bottom: 3px; }
.bin-card-info small { color: var(--muted); font: 9px "DM Mono", monospace; }
.bin-card-actions { display: flex; flex-direction: column; gap: 7px; }
.bin-secondary-actions { display: flex; gap: 6px; }
.bin-secondary-actions .secondary-btn { flex: 1; font-size: 10px; padding: 7px; text-align: center; justify-content: center; }

/* ── scroll page upgrades ─────────────────────────────── */
.scroll-ep-pill { position: absolute; z-index: 3; top: 14px; left: 14px; display: flex; align-items: center; gap: 5px; background: rgba(10,11,16,.64); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); border-radius: 999px; padding: 4px 9px; font: 10px "DM Mono", monospace; color: rgba(255,255,255,.85); pointer-events: none; }
.scroll-ep-pill .sep { color: rgba(255,255,255,.35); }
.scroll-corner { position: absolute; z-index: 3; top: 14px; right: 14px; border: 1px solid rgba(255,255,255,.18); background: rgba(10,11,16,.64); backdrop-filter: blur(6px); border-radius: 999px; padding: 5px 10px; font: 700 10px Manrope, sans-serif; color: rgba(255,255,255,.9); cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
.scroll-corner:hover { background: rgba(196,248,106,.15); border-color: rgba(196,248,106,.4); color: var(--lime); }
.scroll-creator { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.scroll-creator-name { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.9); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scroll-sub-btn { flex: none; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; padding: 4px 9px; font: 700 10px Manrope, sans-serif; cursor: pointer; transition: border-color .18s, color .18s; }
.scroll-sub-btn.following { background: transparent; border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.5); }
.scroll-sub-btn:hover { border-color: rgba(196,248,106,.5); color: var(--lime); }
.scroll-action-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.scroll-action-count { font: 9px "DM Mono", monospace; color: rgba(255,255,255,.65); text-align: center; white-space: nowrap; }
.round-action.liked { background: rgba(255,80,100,.18); border-color: rgba(255,80,100,.35); color: #ff6680; }
.scroll-pbar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,.12); border-radius: 0 0 22px 22px; overflow: hidden; z-index: 4; }
.scroll-pbar-fill { height: 100%; background: var(--lime); border-radius: inherit; transition: width .3s; }
.scroll-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.scroll-tag { font: 10px "DM Mono", monospace; color: rgba(196,248,106,.75); letter-spacing: .02em; }
.scroll-intro { max-width: 520px; margin: 0 auto 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.scroll-intro h1 { font-size: clamp(28px, 3.5vw, 46px); line-height: .98; margin: 6px 0 0; letter-spacing: -.065em; font-weight: 800; }
.scroll-intro p { max-width: 280px; margin: 0 0 4px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: right; }
@media (max-width: 720px) { .scroll-intro { display: none; } }

/* ── continue watching ─────────────────────────────────────────────────── */
.cw-section { margin-top: 28px !important; }
.cw-row { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.cw-card { display: flex; gap: 16px; align-items: center; flex: none; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: border-color .2s, transform .2s; }
.cw-card:hover { border-color: rgba(196,248,106,.3); transform: translateY(-2px); }
.cw-thumb { position: relative; width: 130px; flex-shrink: 0; aspect-ratio: 2/3; background: #171a25; overflow: hidden; }
.cw-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cw-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,.18); }
.cw-fill { height: 100%; background: var(--lime); border-radius: inherit; }
.cw-info { padding: 16px 16px 16px 0; display: grid; gap: 5px; align-content: start; }
.cw-info strong { font-size: 14px; letter-spacing: -.03em; line-height: 1.25; }
.cw-info small { color: var(--muted); font-size: 11px; }

/* ── company page additions ────────────────────────────────────────────── */
.company-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 36px 0; }
.company-stat { padding: 22px 18px; background: var(--panel); text-align: center; }
.company-stat strong { display: block; font: 700 28px "DM Mono", monospace; letter-spacing: -.06em; margin-bottom: 5px; }
.company-stat span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.company-download { margin-top: 44px; }
.company-download .eyebrow { display: block; margin-bottom: 16px; }
.app-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.app-badge { display: flex; align-items: center; gap: 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: rgba(255,255,255,.05); padding: 12px 20px; color: white; cursor: pointer; transition: border-color .18s, background .18s; }
.app-badge:hover { border-color: rgba(196,248,106,.4); background: rgba(196,248,106,.07); }
.app-badge div { text-align: left; }
.app-badge span { display: block; font-size: 10px; color: var(--muted); line-height: 1.2; }
.app-badge strong { display: block; font-size: 15px; font-weight: 700; }
.company-social { margin-top: 44px; }
.company-social .eyebrow { display: block; margin-bottom: 16px; }
.social-links { display: flex; gap: 10px; flex-wrap: wrap; }
.social-link { border: 1px solid var(--line); border-radius: 999px; padding: 9px 18px; font-size: 12px; font-weight: 600; color: var(--text); background: var(--panel); transition: border-color .18s, color .18s; }
.social-link:hover { border-color: rgba(196,248,106,.4); color: var(--lime); }
@media (max-width: 720px) { .company-stats { grid-template-columns: repeat(2,1fr); } }

/* ── mobile snap-scroll feed ───────────────────────────────────────────── */
@media (max-width: 720px) {
  .page-wrap.scroll-route { padding: 0 !important; height: calc(100dvh - 64px - 68px); overflow: hidden; }
  .page-wrap.scroll-route .scroll-layout { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; max-width: 100%; }
  .page-wrap.scroll-route .scroll-layout::-webkit-scrollbar { display: none; }
  .page-wrap.scroll-route .scroll-card { height: 100%; min-height: 0; scroll-snap-align: start; border-radius: 0; margin-bottom: 0; border: none; box-shadow: none; }
  .page-wrap.scroll-route .scroll-copy { left: 18px; right: 72px; bottom: 24px; }
  .page-wrap.scroll-route .scroll-actions { right: 12px; bottom: 24px; gap: 16px; }
  .page-wrap.scroll-route .round-action { width: 44px; height: 44px; }
  .page-wrap.scroll-route .scroll-pbar { border-radius: 0; }
  .page-wrap.scroll-route .scroll-ep-pill { top: 12px; left: 12px; }
  .page-wrap.scroll-route .scroll-corner { top: 12px; right: 12px; }
}

/* ── fix padding-top bleeding into studio + player on mobile ───────────── */
@media (max-width: 720px) {
  .page-wrap { padding-top: 23px !important; }
  .page-wrap.player-route { padding: 0 !important; }
}

/* ── search result with thumbnail ─────────────────────────────────────── */
.search-result { display: flex; align-items: center; gap: 12px; }
.search-result-thumb { width: 42px; height: 54px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.search-result-copy { flex: 1; min-width: 0; display: grid; gap: 4px; }
.search-result-copy strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-copy span { color: var(--muted); font-size: 10px; }
.search-result-tag { flex-shrink: 0; font: 700 8px "DM Mono", monospace; letter-spacing: .06em; color: var(--lime); background: rgba(196,248,106,.1); border: 1px solid rgba(196,248,106,.2); border-radius: 4px; padding: 3px 6px; white-space: nowrap; }

/* ── credits milestone list ────────────────────────────────────────────── */
.challenge-milestones { display: grid; gap: 0; margin-top: 20px; border-top: 1px solid var(--line); }
.milestone { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.milestone div { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.milestone div span { color: var(--muted); font-size: 11px; }
.milestone div strong { color: var(--lime); font: 700 12px "DM Mono", monospace; white-space: nowrap; }
.milestone-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); flex-shrink: 0; box-shadow: 0 0 0 3px rgba(196,248,106,.18); }
.milestone--locked .milestone-dot { background: rgba(255,255,255,.2); box-shadow: none; }
.milestone-dot--lock { width: 24px; height: 24px; display: grid; place-items: center; font-size: 7px; color: var(--muted); border-radius: 50%; border: 1px solid var(--line); background: transparent; }
.milestone--locked .milestone div span { color: rgba(255,255,255,.35); }

/* ── series hero — back navigation on mobile ───────────────────────────── */
.series-back { display: none; position: absolute; z-index: 4; top: 18px; left: 18px; border: 0; background: rgba(10,11,16,.64); border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: 999px; padding: 7px 14px; font-size: 12px; font-weight: 700; backdrop-filter: blur(8px); cursor: pointer; }
@media (max-width: 720px) { .series-back { display: flex; align-items: center; gap: 6px; } }

/* ── watch shell hero improvements ────────────────────────────────────── */
.watch-shell .hero { background-attachment: local; }
.hero-add.is-favorited { background: rgba(255,80,100,.22); border-color: rgba(255,80,100,.45); }
.hero-copy .eyebrow { letter-spacing: .2em; }
.hero-copy .button-row { margin-top: 24px; }
.hero-copy .button-row .primary-btn { padding: 13px 20px; font-size: 13px; }
.hero-copy .button-row .secondary-btn { padding: 13px 18px; font-size: 13px; }

/* ── scroll card creator row improvements ──────────────────────────────── */
.scroll-creator { margin-bottom: 12px; }
.scroll-action-wrap { gap: 5px; }
.scroll-action-count { font-size: 10px; }

/* ── player route improvements ─────────────────────────────────────────── */
.player-actions { flex-wrap: wrap; }
.player-stage { margin-top: 20px; }
@media (max-width: 720px) { .player-stage { margin-top: 0; } .player-below { padding-top: 20px; } }

/* ── account profile banner ────────────────────────────────────────────── */
.profile-card { padding: 0; overflow: hidden; }
.profile-banner { height: 72px; background: linear-gradient(135deg, rgba(148,129,255,.35), rgba(196,248,106,.18), rgba(255,153,102,.22)); }
.profile-card-inner { padding: 0 22px 22px; text-align: center; }
.profile-avatar { margin-top: -38px; border: 3px solid var(--panel); }

/* ── company page visual refinements ───────────────────────────────────── */
.company { padding-top: 12px; }
.company-grid { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; gap: 0; margin-top: 44px; }
.company-card { padding: 28px 24px; border-top: 0; border-right: 1px solid var(--line); background: var(--panel); }
.company-card:last-child { border-right: 0; }
@media (max-width: 720px) { .company-grid { border-radius: 14px; } .company-card { border-right: 0; border-bottom: 1px solid var(--line); } .company-card:last-child { border-bottom: 0; } }

/* ── rank card improvements ────────────────────────────────────────────── */
.rank-meta small i { background: linear-gradient(135deg, var(--violet), var(--orange)); box-shadow: 0 0 0 2px rgba(148,129,255,.2); }

/* ── section head refinements ───────────────────────────────────────────── */
.section-head h2 { font-weight: 800; letter-spacing: -.05em; }

/* ── studio mobile fix ─────────────────────────────────────────────────── */
@media (max-width: 720px) { .show-switcher { margin-bottom: 4px; } }

/* ── topbar nav underline correct offset ───────────────────────────────── */
.nav-link.active::after { bottom: -24px; }

/* ── aside card eyebrow spacing ────────────────────────────────────────── */
.aside-card .eyebrow { display: block; margin-bottom: 12px; }
.aside-card p { margin: 0 0 4px; }

/* ── episode row: active indicator style ───────────────────────────────── */
.episode-row.active { background: rgba(196,248,106,.04); }
.episode-row.active .episode-state { color: var(--lime); }
.episode-row.active .episode-row-copy strong { color: var(--lime); }

/* ── series body: aside sticky ─────────────────────────────────────────── */
.series-aside { position: sticky; top: 92px; }

/* ── CW card: image object-position top for portraits ──────────────────── */
.cw-thumb img { object-position: center top; }

/* ── rank grid: show creator color ─────────────────────────────────────── */
.rank-meta small { color: #9ba4b8; letter-spacing: .08em; }

/* ── hero copy button row spacing ──────────────────────────────────────── */
.hero-copy .button-row .secondary-btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); }

/* ── mobile player: bigger title ───────────────────────────────────────── */
@media (max-width: 720px) {
  .player-below h1 { font-size: 28px; }
  .player-actions { margin-top: 16px; gap: 7px; }
  .player-actions .secondary-btn { font-size: 11px; padding: 10px 12px; }
}

/* ── credits balance card: balance number ──────────────────────────────── */
.balance-card .eyebrow { display: block; margin-bottom: 8px; }
.balance-card .balance { font-size: 68px; }
.balance-card p { margin: 0 0 20px; }

/* ── metric card: sub-label color ──────────────────────────────────────── */
.metric-card small { font-family: "DM Mono", monospace; letter-spacing: .03em; }

/* ── search modal: wider on desktop ────────────────────────────────────── */
.search-modal { width: min(680px, calc(100vw - 30px)); }
.search-input { font-size: 16px; }
.search-results { gap: 4px; max-height: 360px; overflow-y: auto; scrollbar-width: thin; }

/* ── company page: hero heading line-height fix ─────────────────────────── */
.company .large-copy { line-height: .9; word-break: break-word; }

/* ── show card: stat line alignment ────────────────────────────────────── */
.poster-stats .stat-sep { margin: 0 2px; }

/* ── scroll page: tags spacing ─────────────────────────────────────────── */
.scroll-tags { margin-top: 10px; gap: 7px; }
.scroll-tag { letter-spacing: .03em; }

/* ── agent thinking animation ──────────────────────────────────────────── */
.bubble.thinking { display: flex; align-items: center; gap: 5px; min-height: 36px; padding: 11px 16px; }
.bubble.thinking span { width: 7px; height: 7px; border-radius: 50%; background: rgba(196,248,106,.6); display: block; animation: think-pulse 1.3s ease infinite; }
.bubble.thinking span:nth-child(2) { animation-delay: .18s; }
.bubble.thinking span:nth-child(3) { animation-delay: .36s; }
@keyframes think-pulse { 0%, 80%, 100% { transform: scale(.7); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }

/* ── approval card: AI prompt tag ──────────────────────────────────────── */
.approval-brief-tag--ai { color: var(--lime) !important; border-color: rgba(196,248,106,.3) !important; background: rgba(196,248,106,.07) !important; }

/* ── genre empty state ─────────────────────────────────────────────────── */
.genre-empty { padding: 60px 24px; text-align: center; color: var(--muted); }
.genre-empty p { font-size: 14px; margin: 0 0 16px; }

/* ── episode thumb hover brightness ────────────────────────────────────── */
.episode-row:hover .episode-thumb img,
.episode-row.active .episode-thumb img { opacity: 0.92; }

/* ── mobile player: cancel negative top margin when page has 0 padding ─── */
@media (max-width: 720px) {
  .page-wrap.player-route .player-page { margin-top: 0; }
}

/* ── player controls: tighter gap now that progress bar is separate ──────── */
.player-controls { gap: 10px; }

/* ── CLIP chat panel branding ─────────────────────────────────────────────── */
.clip-head { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.clip-head h3 { margin: 0; font-size: 13px; }
.clip-ai-tag { font: 700 7px "DM Mono", monospace; letter-spacing: .1em; color: var(--lime); background: rgba(196,248,106,.12); border: 1px solid rgba(196,248,106,.22); border-radius: 4px; padding: 2px 5px; }
.clip-show-name { color: var(--muted); }
.clip-head-actions { display: flex; align-items: center; gap: 10px; }
.clip-head-actions .mini-btn { font-size: 9px; padding: 5px 8px; }

/* ── agent bubble: left accent ─────────────────────────────────────────────── */
.bubble.agent { border-left: 2px solid rgba(196,248,106,.18); border-radius: 0 12px 12px 12px; }
.bubble.user { border-radius: 12px 0 12px 12px; }

/* ── chat footer: single-button layout ─────────────────────────────────────── */
.chat-footer { padding: 0 12px 14px; }
.chat-footer .primary-btn { width: 100%; font-size: 11px; padding: 11px 16px; }

/* ── chat input: auto-resize support ───────────────────────────────────────── */
.chat-input { overflow: hidden; min-height: 60px; max-height: 140px; }

/* ── approval card: entrance animation + AI variant ───────────────────────── */
.approval-card { animation: approval-in .28s cubic-bezier(.34,1.4,.64,1); }
@keyframes approval-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.approval-card--ai { border-color: rgba(196,248,106,.55); box-shadow: 0 0 0 1px rgba(196,248,106,.07), 0 10px 36px rgba(196,248,106,.05); }

/* ── scroll card: Ken Burns cinematic life ─────────────────────────────── */
@keyframes kenburns { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.07) translate(-1%, -1%); } }
.scroll-card img { animation: kenburns 22s ease-in-out infinite alternate; will-change: transform; transform-origin: center; }

/* ── scroll card: entrance animation ──────────────────────────────────── */
.scroll-card { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.scroll-card--visible { opacity: 1; transform: translateY(0); }
@media (max-width: 720px) {
  .page-wrap.scroll-route .scroll-card { opacity: 1; transform: none; transition: none; }
}

/* ── scroll card: "Make a scene" CTA ──────────────────────────────────── */
.scroll-create-btn { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; border: 1px solid rgba(196,248,106,.35); background: rgba(196,248,106,.08); color: var(--lime); border-radius: 999px; padding: 7px 13px; font: 700 10px Manrope, sans-serif; letter-spacing: .02em; cursor: pointer; transition: background .18s, border-color .18s, transform .15s; backdrop-filter: blur(6px); }
.scroll-create-btn:hover { background: rgba(196,248,106,.18); border-color: rgba(196,248,106,.6); transform: translateY(-1px); }

/* ── brief editor in inspector ─────────────────────────────────────────── */
.brief-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.brief-editor { display: grid; gap: 7px; margin-top: 4px; }
.brief-label { font: 700 9px "DM Mono", monospace; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.brief-textarea { width: 100%; background: #0a0d13; border: 1px solid var(--line); border-radius: 7px; color: var(--text); padding: 8px 9px; font-size: 10px; line-height: 1.55; resize: vertical; min-height: 56px; outline: none; font-family: inherit; }
.brief-textarea:focus { border-color: rgba(196,248,106,.45); }
.brief-input { width: 100%; background: #0a0d13; border: 1px solid var(--line); border-radius: 7px; color: var(--text); padding: 7px 9px; font-size: 10px; outline: none; font-family: inherit; }
.brief-input:focus { border-color: rgba(196,248,106,.45); }
.brief-char-row { display: grid; gap: 5px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.06); }
.brief-char-refs { display: flex; flex-direction: column; gap: 5px; padding: 6px 8px; background: rgba(255,255,255,.025); border-radius: 7px; border: 1px solid rgba(255,255,255,.06); }
.brief-char-refs-label { font: 500 9px "DM Mono", monospace; color: var(--muted); letter-spacing: .05em; }
.brief-editor-actions { display: flex; justify-content: space-between; align-items: center; gap: 7px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.brief-editor-actions > div { display: flex; gap: 6px; }
.brief-editor-actions .primary-btn, .brief-editor-actions .secondary-btn { flex: none; }

/* ── brief custom badge ────────────────────────────────────────────────── */
.brief-custom-pill { display: inline-block; background: rgba(148,129,255,.15); border: 1px solid rgba(148,129,255,.3); color: var(--violet); border-radius: 4px; padding: 2px 7px; font: 700 8px "DM Mono", monospace; letter-spacing: .08em; }

/* ── shot settings controls ─────────────────────────────────────────────── */
.shot-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 9px 0 12px; }
.shot-chip { border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); padding: 6px 4px; font-size: 9px; font-weight: 700; letter-spacing: .04em; cursor: pointer; transition: color .15s, background .15s, border-color .15s; text-align: center; }
.shot-chip:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.shot-chip.active { background: rgba(196,248,106,.12); border-color: rgba(196,248,106,.45); color: var(--lime); }

.shot-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
.shot-row-label { font: 700 9px "DM Mono", monospace; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; flex-shrink: 0; }
.shot-toggle { display: flex; gap: 3px; }
.shot-toggle-btn { border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--muted); padding: 4px 8px; font: 700 9px "DM Mono", monospace; cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.shot-toggle-btn:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.shot-toggle-btn.active { background: rgba(196,248,106,.12); border-color: rgba(196,248,106,.45); color: var(--lime); }

.shot-cost-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0 0; border-top: 1px solid var(--line); margin-top: 10px; }
.shot-cost-row span { font: 10px "DM Mono", monospace; color: var(--muted); }
.shot-cost-row strong { font: 700 10px "DM Mono", monospace; }

/* ── watch page episode strip ───────────────────────────────────────────── */
.ep-strip-section { margin-top: 36px !important; }
.ep-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.ep-strip-card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-align: left; cursor: pointer; transition: border-color .2s, transform .2s; padding: 0; }
.ep-strip-card:hover, .ep-strip-card--active { border-color: rgba(196,248,106,.4); transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.2); }
.ep-strip-card--active { border-color: rgba(196,248,106,.55); box-shadow: inset 2px 0 0 var(--lime), 0 10px 28px rgba(0,0,0,.2); }
.ep-strip-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #17191f; }
.ep-strip-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .78; transition: opacity .2s, transform .3s; }
.ep-strip-card:hover .ep-strip-thumb img { opacity: .92; transform: scale(1.04); }
.ep-strip-num { position: absolute; bottom: 6px; left: 7px; z-index: 2; font: 700 9px "DM Mono", monospace; color: var(--lime); background: rgba(0,0,0,.72); padding: 2px 6px; border-radius: 4px; }
.ep-strip-prog { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,.18); }
.ep-strip-prog > div { height: 100%; background: var(--lime); border-radius: inherit; }
.ep-strip-meta { padding: 10px 11px 11px; }
.ep-strip-meta strong { display: block; font-size: 11px; letter-spacing: -.02em; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-strip-meta p { margin: 4px 0 0; font-size: 9px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 720px) { .ep-strip { grid-auto-columns: 170px; } .ep-strip-meta strong { font-size: 10px; } }

/* ── series page episode row descriptions ───────────────────────────────── */
.ep-row-desc { display: block; font-size: 9px; color: #9fa8bc; line-height: 1.5; margin: 3px 0 2px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── player page episode overview ───────────────────────────────────────── */
.ep-overview { font-size: 14px; line-height: 1.6; color: var(--text); margin-bottom: 4px; }

/* ── studio inspector job history ───────────────────────────────────────── */
.job-row { display: flex; align-items: flex-start; gap: 8px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.05); }
.job-row:first-of-type { border-top: 0; }
.job-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.job-info { min-width: 0; flex: 1; }
.job-info span { display: block; font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job-info small { font: 9px "DM Mono", monospace; color: var(--muted); }

/* ── account page activity feed ─────────────────────────────────────────── */
.activity-feed { display: grid; gap: 0; }
.activity-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.activity-row:last-child { border-bottom: 0; }
.activity-icon { font-size: 12px; color: var(--muted); flex-shrink: 0; margin-top: 1px; min-width: 16px; text-align: center; }
.activity-body { flex: 1; min-width: 0; }
.activity-body span { display: block; font-size: 11px; }
.activity-body small { font: 9px "DM Mono", monospace; color: var(--muted); margin-top: 2px; display: block; }

/* ── modal overlay ───────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 300; background: rgba(2,3,8,.78); backdrop-filter: blur(14px); display: grid; place-items: center; padding: 20px; }
.modal-sheet { background: #131620; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; width: min(460px, 100%); box-shadow: 0 40px 100px rgba(0,0,0,.55); overflow: hidden; }
.modal-sheet .modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 22px 22px 16px; border-bottom: 1px solid var(--line); }
.modal-sheet .modal-head h3 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.04em; }
.modal-sheet .modal-head .eyebrow { font-size: 9px; }
.modal-x { background: none; border: none; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; padding: 0; flex-shrink: 0; }
.modal-body { padding: 20px 22px; }
.modal-pack-preview { display: flex; align-items: baseline; gap: 8px; margin-bottom: 20px; padding: 20px; background: rgba(196,248,106,.06); border: 1px solid rgba(196,248,106,.14); border-radius: 14px; }
.modal-pack-preview strong { font-size: 52px; font-weight: 800; letter-spacing: -.06em; color: var(--lime); line-height: 1; }
.modal-pack-preview span { font: 700 12px "DM Mono", monospace; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.modal-kv-list { display: grid; gap: 7px; margin-bottom: 14px; }
.modal-note { font-size: 10px; color: var(--muted); line-height: 1.6; margin: 0; }
.asset-modal-cover { font-size: 36px; text-align: center; padding: 24px; background: rgba(255,255,255,.04); border-radius: 12px; margin-bottom: 14px; }
.modal-asset-desc { font-size: 12px; line-height: 1.65; color: #c8cdd8; margin: 0 0 16px; }
.modal-foot { display: flex; gap: 10px; padding: 16px 22px 22px; border-top: 1px solid var(--line); }
.modal-foot button { flex: 1; }

/* ── search result improvements ─────────────────────────────────────────── */
.search-result { cursor: pointer; }
.search-result-pills { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
.search-genre-pill { font: 700 8px "DM Mono", monospace; letter-spacing: .05em; color: var(--violet); background: rgba(148,129,255,.12); border: 1px solid rgba(148,129,255,.2); border-radius: 4px; padding: 2px 6px; }
.search-result-actions { display: flex; flex-direction: column; gap: 5px; flex-shrink: 0; }
.search-watch-btn { border: 1px solid var(--line); border-radius: 7px; background: transparent; color: #bfc4d2; padding: 6px 10px; font-size: 10px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.search-watch-btn:hover { background: #222735; }
.search-create-btn { border: 1px solid rgba(196,248,106,.3); border-radius: 7px; background: rgba(196,248,106,.07); color: var(--lime); padding: 6px 10px; font-size: 9px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.search-create-btn:hover { background: rgba(196,248,106,.14); }

/* ── marketplace asset price tag ─────────────────────────────────────────── */
.asset-price-tag { font: 700 10px "DM Mono", monospace; color: var(--muted); }
.asset-price-tag--free { color: var(--lime); }

/* ── clip sequence counter pill ─────────────────────────────────────────── */
.clip-seq-pill { font: 700 8px "DM Mono", monospace; letter-spacing: .08em; color: var(--violet); background: rgba(148,129,255,.12); border: 1px solid rgba(148,129,255,.25); border-radius: 5px; padding: 2px 7px; white-space: nowrap; }

/* ── chat footer row (attach + mic + send) ──────────────────────────────── */
.chat-footer-row { display: flex; align-items: center; gap: 7px; padding: 10px 14px 12px; border-top: 1px solid rgba(255,255,255,.06); }
.chat-attach-btn, .chat-mic-btn { background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 15px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: color .15s, background .15s; padding: 0; line-height: 1; }
.chat-attach-btn:hover, .chat-mic-btn:hover { background: rgba(255,255,255,.1); color: var(--text); }
.chat-send-btn { flex: 1; }
.chat-cost-pill { font: 700 9px "DM Mono", monospace; color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; white-space: nowrap; flex-shrink: 0; }

/* ── queued generation card ─────────────────────────────────────────────── */
.queued-card { margin: 0 14px 10px; display: flex; align-items: center; gap: 10px; background: rgba(148,129,255,.07); border: 1px solid rgba(148,129,255,.2); border-radius: 10px; padding: 10px 12px; }
.queued-card-info { flex: 1; min-width: 0; }
.queued-card-info .eyebrow { color: var(--violet); }
.queued-card-info strong { display: block; font-size: 11px; margin: 2px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queued-card-info small { font: 9px "DM Mono", monospace; color: var(--muted); }
.queued-cancel { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; padding: 0 4px; flex-shrink: 0; }
.queued-cancel:hover { color: var(--text); }

/* ── knowledge panel (bottom sheet — in flex column, above input) ───────── */
.kp-panel { background: #0e1118; border: 1px solid rgba(255,255,255,.1); border-bottom: 0; border-radius: 10px 10px 0 0; padding: 0; animation: kp-slide-up .22s cubic-bezier(.34,1.4,.64,1); }
@keyframes kp-slide-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.kp-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid rgba(255,255,255,.07); flex-wrap: wrap; }
.kp-header .eyebrow { flex: 1; min-width: 80px; }
.kp-tabs { display: flex; gap: 3px; }
.kp-tab { background: transparent; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); padding: 4px 10px; font: 700 8px "DM Mono", monospace; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.kp-tab:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.kp-tab.active { background: rgba(196,248,106,.1); border-color: rgba(196,248,106,.35); color: var(--lime); }
.kp-close { background: none; border: none; color: var(--muted); font-size: 20px; cursor: pointer; line-height: 1; padding: 0; flex-shrink: 0; }
.kp-close:hover { color: var(--text); }
.kp-body { padding: 14px 16px; max-height: 220px; overflow-y: auto; scrollbar-width: thin; }
.kp-empty { font-size: 11px; color: var(--muted); margin: 0; line-height: 1.6; }

/* characters tab */
.kp-char-card { display: flex; gap: 11px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.kp-char-card:last-child { border-bottom: 0; }
.kp-char-avatar { width: 34px; height: 34px; border-radius: 9px; background: rgba(148,129,255,.2); border: 1px solid rgba(148,129,255,.3); display: flex; align-items: center; justify-content: center; font: 700 14px sans-serif; color: var(--violet); flex-shrink: 0; }
.kp-char-info { flex: 1; min-width: 0; }
.kp-char-info strong { display: block; font-size: 12px; margin-bottom: 3px; }
.kp-char-info p { font-size: 10px; color: #9fa8bc; line-height: 1.55; margin: 0; }

/* story tab */
.kp-story { display: grid; gap: 12px; }
.kp-story-block { }
.kp-story-block .eyebrow { display: block; margin-bottom: 5px; }
.kp-story-block p { font-size: 11px; color: #c0c8d8; line-height: 1.6; margin: 0; }

/* clips tab */
.kp-clips-list { display: grid; gap: 8px; }
.kp-clip-row { display: flex; align-items: center; gap: 10px; }
.kp-clip-thumb { width: 54px; height: 36px; border-radius: 6px; object-fit: cover; background: #17191f; flex-shrink: 0; }
.kp-clip-thumb--empty { background: #1a1d26; border: 1px solid var(--line); }
.kp-clip-meta { flex: 1; min-width: 0; }
.kp-clip-meta strong { display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-clip-meta small { font: 9px "DM Mono", monospace; color: var(--muted); }

/* ── studio mobile fullscreen chat ──────────────────────────────────────── */
@media (max-width: 720px) {
  .studio { grid-template-columns: 1fr; grid-template-rows: auto; }
  .chat-panel { order: -1; height: 65vh; display: flex; flex-direction: column; border-radius: 16px 16px 0 0; }
  .chat-log { flex: 1; min-height: 0; }
  .episode-canvas { border-top: none; border-radius: 0; }
  .inspector { display: none; }
  .kp-body { max-height: 160px; }
  .chat-footer-row { padding: 8px 10px 10px; }
  .chat-attach-btn, .chat-mic-btn { width: 34px; height: 34px; font-size: 14px; }
}

/* ── chat formatted text ─────────────────────────────────────────────────── */
.bubble .chat-bullets { margin: 4px 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.bubble .chat-bullets li { font-size: 13px; line-height: 1.55; display: flex; align-items: flex-start; gap: 7px; }
.bubble .chat-bullets li::before { content: '•'; color: var(--lime); font-weight: 700; flex-shrink: 0; margin-top: 1px; }
.bubble .chat-para { margin: 3px 0; font-size: 13px; line-height: 1.55; }
.bubble .chat-para:first-child { margin-top: 0; }
.bubble .chat-para:last-child { margin-bottom: 0; }
@media (max-width: 720px) { .bubble .chat-bullets li, .bubble .chat-para { font-size: 14px; } }

/* ── approval prompt preview + inline edit ───────────────────────────────── */
.approval-prompt-preview { margin-top: 10px; padding: 10px 0 0; border-top: 1px solid rgba(255,255,255,.07); }
.approval-prompt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.approval-prompt-btns { display: flex; gap: 5px; }
.approval-prompt-text { font: 11px/1.65 "DM Mono", monospace; color: #a8b4c8; margin: 0; white-space: pre-wrap; word-break: break-word; max-height: 110px; overflow-y: auto; }
.approval-prompt-edit { width: 100%; background: #0a0d13; border: 1px solid rgba(196,248,106,.35); border-radius: 7px; color: var(--text); padding: 8px 10px; font: 11px/1.6 "DM Mono", monospace; resize: vertical; min-height: 80px; outline: none; }

/* ── studio backdrop ─────────────────────────────────────────────────────── */
.studio { position: relative; }
.studio::before { content: ''; position: absolute; inset: 0; background: var(--studio-hero, none) center/cover no-repeat; opacity: .05; filter: blur(60px) saturate(1.5); pointer-events: none; z-index: -1; }
.studio > .studio-panel, .studio > * { position: relative; z-index: 1; }

/* ── sequence player modal ───────────────────────────────────────────────── */
.seq-player { background: #0d0f16; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; width: min(540px, 94vw); overflow: hidden; }
.seq-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.seq-stage { background: #060708; overflow: hidden; }
.seq-stage video { display: block; width: 100%; height: auto; max-height: 54vh; object-fit: contain; }
.seq-controls { display: flex; align-items: center; gap: 10px; padding: 14px 18px 8px; }
.seq-nav { background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font-size: 16px; width: 36px; height: 36px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.seq-nav:hover:not(:disabled) { background: rgba(255,255,255,.14); }
.seq-nav--dim { opacity: .3; cursor: default; }
.seq-info { flex: 1; text-align: center; }
.seq-info strong { display: block; font-size: 13px; }
.seq-info small { font: 9px "DM Mono", monospace; color: var(--muted); }
.seq-dots { display: flex; gap: 7px; justify-content: center; padding: 6px 18px 18px; }
.seq-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.18); border: none; cursor: pointer; padding: 0; transition: background .15s, transform .15s; }
.seq-dot.active { background: var(--lime); transform: scale(1.3); }

/* ── quick shot presets ──────────────────────────────────────────────────── */
.shot-preset-grid { display: grid; gap: 5px; margin-top: 8px; }
.shot-preset-btn { border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); padding: 7px 10px; font-size: 10px; font-weight: 500; cursor: pointer; text-align: left; transition: color .15s, background .15s, border-color .15s; }
.shot-preset-btn:hover { background: rgba(255,255,255,.06); color: var(--text); border-color: rgba(255,255,255,.2); }

/* ── timeline reorder buttons ────────────────────────────────────────────── */
.tl-reorder { background: none; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; width: 24px; height: 22px; cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.tl-reorder:hover:not(:disabled) { color: var(--text); border-color: rgba(255,255,255,.25); }
.tl-reorder:disabled { opacity: .2; cursor: default; }

/* ── scene notes textarea ────────────────────────────────────────────────── */
.show-notes-input { width: 100%; background: #0a0d13; border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 8px 9px; font: 10px/1.65 inherit; resize: vertical; min-height: 54px; max-height: 110px; outline: none; margin-top: 6px; }
.show-notes-input:focus { border-color: rgba(255,255,255,.18); }

/* ── show switcher scroll fix ────────────────────────────────────────────── */
.show-switcher { display: flex; gap: 6px; padding: 12px 14px 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.show-switcher::-webkit-scrollbar { display: none; }
.show-chip { flex-shrink: 0; }
.show-chip--create { border-style: dashed; color: var(--lime) !important; border-color: rgba(196,248,106,.35) !important; opacity: .8; }
.show-chip--create:hover { opacity: 1; background: rgba(196,248,106,.07) !important; border-color: rgba(196,248,106,.55) !important; }
.show-chip--art { padding-left: 7px; display: flex; align-items: center; gap: 6px; }
.show-chip-thumb { width: 16px; height: 16px; border-radius: 3px; object-fit: cover; flex-shrink: 0; }

/* ── mobile studio tabs ──────────────────────────────────────────────────── */
.studio-tabs { display: none; gap: 2px; padding: 10px 14px 0; }
.studio-tab { flex: 1; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); font: 700 10px Manrope, sans-serif; padding: 9px 4px; cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
.studio-tab:hover { color: var(--text); border-color: rgba(255,255,255,.22); }
.studio-tab.active { background: rgba(196,248,106,.1); border-color: rgba(196,248,106,.4); color: var(--lime); }
@media (max-width: 720px) {
  .studio-tabs { display: flex; position: fixed; bottom: 68px; left: 0; right: 0; z-index: 20; background: rgba(9,11,16,.96); border-top: 1px solid rgba(255,255,255,.08); padding: 10px 14px; backdrop-filter: blur(14px); }
  .studio { padding-bottom: 56px; }
  .studio .chat-panel[style*="display: none"], .studio .episode-canvas[style*="display: none"], .studio .inspector[style*="display: none"] { display: none !important; }
}

/* ── approval hotkey hint ────────────────────────────────────────────────── */
.approval-hotkey-hint { margin-top: 8px; font: 9px "DM Mono", monospace; color: var(--muted); text-align: right; letter-spacing: .05em; }
.approval-hotkey-hint kbd { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 4px; padding: 1px 5px; font-family: inherit; color: var(--text); }

/* ── generation stage tracker ────────────────────────────────────────────── */
.gen-stage-pill { font: 700 7px "DM Mono", monospace; letter-spacing: .08em; background: rgba(196,248,106,.12); border: 1px solid rgba(196,248,106,.25); color: var(--lime); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }
.gen-stage-track { display: flex; align-items: center; gap: 0; margin: 8px 0 4px; }
.gen-stage-step { font: 700 8px "DM Mono", monospace; letter-spacing: .05em; color: rgba(255,255,255,.25); padding: 3px 8px; border-radius: 999px; transition: color .3s, background .3s; white-space: nowrap; }
.gen-stage-step.done { color: var(--lime); }
.gen-stage-step.active { background: rgba(196,248,106,.12); border: 1px solid rgba(196,248,106,.3); color: var(--lime); animation: dot-blink 1.6s ease infinite; }
.gen-stage-line { flex: 1; height: 1px; background: rgba(255,255,255,.1); min-width: 8px; }

/* ── credits purchase modal ──────────────────────────────────────────────── */
.credit-pack { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #0d1018; transition: border-color .18s; }
.credit-pack:hover { border-color: rgba(255,255,255,.18); }
.credit-pack--best { border-color: rgba(196,248,106,.35); background: rgba(196,248,106,.04); }
.credit-pack-left { display: grid; gap: 3px; }
.credit-pack-left strong { font-size: 14px; }
.credit-pack-left small { font: 9px "DM Mono", monospace; color: var(--muted); }
.credit-pack-badge { font: 700 7px "DM Mono", monospace; letter-spacing: .1em; color: var(--lime); background: rgba(196,248,106,.12); border: 1px solid rgba(196,248,106,.25); border-radius: 4px; padding: 2px 6px; display: inline-block; margin-bottom: 4px; }

/* ── studio welcome card ─────────────────────────────────────────────────── */
.studio-welcome { display: flex; flex-direction: column; gap: 0; animation: welcome-in .3s ease; }
@keyframes welcome-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.studio-welcome-cover { position: relative; border-radius: 10px; overflow: hidden; height: 110px; flex-shrink: 0; }
.studio-welcome-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: saturate(.9) brightness(.75); display: block; }
.studio-welcome-cover-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 60%, transparent 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 10px 12px; gap: 3px; }
.studio-welcome-title { font-size: 15px; font-weight: 800; letter-spacing: -.03em; color: #fff; line-height: 1.1; }
.studio-welcome-body { padding: 12px 2px 4px; display: flex; flex-direction: column; gap: 10px; }
.studio-welcome-clip-row { display: flex; align-items: flex-start; gap: 9px; }
.clip-mark { width: 22px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, var(--violet), var(--lime)); color: #0a0c10; font: 800 11px Manrope, sans-serif; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.studio-welcome-msg { font-size: 12px; line-height: 1.6; color: #cdd2e0; margin: 0; flex: 1; }
.char-quick-row { display: flex; gap: 5px; flex-wrap: wrap; }
.char-quick-pill { border: 1px solid rgba(148,129,255,.3); background: rgba(148,129,255,.08); color: var(--violet); border-radius: 999px; padding: 5px 10px; font: 700 10px Manrope, sans-serif; cursor: pointer; transition: background .15s, border-color .15s; white-space: nowrap; }
.char-quick-pill:hover { background: rgba(148,129,255,.18); border-color: rgba(148,129,255,.5); }
.scene-starters-grid { display: grid; gap: 5px; }
.scene-starter-btn { border: 1px solid var(--line); border-radius: 8px; background: #0c0f17; color: #b8bdcc; padding: 8px 11px; font-size: 11px; font-weight: 500; cursor: pointer; text-align: left; display: flex; align-items: center; gap: 7px; transition: color .15s, background .15s, border-color .15s; }
.scene-starter-btn:hover { background: rgba(196,248,106,.06); border-color: rgba(196,248,106,.3); color: var(--lime); }
.scene-starter-arrow { color: var(--lime); font-size: 7px; flex-shrink: 0; }

/* ── bubble clip branding ────────────────────────────────────────────────── */
.bubble--clip { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: flex-start; }
.bubble-clip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); flex-shrink: 0; margin-top: 5px; }

/* ── tl-empty improvements ───────────────────────────────────────────────── */
.tl-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 42px 20px; text-align: center; }
.tl-empty-icon { font-size: 24px; color: rgba(196,248,106,.4); line-height: 1; text-shadow: 0 0 18px rgba(196,248,106,.3); }
.tl-empty strong { font-size: 13px; color: var(--text); }
.tl-empty p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* ── approval card action label ──────────────────────────────────────────── */
.approval-action-label { font: 700 9px "DM Mono", monospace; letter-spacing: .12em; color: var(--orange); margin-bottom: 4px; }
.approval-action-label--ai { color: var(--lime); }
.approval-card { border-left: 3px solid var(--lime) !important; padding: 16px 18px; }
.approval-card--ai { border-left-color: var(--lime) !important; }
.approval-card-top { gap: 12px; }
.approval-generate-btn { font-size: 12px; padding: 10px 16px; }

/* ── show switcher active state ──────────────────────────────────────────── */
.show-chip.active { background: var(--lime); color: #0a0c10; border-color: var(--lime); font-weight: 800; box-shadow: 0 0 0 3px rgba(196,248,106,.15); }

/* ── chat input focus ────────────────────────────────────────────────────── */
.chat-input:focus { border-color: rgba(196,248,106,.4); background: #0e1118; }

/* ── gen status banner ───────────────────────────────────────────────────── */
.gen-status-banner { margin: 8px 12px; }

/* ── panel head compact ──────────────────────────────────────────────────── */
.panel-head { padding: 13px 15px; }

/* ── inspector section spacing ───────────────────────────────────────────── */
.inspector-section { padding: 13px 15px; }

/* ── bin card ready glow ─────────────────────────────────────────────────── */
.bin-card--ready { box-shadow: 0 0 0 1px rgba(196,248,106,.08), 0 8px 24px rgba(0,0,0,.2); }

/* ── Continuity, references, Backstage receipt, Playbook/Bible (2026-12-02) ── */
.ref-chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.ref-chip { font-size: 10px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--muted, #aab); border: 1px solid rgba(255,255,255,.12); }
.ref-chip--frame { background: rgba(6,182,212,.16); border-color: rgba(6,182,212,.5); color: #7fe6f5; }
.approval-refs { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.continuity-toggle { align-self: flex-start; }
.continuity-toggle.on { border-color: rgba(6,182,212,.6); color: #7fe6f5; }
.approval-free { color: var(--muted, #99a); font-size: 10px; }
.render-ghost { width: 64px; height: 96px; object-fit: cover; border-radius: 8px; opacity: .55; filter: saturate(.6); animation: ghostPulse 1.6s ease-in-out infinite; flex-shrink: 0; }
@keyframes ghostPulse { 50% { opacity: .9; } }
.backstage { margin-top: 8px; font-size: 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 6px 8px; background: rgba(0,0,0,.25); }
.backstage summary { display: flex; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; font-weight: 600; }
.backstage summary::-webkit-details-marker { display: none; }
.backstage ol { margin: 6px 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.backstage li { display: flex; justify-content: space-between; gap: 10px; padding-left: 8px; border-left: 2px solid rgba(255,255,255,.15); }
.backstage li em { font-style: normal; white-space: nowrap; opacity: .8; }
.backstage .bk-read { border-color: #8db5ff; } .backstage .bk-plan { border-color: #c4f86a; }
.backstage .bk-look { border-color: #06b6d4; } .backstage .bk-animate { border-color: #f59e0b; }
.backstage .bk-organize { border-color: #a78bfa; }
.backstage-foot { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 4px; opacity: .9; }
.kp-doc { display: flex; flex-direction: column; }
.kp-doc-hint { font-size: 11px; opacity: .7; margin: 0 0 6px; }
.kp-doc-edit { min-height: 260px; width: 100%; box-sizing: border-box; font: 12px/1.5 ui-monospace, Menlo, monospace; background: rgba(0,0,0,.3); color: inherit; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: 8px; resize: vertical; }
.kp-tabs { flex-wrap: wrap; }
.kp-doc-edit { min-height: 180px; max-height: 340px; }

/* ── Studio modes (Basic / Advanced), Edit video, Router v1 (2026-12-02) ── */
.mode-toggle { margin-left: auto; display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--panel); flex-shrink: 0; }
.mode-toggle button { border: 0; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; padding: 6px 14px; border-radius: 999px; }
.mode-toggle button.active { background: var(--lime); color: #10120b; }
.studio--basic { grid-template-columns: minmax(0, 760px); justify-content: center; }
.studio--basic .episode-canvas, .studio--basic .inspector { display: none; }
.studio--basic .chat-panel { min-height: 72vh; }
.studio--basic ~ .studio-tabs { display: none; }
.edit-video-btn { background: rgba(196,248,106,.12); color: var(--lime); border-color: rgba(196,248,106,.35); }
.edit-video-count { display: inline-grid; place-items: center; min-width: 16px; height: 16px; border-radius: 8px; background: var(--lime); color: #10120b; font-size: 9px; margin-left: 4px; padding: 0 4px; }
.model-chip { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.basic-strip { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-top: 1px solid var(--line); overflow-x: auto; }
.basic-strip-thumb { flex: 0 0 auto; width: 40px; height: 56px; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); padding: 0; background: var(--panel-2); }
.basic-strip-thumb img, .basic-strip-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.basic-strip-open { margin-left: auto; flex: 0 0 auto; border: 0; background: transparent; color: var(--lime); font-size: 11px; font-weight: 700; }

.studio-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(4,5,8,.78); backdrop-filter: blur(10px); display: grid; place-items: start center; padding: 4vh 16px; overflow-y: auto; }
.studio-overlay-box { width: min(1100px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px 26px; box-shadow: var(--shadow); }
.studio-overlay-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.studio-overlay-head h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.03em; }
.studio-overlay-head .close-btn { font-size: 26px; line-height: 1; }
.editor-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ed-section-head { margin: 22px 0 10px; font-size: 13px; }
.ed-section-head small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.ed-cut { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.ed-takes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ed-card { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ed-card strong { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-card small { color: var(--muted); font-size: 10px; }
.ed-thumb { position: relative; aspect-ratio: 9 / 13; border-radius: 10px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); display: grid; place-items: center; }
.ed-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-thumb-empty { width: 100%; height: 100%; }
.ed-num { position: absolute; top: 6px; left: 6px; background: var(--lime); color: #10120b; font-size: 10px; font-weight: 800; border-radius: 6px; padding: 1px 6px; }
.ed-play { position: absolute; bottom: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; }
.ed-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.ed-actions .mini-btn { padding: 4px 7px; font-size: 10px; }
.ed-add { flex: 1; color: var(--lime); }
.ed-remove { margin-left: auto; color: var(--muted); }
.ed-card--rendering .ed-thumb { border-style: dashed; }

.models-intro { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 6px 0 14px; }
.models-tier-head { margin: 20px 0 10px; font-size: 13px; }
.models-tier-head small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.models-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.model-card { text-align: left; display: flex; flex-direction: column; gap: 5px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); width: 100%; }
.model-card:hover:not(:disabled) { border-color: rgba(196,248,106,.4); }
.model-card.active { border-color: var(--lime); box-shadow: 0 0 0 1px var(--lime) inset; }
.model-card--off { opacity: .5; cursor: not-allowed; }
.model-card--auto { margin-bottom: 4px; }
.model-card-top { display: flex; align-items: center; gap: 7px; }
.model-card-top strong { font-size: 12px; }
.model-card-sub { color: var(--muted); font-size: 10px; }
.model-card-why { margin: 0; color: #b6bccb; font-size: 11px; line-height: 1.45; }
.model-specs { display: flex; flex-wrap: wrap; gap: 4px; }
.model-specs span { font-size: 9px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.model-off-why { color: var(--orange); font-size: 10px; }
.model-tier { margin-left: auto; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
.model-tier--premium { color: var(--violet); border-color: rgba(148,129,255,.4); }
.model-tier--standard { color: #8fd3ff; border-color: rgba(143,211,255,.35); }
.model-tier--draft { color: var(--lime); border-color: rgba(196,248,106,.35); }
.model-mini-list { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.model-mini-list .model-card { padding: 8px 10px; }
.auto-approve-row { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); margin-top: 10px; cursor: pointer; }
.health-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: var(--muted); display: inline-block; }
.health-dot--normal { background: var(--lime); box-shadow: 0 0 6px var(--lime); }
.health-dot--slower { background: #ffd166; }
.health-dot--much_slower, .health-dot--stuck { background: var(--orange); }
.health-dot--failing { background: #ff5c6c; }

.route-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 8px; font-size: 11px; }
.route-line strong { font-size: 11px; }
.route-meta { color: var(--muted); font-size: 10px; }
.route-line--bad { color: var(--orange); }
.route-why { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
.route-alts { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 7px; font-size: 10px; color: var(--muted); }
.route-alts .mini-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; padding: 4px 8px; }
.route-prompt { margin-top: 8px; font-size: 10px; color: var(--muted); }
.route-prompt pre { white-space: pre-wrap; font-family: 'DM Mono', monospace; font-size: 10px; color: #c9cede; background: rgba(0,0,0,.25); border-radius: 8px; padding: 8px; margin: 6px 0 0; }
.route-spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--lime); animation: routeSpin .8s linear infinite; }
@keyframes routeSpin { to { transform: rotate(360deg); } }
@media (max-width: 720px) {
  .mode-toggle { margin-left: 0; }
  .studio-overlay { padding: 0; }
  .studio-overlay-box { border-radius: 0; min-height: 100vh; padding: 16px; }
  .ed-cut { grid-auto-columns: 120px; }
  .ed-takes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.chat-panel .clip-head-actions { flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
@media (min-width: 1051px) { .studio:not(.studio--basic) .model-chip { display: none; } }

/* ── CLIP chat: attached references + clips that come back in the chat ── */
.attach-tray { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: 6px 0; }
.attach-item { position: relative; width: 84px; display: flex; flex-direction: column; gap: 4px; }
.attach-item img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(196,248,106,.45); }
.attach-item select { width: 100%; font-size: 11px; padding: 3px 4px; border-radius: 6px; background: rgba(255,255,255,.06); color: inherit; border: 1px solid rgba(255,255,255,.14); }
.attach-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #111; color: #fff; cursor: pointer; line-height: 20px; padding: 0; }
.attach-hint { flex-basis: 100%; color: var(--muted); font-size: 11px; }
.chat-refs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat-ref { margin: 0; width: 64px; }
.chat-ref img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.chat-ref figcaption { font-size: 10px; opacity: .75; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-clip { margin-top: 8px; }
.chat-clip video { width: 100%; max-height: 420px; border-radius: 10px; background: #000; display: block; }
.chat-clip small { display: block; margin-top: 4px; opacity: .7; font-size: 11px; }
.bubble--clip .chat-clip, .bubble--clip .chat-refs { grid-column: 1 / -1; }
.bubble--clip .chat-clip video { max-width: 360px; }

/* ── Studio partner: activity steps, clip numbers, clip editor ── */
.clip-num { display: inline-block; font: 700 10px/1 ui-monospace, Menlo, monospace; color: #10120b; background: var(--lime); border-radius: 5px; padding: 3px 5px; margin-right: 4px; vertical-align: 1px; }
.chat-steps { grid-column: 1 / -1; list-style: none; margin: 0 0 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); display: grid; gap: 5px; }
.chat-step { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: baseline; font-size: 12px; }
.chat-step-verb { font: 700 10px/1.4 ui-monospace, Menlo, monospace; text-transform: uppercase; letter-spacing: .06em; color: var(--lime); }
.chat-step--scoring .chat-step-verb { color: var(--violet); }
.chat-step--rendering .chat-step-verb, .chat-step--retiming .chat-step-verb { color: var(--orange); }
.chat-step--organizing .chat-step-verb, .chat-step--restoring .chat-step-verb { color: var(--muted); }
.chat-step em { font-style: normal; color: var(--muted); font-size: 11px; }
.chat-clip-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.chat-clip-meta small { margin: 0 auto 0 0 !important; }
.chat-clip-meta a.mini-btn { text-decoration: none; }

.clip-ed { width: min(1060px, 100%); }
.clip-ed-title { min-width: 0; flex: 1; }
.clip-ed-name { width: 100%; background: transparent; border: 0; border-bottom: 1px dashed transparent; color: var(--text); font-size: 22px; font-weight: 800; letter-spacing: -.02em; padding: 2px 0; }
.clip-ed-name:hover, .clip-ed-name:focus { border-bottom-color: var(--line); outline: none; }
.clip-ed-body { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 22px; margin-top: 14px; }
.clip-ed-stage video { width: 100%; max-height: 520px; aspect-ratio: 9 / 16; object-fit: contain; background: #000; border-radius: 12px; display: block; }
.clip-ed-transport { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.clip-ed-transport span { font: 600 12px ui-monospace, Menlo, monospace; color: var(--muted); min-width: 44px; }
.clip-ed-note { display: block; color: var(--muted); font-size: 11px; margin-top: 8px; line-height: 1.45; }
.clip-ed-controls { display: grid; gap: 12px; align-content: start; min-width: 0; }
.ce-sec { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--panel-2); }
.ce-sec--focus { border-color: rgba(196,248,106,.55); box-shadow: 0 0 0 3px rgba(196,248,106,.08); }
.ce-sec h4 { margin: 0 0 10px; font-size: 13px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ce-sec h4 small { color: var(--muted); font-weight: 500; font-size: 11px; }
.ce-sec input[type=range] { width: 100%; accent-color: var(--lime); }
.ce-trim { position: relative; height: 34px; border-radius: 8px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 10%); background-color: rgba(0,0,0,.35); margin-bottom: 6px; }
.ce-trim-keep { position: absolute; top: 0; bottom: 0; background: rgba(196,248,106,.18); border: 2px solid var(--lime); border-radius: 8px; pointer-events: none; }
.ce-trim input[type=range] { position: absolute; inset: 0; margin: 0; height: 34px; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.ce-trim input[type=range]::-webkit-slider-thumb { pointer-events: all; -webkit-appearance: none; width: 12px; height: 34px; border-radius: 4px; background: var(--lime); cursor: ew-resize; }
.ce-trim input[type=range]::-moz-range-thumb { pointer-events: all; width: 12px; height: 34px; border-radius: 4px; background: var(--lime); border: 0; cursor: ew-resize; }
.ce-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.ce-row--wrap { flex-wrap: wrap; }
.ce-row .brief-input { flex: 1; min-width: 0; }
.ce-val { font: 600 11px ui-monospace, Menlo, monospace; color: var(--muted); min-width: 38px; }
.clip-ed-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.clip-ed-foot .ed-remove { margin-left: auto; }
.ce-busy { color: var(--orange); font-size: 12px; }
@media (max-width: 760px) {
  .clip-ed-body { grid-template-columns: 1fr; }
  .clip-ed-stage video { max-height: 52vh; }
}

/* ── Watch library: real episodes ── */
.hero--video { background: #05060a; }
.hero--video .hero-video { position: absolute; top: 0; right: 0; height: 100%; width: 72%; object-fit: cover; object-position: center 30%; z-index: 0; }
.hero--video::after { z-index: 0; background: linear-gradient(90deg, rgba(6,7,11,1) 0%, rgba(6,7,11,.96) 28%, rgba(6,7,11,.55) 48%, rgba(6,7,11,.08) 75%, transparent 100%), linear-gradient(0deg, rgba(8,9,13,.6), transparent 45%); }
.hero--video::before { display: none; }
@media (max-width: 720px) { .hero--video .hero-video { width: 100%; } .hero--video::after { background: linear-gradient(0deg, rgba(6,7,11,1) 0%, rgba(6,7,11,.85) 40%, rgba(6,7,11,.1) 75%); } }
.player-art--real { background: #000; aspect-ratio: 16 / 9; }
.player-art--real video.player-real { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.scroll-card video.scroll-video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 720px) { .player-art--real { aspect-ratio: 9 / 13; } }

/* ── Universes ── */
.universe-action { background: linear-gradient(135deg, rgba(196,248,106,.95), rgba(148,129,255,.9)) !important; border-color: transparent !important; box-shadow: 0 0 18px rgba(196,248,106,.35); }
.universe-action svg circle, .universe-action svg ellipse { stroke: #10120b; } .universe-action svg circle:last-child { fill: #10120b; }
.universe-btn { display: inline-flex; align-items: center; gap: 8px; }
.secondary-btn.universe-btn svg circle, .secondary-btn.universe-btn svg ellipse { stroke: currentColor; }
.primary-btn.universe-btn svg circle, .primary-btn.universe-btn svg ellipse { stroke: #10120b; } .primary-btn.universe-btn svg circle:last-child { fill: #10120b; }
.universe-card .eyebrow { display: flex; align-items: center; gap: 7px; }
.universe-card .eyebrow svg { width: 14px; height: 14px; }
.uni-list { display: grid; gap: 6px; margin: 12px 0 10px; }
.uni-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); color: inherit; cursor: pointer; }
.uni-row.here { border-color: rgba(196,248,106,.45); }
.uni-row strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uni-row small { grid-column: 1; color: var(--muted); font-size: 11px; }
.uni-badge { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 10px; padding: 3px 8px; border-radius: 99px; }
.uni-badge.orig { background: rgba(110,150,255,.16); color: #8fb0ff; }
.uni-badge.mine { background: rgba(110,220,140,.16); color: #7fe0a0; }

/* ── CLIP director turns (Dec 5 2026) ───────────────────────────── */
.bubble--clip > *:not(.bubble-clip-dot) { grid-column: 2; min-width: 0; }
.bubble--clip { row-gap: 4px; }
.bubble--clip .chat-para { margin: 0 0 4px; }
.bubble--clip .chat-para:last-of-type { margin-bottom: 0; }
.bubble.thinking { gap: 10px; }
.bubble.thinking span { width: auto; height: auto; border-radius: 0; background: none; animation: none; }
.bubble.thinking .think-dots { display: flex; gap: 5px; }
.bubble.thinking .think-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(196,248,106,.6); animation: think-pulse 1.3s ease infinite; }
.bubble.thinking .think-dots span:nth-child(2) { animation-delay: .18s; }
.bubble.thinking .think-dots span:nth-child(3) { animation-delay: .36s; }
.think-label { font-size: 12px; color: var(--muted); letter-spacing: .01em; }

.clip-read { margin: 0 0 6px; font-size: 11.5px; color: var(--muted); }
.clip-read summary { cursor: pointer; list-style: none; display: inline-flex; gap: 4px; align-items: center; font-family: ui-monospace, Menlo, monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.clip-read summary::-webkit-details-marker { display: none; }
.clip-read summary::before { content: '▸'; transition: transform .15s; }
.clip-read[open] summary::before { transform: rotate(90deg); }
.clip-read-intent { color: var(--lime); }
.clip-read p { margin: 6px 0 2px; padding-left: 10px; border-left: 2px solid rgba(148,129,255,.45); font-style: italic; line-height: 1.5; }

.clip-options { display: grid; gap: 7px; margin-top: 9px; }
.clip-option { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.03); color: var(--text); cursor: pointer; font: inherit; transition: border-color .15s, background .15s, transform .15s; }
.clip-option:hover { border-color: rgba(196,248,106,.55); background: rgba(196,248,106,.06); transform: translateX(2px); }
.clip-option-n { flex: none; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font: 700 11px ui-monospace, Menlo, monospace; background: rgba(196,248,106,.14); color: var(--lime); }
.clip-option-body, .clip-plan-body { display: grid; gap: 2px; min-width: 0; }
.clip-option-body strong, .clip-plan-body strong { font-size: 13px; }
.clip-option-body small, .clip-plan-body small { font-size: 12px; color: var(--muted); line-height: 1.45; }

.clip-plan { margin-top: 9px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.clip-plan-head { padding: 8px 12px; font: 600 10px ui-monospace, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--lime); background: rgba(196,248,106,.06); border-bottom: 1px solid var(--line); }
.clip-plan-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.clip-plan-row:last-child { border-bottom: 0; }
.clip-plan-n { font: 700 11px ui-monospace, Menlo, monospace; color: var(--muted); text-align: center; }
.clip-plan-go { padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(196,248,106,.4); background: transparent; color: var(--lime); font: 600 11px inherit; cursor: pointer; }
.clip-plan-go:hover { background: var(--lime); color: #0b0d12; }

.clip-shot { margin-top: 9px; border: 1px solid rgba(196,248,106,.28); border-radius: 10px; background: rgba(196,248,106,.035); overflow: hidden; }
.clip-shot-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.clip-shot-head strong { font-size: 13px; flex: 1; min-width: 0; }
.clip-shot-tag { font: 700 9px ui-monospace, Menlo, monospace; letter-spacing: .12em; color: #0b0d12; background: var(--lime); padding: 2px 6px; border-radius: 4px; }
.clip-shot-len { font: 600 10px ui-monospace, Menlo, monospace; color: var(--muted); }
.clip-beats { list-style: none; margin: 0; padding: 4px 0; }
.clip-beats li { display: grid; grid-template-columns: 52px 1fr; gap: 8px; padding: 6px 12px; font-size: 12.5px; line-height: 1.5; position: relative; }
.clip-beat-t { font: 600 10px ui-monospace, Menlo, monospace; color: var(--lime); padding-top: 2px; }
.clip-shot-sound { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.clip-shot-sound span { color: var(--violet); }
@media (max-width: 720px) { .clip-beats li { grid-template-columns: 44px 1fr; font-size: 13.5px; } .clip-option-body strong { font-size: 14px; } }
@media (max-width: 720px) {
  .approval-card-top { flex-direction: column; align-items: stretch; }
  .approval-info { min-width: 0; }
  .approval-actions { width: 100%; }
  .approval-actions > * { flex: 1; justify-content: center; }
}
@media (max-width: 720px) {
  .studio--basic .chat-panel, .chat-panel { height: calc(100dvh - 200px); min-height: 520px; }
  .chat-log { min-height: 260px; }
  .chat-panel .suggestions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .chat-panel .suggestions::-webkit-scrollbar { display: none; }
  .chat-panel .suggestion { flex: none; }
}

/* ── CLIP v3: Trimz-style generation card, multi-bubble, memory card ── */
.bubble--multi + .bubble--multi { margin-top: -4px; }
.bubble--multi:not(:first-of-type) .bubble-clip-dot { display: none; }
.clip-memory { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; padding: 8px 10px; border-radius: 10px;
  background: rgba(150, 120, 255, .10); border: 1px solid rgba(150, 120, 255, .28); font-size: 12px; }
.clip-memory span { font-weight: 700; }
.clip-memory em { font-style: normal; opacity: .75; }
.gen-card { margin: 10px 0 4px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.035);
  border: 1px solid rgba(196,248,106,.28); box-shadow: 0 8px 30px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 10px; }
.gen-card-head { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.gen-card-title { font-size: 16px; }
.gen-card-summary { margin: -4px 0 0; font-size: 13px; opacity: .8; }
.gen-card-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gen-card-meta div { background: rgba(255,255,255,.04); border-radius: 10px; padding: 7px 9px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gen-card-meta span { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; opacity: .55; }
.gen-card-meta b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gen-card-chain { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.14); }
.gen-card-chain.on { border: 1px solid rgba(196,248,106,.45); background: rgba(196,248,106,.06); }
.gen-card-chain img { width: 84px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex: none; }
.gen-card-chain-off { width: 84px; aspect-ratio: 16/9; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.05); flex: none; opacity: .5; }
.gen-card-chain-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 12px; }
.gen-card-chain-txt small { opacity: .7; }
.gen-card-sec { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; opacity: .55; margin-bottom: -4px; }
.gen-card-refs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.gen-card-refs figure { margin: 0; flex: none; width: 76px; }
.gen-card-refs img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; display: block; }
.gen-card-refs figcaption { font-size: 10px; margin-top: 4px; line-height: 1.25; opacity: .8; }
.gen-card-refs figcaption em { font-style: normal; opacity: .7; }
.gen-card-none { margin: 0; font-size: 12px; opacity: .6; }
.gen-card-prompt { border-radius: 10px; background: rgba(0,0,0,.25); padding: 8px 10px; }
.gen-card-prompt summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; list-style: none; }
.gen-card-prompt summary em { font-style: normal; font-weight: 400; opacity: .55; }
.gen-card-prompt .approval-prompt-btns { margin: 8px 0 6px; display: flex; gap: 6px; }
.gen-card-prompt-text { white-space: pre-wrap; font-size: 11px; line-height: 1.5; max-height: 320px; overflow: auto; margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; opacity: .85; }
.gen-card-actions { display: flex; gap: 8px; }
.gen-card-actions .primary-btn { flex: 1; }
.gen-card-foot { opacity: .5; font-size: 11px; text-align: center; }
@media (max-width: 520px) { .gen-card-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Credits v2: quality picker on the generation card, packs page ── */
.gen-card-quality { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gen-card-quality button { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 8px 10px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10); color: inherit; cursor: pointer; text-align: left; font: inherit; }
.gen-card-quality button b { font-size: 12px; }
.gen-card-quality button small { font-size: 10px; opacity: .6; }
.gen-card-quality button.on { border-color: rgba(196,248,106,.7); background: rgba(196,248,106,.10); }
.quality-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.quality-legend div { display: flex; gap: 8px; align-items: baseline; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.04); font-size: 13px; }
.quality-legend span { opacity: .6; font-size: 11px; }
.quality-legend em { font-style: normal; opacity: .8; font-size: 12px; }
.pack { position: relative; }
.pack--best { border-color: rgba(196,248,106,.55) !important; }
.pack .credit-pack-badge { position: absolute; top: 10px; right: 10px; }
.pack-grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* ── CLIP chat v4 (docs/CLIP_UX_V4.md): motion, live render card, composer ─────────────── */
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.bubble--in, .render-card.bubble--in { animation: bubble-in .38s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d, 0ms); }
@media (prefers-reduced-motion: reduce) { .bubble--in, .render-card.bubble--in { animation: none; } }

.bubble.user { border-radius: 14px 14px 4px 14px; }
.bubble--clip { border-radius: 4px 14px 14px 14px; background: linear-gradient(180deg, #1c2030, #181b26); border: 1px solid rgba(255,255,255,.05); }
.bubble--multi + .bubble--multi { border-top-left-radius: 4px; }

/* thinking: CLIP avatar + shimmering stage */
.clip-avatar { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex: none; font: 800 11px Manrope, sans-serif; color: #10120b; background: linear-gradient(135deg, var(--lime), #8fe0a0); box-shadow: 0 0 0 3px rgba(196,248,106,.12), 0 0 18px rgba(196,248,106,.25); }
.bubble.thinking { gap: 10px; border: 1px solid rgba(196,248,106,.14); background: linear-gradient(180deg, #1a1f2a, #161a23); }
.bubble.thinking .think-label { background: linear-gradient(90deg, var(--muted) 0%, #eef6dd 45%, var(--muted) 90%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: think-shimmer 1.8s linear infinite; font-weight: 600; }
@keyframes think-shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* live render card */
.render-card { display: grid; grid-template-columns: 132px minmax(0,1fr); gap: 14px; padding: 12px; border-radius: 16px; max-width: 560px; background: radial-gradient(120% 140% at 0% 0%, rgba(196,248,106,.10), transparent 55%), linear-gradient(180deg, #171c25, #12151d); border: 1px solid rgba(196,248,106,.22); box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04); }
.render-card-media { position: relative; border-radius: 11px; overflow: hidden; aspect-ratio: 16/10; background: #0b0d12; }
.render-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(1.1) brightness(.75); }
.render-card-glow { position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(196,248,106,.25), rgba(148,129,255,.3), rgba(255,153,102,.2), rgba(196,248,106,.25)); filter: blur(18px); animation: rc-spin 6s linear infinite; }
@keyframes rc-spin { to { transform: rotate(360deg); } }
.render-card-scan { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.16) 50%, transparent 70%); background-size: 250% 100%; animation: rc-scan 2.2s ease-in-out infinite; }
@keyframes rc-scan { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.render-card-badge { position: absolute; left: 6px; bottom: 6px; font: 700 9px "DM Mono", monospace; letter-spacing: .04em; color: var(--lime); background: rgba(8,9,13,.78); border: 1px solid rgba(196,248,106,.3); border-radius: 6px; padding: 3px 6px; }
.render-card-body { min-width: 0; display: grid; gap: 7px; align-content: center; }
.render-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font: 10px "DM Mono", monospace; color: var(--muted); }
.render-card-live { display: inline-flex; align-items: center; gap: 6px; color: var(--lime); letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.render-card-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); animation: dot-blink 1.2s ease infinite; }
.render-card-time { font-variant-numeric: tabular-nums; }
.render-card-title { font-size: 14px; line-height: 1.25; color: #f1f3f8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.render-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.07); overflow: hidden; }
.render-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #8fe0a0, var(--lime)); box-shadow: 0 0 12px rgba(196,248,106,.55); transition: width .5s linear; position: relative; }
.render-steps { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.render-steps li { flex: 1; font: 9px "DM Mono", monospace; color: #5d6373; padding-top: 6px; border-top: 2px solid rgba(255,255,255,.08); transition: color .3s, border-color .3s; }
.render-steps li.done { color: #a9b0bf; border-color: rgba(196,248,106,.5); }
.render-steps li.active { color: var(--lime); border-color: var(--lime); }
.render-card-meta { font: 10px "DM Mono", monospace; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* composer: one box, round send */
.composer { margin: 8px 12px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; background: #0b0e14; transition: border-color .18s, box-shadow .18s; }
.composer.is-focus { border-color: rgba(196,248,106,.45); box-shadow: 0 0 0 4px rgba(196,248,106,.08), 0 8px 26px rgba(0,0,0,.35); }
.composer .chat-input { margin: 0; width: 100%; box-sizing: border-box; border: 0; background: transparent; min-height: 48px; max-height: 160px; padding: 13px 14px 4px; font: 13px/1.5 Manrope, system-ui, sans-serif; }
.composer .chat-input:focus { border: 0; box-shadow: none; }
.composer .chat-footer-row { border-top: 0; padding: 4px 8px 8px; gap: 6px; }
.composer .chat-attach-btn, .composer .chat-mic-btn { width: 34px; height: 34px; border-radius: 10px; background: transparent; border-color: transparent; }
.composer .chat-attach-btn:hover, .composer .chat-mic-btn:hover { background: rgba(255,255,255,.07); color: var(--lime); }
.composer .chat-cost-pill { margin-left: auto; border-radius: 99px; padding: 4px 9px; color: #b8bfcd; }
.chat-send-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 16px; border: 0; border-radius: 99px; background: var(--lime); color: #10120b; font: 800 12px Manrope, sans-serif; cursor: pointer; box-shadow: 0 6px 18px rgba(196,248,106,.28); transition: transform .12s, box-shadow .18s, filter .18s; }
.chat-send-btn:hover { filter: brightness(1.05); box-shadow: 0 8px 24px rgba(196,248,106,.4); }
.chat-send-btn:active { transform: scale(.96); }
.chat-send-btn:disabled { opacity: .45; box-shadow: none; cursor: default; }

/* quick replies: one swipeable row with an edge fade */
.suggestions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 12px 4px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.suggestions::-webkit-scrollbar { display: none; }
.suggestion { flex: none; white-space: nowrap; padding: 8px 12px; font-size: 11px; border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.03); transition: border-color .15s, color .15s, background .15s; }
.suggestion:hover { border-color: rgba(196,248,106,.45); color: var(--lime); background: rgba(196,248,106,.06); }

@media (max-width: 720px) {
  .render-card { grid-template-columns: 96px minmax(0,1fr); gap: 10px; padding: 10px; }
  .chat-send-btn span { display: none; }
  .chat-send-btn { width: 40px; padding: 0; justify-content: center; }
  .composer { margin: 6px 10px 10px; }
}

/* ── Cast v1 (docs/CAST_V1.md) ─────────────────────────────────────────── */
.cast-list { display: grid; gap: 10px; }
.cast-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #12151d; display: grid; gap: 7px; }
.cast-card-head { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; }
.cast-card-head img, .cast-avatar { width: 44px; height: 56px; border-radius: 8px; object-fit: cover; background: linear-gradient(135deg, rgba(196,248,106,.25), rgba(148,129,255,.3)); display: grid; place-items: center; font-weight: 800; color: #10120b; }
.cast-card-head strong { font-size: 13px; margin-right: 6px; }
.cast-card-head small { display: block; color: var(--muted); font-size: 11px; line-height: 1.4; margin-top: 3px; }
.cast-tag { font: 700 9px "DM Mono", monospace; color: var(--lime); border: 1px solid rgba(196,248,106,.3); border-radius: 5px; padding: 1px 5px; }
.cast-lock-label { font: 700 9px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: #a9b0bf; }
.cast-lock-label em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--muted); font-weight: 400; margin-left: 4px; }
.cast-lock { width: 100%; box-sizing: border-box; background: #0b0e14; border: 1px solid var(--line); border-radius: 8px; color: #dfe3ec; font: 11.5px/1.5 Manrope, sans-serif; padding: 8px; resize: vertical; }
.cast-actions { display: flex; gap: 6px; }
.cast-remove { margin-left: auto; color: var(--orange); }
.cast-add { display: grid; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.cast-add input, .cast-add textarea { background: #0b0e14; border: 1px solid var(--line); border-radius: 8px; color: var(--text); padding: 8px; font: 12px Manrope, sans-serif; }
.cast-add small { color: var(--muted); font-size: 10.5px; }
.attach-tag { width: 100%; box-sizing: border-box; background: #0b0e14; border: 1px solid var(--line); border-radius: 6px; color: var(--text); font-size: 10px; padding: 4px 6px; }
.clip-memory .mini-btn { margin-left: auto; }

/* ── Accounts (server/auth.js) ─────────────────────────────────────────── */
.auth-gate { min-height: 100dvh; display: grid; place-items: center; padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom)); background: radial-gradient(60rem 30rem at 80% -10%, rgba(148,129,255,.16), transparent), radial-gradient(40rem 24rem at 0% 100%, rgba(196,248,106,.08), transparent), var(--bg); }
.auth-card { width: min(400px, 100%); display: grid; gap: 12px; padding: 28px 24px; border-radius: 22px; border: 1px solid rgba(255,255,255,.09); background: linear-gradient(180deg, rgba(23,27,37,.92), rgba(14,16,22,.94)); box-shadow: 0 30px 80px rgba(0,0,0,.45); animation: bubble-in .45s cubic-bezier(.2,.8,.2,1) both; }
.auth-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card h1 { margin: 0; font-size: 26px; letter-spacing: -.03em; }
.auth-sub { margin: -4px 0 4px; color: var(--muted); font-size: 13px; }
.auth-card label { display: grid; gap: 6px; font: 700 10px "DM Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: #a9b0bf; }
.auth-card input { height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(255,255,255,.1); background: #0b0e14; color: var(--text); font: 15px Manrope, system-ui, sans-serif; outline: none; transition: border-color .15s, box-shadow .15s; }
.auth-card input:focus { border-color: rgba(196,248,106,.5); box-shadow: 0 0 0 4px rgba(196,248,106,.08); }
.auth-submit { height: 48px; border-radius: 12px; font-size: 15px; margin-top: 4px; }
.auth-switch { background: none; border: 0; color: var(--lime); font: 600 13px Manrope, sans-serif; padding: 6px; cursor: pointer; }
.auth-error { min-height: 1em; margin: 0; color: var(--orange); font-size: 13px; }
.auth-note { text-align: center; color: var(--muted); font-size: 11px; }
.account-session { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); font-size: 12px; color: #c9cfdb; }
.account-session span { display: inline-flex; align-items: center; gap: 7px; }
.account-session i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.account-logout { padding: 8px 14px; font-size: 12px; color: var(--orange); border-color: rgba(255,153,102,.3); }
.auth-card [hidden], .auth-gate[hidden] { display: none !important; }

/* ── Mobile pass (Dec 6): installed-app safe areas, no iOS input zoom, studio fits one screen ── */
@media (max-width: 720px) {
  /* iPhone notch / home bar (the installed app draws under a translucent status bar) */
  .topbar { padding-top: env(safe-area-inset-top); height: calc(60px + env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .mobile-nav { height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav a { min-width: 64px; min-height: 48px; }
  .page-wrap { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

  /* iOS zooms into any field under 16px; keep every input at 16px */
  input, textarea, select, .chat-input, .composer .chat-input, .auth-card input, .cast-lock, .cast-add input, .cast-add textarea, .attach-tag { font-size: 16px !important; }

  /* Studio: the chat fills the screen between the top bar and the nav, composer always in reach */
  .studio--basic .chat-panel, .chat-panel { height: calc(100dvh - 60px - 64px - 74px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 440px; border-radius: 16px; margin-bottom: 8px; }
  .chat-panel .panel-head { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .chat-panel .clip-head-actions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; width: 100%; gap: 6px; }
  .chat-panel .clip-head-actions::-webkit-scrollbar { display: none; }
  .chat-panel .clip-head-actions .mini-btn { flex: none; min-height: 34px; padding: 6px 11px; font-size: 11px; border-radius: 99px; }
  .chat-panel .clip-head-actions .agent-dot { display: none; }
  .clip-show-name { display: none; }
  .chat-log { padding: 12px; gap: 10px; }
  .bubble { font-size: 13.5px; max-width: 94%; }
  .suggestion { min-height: 38px; font-size: 12.5px; padding: 8px 13px; }
  .composer { margin: 6px 8px 8px; }
  .chat-send-btn { width: 44px; height: 44px; }
  .composer .chat-attach-btn, .composer .chat-mic-btn { width: 40px; height: 40px; }
  .show-switcher { padding-bottom: 6px; }
  .show-chip { min-height: 36px; font-size: 11.5px; }
  .gen-card-actions button { min-height: 48px; font-size: 14px; }
  .gen-card-quality button { min-height: 52px; }
  .mini-btn { min-height: 34px; }
  .render-card-title { font-size: 13px; }
}
/* Installed app: no rubber-band page bounce, no tap flash */
@media (display-mode: standalone) {
  html, body { overscroll-behavior-y: none; }
  * { -webkit-tap-highlight-color: transparent; }
}
