/* A distance-first room, not an enlarged desktop application. */
.cosmos-tv { --tv-gutter:clamp(24px,4.7vw,100px); background:#070b11; color:var(--cosmos-paper); min-height:100dvh; font-family:var(--cosmos-font); font-size:clamp(18px,1.3vw,26px); }
.cosmos-tv [hidden] { display:none!important; }
.cosmos-tv [data-tv-home] { height:100dvh; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; scrollbar-color:var(--cosmos-line-strong) transparent; }
.cosmos-tv h1,.cosmos-tv h2,.cosmos-tv strong { font-family:var(--cosmos-font); color:inherit; }
.cosmos-tv button,.cosmos-tv a { color:inherit; text-decoration:none; }
.cosmos-tv button { background:#17212d; border:1px solid #344152; border-radius:var(--cosmos-radius-control); min-height:60px; padding:14px 24px; display:inline-flex; align-items:center; justify-content:center; gap:14px; font:inherit; cursor:pointer; }
.cosmos-tv button:disabled { opacity:.5; cursor:not-allowed; }
.cosmos-tv [data-tv-focus]:focus-visible,.cosmos-tv .is-tv-focused:focus { outline:3px solid var(--cosmos-paper); outline-offset:5px; box-shadow:0 0 0 7px #142e43; }
.cosmos-tv [data-tv-focus] { scroll-margin:130px 24px 40px; }
.cosmos-tv-header { height:120px; display:flex; align-items:center; gap:32px; justify-content:space-between; padding:20px var(--tv-gutter); position:sticky; top:0; z-index:2; border-bottom:1px solid #ffffff12; background:#070b11f5; }
.cosmos-tv-header>a { display:flex; align-items:center; gap:20px; min-height:60px; font-size:24px; letter-spacing:.2em; }
.cosmos-tv-header .betra-logo { width:auto; }
.cosmos-tv-header nav { display:flex; gap:12px; }
.cosmos-tv-header button { background:transparent; border-color:transparent; }
.cosmos-tv-header>div { display:grid; gap:10px; justify-items:end; font-variant-numeric:tabular-nums; }
.cosmos-tv-header .connected-transport { font-size:14px; }
.cosmos-tv-header time { font-size:22px; }
.cosmos-tv-feedback { margin:0; padding:20px var(--tv-gutter); color:var(--cosmos-negative); background:var(--cosmos-panel); }
.cosmos-tv-feature { min-height:560px; height:min(58vh,700px); position:relative; display:flex; align-items:center; padding:64px var(--tv-gutter); isolation:isolate; }
.cosmos-tv-feature>img { position:absolute; inset:0 0 0 auto; width:80%; height:100%; object-fit:cover; z-index:-2; }
.cosmos-tv-feature::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,#070b11 5%,#070b11ed 28%,#070b1160 76%,#070b1160),linear-gradient(0deg,#070b11,transparent 35%); z-index:-1; }
.cosmos-tv-feature>div { width:min(920px,68%); }
.cosmos-tv .cosmos-label { color:var(--cosmos-warm); font-size:clamp(14px,1vw,20px); letter-spacing:.18em; }
.cosmos-tv-feature h1 { font-size:clamp(40px,4vw,84px); line-height:1.06; letter-spacing:-.045em; margin:24px 0; text-wrap:balance; }
.cosmos-tv-feature p:not(.cosmos-label) { color:var(--cosmos-soft); line-height:1.6; max-width:720px; overflow:hidden; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; }
.cosmos-tv-feature-meta { color:var(--cosmos-soft); margin:22px 0; }
.cosmos-tv-feature button { color:#111a24; background:var(--cosmos-paper); border-color:transparent; }
.cosmos-tv-feature a { display:inline-flex; min-height:60px; align-items:center; gap:12px; margin-left:30px; }
.cosmos-tv-shelf { padding:24px 0 26px var(--tv-gutter); }
.cosmos-tv-shelf header { display:flex; align-items:baseline; gap:24px; margin-bottom:20px; }
.cosmos-tv h2 { font-size:clamp(26px,2vw,40px); letter-spacing:-.025em; margin:0; line-height:1.25; }
.cosmos-tv-shelf header>span { font-size:.8em; color:var(--cosmos-muted); }
.cosmos-tv-shelf>div { display:flex; gap:24px; overflow-x:auto; padding:10px var(--tv-gutter) 16px 10px; margin-left:-10px; scrollbar-width:thin; scrollbar-color:#40556c transparent; }
.cosmos-tv button.cosmos-tv-tile { flex:0 0 clamp(290px,24vw,490px); display:block; overflow:hidden; padding:0; border:0; border-radius:6px; text-align:left; position:relative; background:#111b27; }
.cosmos-tv-tile>img { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; background:#0a111b; }
.cosmos-tv-tile>span { display:grid; gap:8px; padding:18px 22px; }
.cosmos-tv-tile strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-weight:550; }
.cosmos-tv-tile small { font-size:.75em; color:var(--cosmos-muted); }
.cosmos-tv-tile progress { display:block; position:absolute; bottom:0; left:0; width:100%; height:4px; accent-color:var(--cosmos-warm); }
.cosmos-tv-channels,.cosmos-tv-stories { margin:56px var(--tv-gutter); border-top:1px solid var(--cosmos-line); padding-top:40px; }
.cosmos-tv-channels>header { display:flex; justify-content:space-between; align-items:center; gap:24px; margin-bottom:26px; }
.cosmos-tv-channels header>a { display:flex; align-items:center; gap:15px; min-height:60px; }
.cosmos-tv-channels>div { display:grid; gap:12px; }
.cosmos-tv-channels button { text-align:left; justify-content:start; gap:30px; border:0; border-radius:0; padding:24px 30px; }
.cosmos-tv-channels button>span:nth-child(2) { display:grid; gap:9px; flex:1; }
.cosmos-tv-channels small { color:var(--cosmos-soft); font-size:.85em; }
.cosmos-tv-frequency { font-family:var(--cosmos-mono); font-size:2em; color:var(--cosmos-warm); }
.cosmos-tv-stories nav { display:flex; flex-wrap:wrap; gap:24px; margin-top:26px; }
.cosmos-tv-stories a { display:flex; gap:24px; align-items:center; min-height:90px; padding:24px; background:#24201d; border-bottom:2px solid var(--cosmos-warm); }
.cosmos-tv-hints { margin:60px var(--tv-gutter) 0; border-top:1px solid var(--cosmos-line); padding:28px 0 40px; display:flex; align-items:center; gap:30px; flex-wrap:wrap; color:var(--cosmos-muted); font-size:18px; }
.cosmos-tv-hints button { font-size:18px; min-height:52px; background:transparent; }
.cosmos-tv-hints a { margin-left:auto; display:flex; align-items:center; gap:14px; min-height:52px; }
.cosmos-tv-loading,.cosmos-tv-notice { padding:80px var(--tv-gutter); }
.cosmos-tv-notice { padding-top:24px; padding-bottom:24px; border-left:4px solid var(--cosmos-warm); }
.cosmos-tv-notice p { color:var(--cosmos-soft); }
.cosmos-tv-player { position:fixed; inset:0; z-index:350; background:#000; }
.cosmos-tv-player>video { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.cosmos-tv-player>header { position:absolute; inset:0 0 auto; display:flex; align-items:center; gap:30px; padding:28px var(--tv-gutter) 54px; background:linear-gradient(#000d,transparent); }
.cosmos-tv-player header>div { display:grid; gap:8px; }
.cosmos-tv-player header small { font-size:14px; color:var(--cosmos-muted); letter-spacing:.14em; }
.cosmos-tv-player header strong { font-size:28px; }
.cosmos-tv-player>footer { position:absolute; inset:auto 0 0; padding:35px var(--tv-gutter); background:linear-gradient(transparent,#000e 35%); }
.cosmos-tv-player footer>input { width:100%; height:44px; accent-color:var(--cosmos-paper); cursor:pointer; }
.cosmos-tv-player footer>div { display:flex; align-items:center; gap:16px; margin-top:8px; }
.cosmos-tv-player footer button { background:#101821; font-size:20px; }
.cosmos-tv-player [data-tv-player-time] { margin-right:auto; font-size:22px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.cosmos-tv-player-status { position:absolute; left:50%; top:45%; transform:translate(-50%,-50%); background:#000b; padding:12px 24px; border-radius:4px; pointer-events:none; }
.cosmos-tv-player-status:empty { display:none; }
.cosmos-tv-report-error { position:absolute; top:130px; left:var(--tv-gutter); right:var(--tv-gutter); padding:16px; background:var(--cosmos-panel); color:var(--cosmos-negative); border-left:3px solid currentColor; }
.cosmos-tv-player[data-phase=paused] .cosmos-tv-player-status { top:auto; bottom:170px; font-size:18px; }
.cosmos-tv-player-error { position:absolute; inset:30% 15% auto; padding:35px; background:#121d2c; text-align:center; border-left:4px solid var(--cosmos-negative); }
.cosmos-tv-pair { position:fixed; inset:0; z-index:360; display:grid; place-items:center; padding:36px; }
.cosmos-tv-pair-scrim { position:absolute; inset:0; background:#02060aeb; }
.cosmos-tv-pair>section { position:relative; width:min(1280px,100%); max-height:90dvh; overflow:auto; padding:56px; background:#0d1623; border:1px solid #34445a; box-shadow:var(--cosmos-shadow); }
.cosmos-tv-pair header { display:flex; align-items:start; justify-content:space-between; gap:36px; margin-bottom:50px; }
.cosmos-tv-pair small { color:var(--cosmos-sky); font-size:16px; letter-spacing:.18em; }
.cosmos-tv-pair h2 { font-size:clamp(32px,3vw,56px); margin-top:18px; }
.cosmos-tv [data-tv-pairing] { display:grid; grid-template-columns:minmax(220px,.7fr) 1fr; align-items:center; gap:60px; }
.cosmos-tv-pair-qr { padding:18px; background:white; border-radius:4px; }
.cosmos-tv-pair-qr svg { width:100%; display:block; height:auto; }
.cosmos-tv-incoming { position:fixed; inset:0; z-index:370; display:grid; place-items:center; padding:var(--tv-gutter); background:#02060af2; }
.cosmos-tv-incoming>section { width:min(100%,1000px); max-height:90dvh; overflow:auto; padding:clamp(24px,4vw,70px); background:#0d1623; border-top:2px solid var(--cosmos-sky); box-shadow:var(--cosmos-shadow); }
.cosmos-tv-beam-mark { display:flex; align-items:center; gap:26px; color:var(--cosmos-sky); margin-bottom:36px; }
.cosmos-tv-beam-mark i { height:1px; width:clamp(50px,12vw,180px); background:linear-gradient(90deg,var(--cosmos-sky),#ffffff30); }
.cosmos-tv-incoming h2 { font-size:clamp(30px,3.5vw,62px); line-height:1.1; margin:20px 0 30px; }
.cosmos-tv-incoming [data-connected-incoming-content] { padding-block:24px; border-block:1px solid var(--cosmos-line-strong); overflow-wrap:anywhere; }
.cosmos-tv-incoming strong { font-size:clamp(24px,2vw,36px); }
.cosmos-tv-incoming p:not(.cosmos-label) { color:var(--cosmos-soft); line-height:1.5; }
.cosmos-tv-incoming footer { display:flex; flex-wrap:wrap; gap:18px; margin-top:36px; }
.cosmos-tv-incoming [data-connected-incoming-accept] { background:var(--cosmos-paper); color:var(--cosmos-void); }
.cosmos-tv [data-tv-pairing] code { font-size:clamp(44px,5vw,88px); letter-spacing:.13em; color:var(--cosmos-paper); background:none; padding:0; font-family:var(--cosmos-mono); }
.cosmos-tv [data-tv-pairing] p { color:var(--cosmos-soft); line-height:1.6; }
@media(max-width:1100px) {
  .cosmos-tv-header { height:auto; padding-block:18px; gap:16px; }
  .cosmos-tv-header nav { gap:0; } .cosmos-tv-header nav button { padding:12px; font-size:18px; }
  .cosmos-tv-feature { min-height:480px; } .cosmos-tv-feature>div { width:85%; }
  .cosmos-tv-player footer button span { display:none; } .cosmos-tv-player footer button { padding:16px; }
  .cosmos-tv-pair>section { padding:30px; } .cosmos-tv [data-tv-pairing] { gap:30px; }
}
@media(max-width:600px) {
  .cosmos-tv-header { flex-wrap:wrap; } .cosmos-tv-header nav { order:3; width:100%; justify-content:space-between; }
  .cosmos-tv-header nav button { font-size:14px; padding:10px; gap:8px; min-height:52px; }
  .cosmos-tv-header nav svg { width:20px; } .cosmos-tv-header>div { grid-template-columns:1fr 1fr; align-items:center; }
  .cosmos-tv-feature { padding-top:40px; padding-bottom:40px; height:auto; min-height:490px; }
  .cosmos-tv-feature>div { width:100%; } .cosmos-tv-feature>img { width:100%; opacity:.4; }
  .cosmos-tv-feature a { margin-left:0; margin-top:14px; } .cosmos-tv-feature h1 { font-size:42px; }
  .cosmos-tv-channels>header { align-items:start; flex-direction:column; } .cosmos-tv-channels button { padding:18px 12px; gap:15px; }
  .cosmos-tv-channels button>span:last-child:not(:nth-child(2)) { display:none; }
  .cosmos-tv-hints { gap:16px; font-size:14px; } .cosmos-tv-hints a { margin-left:0; }
  .cosmos-tv-player>header { padding:18px; gap:14px; } .cosmos-tv-player header button span { display:none; }
  .cosmos-tv-player header strong { font-size:20px; } .cosmos-tv-player header small { font-size:11px; }
  .cosmos-tv-player>footer { padding:16px; } .cosmos-tv-player footer>div { flex-wrap:wrap; gap:10px; }
  .cosmos-tv-player footer button { min-height:48px; padding:10px; } .cosmos-tv-player [data-tv-player-time] { font-size:16px; order:-1; width:100%; }
  .cosmos-tv-pair { padding:16px; } .cosmos-tv-pair>section { padding:22px; } .cosmos-tv-pair header { margin-bottom:24px; gap:14px; }
  .cosmos-tv-pair header button { padding:10px; } .cosmos-tv-pair header button span { display:none; }
  .cosmos-tv [data-tv-pairing] { grid-template-columns:1fr; gap:20px; } .cosmos-tv-pair-qr { max-width:180px; margin:auto; }
}
@media(prefers-reduced-motion:reduce) { .cosmos-tv * { scroll-behavior:auto!important; transition:none!important; animation:none!important; } }

.cosmos-remote { max-width:980px; margin:40px auto; display:grid; grid-template-columns:1fr minmax(300px,420px); gap:70px; align-items:start; }
.cosmos-remote>header { padding-top:30px; }
.cosmos-remote>header h2 { font-family:var(--cosmos-font); font-size:clamp(38px,4vw,58px); letter-spacing:-.045em; line-height:1.08; text-wrap:balance; margin:24px 0; }
.cosmos-remote p { color:var(--cosmos-soft); line-height:1.6; }
.cosmos-remote button,.cosmos-remote input { font:inherit; color:var(--cosmos-paper); border-radius:var(--cosmos-radius-control); border:1px solid var(--cosmos-line-strong); background:var(--cosmos-panel); min-height:48px; padding:12px 16px; }
.cosmos-remote button { display:inline-flex; align-items:center; justify-content:center; gap:12px; cursor:pointer; }
.cosmos-remote button:disabled { opacity:.5; cursor:wait; }
.cosmos-remote form { display:grid; gap:18px; padding:32px; background:var(--cosmos-night); border-top:2px solid var(--cosmos-sky); }
.cosmos-remote h3 { font-size:22px; margin:12px 0 0; }
.cosmos-remote form p { margin:0; }
.cosmos-remote form label { font-size:14px; }
.cosmos-remote form input { font:32px var(--cosmos-mono); letter-spacing:.24em; text-align:center; width:100%; }
.cosmos-remote form button { background:var(--cosmos-paper); color:var(--cosmos-void); }
.cosmos-remote-pair-mark { display:flex; gap:18px; align-items:center; color:var(--cosmos-sky); }
.cosmos-remote-pair-mark span { height:1px; width:56px; background:var(--cosmos-line-strong); }
.cosmos-remote-state { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:26px; }
.cosmos-remote-controls { position:relative; min-width:0; }
.cosmos-remote-connection { margin-bottom:14px; }
.cosmos-remote .connected-transport b,.cosmos-tv .connected-transport b { display:inline; }
.cosmos-remote.is-paired .cosmos-remote-connection { position:absolute; top:18px; left:0; }
.cosmos-remote.is-paired .cosmos-remote-state { justify-content:flex-end; }
.cosmos-remote-state>button { background:transparent; border-color:transparent; font-size:13px; }
.cosmos-remote [data-remote-now-playing] { min-height:100px; padding:16px 0 24px; border-bottom:1px solid var(--cosmos-line); }
.cosmos-remote [data-remote-now-playing] .connected-empty { padding:12px 0; text-align:left; }
.cosmos-remote [data-remote-now-playing] img { width:75px; height:100px; object-fit:cover; border-radius:4px; }
.cosmos-remote .connected-remote-now__inner { display:flex; align-items:center; gap:20px; }
.cosmos-remote .connected-remote-now__inner>div { flex:1; min-width:0; }
.cosmos-remote .connected-remote-now__inner small { font-size:11px; color:var(--cosmos-sky); }
.cosmos-remote .connected-remote-now__inner strong { display:block; font-size:20px; overflow-wrap:anywhere; margin-top:6px; }
.cosmos-remote .connected-remote-now__inner p { font-size:13px; margin:8px 0; }
.cosmos-remote .connected-remote-now__inner progress { width:100%; height:3px; accent-color:var(--cosmos-sky); }
.cosmos-remote-pad { margin:32px auto 26px; width:min(100%,300px); aspect-ratio:1; display:grid; grid-template-columns:repeat(3,1fr); grid-template-rows:repeat(3,1fr); gap:8px; }
.cosmos-remote-pad button { border-color:transparent; background:#152334; font-size:15px; }
.cosmos-remote-pad [data-remote-command=up] { grid-column:2; }
.cosmos-remote-pad [data-remote-command=up] svg { transform:rotate(180deg); }
.cosmos-remote-pad [data-remote-command=left] { grid-column:1; grid-row:2; }
.cosmos-remote-pad [data-remote-command=select] { grid-column:2; grid-row:2; background:var(--cosmos-paper); color:var(--cosmos-void); }
.cosmos-remote-pad [data-remote-command=right] { grid-column:3; grid-row:2; }
.cosmos-remote-pad [data-remote-command=down] { grid-column:2; grid-row:3; }
.cosmos-remote-transport { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
.cosmos-remote-transport button { flex-direction:column; min-height:70px; padding:10px; gap:5px; }
.cosmos-remote-transport span { font-size:12px; }
.cosmos-remote-help { text-align:center; font-size:13px; margin:24px 0; }
.cosmos-remote [data-remote-refresh] { width:100%; font-size:14px; }
.cosmos-remote [role=alert] { color:var(--cosmos-negative); padding:14px 0; overflow-wrap:anywhere; }
@media(max-width:850px) { .cosmos-remote { max-width:440px; grid-template-columns:1fr; gap:30px; margin:0 auto; } .cosmos-remote>header { padding-top:0; } .cosmos-remote>header h2 { font-size:36px; margin:16px 0; } .cosmos-remote>header p:not(.cosmos-label) { font-size:14px; } }
@media(max-width:850px) { .cosmos-remote.is-paired>header { display:none; } .cosmos-remote.is-paired .cosmos-remote-state { margin-bottom:6px; } .cosmos-remote.is-paired .cosmos-remote-pad { width:250px; margin-block:22px; } .cosmos-remote.is-paired .cosmos-remote-help { margin:16px 0; } }
@media(max-width:400px) { .cosmos-remote form { padding:22px 18px; } .cosmos-remote-pad { width:260px; } }
