/* latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Shared Relay TV palette and controls. Local templates own their layouts. */
:root {
    color-scheme: dark;
    --bg: #141316;
    --bg-deep: #0e0d10;
    --surface: #1d1b20;
    --surface-solid: #1d1b20;
    --surface-2: #2b2732;
    --line: #39343f;
    --text: #f5f2f7;
    --text-dim: #c3bdc9;
    --text-faint: #a39aaa;
    --accent: #c4aff5;
    --accent-hot: #c4aff5;
    --live: #ff8b81;
    --ok: #a1cdb8;
    --warn: #e6c78e;
    --glow: none;
    --hud-pad: clamp(12px, 2.2vw, 32px);
    --font-body: "Manrope", system-ui, sans-serif;
    --font-display: "Manrope", system-ui, sans-serif;
}
body { font-family: var(--font-body); }
button, input { font: inherit; }
a { -webkit-tap-highlight-color: transparent; }
:where(button, a, input, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}
.brand { font-family: var(--font-display); letter-spacing: -0.045em; }
.brand .brand-mark, .status-card > .brand-mark {
    position: relative;
    overflow: hidden;
    background: var(--text);
    color: var(--bg-deep);
    box-shadow: none;
    border-radius: 8px;
}
.icon-btn, .text-btn {
    background: #1d1b20eb;
    backdrop-filter: none;
    border-radius: 9px;
    transition: background 150ms, border-color 150ms, color 150ms;
}
.icon-btn:hover, .text-btn:hover { background: var(--surface-2); box-shadow: none; }
.ctrl-btn { min-width: 44px; min-height: 44px; }
#transport {
    background: #141316f5;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 8px 24px #0003;
}
.live-button { min-height: 40px; letter-spacing: 0.06em; border-radius: 7px; }
.live-button .live-dot, .game-status.live, .link-dot {
    animation: none;
    text-shadow: none;
    box-shadow: none;
}
.ping::before { animation: none; }
.guide-tab[aria-selected="true"], .tab[aria-selected="true"] {
    background: var(--accent);
    color: var(--bg-deep);
    box-shadow: none;
}
.nba-cat-head { backdrop-filter: none; color: var(--text-dim); }
#tuning-overlay, #loading-overlay {
    background: var(--bg-deep);
    animation: none;
}
#tuning-overlay::before, #tuning-overlay::after,
#loading-overlay::before, #loading-overlay::after { display: none; }
.tuning-wave .wave-base { stroke: var(--line); }
.tuning-wave .wave-glow { stroke: var(--accent); filter: none; }
.tuning-label { color: var(--text-dim); text-shadow: none; letter-spacing: 0.08em; }
.tuning-label::before, .tuning-label::after { display: none; }

