/* Component styles. Every color, font and radius comes from css/theme.css. */

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-weight: 600; }
h1 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 40px; letter-spacing: -0.01em; }
h2 { font-size: 19px; letter-spacing: -0.01em; }
h3 { font-size: 16px; }
.serif { font-family: var(--font-display); font-weight: var(--display-weight); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
svg.ic { width: 18px; height: 18px; flex-shrink: 0; }

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 32px;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar .logo svg { height: 26px; width: auto; display: block; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 7px 12px; border-radius: 8px; font-weight: 500; color: var(--muted); font-size: 14px; }
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); background: var(--surface-2); }
.topbar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 12px; border-radius: 10px; min-width: 240px;
}
.search input[type=text] { border: none; outline: none; background: none; width: 100%; color: var(--text); padding: 0; }
.mode-switch { display: flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.mode-switch button { border: none; background: none; padding: 5px 12px; border-radius: 7px; font-weight: 500; cursor: pointer; color: var(--muted); font-size: 14px; }
.mode-switch button.on { background: var(--surface-3); color: var(--text); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); color: var(--text);
  display: grid; place-items: center; font-weight: 600; font-size: 13px; cursor: pointer; border: 1px solid var(--border);
}

.tabbar { display: none; }
main { max-width: 1280px; margin: 0 auto; padding: 24px 32px 90px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface-2); font-weight: 600; cursor: pointer; font-size: 14px;
  transition: transform .08s ease, background .15s ease, opacity .15s ease;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { opacity: .9; }
.btn.light { background: var(--on-image-btn); border-color: var(--on-image-btn-border); color: var(--on-image); backdrop-filter: blur(6px); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2);
  display: inline-grid; place-items: center; cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: var(--surface-3); }
.icon-btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: transparent; font-weight: 500; cursor: pointer; font-size: 13.5px; color: var(--muted);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius-lg); padding: 48px; min-height: 440px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 12px;
  color: var(--on-image); margin: 20px 0 40px;
}
.hero > .poster { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--hero-scrim); }
.hero .label { font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.hero h1 { font-size: 72px; line-height: 1; max-width: 70%; }
.hero p { max-width: 520px; margin: 0; color: var(--on-image-muted); font-size: 16px; }
.hero .meta-line { display: flex; gap: 14px; font-size: 13px; color: var(--on-image-muted); }
.hero .actions { display: flex; gap: 10px; margin-top: 10px; }
.hero.compact { min-height: 240px; padding: 36px; }
.hero.compact h1 { font-size: 52px; }

/* Rows and cards */
.row { margin-bottom: 40px; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.row-head .sub { color: var(--muted); font-size: 13px; }
.row-head a { color: var(--muted); font-weight: 500; font-size: 13px; }
.row-head a:hover { color: var(--text); }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 280px; gap: 14px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }

.card { cursor: pointer; }
.thumb { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.thumb .poster { width: 100%; height: 100%; display: block; transition: transform .35s ease; }
.card:hover .thumb .poster { transform: scale(1.04); }
.thumb::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--image-ring); }
.thumb .badge {
  position: absolute; top: 10px; left: 10px; background: var(--accent); color: var(--accent-ink);
  font-size: 10.5px; font-weight: 700; padding: 3px 7px; border-radius: 5px; text-transform: uppercase; letter-spacing: .06em;
}
.thumb .progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--progress-track); }
.thumb .progress span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.card .meta { padding: 9px 2px 0; }
.card .title { font-weight: 600; font-size: 14.5px; }
.card .sub { font-size: 13px; color: var(--muted); }

