/* CASAFI design system: dimensional glass */
:root {
  --bg: #05060f; --bg2: #090b1c; --ink: #0c0e22;
  --glass-o: .55; --glass-blur: 18px;
  --panel: rgba(16, 18, 40, var(--glass-o)); --panel-2: rgba(24, 26, 56, .55); --panel-3: rgba(32, 34, 70, .5);
  --line: rgba(139, 92, 246, .22); --line-2: rgba(255, 255, 255, .07); --line-3: rgba(34, 211, 238, .28);
  --text: #e9eaff; --muted: #9094c0; --dim: #61658f;
  --pri: #8b5cf6; --pri-2: #a855f7; --pri-3: #6d28d9; --cy: #22d3ee; --ok: #22c55e; --warn: #f59e0b; --bad: #ef4444; --gold: #fbbf24; --pink: #ec4899;
  --grad: linear-gradient(90deg, var(--pri) 0%, var(--pri-2) 35%, var(--cy) 100%);
  --grad-btn: linear-gradient(180deg, #a855f7 0%, #7c3aed 100%);
  --r: 14px; --r-sm: 10px; --r-lg: 18px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  --glow: 0 0 24px rgba(139, 92, 246, .35);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: 'Orbitron', 'Chakra Petch', var(--font);
  --hud: 'Chakra Petch', 'Inter', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --rail: 66px; --right: 300px; --top: 58px; --status: 28px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(139, 92, 246, .45); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, .28); border-radius: 9px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* background layer */
.bgfx { position: fixed; inset: 0; z-index: 0; pointer-events: none; background:
  radial-gradient(1200px 700px at 18% -10%, rgba(124, 58, 237, .22), transparent 60%),
  radial-gradient(900px 600px at 100% 10%, rgba(34, 211, 238, .10), transparent 60%),
  radial-gradient(900px 700px at 60% 120%, rgba(168, 85, 247, .16), transparent 60%),
  linear-gradient(180deg, #06071a 0%, #04050d 100%); }
.bgfx::after { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(139, 92, 246, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(139, 92, 246, .05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%); }

/* ---------- shell ---------- */
.app { position: relative; z-index: 1; display: grid; height: 100vh; height: 100dvh; grid-template-columns: var(--rail) minmax(0, 1fr) var(--right); grid-template-rows: var(--top) minmax(0, 1fr) var(--status); }
.app.no-right { grid-template-columns: var(--rail) minmax(0, 1fr) 0; }
.rail { grid-column: 1; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: center; padding: 8px 0 10px; border-right: 1px solid var(--line-2); background: rgba(8, 9, 24, .72); backdrop-filter: blur(14px); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .logo { width: 40px; height: 40px; margin: 2px 0 10px; border-radius: 12px; display: grid; place-items: center; }
.rail .logo img { width: 38px; height: 38px; }
.rail .sect { font: 600 7.5px/1 var(--hud); letter-spacing: .05em; white-space: nowrap; overflow: hidden; color: var(--pri-2); text-transform: uppercase; margin: 10px 0 4px; text-align: center; opacity: .9; width: 100%; }
.rail a.ri { width: 56px; padding: 6px 0 5px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 10px; position: relative; transition: .18s; }
.rail a.ri svg { width: 19px; height: 19px; }
.rail a.ri:hover { color: var(--text); background: rgba(139, 92, 246, .1); }
.rail a.ri.on { color: #fff; background: linear-gradient(180deg, rgba(139, 92, 246, .32), rgba(139, 92, 246, .12)); box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .45), var(--glow); }
.rail a.ri.on::before { content: ''; position: absolute; left: -5px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--grad); }
.rail .spacer { flex: 1; min-height: 10px; }
.rail .me { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10px; color: var(--muted); cursor: pointer; }
.av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--panel-3); flex: none; border: 1px solid rgba(255, 255, 255, .1); image-rendering: pixelated; }
.av.sm { width: 26px; height: 26px; } .av.lg { width: 52px; height: 52px; } .av.xl { width: 88px; height: 88px; }
.av-wrap { position: relative; display: inline-block; }
.av-wrap .dot { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); border: 2px solid var(--bg); }
.initials { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: linear-gradient(135deg, #7c3aed, #4f46e5); font-size: 12px; }

.top { grid-column: 2 / 4; grid-row: 1; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid var(--line-2); background: rgba(8, 9, 24, .6); backdrop-filter: blur(14px); z-index: 20; min-width: 0; }
.top .search { flex: 1 1 380px; max-width: 720px; position: relative; min-width: 120px; }
.top .search input { width: 100%; height: 38px; border-radius: 11px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); padding: 0 64px 0 38px; outline: none; transition: .2s; }
.top .search input:focus { border-color: var(--line); background: rgba(139, 92, 246, .06); box-shadow: 0 0 0 3px rgba(139, 92, 246, .12); }
.top .search svg { position: absolute; left: 12px; top: 10px; width: 18px; height: 18px; color: var(--dim); }
.top .search kbd { position: absolute; right: 9px; top: 9px; font: 600 10px var(--mono); color: var(--dim); border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 6px; }
.top nav { display: flex; align-items: center; gap: 2px; }
.top nav a { display: flex; align-items: center; gap: 6px; padding: 8px 9px; border-radius: 9px; color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
.top nav a svg { width: 16px; height: 16px; }
.top nav a:hover, .top nav a.on { color: #fff; background: rgba(255, 255, 255, .05); }
.top .newp { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1px solid rgba(139, 92, 246, .6); color: #fff; font-weight: 600; font-size: 13px; background: rgba(139, 92, 246, .14); white-space: nowrap; cursor: pointer; }
.top .newp svg { width: 16px; height: 16px; flex: none; }
.top .newp:hover { background: rgba(139, 92, 246, .28); box-shadow: var(--glow); }
.iconbtn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); position: relative; cursor: pointer; border: 0; background: transparent; flex: none; }
.iconbtn:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.iconbtn svg { width: 19px; height: 19px; }
.iconbtn .badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--pink); color: #fff; font: 700 9px/16px var(--font); text-align: center; padding: 0 4px; }
.profile-pill { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); cursor: pointer; flex: none; }
.profile-pill b { display: block; font-size: 12.5px; line-height: 1.1; } .profile-pill small { color: var(--muted); font-size: 10.5px; }
.top .grow { flex: 1; }

main.main { grid-column: 2; grid-row: 2; overflow-y: auto; overflow-x: hidden; padding: 14px; position: relative; scroll-behavior: smooth; }
.app.no-right main.main { grid-column: 2 / 4; }
aside.right { grid-column: 3; grid-row: 2; overflow-y: auto; border-left: 1px solid var(--line-2); padding: 10px; background: rgba(6, 7, 20, .45); backdrop-filter: blur(10px); display: flex; flex-direction: column; gap: 10px; }
.app.no-right aside.right { display: none; }
aside.right > * { flex: none; }
.status { grid-column: 1 / 4; grid-row: 3; display: flex; align-items: center; gap: 18px; padding: 0 14px; font-size: 11px; color: var(--dim); border-top: 1px solid var(--line-2); background: rgba(5, 6, 16, .85); white-space: nowrap; overflow: hidden; }
.status b { color: var(--ok); font-weight: 600; } .status .grow { flex: 1; }
.status .st { display: flex; align-items: center; gap: 6px; }
.status svg { width: 12px; height: 12px; }
.mobnav { display: none; }
.show-m { display: none !important; }

/* ---------- glass panels ---------- */
.glass { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); backdrop-filter: blur(var(--glass-blur)) saturate(140%); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%); box-shadow: var(--shadow); position: relative; min-width: 0; }
.glass.edge { border-color: var(--line); }
.glass.neon { border-color: rgba(139, 92, 246, .45); box-shadow: var(--shadow), inset 0 0 30px rgba(139, 92, 246, .08), 0 0 22px rgba(139, 92, 246, .14); }
.glass.cy { border-color: var(--line-3); box-shadow: var(--shadow), 0 0 20px rgba(34, 211, 238, .08); }
.glass.pad { padding: 14px; } .glass.pad-s { padding: 10px; }
.ph { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; min-height: 42px; user-select: none; }
.ph .pt { font: 700 13px/1.2 var(--hud); letter-spacing: .06em; text-transform: uppercase; color: #dcd9ff; display: flex; align-items: center; gap: 8px; }
.ph .pt.lg { font: 700 16px/1.2 var(--font); letter-spacing: 0; text-transform: none; color: #fff; }
.ph .ps { color: var(--muted); font-size: 11.5px; }
.ph .grow { flex: 1; }
.ph .pc { display: flex; gap: 2px; opacity: .55; transition: .2s; }
.ph:hover .pc { opacity: 1; }
.ph .pc button { width: 24px; height: 24px; border: 0; background: transparent; color: var(--muted); border-radius: 6px; display: grid; place-items: center; cursor: pointer; }
.ph .pc button:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ph .pc svg { width: 14px; height: 14px; }
.pb { padding: 0 14px 14px; }
.pb.flush { padding: 0; }
.glass.min .pb, .glass.min > :not(.ph) { display: none !important; }
[data-drag] > .ph { cursor: grab; }
.dragging-on, .dragging-on * { cursor: grabbing !important; user-select: none !important; }
.lifted { position: fixed !important; z-index: 900 !important; pointer-events: none; transform-origin: 50% 30%; transition: transform .16s ease, box-shadow .2s ease, background .2s; background: rgba(28, 24, 70, .28) !important; backdrop-filter: blur(26px) saturate(170%) brightness(1.08) !important; -webkit-backdrop-filter: blur(26px) saturate(170%) brightness(1.08) !important; border-color: rgba(168, 85, 247, .7) !important; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08) inset, 0 0 40px rgba(139, 92, 246, .4) !important; }
.lifted::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(255, 255, 255, .14), transparent 40%, rgba(34, 211, 238, .08)); pointer-events: none; }
.drop-ph { border: 1.5px dashed rgba(139, 92, 246, .55); border-radius: var(--r); background: rgba(139, 92, 246, .06); box-shadow: inset 0 0 40px rgba(139, 92, 246, .08); transition: height .15s; }
.under-drag { filter: saturate(1.2); transition: transform .18s ease; }
.under-drag.glass { border-color: rgba(34, 211, 238, .45); }

