/* Reddit TV — styles */
:root {
  --bg: #07070a;
  --ink: #f6f3ec;
  --muted: #9e9aa8;
  --line: rgba(255, 255, 255, .10);
  --glass: rgba(14, 14, 20, .58);
  --accent: #ff5b24;
  --accent-2: #ffb03a;
  --accent-ink: #1c0700;
  --coffee: #ffdd00;
  --nsfw: #ff3b5c;
  --font: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
svg { display: block; }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: calc(14px + var(--st)) 18px 36px; background: linear-gradient(to bottom, rgba(0,0,0,.7), rgba(0,0,0,0)); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer; }
.logo { filter: drop-shadow(0 4px 14px rgba(255,91,36,.45)); }
.wordmark { font-size: 22px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.wordmark b { color: var(--accent); font-weight: 800; }
.onair { display: inline-flex; align-items: center; gap: 6px; margin-left: 2px; padding: 5px 9px; border-radius: 999px; border: 1px solid rgba(255,59,92,.45); background: rgba(255,59,92,.08); font: 700 10px/1 var(--mono); letter-spacing: .16em; color: #ff94a6; }
.onair i { width: 7px; height: 7px; border-radius: 50%; background: var(--nsfw); box-shadow: 0 0 10px var(--nsfw); animation: pulse 1.6s ease-in-out infinite; }
.channel { flex: 1; min-width: 0; text-align: center; font: 600 12px/1.2 var(--mono); letter-spacing: .06em; color: rgba(246,243,236,.86); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel em { font-style: normal; color: var(--accent-2); }
.top-actions { display: flex; align-items: center; gap: 8px; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font: 600 13px/1 var(--font); cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .15s; }
.pill-btn:hover { border-color: rgba(255,255,255,.28); }
.pill-btn:active { transform: scale(.95); }
.pill-btn[aria-pressed="true"] { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.coffee { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--coffee); color: #1d1600; font-size: 14px; font-weight: 750; text-decoration: none; white-space: nowrap; box-shadow: 0 8px 26px rgba(255,221,0,.22); transition: transform .2s, box-shadow .2s; }
.coffee:hover { transform: translateY(-1px) rotate(-1.5deg); box-shadow: 0 12px 32px rgba(255,221,0,.34); }
.coffee .ico { stroke-width: 2.2; }

/* ---------- Feed ---------- */
.feed { position: fixed; inset: 0; overflow-x: hidden; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior-y: contain; scrollbar-width: none; outline: none; }
.feed::-webkit-scrollbar { display: none; }
.slide { position: relative; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; background: #000; isolation: isolate; }
.slide-bg { position: absolute; top: -60px; left: -60px; width: calc(100% + 120px); height: calc(100% + 120px); object-fit: cover; filter: blur(42px) saturate(1.45) brightness(.42); z-index: -1; pointer-events: none; }
.slide-bg:not([src]) { display: none; }
.stage { position: absolute; inset: 0; z-index: 0; }
.stage video, .stage .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent; }
.stage .poster { transition: opacity .35s ease; }
.stage .poster:not([src]) { display: none; }
.slide.is-playing .poster { opacity: 0; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.84) 0%, rgba(0,0,0,.34) 26%, transparent 50%), linear-gradient(to bottom, rgba(0,0,0,.42), transparent 18%); }
.shield { position: absolute; inset: 0; z-index: 2; cursor: pointer; }

.spinner { position: absolute; left: 50%; top: 50%; z-index: 3; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; border: 3px solid rgba(255,255,255,.14); border-top-color: var(--accent); pointer-events: none; opacity: 0; transition: opacity .2s .25s; animation: spin .8s linear infinite; }
.slide.is-loading .spinner { opacity: 1; }
.center-icon { position: absolute; left: 50%; top: 50%; z-index: 3; width: 84px; height: 84px; margin: -42px 0 0 -42px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); pointer-events: none; opacity: 0; transform: scale(.85); transition: opacity .2s, transform .2s; }
.center-icon .ico { width: 36px; height: 36px; margin-left: 4px; color: #fff; }
.slide.is-paused .center-icon { opacity: 1; transform: none; }
.slide.is-paused .spinner { opacity: 0; }
.fail-msg { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); padding: 12px 18px; border-radius: 14px; background: rgba(0,0,0,.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 600 13px/1.3 var(--mono); text-align: center; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .2s; }
.slide.is-failed .fail-msg { opacity: 1; }
.slide.is-failed .spinner { display: none; }

/* meta */
.meta { position: absolute; left: 0; right: 92px; bottom: calc(30px + var(--sb)); z-index: 3; padding: 0 22px; pointer-events: none; }
.meta a, .meta button { pointer-events: auto; }
.meta-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sub-chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; background: rgba(255,91,36,.94); color: var(--accent-ink); font: 700 12px/1 var(--mono); letter-spacing: .02em; text-decoration: none; }
.sub-chip:hover { background: var(--accent-2); }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; font: 700 10px/1 var(--mono); letter-spacing: .12em; }
.badge.nsfw { background: var(--nsfw); color: #fff; }
.ago, .dur { font: 600 12px/1 var(--mono); color: rgba(246,243,236,.72); }
.dur:empty { display: none; }
.loops-chip { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 700 10px/1 var(--mono); letter-spacing: .1em; color: rgba(246,243,236,.86); }
.loops-dots { display: inline-flex; gap: 4px; }
.loops-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.25); }
.loops-dots i.done { background: var(--accent); }
.loops-dots i.now { background: var(--accent-2); box-shadow: 0 0 8px var(--accent-2); }
.title { margin: 0; max-width: 760px; font-size: clamp(19px, 2.3vw, 28px); font-weight: 650; line-height: 1.16; letter-spacing: -.015em; text-wrap: balance; text-shadow: 0 2px 20px rgba(0,0,0,.55); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font: 500 12px/1.2 var(--mono); color: rgba(246,243,236,.72); }

