/* Lucabots Stream — design system. Calm, dark, one accent colour per streamer. */
:root {
  color-scheme: dark;
  --bg: #0a0b10;
  --bg-2: #0d0f16;
  --surface: #12141c;
  --surface-2: #171a24;
  --surface-3: #1d2130;
  --line: #222637;
  --line-2: #2c3145;
  --text: #eceef5;
  --sub: #9299ad;
  --dim: #646b80;
  --accent: #6d7cff;
  --accent-2: #4dd8ff;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --live: #ff4d6d;
  --twitch: #9146ff;
  --r: 14px;
  --r-sm: 10px;
  --r-lg: 20px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --side: 252px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; background: var(--bg); color: var(--text);
  font: 14.5px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(900px 480px at 85% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
    radial-gradient(700px 420px at -10% 110%, color-mix(in srgb, var(--accent-2) 6%, transparent), transparent 70%);
  transition: background .6s var(--ease);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; }
h1, h2, h3, p { margin: 0; }
::selection { background: color-mix(in srgb, var(--accent) 40%, transparent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ── wordmark ─────────────────────────────────────────────── */
.wm { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.wm b { color: var(--text); font-weight: 800; }
.wm i {
  font-style: normal; background: linear-gradient(100deg, #6d7cff, #4dd8ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wm .tag {
  font: 700 9.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--sub);
  padding: 4px 7px; border: 1px solid var(--line-2); border-radius: 999px;
}

/* ── layout ───────────────────────────────────────────────── */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  backdrop-filter: blur(12px); overflow-y: auto;
}
.sidebar .brand { padding: 4px 8px 14px; font-size: 18px; }
.main { min-width: 0; padding: 28px clamp(16px, 3vw, 40px) 60px; }
.main-inner { max-width: 1200px; margin: 0 auto; }
.topbar { display: none; }
.scrim { display: none; }
.switcher svg, .menu svg { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.av svg { width: 58%; height: 58%; stroke: currentColor; fill: none; stroke-width: 1.8; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 16px 10px 6px; font: 600 11px/1 var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.nav a, .nav .soon {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--sub); font-weight: 500; transition: background .15s, color .15s;
}
.nav a svg, .nav .soon svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--accent-soft); color: var(--text); }
.nav a.active svg { color: var(--accent); }
.nav .soon { opacity: .45; cursor: default; }
.nav .soon .pill { margin-left: auto; }
.nav .count { margin-left: auto; font: 600 11px/1 var(--mono); color: var(--sub); }
.nav .badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--live); color: #fff; font: 700 11px/1 var(--font); }

.switcher { position: relative; margin: 2px 0 6px; }
.switcher > button {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; text-align: left;
}
.switcher > button:hover { border-color: var(--line-2); }
.switcher .sw-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher .sw-sub { display: block; font-size: 11.5px; color: var(--dim); font-weight: 500; }
.switcher .chev { color: var(--dim); }
.menu {
  position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 6px); padding: 6px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 18px 40px rgba(0,0,0,.45);
  max-height: 340px; overflow-y: auto; animation: pop .16s var(--ease);
}
.menu button, .menu a {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left;
}
.menu button:hover, .menu a:hover { background: var(--surface-3); }
.menu .sep { height: 1px; margin: 6px 4px; background: var(--line); }
.menu.pop { position: fixed; z-index: 300; right: auto; bottom: auto; min-width: 220px; max-width: calc(100vw - 16px); }

.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; border-top: 1px solid var(--line); }
.me .who { flex: 1; min-width: 0; line-height: 1.25; }
.me .who b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who span { font-size: 12px; color: var(--dim); }

/* ── support bar ──────────────────────────────────────────── */
#support-bar {
  display: none; position: sticky; top: 0; z-index: 60; align-items: center; justify-content: center; gap: 12px;
  padding: 8px 16px; background: linear-gradient(90deg, #f97316, #f59e0b); color: #1a1205; font-weight: 600; font-size: 13.5px;
}
#support-bar.on { display: flex; }
#support-bar button { border: 0; padding: 4px 12px; border-radius: 999px; background: rgba(0,0,0,.18); color: inherit; font-weight: 700; cursor: pointer; }
#support-bar button:hover { background: rgba(0,0,0,.28); }

