:root {
  --bg: #F6F8F7; --card: #FFFFFF; --text: #101116; --muted: #747887; --accent: #06B97C; --brand: #01F7AC; --brand-ink: #04140E; --accent-2: #E1FBF1;
  --accent-dark: #047A53; --pos: #10B981; --neg: #EF4444; --live: #FF3347; --border: #E9EAF0; --soft: #F3F3F8;
  --gold: #F5B301; --radius: 16px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,17,22,.04), 0 6px 24px rgba(16,17,22,.05);
  --shadow-lg: 0 10px 40px rgba(10,90,60,.12);
  --ink: #101116; --ink-fg: #FFFFFF; --topbar: rgba(250,250,252,.88); --hover: #FCFCFE; --line-strong: #D4D5DD;
  --tint-green: #F3FEF9; --tint-green-2: #D1FAE5; --tint-red: #FEE2E2; --tint-live: #FFE8EA; --tint-amber: #FFF7E0; --tint-orange: #FFEDD5; --tint-blue: #E0F2FE;
  --t-green: #047857; --t-red: #991B1B; --t-red-2: #B91C1C; --t-amber: #7A5300; --t-amber-2: #92400E; --t-orange: #C2410C; --t-blue: #0369A1;
  --input-bg: #FFFFFF; --modal-bg: #FFFFFF; --text-2: #3b3e4a; --t-notice: #035C3F;
  --side: 232px; --font: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif; --head: 'Plus Jakarta Sans', 'Inter', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, textarea, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -.02em; }
h1 { font-size: 30px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 15px; font-weight: 700; }
.muted { color: var(--muted); }
.pos { color: var(--pos); } .neg { color: var(--neg); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.hidden { display: none !important; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--card); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 20px 14px; z-index: 40; transition: transform .25s; }
.main-col { flex: 1; margin-left: var(--side); min-width: 0; }
.logo { display: inline-flex; align-items: center; gap: 8px; padding: 0 8px 18px; }
.logo-wordmark { height: 50px; width: auto; display: block; }
.logo-tv { background: var(--brand); color: var(--brand-ink); border-radius: 8px; padding: 0 6px; font-size: 21px; line-height: 1.3; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.logo-mobile { display: none; padding: 0; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; }
.side-nav a:hover { background: var(--soft); }
.side-nav a.active { background: var(--ink); color: var(--ink-fg); font-weight: 600; }
.side-nav .sep { height: 1px; background: var(--border); margin: 10px 8px; }
.side-nav .badge-dot { margin-left: auto; background: var(--live); color: #fff; font-size: 10px; font-weight: 700; border-radius: 99px; padding: 1px 6px; }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.me-card:hover { background: var(--soft); }
.me-card .name { font-weight: 600; font-size: 13px; }
.me-card .sub { font-size: 11px; color: var(--muted); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; padding: 14px max(28px, calc((100% - 1480px) / 2 + 28px)); background: var(--topbar); backdrop-filter: blur(10px); }
.topbar .menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 460px; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; height: 42px; color: var(--muted); }
.search input { border: 0; outline: 0; background: none; flex: 1; color: var(--text); }
.search-results { position: absolute; top: 48px; left: 0; right: 0; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); display: none; overflow: hidden; }
.search-results.open { display: block; }
.search-results a { display: flex; gap: 10px; align-items: center; padding: 10px 14px; color: var(--text); }
.search-results a:hover { background: var(--soft); }
.top-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.page { padding: 8px 28px 60px; max-width: 1480px; margin: 0 auto; width: 100%; }