/* right rail */
.rail { position: absolute; right: 16px; bottom: calc(34px + var(--sb)); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.rail-item { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.rail-btn { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); cursor: pointer; text-decoration: none; transition: transform .15s, background .2s, border-color .2s; }
.rail-btn:hover { background: rgba(255,91,36,.28); border-color: rgba(255,91,36,.6); }
.rail-btn:active { transform: scale(.92); }
.rail-btn .ico { width: 22px; height: 22px; }
.rail-label { font: 600 11px/1 var(--mono); color: rgba(246,243,236,.82); }

/* progress */
.progress { position: absolute; left: 0; right: 0; bottom: var(--sb); z-index: 4; height: 16px; display: flex; align-items: flex-end; cursor: pointer; }
.progress::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.14); transition: height .15s; }
.progress i { position: relative; display: block; width: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); box-shadow: 0 0 14px rgba(255,91,36,.8); transition: width .25s linear, height .15s; }
.progress:hover::before, .progress:hover i { height: 6px; }

/* end of channel */
.end-slide { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #241008, #050506 70%); }
.end-card { max-width: 540px; padding: 24px; text-align: center; }
.end-card h2 { margin: 0; font-size: clamp(34px, 6vw, 58px); font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.end-card p { margin: 14px 0 0; font: 500 14px/1.6 var(--mono); color: rgba(246,243,236,.72); }
.end-card .coffee { height: 54px; padding: 0 24px; font-size: 15px; }

/* ---------- Static / no-signal screen ---------- */
.static { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; overflow: hidden; background: #030304; transition: opacity .45s ease, visibility .45s; }
.static.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.static canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: .22; }
.static::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(0,0,0,.42) 0 2px, transparent 2px 4px); }
.static::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,.88) 100%); }
.static-card { position: relative; z-index: 2; max-width: 660px; padding: 96px 24px 40px; text-align: center; }
.bars { display: flex; width: 220px; height: 8px; margin: 0 auto 22px; overflow: hidden; border-radius: 3px; }
.bars i { flex: 1; }
.bars i:nth-child(1) { background: #c0c0c0; } .bars i:nth-child(2) { background: #c0c000; } .bars i:nth-child(3) { background: #00c0c0; }
.bars i:nth-child(4) { background: #00c000; } .bars i:nth-child(5) { background: #c000c0; } .bars i:nth-child(6) { background: #c00000; } .bars i:nth-child(7) { background: #0000c0; }
.static-kicker { margin-bottom: 14px; font: 700 12px/1 var(--mono); letter-spacing: .24em; color: var(--accent-2); }
.static-title { margin: 0; font-size: clamp(46px, 10vw, 112px); font-weight: 800; line-height: .92; letter-spacing: -.045em; text-shadow: 3px 0 rgba(255,0,70,.65), -3px 0 rgba(0,220,255,.55); animation: jitter 4s steps(1) infinite; }
.static.is-loading .static-title::after { content: '_'; margin-left: 4px; animation: blink 1s steps(1) infinite; }
.static-sub { max-width: 540px; margin: 18px auto 0; font: 500 14px/1.65 var(--mono); color: rgba(246,243,236,.76); }
.static-sub:empty { display: none; }
.static-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.static-actions:empty { display: none; }
/* channel + page links under the welcome screen (crawlable; hidden while tuning) */
.static-links { display: grid; justify-items: center; gap: 10px; margin-top: 34px; }
.static.is-loading .static-links { display: none; }
.sl-intro { margin: 0; font: 500 12.5px/1.5 var(--mono); color: rgba(246,243,236,.58); }
.sl-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 560px; margin: 0; }
.sl-cats a { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); font: 600 13px/1 var(--font); text-decoration: none; transition: border-color .15s, background .15s; }
.sl-cats a:hover { border-color: rgba(255,91,36,.6); background: rgba(255,91,36,.12); }
.sl-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; max-width: 600px; margin: 8px 0 0; }
.sl-pages a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border-radius: 999px; background: rgba(0,0,0,.42); border: 1px solid rgba(255,255,255,.1); color: rgba(246,243,236,.86); font: 600 12.5px/1 var(--font); text-decoration: none; transition: color .15s, border-color .15s, background .15s; }
.sl-pages a:hover { color: var(--ink); border-color: rgba(255,255,255,.3); background: rgba(0,0,0,.6); }
.sl-pages .ico { width: 15px; height: 15px; color: var(--accent-2, #ffb03a); }
@media (max-height: 700px) { .static-card { padding-top: 72px; } .sl-intro { display: none; } .static-links { margin-top: 22px; } }
@media (max-height: 560px) { .static-links { display: none; } }
.tune-bar { width: min(360px, 80vw); height: 6px; overflow: hidden; border-radius: 3px; background: rgba(255,255,255,.12); }
.tune-bar i { display: block; width: 0; height: 100%; border-radius: 3px; background: var(--accent); transition: width .8s ease; }

/* ---------- Buttons ---------- */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 54px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 800 16px/1 var(--font); letter-spacing: -.01em; cursor: pointer; box-shadow: 0 12px 34px rgba(255,91,36,.38), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .15s, background .2s; }
.btn-primary:hover { background: #ff6c3a; transform: translateY(-1px); }
.btn-primary:active { transform: scale(.97); }
.btn-primary .ico { width: 18px; height: 18px; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 24px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); color: var(--ink); font: 700 15px/1 var(--font); text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s; }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); }
.btn-ghost.sm { height: 36px; padding: 0 14px; font-size: 13px; }
.wide { width: 100%; }

