/* Stevion: Inter, gold and navy. Light: warm surfaces, navy text and buttons, gold accents. Dark: navy surfaces,
cream text, light-gold buttons. "Auto" follows the system; [data-theme] on <html> is the saved choice (static/theme.js). */
:root{
  --bg:#F7F5F0; --surface:#FFFFFF; --fg:#14213D; --muted:#5B6275; --line:#E6E1D6; --field:#8A8475;
  --accent:#1F3A73; --accent-ink:#14213D; --on-accent:#FFFFFF; --accent-soft:#F5EEDC; --accent-line:#E2CF9E; --player:#14213D; --gold:#B8892E;
  --live:#A32D2D; --ok:#0F6E56; --ok-soft:#E1F5EE; --warn:#7A4E00; --warn-soft:#FFF1D6; --bad:#A32D2D; --bad-soft:#FCEBEB;
  --mark-top:#B8892E; --mark-bottom:#14213D; --shadow:0 8px 24px rgba(20,33,61,.12);
  --font:"Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --mono:ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme:light;
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){
  --bg:#0B1324; --surface:#14213D; --fg:#F4F1E8; --muted:#B4BAC8; --line:#26365C; --field:#6A7BA6;
  --accent:#D9B25E; --accent-ink:#E9CC8A; --on-accent:#14213D; --accent-soft:#2A2A2E; --accent-line:#6B5A33; --player:#070D1A; --gold:#D9B25E;
  --live:#E5484D; --ok:#5BD1A2; --ok-soft:#11332B; --warn:#F2C661; --warn-soft:#3A2E12; --bad:#FF8A8A; --bad-soft:#3D1D24;
  --mark-top:#D9B25E; --mark-bottom:#F4F1E8; --shadow:0 8px 24px rgba(0,0,0,.45); color-scheme:dark;
}}
:root[data-theme="dark"]{
  --bg:#0B1324; --surface:#14213D; --fg:#F4F1E8; --muted:#B4BAC8; --line:#26365C; --field:#6A7BA6;
  --accent:#D9B25E; --accent-ink:#E9CC8A; --on-accent:#14213D; --accent-soft:#2A2A2E; --accent-line:#6B5A33; --player:#070D1A; --gold:#D9B25E;
  --live:#E5484D; --ok:#5BD1A2; --ok-soft:#11332B; --warn:#F2C661; --warn-soft:#3A2E12; --bad:#FF8A8A; --bad-soft:#3D1D24;
  --mark-top:#D9B25E; --mark-bottom:#F4F1E8; --shadow:0 8px 24px rgba(0,0,0,.45); color-scheme:dark;
}
*{box-sizing:border-box}
[hidden]{display:none !important}
body{margin:0; background:var(--bg); color:var(--fg); font:15px/1.55 var(--font)}
a{color:var(--accent)} a:hover{color:var(--accent-ink)}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px}
h1,h2,h3{margin:0; line-height:1.2; text-wrap:balance} h1{font-size:26px; font-weight:600} h2{font-size:17px; font-weight:600} h3{font-size:15px; font-weight:600}
p{margin:0}
code,.mono{font-family:var(--mono); font-size:13px}
.top{background:var(--surface); border-bottom:1px solid var(--line)}
.top .in{max-width:1280px; margin:0 auto; padding-block:12px; padding-left:max(16px,env(safe-area-inset-left,0px)); padding-right:max(16px,env(safe-area-inset-right,0px)); display:flex; flex-wrap:wrap; align-items:center; gap:20px}
.brand{display:flex; align-items:center; gap:10px; font-weight:600; color:var(--fg); text-decoration:none}
.mark{width:28px; height:28px; display:flex; align-items:center; justify-content:center}
.role{font-size:12px; color:var(--accent-ink); background:var(--accent-soft); padding:3px 8px; border-radius:6px}
.top nav{display:flex; gap:18px; font-size:14px} .top nav a{color:var(--muted); text-decoration:none} .top nav a.on{color:var(--fg); font-weight:500}
.top .right{margin-left:auto; display:flex; gap:10px; align-items:center}
main.page{max-width:1280px; margin:0 auto; padding-block:28px 56px; padding-left:max(16px,env(safe-area-inset-left,0px)); padding-right:max(16px,env(safe-area-inset-right,0px)); display:flex; flex-direction:column; gap:20px}
.sub{color:var(--muted)}
.row{display:flex; flex-wrap:wrap; gap:20px; align-items:flex-start}
.main-col{flex:999 1 600px; min-width:0; display:flex; flex-direction:column; gap:16px}
.side-col{flex:1 1 300px; min-width:0; display:flex; flex-direction:column; gap:16px}
.card{background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:18px 20px; display:flex; flex-direction:column; gap:12px; min-width:0}
.step-h{display:flex; align-items:center; gap:12px}
.num{width:28px; height:28px; border-radius:50%; background:var(--accent); color:var(--on-accent); font-size:13px; font-weight:600; display:flex; align-items:center; justify-content:center; flex:none}
.grid2{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px}
.metrics{display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px}
.metric .label{font-size:13px; color:var(--muted)} .metric .value{font-size:28px; font-weight:600; font-variant-numeric:tabular-nums} .metric .hint{font-size:12px; color:var(--muted)}
.metric.feature{background:var(--accent-soft); border-color:var(--accent-line)} .metric.feature .label,.metric.feature .hint{color:var(--accent-ink)}
label.f{display:flex; flex-direction:column; gap:6px; font-size:13px; color:var(--muted)}
input[type=text],input[type=password],input[type=url],select,textarea{font:inherit; font-size:14px; padding:10px 12px; min-height:44px; border-radius:8px; border:1px solid var(--field); background:var(--surface); color:var(--fg); min-width:0; width:100%}
.inline{display:flex; gap:8px; align-items:stretch} .inline > input{flex:1 1 180px}
.btn{font:inherit; font-size:14px; font-weight:500; padding:0 16px; min-height:44px; border-radius:8px; border:1px solid var(--field); background:var(--surface); color:var(--fg); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; white-space:nowrap}
.btn:hover{background:var(--bg)} .btn.primary{background:var(--accent); border-color:var(--accent); color:var(--on-accent)} .btn.primary:hover{background:var(--accent-ink)}
.btn.danger{color:var(--bad); border-color:var(--bad)}
.tip{background:var(--accent-soft); color:var(--accent-ink); border-radius:10px; padding:12px 14px; font-size:14px}
.pill{display:inline-flex; align-items:center; font-size:12px; font-weight:500; padding:3px 9px; border-radius:999px; background:var(--accent-soft); color:var(--accent-ink)}
.pill.ok{background:var(--ok-soft); color:var(--ok)} .pill.warn{background:var(--warn-soft); color:var(--warn)} .pill.bad{background:var(--bad-soft); color:var(--bad)} .pill.plain{background:var(--bg); color:var(--muted); border:1px solid var(--line)}
.chips{display:flex; flex-wrap:wrap; gap:8px}
fieldset.langs{border:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px}
fieldset.langs legend{padding:0; margin-bottom:6px}
fieldset.langs .chip{padding:6px 12px; cursor:pointer}
.chip{display:inline-flex; align-items:center; gap:6px; font-size:13px; padding:4px 6px 4px 12px; border-radius:999px; background:var(--bg); border:1px solid var(--line)}
.chip button{flex:none; border:none; background:none; color:var(--muted); cursor:pointer; font-size:16px; width:28px; height:28px; border-radius:50%}
.scroll{overflow-x:auto}
table{width:100%; border-collapse:collapse; font-size:14px; font-variant-numeric:tabular-nums}
th{text-align:left; font-weight:500; font-size:13px; color:var(--muted); padding:8px 10px; border-bottom:1px solid var(--line)}
td{padding:10px; border-bottom:1px solid var(--bg); vertical-align:top}
.player{position:relative; aspect-ratio:16/9; max-width:100%; background:var(--player); border-radius:12px; overflow:hidden}
.player video{width:100%; height:100%; display:block; background:var(--player)}
.overlay{position:absolute; inset:0; display:flex; flex-direction:column; gap:8px; align-items:center; justify-content:center; color:#F4F1E8; text-align:center; padding:16px; background:var(--player)}
/* Captions are the stream's own subtitle tracks, drawn by the browser (fullscreen and phones too). */
video::cue{background:rgba(0,0,0,.74); color:#fff; line-height:1.35; font-family:"Inter", system-ui, -apple-system, "Segoe UI", sans-serif}
.badges{position:absolute; top:12px; left:12px; display:flex; gap:8px}
.badge{font-size:12px; font-weight:600; padding:4px 10px; border-radius:6px; background:rgba(255,255,255,.16); color:#F4F1E8}
.badge.live{background:var(--live); color:#fff}
.seg{display:inline-flex; flex-wrap:wrap; max-width:100%; background:var(--bg); border-radius:10px; padding:4px; gap:4px}
.seg button{font:inherit; font-size:14px; white-space:nowrap; padding:8px 16px; min-height:40px; border-radius:8px; border:none; background:transparent; color:var(--muted); cursor:pointer}
.seg button[aria-pressed=true]{background:var(--surface); color:var(--accent-ink); font-weight:500; box-shadow:0 0 0 1px var(--accent-line)}
.notice{display:flex; gap:10px; align-items:center; background:var(--warn-soft); color:var(--warn); border-radius:10px; padding:10px 14px; font-size:14px}
.avatar{width:44px; height:44px; border-radius:50%; background:var(--accent-soft); color:var(--accent-ink); display:flex; align-items:center; justify-content:center; font-weight:600; flex:none}
.sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
.err{color:var(--bad); font-size:13px}
.empty{color:var(--muted); font-size:14px; padding:12px 0}
@media (max-width:800px){ .metrics{grid-template-columns:repeat(2,minmax(0,1fr))} .grid2{grid-template-columns:minmax(0,1fr)} }
/* Go live from this browser (studio setup, templates/golive.html) */
.choice{display:flex; flex-wrap:wrap; gap:8px; border:none; margin:0; padding:0; min-width:0}
.choice label{display:flex; align-items:center; gap:8px; min-height:44px; padding:0 14px; border:1px solid var(--field); border-radius:8px; font-size:14px; cursor:pointer}
.choice label:has(input:checked){border-color:var(--accent-line); background:var(--accent-soft); color:var(--accent-ink); font-weight:500}
.choice input,.check input{accent-color:var(--accent); margin:0}
.choice:disabled label{cursor:default; opacity:.7}
.check{display:flex; gap:8px; align-items:flex-start; font-size:13px; color:var(--muted)} .check input{margin-top:3px; flex:none}
.golive-preview{position:relative; aspect-ratio:16/9; background:var(--player); border-radius:10px; overflow:hidden; display:flex; align-items:center; justify-content:center}
.golive-preview video{width:100%; height:100%; object-fit:contain; display:block}
.golive-empty{position:absolute; color:#C9CEDA; font-size:14px}
.golive-badge{position:absolute; top:10px; left:10px}
.golive-meter{height:6px; background:var(--bg); border-radius:999px; overflow:hidden} .golive-meter span{display:block; height:100%; width:0; background:var(--ok); transition:width .08s linear}
.golive .btn:disabled{opacity:.45; cursor:default} .golive .btn.primary:disabled:hover{background:var(--accent)}
.golive .notice{display:block; line-height:1.5}

/* Accounts, channels, browse, chat (added November 18, 2026) */
.mark .mt{stroke:var(--mark-top)} .mark .mb{stroke:var(--mark-bottom)}
.brand .word{font-family:"Sora", var(--font); font-weight:600; letter-spacing:.01em}
.icon-btn{width:40px; height:40px; border-radius:50%; border:1px solid var(--line); background:var(--surface); color:var(--fg); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; padding:0}
.icon-btn svg{width:18px; height:18px; display:none}
.icon-btn[data-mode=auto] .ic-auto,.icon-btn[data-mode=light] .ic-light,.icon-btn[data-mode=dark] .ic-dark,.icon-btn:not([data-mode]) .ic-auto{display:block}
.menu{position:relative} .menu summary{list-style:none; cursor:pointer; border-radius:50%} .menu summary::-webkit-details-marker{display:none}
.menu-pop{position:absolute; right:0; top:calc(100% + 8px); z-index:20; min-width:220px; background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow); padding:8px; display:flex; flex-direction:column}
.menu-pop a,.menu-pop button{font:inherit; font-size:14px; text-align:left; padding:10px 12px; border-radius:8px; color:var(--fg); text-decoration:none; background:none; border:none; cursor:pointer; width:100%}
.menu-pop a:hover,.menu-pop button:hover{background:var(--bg)}
.menu-who{display:flex; flex-direction:column; padding:6px 12px 10px; border-bottom:1px solid var(--line); margin-bottom:6px; font-size:14px}
img.avatar{object-fit:cover; background:var(--accent-soft)}
.banner{display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; justify-content:center; padding:10px 16px; background:var(--warn-soft); color:var(--warn); font-size:14px; text-align:center}
.banner a,.linkish{color:inherit; font:inherit; font-weight:600; background:none; border:none; padding:0; cursor:pointer; text-decoration:underline}
.banner form{display:inline}
.auth-card{max-width:440px; width:100%; margin:0 auto}
.stack{display:flex; flex-direction:column; gap:12px} .stack.tight{gap:6px}
.row-c{display:flex; flex-wrap:wrap; gap:16px; align-items:center}
.hint{font-size:12px; color:var(--muted); font-weight:400}
.small{font-size:13px}
.or{display:flex; align-items:center; gap:10px; color:var(--muted); font-size:13px} .or::before,.or::after{content:""; flex:1; height:1px; background:var(--line)}
.btn.google{background:var(--surface); color:var(--fg)}
input[type=email],input[type=search],input[type=number],input[type=file]{font:inherit; font-size:14px; padding:10px 12px; min-height:44px; border-radius:8px; border:1px solid var(--field); background:var(--surface); color:var(--fg); min-width:0; width:100%}
textarea{resize:vertical}
::placeholder{color:var(--muted); opacity:.85}
.tabs{display:flex; gap:6px; flex-wrap:wrap; border-bottom:1px solid var(--line)}
.tabs a{padding:10px 14px; color:var(--muted); text-decoration:none; font-size:14px; border-bottom:2px solid transparent; margin-bottom:-1px}
.tabs a.on{color:var(--fg); font-weight:500; border-bottom-color:var(--gold)}
.notice.ok-notice{background:var(--ok-soft); color:var(--ok)} .notice.bad-notice{background:var(--bad-soft); color:var(--bad)}
.banner-preview{aspect-ratio:5/1; border-radius:10px; background:linear-gradient(120deg, var(--accent-soft), var(--bg)); overflow:hidden}
.banner-preview img{width:100%; height:100%; object-fit:cover; display:block}
.ch-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:16px}
.ch-card{display:flex; flex-direction:column; gap:10px; color:var(--fg); text-decoration:none; min-width:0}
.ch-thumb{position:relative; aspect-ratio:16/9; border-radius:10px; overflow:hidden; background:linear-gradient(135deg, var(--player), var(--accent-line))}
.ch-thumb img{width:100%; height:100%; object-fit:cover; display:block} .ch-thumb .badge{position:absolute; top:8px; left:8px}
.ch-meta{display:flex; gap:10px; align-items:flex-start; min-width:0} .ch-text{display:flex; flex-direction:column; min-width:0; font-size:14px}
.ch-text strong,.ch-text .sub{overflow:hidden; text-overflow:ellipsis; white-space:nowrap} .ch-text .sub{font-size:13px}
.ch-card:hover strong{color:var(--accent)}
video::cue{background:rgba(0,0,0,.74); color:#fff}
@media (max-width:560px){ .hide-sm{display:none} .top .in{gap:12px} .top nav{gap:14px} }
.filters{display:flex; flex-wrap:wrap; gap:8px} .filters input[type=search]{flex:3 1 220px; width:auto} .filters select{flex:1 1 150px; width:auto}
.bio{white-space:pre-line; max-width:70ch}
.bell{position:relative; text-decoration:none} .bell svg{display:block}
.bell .count{position:absolute; top:-4px; right:-4px; min-width:18px; height:18px; padding:0 4px; border-radius:9px; background:var(--live); color:#fff; font-size:11px; font-weight:600; display:flex; align-items:center; justify-content:center}
.bell-form select{width:auto; min-height:44px}
.notes{list-style:none; margin:0; padding:0 20px} .notes li{display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; padding:12px 0; border-bottom:1px solid var(--line)} .notes li:last-child{border-bottom:none}
.notes li.unread a{font-weight:600} .notes li.unread::before{content:""; width:8px; height:8px; border-radius:50%; background:var(--gold); align-self:center}
.chat{position:sticky; top:16px; max-height:calc(100vh - 32px)} .chat form{flex-wrap:nowrap}
.chat-list{list-style:none; margin:0; padding:0; overflow-y:auto; flex:1 1 auto; min-height:220px; max-height:60vh; display:flex; flex-direction:column; gap:6px; font-size:14px; overflow-wrap:anywhere}
.msg{line-height:1.45} .msg .who{font-weight:600; text-decoration:none; color:var(--accent)} .msg .who.owner::after{content:" · creator"; font-weight:400; color:var(--muted); font-size:12px}
.msg .tr{margin-left:6px; font-size:12px; color:var(--muted)} .msg.held{opacity:.6} .msg .tools{display:inline-flex; gap:8px; margin-left:8px; font-size:12px; color:var(--muted)}
.bans{list-style:none; margin:0; padding:0; font-size:13px}
@media (max-width:950px){ .chat{position:static; max-height:none} }
.link-chip{padding:6px 12px; text-decoration:none; color:var(--fg)}
.past{list-style:none; margin:0; padding:0; display:flex; flex-direction:column} .past li{display:flex; flex-wrap:wrap; gap:4px 12px; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--line); font-size:14px}
.engage{display:flex; flex-wrap:wrap; gap:10px; align-items:center} .btn.on{border-color:var(--live); color:var(--live)}
.reacts{display:flex; gap:4px; flex-wrap:wrap} .react{font-size:20px; width:44px; height:44px; border-radius:50%; border:1px solid var(--line); background:var(--surface); cursor:pointer}
.react:hover{background:var(--bg)}
.bursts{position:absolute; inset:0; pointer-events:none; overflow:hidden; z-index:2}
.burst{position:absolute; bottom:8%; font-size:28px; animation:rise 2.4s ease-out forwards; opacity:0}
@keyframes rise{0%{transform:translateY(0) scale(.6); opacity:0} 15%{opacity:1} 100%{transform:translateY(-220px) scale(1.2); opacity:0}}
@media (prefers-reduced-motion: reduce){ .burst{animation-duration:.01s} }
.comments{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px} .replies{margin:10px 0 0 36px}
.comment .c-head{display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:14px} .comment .c-head a{color:var(--fg); text-decoration:none}
.c-body{margin:4px 0 0 36px; white-space:pre-line; overflow-wrap:anywhere; font-size:14px}
.c-actions{display:flex; flex-wrap:wrap; gap:6px 14px; align-items:flex-start; margin:4px 0 0 36px; font-size:13px; color:var(--muted)}
.c-actions form{display:inline} .c-actions details{min-width:0} .c-actions summary{cursor:pointer} .c-actions details[open]{flex-basis:100%}
.c-actions .linkish{text-decoration:none; color:var(--muted)} .c-actions .linkish.on{color:var(--live)}
.comment.hidden-c{opacity:.65} .comment.pinned{background:var(--accent-soft); border-radius:10px; padding:8px}

/* Channel page: player and languages, then chat beside them (desktop) or right under them (phones), then the rest.
   Phone layout pass, November 19, 2026. */
.watch{display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,360px); grid-template-rows:auto 1fr;
  grid-template-areas:"top chat" "rest chat"; gap:20px; align-items:start}
.watch-top,.watch-rest{display:flex; flex-direction:column; gap:16px; min-width:0}
.watch-top{grid-area:top} .watch-rest{grid-area:rest} .watch > .chat{grid-area:chat}
.show-sm{display:none}
@media (max-width:950px){
  .watch{grid-template-columns:minmax(0,1fr); grid-template-rows:auto; grid-template-areas:"top" "chat" "rest"}
  .watch .chat-list{max-height:45vh}
}
/* Phones: logo and buttons on the first header row, the page's links on their own row (one link only: hidden,
   the logo already goes home). */
@media (max-width:560px){
  .show-sm{display:inline}
  .top .in{row-gap:10px}
  .top nav{order:3; flex-basis:100%; flex-wrap:wrap; row-gap:6px}
  .top nav:has(> a:only-child){display:none}
  .top nav a{white-space:nowrap}
  h1{font-size:23px}
}
/* Touch screens: small text buttons get a finger-sized hit area. */
@media (pointer:coarse){
  .c-actions{margin-top:0}
  .c-actions .linkish,.c-actions summary{padding-block:9px}
  details:not(.menu) > summary{padding-block:9px}
  .msg .linkish.tr,.msg .tools .linkish{padding:9px 5px; margin-block:-9px}
  .c-actions .linkish{padding-inline:5px}
  .chip button{width:36px; height:36px}
}
input[type=file]::file-selector-button{font:inherit; font-size:13px; font-weight:500; margin-right:10px; padding:6px 12px; border-radius:6px; border:1px solid var(--field); background:var(--bg); color:var(--fg); cursor:pointer}