/* ---------- primitives ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; font-weight: 600; white-space: nowrap; transition: transform .08s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: var(--ink-fg); }
.btn-dark:hover { background: #262833; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 4px 14px rgba(1,247,172,.35); }
.btn-primary:hover { background: #00E09B; }
.btn-ghost { background: var(--card); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--soft); }
.btn-soft { background: var(--accent-2); color: var(--accent-dark); }
.btn-danger { background: var(--tint-red); color: var(--t-red-2); }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 10px; }
.icon-btn:hover { background: var(--soft); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.section { margin-top: 30px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.section-head a { color: var(--muted); font-weight: 600; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 22px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.live-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--live); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--live); background: var(--tint-live); font-weight: 700; font-size: 11px; padding: 3px 9px; border-radius: 99px; text-transform: uppercase; }
.live-pill::before, .dot-live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse 1.6s infinite; }
.dot-live { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.dot-live::before { background: var(--accent); }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.viewers { display: inline-flex; align-items: center; gap: 4px; background: rgba(16,17,22,.65); color: #fff; font-weight: 700; font-size: 11px; padding: 3px 7px; border-radius: 6px; }
.viewers svg { width: 12px; height: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--soft); font-size: 12px; font-weight: 600; color: var(--text-2); }
.chip-accent { background: var(--accent-2); color: var(--accent-dark); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); font-weight: 600; color: var(--text-2); }
.tab:hover { background: var(--soft); }
.tab.active { background: var(--ink); color: var(--ink-fg); border-color: var(--ink); }
.tabs.accent .tab.active { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.underline-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--border); }
.underline-tabs button { padding: 12px 0; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.underline-tabs button.active { color: var(--accent); border-color: var(--accent); }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; object-fit: cover; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; background: var(--accent); overflow: hidden; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.xl { width: 112px; height: 112px; font-size: 34px; border: 5px solid var(--card); box-shadow: var(--shadow); }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-stack { display: flex; } .avatar-stack .avatar { border: 2px solid var(--card); margin-left: -8px; } .avatar-stack .avatar:first-child { margin-left: 0; }
.verified { color: var(--accent); display: inline-flex; } .verified svg { width: 16px; height: 16px; fill: var(--accent); stroke: var(--card); stroke-width: 2.4; }
.plat { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.plat-ico { width: 20px; height: 20px; border-radius: 6px; display: block; flex: none; object-fit: cover; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty .em-ico { width: 54px; height: 54px; border-radius: 16px; background: var(--accent-2); color: var(--accent); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .em-ico svg { width: 26px; height: 26px; }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.empty p { margin: 0 auto 16px; max-width: 420px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--accent-2); color: var(--t-notice); font-size: 13px; line-height: 1.5; }
.notice.warn { background: var(--tint-amber); color: var(--t-amber); }
.notice.err { background: var(--tint-red); color: var(--t-red); }
.notice svg { margin-top: 1px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 13px; }
.field .hint { color: var(--muted); font-size: 12px; }
.input { height: 42px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; background: var(--input-bg); color: var(--text); outline: 0; width: 100%; }
textarea.input { height: auto; padding: 10px 12px; resize: vertical; min-height: 80px; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-2); }
.switch { position: relative; width: 40px; height: 22px; border-radius: 99px; background: var(--line-strong); transition: .2s; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch.on { background: var(--accent); } .switch.on::after { left: 21px; }
.skeleton { background: linear-gradient(90deg, var(--soft) 25%, var(--border) 37%, var(--soft) 63%); background-size: 400% 100%; animation: sk 1.4s infinite; border-radius: 10px; }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(300px, 340px); gap: 22px; align-items: stretch; }
.hero-intro { padding: 30px 0 10px; display: flex; flex-direction: column; justify-content: center; }
.hero-intro h1 { font-size: clamp(42px, 4.4vw, 62px); line-height: .98; letter-spacing: -.045em; margin: 14px 0 18px; }
.hero-intro h1 em { font-style: normal; color: var(--accent); }
.hero-intro p { color: var(--text-2); font-size: 15px; line-height: 1.55; margin: 0 0 22px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.watching { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--text-2); font-size: 13px; }
.display-wrap { position: relative; min-height: 400px; border-radius: 24px; background: radial-gradient(ellipse at 50% 60%, var(--tint-green) 0%, transparent 65%); }
.display-wrap canvas { display: block; width: 100%; height: 100%; outline: none; cursor: grab; }
.display-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow); display: grid; place-items: center; z-index: 2; }
.display-arrow.l { left: 6px; } .display-arrow.r { right: 6px; }
.display-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.display-dots i { width: 22px; height: 5px; border-radius: 9px; background: var(--line-strong); transition: .3s; }
.display-dots i.on { width: 28px; background: var(--text); }
.display-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.tour-card { padding: 20px; display: flex; flex-direction: column; }
.tour-card .label { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.tour-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 14px; }
.tour-title h2 { font-size: 22px; letter-spacing: -.03em; }
.clock { display: inline-flex; align-items: center; gap: 6px; font-family: var(--head); font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.clock svg { width: 20px; height: 20px; stroke-width: 2.4; }
.pool-box { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; background: var(--soft); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.pool-box .v { font-family: var(--head); font-weight: 800; font-size: 22px; display: flex; align-items: center; gap: 6px; }
.pool-box .v small { font-size: 12px; color: var(--muted); font-weight: 700; }
.lb-mini { display: flex; flex-direction: column; }
.lb-mini a { display: grid; grid-template-columns: 26px 32px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-radius: 10px; font-weight: 600; }
.lb-mini a:hover { background: var(--soft); }
.lb-mini .rk { color: var(--muted); font-weight: 700; font-size: 13px; text-align: center; }
.crown { color: var(--gold); } .crown svg { fill: var(--gold); stroke: var(--gold); width: 18px; height: 18px; }

/* ---------- stream cards ---------- */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 16px; flex-wrap: wrap; }
.stream-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.stream-card { overflow: hidden; display: block; transition: transform .15s, box-shadow .15s; }
.stream-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.thumb { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #0E2A20, #0a0f0d); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .tl { position: absolute; top: 8px; left: 8px; display: flex; gap: 6px; }
.thumb .tr { position: absolute; top: 8px; right: 8px; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.35); }
.thumb .ph svg { width: 34px; height: 34px; }
.sc-body { padding: 10px 12px 12px; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.sc-body .nm { font-weight: 700; display: flex; align-items: center; gap: 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sc-body .ttl { grid-column: 1 / -1; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pnl { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- tournaments ---------- */
.t-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.t-card { padding: 18px; display: grid; grid-template-columns: 96px 1fr; gap: 16px; align-items: center; transition: box-shadow .15s; }
.t-card.featured { border: 2px solid var(--accent); box-shadow: 0 8px 30px rgba(1,200,140,.18); }
.t-card h3 { font-family: var(--head); font-weight: 800; font-size: 18px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t-card .meta { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.t-card .meta b { color: var(--text); font-family: var(--head); font-size: 17px; }
.t-card .foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.trophy { width: 96px; height: 96px; display: grid; place-items: center; border-radius: 22px; }
.trophy svg { width: 64px; height: 64px; stroke: none; }
.status-chip { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .03em; }
.st-registration { background: var(--tint-blue); color: var(--t-blue); } .st-scheduled { background: var(--soft); color: var(--muted); }
.st-live { background: var(--tint-live); color: var(--live); } .st-verifying { background: var(--tint-amber); color: var(--t-amber-2); }
.st-review { background: var(--tint-orange); color: var(--t-orange); } .st-finalized, .st-paid { background: var(--tint-green-2); color: var(--t-green); } .st-cancelled { background: var(--soft); color: var(--muted); }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .2s; }
.table tbody tr:hover { background: var(--hover); }
.table tr.top3 td:first-child { font-weight: 800; }
.table-wrap { overflow-x: auto; }
.rank-cell { width: 44px; text-align: center; font-weight: 700; color: var(--muted); }
.flash-up { animation: flashUp 1.2s; } .flash-down { animation: flashDown 1.2s; }
@keyframes flashUp { 0% { background: var(--tint-green-2) } 100% { background: transparent } }
@keyframes flashDown { 0% { background: var(--tint-red) } 100% { background: transparent } }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.layout-watch { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.stat-list { display: flex; flex-direction: column; gap: 16px; }
.stat { display: flex; align-items: center; gap: 12px; }
.stat .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-2); color: var(--accent); display: grid; place-items: center; }
.stat .v { font-family: var(--head); font-weight: 800; font-size: 18px; }
.stat .k { color: var(--muted); font-size: 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; }
.kpi .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .v { font-family: var(--head); font-weight: 800; font-size: 22px; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- player / watch ---------- */
.player { position: relative; aspect-ratio: 16/9; background: #0d0d14; border-radius: var(--radius); overflow: hidden; }
.player video { width: 100%; height: 100%; object-fit: contain; background: #0d0d14; }
.player .cam { position: absolute; right: 14px; bottom: 56px; width: 22%; min-width: 120px; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; border: 2px solid rgba(255,255,255,.6); background: #000; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.player .cam video { object-fit: cover; }
.player .overlay-tl { position: absolute; top: 14px; left: 14px; display: flex; gap: 8px; }
.player .controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px; display: flex; align-items: center; gap: 8px; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; opacity: 0; transition: .2s; }
.player:hover .controls { opacity: 1; }
.player .controls button { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.player .controls button:hover { background: rgba(255,255,255,.15); }
.player .state { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #c9c9d6; padding: 20px; }
.player .state h3 { color: #fff; margin-bottom: 6px; }
.player .reactions { position: absolute; right: 20px; bottom: 60px; width: 60px; height: 260px; pointer-events: none; }
.float-emoji { position: absolute; bottom: 0; font-size: 26px; animation: floatUp 2.6s ease-out forwards; }
@keyframes floatUp { 0% { transform: translateY(0) scale(.6); opacity: 0 } 15% { opacity: 1; transform: translateY(-20px) scale(1) } 100% { transform: translateY(-240px) translateX(var(--dx, 0)); opacity: 0 } }
.streamer-bar { display: flex; align-items: center; gap: 14px; padding: 16px 4px; flex-wrap: wrap; }
.streamer-bar .nm { font-family: var(--head); font-weight: 800; font-size: 20px; display: flex; align-items: center; gap: 6px; }
.perf { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.perf .card { padding: 16px; }
.perf .k { font-size: 12px; font-weight: 600; color: var(--muted); }
.perf .v { font-family: var(--head); font-weight: 800; font-size: 24px; margin: 6px 0 2px; display: flex; align-items: center; gap: 6px; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: calc(100vh - 110px); min-height: 520px; position: sticky; top: 84px; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.chat-head h3 { font-size: 16px; }
.chat-pin { margin: 10px 12px 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-2); color: var(--t-notice); font-size: 12px; display: flex; gap: 8px; align-items: flex-start; }
.chat-list { flex: 1; overflow-y: auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.chat-msg { display: flex; gap: 8px; padding: 5px 6px; border-radius: 8px; font-size: 13px; line-height: 1.4; position: relative; }
.chat-msg:hover { background: var(--soft); }
.chat-msg .u { font-weight: 700; margin-right: 4px; cursor: pointer; }
.chat-msg .t { color: var(--text-2); word-break: break-word; }
.chat-msg .act { display: none; position: absolute; right: 4px; top: 2px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.chat-msg:hover .act { display: flex; }
.chat-msg .act button { font-size: 11px; padding: 2px 6px; border-radius: 6px; color: var(--muted); }
.chat-msg .act button:hover { background: var(--soft); color: var(--text); }
.chat-msg.system { background: var(--tint-green); color: var(--t-green); font-weight: 600; font-size: 12px; }
.chat-msg.announcement { background: var(--ink); color: var(--ink-fg); font-weight: 600; }
.chat-msg.milestone { background: var(--tint-green); color: var(--t-green); font-weight: 600; font-size: 12px; }
.chat-msg.cheer { color: var(--accent-dark); font-size: 12px; font-weight: 600; }
.chat-emoji { display: flex; gap: 2px; padding: 6px 10px; border-top: 1px solid var(--border); overflow-x: auto; }
.chat-emoji button { font-size: 18px; padding: 4px 6px; border-radius: 8px; }
.chat-emoji button:hover { background: var(--soft); transform: scale(1.15); }
.chat-form { display: flex; gap: 8px; padding: 10px 12px 12px; }
.chat-form input { flex: 1; height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; outline: 0; background: var(--soft); }
.chat-form input:focus { border-color: var(--accent); background: var(--input-bg); }

/* ---------- go live ---------- */
.golive { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
.steps { display: flex; flex-direction: column; gap: 8px; }
.step { display: flex; gap: 14px; padding: 14px; border-radius: 14px; border: 1px solid transparent; }
.step.active { background: var(--card); border-color: var(--border); box-shadow: var(--shadow); }
.step .n { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--accent-2); color: var(--accent); flex: none; }
.step.done .n { background: var(--pos); color: #fff; }
.step.active .n { background: var(--brand); color: var(--brand-ink); }
.step h3 { font-size: 14px; } .step p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.plat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.plat-opt { padding: 16px; border-radius: 14px; border: 2px solid var(--border); background: var(--card); display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 700; }
.plat-opt .plat-ico { width: 44px; height: 44px; border-radius: 12px; }
.plat-opt.sel { border-color: var(--accent); background: var(--tint-green); }
.plat-opt small { color: var(--muted); font-weight: 500; font-size: 11px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.studio-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

/* ---------- profile ---------- */
.banner { height: 200px; border-radius: var(--radius); background: #01F7AC url('/img/banner.jpg'); background-size: cover; background-position: center; }
.profile-head { display: flex; align-items: flex-end; gap: 18px; margin: -56px 0 0 24px; flex-wrap: wrap; }
.profile-head .info { padding-bottom: 6px; flex: 1; min-width: 220px; }
.profile-head .nm { font-family: var(--head); font-weight: 800; font-size: 26px; display: flex; gap: 6px; align-items: center; margin-top: 60px; }
.profile-stats { display: flex; gap: 28px; margin: 18px 0; flex-wrap: wrap; }
.profile-stats div b { display: block; font-family: var(--head); font-size: 20px; font-weight: 800; }
.profile-stats div span { color: var(--muted); font-size: 12px; }

/* ---------- clips ---------- */
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.clip-card { overflow: hidden; cursor: pointer; }
.clip-card .thumb .dur { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.7); color: #fff; font-weight: 700; font-size: 11px; padding: 2px 6px; border-radius: 6px; }

/* ---------- duel ---------- */
.duel-split { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.vs { width: 56px; height: 56px; border-radius: 50%; background: var(--ink); color: var(--ink-fg); font-family: var(--head); font-weight: 800; display: grid; place-items: center; font-size: 18px; }
.bar-compare { height: 10px; border-radius: 99px; background: var(--soft); overflow: hidden; display: flex; }
.bar-compare i { display: block; height: 100%; transition: width .6s; }

/* ---------- modal / toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(16,17,22,.4); backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: min(480px, 100%); max-height: 90vh; overflow-y: auto; background: var(--modal-bg); color: var(--text); border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.2); padding: 24px; animation: pop .18s; }
.modal.wide { width: min(860px, 100%); }
.modal h2 { margin-bottom: 6px; }
@keyframes fade { from { opacity: 0 } } @keyframes pop { from { transform: scale(.96); opacity: 0 } }
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: var(--ink-fg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 500; max-width: 380px; animation: pop .2s; }
.toast.err { background: #B91C1C; } .toast.ok { background: #047857; }
.scrim { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1380px) { .hero { grid-template-columns: minmax(200px, 250px) minmax(0, 1fr) 310px; } }
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr 1fr; } .hero .display-wrap { grid-column: 1 / -1; grid-row: 1; min-height: 360px; }
  .layout-watch, .layout-2 { grid-template-columns: 1fr; } .chat { position: static; height: 560px; }
  .golive { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); } .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 35; }
  .main-col { margin-left: 0; } .topbar .menu-btn, .logo-mobile { display: inline-flex; }
  .topbar { padding: 10px 16px; gap: 10px; } .page { padding: 4px 16px 50px; }
  .search { display: none; } .hero { grid-template-columns: 1fr; } .hero-intro { padding-top: 8px; }
  .hero .display-wrap { min-height: 300px; }
  .perf, .studio-stats { grid-template-columns: repeat(2, 1fr); } .plat-grid { grid-template-columns: repeat(2, 1fr); }
  .t-card { grid-template-columns: 70px 1fr; } .trophy { width: 70px; height: 70px; } .trophy svg { width: 46px; height: 46px; }
  .duel-split { grid-template-columns: 1fr; } .vs { margin: 0 auto; }
  .top-actions .btn-label { display: none; }
}

.display-fallback { padding: 30px; }
.display-fallback .stream-card { width: min(520px, 100%); }
.mini-live { width: 7px; height: 7px; border-radius: 50%; background: var(--live); display: inline-block; margin-left: 4px; vertical-align: middle; }

.logo-img { width: 38px; height: 38px; border-radius: 10px; flex: none; }
.logo-mobile .logo-img { width: 32px; height: 32px; }
.logo-mobile .logo-wordmark { height: 38px; }
.underline-tabs button.active { color: var(--text); border-color: var(--brand); }

.table th, .table td { padding-left: 10px; padding-right: 10px; }
@media (max-width: 1600px) { .col-wallet { display: none; } }
.pfp-pick { width: 80px; height: 80px; border-radius: 50%; flex: none; display: grid; place-items: center; cursor: pointer; overflow: hidden; background: var(--bg); border: 2px dashed var(--border); color: var(--muted); transition: border-color .15s; }
.pfp-pick:hover { border-color: var(--accent); color: var(--accent); }
.pfp-pick img { width: 100%; height: 100%; object-fit: cover; }
button.step { width: 100%; text-align: left; font: inherit; color: inherit; background: none; cursor: pointer; align-items: center; }
.step.clickable:hover { background: var(--card); border-color: var(--border); }
.step .step-edit { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--accent); }
.live-bar { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; background: #101116; color: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.live-bar .lb-v { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: 13px; }
.live-bar .lb-v svg { width: 16px; height: 16px; }
@media (max-width: 860px) { .live-bar { left: 12px; right: 12px; bottom: 12px; justify-content: space-between; } }
/* account dropdown */
.user-menu { position: relative; }
#userBtn .chev { opacity: .7; margin-left: -2px; transition: transform .15s; }
#userBtn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.user-drop { position: absolute; right: 0; top: calc(100% + 8px); width: 290px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 50px rgba(16,17,22,.16); padding: 8px; z-index: 80; animation: udIn .12s ease-out; }
@keyframes udIn { from { opacity: 0; transform: translateY(-4px); } }
.user-drop .ud-head { display: flex; gap: 12px; align-items: center; padding: 8px 8px 10px; }
.user-drop .ud-name { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-drop .ud-x { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; vertical-align: 1px; }
.user-drop .ud-wallet { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; padding: 2px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; }
.user-drop .ud-wallet:hover { color: var(--text, #101116); border-color: var(--accent); }
.user-drop .ud-wallet svg { width: 13px; height: 13px; }
.user-drop .ud-bal { display: flex; justify-content: space-between; align-items: center; margin: 0 4px 6px; padding: 10px 12px; border-radius: 12px; background: var(--tint-green); font-size: 13px; }
.user-drop .ud-sec { border-top: 1px solid var(--border); padding: 6px 0; }
.user-drop .ud-sec a, .user-drop .ud-out { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; font-size: 14px; font-weight: 600; color: inherit; background: none; border: 0; font-family: inherit; cursor: pointer; text-align: left; }
.user-drop .ud-sec a:hover, .user-drop .ud-out:hover { background: var(--bg); }
.user-drop .ud-sec svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.user-drop .ud-out { color: #E5484D; }
.user-drop .ud-out svg { opacity: 1; }
@media (max-width: 860px) { .user-drop { position: fixed; right: 10px; left: 10px; top: 64px; width: auto; max-height: calc(100vh - 80px); overflow: auto; } }

/* ---------- dark theme ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A0C0B; --card: #121514; --text: #ECEFED; --muted: #8C9390; --border: #232826; --soft: #191D1B;
  --accent: #1ED99A; --accent-2: rgba(1,247,172,.12); --accent-dark: #4BE8B2; --pos: #34D399; --neg: #F87171;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 24px rgba(0,0,0,.35); --shadow-lg: 0 10px 40px rgba(0,0,0,.55);
  --ink: #ECEFED; --ink-fg: #0A0C0B; --topbar: rgba(10,12,11,.86); --hover: #171B19; --line-strong: #353B38;
  --tint-green: rgba(1,247,172,.09); --tint-green-2: rgba(16,185,129,.18); --tint-red: rgba(239,68,68,.16); --tint-live: rgba(255,51,71,.16);
  --tint-amber: rgba(245,179,1,.14); --tint-orange: rgba(249,115,22,.16); --tint-blue: rgba(56,189,248,.14);
  --t-green: #6EE7B7; --t-red: #FCA5A5; --t-red-2: #FCA5A5; --t-amber: #FCD34D; --t-amber-2: #FCD34D; --t-orange: #FDBA74; --t-blue: #7DD3FC;
  --input-bg: #0E1110; --modal-bg: #151918; --text-2: #C4CAC7; --t-notice: #8EF5D0;
}
:root[data-theme="dark"] .sidebar { background: #0E1110; }
:root[data-theme="dark"] .btn-ghost { background: var(--card); }
:root[data-theme="dark"] .live-bar { background: #1A1F1D; border: 1px solid var(--border); }
:root[data-theme="dark"] .scrim { background: rgba(0,0,0,.6); }
:root[data-theme="dark"] img.plat-ico { box-shadow: 0 0 0 1px rgba(255,255,255,.08); }

/* theme toggle, X link, CA */
.theme-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--card); color: var(--text); flex: none; }
.theme-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.x-link { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); transition: transform .15s, border-color .15s; }
.x-link:hover { transform: translateY(-2px); border-color: var(--accent); }
.x-link img { height: 36px; width: auto; }
.ca-badge { display: inline-flex; align-items: center; flex: none; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); }
.ca-badge img { height: 24px; width: auto; display: block; }
.ca-chip { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: var(--head); font-weight: 800; cursor: pointer; flex: none; }
.ca-chip .mono { font-size: 12px; }
.ca-chip svg { width: 15px; height: 15px; }
.hero-ca { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.hero-ca .ca-badge { height: 52px; padding: 0 16px; flex: 0 1 auto; min-width: 0; }
.hero-ca .ca-badge img { height: auto; max-height: 28px; max-width: 100%; }
.hero-ca .x-link { width: 52px; height: 52px; }
.hero-ca .x-link img { height: 42px; }
.side-social { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; }
.side-social .x-link { width: 40px; height: 40px; } .side-social .x-link img { height: 32px; }
.side-social span { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.3; }
@media (max-width: 1180px) { .topbar .ca-badge, .topbar .ca-chip, .topbar .x-link { display: none; } }
.user-drop .ud-sec button svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 520px) { .topbar .theme-btn { display: none; } .hero-ca .ca-badge { height: 46px; padding: 0 10px; } .hero-ca .x-link { width: 46px; height: 46px; } .hero-ca .x-link img { height: 36px; } }
.side-theme { display: flex; align-items: center; margin: 0 8px 10px; justify-content: flex-start; gap: 10px; width: auto; height: 38px; padding: 0 12px; font-weight: 600; font-size: 13px; }