.top10 { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.top10 .item { display: flex; align-items: center; gap: 14px; padding: 8px 12px 8px 4px; border-radius: var(--radius); cursor: pointer; }
.top10 .item:hover { background: var(--surface); }
.top10 .rank { font-family: var(--font-display); font-size: 56px; line-height: 1; width: 48px; text-align: center; color: transparent; -webkit-text-stroke: 1.2px var(--rank-stroke); }
.top10 .mini { width: 96px; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.top10 .mini .poster { width: 100%; height: 100%; display: block; }

/* Series page */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.series-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; margin: 14px 0 32px; }
.series-art { border-radius: 16px; aspect-ratio: 16/10; overflow: hidden; }
.series-art .poster { width: 100%; height: 100%; display: block; }
.genre-tag { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.series-info h1 { font-size: 56px; margin: 8px 0 10px; }
.creator-line { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.series-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.stats { display: flex; gap: 16px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }
.stats b { color: var(--text); font-weight: 600; }
.ai-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); border: 1px solid var(--border); padding: 3px 9px; border-radius: 6px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabs button { border: none; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-color: var(--accent); }

.ep-list { display: flex; flex-direction: column; gap: 6px; }
.ep { display: grid; grid-template-columns: 36px 170px 1fr auto; gap: 18px; align-items: center; padding: 10px; border-radius: var(--radius); cursor: pointer; }
.ep:hover { background: var(--surface); }
.ep .num { font-family: var(--font-display); font-size: 26px; color: var(--muted); text-align: center; }
.ep .ep-thumb { aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; }
.ep .ep-thumb .poster { width: 100%; height: 100%; display: block; }
.ep .tag { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 6px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.ep .tag svg.ic { width: 13px; height: 13px; }
.tag.free { background: var(--success-soft); color: var(--success); }
.tag.locked { background: var(--surface-2); color: var(--muted); }
.tag.early { background: var(--accent-soft); color: var(--accent); }

.comment { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.tier-pill { font-size: 11px; font-weight: 600; background: var(--accent-soft); color: var(--accent); padding: 2px 7px; border-radius: 5px; margin-left: 6px; }

/* Panels and forms */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.panel + .panel { margin-top: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.field .hint a, a.link { color: var(--accent); }
input[type=text], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.radio-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--bg); }
.radio-card:hover { border-color: var(--border-strong); }
.radio-card.on { border-color: var(--accent); background: var(--accent-soft); }
.radio-card b { display: block; font-weight: 600; }
.radio-card span { font-size: 13px; color: var(--muted); }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-child { border-bottom: none; }
.switch { position: relative; display: inline-block; width: 40px; height: 23px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--switch-off); border-radius: var(--radius-pill); cursor: pointer; transition: .2s; }
.switch span::after { content: ''; position: absolute; width: 17px; height: 17px; left: 3px; top: 3px; background: var(--switch-knob); border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(17px); }

details.more { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 6px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 8px; }
details.more summary:hover { color: var(--text); }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::before { content: '+'; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--border); font-size: 13px; }
details.more[open] summary::before { content: '–'; }
details.more .stack { margin-top: 14px; }

/* Creator studio */
.creator-layout { display: grid; grid-template-columns: 210px 1fr; gap: 32px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 86px; align-self: start; }
.side-nav a { padding: 9px 12px; border-radius: 9px; font-weight: 500; color: var(--muted); display: flex; align-items: center; gap: 10px; font-size: 14px; }
.side-nav a:hover { color: var(--text); }
.side-nav a.active { background: var(--surface-2); color: var(--text); }
.side-nav .studio { font-family: var(--font-display); font-size: 22px; padding: 0 12px 12px; color: var(--text); }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.metric .label { color: var(--muted); font-size: 13px; }
.metric .value { font-family: var(--font-display); font-size: 40px; line-height: 1.1; }
.metric .delta { font-size: 13px; color: var(--success); font-weight: 500; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .06em; }
.table td { padding: 12px 10px; border-bottom: 1px solid var(--border); }
.table .mini { width: 64px; aspect-ratio: 16/10; border-radius: 6px; overflow: hidden; display: inline-block; vertical-align: middle; }
.table .mini .poster { width: 100%; height: 100%; display: block; }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 150px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars span.bar { width: 100%; max-width: 44px; background: var(--accent); border-radius: 6px 6px 2px 2px; }
.bars small { color: var(--muted); font-size: 12px; }

.steps { display: flex; gap: 8px; margin: 16px 0 22px; }
.steps div { flex: 1; text-align: center; padding: 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; color: var(--muted); font-size: 13.5px; }
.steps div.done { color: var(--success); }
.steps div.now { border-color: var(--accent); color: var(--text); }
.dropzone { border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 48px; text-align: center; background: var(--bg); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dropzone:hover { border-color: var(--accent); }
.dropzone .big-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.upload-bar { height: 6px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; margin-top: 10px; width: 100%; max-width: 360px; }
.upload-bar span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.estimate { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.estimate b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 28px; }
.split-row { display: grid; grid-template-columns: 1fr 1fr 110px 40px; gap: 10px; align-items: center; }

/* Overlays */
.overlay { position: fixed; inset: 0; background: var(--overlay); backdrop-filter: blur(4px); z-index: 50; display: grid; place-items: center; padding: 20px; }
.sheet { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 26px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.sheet-head h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 28px; }
.close { border: 1px solid var(--border); background: var(--surface-2); width: 34px; height: 34px; border-radius: 9px; cursor: pointer; display: grid; place-items: center; color: var(--text); flex-shrink: 0; }
.close[disabled] { opacity: .3; cursor: not-allowed; }
.center { text-align: center; }
.success { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 6px 0; }
.success .check { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.sub-poster { width: 100%; aspect-ratio: 16/7; border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.sub-poster .poster { width: 100%; height: 100%; display: block; }
.billing-toggle { display: inline-flex; background: var(--bg); border: 1px solid var(--border); padding: 3px; border-radius: 10px; margin: 4px 0 14px; }
.billing-toggle button { border: none; background: none; padding: 6px 12px; border-radius: 7px; font-weight: 500; cursor: pointer; color: var(--muted); font-size: 13.5px; }
.billing-toggle button.on { background: var(--surface-3); color: var(--text); }
.pay-btn { background: var(--pay-bg); color: var(--pay-ink); border-color: var(--pay-bg); }
.pay-btn:hover { opacity: .88; }

.player { width: min(1040px, 100%); background: var(--player-bg); border-radius: var(--radius-lg); overflow: hidden; color: var(--on-image); border: 1px solid var(--border); }
.screen { aspect-ratio: 16/9; position: relative; overflow: hidden; }
.screen .poster { position: absolute; inset: 0; width: 100%; height: 100%; animation: drift 24s ease-in-out infinite alternate; }
.screen.paused .poster { animation-play-state: paused; }
@keyframes drift { from { transform: scale(1.05) translateX(-1.5%); } to { transform: scale(1.12) translateX(1.5%); } }
.screen .state { position: absolute; inset: 0; display: grid; place-items: center; }
.screen .state span { width: 72px; height: 72px; border-radius: 50%; background: var(--scrim-soft); display: grid; place-items: center; backdrop-filter: blur(4px); }
.screen .caption { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; font-weight: 500; font-size: 18px; }
.screen .caption span { background: var(--caption-bg); padding: 4px 10px; border-radius: 4px; }
.controls { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; background: var(--player-controls); }
.scrub { height: 4px; background: var(--progress-track); border-radius: var(--radius-pill); cursor: pointer; }
.scrub span { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); }
.ctrl-row { display: flex; align-items: center; gap: 8px; }
.ctrl-row .spacer { flex: 1; }
.pbtn { background: var(--player-btn); border: none; color: var(--on-image); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.pbtn:hover { background: var(--player-btn-hover); }
.pbtn.on { background: var(--accent); color: var(--accent-ink); }
.settings-pop { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.settings-pop label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); padding: 10px 18px; border-radius: 12px; font-weight: 500; z-index: 60;
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow);
}
.empty { text-align: center; padding: 50px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }

.reorder { display: flex; flex-direction: column; gap: 8px; }
.reorder .r { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.reorder .r .name { flex: 1; font-weight: 500; }

/* Prototype-only brand color switcher */
.palette {
  position: fixed; left: 16px; bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; font-size: 12px; color: var(--muted);
}
.palette .swatch { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.palette .swatch.on { border-color: var(--text); }
.palette .skin { border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: var(--radius-sm); padding: 3px 8px; cursor: pointer; font-size: 12px; }
.palette .skin.on { background: var(--surface-3); color: var(--text); }
.palette span:not(:first-child) { margin-left: 6px; }
.proto-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 40px; }

/* Mobile */
@media (max-width: 760px) {
  .topbar { padding: 12px 16px; gap: 10px; }
  .topbar .nav, .topbar .search { display: none; }
  .topbar .logo svg { height: 22px; }
  main { padding: 16px 16px 100px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--header-bg); backdrop-filter: blur(12px); border-top: 1px solid var(--border); padding: 8px 0 16px;
  }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); }
  .tabbar a.active { color: var(--text); }
  .hero { padding: 24px; min-height: 380px; }
  .hero h1 { font-size: 46px; max-width: 100%; }
  .hero.compact h1 { font-size: 38px; }
  .scroller { grid-auto-columns: 220px; }
  .series-hero { grid-template-columns: 1fr; gap: 20px; }
  .series-info h1 { font-size: 40px; }
  .ep { grid-template-columns: 26px 110px 1fr; gap: 12px; }
  .ep .ep-end { grid-column: 3; justify-self: start; }
  .creator-layout { grid-template-columns: 1fr; }
  .side-nav { flex-direction: row; overflow-x: auto; position: static; }
  .side-nav .studio { display: none; }
  .side-nav a { white-space: nowrap; }
  .metrics { grid-template-columns: 1fr; }
  .split-row { grid-template-columns: 1fr 1fr; }
  .palette { bottom: 84px; }
}