/* ---------- Floating bits ---------- */
.unmute { position: fixed; left: 50%; top: calc(80px + var(--st)); z-index: 12; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(10,10,14,.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font: 700 13px/1 var(--font); cursor: pointer; opacity: 0; transform: translate(-50%, -8px); pointer-events: none; transition: opacity .25s, transform .25s; }
.unmute.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; animation: nudge 2.4s ease-in-out 1s infinite; }
.toast { position: fixed; left: 50%; bottom: calc(118px + var(--sb)); z-index: 60; max-width: calc(100% - 32px); padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(18,18,24,.95); box-shadow: 0 10px 30px rgba(0,0,0,.45); font: 600 13px/1.3 var(--font); text-align: center; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tuner sheet ---------- */
.backdrop { position: fixed; inset: 0; z-index: 30; display: flex; justify-content: flex-end; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.backdrop.open { opacity: 1; visibility: visible; }
.sheet { position: relative; display: flex; flex-direction: column; width: min(470px, 100%); height: 100%; border-left: 1px solid var(--line); background: linear-gradient(180deg, #131319, #0b0b0f); box-shadow: -30px 0 80px rgba(0,0,0,.5); transform: translateX(40px); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.backdrop.open .sheet { transform: none; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: calc(24px + var(--st)) 24px 8px; }
.kicker { font: 700 11px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.sheet-head h2 { margin: 8px 0 0; font-size: 32px; font-weight: 800; line-height: 1; letter-spacing: -.04em; }
.close-btn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; }
.close-btn:hover { background: rgba(255,255,255,.1); }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 24px 24px; }
.sheet-foot { padding: 14px 24px calc(14px + var(--sb)); border-top: 1px solid var(--line); background: rgba(8,8,11,.92); }

.field { padding: 20px 0; border-bottom: 1px solid var(--line); }
.label { margin-bottom: 12px; font: 700 11px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { height: 38px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font: 600 14px/1 var(--font); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.seg button:hover { border-color: rgba(255,255,255,.3); }
.seg button[aria-pressed="true"] { background: var(--ink); border-color: transparent; color: #0b0b0f; }
.seg.big { display: grid; grid-template-columns: repeat(2, 1fr); }
.seg.big button { height: auto; min-height: 76px; padding: 12px; border-radius: 16px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 8px; text-align: left; }
.seg.big button b { font-size: 15px; font-weight: 700; line-height: 1.1; }
.seg.big button small { font: 500 11px/1.2 var(--mono); opacity: .65; }
.seg.big button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg.period { margin-top: 10px; padding: 8px; border-radius: 16px; border: 1px dashed var(--line); background: rgba(255,255,255,.03); }
.seg.period button { height: 32px; padding: 0 12px; font-size: 13px; }
.seg.loops button { min-width: 64px; font-family: var(--mono); font-weight: 700; }
.hint { margin: 10px 0 0; font: 500 12px/1.5 var(--mono); color: var(--muted); }
.hint:empty { display: none; }
.panel { margin-top: 14px; }

.subs-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 52px; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: rgba(0,0,0,.35); cursor: text; transition: border-color .2s, box-shadow .2s; }
.subs-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,91,36,.15); }
.sub-tag { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 5px 0 11px; border-radius: 999px; border: 1px solid rgba(255,91,36,.45); background: rgba(255,91,36,.15); font: 600 13px/1 var(--mono); }
.sub-tag button { width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); font-size: 14px; line-height: 1; cursor: pointer; }
.sub-tag button:hover { background: var(--nsfw); }
.subs-box input { flex: 1; min-width: 150px; height: 34px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 14px/1 var(--mono); }
.subs-box input::placeholder { color: rgba(246,243,236,.38); }
.suggest-label { margin: 14px 0 8px; font: 600 11px/1 var(--mono); color: var(--muted); }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest button { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px dashed rgba(255,255,255,.2); background: transparent; color: rgba(246,243,236,.72); font: 500 12px/1 var(--mono); cursor: pointer; transition: color .15s, border-color .15s; }
.suggest button:hover { color: var(--ink); border-color: var(--accent); border-style: solid; }
.saved-subs { margin-top: 2px; }
.saved-subs button[aria-pressed="true"] { border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font-weight: 700; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 16px; }
.switch-row.first { padding-top: 0; }
.sw-title { font-size: 15px; font-weight: 650; }
.sw-sub { margin-top: 4px; font: 500 12px/1.5 var(--mono); color: var(--muted); }
.switch { position: relative; flex: none; width: 48px; height: 28px; }
.switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255,255,255,.16); transition: background .2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4); transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
select.inline { -webkit-appearance: none; appearance: none; height: 26px; margin-left: 2px; padding: 0 22px 0 9px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.07) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f6f3ec' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 7px center / 10px; color: var(--ink); font: 600 12px/1 var(--mono); cursor: pointer; vertical-align: middle; }
select.inline:disabled { opacity: .45; cursor: default; }
select.inline option { background: #15151b; }

.setup { margin: 10px 0 4px; padding: 16px 16px 14px; border-radius: 18px; border: 1px solid rgba(255,91,36,.4); background: linear-gradient(135deg, rgba(255,91,36,.16), rgba(255,176,58,.05)); font-size: 14px; line-height: 1.55; }
.setup strong { display: block; margin-bottom: 4px; font-size: 15px; }
.setup p { margin: 0 0 8px; color: rgba(246,243,236,.84); }
.setup ol { display: grid; gap: 8px; margin: 0; padding-left: 20px; }
.setup a { color: var(--accent-2); }
.setup code { padding: 2px 6px; border-radius: 6px; background: rgba(0,0,0,.45); font: 500 12px/1.4 var(--mono); word-break: break-all; }
.mini { height: 24px; margin-left: 4px; padding: 0 9px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); font: 600 11px/1 var(--mono); vertical-align: middle; cursor: pointer; }
.mine p { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: rgba(246,243,236,.84); }
.btn-reddit { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: #0b0b0f; font-weight: 750; text-decoration: none; }
.btn-reddit:hover { background: #fff; }
.me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.me-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.me-name { font-weight: 700; }
.me-sub { margin-top: 3px; font: 500 12px/1.3 var(--mono); color: var(--muted); }
.me .btn-ghost { margin-left: auto; }
.keys { margin-top: 18px; font: 500 11px/2 var(--mono); color: rgba(246,243,236,.45); }
.keys kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 5px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05); font: inherit; line-height: 1.5; color: rgba(246,243,236,.82); text-align: center; }

