:root {
  --bg: #0b0b10;
  --panel: #14141c;
  --panel-2: #1c1c27;
  --line: #2a2a38;
  --text: #f1f1f6;
  --muted: #9a9aae;
  --accent: #8b5cf6;
  --accent-text: #ffffff;
  --live: #e11d48;
  --ok: #22c55e;
  --warn: #f59e0b;
  --radius: 10px;
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; }
button, input, select, textarea { font: inherit; color: inherit; }

.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.title { font-weight: 700; font-size: 17px; }
.status { color: var(--muted); font-size: 13px; }
.status.dirty { color: var(--warn); }
.status.ok { color: var(--ok); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

button { border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
button:hover { border-color: var(--muted); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
button.ghost { background: transparent; }
button.danger { color: #fda4af; border-color: #7f1d1d; background: transparent; }
button.small { padding: 4px 9px; font-size: 13px; }
button:disabled { opacity: 0.5; cursor: default; }

.banner { margin: 12px 24px 0; padding: 12px 16px; border-radius: var(--radius); background: #3b1220; border: 1px solid #7f1d1d; }
.banner.ok { background: #0f2a1a; border-color: #166534; }
/* Uploads, on every page (app.js renderUploadBar) */
.upload-bar { margin: 12px 24px 0; display: grid; gap: 8px; }
.upload-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 10px 14px; border-radius: var(--radius); background: #0f1f33; border: 1px solid #1d4ed8; }
.upload-row.warn { background: #2a1f0a; border-color: #a16207; }
.upload-row progress { flex: 1 1 160px; min-width: 120px; }
.upload-row .upload-note { flex-basis: 100%; color: var(--muted, #9aa4b2); font-size: 0.9em; }
.uploader .warn-box { border: 1px solid #a16207; background: #2a1f0a; padding: 10px 14px; border-radius: var(--radius); }

.layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 0; min-height: calc(100vh - 70px); }

.tree { border-right: 1px solid var(--line); padding: 12px 8px 40px; overflow-y: auto; max-height: calc(100vh - 70px); position: sticky; top: 70px; }
.tree-find { width: 100%; margin: 0 0 4px; }
.tree-section + .tree-section { border-top: 1px solid var(--line); margin-top: 8px; }
.tree .group { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer;
  color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 12px 6px 6px; }
.tree .group:hover { color: var(--text, inherit); }
.tree .group .count { margin-left: auto; text-transform: none; letter-spacing: 0; }
.chev-inline { width: 18px; display: inline-flex; justify-content: center; margin-right: 4px; }
.node-row { display: flex; align-items: center; gap: 2px; }
.chev { flex: none; width: 30px; height: 32px; border: 0; background: transparent; color: var(--text); padding: 0; border-radius: 6px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
/* A drawn arrow: points right when folded, down when open. */
.chev-icon { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; opacity: .85; }
.chev-icon.open { transform: rotate(45deg) translate(-2px, -2px); }
.chev:hover { background: var(--panel-2); }
.chev.spacer { display: inline-block; cursor: default; }
.node .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.node { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: 6px 8px; border-radius: 7px; }
.node:hover { background: var(--panel-2); }
.node.selected { background: var(--panel-2); outline: 1px solid var(--accent); }
.node .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.node .kind { color: var(--muted); font-size: 12px; margin-left: auto; }
.node .tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--live); color: #fff; }
.children { margin-left: 11px; border-left: 1px solid var(--line); padding-left: 2px; }

.editor { padding: 24px 32px 80px; max-width: 980px; }
.editor h1 { margin: 0 0 4px; font-size: 24px; }
.editor .crumb { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.section h2 { font-size: 15px; margin: 0 0 14px; }
/* Each section's title is a tinted band across the top, so Video, Trailer, Art... stand apart. */
.section > h2:first-child {
  font-size: 20px; letter-spacing: .01em; margin: -18px -20px 18px; padding: 14px 20px;
  background: color-mix(in srgb, var(--accent) 22%, var(--panel-2)); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 18px; }
.full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 14px; }
input, select, textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=color] { padding: 2px; height: 38px; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
textarea { min-height: 90px; resize: vertical; }
.help { color: var(--muted); font-size: 12px; }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.row.between { justify-content: space-between; align-items: center; }
.row.end { justify-content: flex-end; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; padding: 10px; background: var(--panel-2); border-radius: 8px; }
.item > label { flex: 1 1 180px; }
.preview { width: 240px; max-width: 100%; aspect-ratio: 16 / 9; flex: none; align-self: flex-start; border-radius: 8px; background: var(--panel-2) center / contain no-repeat; border: 1px solid var(--line); }
.preview.logo { background-size: contain; background-color: #000; }
.muted { color: var(--muted); }

dialog { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); padding: 0; width: min(520px, calc(100vw - 32px)); }
dialog.wide { width: min(900px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
.dialog { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.dialog h2 { margin: 0; font-size: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
.pill { font-size: 11px; padding: 1px 6px; border-radius: 4px; margin-left: 6px; }
.pill.premiere { background: var(--live); }
.pill.late { background: #4c1d95; }
.channel { margin-top: 18px; }
.channel h3 { margin: 0 0 4px; font-size: 16px; }
.schedule-scroll { max-height: 55vh; overflow-y: auto; }

/* Notices: a deleted item, a studio's request status. */
.section.notice { border-color: var(--accent); }
.section.notice p { margin: 0; }
.note { color: var(--warn); margin: 0 0 12px; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
table.num td:not(:first-child), table.num th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.swatches { display: inline-flex; gap: 4px; }
.swatch.big { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
.preview-bar { margin: 12px 24px 0; padding: 10px 16px; border-radius: var(--radius); background: #2a2108; border: 1px solid var(--warn);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.preview-bar strong { color: var(--warn); }
.preview-bar button { margin-left: auto; }

/* Video uploads (docs/UPLOADS.md) */
.uploader { border: 1px dashed var(--line); border-radius: var(--radius); padding: 14px 16px; display: grid; gap: 10px; }
.uploader h3 { margin: 0; font-size: 15px; }
.uploader .check { display: block; font-size: 13px; line-height: 1.5; }
.uploader .item p { margin: 0 0 6px; }
.help.ok { color: var(--ok, #15803d); }
.film-rows { display: grid; gap: 6px; }
.film-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); }
.film-name { display: grid; gap: 2px; min-width: 0; }
.video-tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tag-missing { background: color-mix(in srgb, #f59e0b 22%, transparent); color: #f59e0b; }
.tag-ok { background: color-mix(in srgb, #22c55e 18%, transparent); color: #22c55e; }
.tag-busy { background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); }
.uploader.flash { outline: 2px solid var(--accent); outline-offset: 4px; transition: outline-color 1s; }
@media (max-width: 640px) { .film-row { grid-template-columns: 1fr; } }

/* ADD VIDEO, Your videos, Help & support */
.add-video { display: block; width: calc(100% - 8px); margin: 4px 4px 12px; padding: 12px; font-size: 15px; letter-spacing: .04em; }
.editor .add-video { width: auto; margin: 0; }
.help-row { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 16px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--panel-2); color: var(--muted); font-size: 14px; }
.steps li span { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--line); font-weight: 600; font-size: 13px; }
.steps li.now { color: var(--text); outline: 1px solid var(--accent); }
.steps li.now span { background: var(--accent); color: var(--accent-text); }
.steps li.done span { background: color-mix(in srgb, #22c55e 40%, transparent); }
.wizard { display: grid; gap: 16px; max-width: 720px; }
.wizard label { display: grid; gap: 6px; }
.wizard input:not([type=checkbox]), .wizard select, .wizard textarea { width: 100%; }
.wizard .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wizard .label { margin: 0 0 6px; }
.drop { display: grid !important; place-items: center; gap: 4px; text-align: center; padding: 34px 16px; border: 2px dashed var(--line); border-radius: var(--radius); cursor: pointer; background: var(--panel-2); }
.drop:hover, .drop.has-file { border-color: var(--accent); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop strong { font-size: 16px; }
.terms { display: block !important; font-size: 13px; line-height: 1.5; }
button.big { padding: 12px 22px; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex !important; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; text-transform: capitalize; font-size: 14px; }
.chip input { display: none; }
.chip.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 20%, transparent); }
.upload-progress { max-width: 720px; margin-bottom: 16px; }
.upload-progress progress { width: 100%; height: 10px; }
.summary { align-items: flex-start !important; flex-wrap: nowrap; }
.summary h2 { margin: 0 0 4px; }
.preview.empty { display: grid; place-items: center; color: var(--muted); font-size: 13px; }
ol.next { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.need-help { margin-top: 4px; }
.help.bad, .tag-bad { color: #fda4af; }
.tag-bad { background: color-mix(in srgb, #ef4444 20%, transparent); }
.faq { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--muted); }
.support-msg.new { border-color: var(--warn, #f59e0b); }
.support-msg .msg { white-space: pre-wrap; }
a.button { display: inline-block; text-decoration: none; border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 8px 14px; color: inherit; }
a.button.small { padding: 4px 9px; font-size: 13px; }
a.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
details.more > summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
@media (max-width: 640px) { .wizard .grid { grid-template-columns: 1fr; } .summary { flex-wrap: wrap; } }

[hidden] { display: none !important; }

/* Earnings */
table.earn { width: 100%; border-collapse: collapse; font-size: 14px; }
table.earn th, table.earn td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.earn th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.earn td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.earn td.strong { font-weight: 700; }
.stat .label { display: block; color: var(--muted); font-size: 12px; }
.stat strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.money-line label { display: grid; gap: 4px; }
.money-line .grow { flex: 1; min-width: 200px; }
.money-line .grow input { width: 100%; }
.month-chips { gap: 6px; }
.share-row { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; max-width: 420px; }
.share-row input { width: 120px; }
.small-input { width: 150px; padding: 4px 8px; font-size: 13px; }
/* Wide tables scroll inside their box instead of widening the page. */
#editor, .section { min-width: 0; }
a.button.ghost { background: transparent; }

/* ---------- Phones and tablets ----------
   Up to 899px wide (phones, portrait tablets): the sidebar becomes a drawer opened by the
   Menu button, so pages start at the top instead of below the whole menu. Landscape tablets
   keep the sidebar. */
.menu-btn, .menu-shade, .menu-foot { display: none; }
.burger { position: relative; width: 16px; height: 2px; background: currentColor; border-radius: 1px; box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor; }
@media (max-width: 899px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px; }
  .tree { position: fixed; top: 0; bottom: 0; left: 0; z-index: 20; width: min(340px, 86vw); max-height: none;
    background: var(--panel); padding-top: calc(12px + env(safe-area-inset-top, 0px)); padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-102%); visibility: hidden; transition: transform .2s ease, visibility .2s; overscroll-behavior: contain; }
  body.menu-open .tree { transform: none; visibility: visible; box-shadow: 0 0 40px rgba(0, 0, 0, .6); }
  body.menu-open .menu-shade { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0, 0, 0, .55); }
  body.menu-open { overflow: hidden; }
  /* Wide tables scroll sideways inside the page instead of widening it. */
  .editor table { display: block; overflow-x: auto; }
  .editor { padding: 20px 20px 80px; }
}
@media (max-width: 640px) {
  .bar { padding: 10px 12px; gap: 8px; }
  .brand { gap: 10px; min-width: 0; flex: 1 1 100%; }
  .brand > div { min-width: 0; }
  .brand .dot { display: none; }
  .title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .status { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Header buttons wrap onto a second row rather than running off the edge. */
  .actions { flex: 1 1 100%; flex-wrap: wrap; gap: 8px; }
  .actions > * { flex: none; }
  .actions button, .actions a.button { padding: 7px 11px; font-size: 14px; }
  .actions select { max-width: 128px; }
  /* Sign out moves to the bottom of the menu, so the header row fits. */
  .actions #signOut { display: none; }
  .menu-foot { display: block; margin: 16px 8px 0; padding-top: 12px; border-top: 1px solid var(--line); }
  .banner, .preview-bar, .upload-bar { margin: 10px 12px 0; }
  .editor { padding: 16px 14px 80px; }
  .editor h1 { font-size: 21px; }
  .section { padding: 14px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview { width: 100%; max-width: 320px; }
}
/* Touch screens: bigger targets, and 16px text in fields so iPhones don't zoom in on tap. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
  .node { padding: 10px 8px; }
  .chev { width: 38px; height: 40px; }
  input[type=checkbox] { width: 22px; height: 22px; }
}

/* Videos page: one studio open at a time */
.studio-fold { padding: 0; }
.studio-fold .fold-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 16px 20px; background: none; border: 0; color: inherit; font: inherit; font-size: 15px; text-align: left; cursor: pointer; border-radius: var(--radius); }
.studio-fold .fold-head:hover { background: rgba(255,255,255,0.03); }
.studio-fold .chev { width: 14px; color: var(--muted, #999); }
.studio-fold .fold-note { margin-left: auto; font-size: 13px; color: var(--muted, #999); }
.studio-fold .fold-note.warn { color: #f5b041; }
.studio-fold.open > :not(.fold-head) { margin: 0 20px 18px; }

/* Studio requests: each change at a glance */
.request-item { display: flex; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.request-poster { width: 192px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: rgba(127,127,127,.15); flex: none; }
.request-poster.none { display: flex; align-items: center; justify-content: center; font-size: 13px; opacity: .7; }
.request-poster.changed { outline: 2px solid #e0a030; outline-offset: 2px; }
.request-body { flex: 1; min-width: 240px; }
.request-body h3 { margin: 0 0 4px; }
.request-player { flex: 1; min-width: 220px; max-width: 420px; }
.request-player video { width: 100%; border-radius: 6px; background: #000; }
.req-tag { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; background: color-mix(in srgb, var(--muted) 22%, transparent); margin-right: 4px; }
.preview-player { margin-top: 8px; }
.preview-player video { width: 100%; max-width: 480px; border-radius: 6px; background: #000; display: block; }
.help.warn { color: #f59e0b; }
.change-list { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.change-list label { margin: 0; }

/* App icon and splash page: a little Roku home screen row and a TV-shaped splash preview. */
.app-image-row { display: flex; gap: 16px; flex-wrap: wrap; }
.roku-home { position: relative; display: flex; gap: 10px; align-items: center; padding: 18px; border-radius: 8px; background: #1d1033; width: max-content; max-width: 100%; }
.roku-tile { width: 108px; aspect-ratio: 4 / 3; border-radius: 4px; background: #3a2d55 center / cover no-repeat; flex: none; }
.roku-tile.focus { width: 162px; outline: 3px solid #fff; outline-offset: 3px; }
.splash-frame { position: relative; width: 384px; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background: #000 center / contain no-repeat; border: 1px solid var(--line); }
.roku-note { position: absolute; top: 6px; right: 8px; font-size: 11px; color: #fff; background: rgba(0,0,0,.6); padding: 2px 6px; border-radius: 4px; }

/* Cast and crew on a title page */
.credits .more-credits { margin: 6px 0; }
.credits .more-credits summary { cursor: pointer; color: var(--muted, #9a9aae); font-size: 14px; margin: 4px 0; }
.credits .credit-row { display: grid; grid-template-columns: 170px 1fr; gap: 8px 12px; align-items: center; margin: 6px 0; }
.credits .chips { align-items: center; }
.credits .chip.person { text-transform: none; cursor: default; padding-right: 6px; }
.credits .chip-x { background: none; border: 0; color: inherit; font-size: 16px; line-height: 1; padding: 0 4px; cursor: pointer; }
.credits .chips input { width: 180px; flex: 0 1 180px; }
@media (max-width: 600px) { .credits .credit-row { grid-template-columns: 1fr; } }

/* Add Video: what are you adding? */
.kind-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.kind-pick .kind { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: inherit; cursor: pointer; }
.kind-pick .kind.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.kind-pick .kind-icon { font-size: 24px; }
@media (max-width: 700px) { .kind-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Ready for TVs? */
.section.ready h2 { margin-bottom: 8px; }
.ready-list { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; }
.ready-list .ok { color: #4ade80; }
.ready-list .todo { color: #fbbf24; }
.section.ready.all-ok { border-color: color-mix(in srgb, #4ade80 40%, transparent); }

/* Storage & costs */
.storage-bar { height: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: -4px 0 20px; }
.storage-bar span { display: block; height: 100%; background: var(--ok); }
.storage-bar.warn span { background: var(--warn); }
.storage-bar.full span { background: #e5484d; }
.storage-studio { margin: 8px 0; }
.storage-studio summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.allowance { white-space: nowrap; }
.poster-row { align-items: flex-start; gap: 16px; }
.poster-thumb { display: block; width: 140px; aspect-ratio: 7 / 9; object-fit: cover; border-radius: 6px; background: var(--panel, #222); border: 1px solid var(--line, #444); }
.poster-thumb.empty { display: flex; align-items: center; justify-content: center; font-size: 12px; opacity: .6; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-top: 12px; }
.poster-card { display: flex; flex-direction: column; gap: 4px; }
.poster-card .poster-thumb { width: 100%; }
a.button:hover { border-color: var(--muted); }
.poster-art { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.poster-art .help { margin: 4px 0 0; }

/* "Ready for TVs" items and Jump to links scroll to their part of the page. */
.ready-list a, .jump-list a { text-decoration: none; cursor: pointer; }
.ready-list a:hover, .jump-list a:hover { text-decoration: underline; }
.ready-list .optional { color: var(--muted, #9ca3af); }
.jump-list { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.jump-list a { color: #c4b5fd; }
.section, [id^="f-"] { scroll-margin-top: 84px; }
@keyframes flash { from { box-shadow: 0 0 0 3px #a78bfa; } to { box-shadow: 0 0 0 3px transparent; } }
.flash { animation: flash 1.6s ease-out; border-radius: 8px; }

/* A movie's Shop section: one row per product, with its pop-up times under it. */
.item.shop-row { display: block; }
.shop-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.shop-details { margin-top: 10px; }
.shop-popups { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--line); }
.shop-popups .row + .row { margin-top: 6px; }
.shop-row > .row { margin-top: 8px; }
.shop-add { margin-top: 12px; }
.help.warn { color: #fbbf24; }

/* Today, the grouped menu and video cards */
.tree .sub-head { display: flex; align-items: center; padding: 10px 12px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, #9a9aa8); }
.tree .sub-head .count { margin-left: auto; letter-spacing: 0; }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; }
.stat strong { font-size: 24px; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted, #9a9aa8); }
.stat.attention { border-color: var(--accent); }
.today-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.section > h2 + .today-row, .section.notice .today-row { border-top: 0; }
.today-text { display: grid; gap: 2px; min-width: 0; }
.today-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.today-dot.now { background: var(--accent); }
.today-dot.warn { background: #f59e0b; }
.today-dot.bad { background: #ef4444; }
.all-clear { color: #22c55e; margin: 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.switch-pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.switch-pill .pill-dot { width: 8px; height: 8px; border-radius: 50%; background: #6b7280; }
.switch-pill.on .pill-dot { background: #22c55e; }
.switch-pill .pill-state { color: var(--muted, #9a9aa8); font-size: 12px; }
.video-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.video-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.studio-fold .video-card { background: var(--panel-2); }
.card-open { padding: 0; border: 0; border-radius: 0; background: #000; cursor: pointer; display: block; }
.card-art { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-art.empty { display: grid; place-items: center; color: var(--muted, #9a9aa8); font-size: 13px; background: var(--panel-2); }
.card-body { display: grid; gap: 6px; padding: 12px; flex: 1; align-content: start; }
.card-name { min-width: 0; overflow-wrap: anywhere; }
.card-progress { display: flex; align-items: center; gap: 8px; }
.card-progress progress { flex: 1; height: 6px; accent-color: var(--accent); }
.card-actions { margin-top: 4px; }
@media (max-width: 640px) { .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .today-row { grid-template-columns: auto 1fr; } .today-row button { grid-column: 2; justify-self: start; } }

/* Title page: progress line and tabs */
.title-progress { padding: 12px 16px; display: grid; gap: 8px; }
.title-progress progress { width: 180px; height: 8px; accent-color: var(--accent); }
.title-progress.all-ok strong { color: #22c55e; }
.title-progress .ready-list { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.tab-bar { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; position: sticky; top: 0; background: var(--bg, #121218); z-index: 2; padding-top: 4px; }
.tab-bar .tab { border: 0; border-bottom: 3px solid transparent; border-radius: 6px 6px 0 0; background: transparent; padding: 9px 14px; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.tab-bar .tab:hover { color: var(--text, inherit); background: var(--panel); }
.tab-bar .tab.on { color: var(--text, inherit); border-bottom-color: var(--accent); font-weight: 600; }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }
.tab-panel[hidden] { display: none; }

/* Studios table and request reviews */
table.studios td, table.studios th { padding: 10px 8px; white-space: nowrap; vertical-align: middle; }
table.studios th { color: var(--muted); font-weight: 600; font-size: 12px; }
table.studios .studio-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: inherit; text-decoration: none; margin-right: 8px; }
table.studios .studio-name:hover { text-decoration: underline; }
table.studios .swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
table.studios a.video-tag { text-decoration: none; }
.table-find { width: 100%; max-width: 320px; margin-bottom: 12px; }
.before-after { display: grid; gap: 4px; margin: 6px 0; font-size: 13px; }
.ba-row { display: grid; grid-template-columns: 110px 1fr auto 1fr; gap: 8px; align-items: start; }
.ba-field { color: var(--muted); text-transform: capitalize; }
.ba-was { color: #fda4af; text-decoration: line-through; overflow-wrap: anywhere; }
.ba-now { color: #86efac; overflow-wrap: anywhere; }
.ba-arrow { color: var(--muted); }
.reasons { margin-top: 12px; align-items: center; }
@media (max-width: 640px) { .ba-row { grid-template-columns: 1fr; } .ba-arrow { display: none; } }

/* Pictures and videos always show whole: fitted inside their frame on black, never cropped. */
.card-art, .request-poster, .poster-thumb { object-fit: contain; background-color: #000; }
.request-poster { align-self: flex-start; height: auto; }
.request-player video, .preview-player video { height: auto; max-height: 70vh; object-fit: contain; }
img { max-width: 100%; }
.today-row.support { align-items: start; }
.today-row.support .today-dot { margin-top: 6px; }

/* Videos grouped by type */
.video-sections { display: grid; gap: 12px; }
.type-head { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 16px; }
.type-head:first-child { margin-top: 0; }
.type-head .count { color: var(--muted); font-size: 13px; }
.type-head.warn strong { color: #f59e0b; }
.show-head { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: -4px; }
.type-filter { margin-bottom: 4px; }

/* Short menu: search results, Recent, clickable paths */
.crumb.trail { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumb.trail a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.crumb.trail a:hover { color: var(--text); }
.crumb.trail .sep { opacity: .6; }
.tree-section.results { border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 6px; }
.today-row .swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.film-link { color: inherit; text-decoration: none; } .film-link:hover { text-decoration: underline; }

/* The picker: find titles and studios by typing */
dialog.picker .dialog { max-height: calc(100vh - 48px); }
.pick-bar { flex-wrap: wrap; }
.pick-bar .pick-find { flex: 1 1 240px; }
.pick-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 200px; max-height: 52vh; padding-right: 4px; }
.pick { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.pick:hover, .pick:focus-visible { background: var(--panel-2); outline: none; border-color: var(--line); }
.pick.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); }
.pick.used { opacity: .5; cursor: default; }
.pick-art { width: 64px; aspect-ratio: 16 / 9; flex: none; border-radius: 4px; object-fit: cover; background: var(--panel-2); border: 1px solid var(--line); }
.pick-text { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 14px; }
.pick-text .muted { font-size: 12px; }
.pick-text strong, .pick-text a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-mark { font-size: 12px; color: var(--muted); white-space: nowrap; }
.pick.on .pick-mark { color: var(--text); }
.item.row-item { align-items: center; flex-wrap: nowrap; }
.item.hero-slide { align-items: stretch; }
.item.hero-slide > .full { flex: 1 1 100%; }
.choice { display: flex; flex-direction: column; gap: 6px; }
.item > .choice { flex: 1 1 260px; }
.choice-label { font-size: 13px; color: var(--muted); }
.choice .row { align-items: center; }
.choice-now { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.choice-now .muted { font-size: 12px; }
.rows-in .chip { text-transform: none; cursor: default; padding-right: 6px; }
.rows-in .chip-x { background: none; border: 0; color: inherit; font-size: 16px; line-height: 1; padding: 0 4px; cursor: pointer; }
@media (max-width: 600px) { .pick-art { width: 48px; } .item.row-item { flex-wrap: wrap; } .item.row-item .pick-text { flex: 1 1 calc(100% - 70px); } }

/* The blog: the writing box, its buttons and the preview */
.post-tools { flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.post-preview { background: #07070a; border: 1px solid var(--line); border-radius: 8px; padding: 22px 26px; font-size: 16px; line-height: 1.7; color: #dcdce4; max-height: 70vh; overflow-y: auto; }
.post-preview p { margin: 0 0 1.1em; }
.post-preview h2 { font-size: 24px; margin: 1.3em 0 .5em; color: #fff; padding: 0; background: none; }
.post-preview h3 { font-size: 19px; margin: 1.3em 0 .5em; color: #fff; }
.post-preview a { color: var(--accent); }
.post-preview ul, .post-preview ol { margin: 0 0 1.1em; padding-left: 1.3em; }
.post-preview blockquote { margin: 1.3em 0; padding: 2px 0 2px 18px; border-left: 3px solid var(--accent); color: #fff; font-size: 18px; }
.post-preview blockquote p { margin: 0; }
.post-preview figure { margin: 1.5em 0; }
.post-preview figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.post-preview figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }
.post-preview hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.post-actions { align-items: center; margin-bottom: 14px; }
.post-editor { min-height: 340px; max-height: 72vh; margin-bottom: 6px; cursor: text; }
.post-editor:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.post-editor:empty::before { content: attr(data-empty); color: var(--muted); }
.post-editor > :first-child { margin-top: 0; }
.post-editor figure { cursor: pointer; border-radius: 6px; }
.post-editor figure.picked { outline: 3px solid var(--accent); outline-offset: 4px; }
.post-editor li { margin-bottom: .3em; }
.post-tools button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
/* An empty heading or quote says what it is until something is typed */
.post-editor h2:has(> br:only-child)::before { content: "Heading"; color: var(--muted); }
.post-editor h3:has(> br:only-child)::before { content: "Small heading"; color: var(--muted); }
.post-editor blockquote:has(> br:only-child)::before { content: "A quote"; color: var(--muted); }
.post-editor li:has(> br:only-child)::before { content: "List item"; color: var(--muted); }
.post-editor h2::before, .post-editor h3::before, .post-editor blockquote::before, .post-editor li::before { pointer-events: none; }
/* A block from the catalog in the writing box */
.post-editor figure.embed { display: flex; gap: 14px; align-items: flex-start; margin: 1.2em 0; padding: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
.post-editor figure.embed img { width: 180px; max-width: 40%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; margin: 0; flex: none; }
.post-editor figure.embed figcaption { display: flex; flex-direction: column; gap: 3px; margin: 0; text-align: left; font-size: 13px; color: var(--muted); min-width: 0; }
.post-editor figure.embed figcaption strong { color: var(--accent); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.post-editor figure.embed .embed-name { color: #fff; font-size: 17px; font-weight: 600; }
.post-editor figure.embed .embed-line { color: #dcdce4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-editor figure.embed .embed-linked { font-size: 11px; opacity: .8; margin-top: 4px; }
.post-editor figure.embed.gone { border-color: #7f1d1d; }
.post-editor figure.embed.gone strong { color: #fda4af; }
/* "How it will look": catalog blocks drawn the way the website draws them */
.post-look { cursor: default; }
.post-look img, .post-look .look-noart { display: block; background: var(--panel-2); }
.look-trailer { position: relative; aspect-ratio: 16 / 9; margin: 1.6em 0; background: #000 center / cover no-repeat; display: grid; place-items: center; }
.look-trailer::before { content: ""; position: absolute; inset: 0; background: rgba(7, 7, 10, .35); }
.look-play { position: relative; background: var(--accent); color: #fff; padding: 12px 20px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.look-name { position: absolute; left: 16px; bottom: 12px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
.look-card { display: flex; flex-direction: column; gap: 4px; width: 260px; max-width: 100%; margin: 1.6em 0; font-size: 13px; color: var(--muted); }
.look-card.wide { width: 340px; }
.look-card img, .look-card .look-noart { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: 6px; }
.look-card.square img, .look-card.square .look-noart { aspect-ratio: 1; }
.look-card strong { color: #fff; font-size: 16px; }
.look-card b { color: #fff; font-size: 15px; }
.look-card em { font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.look-details { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 22px; margin: 1.6em 0; padding: 20px; background: #101016; border: 1px solid var(--line); }
.look-details img, .look-details .look-noart { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.look-details h3 { margin: 0 0 6px; font-size: 22px; color: #fff; }
.look-details p { margin: 0 0 .8em; font-size: 14px; line-height: 1.6; }
.look-facts { font-size: 11px !important; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.look-lede { color: #fff; }
.look-details dl { margin: 10px 0 14px; display: grid; gap: 8px; font-size: 13px; }
.look-details dt { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.look-details dd { margin: 0; font-weight: 600; color: #fff; }
.look-button { display: inline-block; border: 1px solid rgba(255, 255, 255, .4); padding: 9px 16px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #fff; }
@media (max-width: 700px) { .look-details { grid-template-columns: 1fr; } }