/* Filter bar on Home: genre, My list and Filters narrow the catalog in place */
.filter-bar { margin: 4px 0 8px; }
.chip-sep { width: 1px; align-self: stretch; background: var(--border); margin: 2px 2px; }
.chip.on-outline { border-color: var(--accent); color: var(--text); }
.filter-panel { margin-top: 12px; }
.results-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 22px 0 18px; }
.results-head .btn { margin-left: auto; align-self: center; }
@media (max-width: 760px) {
  .filter-bar > .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .filter-bar > .chips .chip { white-space: nowrap; flex-shrink: 0; }
}
@media (max-width: 760px) {
  .hero .actions { flex-wrap: wrap; }
  .hero .btn { white-space: nowrap; padding: 9px 14px; }
  .hero .meta-line { flex-wrap: wrap; gap: 2px 12px; }
}

/* Languages and audio tracks */
.thumb .lang-badge {
  position: absolute; top: 10px; right: 10px; background: var(--scrim-soft); color: var(--on-image);
  font-size: 10.5px; font-weight: 600; padding: 3px 7px; border-radius: 5px; letter-spacing: .04em; backdrop-filter: blur(4px);
}
.tracks, .track-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.track { font-size: 12px; font-weight: 500; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--border); color: var(--muted); background: var(--surface); }
.track.original { color: var(--text); border-color: var(--border-strong); }
.track.lipsync { color: var(--success); border-color: var(--success); background: var(--success-soft); }
.track.voice { color: var(--muted); border-style: dashed; }
.track.subs { background: transparent; }

