/* ============================================================
   Weazel News — LB Phone app
   Navy masthead and red live accents, like a broadcaster's news app.
   ============================================================ */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-var.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --navy-950: #050f26;
    --navy-900: #071634;
    --navy-800: #0a1d45;
    --navy-700: #0f2a63;
    --navy-600: #173a85;
    --live: #e4002b;
    --live-soft: rgba(228, 0, 43, .14);
    --blue: #2f6bff;
    --gold: #f5b301;

    --mast: var(--navy-800);
    --mast-ink: #fff;
    --radius: 6px;
    --radius-lg: 12px;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --top: 46px;            /* phone status bar */
    --tabbar: 64px;
    font-size: 16px;
}

/* dark = the navy app from the reference shots */
:root[data-theme="dark"] {
    --bg: #0b1d44;
    --bg-2: #0e2350;
    --surface: #12295c;
    --surface-2: #183369;
    --ink: #ffffff;
    --ink-2: rgba(255, 255, 255, .72);
    --ink-3: rgba(255, 255, 255, .5);
    --line: rgba(255, 255, 255, .1);
    --chip: rgba(255, 255, 255, .08);
    --chip-on: #ffffff;
    --chip-on-ink: var(--navy-800);
    --input: rgba(255, 255, 255, .06);
    --tab-bg: rgba(7, 22, 52, .92);
    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #f2f4f8;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #eef1f6;
    --ink: #0a1430;
    --ink-2: #4a5470;
    --ink-3: #7b849b;
    --line: rgba(10, 20, 48, .1);
    --chip: rgba(10, 29, 69, .06);
    --chip-on: var(--navy-800);
    --chip-on-ink: #fff;
    --input: #ffffff;
    --tab-bg: rgba(255, 255, 255, .94);
    color-scheme: light;
}

:root[data-size="large"] { font-size: 17.5px; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); }
body {
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'ss01', 'cv11';
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

#app { position: absolute; inset: 0; display: flex; flex-direction: column; }
#views { position: relative; flex: 1; overflow: hidden; }

/* ── views (one per screen; pushed screens slide over) ───── */
.view { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); will-change: transform; }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.scroll-inner { padding-bottom: calc(var(--tabbar) + 24px); }
.view.pushed .scroll-inner { padding-bottom: 32px; }

/* ── masthead ─────────────────────────────────────────────── */
.mast {
    position: relative; z-index: 3;
    background: var(--mast); color: var(--mast-ink);
    padding: var(--top) 14px 10px;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}
.mast .left, .mast .right { display: flex; align-items: center; gap: 8px; }
.mast .right { justify-content: flex-end; }
.wordmark { display: flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.wordmark img { height: 30px; width: auto; }
.wordmark .wm { display: flex; flex-direction: column; line-height: 1; }
.wordmark .wm b { font-weight: 900; font-size: 17px; letter-spacing: -.02em; font-style: italic; }
.wordmark .wm small { font-size: 8.5px; font-weight: 700; letter-spacing: .24em; opacity: .75; margin-top: 2px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.icon-btn:active { background: rgba(255, 255, 255, .12); }
.icon-btn svg { width: 20px; height: 20px; }

.pill-live {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--live); color: #fff;
    font-size: 11.5px; font-weight: 800; letter-spacing: .01em;
    padding: 6px 10px; border-radius: 4px;
}
.pill-live .dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; }