/* ---------- layout helpers ---------- */
.row { display: flex; gap: 12px; align-items: center; min-width: 0; }
.row.wrap { flex-wrap: wrap; } .row.top { align-items: flex-start; } .row.sb { justify-content: space-between; } .row.end { justify-content: flex-end; }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.gap4 { gap: 4px; } .gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap16 { gap: 16px; } .gap20 { gap: 20px; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 12px; min-width: 0; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.auto-fill { grid-template-columns: repeat(auto-fill, minmax(var(--min, 220px), 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .spanall { grid-column: 1 / -1; }
.mt0 { margin-top: 0; } .mt4 { margin-top: 4px; } .mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.w100 { width: 100%; } .tc { text-align: center; } .tr { text-align: right; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); } .cy { color: var(--cy); } .pri { color: var(--pri-2); } .gold { color: var(--gold); }
.small { font-size: 12px; } .tiny { font-size: 10.5px; } .xs { font-size: 11px; } .big { font-size: 18px; } .huge { font-size: 26px; }
.b { font-weight: 700; } .sb6 { font-weight: 600; } .up { text-transform: uppercase; letter-spacing: .08em; }
.hud { font-family: var(--hud); } .disp { font-family: var(--display); } .mono { font-family: var(--mono); }
.ell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hide { display: none !important; }
.sep { height: 1px; background: var(--line-2); margin: 10px 0; }
.label { font: 600 10.5px/1.2 var(--hud); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.label.pri { color: var(--pri-2); } .label.cy { color: var(--cy); }
.kicker { font: 700 12px/1 var(--hud); letter-spacing: .18em; text-transform: uppercase; color: var(--pri-2); }
.h1 { font: 800 26px/1.15 var(--font); margin: 0; } .h2 { font: 700 20px/1.2 var(--font); margin: 0; } .h3 { font: 700 15px/1.3 var(--font); margin: 0; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin: 2px 2px 14px; flex-wrap: wrap; }
.page-head .h1 { font-family: var(--display); letter-spacing: .02em; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--text); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap; transition: .16s; user-select: none; text-decoration: none; }
.btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 8px; } .btn.xs { height: 24px; padding: 0 8px; font-size: 11px; border-radius: 7px; } .btn.lg { height: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.pri { background: var(--grad-btn); border-color: rgba(196, 181, 253, .35); color: #fff; box-shadow: 0 6px 22px rgba(124, 58, 237, .38), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn.pri:hover { filter: brightness(1.1); box-shadow: 0 8px 28px rgba(124, 58, 237, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn.cyb { background: linear-gradient(180deg, #38bdf8, #0284c7); border-color: rgba(125, 211, 252, .4); color: #fff; box-shadow: 0 6px 22px rgba(14, 165, 233, .35); }
.btn.okb { background: linear-gradient(180deg, #4ade80, #16a34a); border-color: rgba(134, 239, 172, .4); color: #04140a; box-shadow: 0 6px 22px rgba(34, 197, 94, .3); }
.btn.badb { background: linear-gradient(180deg, #f87171, #dc2626); border-color: rgba(254, 202, 202, .3); color: #fff; }
.btn.outline { background: transparent; border-color: rgba(139, 92, 246, .55); color: #e4dcff; }
.btn.outline:hover { background: rgba(139, 92, 246, .14); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.btn.busy::after { content: ''; width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.pill-btn { height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); font-size: 11px; font-weight: 600; cursor: pointer; color: var(--text); }
.pill-btn:hover { border-color: rgba(139, 92, 246, .5); background: rgba(139, 92, 246, .12); }
.pill-btn.on { border-color: rgba(139, 92, 246, .8); background: rgba(139, 92, 246, .22); color: #fff; }
.input, .select, textarea.input { width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(5, 6, 18, .55); padding: 0 12px; outline: none; transition: .18s; color: var(--text); }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus { border-color: rgba(139, 92, 246, .6); box-shadow: 0 0 0 3px rgba(139, 92, 246, .14); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.select option { background: #12142e; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.field small { color: var(--dim); font-size: 11px; }
.toggle { position: relative; width: 38px; height: 22px; flex: none; }
.toggle input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 2; }
.toggle i { position: absolute; inset: 0; border-radius: 22px; background: rgba(255, 255, 255, .1); transition: .2s; }
.toggle i::after { content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%; left: 3px; top: 3px; background: #c7c9e6; transition: .2s; }
.toggle input:checked + i { background: linear-gradient(90deg, var(--pri), var(--cy)); }
.toggle input:checked + i::after { left: 19px; background: #fff; }
input[type=range] { width: 100%; accent-color: var(--cy); height: 4px; }
input[type=color] { width: 32px; height: 32px; border: 0; border-radius: 50%; padding: 0; background: none; cursor: pointer; }
.tabs { display: flex; gap: 4px; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); width: max-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs button, .tabs a { height: 30px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs .on { background: linear-gradient(180deg, rgba(139, 92, 246, .4), rgba(139, 92, 246, .2)); color: #fff; box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .5); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 7px; font-size: 11px; font-weight: 600; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: #cfd1f5; white-space: nowrap; }
.chip.pri { border-color: rgba(139, 92, 246, .45); background: rgba(139, 92, 246, .16); color: #e4dcff; }
.chip.cy { border-color: rgba(34, 211, 238, .4); background: rgba(34, 211, 238, .1); color: #a5f3fc; }
.chip.ok { border-color: rgba(34, 197, 94, .4); background: rgba(34, 197, 94, .1); color: #86efac; }
.chip.warn { border-color: rgba(245, 158, 11, .4); background: rgba(245, 158, 11, .1); color: #fcd34d; }
.chip.bad { border-color: rgba(239, 68, 68, .45); background: rgba(239, 68, 68, .12); color: #fca5a5; }
.chip svg { width: 12px; height: 12px; }
.live-badge { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 6px; background: #ef4444; color: #fff; font: 800 11px/1 var(--font); letter-spacing: .04em; box-shadow: 0 0 14px rgba(239, 68, 68, .45); }
.live-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: pulse 1.4s infinite; }
.soon-badge { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 6px; background: rgba(15, 16, 35, .8); border: 1px solid rgba(255, 255, 255, .15); color: #ddd; font: 700 10.5px var(--font); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 10px currentColor; }
.dot.on { color: var(--ok); background: var(--ok); animation: pulse 2s infinite; } .dot.off { background: var(--dim); color: transparent; box-shadow: none; } .dot.warn { background: var(--warn); color: var(--warn); }
.progress { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--grad); box-shadow: 0 0 12px rgba(139, 92, 246, .6); transition: width .5s; }
.progress.thick { height: 9px; }
.kv { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kv span { font-size: 11px; color: var(--muted); } .kv b { font-size: 15px; font-weight: 700; }
.box { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 11px; padding: 10px 12px; min-width: 0; }
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid rgba(255, 255, 255, .045); min-width: 0; }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; border-radius: 9px; padding-left: 8px; padding-right: 8px; } .li.click:hover { background: rgba(255, 255, 255, .04); }
.empty { padding: 26px 14px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty svg { width: 30px; height: 30px; color: var(--pri-2); opacity: .8; }
.empty b { color: var(--text); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; font: 600 10.5px var(--hud); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid rgba(255, 255, 255, .04); vertical-align: middle; }
.tbl tr:hover td { background: rgba(255, 255, 255, .02); }
.scroll-x { overflow-x: auto; }
.thumb { position: relative; border-radius: 11px; overflow: hidden; background: #0b0c20; aspect-ratio: 16 / 9; }
.thumb > img, .thumb > video { width: 100%; height: 100%; object-fit: cover; }
.thumb .tl { position: absolute; left: 8px; top: 8px; display: flex; gap: 6px; } .thumb .tr { position: absolute; right: 8px; top: 8px; } .thumb .bl { position: absolute; left: 8px; bottom: 8px; } .thumb .br { position: absolute; right: 8px; bottom: 8px; }
.thumb .shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .78)); }
.viewers { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; background: rgba(0, 0, 0, .6); font-size: 11px; font-weight: 600; }
.viewers svg { width: 12px; height: 12px; }
.feed-card .live-badge { height: 18px; font-size: 9.5px; padding: 0 6px; }
.feed-card .viewers { height: 18px; font-size: 10px; padding: 0 5px; }
.play-o { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .9); display: grid; place-items: center; background: rgba(0, 0, 0, .35); backdrop-filter: blur(4px); }
.play-o svg { width: 18px; height: 18px; margin-left: 3px; }
.aitag { font: 800 8.5px/1 var(--font); padding: 3px 5px; border-radius: 4px; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .25); letter-spacing: .04em; }
.stat-big { font: 800 24px/1.1 var(--font); letter-spacing: -.01em; }
.delta { font-size: 11px; font-weight: 600; } .delta.up { color: var(--ok); } .delta.dn { color: var(--bad); }
.kbd { font: 600 10px var(--mono); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px 5px; color: var(--muted); }
.code { font: 12px/1.5 var(--mono); background: rgba(0, 0, 0, .45); border: 1px solid var(--line-2); border-radius: 9px; padding: 10px 12px; overflow-x: auto; white-space: pre; color: #c7d2fe; }
.copy { cursor: pointer; } .copy:hover { color: var(--cy); }

/* ---------- toast / modal / drawer ---------- */
.toasts { position: fixed; right: 16px; bottom: 40px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { padding: 11px 14px; border-radius: 12px; background: rgba(22, 20, 52, .92); border: 1px solid var(--line); backdrop-filter: blur(16px); box-shadow: var(--shadow); display: flex; gap: 10px; align-items: flex-start; animation: tin .25s ease; font-size: 13px; }
.toast.err { border-color: rgba(239, 68, 68, .5); } .toast.ok { border-color: rgba(34, 197, 94, .5); }
.toast b { display: block; margin-bottom: 2px; }
.modal-back { position: fixed; inset: 0; z-index: 1500; background: rgba(2, 3, 10, .62); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 18px; animation: fin .18s; }
.modal { width: min(560px, 100%); max-height: calc(100dvh - 36px); overflow: auto; background: rgba(18, 18, 44, .9); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 30px 90px rgba(0, 0, 0, .6), var(--glow); animation: pin .22s ease; }
.modal.wide { width: min(900px, 100%); } .modal.full { width: min(1280px, 100%); height: calc(100dvh - 36px); }
.modal .mh { display: flex; align-items: center; gap: 10px; padding: 16px 18px 6px; } .modal .mh h3 { margin: 0; font-size: 17px; flex: 1; }
.modal .mb { padding: 10px 18px 18px; } .modal .mf { padding: 12px 18px 16px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); z-index: 1400; background: rgba(10, 10, 28, .94); border-left: 1px solid var(--line); backdrop-filter: blur(18px); transform: translateX(105%); transition: transform .28s ease; display: flex; flex-direction: column; }
.drawer.open { transform: none; box-shadow: -30px 0 80px rgba(0, 0, 0, .5); }
.drawer .dh { display: flex; align-items: center; padding: 14px 16px; gap: 10px; border-bottom: 1px solid var(--line-2); } .drawer .dh h3 { margin: 0; flex: 1; font-size: 15px; }
.drawer .db { flex: 1; overflow-y: auto; padding: 10px 12px; }
.menu { position: fixed; z-index: 1600; min-width: 190px; background: rgba(16, 16, 40, .96); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); backdrop-filter: blur(16px); animation: pin .15s; }
.menu a, .menu button { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; border: 0; background: transparent; cursor: pointer; font-size: 13px; color: var(--text); }
.menu a:hover, .menu button:hover { background: rgba(139, 92, 246, .16); }
.menu svg { width: 15px; height: 15px; color: var(--muted); }
.menu .sep { margin: 5px 4px; }

/* ---------- right rail: Joshua ---------- */
.brain-card { overflow: hidden; }
.brain-card .art { height: 150px; position: relative; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(139, 92, 246, .35), transparent 62%), linear-gradient(180deg, #0b0a28, #070616); }
.brain-card .art img { width: 108px; height: 108px; filter: drop-shadow(0 0 22px rgba(139, 92, 246, .8)); animation: floaty 5s ease-in-out infinite; }
.brain-card .art .beam { position: absolute; bottom: 0; left: 50%; width: 2px; height: 46px; background: linear-gradient(180deg, rgba(168, 85, 247, .9), transparent); transform: translateX(-50%); filter: blur(.5px); }
.brain-card .online { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 6px; font: 700 10px var(--hud); letter-spacing: .12em; color: var(--ok); padding: 4px 8px; border-radius: 6px; background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .3); }
.brain-card .meta { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 14px 12px; margin-top: -32px; position: relative; }
.brain-card .meta b { font: 700 13px var(--hud); letter-spacing: .2em; } .brain-card .meta small { display: block; font: 600 10px var(--hud); letter-spacing: .18em; color: var(--muted); }
.brain-card .meta .act { font: 700 10px var(--hud); letter-spacing: .12em; color: var(--ok); }
.qa { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.qa button { height: 26px; border-radius: 7px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .035); font-size: 10.5px; font-weight: 600; cursor: pointer; padding: 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.qa button:hover, .qa button.on { border-color: rgba(139, 92, 246, .7); background: rgba(139, 92, 246, .22); color: #fff; }
.intel { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid rgba(255, 255, 255, .045); }
.intel:last-child { border-bottom: 0; }
.intel .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(139, 92, 246, .12); color: var(--pri-2); flex: none; }
.intel .ic svg { width: 15px; height: 15px; }
.intel b { font-size: 12.5px; display: block; } .intel small { color: var(--dim); font-size: 10.5px; }
.chatlog { display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 9px 11px; border-radius: 12px; background: rgba(255, 255, 255, .045); border: 1px solid var(--line-2); font-size: 12.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.msg.me { align-self: flex-end; background: linear-gradient(180deg, rgba(139, 92, 246, .35), rgba(109, 40, 217, .3)); border-color: rgba(139, 92, 246, .5); max-width: 88%; }
.msg.ai { max-width: 96%; }
.msg .acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.msg img { border-radius: 9px; margin-top: 8px; }
.msg .src { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; font-size: 11px; }
.msg .src a { color: var(--cy); }
.typing span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pri-2); margin-right: 3px; animation: bounce 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; } .typing span:nth-child(3) { animation-delay: .3s; }

/* brain pop-up */
.brain-pop { position: fixed; right: 22px; bottom: 44px; z-index: 1300; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.brain-fab { width: 62px; height: 62px; border-radius: 50%; border: 1px solid rgba(168, 85, 247, .7); background: radial-gradient(circle at 50% 40%, rgba(139, 92, 246, .55), rgba(20, 10, 50, .95)); display: grid; place-items: center; cursor: pointer; box-shadow: 0 0 0 0 rgba(168, 85, 247, .6), 0 10px 30px rgba(0, 0, 0, .5); animation: ring 2.6s infinite; position: relative; }
.brain-fab img { width: 42px; height: 42px; filter: drop-shadow(0 0 10px #a855f7); }
.brain-fab .n { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--pink); font: 800 11px/20px var(--font); text-align: center; }
.pop-card { width: min(330px, calc(100vw - 40px)); background: rgba(20, 16, 48, .92); border: 1px solid rgba(168, 85, 247, .5); border-radius: 16px; padding: 14px; backdrop-filter: blur(18px); box-shadow: 0 20px 60px rgba(0, 0, 0, .55), 0 0 30px rgba(139, 92, 246, .3); animation: pin .3s ease; }
.brain-card .art img.holo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 14%; filter: none; animation: none; }
.brain-card .art:has(img.holo)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 55%; background: linear-gradient(180deg, transparent, rgba(5, 4, 15, .88)); pointer-events: none; }
.pop-holo { height: 128px; margin: -14px -14px 10px; border-radius: 16px 16px 0 0; overflow: hidden; background: #05040f; }
.pop-holo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 8%; display: block; }
.pop-card h4 { margin: 0 0 4px; font-size: 14px; } .pop-card p { margin: 0 0 10px; color: #c9cbef; font-size: 12.5px; line-height: 1.45; }

/* ---------- pool cards (dashboard) ---------- */
.pool-card { border-radius: 14px; overflow: hidden; background: rgba(13, 12, 34, .75); border: 1px solid rgba(139, 92, 246, .35); display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; position: relative; min-width: 0; }
.pool-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0, 0, 0, .5), 0 0 26px var(--pc-glow, rgba(139, 92, 246, .35)); }
.pool-card .art { aspect-ratio: 32 / 26; position: relative; image-rendering: pixelated; overflow: hidden; }
.pool-card .art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.pool-card .art .tl { position: absolute; left: 8px; top: 8px; }
.pool-card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pool-card .game { font: 600 10px var(--hud); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; display: flex; align-items: center; gap: 5px; }
.pool-card .title { font: 700 14.5px/1.2 var(--hud); letter-spacing: .04em; text-transform: uppercase; }
.pool-card .nums { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; margin-top: 2px; }
.pool-card .nums span { font: 600 9.5px var(--hud); letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.pool-card .nums b { font: 700 15px var(--hud); }
.pool-card .nums b em { font-style: normal; color: var(--cy); }
.pool-card .btn { margin-top: 6px; height: 38px; font: 700 13px var(--hud); letter-spacing: .1em; text-transform: uppercase; }
.pc-purple { --pc: #a855f7; --pc-glow: rgba(168, 85, 247, .45); } .pc-red { --pc: #ef4444; --pc-glow: rgba(239, 68, 68, .45); } .pc-violet { --pc: #c084fc; --pc-glow: rgba(192, 132, 252, .45); } .pc-green { --pc: #22c55e; --pc-glow: rgba(34, 197, 94, .45); } .pc-cyan { --pc: #22d3ee; --pc-glow: rgba(34, 211, 238, .45); } .pc-gold { --pc: #f59e0b; --pc-glow: rgba(245, 158, 11, .45); } .pc-pink { --pc: #ec4899; --pc-glow: rgba(236, 72, 153, .45); } .pc-blue { --pc: #3b82f6; --pc-glow: rgba(59, 130, 246, .45); }
.pool-card { border-color: color-mix(in srgb, var(--pc, #8b5cf6) 45%, transparent); }
.pool-card .btn.themed { background: linear-gradient(180deg, color-mix(in srgb, var(--pc, #8b5cf6) 85%, white 10%), color-mix(in srgb, var(--pc, #8b5cf6) 75%, black 20%)); border-color: color-mix(in srgb, var(--pc, #8b5cf6) 60%, white 20%); color: #fff; box-shadow: 0 6px 20px var(--pc-glow); }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 270px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid rgba(139, 92, 246, .35); background: #070616; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .copy { position: relative; z-index: 2; padding: 26px 28px; max-width: 560px; }
.hero h1 { font: 800 clamp(24px, 2.9vw, 40px)/1.05 var(--display); margin: 10px 0 10px; letter-spacing: .01em; }
.hero h1 .c1 { color: #fff; } .hero h1 .c2 { color: #67e8f9; text-shadow: 0 0 22px rgba(34, 211, 238, .5); } .hero h1 .c3 { color: #e879f9; text-shadow: 0 0 22px rgba(232, 121, 249, .5); }
.hero p { font: 600 13px var(--hud); letter-spacing: .14em; margin: 0 0 18px; color: #e0e0ff; }

/* ---------- scene timeline ---------- */
.scene-top { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.scene-top .sc { border-radius: 10px; overflow: hidden; background: #0b0c20; border: 1px solid var(--line-2); cursor: pointer; transition: .2s; min-width: 0; }
.scene-top .sc:hover { border-color: rgba(139, 92, 246, .6); transform: translateY(-2px); }
.scene-top .sc .thumb { border-radius: 0; aspect-ratio: 16 / 8.5; }
.scene-top .sc .cap { padding: 6px 8px 8px; } .scene-top .sc .cap b { font-size: 13px; display: block; } .scene-top .sc .cap small { color: var(--muted); font-size: 10.5px; }
.scene-row { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 14px; padding: 6px; border-radius: 14px; background: rgba(14, 15, 36, .6); border: 1px solid rgba(139, 92, 246, .2); transition: .2s; position: relative; }
.scene-row:hover { border-color: rgba(139, 92, 246, .5); box-shadow: 0 0 24px rgba(139, 92, 246, .14); }
.scene-row .thumb { aspect-ratio: 16 / 10; border-radius: 11px; }
.scene-row .thumb .tag { position: absolute; left: 10px; top: 10px; font: 800 12px var(--hud); letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; background: rgba(109, 40, 217, .55); border: 1px solid rgba(196, 181, 253, .4); }
.scene-row .thumb .ttl { position: absolute; left: 12px; right: 12px; bottom: 26px; font: 800 18px/1.1 var(--font); text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.scene-row .thumb .sub { position: absolute; left: 12px; right: 12px; bottom: 9px; display: flex; justify-content: space-between; font-size: 12px; color: #ddd; }
.scene-row .info { display: flex; flex-direction: column; gap: 8px; padding: 6px 30px 6px 0; min-width: 0; }
.scene-row .info .n { font: 700 12px var(--hud); letter-spacing: .25em; color: var(--pri-2); }
.scene-row .info h3 { margin: 0; font-size: 19px; }
.scene-row .cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.scene-row .cell { background: rgba(255, 255, 255, .035); border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 10px; min-width: 0; }
.scene-row .cell .ci { width: 14px; height: 14px; color: var(--cy); margin-bottom: 2px; } .scene-row .cell .ci.p { color: #e879f9; } .scene-row .cell .ci.g { color: var(--ok); }
.scene-row .cell span { display: block; font-size: 11px; color: var(--muted); } .scene-row .cell b { font-size: 15px; font-weight: 600; display: block; }
.scene-row .handle { position: absolute; right: 10px; top: 12px; color: var(--dim); cursor: grab; padding: 4px; }
.scene-row .handle svg { width: 16px; height: 16px; }
.st-rendered { color: var(--ok) !important; } .st-generating { color: #4ade80 !important; animation: blink 1.4s infinite; } .st-queued { color: #34d399 !important; opacity: .85; } .st-error { color: var(--bad) !important; }

/* pipeline steps */
.steps { display: flex; align-items: flex-start; gap: 0; overflow-x: auto; padding: 4px 4px 2px; scrollbar-width: none; }
.steps .s { flex: 1 0 86px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; cursor: pointer; min-width: 86px; }
.steps .s .c { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid rgba(255, 255, 255, .25); font: 700 14px var(--font); background: rgba(10, 10, 30, .8); position: relative; z-index: 2; transition: .2s; }
.steps .s::after { content: ''; position: absolute; top: 20px; left: calc(50% + 24px); right: calc(-50% + 24px); height: 1.5px; background: rgba(255, 255, 255, .12); }
.steps .s:last-child::after { display: none; }
.steps .s.done .c { background: radial-gradient(circle, #34d399, #059669); border-color: #6ee7b7; color: #032b1f; box-shadow: 0 0 18px rgba(16, 185, 129, .55); }
.steps .s.done::after { background: linear-gradient(90deg, #34d399, rgba(255, 255, 255, .12)); }
.steps .s.running .c, .steps .s.ready .c { background: radial-gradient(circle, #f0abfc, #c026d3); border-color: #f5d0fe; color: #3b0a3f; box-shadow: 0 0 20px rgba(217, 70, 239, .6); animation: pulse 1.6s infinite; }
.steps .s.blocked .c, .steps .s.error .c { border-color: var(--bad); color: var(--bad); }
.steps .s b { font: 700 13px var(--font); } .steps .s small { font-size: 11px; color: var(--muted); margin-top: -4px; }
.steps .s.done small { color: var(--ok); } .steps .s.running small, .steps .s.ready small { color: #f0abfc; }

/* ticker */
.ticker { display: flex; align-items: center; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 9px 12px; }
.ticker .tk { display: flex; align-items: center; gap: 8px; padding: 2px 14px 2px 0; border-right: 1px solid var(--line-2); flex: 1 0 auto; min-width: 140px; }
.ticker .tk:last-child { border-right: 0; }
.ticker .sym { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font: 800 10px var(--font); background: rgba(139, 92, 246, .2); border: 1px solid rgba(139, 92, 246, .4); flex: none; }
.ticker b { font-size: 13px; display: block; } .ticker small { font-size: 10.5px; color: var(--muted); }
.ticker .px { font: 700 13px var(--font); }

/* core visual */
.core { position: relative; min-height: 430px; overflow: hidden; }
.core canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.core .orb { position: absolute; display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 12px; background: rgba(12, 14, 40, .78); border: 1px solid rgba(34, 211, 238, .4); backdrop-filter: blur(10px); cursor: pointer; transition: .2s; z-index: 3; box-shadow: 0 0 18px rgba(34, 211, 238, .12); }
.core .orb:hover { border-color: #67e8f9; box-shadow: 0 0 26px rgba(34, 211, 238, .35); transform: scale(1.04); }
.core .orb svg { width: 18px; height: 18px; color: var(--cy); }
.core .orb b { font: 700 11px var(--hud); letter-spacing: .1em; display: block; text-transform: uppercase; } .core .orb small { font-size: 9.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.core .logo-c { position: absolute; left: 50%; top: 46%; translate: -50% -50%; width: 52%; max-width: 250px; aspect-ratio: 1; z-index: 2; filter: drop-shadow(0 0 30px rgba(34, 211, 238, .55)); animation: floaty 6s ease-in-out infinite; }
.core .ask { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(88%, 520px); z-index: 4; }
.ask-bar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 14px; background: rgba(10, 10, 32, .82); border: 1px solid rgba(139, 92, 246, .55); box-shadow: 0 0 30px rgba(139, 92, 246, .25); backdrop-filter: blur(14px); }
.ask-bar input { flex: 1; border: 0; outline: none; background: transparent; height: 34px; min-width: 0; }
.ask-bar img { width: 22px; height: 22px; }

/* stream page */
.player { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.player video, .player canvas.pv { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .ov { position: absolute; inset: 0; pointer-events: none; }
.player .tl { position: absolute; left: 12px; top: 12px; display: flex; gap: 8px; z-index: 3; }
.player .ctrl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 26px 12px 10px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .7)); z-index: 3; opacity: 0; transition: .2s; }
.player:hover .ctrl { opacity: 1; }
.player .ctrl button { width: 30px; height: 30px; border: 0; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.player .ctrl svg { width: 18px; height: 18px; }
.player .msgc { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #ccc; background: radial-gradient(circle, rgba(30, 20, 70, .6), rgba(0, 0, 0, .9)); z-index: 2; }
.live-pool { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 230px; z-index: 4; pointer-events: auto; padding: 12px; border-radius: 13px; background: rgba(14, 12, 36, .82); border: 1px solid rgba(139, 92, 246, .5); backdrop-filter: blur(14px); box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.live-pool .yn { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.chat-box { display: flex; flex-direction: column; min-height: 0; }
.chat-scroll { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; padding: 4px 12px 8px; min-height: 120px; }
.chat-line { font-size: 12.5px; line-height: 1.35; word-break: break-word; display: flex; gap: 7px; align-items: flex-start; }
.chat-line .av { width: 20px; height: 20px; }
.chat-line b { font-weight: 700; } .chat-line.host b { color: var(--gold) !important; }
.chat-in { display: flex; gap: 6px; padding: 8px 10px 10px; border-top: 1px solid var(--line-2); }
.react-fly { position: absolute; bottom: 60px; font-size: 26px; pointer-events: none; animation: flyup 2.4s ease-out forwards; z-index: 6; }

/* overlays (studio + OBS) */
.ovl-banner { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); text-align: center; z-index: 5; }
.ovl-banner .v { font: 900 clamp(26px, 5vw, 60px)/1 var(--display); letter-spacing: .04em; padding: 10px 46px; background: linear-gradient(180deg, rgba(60, 25, 120, .9), rgba(20, 10, 50, .9)); clip-path: polygon(6% 0, 94% 0, 100% 50%, 94% 100%, 6% 100%, 0 50%); border: 2px solid var(--accent, #a855f7); color: #fff; text-shadow: 0 0 20px var(--accent, #a855f7); }
.ovl-banner .s { display: inline-block; margin-top: -2px; font: 700 12px var(--hud); letter-spacing: .14em; padding: 4px 14px; background: rgba(60, 25, 120, .9); border: 1px solid var(--accent, #a855f7); }
.ovl-killfeed { position: absolute; left: 2%; top: 34%; display: flex; flex-direction: column; gap: 4px; z-index: 5; }
.ovl-killfeed div { font: 700 12px var(--hud); padding: 4px 10px; background: rgba(0, 0, 0, .55); border-left: 3px solid var(--accent, #22d3ee); animation: tin .3s; }
.ovl-killfeed .k { color: #67e8f9; } .ovl-killfeed .v { color: #f87171; }
.ovl-tag { position: absolute; left: 2%; bottom: 6%; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 12px; background: linear-gradient(90deg, rgba(40, 20, 80, .92), rgba(15, 10, 35, .85)); border: 1.5px solid var(--accent, #a855f7); z-index: 5; box-shadow: 0 0 26px rgba(139, 92, 246, .35); }
.ovl-tag img { width: 52px; height: 52px; border-radius: 10px; image-rendering: pixelated; }
.ovl-tag b { font: 800 17px var(--hud); display: block; } .ovl-tag small { color: var(--muted); }
.ovl-earn { position: absolute; right: 2%; bottom: 6%; padding: 12px 18px; border-radius: 12px; background: rgba(15, 10, 35, .9); border: 1.5px solid var(--gold); z-index: 5; display: flex; gap: 12px; align-items: center; box-shadow: 0 0 26px rgba(251, 191, 36, .25); }
.ovl-earn .amt { font: 900 26px var(--hud); color: var(--gold); }
.ovl-coin { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--gold); color: var(--gold); font: 900 22px var(--font); box-shadow: 0 0 18px rgba(251, 191, 36, .5); }
.ovl-score { position: absolute; right: 2%; top: 6%; min-width: 160px; padding: 8px 12px; border-radius: 10px; background: rgba(5, 10, 25, .85); border: 1px solid var(--accent, #22d3ee); z-index: 5; font: 700 13px var(--hud); }
.ovl-score .r { display: flex; justify-content: space-between; gap: 14px; } .ovl-score .a { color: #67e8f9; } .ovl-score .b { color: #f87171; }
.anim-fade-slide { animation: slidein .5s ease; } .anim-pop { animation: pop .45s cubic-bezier(.2, 1.6, .4, 1); } .anim-glitch { animation: glitch .5s steps(3); }

/* misc widgets */
.donut { position: relative; width: 120px; height: 120px; flex: none; }
.legend { display: flex; flex-direction: column; gap: 5px; font-size: 12px; flex: 1; }
.legend div { display: flex; align-items: center; gap: 7px; } .legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; } .legend b { margin-left: auto; }
.spark { width: 100%; height: 44px; }
.feat-bar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 12px 14px; }
.feat-bar .f { display: flex; gap: 9px; align-items: center; min-width: 0; }
.feat-bar .f svg { width: 22px; height: 22px; flex: none; }
.feat-bar .f b { font: 700 11.5px var(--hud); letter-spacing: .08em; text-transform: uppercase; display: block; } .feat-bar .f small { color: var(--muted); font-size: 10.5px; }
.sysbar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 1.4fr; gap: 0; overflow: hidden; }
.sysbar > div { padding: 12px 16px; border-right: 1px solid var(--line-2); }
.sysbar > div:last-child { border-right: 0; text-align: right; }
.sysbar span { font: 600 10.5px var(--hud); letter-spacing: .14em; color: var(--muted); text-transform: uppercase; display: block; }
.sysbar b { font: 700 15px var(--hud); letter-spacing: .06em; }
.lb-row { display: grid; grid-template-columns: 34px 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid rgba(255, 255, 255, .045); font-size: 13px; }
.lb-row .rk { font: 700 13px var(--hud); color: var(--gold); } .lb-row .amt { font: 700 13px var(--hud); color: var(--ok); }
.lb-row.me { border: 1px solid rgba(34, 197, 94, .5); border-radius: 10px; background: rgba(34, 197, 94, .07); padding: 9px 8px; margin-top: 8px; }
.act-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 2px; border-bottom: 1px solid rgba(255, 255, 255, .045); font-size: 12.5px; }
.act-row:last-child { border-bottom: 0; }
.act-row .t { margin-left: auto; color: var(--dim); font-size: 11px; white-space: nowrap; }
.feed-card { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: rgba(10, 10, 28, .6); cursor: pointer; }
.feed-card:hover { border-color: rgba(139, 92, 246, .5); }
.bb-trend { height: 64px; border-radius: 11px; overflow: hidden; position: relative; display: flex; align-items: center; padding: 0 16px; background: linear-gradient(90deg, rgba(124, 45, 18, .9), rgba(234, 88, 12, .7), rgba(124, 58, 237, .6)); border: 1px solid rgba(251, 146, 60, .5); }
.bb-trend b { font: 900 22px/1 var(--display); color: #fde68a; text-shadow: 0 0 16px rgba(251, 191, 36, .6); }
.bb-item { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px; border-radius: 11px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); cursor: pointer; }
.bb-item:hover { border-color: rgba(139, 92, 246, .5); }
.bb-item .thumb { aspect-ratio: 16 / 9; }
.explore { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 13px; border: 1px solid var(--line-2); cursor: pointer; transition: .2s; min-height: 76px; }
.explore:hover { transform: translateY(-2px); }
.explore svg { width: 34px; height: 34px; margin-left: auto; flex: none; }
.ex-a { background: linear-gradient(135deg, rgba(55, 48, 163, .35), rgba(15, 15, 40, .6)); border-color: rgba(129, 140, 248, .35); } .ex-a svg { color: #a78bfa; filter: drop-shadow(0 0 10px #8b5cf6); }
.ex-b { background: linear-gradient(135deg, rgba(20, 83, 45, .45), rgba(15, 15, 40, .6)); border-color: rgba(74, 222, 128, .35); } .ex-b svg { color: #4ade80; filter: drop-shadow(0 0 10px #22c55e); }
.ex-c { background: linear-gradient(135deg, rgba(120, 53, 15, .45), rgba(15, 15, 40, .6)); border-color: rgba(251, 191, 36, .35); } .ex-c svg { color: #fbbf24; filter: drop-shadow(0 0 10px #f59e0b); }
.ex-d { background: linear-gradient(135deg, rgba(112, 26, 117, .4), rgba(15, 15, 40, .6)); border-color: rgba(232, 121, 249, .35); } .ex-d svg { color: #f472b6; filter: drop-shadow(0 0 10px #ec4899); }
.qcard { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); cursor: pointer; transition: .2s; min-width: 0; }
.qcard:hover { transform: translateY(-2px); }
.qcard b { font-size: 13px; display: block; } .qcard small { font-size: 10.5px; color: #d6d8ff; opacity: .8; }
.qcard svg { width: 22px; height: 22px; margin-left: auto; flex: none; }
.pipe-step { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding: 12px; border-radius: 13px; background: rgba(12, 13, 34, .7); border: 1px solid rgba(139, 92, 246, .28); position: relative; }
.pipe-step + .pipe-step { margin-top: 18px; }
.pipe-step + .pipe-step::before { content: ''; position: absolute; top: -17px; left: 36px; width: 2px; height: 16px; background: var(--cy); }
.pipe-step + .pipe-step::after { content: ''; position: absolute; top: -5px; left: 31px; border: 6px solid transparent; border-top-color: var(--cy); }
.pipe-step .ic { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #7c3aed, #4f46e5); box-shadow: 0 0 20px rgba(124, 58, 237, .5); }
.pipe-step .ic svg { width: 26px; height: 26px; }
.pipe-step h4 { margin: 0; font: 700 12.5px var(--hud); letter-spacing: .08em; text-transform: uppercase; }
.pipe-step .sub { font-size: 11px; color: var(--cy); margin-bottom: 6px; }
.checks { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: #d5d7f7; }
.checks div { display: flex; gap: 6px; align-items: center; } .checks svg { width: 13px; height: 13px; color: var(--ok); flex: none; }
.dropzone { border: 1.5px dashed rgba(139, 92, 246, .5); border-radius: 13px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; transition: .2s; background: rgba(139, 92, 246, .04); }
.dropzone.over, .dropzone:hover { border-color: var(--cy); background: rgba(34, 211, 238, .06); color: var(--text); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.gallery .g { border-radius: 11px; overflow: hidden; border: 1px solid var(--line-2); position: relative; cursor: pointer; background: #0a0b1e; }
.gallery .g img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery .g .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; font-size: 11px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .85)); opacity: 0; transition: .2s; }
.gallery .g:hover .cap { opacity: 1; }
.roi-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; user-select: none; touch-action: none; }
.roi-wrap video, .roi-wrap canvas { width: 100%; height: 100%; object-fit: contain; }
.roi { position: absolute; border: 2px solid var(--cy); background: rgba(34, 211, 238, .12); box-shadow: 0 0 0 9999px rgba(0, 0, 0, .25); cursor: move; }
.roi .lbl { position: absolute; left: 0; top: -20px; font: 700 10px var(--hud); background: var(--cy); color: #001; padding: 2px 6px; border-radius: 4px; letter-spacing: .08em; }
.roi .hd { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: var(--cy); border-radius: 3px; cursor: nwse-resize; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.bars i { width: 4px; border-radius: 2px; background: var(--grad); }
.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.plan { padding: 20px; border-radius: 18px; display: flex; flex-direction: column; gap: 12px; }
.plan .price { font: 800 34px var(--display); } .plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; } .plan li svg { width: 16px; height: 16px; color: var(--ok); flex: none; margin-top: 1px; }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 11px; cursor: pointer; } .notif:hover { background: rgba(255, 255, 255, .04); } .notif.unread { background: rgba(139, 92, 246, .08); }
.notif .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: rgba(139, 92, 246, .16); flex: none; color: var(--pri-2); } .notif .ic svg { width: 16px; height: 16px; }
.wallet-card { padding: 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(76, 29, 149, .55), rgba(15, 12, 40, .7)); border: 1px solid rgba(168, 85, 247, .45); position: relative; overflow: hidden; }
.wallet-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(34, 211, 238, .3), transparent 70%); }
.cover { height: 180px; border-radius: 16px; overflow: hidden; position: relative; } .cover img { width: 100%; height: 100%; object-fit: cover; }
.mini-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.opt-team { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; transition: .2s; min-width: 0; }
.opt-team:hover, .opt-team.on { border-color: rgba(139, 92, 246, .6); background: rgba(139, 92, 246, .1); }
.opt-team img { width: 64px; height: 64px; object-fit: contain; }
.opt-team .lg { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font: 800 18px var(--display); background: linear-gradient(135deg, #1e1b4b, #4c1d95); border: 2px solid rgba(255, 255, 255, .2); }

/* animations */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, .55), 0 10px 30px rgba(0, 0, 0, .5); } 70% { box-shadow: 0 0 0 16px rgba(168, 85, 247, 0), 0 10px 30px rgba(0, 0, 0, .5); } 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0), 0 10px 30px rgba(0, 0, 0, .5); } }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fin { from { opacity: 0; } to { opacity: 1; } }
@keyframes pin { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-4px); opacity: 1; } }
@keyframes flyup { 0% { transform: translateY(0) scale(.8); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-260px) scale(1.25); opacity: 0; } }
@keyframes slidein { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@keyframes glitch { 0% { clip-path: inset(10% 0 60% 0); transform: translate(-6px); } 50% { clip-path: inset(50% 0 10% 0); transform: translate(6px); } 100% { clip-path: inset(0); transform: none; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
.skel { background: linear-gradient(90deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .09) 50%, rgba(255, 255, 255, .04) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 10px; min-height: 16px; }
.view-enter { animation: tin .28s ease; }

/* ---------- responsive ---------- */
@media (max-width: 1440px) { .top nav a span { display: none; } .top nav a { padding: 8px; } }
@media (max-width: 1280px) {
  :root { --right: 0px; }
  .app { grid-template-columns: var(--rail) minmax(0, 1fr) 0; }
  main.main { grid-column: 2 / 4; }
  aside.right { position: fixed; right: 0; top: var(--top); bottom: var(--status); width: min(320px, 92vw); z-index: 60; transform: translateX(105%); transition: transform .28s; background: rgba(8, 8, 24, .95); display: flex !important; }
  aside.right.open { transform: none; box-shadow: -30px 0 80px rgba(0, 0, 0, .6); }
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feat-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .scene-row .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); } .top nav { display: none; } .resp-stack { grid-template-columns: minmax(0, 1fr) !important; } .sysbar { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sysbar > div:last-child { grid-column: 1 / -1; text-align: left; } }
@media (max-width: 820px) {
  :root { --rail: 0px; --top: 54px; --status: 0px; }
  body { font-size: 14px; }
  .app { grid-template-columns: 0 minmax(0, 1fr) 0; grid-template-rows: var(--top) minmax(0, 1fr) 62px; }
  .rail { display: none; }
  .top { grid-column: 1 / 4; padding: 0 10px; gap: 6px; }
  .top .newp span, .profile-pill > div, .top .search kbd, .hide-m { display: none !important; }
  .show-m { display: grid !important; }
  main.main { grid-column: 1 / 4; padding: 10px 10px 18px; }
  .status { display: none; }
  .mobnav { display: grid; grid-column: 1 / 4; grid-row: 3; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line-2); background: rgba(6, 6, 18, .94); backdrop-filter: blur(14px); padding-bottom: env(safe-area-inset-bottom); z-index: 50; }
  .mobnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; color: var(--muted); }
  .mobnav a svg { width: 21px; height: 21px; } .mobnav a.on { color: #fff; } .mobnav a.on svg { color: var(--pri-2); filter: drop-shadow(0 0 8px #8b5cf6); }
  .g2, .g3, .g4, .g5, .g6 { grid-template-columns: minmax(0, 1fr); }
  .g2.keep-m, .g4.keep-m, .g3.keep-m { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auto-fill { grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 220px), 46%), 1fr)); }
  .g6.keep-m { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span2, .span3 { grid-column: auto; }
  .scene-row { grid-template-columns: minmax(0, 1fr); } .scene-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-pool { position: static; transform: none; width: auto; margin: 8px; }
  .pricing { grid-template-columns: minmax(0, 1fr); }
  .brain-pop { bottom: 76px; right: 12px; } .brain-fab { width: 54px; height: 54px; }
  .toasts { bottom: 76px; }
  .hero .copy { padding: 20px; }
  .core { min-height: 380px; } .core .orb { padding: 5px 8px; } .core .orb small { display: none; }
  .bb-item { grid-template-columns: 96px minmax(0, 1fr); }
  .modal-back { padding: 0; align-items: end; } .modal { border-radius: 18px 18px 0 0; max-height: 92dvh; }
}
@media (hover: none) { .ph .pc { opacity: 1; } .player .ctrl { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