/* SICOMI acronym under the logo */
.topbar .logo { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.logo-acro { font-size: 10.5px; line-height: 1; color: var(--muted); white-space: nowrap; letter-spacing: .01em; }
.logo-acro b { color: var(--accent); font-weight: 700; }
@media (max-width: 760px) { .logo-acro { font-size: 8.5px; white-space: normal; max-width: 140px; line-height: 1.25; } .topbar .mode-switch { flex-shrink: 0; } }

/* Watch progress */
.ep-progress { height: 3px; border-radius: 2px; background: var(--surface-3); margin-top: 6px; max-width: 220px; overflow: hidden; }
.ep-progress span { display: block; height: 100%; background: var(--accent); }
.time-row { display: flex; justify-content: space-between; font-size: 12px; opacity: .7; margin-top: -6px; font-variant-numeric: tabular-nums; }

/* Sharing */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.share-layer { z-index: 55; }
.share-sheet { width: min(480px, 100%); }
.share-sheet .close { width: 44px; height: 44px; }
.share-preview { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
.share-preview .art { width: 112px; aspect-ratio: 1200/630; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; font-size: 11px; }
.share-preview .art .poster { width: 100%; height: 100%; display: block; }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; font-size: 13px; }
.share-link .btn { min-height: 44px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.share-note { margin-top: 12px; }
.start-at { display: flex; align-items: center; gap: 10px; margin-top: 12px; min-height: 44px; font-weight: 500; }
.share-sheet a:focus-visible, .share-sheet button:focus-visible, .share-sheet input:focus-visible,
[data-action="share"]:focus-visible, [data-action="share-creator"]:focus-visible, [data-p="share"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.icon-btn[data-action="share"] { width: 44px; height: 44px; }
.series-actions .icon-btn { min-width: 44px; }
.pbtn[data-p="share"], [data-action="share-creator"] { min-height: 44px; }
.ep-end { display: flex; align-items: center; gap: 8px; }
.ep.highlight { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.arrival-strip { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 10px 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--accent-soft); }
.arrival-strip .close { margin-left: auto; width: 44px; height: 44px; }
.rating-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; }
.brand-card { width: 100%; height: 100%; background: var(--bg); color: var(--text); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; padding: 8% 10%; border: 1px solid var(--border); }
.brand-card .bc-name { font-size: .8em; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.brand-card b { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 1.6em; line-height: 1.1; }
.series-art .brand-card { font-size: 18px; }
.age-check { margin-top: 18px; }
.age-check h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 28px; margin-bottom: 6px; }
.link-btn { background: none; border: none; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; min-height: 24px; }
.report-line { margin-top: 32px; text-align: center; font-size: 12px; color: var(--muted); }
.unavailable h1 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 34px; max-width: 560px; }
.link-preview { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; max-width: 360px; background: var(--surface-2); margin: 10px 0; }
.link-preview .art { aspect-ratio: 1200/630; font-size: 14px; }
.link-preview .art .poster { width: 100%; height: 100%; display: block; }
.link-preview .lp-meta { padding: 10px 12px; }
.kit-caption textarea { min-height: 96px; margin-bottom: 8px; }
.kit-tips { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) { .share-link { flex-direction: column; } }
@media (prefers-reduced-motion: reduce) {
  .share-layer, .share-layer *, .ep.highlight, .btn { transition: none; animation: none; }
}

/* ---------- Creator application and review queue ---------- */
.apply h1 { margin-bottom: 6px; }
.apply .step-title { font-size: 20px; margin-bottom: 14px; }
.apply .step-title:focus { outline: none; }
.apply :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.apply .btn, .apply select, .apply input[type=text], .apply input[type=url], .apply input[type=email] { min-height: 36px; }
input[type=url], input[type=email] { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.ap-steps { flex-wrap: wrap; }
.ap-steps div { min-width: 92px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ap-nav { justify-content: space-between; margin-top: 20px; }
.err { color: var(--danger); font-size: 13px; font-weight: 500; margin-top: 6px; }
[aria-invalid="true"] { border-color: var(--danger); }
.error-summary { border: 2px solid var(--danger); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px; background: var(--surface); }
.error-summary h2 { font-size: 17px; margin-bottom: 6px; }
.error-summary ul, .still-needed ul { margin: 0; padding-left: 18px; }
.still-needed { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 12px 16px; }
.link-btn { background: none; border: 0; padding: 4px 0; min-height: 24px; color: var(--accent); text-decoration: underline; cursor: pointer; text-align: left; }
.check-row { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }
.check-row label { display: flex; flex-direction: column; gap: 3px; font-weight: 400; }
.check-row .err { grid-column: 2; }
.link-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.link-row .field { flex: 1 1 260px; }
.ev-row { display: grid; grid-template-columns: 1fr 1.4fr 80px 1.4fr auto; gap: 10px; align-items: end; }
.pchip, .vchip, .status-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: var(--radius-pill); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); vertical-align: middle; }
.vchip.v-ok { background: var(--success-soft); color: var(--success); border-color: transparent; }
.vchip.v-person, .vchip.v-checking { background: var(--accent-soft); color: var(--text); border-color: var(--accent); }
.vchip.v-no { color: var(--muted); border-style: dashed; }
.vchip.v-fail { color: var(--danger); border-color: var(--danger); }
.status-tag { margin-bottom: 10px; }
.vr-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vr-url { font-size: 13.5px; color: var(--muted); word-break: break-all; }
.code-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 20px; letter-spacing: .08em; user-select: all; }
.demo-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; }
.demo-bar select { width: auto; min-width: 200px; }
.review-sec { border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.review-sec p { margin: 6px 0 0; }
.notice { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; font-size: 14px; }
.notice h3 { margin-bottom: 8px; }
.notice p { margin: 0 0 8px; }
.scorecard h3 { margin: 0; }
.scorecard h4 { margin: 16px 0 6px; }
.sc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.sc-table th { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--text); font-weight: 500; }
.reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.reason { display: grid; grid-template-columns: 150px 1fr; gap: 10px; font-size: 14px; align-items: baseline; }
.reason .mark { font-size: 12px; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.reason.r-met .mark { color: var(--success); }
.reason.r-unmet .mark { color: var(--danger); }
.reason.r-note .mark, .reason.r-info .mark { color: var(--muted); }
.reason.r-review .mark { color: var(--accent); }
.status-head { display: flex; gap: 16px; align-items: center; }
.status-page > .panel, .status-page > .row-actions, .status-page > button { margin-top: 16px; }
.progress-line { margin-top: 8px; }
.get-in ul { margin: 8px 0; padding-left: 18px; }
.email { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.email-head { background: var(--surface-2); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.email-body { padding: 12px 14px; font-size: 14px; }
.email-body p { margin: 0 0 8px; }
.email-body ul { margin: 0 0 8px; padding-left: 18px; }
.rv summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 32px; }
.rv[open] summary { margin-bottom: 14px; }
.decide { border: 1px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.decide h4 { margin: 0; }
.decide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.decide .btn.primary { align-self: flex-start; }
ul.plain { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 6px; }
button.radio-card { text-align: left; font: inherit; color: var(--text); }
.emails summary { cursor: pointer; font-weight: 600; }
@media (max-width: 760px) {
  .ev-row { grid-template-columns: 1fr; }
  .reason { grid-template-columns: 1fr; gap: 2px; }
  .ap-steps div { min-width: 0; flex: 1 1 30%; }
}
.apply input, .apply select, .apply textarea, .apply .error-summary, .apply .step-title, .apply button { scroll-margin-top: 96px; scroll-margin-bottom: 80px; }

/* Signed in vs signed out, creator stages, Kids and the Demo switcher (js/access.js) */
.signin-sheet .stack { margin-top: 6px; }
.signin-title { display: flex; align-items: center; gap: 12px; margin: 4px 0 14px; }
.signin-title .mini { width: 72px; flex: none; border-radius: var(--radius-sm); overflow: hidden; }
.signin-title .mini .brand-card { min-height: 44px; padding: 6px; font-size: 11px; }
.signin-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.signin-foot details { flex: 1; min-width: 200px; }
.dob { border: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 10px; }
.dob legend { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; padding: 0; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check-line input { margin-top: 3px; }
.terms-line { margin-top: 4px; }
.form-error { color: var(--danger); font-size: 13.5px; }
.sheet-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.sheet-actions.even .btn { flex: 1; }
.device-notice {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 60; width: min(720px, calc(100% - 32px));
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; font-size: 13.5px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius);
}
.device-notice span { flex: 1 1 260px; }
.device-foot { text-align: center; margin-top: 28px; }
.device-foot .legal-links { margin-top: 8px; line-height: 2; }
.device-foot .legal-links a { color: var(--accent); text-decoration: underline; padding: 6px 0; }
/* Demo notice (Legal SPLIT-M1, Design section 5): in the page markup, stuck to the top of every screen, above the
   header and any open sheet or player, never dismissible. --demo-h is its height (set in app.js) so the header,
   sheets and the player start below it instead of under it. Short form under 480 px; "What's this?" expands inline. */
:root { --demo-h: 0px; }
.demo-banner { position: sticky; top: 0; z-index: 70; background: var(--surface-2); color: var(--text); border-bottom: 1px solid var(--border-strong); border-left: 4px solid var(--accent); padding: 2px 16px; font-size: 13px; line-height: 1.45; }
.demo-banner p { margin: 0; }
.demo-banner .demo-apply, .demo-banner .demo-more { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 6px; color: var(--text); text-decoration: underline; font-weight: 600; background: none; border: 0; cursor: pointer; font-size: inherit; vertical-align: middle; gap: 4px; }
.demo-banner .demo-short, .demo-banner .demo-more, .demo-banner .demo-short-label { display: none; }
@media (max-width: 479px) {
  .demo-banner { padding: 2px 10px; }
  .demo-banner .demo-full, .demo-banner .demo-long-label { display: none; }
  .demo-banner .demo-short, .demo-banner .demo-short-label { display: inline; }
  .demo-banner .demo-more { display: inline-flex; }
  .demo-banner.open .demo-full { display: block; padding: 4px 0; }
  .demo-banner.open .demo-short { display: none; }
}
.topbar { top: var(--demo-h); }
.overlay { top: var(--demo-h); }
.side-nav { top: calc(86px + var(--demo-h)); }
.char-preview { top: calc(80px + var(--demo-h)); }
.demo-foot { display: block; margin-bottom: 6px; color: var(--text); }
.sample-line { margin: -4px 0 16px; }
.resume-note { margin-top: 8px; }
.end-card { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--scrim-soft); text-align: center; }
.creators-hero h1 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 44px; line-height: 1.05; margin: 6px 0 10px; }
.creators-hero .eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.creators-points { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.creators-points li { display: flex; gap: 8px; align-items: center; }
.creators-points .ic { color: var(--accent); flex: none; }
.checklist { display: grid; gap: 4px; }
.check-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 14px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.check-row:last-child { border-bottom: none; }
.check-status { font-size: 13px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.check-row.done .check-status { color: var(--success); }
.check-row.next .check-status { color: var(--accent); }
.lock-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.lock-row .btn[disabled] { opacity: .6; white-space: nowrap; }
.caps-meter { margin-top: 8px; }
.draft-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--border); }
.draft-row:last-child { border-bottom: none; }
.draft-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.status-chip { display: inline-flex; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); margin-left: 6px; }
.status-chip.pending { background: var(--accent-soft); color: var(--accent); }
.status-chip.changes { color: var(--danger); }
.status-chip.live { background: var(--success-soft); color: var(--success); }
.demo-tag { font-size: 11px; font-weight: 600; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 1px 6px; }
.live-card h2 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 32px; margin-bottom: 6px; }
.arrival-strip.warn { border-color: var(--danger); }
.kids-chip { font-weight: 600; font-size: 14px; }
body.kids [data-action="subscribe"], body.kids [data-action="rent"], body.kids [data-action="tip"], body.kids [data-action="share"],
body.kids [data-action="share-creator"], body.kids [data-p="share"], body.kids [data-tab="community"], body.kids [data-action="manage-sub"],
body.kids [data-action="thumb"], body.kids [data-p="thumb"] { display: none !important; }
.demo { position: fixed; right: 16px; bottom: 16px; z-index: 45; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.demo-pill { border: 1px dashed var(--border-strong); background: var(--surface); color: var(--text); border-radius: var(--radius-pill); padding: 6px 12px; font: inherit; font-size: 12px; cursor: pointer; order: 2; }
.demo-panel { order: 1; width: min(340px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 14px; display: grid; gap: 12px; }
.demo-row { display: grid; gap: 6px; }
.demo-label { font-size: 12px; font-weight: 600; }
.demo-row .chip[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 760px) {
  .demo, .device-notice { bottom: 84px; }
  .check-row { grid-template-columns: 1fr; gap: 6px; }
  .lock-row { grid-template-columns: 1fr; }
  .creators-hero h1 { font-size: 34px; }
}

/* Paid promotion (planned). Same quiet shape as the "Made with AI" tag: neutral, never gold, never a link. */
.promo-label { display: inline-flex; align-items: center; font-size: 12px; color: var(--promo-ink); background: var(--promo-bg); border: 1px solid var(--promo-border); padding: 2px 8px; border-radius: var(--radius-sm); white-space: normal; cursor: help; }
.tag.promo { background: var(--promo-bg); color: var(--promo-ink); border: 1px solid var(--promo-border); }
.ep .ep-end { flex-wrap: wrap; justify-content: flex-end; }
.promo-flag { position: absolute; top: 14px; left: 14px; font-size: 12px; font-weight: 500; color: var(--promo-flag-ink); background: var(--promo-flag-bg); padding: 4px 10px; border-radius: var(--radius-sm); pointer-events: none; }
.player-info { color: var(--on-image-muted); }
.promo-fields { border-left: 2px solid var(--border); padding-left: 14px; margin-left: 6px; }
.promo-win { grid-template-columns: 1fr 1fr 40px; }
.field .hint.warn { color: var(--danger); }
.route-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin: 16px 0; }
.route-cards .panel { margin: 0; }
.promo-held { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.promo-held:last-child { border-bottom: none; padding-bottom: 0; }
.table-wrap { overflow-x: auto; }
.empty-note { padding: 8px 0; }
.side-nav .tag.early { font-size: 10.5px; padding: 1px 6px; border-radius: 5px; margin-left: 4px; }
h1 .tag.early { font-family: var(--font-ui); font-size: 13px; font-weight: 600; padding: 3px 8px; border-radius: 6px; vertical-align: middle; }

/* Sicomi-sold ads (planned; company/ads-policy). Plain and high-contrast on purpose: never the poster, title-card,
   accent or recommendation look (Legal D1, D3), and never mixed with the "Includes paid promotion" label (D2). */
.ad-slate { position: absolute; inset: 0; display: grid; place-items: center; background: var(--player-bg); text-align: center; padding: 24px; }
.ad-slate > div { display: grid; gap: 6px; }
.ad-slate b { font-size: 22px; font-weight: 600; }
.ad-slate .small { color: var(--on-image-muted); }
.ad-chip { position: absolute; top: 14px; left: 14px; font-size: 13px; font-weight: 600; color: var(--on-image); background: var(--caption-bg); padding: 5px 10px; border-radius: var(--radius-sm); font-variant-numeric: tabular-nums; pointer-events: none; }
.ad-more { position: absolute; top: 10px; right: 10px; min-width: 44px; min-height: 44px; display: grid; place-items: center; background: var(--caption-bg); color: var(--on-image); border: none; border-radius: var(--radius-sm); cursor: pointer; }
.ad-menu { position: absolute; top: 58px; right: 10px; display: grid; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; z-index: 2; }
.ad-menu button { background: none; border: none; color: var(--text); padding: 12px 16px; text-align: left; font: inherit; cursor: pointer; min-height: 44px; }
.ad-menu button:hover { background: var(--surface-2); }
.ad-sheet { position: absolute; top: 58px; right: 10px; width: min(360px, calc(100% - 20px)); max-height: calc(100% - 68px); overflow: auto; display: grid; gap: 10px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; z-index: 2; text-align: left; }
.ad-sheet textarea { width: 100%; min-height: 60px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; font: inherit; }
.ad-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.ad-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-visit { position: absolute; bottom: 14px; left: 14px; background: var(--caption-bg); color: var(--on-image); border: none; border-radius: var(--radius-sm); padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer; min-height: 44px; }
.ad-cue { position: absolute; bottom: 14px; right: 14px; font-size: 13px; font-weight: 600; color: var(--on-image); background: var(--caption-bg); padding: 5px 10px; border-radius: var(--radius-sm); pointer-events: none; }
.ad-upsell { display: grid; gap: 6px; max-width: 360px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; text-align: left; }
.ad-upsell p { margin: 0; }
.scrub.is-locked { opacity: 0.4; cursor: not-allowed; }
.radio-card.is-disabled { opacity: 0.55; cursor: not-allowed; }
.ad-rules { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.ad-section { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.ad-section summary { cursor: pointer; font-weight: 600; }
.ad-section h4 { margin: 12px 0 6px; }
.ad-timeline { position: relative; height: 44px; margin: 12px 0 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: crosshair; overflow: hidden; }
.ad-timeline > span { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.ad-band.edge { background: var(--border); }
.ad-band.sponsor { background: var(--promo-border); }
.ad-band.flagged { background: var(--danger); opacity: 0.45; }
.ad-shot { width: 1px; background: var(--muted); opacity: 0.6; }
.ad-marker { width: 4px; margin-left: -2px; background: var(--accent); }
.ad-marker.suggested { background: none; border-left: 2px dashed var(--accent); border-right: 2px dashed var(--accent); }
.ad-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.ad-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ad-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--border); }
.ad-key.shot { width: 2px; background: var(--muted); border: none; }
.ad-key.sponsor { background: var(--promo-border); }
.ad-key.flagged { background: var(--danger); opacity: 0.45; }
.ad-key.edge { background: var(--border); }
.ad-key.marker { width: 4px; background: var(--accent); border: none; }
.ad-add { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.ad-add input { width: 96px; }
.ad-reject { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--danger); font-size: 13.5px; margin-bottom: 10px; }
.ad-statement { border-bottom: 1px solid var(--border); padding: 10px 0; }
.ad-statement summary { cursor: pointer; }

/* Film rentals and price suggestions (planned; js/rentals.js) */
.rental-chip { position: absolute; top: 12px; right: 12px; background: var(--scrim-soft); color: var(--on-image); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-pill); }
input.suggest-filled { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--accent-soft); }

/* ---------- Rankings (planned; js/ranking.js, js/ranking-ui.js) ---------- */
ol.top10 { list-style: none; margin: 0; padding: 0; }
.top10 .item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rank-head .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 2px; }
.rank-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; background: none; border: 0; color: var(--accent); font: inherit; font-size: 13px; font-weight: 500; text-decoration: underline; cursor: pointer; }
.row-head .rank-link { color: var(--accent); }
.tag.sample { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.reason-chip { display: inline-flex; align-items: center; margin: 6px 0 2px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--text); font-size: 12.5px; font-weight: 500; }
.rank-actions { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 8px; }
.rank-status { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.rank-status:first-child { border-top: 0; }
.status-pill { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text); font-weight: 500; }
.status-pill.normal { background: var(--success-soft); color: var(--success); }
.status-pill.paused, .status-pill.excluded { background: var(--accent-soft); }
.about-rank { max-width: 720px; margin: 8px auto 40px; line-height: 1.6; }
.about-rank h1 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 40px; margin-bottom: 4px; }
.about-rank h2 { font-size: 18px; margin: 26px 0 8px; }
.about-rank p, .about-rank li { color: var(--text); }
.about-rank ol, .about-rank ul { padding-left: 22px; display: grid; gap: 6px; }
.about-rank .arrival-strip { margin: 14px 0; }