/* simple top bar for pushed screens */
.topbar {
    background: var(--mast); color: #fff;
    padding: var(--top) 8px 8px;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px;
    z-index: 3;
}
.topbar .title { font-weight: 800; font-size: 15.5px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.topbar .right { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.topbar .txt-btn { font-weight: 700; font-size: 14.5px; padding: 8px 8px; border-radius: 8px; }
.topbar .txt-btn.primary { color: #fff; background: var(--live); padding: 7px 12px; }
.topbar .txt-btn[disabled] { opacity: .5; }

/* ── category chips ───────────────────────────────────────── */
.chips { display: flex; gap: 8px; padding: 12px 14px 4px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; padding: 7px 12px; border-radius: 999px;
    background: var(--chip); color: var(--ink-2);
    font-size: 13px; font-weight: 650;
    transition: background .2s var(--ease), color .2s var(--ease);
}
.chip[aria-pressed="true"] { background: var(--chip-on); color: var(--chip-on-ink); }

/* ── live strip (top of Home) ─────────────────────────────── */
.live-strip { display: flex; gap: 10px; padding: 12px 14px 2px; overflow-x: auto; scrollbar-width: none; }
.live-strip::-webkit-scrollbar { display: none; }
.live-row {
    flex: none; width: 100%; display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: center;
    background: var(--surface); border-radius: var(--radius); padding: 8px; text-align: left;
}
.live-strip.multi .live-row { width: 86%; }
.live-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: linear-gradient(135deg, var(--navy-700), var(--navy-950)); }
.live-thumb .av { position: absolute; inset: 0; display: grid; place-items: center; }
.live-thumb .av img, .live-thumb .av span { width: 34px; height: 34px; border-radius: 50%; }
.live-thumb .tag { position: absolute; left: 5px; bottom: 5px; }
.tag-live { background: var(--live); color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; padding: 2px 5px; border-radius: 3px; display: inline-flex; align-items: center; gap: 4px; }
.live-row .t { font-weight: 750; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.live-row .s { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

/* ── section headings ─────────────────────────────────────── */
.section-h { display: flex; align-items: baseline; justify-content: space-between; padding: 22px 14px 10px; }
.section-h h2 { margin: 0; font-size: 22px; font-weight: 850; letter-spacing: -.02em; }
.section-h .more { font-size: 13px; font-weight: 700; color: var(--ink-2); }

/* ── story cards ──────────────────────────────────────────── */
.hero { display: block; width: 100%; text-align: left; padding: 0 14px; }
.media { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.placeholder { background: linear-gradient(135deg, var(--navy-600), var(--navy-900)); display: grid; place-items: center; }
.media.placeholder img { width: 38px; height: 38px; opacity: .55; border-radius: 8px; }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.kicker.breaking { color: var(--live); }
.hero .kicker { margin-top: 10px; }
.hero h3 { margin: 4px 0 0; font-size: 22px; line-height: 1.18; font-weight: 850; letter-spacing: -.02em; }
.hero p { margin: 6px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge-breaking { position: absolute; left: 8px; top: 8px; background: var(--live); color: #fff; font-size: 10px; font-weight: 850; letter-spacing: .08em; padding: 3px 6px; border-radius: 3px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; padding: 18px 14px 0; }
.card { text-align: left; }
.card .media { aspect-ratio: 16 / 10; }
.card h4 { margin: 8px 0 0; font-size: 14px; line-height: 1.28; font-weight: 780; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.list { padding: 8px 14px 0; }
.row {
    width: 100%; display: grid; grid-template-columns: 1fr 104px; gap: 12px; align-items: start;
    padding: 14px 0; border-top: 1px solid var(--line); text-align: left;
}
.row:first-child { border-top: 0; }
.row h4 { margin: 4px 0 0; font-size: 15px; line-height: 1.28; font-weight: 760; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row .meta { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.row .media { aspect-ratio: 4 / 3; }

.load-more { display: block; margin: 16px auto 0; padding: 10px 18px; border-radius: 999px; background: var(--chip); font-weight: 700; font-size: 13.5px; }

/* ── article ──────────────────────────────────────────────── */
.article { padding: 0 0 12px; }
.article .gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #000; }
.article .gallery::-webkit-scrollbar { display: none; }
.article .gallery img { flex: none; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; scroll-snap-align: start; }
.gallery-dots { display: flex; justify-content: center; gap: 5px; padding: 8px 0 0; }
.gallery-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); opacity: .5; }
.gallery-dots i.on { opacity: 1; background: var(--ink); }
.article .body-wrap { padding: 16px 16px 0; }
.article h1 { margin: 8px 0 0; font-size: 27px; line-height: 1.12; font-weight: 880; letter-spacing: -.025em; }
.article h1 .w { display: inline-block; }
.article .dek { margin: 10px 0 0; font-size: 16.5px; line-height: 1.45; color: var(--ink-2); }
.byline { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.byline .who { flex: 1; min-width: 0; }
.byline .who b { display: block; font-size: 14px; }
.byline .who span { font-size: 12px; color: var(--ink-3); }
.article .text { padding-top: 6px; }
.article .text p { font-size: 16px; line-height: 1.62; margin: 14px 0 0; color: var(--ink); white-space: pre-wrap; word-wrap: break-word; }
.article .edited { margin-top: 18px; font-size: 12px; color: var(--ink-3); }

.avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--navy-600); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }

/* ── buttons ──────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 8px; font-weight: 750; font-size: 14px; background: var(--chip); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--live); color: #fff; }
.btn.navy { background: var(--navy-600); color: #fff; }
.btn.follow { background: var(--ink); color: var(--bg); padding: 7px 14px; border-radius: 999px; font-size: 13px; }
.btn.follow[aria-pressed="true"] { background: var(--chip); color: var(--ink); }
.btn.block { width: 100%; padding: 13px; }
.btn.danger { color: var(--live); }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ── live player ──────────────────────────────────────────── */
.player { position: relative; background: #000; aspect-ratio: 16 / 9; overflow: hidden; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player canvas.lt { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lt-preview { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; }
.player .ov { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 8px; pointer-events: none; }
.player .ov > * { pointer-events: auto; }
.player .ov-top, .player .ov-bot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.player .chip-dark { background: rgba(0, 0, 0, .55); color: #fff; font-size: 11.5px; font-weight: 700; padding: 4px 7px; border-radius: 4px; display: inline-flex; align-items: center; gap: 5px; backdrop-filter: blur(6px); }
.player .chip-dark svg { width: 13px; height: 13px; }
.player .ctl { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; }
.player .ctl svg { width: 17px; height: 17px; }
.player .state { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; font-size: 13.5px; font-weight: 600; background: radial-gradient(circle at 50% 40%, rgba(23, 58, 133, .6), #000 75%); }
.player .state small { display: block; font-weight: 500; opacity: .7; margin-top: 4px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .8s linear infinite; margin: 0 auto 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.player .ov { justify-content: flex-start; }
.player .ov-right { display: inline-flex; align-items: center; gap: 6px; }
.player .ctl { width: 28px; height: 28px; }
.unmute { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); background: #fff; color: #000; font-weight: 750; font-size: 12.5px; padding: 7px 12px; border-radius: 999px; display: inline-flex; gap: 6px; align-items: center; }
.unmute svg { width: 15px; height: 15px; }

/* fullscreen = the player turned sideways across the whole phone */
.player.full { position: fixed; z-index: 50; width: 100vh; height: 100vw; aspect-ratio: auto; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(90deg); }
/* the phone itself turned sideways: just fill it */
.player.full.land { width: 100vw; height: 100vh; transform: none; top: 0; left: 0; }

.live-info { padding: 14px 14px 0; }
.live-info h1 { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 850; letter-spacing: -.015em; }
.live-info .sub { margin-top: 4px; font-size: 12.5px; color: var(--ink-3); }
.host { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.host .who { flex: 1; min-width: 0; }
.host .who b { display: block; font-size: 14.5px; }
.host .who span { font-size: 12px; color: var(--ink-3); }
.actions { display: flex; gap: 8px; margin-top: 14px; }
.actions .btn { flex: 1; border-radius: 999px; }
.actions .btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.actions .btn[aria-pressed="true"] svg { fill: currentColor; }

/* ── watch tab ────────────────────────────────────────────── */
.live-card { display: block; width: calc(100% - 28px); margin: 0 14px 16px; text-align: left; }
.live-card .media { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--navy-600), var(--navy-950)); display: grid; place-items: center; }
.live-card .media .tag-live { position: absolute; left: 8px; top: 8px; font-size: 11px; padding: 3px 7px; }
.live-card .media .viewers { position: absolute; right: 8px; top: 8px; }
.live-card .t { margin-top: 10px; font-size: 16.5px; font-weight: 800; line-height: 1.25; }
.live-card .s { margin-top: 3px; font-size: 12.5px; color: var(--ink-3); }
.pulse { position: relative; width: 64px; height: 64px; }
.pulse .avatar { width: 64px; height: 64px; font-size: 22px; position: relative; z-index: 1; border: 3px solid var(--live); }
.pulse::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--live); opacity: .6; animation: ring 1.8s var(--ease) infinite; }
@keyframes ring { from { transform: scale(.9); opacity: .7; } to { transform: scale(1.25); opacity: 0; } }

.empty { padding: 34px 24px; text-align: center; color: var(--ink-3); }
.empty .ico { width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--chip); color: var(--ink-2); }
.empty .ico svg { width: 22px; height: 22px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.empty p { margin: 0; font-size: 13px; line-height: 1.45; }

.broadcast-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.broadcast-row:first-child { border-top: 0; }
.broadcast-row .t { font-weight: 750; font-size: 14px; line-height: 1.25; }
.broadcast-row .s { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.broadcast-row .likes { font-size: 12px; color: var(--ink-2); display: inline-flex; gap: 4px; align-items: center; }
.broadcast-row .likes svg { width: 14px; height: 14px; }
.vod { width: 52px; aspect-ratio: 16 / 10; border-radius: 4px; background: linear-gradient(135deg, var(--navy-600), var(--navy-900)); display: grid; place-items: center; color: #fff; font-size: 10px; font-weight: 800; }

/* ── team ─────────────────────────────────────────────────── */
.team-group h3 { margin: 0; padding: 20px 14px 8px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.member { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-align: left; }
.member .who { flex: 1; min-width: 0; text-align: left; }
.member .who b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.member .who span { font-size: 12.5px; color: var(--ink-3); }
.member + .member { border-top: 1px solid var(--line); }
.team-note { margin: 8px 14px 0; font-size: 11.5px; color: var(--ink-3); }

.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 16px 6px; gap: 8px; }
.profile-head h2 { margin: 6px 0 0; font-size: 21px; font-weight: 850; }
.profile-head .sub { color: var(--ink-3); font-size: 13px; }

/* ── forms / settings ─────────────────────────────────────── */
.group { margin: 18px 14px 0; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; }
.group-h { margin: 22px 18px 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.group-h + .group { margin-top: 8px; }
.group-note { margin: 8px 18px 0; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.set { display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-height: 50px; }
.set + .set { border-top: 1px solid var(--line); }
.set .lbl { flex: 1; font-size: 15px; font-weight: 550; }
.set .lbl small { display: block; font-size: 12px; color: var(--ink-3); font-weight: 450; margin-top: 2px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--chip); border-radius: 9px; padding: 3px; gap: 2px; position: relative; }
.seg button { padding: 7px 10px; border-radius: 7px; font-size: 13px; font-weight: 700; color: var(--ink-2); position: relative; z-index: 1; transition: color .2s var(--ease); }
.seg button[aria-pressed="true"] { color: var(--chip-on-ink); }
.seg .knob { position: absolute; top: 3px; bottom: 3px; border-radius: 7px; background: var(--chip-on); z-index: 0; }
.seg.wide { width: 100%; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--chip); transition: background .2s var(--ease); }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .22s var(--ease); }
.switch input:checked + span { background: #34c759; }
.switch input:checked + span::after { transform: translateX(18px); }

.field { padding: 12px 14px; }
.field + .field { border-top: 1px solid var(--line); }
.field label { display: block; font-size: 12px; font-weight: 750; color: var(--ink-3); margin-bottom: 6px; letter-spacing: .02em; }
.field .count { float: right; font-weight: 600; }
.input, .textarea {
    width: 100%; border: 0; outline: 0; background: transparent; padding: 0; font-size: 15.5px; line-height: 1.4; resize: none;
}
.textarea.headline { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.textarea.body { min-height: 220px; font-size: 15.5px; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }

.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px 14px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; }
.photo .x svg { width: 13px; height: 13px; }
.photo .cover { position: absolute; left: 4px; bottom: 4px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 9.5px; font-weight: 800; padding: 2px 5px; border-radius: 3px; letter-spacing: .05em; }
.photo.add { display: grid; place-items: center; text-align: center; border: 1.5px dashed var(--line); background: transparent; color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.photo.add svg { width: 22px; height: 22px; margin: 0 auto 4px; }
.photo.busy { display: grid; place-items: center; }
.paste-hint { padding: 0 14px 12px; font-size: 12px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.paste-hint kbd { font: inherit; font-weight: 750; font-size: 11px; padding: 1px 5px; border-radius: 4px; background: var(--chip); color: var(--ink-2); }

.cat-pick { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── tab bar ──────────────────────────────────────────────── */
#tabbar {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
    height: var(--tabbar); padding-bottom: 10px;
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: var(--tab-bg); backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
    transition: transform .3s var(--ease);
}
#tabbar.hidden { transform: translateY(110%); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--ink-3); position: relative; }
.tab svg { width: 23px; height: 23px; }
.tab[aria-current="page"] { color: var(--ink); }
.tab .live-dot { position: absolute; top: 9px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 2px var(--bg); }

.fab {
    position: absolute; right: 16px; bottom: calc(var(--tabbar) + 16px); z-index: 15;
    width: 52px; height: 52px; border-radius: 50%; background: var(--live); color: #fff;
    display: grid; place-items: center; box-shadow: 0 8px 20px rgba(228, 0, 43, .35);
}
.fab svg { width: 22px; height: 22px; }

/* ── search ───────────────────────────────────────────────── */
.searchbar { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .12); border-radius: 10px; padding: 8px 10px; color: #fff; }
.searchbar svg { width: 16px; height: 16px; opacity: .8; }
.searchbar input { flex: 1; border: 0; outline: 0; background: transparent; color: #fff; font-size: 15px; }
.searchbar input::placeholder { color: rgba(255, 255, 255, .6); }
.topbar.search { grid-template-columns: auto 1fr; }

/* ── toast / sheet ────────────────────────────────────────── */
#toast-root { position: absolute; left: 0; right: 0; bottom: calc(var(--tabbar) + 14px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; z-index: 60; }
.toast { max-width: 86%; background: rgba(10, 18, 40, .94); color: #fff; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.toast.bad { background: #b0001f; }

.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

.muted { color: var(--ink-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
:root[data-motion="reduced"] * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