/* ── page header ──────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-size: 26px; letter-spacing: -.025em; line-height: 1.15; }
.page-head p { color: var(--sub); margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── surfaces ─────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 650; flex-wrap: wrap; }
.points-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.card-title svg { width: 18px; height: 18px; flex: none; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card-title .sub { font-weight: 500; color: var(--dim); font-size: 13px; }
.card-title .right { margin-left: auto; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.muted { color: var(--sub); }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.empty { padding: 34px 16px; text-align: center; color: var(--sub); }
.empty svg { width: 34px; height: 34px; margin: 0 auto 10px; stroke: var(--dim); fill: none; stroke-width: 1.6; }

/* ── KPI ──────────────────────────────────────────────────── */
.kpi { padding: 16px 18px; }
.kpi .label { color: var(--sub); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.kpi .label svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu svg { color: var(--sub); }
.kpi .value { font-size: 28px; font-weight: 750; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 12.5px; color: var(--dim); margin-top: 2px; }

/* ── controls ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--sub); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); color: #1b0a0a; border-color: transparent; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn.twitch { background: var(--twitch); color: #fff; border-color: transparent; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; color: var(--sub); }
.field .help { font-size: 12.5px; color: var(--dim); }
.input, select.input, textarea.input {
  width: 100%; height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: var(--bg-2); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-wrap { position: relative; }
.input-wrap .adorn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12.5px; }
.input-prefix { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg-2); overflow: hidden; }
.input-prefix span { padding: 0 4px 0 12px; color: var(--dim); }
.input-prefix .input { border: 0; background: transparent; box-shadow: none; padding-left: 0; }
.input-prefix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.swatch.on { border-color: var(--text); }
.swatches input[type=color] { width: 34px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; }

.switch { position: relative; display: inline-block; vertical-align: middle; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--sub); transition: transform .18s var(--ease), background .15s; }
.switch input:checked + span { background: var(--accent); border-color: transparent; }
.switch input:checked + span::after { transform: translateX(16px); background: #fff; }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--sub); cursor: pointer; }
.seg button.on { background: var(--surface-3); color: var(--text); }

/* ── pills, avatars ───────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--sub); }
.pill.ok { background: rgba(52,211,153,.12); color: var(--ok); }
.pill.warn { background: rgba(251,191,36,.12); color: var(--warn); }
.pill.bad { background: rgba(248,113,113,.12); color: var(--bad); }
.pill.accent { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 70%, white); }
.pill.live { background: var(--live); color: #fff; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.live .dot { background: #fff; animation: pulse 1.6s ease-in-out infinite; }

.av { position: relative; flex: none; border-radius: 50%; overflow: hidden; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; color: var(--sub); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av-ring { padding: 2px; border-radius: 50%; background: var(--line-2); }
.av-ring.live { background: linear-gradient(135deg, var(--live), #ff9a3c); }
.av-ring > .av { border: 2px solid var(--surface); }

/* ── tables ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 -18px -18px; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 600; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; padding: 10px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: rgba(255,255,255,.015); }

/* ── dialogs, toasts ──────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(5,6,10,.66); backdrop-filter: blur(4px); animation: fade .15s ease; }
.dialog { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.55); animation: pop .2s var(--ease); }
.dialog.wide { max-width: 640px; }
.dialog h2 { font-size: 18px; letter-spacing: -.02em; margin-bottom: 6px; }
.dialog .text { color: var(--sub); margin-bottom: 16px; }
.dialog .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.drawer { position: fixed; z-index: 100; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); border-left: 1px solid var(--line-2); padding: 22px; overflow-y: auto; animation: slideIn .22s var(--ease); }

#toasts { position: fixed; z-index: 200; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: 0 12px 30px rgba(0,0,0,.4); animation: toastIn .25s var(--ease); font-weight: 500; }
.toast.ok::before, .toast.bad::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.toast.ok::before { background: var(--ok); }
.toast.bad::before { background: var(--bad); }
.toast.out { animation: toastOut .2s ease forwards; }

/* ── skeleton & motion ────────────────────────────────────── */
.skel { border-radius: 8px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.view-enter > * { animation: rise .35s var(--ease) both; }
.view-enter > :nth-child(2) { animation-delay: .04s; }
.view-enter > :nth-child(3) { animation-delay: .08s; }
.view-enter > :nth-child(4) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(1turn); } }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* ── feature pages ────────────────────────────────────────── */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); cursor: pointer; }
.toggle-row b { font-weight: 600; }
.input-suffix { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg-2); overflow: hidden; }
.input-suffix .input { border: 0; background: transparent; box-shadow: none; }
.input-suffix span { padding: 0 12px; color: var(--dim); font-size: 13px; white-space: nowrap; }
.input-suffix:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.var-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.var-chips button { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--sub); border-radius: 6px; padding: 2px 7px; font: 600 11.5px var(--mono); cursor: pointer; }
.var-chips button:hover { color: var(--text); border-color: var(--accent); }
.preview { margin-top: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px dashed var(--line-2); font-size: 13.5px; overflow-wrap: anywhere; }
.preview::before { content: 'Vorschau'; display: block; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.feature-card { display: flex; flex-direction: column; gap: 14px; }
.feature-card > .head { display: flex; align-items: center; gap: 12px; }
.feature-card > .head .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); flex: none; font-size: 20px; }
.feature-card > .head .ico svg { width: 20px; height: 20px; stroke: color-mix(in srgb, var(--accent) 65%, white); fill: none; stroke-width: 2; }
.feature-card > .head .t { flex: 1; min-width: 0; }
.feature-card > .head .t b { display: block; font-size: 15px; }
.feature-card.off > :not(.head) { opacity: .5; pointer-events: none; }
.cmd-name { font: 650 13.5px var(--mono); color: color-mix(in srgb, var(--accent) 60%, white); }
.resp-list { display: flex; flex-direction: column; gap: 8px; }
.resp-row { display: flex; gap: 8px; align-items: flex-start; }
.resp-row textarea { flex: 1; }
.chat-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; height: calc(100vh - 170px); min-height: 480px; }
.chat-box { position: relative; display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.chat-list { flex: 1; overflow-y: auto; padding: 12px 6px 12px 14px; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.chat-line { position: relative; display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; border-radius: 8px; line-height: 1.45; animation: fade .2s ease; }
.chat-line:hover { background: rgba(255,255,255,.03); }
.chat-line .time { font: 11px var(--mono); color: var(--dim); flex: none; }
.chat-line .who { font-weight: 700; flex: none; }
.chat-line .txt { overflow-wrap: anywhere; min-width: 0; }
.chat-line.deleted .txt { text-decoration: line-through; opacity: .45; }
.chat-line.bot { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.chat-line .acts { position: absolute; right: 6px; top: 2px; display: none; gap: 4px; }
.chat-line:hover .acts { display: flex; }
.chat-line .acts button { border: 1px solid var(--line-2); background: var(--surface-3); color: var(--sub); border-radius: 6px; padding: 2px 7px; font-size: 11.5px; cursor: pointer; }
.chat-line .acts button:hover { color: var(--bad); border-color: var(--bad); }
.role-badge { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; font: 700 9px var(--font); color: #fff; margin-right: 3px; vertical-align: 1px; }
.chat-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat-new { position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); }
@media (max-width: 960px) { .chat-wrap { grid-template-columns: minmax(0, 1fr); height: auto; } .chat-box { height: 70vh; } }

/* ── motion ───────────────────────────────────────────────── */
/* loading bar at the very top while requests run */
#loadbar { position: fixed; z-index: 400; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; opacity: 0; transition: opacity .25s; }
#loadbar i { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--accent), var(--accent-2), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: loadSlide 1.1s ease-in-out infinite; }
#loadbar.on { opacity: 1; }
#loadbar.done { opacity: 0; }
@keyframes loadSlide { from { background-position: -60% 0; } to { background-position: 160% 0; } }

/* ink ripple */
.btn, .nav a, .seg button, .chipset button { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: currentColor; opacity: .18; transform: scale(0); pointer-events: none; animation: ripple .6s var(--ease) forwards; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

/* refresh button */
.btn.refresh svg { transition: transform .3s var(--ease); }
.btn.refresh:hover svg { transform: rotate(-30deg); }
.btn.refresh.spinning svg { animation: spin .65s linear infinite; }

/* live change highlight */
.flash { animation: flash 1.2s var(--ease); }
@keyframes flash { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 30% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); } 100% { box-shadow: var(--shadow); } }

/* page skeleton fades in only if loading takes a moment */
.page-skel { animation: fade .3s ease .15s both; }

/* staggered entrance for lists and grids */
.view-enter .grid > *, .view-enter .scards > *, .view-enter .stack > .app-row, .view-enter table.t tbody tr, .view-enter .audit-row, .view-enter .top-chatter, .view-enter .event {
  animation: rise .45s var(--ease) both;
}
.view-enter :is(.grid, .scards, .stack, tbody, .card) > :nth-child(1) { animation-delay: .04s; }
.view-enter :is(.grid, .scards, .stack, tbody, .card) > :nth-child(2) { animation-delay: .08s; }
.view-enter :is(.grid, .scards, .stack, tbody, .card) > :nth-child(3) { animation-delay: .12s; }
.view-enter :is(.grid, .scards, .stack, tbody, .card) > :nth-child(4) { animation-delay: .16s; }
.view-enter :is(.grid, .scards, .stack, tbody, .card) > :nth-child(5) { animation-delay: .20s; }
.view-enter :is(.grid, .scards, .stack, tbody, .card) > :nth-child(6) { animation-delay: .24s; }
.view-enter :is(.grid, .scards, .stack, tbody, .card) > :nth-child(7) { animation-delay: .28s; }
.view-enter :is(.grid, .scards, .stack, tbody, .card) > :nth-child(n+8) { animation-delay: .32s; }

/* cards lift a little on hover */
.card.kpi, .card.scard, .app-row { transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.card.kpi:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 16px 36px rgba(0,0,0,.35); }
.kpi .value { animation: pop .5s var(--ease) both; }

/* slowly drifting gradient on banners */
.hero-banner, .scard .banner { background-size: 160% 160%; animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* active nav entry glides in */
.nav a { transition: background .2s var(--ease), color .2s, transform .15s var(--ease); }
.nav a:hover { transform: translateX(2px); }
.nav a.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); animation: grow .3s var(--ease); }
@keyframes grow { from { transform: scaleY(0); } }

/* modal & drawer & menus */
.dialog { transform-origin: 50% 40%; }
.menu.pop { animation: pop .14s var(--ease); transform-origin: top right; }

/* table rows highlight */
table.t tbody tr { transition: background .15s; }

/* ── responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 90; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .25s var(--ease); }
  .app.nav-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .app.nav-open .scrim { display: block; }
  .scrim { display: none; position: fixed; inset: 0; z-index: 80; background: rgba(5,6,10,.6); }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40;
    height: 56px; padding: 0 12px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
  }
  .topbar .title { flex: 1; min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .main { padding: 18px 16px 48px; }
  .page-head h1 { font-size: 22px; }
  .page-head .actions { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .grid.cols-2, .grid.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .value { font-size: 23px; }
  .card { padding: 15px; }
  .table-wrap { margin: 0 -15px -15px; }
}
/* ── streamer cards (lead home) ───────────────────────────── */
.scards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.scard { position: relative; overflow: hidden; padding: 0; display: flex; flex-direction: column; transition: border-color .2s, transform .2s var(--ease); }
.scard:hover { border-color: var(--line-2); transform: translateY(-2px); }
.scard .banner { height: 86px; background: linear-gradient(120deg, var(--c, var(--accent)), color-mix(in srgb, var(--c, var(--accent)) 30%, #0a0b10)); position: relative; }
.scard .banner img { width: 100%; height: 100%; object-fit: cover; }
.scard .banner .live-badge { position: absolute; top: 10px; right: 10px; }
.scard .head { display: flex; align-items: flex-start; gap: 12px; margin: -30px 16px 0; position: relative; }
.scard .head .names { min-width: 0; margin-top: 36px; }
.scard .head h3 { font-size: 16px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scard .body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.botline { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.scard .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.scard .foot { display: flex; gap: 8px; margin-top: auto; }
.scard .foot .btn { flex: 1; }
.scard .foot .btn.icon { flex: none; }
.notice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 13px; }
.notice svg { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; }
.notice.bad { background: rgba(248,113,113,.08); color: #fca5a5; border: 1px solid rgba(248,113,113,.18); }
.notice.warn { background: rgba(251,191,36,.07); color: #fcd34d; border: 1px solid rgba(251,191,36,.18); }
.notice.info { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 55%, white); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.notice .grow { flex: 1; min-width: 0; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .5s var(--ease); }
.add-card { display: grid; place-items: center; min-height: 260px; border: 1.5px dashed var(--line-2); background: transparent; box-shadow: none; color: var(--sub); cursor: pointer; text-align: center; }
.add-card:hover { border-color: var(--accent); color: var(--text); }
.add-card svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.8; margin: 0 auto 8px; }
.dots-menu { position: relative; }
.dots-menu .menu { left: auto; right: 0; top: auto; bottom: calc(100% + 6px); min-width: 210px; }

/* ── wizard ───────────────────────────────────────────────── */
.stepper { display: flex; gap: 6px; margin-bottom: 22px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.step { flex: 1 0 auto; display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: var(--dim); font-weight: 600; font-size: 13px; white-space: nowrap; }
.step .n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 11.5px; flex: none; }
.step .n svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 3; }
.step.done { color: var(--sub); cursor: pointer; }
.step.done .n { background: rgba(52,211,153,.15); color: var(--ok); }
.step.on { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); }
.step.on .n { background: var(--accent); color: var(--accent-ink); }
.wiz { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.wiz h2 { font-size: 19px; letter-spacing: -.02em; margin-bottom: 6px; }
.wiz .lead { color: var(--sub); margin-bottom: 18px; }
.wiz .foot { display: flex; gap: 8px; justify-content: space-between; margin-top: 22px; flex-wrap: wrap; }
.guide { display: grid; gap: 12px; counter-reset: g; }
.guide > div { display: flex; gap: 12px; align-items: flex-start; }
.guide > div::before { counter-increment: g; content: counter(g); flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 65%, white); font-size: 12px; font-weight: 700; }
.guide b { color: var(--text); }
.guide .sub { color: var(--sub); font-size: 13px; }
.linkbox { display: flex; gap: 8px; align-items: center; }
.linkbox .input { font-family: var(--mono); font-size: 12.5px; }
.state-line { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 13px; color: var(--sub); }
.state-line.ok { color: var(--ok); }
.state-line.bad { color: var(--bad); }
.state-line svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; }
.waiting { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--bg-2); border: 1px dashed var(--line-2); color: var(--sub); }
.waiting.ok { border-style: solid; border-color: rgba(52,211,153,.35); color: var(--ok); background: rgba(52,211,153,.06); }
.waiting .pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1.2s ease-in-out infinite; flex: none; }
.waiting svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.4; flex: none; }
.dropzone { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); border: 1.5px dashed var(--line-2); background: var(--bg-2); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .thumb { width: 56px; height: 56px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; overflow: hidden; flex: none; }
.dropzone .thumb.wide { width: 96px; }
.dropzone .thumb img { width: 100%; height: 100%; object-fit: cover; }
.dropzone .thumb svg { width: 22px; height: 22px; stroke: var(--dim); fill: none; stroke-width: 1.8; }
.check-list { display: grid; gap: 8px; }
.check-list div { display: flex; align-items: center; gap: 10px; }
.check-list svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.4; flex: none; }
.check-list .ok { color: var(--ok); }
.check-list .no { color: var(--dim); }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; text-align: left; width: 100%; }
.choice.on { border-color: var(--accent); background: var(--accent-soft); }
.choice.off { opacity: .5; cursor: not-allowed; }

