:root {
  --bg: #05050c; --ink: #f4f5ff; --muted: #a7abc9; --faint: #7a7e9c; --line: rgba(255, 255, 255, .1);
  --glass: rgba(14, 14, 30, .55); --glass-2: rgba(255, 255, 255, .06); --c: #6366f1;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #eef0fb; --ink: #0d0e22; --muted: #4f5370; --faint: #71758f; --line: rgba(20, 20, 60, .12);
  --glass: rgba(255, 255, 255, .66); --glass-2: rgba(20, 20, 60, .06);
  color-scheme: light;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; background: var(--bg); color: var(--ink); font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ol { list-style: none; }
:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; background: radial-gradient(circle at 50% 45%, #241a6b, var(--bg) 65%); }
.flash { position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 42%, var(--c), transparent 62%); }
.flash.go { animation: flash .9s ease-out; }
@keyframes flash { 0% { opacity: .55; } 100% { opacity: 0; } }

.bar { flex: none; position: relative; z-index: 4; display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 850; letter-spacing: .06em; }
.live-dot { width: 11px; height: 11px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 0 0 rgba(255, 59, 92, .7); animation: ping 1.8s infinite; }
.live-dot.off { background: var(--faint); animation: none; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 11px transparent; } }
.conn { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.clock { margin-left: auto; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
.clock b { color: var(--ink); font-size: 19px; font-weight: 750; }
.controls { display: flex; gap: 6px; }
.icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--ink); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color .15s, transform .15s; }
.icon:hover { border-color: var(--c); transform: translateY(-1px); }
.icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#sound .wave { opacity: .25; }
#sound[aria-pressed="true"] .wave { opacity: 1; }
#sound[aria-pressed="true"] { border-color: var(--c); }
.i-moon { display: none; }
:root[data-theme="light"] .i-sun { display: block; }
:root:not([data-theme="light"]) .i-sun { display: none; }
:root:not([data-theme="light"]) .i-moon { display: block; }

