:root {
  color-scheme: light;
  --bg: #F6F6F8; --surface: #FFFFFF; --raised: #F4F0FF; --chip: #EEEEF2; --hover: #F1F1F5;
  --border: #E3E3E9; --border-2: #CFCFD8; --row: #EFEFF3;
  --ink: #18181B; --ink-2: #2B2B33; --ink-3: #3F3F49; --muted: #5E5E6A; --faint: #6B6B77;
  --accent: #6236D9; --accent-hover: #4A22B8; --accent-strong: #6B3FE0; --accent-strong-hover: #5A2FCC; --accent-edge: #8F63FF; --series: #7C4DFF;
  --live: #D42F2F; --live-dot: #E5484D; --live-text: #C02626;
  --bad: #A32020; --bad-bg: #FDE8E6; --good: #17663F; --good-bg: #E2F5E9; --ms: #4B2BA8; --ms-bg: #EEE8FF; --pace: #8E8E99;
  --k-build-bg: #FFF1D6; --k-build: #6E4600; --w-build: #8A5A00;
  --k-zone-bg: #E0EFFF; --k-zone: #0B4A80; --w-zone: #0B5CA0;
  --k-fix-bg: #DDF4E5; --k-fix: #13622F; --w-fix: #17773C;
  --k-budget-bg: #FCE4F1; --k-budget: #841B53; --w-budget: #A0225F;
  --k-plan-bg: #EEE8FF; --k-plan: #4B2BA8; --w-plan: #6236D9;
  --wm-fill: #FFFFFF; --wm-edge: #1B1B2F; --wm-shadow: #5B6C99;
  --sans: "Archivo", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --wm-fill: #FFFFFF; --wm-edge: #000000; --wm-shadow: #7D6BD9;
  --bg: #0F0F12; --surface: #18181C; --raised: #1F1F25; --chip: #2A2A32; --hover: #232329;
  --border: #2E2E36; --border-2: #3A3A44; --row: #26262D;
  --ink: #EDEDF0; --ink-2: #DADAE0; --ink-3: #C9C9D1; --muted: #A3A3AE; --faint: #8E8E99;
  --accent: #C4A8FF; --accent-hover: #E2D4FF; --accent-strong: #7C4DFF; --accent-strong-hover: #6A3BF0; --accent-edge: #8F63FF; --series: #C4A8FF;
  --live: #D42F2F; --live-dot: #FF4D4D; --live-text: #FF8A8A;
  --bad: #FFB0A8; --bad-bg: #3D2020; --good: #8FE3B4; --good-bg: #1D3B2C; --ms: #D5C2FF; --ms-bg: #2E2350; --pace: #6E6E7A;
  --k-build-bg: #3A2E14; --k-build: #FFD899; --w-build: #FFC266;
  --k-zone-bg: #13304A; --k-zone: #A9DBFF; --w-zone: #7CC7FF;
  --k-fix-bg: #173A28; --k-fix: #A6EEC4; --w-fix: #7EE0A8;
  --k-budget-bg: #3E1C30; --k-budget: #FFC2E3; --w-budget: #FF9ED2;
  --k-plan-bg: #2E2350; --k-plan: #D5C2FF; --w-plan: #C4A8FF;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top bar */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar-left { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; min-height: 44px; }
.brand:hover { color: var(--ink); }
.topnav { display: flex; gap: 18px; align-items: center; font-weight: 600; flex-wrap: wrap; }
.topnav a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.topnav a.on { color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.brand .logo { flex: 0 0 40px; }
.wordmark { display: inline-flex; align-items: center; gap: 6px; transform: skewX(-8deg); }
.wm-name { font: italic 900 24px/1 var(--sans); letter-spacing: -0.01em; color: var(--wm-fill); -webkit-text-stroke: 1.2px var(--wm-edge); paint-order: stroke fill; text-shadow: 2px 2px 0 var(--wm-edge), 3px 3px 0 var(--wm-shadow); }
.wm-tv { font: italic 900 13px/1 var(--sans); color: #fff; background: #D9452B; padding: 4px 6px 3px; border-radius: 3px; box-shadow: 2px 2px 0 var(--wm-edge); letter-spacing: .04em; }
.updated { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.updated.on { background: var(--bad-bg); color: var(--ink-3); padding: 6px 12px; border-radius: 99px; }

/* Layout */
.shell { display: flex; align-items: flex-start; min-height: calc(100vh - 61px); }
main { flex: 1 1 0; min-width: 0; padding: 24px; outline: none; }
main:focus-visible { outline: none; }
.loading, .error { color: var(--muted); padding: 40px 0; }

/* Left attempts rail */
.sidenav { flex: 0 0 240px; width: 240px; min-width: 0; overflow: hidden; align-self: stretch; background: var(--surface); border-right: 1px solid var(--border); padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; transition: flex-basis .2s ease; }
.sidenav.collapsed { flex-basis: 64px; width: 64px; padding: 12px 6px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 0 0 8px 10px; gap: 8px; }
.collapsed .panel-head { justify-content: center; padding-left: 0; }
.panel-title { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.icon-btn { width: 44px; height: 44px; flex: 0 0 44px; display: flex; align-items: center; justify-content: center; background: none; border: none; border-radius: 6px; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--chip); }
.side { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 10px; border: none; border-radius: 6px; cursor: pointer; background: transparent; text-align: left; text-decoration: none; color: var(--ink); }
.side:hover { background: var(--hover); color: var(--ink); }
.side.on { background: var(--chip); }
.collapsed .side { justify-content: center; padding: 8px 0; }
.avatar { position: relative; flex: 0 0 36px; width: 36px; height: 36px; }
.avatar img { width: 36px; height: 36px; border-radius: 99px; object-fit: cover; image-rendering: pixelated; display: block; background: #000; }
.avatar .livedot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; }
.side-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.side-name { font-weight: 600; font-size: 14px; }
.side-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-stat { display: flex; align-items: center; gap: 6px; font: 12px var(--mono); color: var(--ink-3); }
.side-stat .dot { width: 8px; height: 8px; border-radius: 99px; background: var(--faint); }
.side-stat .dot.live { background: var(--live-dot); }
.collapsed .side-text, .collapsed .side-stat, .collapsed .panel-title, .collapsed .nav-foot { display: none; }
.nav-foot { margin-top: 16px; padding: 14px 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }

/* Browse */
.browse { display: flex; flex-direction: column; gap: 32px; max-width: 1240px; }
.hero { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.hero-media { flex: 3 1 480px; min-width: 0; position: relative; display: block; background: #000; }
.hero-media img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; opacity: .92; }
.hero-body { flex: 2 1 300px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; color: var(--live-text); }
.hero h1 { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 800; }
.hero p { margin: 0; color: var(--ink-3); font-size: 16px; }
.play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.play-overlay span { width: 72px; height: 72px; border-radius: 99px; background: rgba(15,15,18,.75); display: flex; align-items: center; justify-content: center; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--chip); color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 99px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 20px; background: var(--accent-strong); color: #fff; border: none; border-radius: 6px; font-weight: 600; text-decoration: none; cursor: pointer; align-self: flex-start; }
.btn:hover { color: #fff; background: var(--accent-strong-hover); }
.btn.ghost { background: var(--chip); border: 1px solid var(--border-2); color: var(--ink); height: 40px; padding: 0 14px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 12px; }
h2 { margin: 0; font-size: 20px; font-weight: 800; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px 20px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; transition: transform .15s ease; }
.card:hover { color: var(--ink); }
.card:hover .thumb { transform: translate(4px, -4px); box-shadow: -4px 4px 0 var(--accent-edge); }
.thumb { position: relative; display: block; transition: transform .15s ease, box-shadow .15s ease; }
.thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; background: #000; }
.badge { position: absolute; top: 8px; left: 8px; font-weight: 800; font-size: 12px; letter-spacing: .04em; padding: 3px 7px; border-radius: 4px; background: rgba(0,0,0,.8); color: #fff; }
.badge.live { background: var(--live); }
.corner { position: absolute; bottom: 8px; background: rgba(0,0,0,.8); color: #fff; font: 600 12px var(--mono); padding: 3px 6px; border-radius: 3px; }
.corner.l { left: 8px; } .corner.r { right: 8px; }
.card-meta { display: flex; gap: 10px; align-items: flex-start; }
.card-meta img { width: 36px; height: 36px; border-radius: 99px; object-fit: cover; image-rendering: pixelated; flex: 0 0 36px; }
.card-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.card-title { font-weight: 600; line-height: 1.3; }
.card-sub { font-size: 14px; color: var(--muted); }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Detail */
.detail { display: flex; flex-direction: column; gap: 22px; max-width: 1100px; }
.back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 8px; background: var(--chip); border: 1px solid var(--border-2); border-radius: 6px; color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.back:hover { color: var(--ink); background: var(--chip); }
.player { position: relative; background: #000; border-radius: 8px; overflow: hidden; }
.player video, .player img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; image-rendering: pixelated; background: #000; }
.player .badge { top: 12px; left: 12px; }
.player-note { font-size: 13px; color: var(--muted); }
.sources { display: flex; flex-wrap: wrap; gap: 8px; }
.title-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; justify-content: space-between; }
.title-main { display: flex; gap: 14px; align-items: flex-start; min-width: 0; flex: 1 1 420px; }
.title-main img { width: 56px; height: 56px; border-radius: 99px; object-fit: cover; image-rendering: pixelated; flex: 0 0 56px; border: 2px solid var(--accent-edge); }
.title-main h1 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 800; }
.channel { font-size: 15px; color: var(--accent); font-weight: 600; }
.outcome { font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 6px; white-space: nowrap; background: var(--bad-bg); color: var(--bad); }
.outcome.live { background: var(--live); color: #fff; }
.outcome.good { background: var(--good-bg); color: var(--good); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat-l { font-size: 13px; color: var(--muted); }
.stat-v { font: 600 22px var(--mono); }
.stat-n { font-size: 12px; color: var(--muted); }
.box { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart svg { display: block; width: 100%; height: auto; }
.scroll { overflow-x: auto; max-height: 420px; overflow-y: auto; }
table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 14px; }
thead th { position: sticky; top: 0; background: var(--surface); text-align: right; color: var(--muted); font-size: 12px; letter-spacing: .04em; font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border-2); }
th:first-child, td:first-child { text-align: left; }
td { text-align: right; font-family: var(--mono); padding: 7px 10px; border-bottom: 1px solid var(--row); color: var(--ink-3); }
td.pop { color: var(--ink); font-weight: 600; }
td.warn { color: var(--bad); }
.chapter { display: flex; flex-wrap: wrap; gap: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.chapter-when { flex: 0 0 96px; display: flex; flex-direction: column; gap: 6px; }
.chapter-when b { font: 600 15px var(--mono); }
.chapter-body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.chapter-body h3 { margin: 0; font-size: 16px; font-weight: 600; }
.chapter-body p { margin: 0; font-size: 14px; color: var(--ink-3); }
.chapter-body .watch { color: var(--muted); font-size: 13px; }
.chapter-nums { flex: 0 1 200px; font: 12px/1.7 var(--mono); color: var(--muted); white-space: pre-line; }
.tone { display: inline-block; align-self: flex-start; padding: 3px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: var(--chip); color: var(--ink-2); }
.tone.good { background: var(--good-bg); color: var(--good); }
.tone.setback { background: var(--bad-bg); color: var(--bad); }
.tone.milestone { background: var(--ms-bg); color: var(--ms); }
.cause { display: flex; gap: 14px; align-items: flex-start; }
.cause-n { flex: 0 0 30px; height: 30px; border-radius: 99px; background: var(--chip); color: var(--accent); display: flex; align-items: center; justify-content: center; font: 600 14px var(--mono); }
.cause b { display: block; font-weight: 600; }
.cause span { font-size: 14px; color: var(--ink-3); }
.summary { margin: 0; color: var(--ink-3); }
.empty { color: var(--muted); font-size: 14px; margin: 0; }

/* Chat panel */
.chatpanel { flex: 0 0 360px; width: 360px; min-width: 0; background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; position: sticky; top: 61px; height: calc(100vh - 61px); transition: flex-basis .2s ease; }
.chatpanel.collapsed { flex-basis: 56px; width: 56px; }
.chat-head { padding: 6px 16px 6px 6px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.collapsed .chat-head { justify-content: center; padding: 6px; }
.chat-head .t { font-size: 13px; font-weight: 800; letter-spacing: .08em; flex: 1; }
.chat-head .n { font-size: 12px; color: var(--muted); }
.collapsed .chat-head .t, .collapsed .chat-head .n, .collapsed .chat-body { display: none; }
.chat-rail { display: none; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0; background: none; border: none; color: var(--accent); cursor: pointer; }
.chat-rail span { writing-mode: vertical-rl; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--ink-2); }
.collapsed .chat-rail { display: flex; }
.chat-body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.pinned { padding: 10px 16px; background: var(--raised); border-bottom: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-3); }
.pinned b { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.chip { height: 32px; padding: 0 10px; border-radius: 99px; font: 600 12px var(--sans); cursor: pointer; border: 1px solid var(--border-2); background: transparent; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--accent-strong); border-color: var(--accent-edge); color: #fff; }
.chip .c { font-family: var(--mono); opacity: .8; margin-left: 4px; }
.msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.msgs::-webkit-scrollbar { width: 8px; } .msgs::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }
.msg { padding: 6px 8px; border-radius: 4px; font-size: 14px; line-height: 1.5; }
.msg.new { animation: slideIn .45s cubic-bezier(.2,.8,.2,1), settle 2.5s ease .45s both; }
.msg time { font: 11px var(--mono); color: var(--faint); margin-right: 6px; }
.kind { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 11px; font-weight: 600; vertical-align: 1px; }
.who { font-weight: 600; margin: 0 4px 0 6px; }
.msg .txt { color: var(--ink-2); }
.k-strategy, .k-milestone { background: var(--k-plan-bg); color: var(--k-plan); } .w-strategy, .w-milestone { color: var(--w-plan); }
.k-build { background: var(--k-build-bg); color: var(--k-build); } .w-build { color: var(--w-build); }
.k-zone { background: var(--k-zone-bg); color: var(--k-zone); } .w-zone { color: var(--w-zone); }
.k-fix { background: var(--k-fix-bg); color: var(--k-fix); } .w-fix { color: var(--w-fix); }
.k-budget { background: var(--k-budget-bg); color: var(--k-budget); } .w-budget { color: var(--w-budget); }
.k-disaster { background: var(--live); color: #fff; } .w-disaster { color: var(--live-text); }
.k-other { background: var(--chip); color: var(--ink-2); } .w-other { color: var(--ink-2); }
.chat-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.chat-foot label, .chat-foot .count { font-size: 12px; color: var(--muted); }
.chat-foot .row { display: flex; gap: 8px; }
input[type=search] { flex: 1; min-width: 0; height: 40px; background: var(--bg); border: 1px solid var(--border-2); border-radius: 6px; color: var(--ink); padding: 0 12px; font: 14px var(--sans); }
.jump { margin: 0 12px 8px; }

/* Responsive */
@media (max-width: 860px) {
  .shell { flex-wrap: wrap; }
  .sidenav { display: none; }
  main { padding: 16px; flex-basis: 100%; }
  .chatpanel, .chatpanel.collapsed { position: static; height: auto; flex: 1 1 100%; width: 100%; order: -1; border-left: none; border-bottom: 1px solid var(--border); }
  .chatpanel .msgs { max-height: 320px; }
  .collapsed .chat-rail { display: none; }
  .chatpanel.collapsed .chat-head { justify-content: flex-start; padding: 6px 16px 6px 6px; }
  .chatpanel.collapsed .chat-head .t, .chatpanel.collapsed .chat-head .n { display: block; }
  .hero h1 { font-size: 26px; }
  .topnav .muted { display: none; }
}

/* ---------- live motion ---------- */
@keyframes livePulse { 0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212,47,47,.55); } 50% { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(212,47,47,0); } }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.8); opacity: 0; } }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: .15; } }
@keyframes pan { 0% { transform: scale(1.06) translate(0,0); } 50% { transform: scale(1.1) translate(-2%,-1.5%); } 100% { transform: scale(1.06) translate(0,0); } }
@keyframes dot { 0%,80%,100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes slideIn { from { transform: translateY(14px); opacity: 0; background: var(--ms-bg); } to { transform: none; opacity: 1; background: var(--ms-bg); } }
@keyframes settle { from { background: var(--ms-bg); } to { background: transparent; } }
@keyframes floatUp { 0% { transform: translateY(6px); opacity: 0; } 15% { transform: translateY(0); opacity: 1; } 80% { opacity: 1; } 100% { transform: translateY(-18px); opacity: 0; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ptPulse { 0% { r: 5; opacity: .6; } 100% { r: 16; opacity: 0; } }
@keyframes toastIn { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes barFlash { 0% { background: var(--accent-strong); } 100% { background: var(--border); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@keyframes stripes { from { background-position: 0 0; } to { background-position: 28px 0; } }

.fx-live { animation: livePulse 1.6s ease-in-out infinite; }
.ping { position: relative; display: inline-block; flex: 0 0 auto; width: 10px; height: 10px; }
.ping.small { width: 8px; height: 8px; }
.ping::before, .ping::after { content: ""; position: absolute; inset: 0; border-radius: 99px; background: var(--live-dot); }
.ping::before { animation: ping 1.6s cubic-bezier(0,0,.2,1) infinite; }
.avatar .livedot::after { box-shadow: 0 0 0 2px var(--surface); }
.side-stat .dot.live { position: relative; }
.side-stat .dot.live::before { content: ""; position: absolute; inset: 0; border-radius: 99px; background: var(--live-dot); animation: ping 1.6s cubic-bezier(0,0,.2,1) infinite; }
.chat-head .ping { margin-right: 2px; }

.fx-pan { animation: pan 24s ease-in-out infinite; transform-origin: center; }
.hero-media, .thumb, .player { overflow: hidden; }
.fx-shimmer { background: linear-gradient(90deg, var(--live-text) 0%, var(--live-text) 40%, #FF9A9A 50%, var(--live-text) 60%, var(--live-text) 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 3s linear infinite; }

.player.live { position: relative; }
.liveimg-next { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; background: #000; opacity: 0; transition: opacity 1.2s ease; }
.liveimg-next.in { opacity: 1; }
.rec { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.65); color: #fff; font: 600 12px var(--mono); padding: 3px 8px; border-radius: 4px; }
.rec-dot { color: #FF4D4D; animation: blink 1.2s steps(1) infinite; }

.countdown { display: flex; align-items: center; gap: 12px; }
.cd-track { flex: 1; height: 6px; border-radius: 99px; overflow: hidden; background: var(--border); }
.cd-track.flash { animation: barFlash .9s ease; }
.cd-fill { height: 100%; width: 0; background: var(--accent-strong); transition: width 1s linear; }
.cd-track.waiting .cd-fill { background: repeating-linear-gradient(45deg, var(--accent-strong) 0 7px, var(--accent-edge) 7px 14px); animation: stripes .8s linear infinite; }
.cd-label { font: 600 12px var(--mono); color: var(--muted); white-space: nowrap; }

.stat-row { display: flex; align-items: baseline; gap: 8px; position: relative; }
.float-chip { font: 600 12px var(--mono); padding: 2px 6px; border-radius: 4px; animation: floatUp 2.2s ease forwards; }
.float-chip.up { color: var(--good); background: var(--good-bg); }
.float-chip.down { color: var(--bad); background: var(--bad-bg); }

.fx-draw { stroke-dasharray: 1; animation: draw 1.8s ease-out both; }
.fx-ptpulse { animation: ptPulse 1.6s ease-out infinite; }

.typing { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.typing .dots { display: inline-flex; gap: 4px; }
.typing .dots i { display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: var(--accent); animation: dot 1.2s infinite; }
.typing .dots i:nth-child(2) { animation-delay: .15s; } .typing .dots i:nth-child(3) { animation-delay: .3s; }

.toasts { position: fixed; left: 16px; bottom: 16px; z-index: 20; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { display: flex; gap: 12px; align-items: flex-start; background: #18181B; color: #fff; text-decoration: none; border-radius: 10px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: toastIn .4s cubic-bezier(.2,.8,.2,1); transition: opacity .4s ease, transform .4s ease; }
.toast:hover { color: #fff; }
.toast .ping { margin-top: 5px; }
.toast.out { opacity: 0; transform: translateY(12px); }
.toast-body { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.4; }
.toast-body span { color: #DADAE0; }
:root[data-theme="dark"] .toast { background: #2A2A32; }

@media (prefers-reduced-motion: reduce) {
  .fx-live, .ping::before, .side-stat .dot.live::before, .rec-dot, .fx-pan, .typing .dots i, .msg.new, .float-chip, .fx-draw, .fx-ptpulse, .toast, .cd-track.flash, .cd-track.waiting .cd-fill, .fx-shimmer { animation: none !important; }
  .fx-draw { stroke-dasharray: none; }
  .fx-shimmer { color: var(--live-text); background: none; }
  .fx-ptpulse { display: none; }
  .liveimg-next, .cd-fill, .toast { transition: none; }
}
