:root {
  color-scheme: dark;
  --bg: #14131a;
  --surface: #1e1c26;
  --inset: #17161e;
  --line: #37333e;
  --ink: #f7f2ed;
  --muted: #c1b9c3;
  --dim: #aaa2b1;
  --peach: #ffad89;
  --peach-active: #ffc0a5;
  --radius: 17px;
  font: 16px/1.5 "Inter", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); margin: 0; min-height: 100svh; display: flex; flex-direction: column; }
button,input,textarea,select { font: inherit; color: inherit; }
a { color: inherit; }
button,a,input,textarea,select { -webkit-tap-highlight-color: transparent; }
button,a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--peach); outline-offset: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
.topbar { border-bottom: 1px solid var(--line); }
.header-inner, .shell, footer { width: min(1280px, 90%); margin-inline: auto; }
.header-inner { min-height: 78px; display: flex; align-items: center; gap: clamp(20px,4vw,60px); }
.wordmark { text-decoration: none; display: flex; align-items: center; font-size: 27px; font-weight: 750; letter-spacing: -.065em; line-height: 1; }
.wordmark img { margin-right: 9px; }
.wordmark span { border-left: 1px solid #5c545f; color: var(--dim); font-size: 14px; font-weight: 500; margin-left: 13px; padding-left: 13px; letter-spacing: .12em; }
nav { display: flex; gap: 27px; }
nav a,footer a,.quiet,.return { font-size: .89rem; text-decoration: none; }
nav a { padding-block: 10px; color: var(--dim); }
nav a[aria-current] { color: var(--ink); font-weight: 650; }
a:hover, .quiet:hover { color: var(--peach); }
.account,.inline-actions,.section-heading,.dialog-head,.transport-row,.transport-right,.input-row { display: flex; align-items: center; gap: 10px; }
.account { margin-left: auto; font-size: .83rem; }
#identity { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 18ch; }
.shell { flex-grow: 1; margin-block: clamp(22px,3.6vw,52px) clamp(40px,8vw,96px); }
.hero { position: relative; isolation: isolate; min-height: clamp(345px,35vw,470px); overflow: hidden; display: flex; align-items: flex-end; background: #43313e; border-radius: 22px; border: 1px solid #5d4650; }
.hero-art, .hero::after { position: absolute; inset: 0; z-index: -1; }
.hero-art { background: url("/art/dusk-express.webp") 76% center / cover; }
.hero::after { content:""; background: linear-gradient(90deg,rgba(21,17,28,.96),rgba(24,18,28,.8) 29%,rgba(31,24,35,.32) 52%,transparent 78%), linear-gradient(0deg,rgba(21,17,28,.65),transparent 63%); }
.hero-content { padding: clamp(28px,4.9vw,74px); width: min(590px,86%); }
.eyebrow { font-size: .67rem; font-weight: 750; line-height: 1.4; letter-spacing: .15em; text-transform: uppercase; color: var(--dim); margin: 0 0 10px; }
.hero .eyebrow,.room-head .eyebrow { color: var(--peach); }
.live-dot { display: inline-block; margin-right: .5rem; width: 7px; height: 7px; border-radius: 100%; background: currentColor; vertical-align: .12em; }
h1,h2,h3,p { overflow-wrap: anywhere; }
h1,h2,h3 { margin: 0; line-height: 1.08; letter-spacing: -.04em; }
.hero h1 { font-size: clamp(52px,6.9vw,102px); letter-spacing: -.075em; }
.hero h1 span { color: var(--peach); }
.hero-description { font-size: clamp(16px,1.3vw,19px); line-height: 1.55; margin: 16px 0 26px; max-width: 38ch; color: #eee6e7; }
.action,.control,.quiet,.close,.tabs button,.room-link,.score-choice { border: none; }
.action { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-radius: 10px; padding: 12px 19px; text-decoration: none; font-size: .88rem; font-weight: 700; min-height: 44px; }
.primary { background: var(--peach); color: #24181c; }
.primary:hover { background: var(--peach-active); color: #24181c; }
.secondary,.control { background: #332f3a; color: var(--ink); }
.secondary:hover,.control:hover { background: #48414c; color: #fff; }
.compact { min-height: 36px; font-size: .8rem; padding: 8px 13px; }
.quiet,.close { background: transparent; color: var(--muted); padding: 8px 6px; }
.small { font-size: .8rem; }
.lobby-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px,2vw,26px); margin-top: 22px; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px,2.4vw,34px); }
.sheet h2,dialog h2 { font-size: clamp(22px,2vw,30px); }
.entry-card form { margin-top: 17px; }
.entry-card h2 { margin-bottom: 14px; }
.muted,.minor { color: var(--muted); }
.minor { font-size: .8rem; }
.section-heading,.dialog-head,.transport-row { justify-content: space-between; }
.room-link { display: flex; justify-content: space-between; gap: 14px; padding-block: 11px; border-top: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.room-link small { color: var(--dim); font-weight: 400; }
label { display: block; font-size: .78rem; font-weight: 600; margin-block: 12px 6px; color: var(--muted); }
input:not([type="range"]), textarea,select { width: 100%; border-radius: 9px; border: 1px solid #514a57; background: var(--inset); padding: 10px 12px; min-height: 42px; font-size: .9rem; }
input::placeholder,textarea::placeholder { color: #a098a6; }
.input-row input,.chat-form input,.panel-tools input { min-width: 0; }
.input-row button,.chat-form button { flex-shrink: 0; }
.notice,.error { color: #ffd2b8; }
.notice { padding: 12px 16px; border: 1px solid #64483d; border-radius: 10px; background: #332924; margin: 0 0 14px; }
.error,.sync-status { font-size: .83rem; }
.room-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 21px; }
.return { display: inline-block; margin-bottom: 18px; color: var(--dim); }
.room-head h1 { font-size: clamp(30px,3.9vw,56px); }
.room-head .muted { margin: 6px 0 0; }
.room-layout { display: grid; gap: 20px; grid-template-columns: minmax(0,1fr) minmax(295px,32%); align-items: start; }
.screen-column,.companion { min-width: 0; }
.screen-column > * + * { margin-top: 16px; }
.screen { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
#video-stage { position: relative; background: #08080a; display: grid; place-items: center; aspect-ratio: 16/9; }
#video-stage:fullscreen { width: 100vw; height: 100vh; }
video { display: block; width: 100%; height: 100%; min-height: 0; min-width: 0; object-fit: contain; grid-area: 1 / 1; }
#activate-video { position: absolute; }
#captions { position: absolute; bottom: 5%; left: 5%; width: 90%; color: white; font-size: clamp(17px,2vw,34px); font-weight: 650; text-align: center; white-space: pre-line; line-height: 1.36; text-shadow: 0 0 5px #000, 1px 2px 2px #000, -1px -1px 2px #000; pointer-events: none; }
.transport { padding: 12px clamp(12px,1.7vw,22px) 16px; }
.timeline { font-size: .74rem; font-variant-numeric: tabular-nums; display: flex; gap: 10px; align-items: center; margin-block: 2px 11px; color: var(--dim); }
.timeline input { width: 100%; accent-color: var(--peach); }
.timeline input:disabled { opacity: .75; }
.transport-row { justify-content: start; flex-wrap: wrap; }
.transport-right { margin-left: auto; gap: 5px; }
.control { min-height: 33px; padding: 5px 9px; border-radius: 7px; font-size: .77rem; font-weight: 650; }
.control[aria-pressed="true"] { color: var(--peach); box-shadow: inset 0 0 0 1px #aa7966; }
.sync-status { color: var(--muted); }
.companion { padding: 0; overflow: hidden; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); padding: 0 13px; }
.tabs button { border-bottom: 2px solid transparent; background: none; color: var(--dim); font-weight: 650; padding: 15px 5px 13px; }
.tabs button[aria-selected="true"] { border-color: var(--peach); color: var(--peach); }
.panel-tools,.chat-form { padding: 13px; display: flex; align-items: center; gap: 7px; }
.lines,.messages { height: clamp(215px,29vw,445px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #55505b transparent; overscroll-behavior-y: contain; }
.lines { padding: 0 6px 7px; }
.line { display: grid; grid-template-columns: auto 1fr; text-align: left; gap: 10px; width: 100%; padding: 9px 10px; background: transparent; border: 1px solid transparent; border-radius: 7px; font-size: .94rem; }
.line:hover,.line.current { background: #2b2833; }
.line.selected { background: #342c32; border-color: #ac7f6d; }
.line time { color: var(--dim); font-size: .7rem; font-variant-numeric: tabular-nums; padding-top: 4px; }
.line.current time { color: var(--peach); }
.line span { white-space: pre-line; }
.mining { padding: 14px; border-top: 1px solid var(--line); background: #29252e; }
#line-text,.quote { margin: 6px 0 12px; white-space: pre-line; }
#study-hint,.empty { margin: 0; padding: 13px; color: var(--dim); font-size: .83rem; }
#study-hint { border-top: 1px solid var(--line); }
.messages { padding: 10px 16px; }
.chat-msg { margin: 9px 0 14px; overflow-wrap: anywhere; }
.chat-msg strong { color: var(--peach); font-size: .8rem; }
.chat-msg p { margin: 2px 0; white-space: pre-wrap; }
.chat-form { border-top: 1px solid var(--line); }
.people { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.person,.count,.vote { border: 1px solid var(--line); border-radius: 20px; padding: 5px 10px; font-size: .8rem; }
.person i { display: inline-block; width: 6px; height: 6px; border-radius: 100%; background: #98d9ab; margin-right: 7px; vertical-align: .12em; }
.person.away i { background: #8c8793; }
.person.lag i { background: var(--peach); }
.count { color: var(--muted); }
.audience #finish { margin-top: 12px; }
.ratings { display: flex; flex-wrap: wrap; gap: 6px; }
.score-choice { color: var(--ink); background: #322e38; min-width: 35px; min-height: 37px; border-radius: 8px; font-weight: 600; }
.score-choice:hover,.score-choice[aria-pressed="true"] { background: var(--peach); color: #251b20; }
.score-list { list-style: none; padding: 0; margin: 12px 0 0; }
.score-list li { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid var(--line); }
dialog { color: var(--ink); background: var(--surface); border: 1px solid #55505c; border-radius: var(--radius); width: min(450px,94vw); padding: 24px; box-shadow: 0 25px 90px #08070aa0; max-height: 90svh; }
dialog::backdrop { background: #09090cc9; }
.dialog-head { margin-bottom: 15px; }
.close { font-size: 25px; line-height: 1; }
dialog textarea { resize: vertical; }
.host-setting { padding: 4px 0; text-decoration: underline; text-underline-offset: .22em; font-size: .82rem; }
.discord-steps { padding-left: 1.3em; font-size: .9rem; }
.discord-steps li + li { margin-top: 12px; }
.discord-steps a { color: var(--peach); }
.redirect-box { display: flex; align-items: center; gap: 8px; margin-block: 8px; padding: 8px; border-radius: 8px; background: var(--inset); }
.redirect-box code { overflow-wrap: anywhere; font-size: .83rem; user-select: all; }
.redirect-box button { flex: none; }
.library { margin: 12px 0 16px; border-block: 1px solid var(--line); padding: 10px 0; }
.library summary { cursor: pointer; color: var(--peach); font-size: .87rem; font-weight: 650; }
.library[open] summary { margin-bottom: 10px; }
.library-list { display: grid; gap: 4px; }
#library-results { max-height: 170px; overflow-y: auto; }
#jobs { max-height: 180px; overflow-y: auto; }
#jobs:not(:empty) { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 5px; }
.library-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 0; font-size: .84rem; }
.library-row p { margin: 0; }
.library-row button { flex-shrink: 0; }
.job-state { display: block; color: var(--muted); font-size: .77rem; }
#library-status { margin: 8px 0; }
.quote { border-left: 2px solid var(--peach); padding-left: 11px; color: var(--muted); }
footer { margin-top: auto; border-top: 1px solid var(--line); min-height: 68px; padding-block: 16px; color: var(--dim); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
footer .inline-actions { gap: 20px; }
footer a { font-size: .8rem; }
@media(max-width:820px) {
  .room-layout { grid-template-columns: minmax(0,1fr); }
  .room-head { align-items: start; }
  .room-head>.inline-actions { flex-wrap: wrap; justify-content: flex-end; }
  .lines,.messages { height: 290px; }
  .hero::after { background: linear-gradient(90deg,#191420eb 2%,#211927ad 45%,transparent 88%),linear-gradient(0deg,#17131c8c,transparent 74%); }
}
@media(max-width:620px) {
  .header-inner,.shell,footer { width: 92%; }
  .header-inner { min-height: 61px; gap: 15px; }
  .wordmark { font-size: 22px; }.wordmark img { width: 25px; height: 25px; margin-right: 7px; }
  .wordmark span, nav a:first-child { display:none; } nav { gap: 0; } nav a { font-size:.78rem; }
  .account { gap: 4px; } #identity { max-width: 12ch; }
  .hero { min-height: 350px; border-radius: 16px; }
  .hero-content { width: 100%; padding: 22px; }
  .hero::after { background: linear-gradient(0deg,#17121cea 1%,#191420b3 54%,#2119270a); }
  .hero-description { max-width: 31ch; margin: 12px 0 19px; }
  .lobby-grid { grid-template-columns: 1fr; }
  .room-head { flex-wrap: wrap; }.room-head>.inline-actions { justify-content: start; }
  .sheet { border-radius: 13px; }
  footer { align-items: flex-start; } footer .inline-actions { flex-direction: column; align-items: flex-end; gap: 7px; }
}