/* Sample key art (stock images) inside poster slots */
.poster-img { position: relative; overflow: hidden; }
.poster-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; display: block; }
.poster-img::after { content: ''; position: absolute; inset: 0; background: var(--poster-fade); pointer-events: none; }
.poster-img .poster-title { position: absolute; left: 6%; bottom: 8%; z-index: 1; color: var(--poster-ink); font-family: var(--font-display); line-height: 1.05; }

/* ---------- Creator stories (planned; js/story.js): Meet the maker, My story, Extras ---------- */
.maker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin: 22px 0 6px; align-items: start; }
.maker:not(:has(.maker-intro)) { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.maker-poster { position: relative; display: block; width: 100%; aspect-ratio: 16/9; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--player-bg); cursor: pointer; padding: 0; color: var(--on-image); }
.maker-poster:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.maker-art, .story-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.maker-play { position: absolute; inset: 0; display: grid; place-items: end; padding: 12px; }
.maker-play svg { width: 26px; height: 26px; padding: 14px; border-radius: 50%; background: var(--scrim-soft); box-sizing: content-box; }
.maker-meta { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; }
.maker-label { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.story-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.story-chip.free { background: var(--success-soft); color: var(--success); border-color: transparent; }
.maker-meta .story-chip, .story-corner .story-chip { background: var(--scrim-soft); color: var(--on-image); border-color: transparent; }
.story-badge-wrap { position: relative; display: inline-flex; }
.story-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; font: inherit; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.story-badge:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.story-explain { position: absolute; top: calc(100% + 6px); left: 0; z-index: 5; width: min(320px, 80vw); padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 13px; line-height: 1.45; }
.story-badge-wrap:hover .story-explain[hidden] { display: block; }
.story-corner { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.story-end { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; background: var(--overlay); padding: 24px; }
.story-transcript { font-size: 13px; color: var(--on-image-muted); }
.story-transcript summary { cursor: pointer; min-height: 32px; }
.maker-story h3 { margin-bottom: 6px; }
.story-quote { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 24px; line-height: 1.25; margin: 0 0 8px; }
.story-more summary { cursor: pointer; color: var(--accent); min-height: 32px; }
.story-text .link-btn { font-size: 12.5px; color: var(--muted); }
.extra-card { text-align: left; font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.extra-thumb { display: grid; place-items: center; aspect-ratio: 16/9; background: var(--surface-2); border-radius: var(--radius); }
.extra-title { display: block; font-weight: 600; margin: 8px 0 6px; }
.extra-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.attest { display: flex; gap: 10px; align-items: flex-start; }
.attest input { margin-top: 4px; }
.story-inline { font-size: inherit; font-family: inherit; }
@media (max-width: 760px) { .maker { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .story-player .screen .poster { animation: none; } }

/* ---------- Characters, cast credits and Stars (js/characters.js, js/portrait.js) ---------- */
.portrait { width: 100%; height: 100%; display: block; }
.cast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
.cast-item { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 6px; border-radius: var(--radius); color: inherit; min-height: 44px; }
a.cast-item:hover { background: var(--surface); }
a.cast-item:focus-visible, .star-card:focus-visible, .following-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cast-face { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; display: inline-block; flex-shrink: 0; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--image-ring); }
.cast-face.placeholder { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; }
.cast-name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.char-hero { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 36px; align-items: start; margin: 14px 0 32px; }
.char-art { aspect-ratio: 2 / 3; border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.char-labels { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.origin-label { font-size: 12px; font-weight: 600; color: var(--text); border: 1px solid var(--border-strong); padding: 3px 9px; border-radius: 6px; }
.char-info h1 { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 44px; line-height: 1.05; margin: 10px 0 4px; }
.char-tagline { font-size: 17px; color: var(--muted); margin: 0 0 6px; }
.char-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0 6px; }
.follow-btn { min-height: 44px; min-width: 44px; }
.follow-btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.char-sheet .table th { width: 120px; vertical-align: top; }
.swatches { display: inline-flex; gap: 4px; vertical-align: middle; margin-right: 6px; }
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px var(--border-strong); }
.stars-chips { margin-top: 2px; }
.stars { list-style: none; margin: 12px 0 0; padding: 0 0 8px; display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 14px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.star-card { display: block; color: inherit; border-radius: var(--radius); }
.star-art { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.star-art .portrait { transition: transform .35s ease; }
.star-card:hover .star-art .portrait { transform: scale(1.04); }
.star-rank { position: absolute; left: 8px; bottom: 0; font-family: var(--font-display); font-size: 54px; line-height: 1; color: var(--on-image); text-shadow: 0 2px 10px var(--scrim-soft); }
.star-meta { display: flex; flex-direction: column; gap: 2px; padding: 8px 2px 0; }
.list-tabs { margin: 0 0 16px; }
.following { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.following-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.following-link { display: flex; align-items: center; gap: 12px; color: inherit; min-width: 0; }
.following-link > span:last-child { display: flex; flex-direction: column; }
.contact-sheet { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; }
.contact-item { display: flex; flex-direction: column; gap: 3px; }
.contact-art { aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; margin-bottom: 6px; background: var(--surface); }
.contact-item .status-chip { margin-left: 0; align-self: flex-start; }
.studio-char { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.studio-char > div { flex: 1; min-width: 200px; }
.char-form { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; margin-top: 14px; }
.char-preview { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 10px; }
.mine-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mine-row .cast-face { width: 48px; height: 48px; }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 10px; }
.ref-slots { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.ref-slots .btn.on { border-color: var(--success); color: var(--success); }
.nudge { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--text); }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { font-weight: 600; font-size: 13.5px; margin-bottom: 6px; padding: 0; }
.radio-card input[type="radio"] { margin: 0 6px 0 0; }
@media (max-width: 760px) {
  .char-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .char-hero .char-art { max-width: 240px; }
  .char-info h1 { font-size: 34px; }
  .char-form { grid-template-columns: minmax(0, 1fr); }
  .char-preview { position: static; order: -1; max-width: 220px; }
  .stars { grid-auto-columns: 128px; }
}
@media (prefers-reduced-motion: reduce) { .star-art .portrait { transition: none; } .star-card:hover .star-art .portrait { transform: none; } }
