/* Marquee — warm near-black, one amber accent, Instrument Serif over Geist. */
:root {
  --bg: #121110; --panel: #1b1917; --panel2: #171513; --raise: #242120;
  --line: #262320; --line2: #36322c;
  --text: #ede8df; --soft: #cfc8bc; --dim: #a39c90; --faint: #8a8377;
  --accent: #f2b85c; --accent-ink: #121110;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: Geist, ui-sans-serif, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 3.4vw, 56px);
  --r: 10px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { display: block; }
code, kbd, .mono { font-family: var(--mono); }
code { font-size: .92em; color: var(--text); }
kbd { font-size: 11px; color: var(--dim); border: 1px solid var(--line2); border-radius: 5px; padding: 0 5px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.grow { flex: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.err { color: #ff9b8a; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin: 0; }
.eyebrow.accent { color: var(--accent); }
.display { font-family: var(--serif); font-weight: 400; letter-spacing: .005em; line-height: 1.02; margin: 0; }
.page { padding: 8px var(--gutter) 64px; max-width: 1760px; margin: 0 auto; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: 68px; display: flex; align-items: center; gap: 36px;
  padding: 0 var(--gutter); background: rgba(18, 17, 16, .88); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.brand { font-family: var(--serif); font-size: 30px; line-height: 1; }
.top nav { display: flex; gap: 26px; font-size: 14px; }
.top nav a { color: var(--dim); padding: 6px 0; border-bottom: 1px solid transparent; }
.top nav a.on { color: var(--text); border-bottom-color: var(--text); }
.searchbox {
  margin-left: auto; width: min(460px, 38vw); height: 40px; display: flex; align-items: center; gap: 10px;
  padding: 0 12px 0 14px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--panel);
  color: var(--dim); text-align: left;
}
.searchbox:hover { border-color: var(--faint); }
.searchbox .ico { display: flex; }
.searchbox .ph { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.foot { display: flex; justify-content: space-between; gap: 16px; padding: 20px var(--gutter) 28px; color: var(--faint);
  font-size: 12px; border-top: 1px solid var(--line); }
.foot a { color: var(--dim); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- buttons, chips, segments ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 20px;
  border: 1px solid var(--line2); background: transparent; color: var(--text); font-size: 14px; white-space: nowrap;
}
.btn:hover { border-color: var(--soft); color: var(--text); }
.btn.primary { background: var(--text); color: var(--accent-ink); border-color: var(--text); font-weight: 600; }
.btn.primary:hover { background: #fff; }
.btn.ghost { background: var(--panel); border-radius: 8px; }
.btn.small { height: 32px; padding: 0 12px; font-size: 13px; }
.icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 17px; border: 1px solid var(--line2);
  background: var(--panel); color: var(--soft); }
.icon:hover { color: var(--text); border-color: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 16px;
  border: 1px solid var(--line2); background: var(--panel); color: var(--soft); font-size: 13px; }
.chip:hover { color: var(--text); border-color: var(--faint); }
.chip.on { background: var(--text); color: var(--accent-ink); border-color: var(--text); }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; }
.seg button { height: 32px; padding: 0 12px; border: 0; background: var(--panel); color: var(--soft); font-size: 13px; }
.seg button + button { border-left: 1px solid var(--line2); }
.seg button.on { background: var(--text); color: var(--accent-ink); }
.select select { height: 34px; padding: 0 30px 0 12px; border-radius: 8px; border: 1px solid var(--line2);
  background: var(--panel) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="6"><path d="M1 1l4 4 4-4" fill="none" stroke="%23a39c90" stroke-width="1.5"/></svg>') no-repeat right 11px center;
  appearance: none; font-size: 13px; }
.field input { height: 40px; width: min(320px, 60vw); padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line2);
  background: var(--panel); outline: 0; }
.field input:focus { border-color: var(--accent); }
.linkish { background: none; border: 0; padding: 4px 0; color: var(--dim); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--text); }
.readback { margin: 0; color: var(--soft); font-size: 15px; }
.more-row { display: flex; justify-content: center; padding: 32px 0 8px; }
.note { padding: 10px 14px; border-radius: 8px; background: var(--panel); color: var(--soft); }
.note a { color: var(--accent); }

/* ---------- tiles ---------- */
.thumb { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: var(--raise); }
.thumb img, .thumb .noimg { width: 100%; height: 100%; object-fit: cover; }
.thumb .noimg { background: repeating-linear-gradient(135deg, var(--raise) 0 12px, var(--panel) 12px 24px); }
.thumb .len, .thumb .badge { position: absolute; z-index: 2; font-family: var(--mono); font-size: 11px; padding: 2px 6px;
  border-radius: 4px; background: rgba(18, 17, 16, .78); color: var(--text); }
.thumb .len { right: 8px; bottom: 8px; }
.thumb .badge { left: 8px; top: 8px; font-family: var(--sans); color: var(--soft); }
.thumb .badge.hot { color: var(--accent); }
.thumb video.pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 1; }
.thumb.playing video.pv { opacity: 1; }
.thumb.playing::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: var(--pv, 0%);
  background: var(--accent); z-index: 3; }