/* Pairing and phone remote share the same quiet surfaces as the guide. */
#qr-code-screen { background: var(--bg); animation: none; }
#qr-code-screen::before, .qr-frame::before { display: none; }
.pair-title { font-family: var(--font-display); letter-spacing: -0.045em; line-height: 1.15; }
.pair-title em { background: none; color: var(--accent); }
.pair-qr { background: var(--bg-deep); backdrop-filter: none; }
.qr-frame { border-radius: 12px; box-shadow: 0 20px 60px #0004; }
.qr-frame img { border-radius: 0; }
.pair-copy .brand { margin-bottom: 12px; }
.remote-page { background: var(--bg-deep); max-width: 900px; margin-inline: auto; }
.status-card, .rail { background: var(--bg); backdrop-filter: none; border-radius: 12px; }
.tabs { border-radius: 10px; backdrop-filter: none; }
.deck { background: var(--bg); backdrop-filter: none; border-radius: 12px; box-shadow: none; }
.deck-btn, .deck-btn:active { box-shadow: none; }
#live-button { grid-column: 1; grid-row: 1; }
#mute-button { grid-column: 3; grid-row: 1; }
#playpause-button { grid-column: 2; grid-row: 1; background: var(--accent); color: var(--bg-deep); box-shadow: none; }
dialog {
    background: var(--surface-solid);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 24px 80px #0008;
}
dialog::backdrop { background: #080d16b8; backdrop-filter: none; }
#guide { border-radius: 16px; }
.guide-head { background: var(--bg); }
.guide-head:focus-within { box-shadow: inset 0 -2px var(--accent); }
.guide-tabs { border: none; background: var(--bg); border-radius: 9px; }
.guide-tab { letter-spacing: 0; border-radius: 6px; }
input[type="range"].scrub::-webkit-slider-thumb { box-shadow: none; }
.channel-item { border-radius: 10px; background: var(--surface); }
.channel-item.active { box-shadow: inset 0 -3px var(--accent); }
.channel-item .channel-title {
    color: var(--text);
    white-space: normal;
    text-align: center;
    line-height: 1.25;
}
.channel-item.game-item .channel-title { white-space: nowrap; text-align: left; }
@media (max-width: 600px) {
    .pair-copy { padding: 24px; }
    .pair-title { font-size: 1.75rem; }
    .qr-frame img { width: min(58vw, 260px); }
    .pair-qr { padding: 28px 20px; }
    .pair-steps li { gap: 12px; }
    .step-body span { font-size: 0.85rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* TV pairing: oversized instruction next to a high-contrast scan surface. */
#qr-code-screen { grid-template-columns: 1fr 0.92fr; gap: 32px; padding: 36px; }
.pair-copy { padding: clamp(20px, 3.2vw, 54px); gap: 36px; justify-content: center; }
.pair-copy .brand { font-size: 24px; letter-spacing: -1px; margin: 0 0 12px; }
.pair-copy .relay-symbol { width: 34px; height: 34px; color: var(--accent); flex-shrink: 0; }
.pair-copy .brand-sub { font-size: 9px; letter-spacing: 1.2px; }
.pair-eyebrow { font: 10px ui-monospace, monospace; letter-spacing: 1.6px; color: var(--text-faint); margin: 0 0 22px; }
.pair-title { font-size: clamp(38px, 4.5vw, 72px); font-weight: 750; letter-spacing: -3px; line-height: 1.06; }
.pair-description { font-size: 15px; line-height: 1.8; color: var(--text-faint); margin: 22px 0 0; }
.pair-steps { gap: 18px; }
.pair-steps li::before { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #30263c; font-size: 10px; }
.step-body strong { font-size: 16px; letter-spacing: 0; }
.step-body span { font-size: 14px; line-height: 1.6; color: var(--text-faint); }
.pair-qr { border: 0; border-radius: 24px; background: #c4aff5; margin: 0; gap: 36px; }
.qr-frame { padding: 20px; border-radius: 16px; box-shadow: none; }
.qr-frame:hover { transform: none; outline: 4px solid #21172e33; outline-offset: 8px; }
.qr-frame img { width: min(25vw, 40vh, 330px); }
.qr-instruction { font-size: 24px; font-weight: 500; line-height: 1.45; letter-spacing: -.8px; color: #2a1d3c; margin: 0; text-align: center; }
.qr-instruction strong { font-weight: 750; }
.pair-back { width: fit-content; font-size: 11px; color: var(--text-faint); text-decoration: none; }
.pair-back:hover { color: var(--text); }
.remote-page { padding: 18px; gap: 14px; }
.remote-page .status-card { border: none; padding: 10px 0 18px; background: none; }
.remote-page .status-card > .brand-mark { background: #c4aff5; color: #251a33; border-radius: 8px; font-size: 11px; height: 44px; }
.remote-page .status-label { font-size: 12px; letter-spacing: 0; }
.remote-page #controller-now { font-size: 20px; letter-spacing: -.6px; }
.remote-page .tabs { padding: 5px; background: #201c26; border: 0; }
.remote-page .tab { font-size: 15px; min-height: 42px; }
.remote-page .rail { border: 0; background: #18151d; }
.remote-page .channel-item { background: #231e2a; border-color: #ffffff08; }
.remote-page .channel-item.active { background: #352a43; border-color: #c4aff566; box-shadow: none; }
.remote-page .channel-item .channel-title { font-size: 14px; }
.remote-page .deck { border: 0; background: #211b29; border-radius: 18px; }
.remote-page .deck-btn { color: var(--text-dim); border-color: #ffffff18; background: #ffffff06; }
.remote-page #playpause-button { background: #c4aff5; color: #251a33; }
@media (max-width: 900px), (orientation: portrait) {
    #qr-code-screen { grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 24px; padding: 24px; }
    .pair-copy { padding: 12px; gap: 24px; }
    .pair-qr { border: 0; padding: 36px 24px; }
    .pair-title { font-size: 48px; letter-spacing: -2px; }
    .qr-frame img { width: min(54vw, 280px); }
    .qr-instruction { font-size: 21px; }
}
@media (max-height: 650px) and (min-width: 901px) {
    #qr-code-screen { padding: 24px; }
    .pair-copy { gap: 20px; padding: 16px 24px; }
    .pair-title { font-size: 44px; }
    .pair-description { margin-top: 12px; }
    .pair-steps { gap: 12px; }
    .pair-eyebrow { margin-bottom: 12px; }
}

.remote-page .game-title-row, .remote-page .game-item .channel-title { font-size: 16px; }
.remote-page .game-status { font-size: 14px; }
.remote-page .nba-cat-head { font-size: 15px; letter-spacing: 0; text-transform: none; }
.remote-page .sports-live-heading { color: var(--live); background: #382429; }

.remote-page .deck-label { font-size: 12px; letter-spacing: 0; }