/* ---------- 18+ modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0,0,0,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.modal.open { opacity: 1; visibility: visible; }
.modal-card { width: min(420px, 100%); padding: 30px 26px 24px; border-radius: 26px; border: 1px solid var(--line); background: #111117; box-shadow: 0 30px 80px rgba(0,0,0,.6); text-align: center; }
.age-badge { width: 72px; height: 72px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: var(--nsfw); color: #fff; font: 800 24px/1 var(--font); box-shadow: 0 0 0 8px rgba(255,59,92,.15); }
.modal-card h3 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.modal-card p { margin: 10px 0 22px; font-size: 14px; line-height: 1.55; color: rgba(246,243,236,.76); }
.modal-actions { display: grid; gap: 10px; }

/* ---------- Connect Reddit ---------- */
.connect-btn { border-color: rgba(255,91,36,.55); }
.connect-btn .ico { color: var(--accent-2); }
.connect-btn:hover { background: rgba(255,91,36,.22); }
.me-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 4px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font: 600 13px/1 var(--mono); cursor: pointer; transition: border-color .2s; }
.me-chip:hover { border-color: rgba(255,255,255,.3); }
.me-chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.connect-card { position: relative; width: min(460px, 100%); padding: 28px 26px 22px; overflow: hidden; text-align: left; }
.connect-card::before { content: ''; position: absolute; left: 50%; top: -140px; width: 420px; height: 260px; margin-left: -210px; background: radial-gradient(closest-side, rgba(255,91,36,.32), transparent); pointer-events: none; }
.connect-card > * { position: relative; }
.connect-art { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 4px 0 22px; }
.connect-tv { width: 58px; height: 58px; filter: drop-shadow(0 8px 22px rgba(255,91,36,.5)); }
.connect-link { display: flex; gap: 6px; }
.connect-link i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); animation: hop 1.2s ease-in-out infinite; }
.connect-link i:nth-child(2) { animation-delay: .15s; }
.connect-link i:nth-child(3) { animation-delay: .3s; }
.connect-you { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); }
.connect-you .ico { width: 26px; height: 26px; }
.connect-card .kicker { text-align: left; }
.connect-card h3 { margin: 8px 0 0; font-size: 27px; line-height: 1.05; letter-spacing: -.035em; }
.connect-card p { margin: 12px 0 16px; text-align: left; }
.perms { display: grid; gap: 10px; margin: 0 0 22px; padding: 14px; list-style: none; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.04); font-size: 13.5px; line-height: 1.4; }
.perms li { display: flex; align-items: flex-start; gap: 10px; }
.perms .ico { width: 18px; height: 18px; margin-top: 1px; color: #7cffb2; stroke-width: 2.6; }
.connect-card .fine { margin: 14px 0 0; font: 500 11.5px/1.5 var(--mono); color: var(--muted); text-align: center; }
.connect-card .fine:empty { display: none; }

/* ---------- Motion ---------- */
@keyframes hop { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes jitter { 0%, 92%, 100% { transform: none; } 93% { transform: translate(-3px, 1px) skewX(-4deg); } 95% { transform: translate(3px, -1px); } 97% { transform: translate(-1px, 0) skewX(3deg); } }
@keyframes nudge { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -3px); } }
@keyframes shake { 0%, 100% { transform: none; } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.shake { animation: shake .4s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .topbar { gap: 8px; padding: calc(12px + var(--st)) 12px 34px 14px; }
  .channel, .onair { display: none; }
  .brand { margin-right: auto; }
  .wordmark { font-size: 20px; }
  .pill-btn span, .coffee span, .me-chip span { display: none; }
  .me-chip { width: 40px; padding: 0; justify-content: center; }
  .connect-card h3 { font-size: 24px; }
  .pill-btn, .coffee { width: 40px; padding: 0; justify-content: center; }
  .meta { right: 74px; bottom: calc(26px + var(--sb)); padding: 0 16px; }
  .title { font-size: 18px; }
  .rail { right: 10px; gap: 12px; }
  .rail-btn { width: 46px; height: 46px; }
  .backdrop { align-items: flex-end; }
  .sheet { width: 100%; height: auto; max-height: 92dvh; border-left: 0; border-top: 1px solid var(--line); border-radius: 26px 26px 0 0; transform: translateY(40px); }
  .sheet::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255,255,255,.2); }
  .sheet-head { padding-top: 24px; }
  .sheet-head h2 { font-size: 28px; }
  .seg.big button { min-height: 64px; padding: 10px; }
  .seg.big button small { display: none; }
  .end-card .coffee { width: auto; padding: 0 24px; }
  .end-card .coffee span { display: inline; }
}

/* ---------- Clean view: the video alone; "Show UI" brings back the shade, the info, the buttons and the top bar ---------- */
.topbar, .scrim, .meta, .rail { transition: opacity .25s ease, visibility .25s; }
body.clean:not(.on-static) .topbar,
body.clean .slide .scrim,
body.clean .slide .meta,
body.clean .slide .rail { opacity: 0; visibility: hidden; pointer-events: none; }
.details-btn { position: fixed; top: calc(14px + var(--st)); right: 18px; z-index: 22; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.24); background: rgba(10,10,14,.5); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 6px 22px rgba(0,0,0,.35); color: var(--ink); font: 600 13px/1 var(--font); cursor: pointer; transition: background .2s, border-color .2s, color .2s, opacity .25s, transform .15s; }
.details-btn:hover { border-color: rgba(255,255,255,.4); }
.details-btn:active { transform: scale(.95); }
.details-btn[aria-pressed="true"] { background: rgba(255,91,36,.18); border-color: rgba(255,91,36,.7); color: var(--accent-2); }
body.on-static .details-btn { opacity: 0; pointer-events: none; }
body.details .topbar { padding-right: 110px; } /* room for the toggle, which stays where it is */