.tile { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tile:hover { color: var(--text); }
.tile:hover .thumb { outline: 2px solid var(--accent); outline-offset: 0; }
.tile-t { font-size: 15px; font-weight: 500; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-m { font-size: 13px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: -4px; }
.why { font-size: 12px; color: var(--faint); margin-top: -4px; }
.why b { color: var(--soft); font-weight: 400; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px 18px; }

/* ---------- shelves ---------- */
.shelf { margin-top: 44px; }
.shelf header, .sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.shelf h2, .sec-head h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; margin: 0; line-height: 1.1; }
.shelf .more, .sec-head .more { margin-left: auto; color: var(--dim); font-size: 13px; }
.shelf .arrows { display: flex; gap: 8px; align-self: center; }
.shelf .more + .arrows { margin-left: 4px; }
.track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, calc((100% - 4 * 16px) / 5));
  gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px; }
.track::-webkit-scrollbar { display: none; }
.track > * { scroll-snap-align: start; }

/* ---------- home ---------- */
.hero-feature { position: relative; height: min(62vh, 560px); min-height: 380px; border-radius: 16px; overflow: hidden; background: var(--panel); margin-top: 8px; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18,17,16,.92) 0%, rgba(18,17,16,.62) 42%, rgba(18,17,16,0) 72%),
  linear-gradient(0deg, rgba(18,17,16,.7) 0%, rgba(18,17,16,0) 40%); }
.hero-copy { position: absolute; left: clamp(20px, 3.4vw, 48px); bottom: clamp(20px, 3.4vw, 48px); width: min(560px, 80%); display: flex; flex-direction: column; gap: 14px; }
.hero-copy h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5vw, 68px); line-height: 1; margin: 0; }
.hero-copy p { margin: 0; color: var(--soft); font-size: 15px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.home > .chips { margin-top: 28px; }
.skeleton { background: var(--panel); border-radius: 16px; animation: pulse 1.4s ease-in-out infinite; }
.hero-sk { height: min(62vh, 560px); margin-top: 8px; }
@keyframes pulse { 50% { opacity: .55; } }

/* ---------- search ---------- */
.qbar { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 6px 8px 6px 16px; margin-top: 8px;
  border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); color: var(--dim); flex-wrap: wrap; }
.qbar:focus-within { border-color: var(--accent); }
.qchips { display: contents; }
.qchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 10px; border-radius: 6px;
  background: var(--raise); color: var(--text); font-size: 13px; }