/* ── lists ────────────────────────────────────────────────── */
.audit-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.audit-row:last-child { border-bottom: 0; }
.audit-row .when { color: var(--dim); font-size: 12.5px; }
.audit-row .what b { font-weight: 600; }
.audit-row .detail { color: var(--dim); font-size: 12.5px; margin-top: 2px; word-break: break-word; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--sub); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ── streamer overview ────────────────────────────────────── */
.hero { position: relative; overflow: hidden; margin-bottom: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); }
.hero-banner { height: 120px; background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent-2) 40%, #0a0b10)); }
.hero-banner img { width: 100%; height: 100%; object-fit: cover; }
.hero-body { display: flex; align-items: flex-end; gap: 18px; padding: 0 22px 20px; margin-top: -38px; flex-wrap: wrap; }
.hero-text { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; padding-top: 44px; }
.hero-text h1 { font-size: 24px; letter-spacing: -.025em; }
.hero-text svg, .event svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; vertical-align: -2px; margin-right: 5px; }
.hero-bot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); flex-wrap: wrap; max-width: 100%; }
.ov-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); margin: 16px 0; }
.top-chatter { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.top-chatter .rank { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); font: 700 12px var(--mono); color: var(--sub); flex: none; }
.top-chatter:first-child .rank { background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 60%, white); }
.event { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }
.ev-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: color-mix(in srgb, var(--accent) 60%, white); flex: none; }
.ev-ic svg { margin: 0; }
.app-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; transition: border-color .15s, transform .15s var(--ease); }
.app-row:hover { border-color: var(--line-2); transform: translateY(-1px); }
.app-row > svg.chev { width: 18px; height: 18px; stroke: var(--dim); fill: none; stroke-width: 2; flex: none; }
.app-hero .hero-banner { height: 70px; }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 14px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .meta { font-size: 11.5px; opacity: .72; margin-top: 4px; }
.msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.msg.them { align-self: flex-start; background: var(--surface-3); border-bottom-left-radius: 4px; }
.msg.internal { background: rgba(251,191,36,.12); color: #fde68a; border: 1px dashed rgba(251,191,36,.4); }
.msg.sys { align-self: center; max-width: 100%; background: none; color: var(--dim); font-size: 12.5px; padding: 2px 8px; }
.perm-matrix select { height: 30px; padding: 0 6px; font-size: 12.5px; width: auto; }
.perm-matrix td, .perm-matrix th { padding: 8px 10px; }
.perm-matrix th { white-space: nowrap; }
.section-title { font-size: 15px; font-weight: 650; margin: 8px 0 12px; }

@media (max-width: 960px) {
  .wiz { grid-template-columns: minmax(0, 1fr); }
  .ov-grid, .points-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .hero-body { padding: 0 16px 16px; gap: 12px; }
  .hero-text { padding-top: 0; min-width: 0; flex-basis: 100%; }
  .hero-banner { height: 90px; }
}
@media (max-width: 560px) {
  .scards { grid-template-columns: minmax(0, 1fr); }
  .audit-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .linkbox { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* checkbox with a title and a hint next to it */
.check-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); }
.check-row:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.check-row:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }

/* application: own bot */
.bot-panel { margin-top: 12px; padding: 16px; border: 1px dashed var(--line); border-radius: 14px; animation: rise .35s var(--ease) both; }
.bot-panel[hidden] { display: none; }
.guide-list { margin: 0 0 16px; padding-left: 20px; display: grid; gap: 8px; color: var(--sub); font-size: 13.5px; line-height: 1.5; }
.guide-list b { color: var(--text); }
.bot-ok { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--ok) 10%, transparent); border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--line)); }
.bot-ok > svg { color: var(--ok); flex: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12.5px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* discord message preview */
.discord-preview { padding: 14px; border-radius: 12px; background: #313338; color: #dbdee1; font-size: 14px; line-height: 1.45; }
.discord-preview .dp-text { margin-bottom: 8px; overflow-wrap: anywhere; }
.discord-preview .dp-embed { border-left: 4px solid; border-radius: 6px; background: #2b2d31; padding: 10px 14px 12px; display: grid; gap: 4px; }
.discord-preview .dp-author { font-size: 12px; font-weight: 600; color: #fff; }
.discord-preview .dp-title { font-weight: 700; color: #00a8fc; }
.discord-preview .dp-desc { font-size: 13px; }
.discord-preview .dp-img { height: 110px; border-radius: 6px; margin-top: 6px; background: linear-gradient(135deg, #5865f2, #9146ff 60%, #0b0d14); }
.discord-preview .dp-foot { font-size: 11px; color: #b5bac1; margin-top: 4px; }
details.more summary { cursor: pointer; color: var(--sub); font-size: 13px; }
details.more[open] summary { margin-bottom: 10px; }

/* counters & quotes */
.counter-card { display: grid; gap: 10px; }
.counter-value { font-size: 44px; font-weight: 850; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.counter-value.pop { animation: pop .35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.18); color: var(--accent); } }
.quote-list { display: grid; }
.quote { display: flex; gap: 14px; align-items: flex-start; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.quote:last-child { border-bottom: 0; }
.quote .q-id { font-family: var(--mono); color: var(--dim); font-size: 12.5px; padding-top: 2px; min-width: 34px; }
.quote .q-text { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.seg { flex-wrap: wrap; }

/* community */
.raffle-stage { min-height: 56px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--accent) 7%, var(--bg-2)); }
.raffle-spin { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--sub); }
.raffle-winner { font-size: 26px; font-weight: 850; letter-spacing: -.02em; }
.raffle-winner.pop { animation: pop .5s var(--ease); }
.raffle-names { display: flex; flex-wrap: wrap; gap: 6px; max-height: 140px; overflow: auto; }
.raffle-names span { padding: 3px 9px; border-radius: 999px; background: var(--bg-2); font-size: 12.5px; animation: rise .3s var(--ease) both; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; gap: 5px; }
.bar-label { font-size: 13.5px; overflow-wrap: anywhere; }
.bar-track { height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #22d3ee)); transition: width .5s var(--ease); }
.queue-list { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.queue-list li { overflow-wrap: anywhere; }
.auction-bid { display: grid; gap: 4px; padding: 6px 0; }
.card .head.row .ico { font-size: 20px; }

/* shop & loyalty */
.redeem-list, .shop-items { display: grid; gap: 8px; }
.redeem, .shop-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); animation: rise .3s var(--ease) both; }
.shop-item.off { opacity: .55; }
.badge-row { display: grid; grid-template-columns: 56px 1fr 1fr 110px auto; gap: 8px; align-items: center; }
@media (max-width: 640px) { .badge-row { grid-template-columns: 56px 1fr; } }

/* mod tools */
.modtool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
@media (max-width: 900px) { .modtool-grid { grid-template-columns: 1fr; } }

/* viewer profile */
.profile { display: grid; gap: 14px; }
.profile-head { display: flex; gap: 14px; align-items: center; }
.pstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pstat { padding: 10px 12px; border-radius: 12px; background: var(--bg-2); display: grid; gap: 2px; min-width: 0; }
.pstat b { font-size: 16px; overflow-wrap: anywhere; }
.pmsgs { display: grid; gap: 4px; max-height: 220px; overflow: auto; }
.pmsg { font-size: 13px; padding: 6px 8px; border-radius: 8px; background: var(--bg-2); overflow-wrap: anywhere; }
.pmsg.deleted { opacity: .5; text-decoration: line-through; }
.who-link { cursor: pointer; }
.who-link:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .pstats { grid-template-columns: repeat(2, 1fr); } }

/* statistics */
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.delta { font-weight: 700; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--bad); }
.heatmap { display: grid; gap: 3px; overflow-x: auto; }
.hm-row { display: grid; grid-template-columns: 28px repeat(24, minmax(14px, 1fr)); gap: 3px; align-items: center; }
.hm-day, .hm-hour { font-size: 11px; color: var(--dim); text-align: center; }
.hm-cell { aspect-ratio: 1; border-radius: 4px; background: color-mix(in srgb, var(--accent) calc(var(--i) * 100%), var(--bg-2)); transition: transform .15s var(--ease); }
.hm-cell:hover { transform: scale(1.25); outline: 1px solid var(--accent); }

/* language picker */
.lang-picker { appearance: none; background: var(--bg-2); color: var(--sub); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; font: inherit; font-size: 12.5px; cursor: pointer; }
.lang-picker:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.lang-row { padding: 8px 14px 0; }
.lang-row .lang-picker { width: 100%; }
.page-lang { position: fixed; top: 14px; right: 16px; z-index: 5; }

/* overlay builder */
.widget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.widget-item { display: grid; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); animation: rise .3s var(--ease) both; }
.widget-item .ico { font-size: 22px; }
.widget-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 14px; align-items: start; }
.widget-form { max-height: 62vh; overflow: auto; padding-right: 6px; }
.widget-preview { width: 100%; height: 300px; border: 1px solid var(--line); border-radius: 12px; background: #12141c; }
.dialog.wide:has(.widget-editor) { max-width: 1040px; }
@media (max-width: 860px) { .widget-editor { grid-template-columns: 1fr; } .widget-form { max-height: none; } }

/* action editor */
.action-list { display: grid; gap: 8px; }
.action { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); animation: rise .25s var(--ease) both; }

/* song requests */
.song-frame { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.song-frame > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.song-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.song-list li { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--bg-2); animation: rise .3s var(--ease) both; }
.song-list li img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.song-list a { color: var(--text); text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-list a:hover { text-decoration: underline; }