/* ---------- Tuner in three steps: Channel → Sort → Settings (orange) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 14px 24px 0; padding: 5px; border-radius: 18px; border: 1px solid var(--line); background: rgba(0,0,0,.35); }
.step { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 10px; border: 0; border-radius: 13px; background: transparent; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.step:hover { background: rgba(255,255,255,.05); }
.step i { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); font: 700 11px/1 var(--mono); font-style: normal; }
.step span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.step b { font-size: 13px; font-weight: 700; line-height: 1; }
.step small { font: 500 10.5px/1.1 var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step[aria-selected="true"] { background: rgba(246,243,236,.1); }
.step[aria-selected="true"] i { border-color: transparent; background: var(--ink); color: #0b0b0f; }
.step.step-settings { background: rgba(255,140,26,.14); color: #ffb970; }
.step.step-settings:hover { background: rgba(255,140,26,.24); }
.step.step-settings i { border-color: rgba(255,140,26,.75); color: #ff8c1a; }
.step.step-settings small { color: rgba(255,185,112,.8); }
.step.step-settings[aria-selected="true"] { background: #ff8c1a; color: #1c0d00; box-shadow: 0 6px 18px rgba(255,140,26,.35); }
.step.step-settings[aria-selected="true"] i { border-color: transparent; background: #1c0d00; color: #ff8c1a; }
.step.step-settings[aria-selected="true"] small { color: rgba(28,13,0,.8); }
.step.step-settings:focus-visible { outline-color: #ff8c1a; }
.field.first { padding-top: 14px; }

@media (max-width: 760px) {
  .details-btn { top: calc(12px + var(--st)); right: 12px; padding: 0 14px; }
  body.details .topbar { padding-right: 94px; }
  body.details .wordmark { display: none; }
  .steps { margin: 12px 18px 0; }
  .step { gap: 7px; padding: 8px; }
  .step i { display: none; }
}

/* ---------- Likes, saving, you, downloads ---------- */
.act-heart.on { background: rgba(255,59,92,.22); border-color: rgba(255,59,92,.75); color: #ff4d6a; }
.act-heart.on .ico { fill: currentColor; }
.act-heart.pop { animation: heartpop .38s ease-out; }
@keyframes heartpop { 0% { transform: scale(1); } 35% { transform: scale(1.28); } 100% { transform: scale(1); } }
.act-save.on { background: rgba(255,91,36,.22); border-color: rgba(255,91,36,.7); color: var(--accent-2); }
.rail-btn.saving { position: relative; }
.rail-btn.saving::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), rgba(255,255,255,.12) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px)); }
.rail-btn.saving .ico { opacity: .6; }
.btn-small { flex: none; height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: var(--ink); font: 650 13px/1 var(--font); cursor: pointer; }
.btn-small:hover:not(:disabled) { background: rgba(255,255,255,.14); }
.btn-small:disabled, .btn-ghost:disabled { opacity: .45; cursor: default; }
.nick-form { display: flex; gap: 8px; margin-top: 12px; }
.nick-form input { flex: 1; min-width: 0; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--ink); font: 500 15px/1 var(--font); }
.nick-form input:focus { outline: none; border-color: rgba(255,91,36,.6); }
.nick-form .btn-small { height: 40px; }
.sheet-downloads .sheet-body { padding-top: 8px; }
.dl-grid { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.dl-card { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.035); }
.dl-thumb { position: relative; flex: none; width: 84px; height: 62px; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: #111117; cursor: pointer; }
.dl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-dur { position: absolute; left: 5px; bottom: 5px; padding: 3px 6px; border-radius: 6px; background: rgba(0,0,0,.72); color: #fff; font: 700 10px/1 var(--mono); }
.dl-body { flex: 1; min-width: 0; }
.dl-title { display: block; max-width: 100%; padding: 0; border: 0; background: none; color: inherit; font: 650 14px/1.25 var(--font); text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-meta { margin-top: 4px; font: 500 11px/1.4 var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-del { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.dl-del:hover { border-color: rgba(255,59,92,.5); color: #ff94a6; }
.dl-del .ico { width: 17px; height: 17px; }
.dl-foot { display: flex; align-items: center; gap: 12px; }
.dl-foot .btn-primary { flex: 1; }
.dl-foot .btn-primary:disabled { opacity: .5; cursor: default; }
@media (max-width: 760px) {
  .rail { gap: 10px; }
  .rail-btn { width: 44px; height: 44px; }
}
/* Loop (rail button above the heart) and the one-subreddit view (tap r/… on a video) */
.act-loop.on { background: rgba(255,176,58,.2); border-color: rgba(255,176,58,.75); color: var(--accent-2); }
.act-loop.pop { animation: heartpop .38s ease-out; }
.loops-chip.is-loop { border-color: rgba(255,176,58,.55); color: var(--accent-2); }
.sub-back { border-color: rgba(255,91,36,.6); background: rgba(255,91,36,.16); color: var(--accent-2); }
.sub-back span { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-height: 620px) {
  .rail { gap: 8px; }
  .rail-btn { width: 42px; height: 42px; }
}
@media (max-height: 480px) { /* phones held sideways: keep the rail clear of the top bar */
  .rail { gap: 6px; bottom: calc(16px + var(--sb)); }
  .rail-btn { width: 38px; height: 38px; }
  .rail-btn .ico { width: 19px; height: 19px; }
  .rail-label, .rail-item:last-child { display: none; }
}

/* ---------- Channel picker: Everything, or pick subreddits (search + add any) ---------- */
.seg.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.seg.modes button { height: auto; min-height: 92px; padding: 14px; border-radius: 18px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px; text-align: left; }
.seg.modes button .ico { width: 22px; height: 22px; opacity: .75; }
.seg.modes button b { display: block; font-size: 16px; font-weight: 700; line-height: 1.1; }
.seg.modes button small { display: block; margin-top: 5px; font: 500 11px/1.35 var(--mono); opacity: .7; overflow-wrap: anywhere; }
.seg.modes button[aria-pressed="true"] { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 12px 30px -14px rgba(255,91,36,.8); }
.seg.modes button[aria-pressed="true"] .ico { opacity: 1; }
.seg.modes button[aria-pressed="true"] small { opacity: .8; }
.seg.modes .mode-mine, .seg.modes .mode-dl { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; padding: 12px 14px; }
.seg.modes .mode-mine small, .seg.modes .mode-dl small { margin-top: 3px; }
.shuffle-row { margin-top: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.panel.pick { margin-top: 16px; }
.picked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 32px; margin-bottom: 10px; }
.picked-empty { margin: 0; font: 500 12px/1.5 var(--mono); color: var(--muted); }
.picked-clear { height: 32px; padding: 0 8px; border: 0; background: none; color: var(--muted); font: 600 12px/1 var(--mono); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.picked-clear:hover { color: var(--ink); }
.sub-search { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 8px 0 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(0,0,0,.35); cursor: text; transition: border-color .2s, box-shadow .2s; }
.sub-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,91,36,.15); }
.sub-search > .ico { width: 18px; height: 18px; color: var(--muted); }
.sub-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 15px/1 var(--mono); }
.sub-search input::placeholder { color: rgba(246,243,236,.4); }
.sub-clear { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--muted); cursor: pointer; }
.sub-clear:hover { color: var(--ink); background: rgba(255,255,255,.14); }
.sub-clear .ico { width: 16px; height: 16px; }
.sub-list { margin-top: 8px; max-height: min(46vh, 380px); overflow-y: auto; overscroll-behavior: contain; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.02); scrollbar-width: thin; }
.sub-list:empty { display: none; }
.sub-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 8px 14px; border: 0; border-bottom: 1px solid rgba(255,255,255,.06); background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: background .12s; }
.sub-row:last-child { border-bottom: 0; }
.sub-row:hover { background: rgba(255,255,255,.05); }
.sr-check { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid rgba(255,255,255,.3); color: transparent; font: 700 16px/1 var(--font); transition: background .12s, border-color .12s; }
.sr-check .ico { width: 14px; height: 14px; stroke-width: 3; }
.sub-row[aria-selected="true"] { background: rgba(255,91,36,.08); }
.sub-row[aria-selected="true"] .sr-check { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px/1.2 var(--mono); }
.sr-count { flex: none; font: 500 11px/1 var(--mono); color: var(--muted); }
.sr-18 { flex: none; margin-left: -4px; padding: 3px 6px; border-radius: 6px; background: rgba(255,59,92,.16); color: #ff7a90; font: 700 10px/1 var(--mono); font-style: normal; }
.sub-row.add .sr-check { border-style: dashed; border-color: var(--accent); color: var(--accent); }
.sub-row.add .sr-name { color: var(--accent-2); }

/* ---------- Content: SFW (green) · Both (amber) · NSFW (red) ---------- */
.seg.content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.seg.content button { position: relative; height: auto; min-height: 96px; padding: 12px; border-radius: 16px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 5px; text-align: left; }
.c-mark { display: block; flex: none; width: 14px; height: 14px; margin-bottom: 8px; border-radius: 50%; }
.c-sfw .c-mark { background: #2fd27a; box-shadow: 0 0 0 4px rgba(47,210,122,.18); }
.c-both .c-mark { background: linear-gradient(90deg, #2fd27a 50%, var(--nsfw) 50%); box-shadow: 0 0 0 4px rgba(255,176,58,.18); }
.c-nsfw .c-mark { background: var(--nsfw); box-shadow: 0 0 0 4px rgba(255,59,92,.22); }
.seg.content b { font-size: 17px; font-weight: 750; line-height: 1; }
.seg.content small { font: 500 11px/1.3 var(--mono); opacity: .75; }
.seg.content em { position: absolute; top: 10px; right: 10px; padding: 3px 6px; border-radius: 6px; background: rgba(255,59,92,.16); color: #ff7a90; font: 700 10px/1 var(--mono); font-style: normal; }
.seg.content .c-nsfw { border-color: rgba(255,59,92,.45); background: rgba(255,59,92,.06); }
.seg.content .c-nsfw b { color: #ff5b74; }
.seg.content .c-sfw[aria-pressed="true"] { background: #2fd27a; border-color: transparent; color: #04170b; box-shadow: 0 12px 30px -14px rgba(47,210,122,.8); }
.seg.content .c-both[aria-pressed="true"] { background: var(--accent-2); border-color: transparent; color: #1f1000; box-shadow: 0 12px 30px -14px rgba(255,176,58,.8); }
.seg.content .c-nsfw[aria-pressed="true"] { background: var(--nsfw); border-color: transparent; color: #fff; box-shadow: 0 12px 30px -14px rgba(255,59,92,.9); }
.seg.content .c-nsfw[aria-pressed="true"] b { color: #fff; }
.seg.content button[aria-pressed="true"] .c-mark { box-shadow: 0 0 0 3px rgba(255,255,255,.7); }
.seg.content button[aria-pressed="true"] em { background: rgba(0,0,0,.22); color: inherit; }
.c-hint[data-level="sfw"] { color: #7fe3ad; }
.c-hint[data-level="both"] { color: #ffc56b; }
.c-hint[data-level="only"] { color: #ff7a90; }
@media (max-width: 520px) {
  .seg.modes button { min-height: 0; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; padding: 13px 12px; }
  .seg.modes button .ico { width: 20px; height: 20px; }
  .seg.modes button b { font-size: 15px; }
  .shuffle-row { padding: 10px 12px; }
}
@media (max-width: 420px) {
  .seg.content button { min-height: 88px; padding: 10px; }
  .seg.content em { top: 8px; right: 8px; }
}

/* ---------- install as an app (home screen) ---------- */
.install-card { position: relative; max-height: calc(100dvh - 32px); overflow-y: auto; text-align: left; }
.install-x { position: absolute; top: 14px; right: 14px; color: var(--ink); }
.install-x .ico { width: 18px; height: 18px; }
.install-icon { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 0 18px; border-radius: 18px; background: #07070a; box-shadow: inset 0 0 0 1px var(--line), 0 12px 30px rgba(255,91,36,.22); }
.install-icon svg { width: 44px; height: 44px; }
.install-card .kicker { margin-bottom: 8px; }
.install-card h3 { padding-right: 36px; }
.install-how { display: grid; gap: 12px; margin: 0 0 22px; padding: 14px; list-style: none; counter-reset: st; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.install-how:empty { display: none; }
.install-how li { position: relative; padding-left: 38px; font-size: 14px; line-height: 1.5; color: rgba(246,243,236,.86); counter-increment: st; }
.install-how li::before { content: counter(st); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,91,36,.16); color: var(--accent); font: 700 13px/1 var(--mono); }
.install-how b { color: var(--ink); }
.install-how .ico { display: inline-block; width: 18px; height: 18px; margin: 0 1px; vertical-align: -4px; color: var(--accent-2); }
.install-how .ico.dots { fill: currentColor; stroke: none; }
.install-bar { position: fixed; left: 50%; bottom: calc(20px + var(--sb)); z-index: 30; display: flex; align-items: center; gap: 12px; width: min(440px, calc(100% - 24px)); padding: 10px 8px 10px 10px; border-radius: 20px; border: 1px solid var(--line); background: rgba(18,18,24,.95); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: 0 18px 50px rgba(0,0,0,.55); transform: translateX(-50%); animation: ib-in .35s ease-out; }
.install-bar[hidden] { display: none; }
@keyframes ib-in { from { opacity: 0; transform: translate(-50%, 16px); } }
.ib-logo { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #07070a; box-shadow: inset 0 0 0 1px var(--line); }
.ib-logo svg { width: 30px; height: 30px; }
.ib-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ib-text b { font-size: 14.5px; line-height: 1.2; }
.ib-text small { font: 500 11.5px/1.35 var(--mono); color: var(--muted); }
.ib-go { flex: none; height: 38px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 800 14px/1 var(--font); cursor: pointer; }
.ib-x { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.ib-x .ico { width: 18px; height: 18px; }
.app-ok { color: #7cffb2; }
/* landscape on phones with a notch: keep the buttons and text clear of it */
@media (orientation: landscape) and (pointer: coarse) {
  :root { --sl: env(safe-area-inset-left, 0px); --sr: env(safe-area-inset-right, 0px); }
  .topbar { padding-left: calc(14px + var(--sl)); padding-right: calc(14px + var(--sr)); }
  .rail { right: calc(12px + var(--sr)); }
  .meta { padding-left: calc(16px + var(--sl)); }
  .details-btn { right: calc(12px + var(--sr)); }
}
/* installed app: no rubber-band bounce or pull-to-refresh on the player */
body.standalone { overscroll-behavior: none; }

/* ---------- Category step ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cat-card { --cat: var(--accent); position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.cat-card:hover { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); }
.cat-card:active { transform: scale(.98); }
.cc-ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--cat) 20%, transparent); color: var(--cat); }
.cc-ico.dot::after { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--cat); box-shadow: 0 0 12px var(--cat); }
.cc-ico.flag { background: rgba(255,255,255,.08); font-size: 20px; }
.cc-ico .ico { width: 18px; height: 18px; }
.cc-txt { display: grid; gap: 3px; min-width: 0; }
.cc-txt b { font-size: 14.5px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-txt small { font: 500 10.5px/1.3 var(--mono); color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cc-check { position: absolute; top: 7px; right: 7px; width: 20px; height: 20px; display: none; place-items: center; border-radius: 50%; background: var(--cat); color: #111; }
.cc-check .ico { width: 13px; height: 13px; stroke-width: 3; }
.cat-card[aria-selected="true"] { border-color: var(--cat); background: color-mix(in srgb, var(--cat) 16%, transparent); box-shadow: 0 10px 26px -14px var(--cat); }
.cat-card[aria-selected="true"] .cc-check { display: grid; }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 420px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cat-card { padding: 10px; gap: 8px; } .cc-ico { width: 30px; height: 30px; } }
/* 18+ categories (Content = NSFW or Both): heading over them in Both, badge on each card */
.cat-sep { grid-column: 1 / -1; margin: 10px 2px 0; font: 700 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #ff6b82; }
.cc-18 { display: inline-block; margin-right: 2px; padding: 0 5px; border-radius: 6px; background: #ff3b5c; color: #fff; font: 700 9.5px/1.4 var(--mono); font-style: normal; letter-spacing: .02em; vertical-align: 1px; }

/* ---------- videos from your country ---------- */
.local-card { position: relative; text-align: left; max-height: calc(100dvh - 32px); overflow-y: auto; }
.local-flag { font-size: 44px; line-height: 1; margin: 0 0 14px; }
.local-card .kicker { margin-bottom: 8px; }
.local-card h3 { padding-right: 36px; }
.local-subs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.local-sub { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.05); font-size: 13px; }
.local-sub b { font-weight: 650; }
.local-sub small { font: 600 10.5px/1 var(--mono); color: var(--accent); }

/* ---------- Settings → More ---------- */
.more-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.more-links a { padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: rgba(246,243,236,.88); font: 600 13px/1 var(--font); text-decoration: none; }
.more-links a:hover { border-color: rgba(255,255,255,.25); color: var(--ink); }

/* ---------- notifications prompt ---------- */
.push-bar .ib-logo .ico { width: 24px; height: 24px; color: var(--accent-2); }
.push-on { color: #7cffb2; }

/* ---------- TV: the remote moves a big, bright focus ring ---------- */
body.tv :focus-visible { outline: 3px solid var(--accent-2) !important; outline-offset: 3px; box-shadow: 0 0 0 8px rgba(255,176,58,.22); }
body.tv #feed:focus-visible, body.tv .switch input:focus-visible { outline: none !important; box-shadow: none; }
body.tv .switch input:focus-visible + span { outline: 3px solid var(--accent-2); outline-offset: 3px; }
body.tv .cat-card:focus-visible, body.tv .static-actions button:focus-visible, body.tv .sl-cats a:focus-visible { transform: scale(1.05); }
body.tv .sl-cats a:focus-visible, body.tv .sl-pages a:focus-visible, body.tv .more-links a:focus-visible { background: rgba(255,91,36,.28); color: var(--ink); }
body.tv .sub-row:focus-visible { background: rgba(255,255,255,.1); }
body.tv-app a[href$="/app"], body.tv-app a[href$="/tv"], body.tv-app #appField, body.tv-app #pushField, body.tv-app #tvField { display: none !important; }
@media (max-height: 700px) { body.tv .static-links { display: grid; margin-top: 16px; gap: 8px; } body.tv .sl-intro { display: none; } body.tv .static-card { padding-top: 64px; } }

/* ---------- feedback: "we've removed adult content" (12 Nov 2026; tv.php #fb, tv.js "feedback") ---------- */
.fb-card { position: relative; width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 26px 22px 20px; text-align: left; }
.fb-badge { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 0 16px; border-radius: 16px; background: linear-gradient(140deg, #3ddc84, #14a35c); color: #03150a; box-shadow: 0 12px 30px rgba(61,220,132,.28); }
.fb-badge .ico { width: 28px; height: 28px; stroke-width: 2.2; }
.fb-heart { background: linear-gradient(140deg, #ff6b8b, #ff3b5c); color: #fff; box-shadow: 0 12px 30px rgba(255,59,92,.32); }
.fb-heart .ico { width: 26px; height: 26px; }
.fb-card .kicker { margin-bottom: 8px; }
.fb-card h3 { font-size: 23px; line-height: 1.15; }
.fb-thanks h3 { padding-right: 40px; }
.fb-card p { margin: 10px 0 18px; }
.fb-votes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.fb-vote { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 96px; padding: 14px 36px 13px 14px; border-radius: 16px; border: 1.5px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: var(--ink); text-align: left; cursor: pointer; transition: border-color .15s, background .15s, opacity .15s, transform .15s; }
.fb-vote b { font: 700 15px/1.25 var(--font); letter-spacing: -.01em; }
.fb-emo { font-size: 24px; line-height: 1; }
.fb-vote:hover { background: rgba(255,255,255,.08); }
.fb-vote:active { transform: scale(.98); }
.fb-vote::after { content: ''; position: absolute; top: 12px; right: 12px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.24); font: 800 11px/1 var(--font); color: #07070a; }
.fb-vote[aria-pressed="true"]::after { content: '✓'; border: 0; }
.fb-good[aria-pressed="true"] { border-color: #3ddc84; background: rgba(61,220,132,.13); }
.fb-good[aria-pressed="true"]::after { background: #3ddc84; }
.fb-why[aria-pressed="true"] { border-color: var(--accent-2); background: rgba(255,176,58,.12); }
.fb-why[aria-pressed="true"]::after { background: var(--accent-2); }
.fb-votes:has([aria-pressed="true"]) .fb-vote[aria-pressed="false"] { opacity: .62; }
.fb-text { display: block; width: 100%; min-height: 84px; max-height: 38vh; resize: vertical; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.14); background: rgba(0,0,0,.35); color: var(--ink); font: 500 16px/1.45 var(--font); }
.fb-text:focus { outline: none; border-color: rgba(255,91,36,.65); box-shadow: 0 0 0 3px rgba(255,91,36,.15); }
.fb-text::placeholder { color: rgba(246,243,236,.42); }
.fb-card .fb-hint { margin: 8px 2px 0; font-size: 13px; color: #ffb3a1; }
.fb-card .fb-hint:empty { display: none; }
.fb-send { width: 100%; height: 50px; margin-top: 14px; }
.fb-send:disabled, .fb-more .btn-ghost:disabled { opacity: .6; cursor: progress; }
.fb-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; margin-top: 14px; }
.fb-check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; color: rgba(246,243,236,.82); cursor: pointer; user-select: none; }
.fb-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.fb-later { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--ink); font: 700 14px/1 var(--font); cursor: pointer; }
.fb-later:hover { background: rgba(255,255,255,.08); }
.fb-card .fb-why-text { padding: 12px 14px; border-radius: 14px; border-left: 3px solid #3ddc84; background: rgba(61,220,132,.07); color: var(--ink); font-size: 15px; }
.fb-more { margin: 0 0 16px; }
.fb-more-label { display: block; margin: 0 0 8px; font-weight: 700; font-size: 15px; }
.fb-more .fb-text { min-height: 64px; }
.fb-more-row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 10px; }
.fb-card .fb-sent { flex: 1; margin: 0; font-size: 13px; line-height: 1.4; color: #7cffb2; }
.fb-card .fb-sent.err, .fb-card .fb-hint.err { color: #ffb3a1; }
.fb-card .fb-love { margin: 0; font-size: 15px; font-weight: 650; color: var(--ink); }
.fb-in { animation: fbIn .34s cubic-bezier(.2,.8,.2,1); }
@keyframes fbIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@media (max-width: 380px) { .fb-card { padding: 22px 16px 16px; } .fb-card h3 { font-size: 21px; } .fb-votes { grid-template-columns: 1fr; } .fb-vote { min-height: 0; flex-direction: row; align-items: center; } }
@media (max-height: 600px) { .fb-badge { display: none; } .fb-vote { min-height: 0; } .fb-card p { margin-bottom: 14px; } }
@media (prefers-reduced-motion: reduce) { .fb-in { animation: none; } .fb-vote { transition: none; } }