.deck { flex: 1; min-height: 0; display: grid; grid-template-columns: 330px minmax(0, 1fr) 280px; gap: 12px; padding: 0 12px; position: relative; z-index: 3; }
.rail { display: flex; flex-direction: column; min-height: 0; gap: 10px; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; padding: 2px 4px 0; }
.rail-head h2 { font-size: 14px; font-weight: 750; letter-spacing: .02em; }
.rail-head span { font-size: 12px; color: var(--muted); }
.stream { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; mask-image: linear-gradient(180deg, #000 88%, transparent); }
.stream::-webkit-scrollbar { display: none; }
.item { --c: #6366f1; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 60px; gap: 9px; padding: 9px 10px 9px 13px; border-radius: 13px; overflow: hidden; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color .2s, transform .2s; }
.item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.item:hover { border-color: var(--c); transform: translateX(3px); }
.item.enter { animation: drop .7s cubic-bezier(.2, 1.1, .3, 1); }
@keyframes drop { 0% { opacity: 0; transform: translateX(60px) scale(.9); background: var(--c); } 100% { opacity: 1; } }
.item h3 { font-size: 13.5px; line-height: 1.26; font-weight: 620; letter-spacing: -.01em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.item img, .item .noimg { width: 60px; height: 60px; border-radius: 9px; object-fit: cover; background: var(--c); }
.item-meta { margin-top: 3px; display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.brk { padding: 0 5px; border-radius: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; color: #fff; background: #e11d48; }

.stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 12px; }
.scene { --c: #6366f1; position: relative; max-width: 980px; width: 100%; margin: 0 auto; }
.scene.out { animation: out .45s ease-in forwards; }
@keyframes out { to { opacity: 0; transform: translateY(-14px) scale(.985); filter: blur(6px); } }
.kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.chip { padding: 3px 10px; border-radius: 999px; color: #05050c; background: var(--c); box-shadow: 0 0 22px var(--c); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.chip.breaking { color: #fff; background: #e11d48; box-shadow: 0 0 26px #e11d48; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1), throb 1.1s ease-in-out infinite; letter-spacing: .07em; }
@keyframes throb { 50% { box-shadow: 0 0 8px #e11d48; } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.place { padding: 3px 10px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.earlier { color: var(--muted); font-weight: 600; }
.card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: end; padding: 18px 20px 16px; border-radius: 22px; overflow: hidden; position: relative; background: var(--glass); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line)); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); box-shadow: 0 30px 70px -36px var(--c); animation: rise .6s cubic-bezier(.2, 1, .3, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
.scene h1 { font-size: clamp(23px, 2.5vw, 38px); line-height: 1.09; letter-spacing: -.03em; font-weight: 800; text-wrap: pretty; }
.scene h1 span { display: inline-block; animation: word .55s cubic-bezier(.2, 1, .3, 1) backwards; }
@keyframes word { from { opacity: 0; transform: translateY(.5em) rotateX(-40deg); filter: blur(8px); } }
.summary { margin-top: 8px; font-size: clamp(14.5px, 1.2vw, 17px); color: var(--muted); max-width: 66ch; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; animation: fade .7s ease backwards; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
.byline { margin-top: 9px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); animation: fade .7s ease backwards; }
.byline b { color: var(--ink); }
.pic { width: clamp(150px, 19vw, 280px); aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: var(--c); animation: picIn .8s cubic-bezier(.2, 1, .3, 1) backwards; box-shadow: 0 14px 30px -14px #000; }
.pic img { width: 100%; height: 100%; object-fit: cover; display: block; animation: drift 14s ease-out forwards; }
@keyframes picIn { from { opacity: 0; transform: scale(.82) rotate(2deg); } }
@keyframes drift { to { transform: scale(1.1); } }
.dwell { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: left; background: linear-gradient(90deg, var(--c), #fff); animation: dwell linear forwards; }
@keyframes dwell { from { transform: scaleX(0); } }
.waiting { text-align: center; color: var(--muted); padding-bottom: 12vh; }

.big-stat { padding: 12px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.big-stat b { display: block; font-size: 42px; line-height: 1; font-weight: 850; letter-spacing: -.04em; font-variant-numeric: tabular-nums; background: linear-gradient(100deg, #7dd3fc, #a78bfa 55%, #fb7185); -webkit-background-clip: text; background-clip: text; color: transparent; }
.big-stat span { font-size: 12.5px; color: var(--muted); }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 32px; margin-top: 8px; }
.spark i { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: linear-gradient(180deg, #a78bfa, #38bdf8); transition: height .5s; }
.sections { display: flex; flex-direction: column; gap: 3px; padding: 8px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.sec { --c: #6366f1; display: grid; grid-template-columns: 74px minmax(0, 1fr) 26px; align-items: center; gap: 8px; width: 100%; padding: 4px 6px; border: 0; border-radius: 8px; background: none; font-size: 13px; font-weight: 600; text-align: left; transition: background .15s; }
.sec:hover { background: var(--glass-2); }
.sec[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 28%, transparent); }
.sec .track { height: 7px; border-radius: 99px; background: var(--glass-2); overflow: hidden; }
.sec .track i { display: block; height: 100%; min-width: 3px; border-radius: 99px; background: var(--c); box-shadow: 0 0 10px var(--c); transition: width .6s cubic-bezier(.2, 1, .3, 1); }
.sec b { font-size: 12.5px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.sec.hit { animation: hit .9s ease-out; }
@keyframes hit { 0% { background: var(--c); } }
.hot { flex: 1; min-height: 0; overflow: hidden; padding: 10px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.hot h2 { font-size: 13px; font-weight: 750; margin-bottom: 5px; }
.hot a { display: block; padding: 5px 0; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.25; font-weight: 550; }
.hot a:first-of-type { border-top: 0; }
.hot a:hover { color: #7dd3fc; }
.hot small { display: block; margin-top: 1px; color: var(--muted); font-size: 11.5px; font-weight: 400; }

.ticker { flex: none; position: relative; z-index: 4; height: 34px; display: flex; align-items: center; overflow: hidden; border-top: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
.ticker-track { display: flex; gap: 34px; white-space: nowrap; font-size: 13.5px; font-weight: 550; animation: crawl var(--speed, 150s) linear infinite; padding-left: 100%; }
.ticker-track span { display: inline-flex; align-items: center; gap: 8px; }
.ticker-track i { width: 7px; height: 7px; border-radius: 50%; }
@keyframes crawl { to { transform: translateX(-100%); } }

@media (max-width: 1180px) { .deck { grid-template-columns: 290px minmax(0, 1fr); } .pulse-rail { display: none; } }
@media (max-width: 820px) {
  body { height: auto; min-height: 100dvh; overflow: auto; }
  #gl { position: fixed; }
  .bar { position: sticky; top: 0; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .conn, .clock { display: none; }
  .controls { margin-left: auto; }
  .deck { display: flex; flex-direction: column; padding: 0 12px; }
  .stage { order: -1; min-height: calc(100dvh - 92px); }
  .scene h1 { font-size: 25px; }
  .card { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .pic { width: 100%; order: -1; aspect-ratio: 2 / 1; }
  .stream { overflow: visible; mask-image: none; }
  .ticker { position: sticky; bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; }
  .ticker-track { animation: none; padding-left: 16px; }
}