.qchip .k { color: var(--dim); font-family: var(--mono); font-size: 12px; }
.qchip button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 4px; background: none; color: var(--dim); }
.qchip button:hover { background: var(--line2); color: var(--text); }
.qchip.bad { box-shadow: inset 0 0 0 1px #c9695a; }
.qchip.bad .k { color: #e59a8c; }
.qbar input { flex: 1; min-width: 160px; height: 38px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; }
.sgrid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; margin-top: 28px; }
.rail { display: flex; flex-direction: column; gap: 26px; position: sticky; top: 88px; align-self: start;
  max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
.facet { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.facet legend { padding: 0 0 8px; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); width: 100%; }
.facet .clear { float: right; letter-spacing: 0; text-transform: none; font-size: 12px; color: var(--accent); }
.frow { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 6px; margin: 0 -6px;
  border-radius: 6px; font-size: 13px; color: var(--soft); }
.frow:hover { background: var(--panel); color: var(--text); }
.frow .box { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line2); }
.frow.on { color: var(--text); }
.frow.on .box { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--bg); }
.fl { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fl > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbar { display: block; height: 3px; border-radius: 2px; background: var(--line); }
.fbar i { display: block; height: 3px; border-radius: 2px; background: var(--line2); }
.frow.on .fbar i, .frow:hover .fbar i { background: var(--accent); }
.hist { display: flex; align-items: flex-end; gap: 3px; height: 60px; }
.hist a { flex: 1; min-height: 3px; border-radius: 2px 2px 0 0; background: var(--line2); }
.hist a:hover, .hist a.on { background: var(--accent); }
.hist-ax { display: flex; justify-content: space-between; font-size: 11px; margin-top: 6px; }
.results { min-width: 0; }
.rhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.rtitle { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rtitle h1 { font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1; margin: 0; }
.rctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#rlist { transition: opacity .15s; }
#rlist.stale { opacity: .45; }
.empty { padding: 60px 0; text-align: center; }
.empty h2 { font-family: var(--serif); font-weight: 400; font-size: 34px; margin: 0 0 8px; }
.list { display: flex; flex-direction: column; }
.lrow { display: grid; grid-template-columns: 112px minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(0, 1fr) 96px 70px 50px 52px;
  gap: 14px; align-items: center; padding: 8px 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
.lrow:not(.head):hover { background: var(--panel); color: var(--text); }
.lrow.head { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding-top: 0; }
.lrow .thumb.mini { border-radius: 6px; }
.lrow .thumb.mini .badge { display: none; }
.lrow .thumb.mini .len { font-size: 10px; right: 4px; bottom: 4px; }
.lt { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc { color: var(--soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- scene ---------- */
.player { margin-top: 8px; border-radius: 16px; overflow: hidden; background: #000; }
.player .hero { width: 100%; max-height: 76vh; aspect-ratio: 16 / 9; object-fit: contain; background: #000; display: block; }
.scene-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; margin-top: 28px; }
.scene-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.scene-main h1 { font-size: clamp(36px, 4vw, 56px); }
.meta-line { color: var(--soft); display: flex; flex-wrap: wrap; align-items: baseline; }
.meta-line a { text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.dot { color: var(--faint); margin: 0 8px; }
.people-row { display: flex; flex-wrap: wrap; gap: 10px; }
.person-chip { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 4px; border-radius: 22px;
  background: var(--panel); border: 1px solid var(--line); font-size: 14px; }
.person-chip:hover { border-color: var(--faint); color: var(--text); }
.av { width: 36px; height: 36px; border-radius: 18px; overflow: hidden; background: var(--raise); display: grid; place-items: center;
  color: var(--dim); font-family: var(--serif); font-size: 18px; flex-shrink: 0; }
.av img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.desc { margin: 0; color: var(--soft); font-size: 16px; line-height: 1.65; max-width: 72ch; white-space: pre-line; }
.chapters { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 18px; }
.chapters li { display: flex; gap: 10px; color: var(--soft); }
.scene-side { display: flex; flex-direction: column; gap: 14px; }
.copies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.copies li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.copies li > a:first-child { display: flex; flex-direction: column; min-width: 0; }
.copies li.me b { color: var(--accent); }
.copies .icon { width: 30px; height: 30px; }
.record summary { cursor: pointer; color: var(--dim); font-size: 13px; padding: 6px 0; }
.record table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 8px; table-layout: fixed; }
.record th { text-align: left; font-weight: 400; color: var(--faint); width: 90px; vertical-align: top; padding: 4px 8px 4px 0; }
.record td { padding: 4px 0; overflow-wrap: anywhere; color: var(--soft); vertical-align: top; }
.record td a { color: var(--dim); }
.record code { font-size: 11px; color: var(--dim); }

/* ---------- people ---------- */
.phead { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 24px 0 10px; }
.phead h1 { font-size: 52px; margin-right: 12px; }
.ptiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 26px 16px; margin-top: 20px; }
.ptile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ptile:hover .portrait { outline: 2px solid var(--accent); }
.portrait { aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: var(--raise); display: grid; place-items: center; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.initial { font-family: var(--serif); font-size: 64px; color: var(--faint); }
.person-head { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: 44px; margin-top: 24px; }
.portrait.big { border-radius: 16px; }
.person-copy { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.person-copy h1 { font-size: clamp(44px, 5vw, 72px); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 24px; margin: 18px 0 0; }
.facts dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 2px 0 0; color: var(--soft); overflow-wrap: anywhere; }
.bios { margin-top: 48px; display: flex; flex-direction: column; gap: 16px; max-width: 900px; }
.bio { padding: 18px 20px; border-radius: 12px; background: var(--panel); }
.bio header { display: flex; gap: 12px; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
.bio p { margin: 0; color: var(--soft); line-height: 1.65; white-space: pre-line; }
.side-by-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px; margin-top: 44px; }
.side-by-side .eyebrow { margin-bottom: 12px; }
.person-scenes { margin-top: 48px; }

/* ---------- studios ---------- */
.network { margin-top: 40px; }
.studio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.studio { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 12px; border-radius: 8px; background: var(--panel); font-size: 14px; }
.studio > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.studio .fbar { grid-column: 1 / -1; }
.studio:hover { background: var(--raise); color: var(--text); }
.studio:hover .fbar i { background: var(--accent); }

/* ---------- palette ---------- */
.pal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(10, 9, 8, .66); backdrop-filter: blur(3px);
  display: flex; justify-content: center; align-items: flex-start; padding: 11vh 16px 16px; }
.pal { width: min(820px, 100%); max-height: 76vh; display: flex; flex-direction: column; border-radius: 14px; background: var(--panel);
  border: 1px solid var(--line2); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); overflow: hidden; }
.pal-in { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--soft); }
.pal-in input { flex: 1; height: 100%; border: 0; outline: 0; background: none; font-size: 18px; color: var(--text); }
.pal-body { display: grid; grid-template-columns: minmax(0, 1fr) 270px; min-height: 0; flex: 1; }
.pal-list { padding: 8px; overflow-y: auto; border-right: 1px solid var(--line); min-height: 260px; }
.pal-list .eyebrow { padding: 10px 10px 4px; }
.pal-item { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 4px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.pal-item:hover { background: var(--raise); }
.pal-item.on { background: var(--raise); box-shadow: inset 2px 0 0 var(--accent); }
.pal-item b { color: var(--accent); font-weight: 500; }
.pal-item .sw { width: 30px; height: 30px; border-radius: 5px; overflow: hidden; background: var(--raise); flex-shrink: 0; }
.pal-item .sw.round { border-radius: 15px; }
.pal-item .sw img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pal-empty { padding: 18px 12px; }
.pal-help { padding: 16px; display: flex; flex-direction: column; gap: 4px; background: var(--panel2); overflow-y: auto; }
.pal-help .eyebrow { margin-bottom: 6px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 4px 6px; margin: 0 -6px; border: 0; border-radius: 6px;
  background: none; text-align: left; font-size: 12px; }
.kv:hover { background: var(--raise); }
.kv .mono { color: var(--text); }
.kv .dim { text-align: right; }
.pal-foot { display: flex; gap: 18px; align-items: center; height: 40px; padding: 0 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }

/* ---------- small screens ---------- */
@media (max-width: 1000px) {
  .sgrid, .scene-grid, .person-head { grid-template-columns: 1fr; }
  .rail { position: static; max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
  .person-head .portrait.big { max-width: 260px; }
  .pal-body { grid-template-columns: 1fr; }
  .pal-help { display: none; }
  .lrow { grid-template-columns: 96px minmax(0, 1fr) 90px; }
  .lrow > :nth-child(n+4):not(:nth-child(5)) { display: none; }
}
@media (max-width: 720px) {
  .top { gap: 16px; }
  .top nav { display: none; }
  .searchbox { width: auto; flex: 1; }
  .track { grid-auto-columns: 72%; }
  .foot { flex-direction: column; }
}
