/* ─── Graphite-Neon palette (fixed, independent of Telegram theme) ─────────── */
:root {
  --bg: #11131a;
  --bg2: #1a1d27;
  --bg3: #232838;
  --line: rgba(255, 255, 255, 0.07);
  --line2: rgba(255, 255, 255, 0.12);
  --text: #eceef5;
  --hint: #868ca0;
  --accent: #6d5efc;
  --accent2: #9b7dff;
  --grad: linear-gradient(135deg, #6d5efc, #9b7dff);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;
  --gold: #fcd34d;
  --cyan: #38bdf8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  color-scheme: dark;
}
.hidden { display: none !important; }
.app { padding-bottom: 76px; } /* room for the bottom tab bar */

/* Lock */
.lock {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; padding: 24px;
}
.lock-emoji { font-size: 48px; }
.lock-title { font-size: 18px; font-weight: 700; }
.lock-sub { color: var(--hint); font-size: 14px; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: 13px 14px;
  background: rgba(17, 19, 26, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.title { flex: 1; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.icon-btn {
  border: 1px solid var(--line2); background: var(--bg3); color: var(--text);
  width: 40px; height: 40px; border-radius: 12px; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.icon-btn:active { background: var(--accent); border-color: var(--accent); }

.view { padding: 14px; }

/* Controls */
.controls { display: flex; gap: 8px; margin-bottom: 12px; }
.search {
  flex: 1; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line2);
  background: var(--bg2); color: var(--text); font-size: 15px;
}
.search::placeholder { color: var(--hint); }
.search:focus { outline: none; border-color: var(--accent); }
.sort {
  padding: 11px 10px; border-radius: 12px;
  border: 1px solid var(--line2);
  background: var(--bg2); color: var(--text); font-size: 14px;
}
.summary { color: var(--hint); font-size: 13px; margin-bottom: 4px; padding-left: 2px; }
.hint { color: var(--hint); font-size: 12px; margin: 0 2px 14px; opacity: 0.85; }

/* User list */
.list { display: flex; flex-direction: column; gap: 9px; }
.row {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; border-radius: 14px;
  background: var(--bg2); border: 1px solid var(--line);
  transition: transform 0.08s, background 0.12s;
}
.row:active { transform: scale(0.985); background: var(--bg3); }
.row-main { flex: 1; min-width: 0; }
.row-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-name .uname { color: var(--accent2); font-weight: 500; margin-left: 4px; }
.row-name .star { color: var(--gold); margin-left: 4px; }
.row-name .role { margin-left: 5px; }
.row-name .blk { margin-left: 5px; filter: grayscale(0.2); }
.blk-t { color: var(--bad); font-weight: 600; }
.row-sub { color: var(--hint); font-size: 12px; margin-top: 3px; }
.badge {
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 9px; white-space: nowrap;
  background: rgba(134, 140, 160, 0.14); color: var(--hint);
}
.badge.lifetime { background: rgba(252, 211, 77, 0.14); color: var(--gold); box-shadow: 0 0 0 1px rgba(252, 211, 77, 0.18) inset; }
.badge.active { background: rgba(52, 211, 153, 0.14); color: var(--ok); box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.2) inset; }
.badge.expired { background: rgba(134, 140, 160, 0.14); color: var(--hint); }
.badge.banned { background: rgba(251, 113, 133, 0.15); color: var(--bad); box-shadow: 0 0 0 1px rgba(251, 113, 133, 0.22) inset; }
.chev { color: var(--hint); font-size: 22px; line-height: 1; margin-left: 2px; opacity: 0.45; }
.empty { color: var(--hint); text-align: center; padding: 36px 12px; }

/* ─── Stats ─────────────────────────────────────────────────────────────── */
.stats { display: flex; flex-direction: column; gap: 14px; }
.stat-group { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.stat-group h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--text); }
.stat-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card { background: var(--bg3); border-radius: 12px; padding: 13px 14px; }
.stat-card.accent { background: var(--grad); box-shadow: 0 6px 20px rgba(109, 94, 252, 0.35); }
.stat-card.accent .stat-label { color: rgba(255, 255, 255, 0.85); }
.stat-num { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 12px; color: var(--hint); margin-top: 3px; }
.stat-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.stat-row:last-child { border-bottom: none; }
.stat-row .k { color: var(--hint); }
.stat-row .v { font-weight: 700; }

/* Stacked composition bar */
.bar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--bg3); margin-bottom: 12px; }
.bar-seg { height: 100%; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--hint); }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend-item b { color: var(--text); margin-left: auto; font-variant-numeric: tabular-nums; }

/* Top queries */
.toprow { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.toprow:last-child { border-bottom: none; }
.toprow .rank { width: 22px; height: 22px; border-radius: 7px; background: var(--bg3); color: var(--accent2); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.toprow .q { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toprow .n { color: var(--hint); font-weight: 700; }

/* ─── Bottom tab bar ─────────────────────────────────────────────────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 4px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(17, 19, 26, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabbar::-webkit-scrollbar { display: none; }
.tabbtn {
  flex: 1 0 58px; border: none; background: transparent; color: var(--hint);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.tabbtn .ic { font-size: 19px; line-height: 1; }
.tabbtn.active { color: var(--accent2); background: rgba(109, 94, 252, 0.12); }

/* ─── Secondary nav (chips for the active primary tab's sub-views) ──────────── */
.subnav {
  display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 14px 2px; margin: 0;
}
.subnav::-webkit-scrollbar { display: none; }
.subnav.hidden { display: none; }
.subchip {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card);
  color: var(--hint); padding: 7px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.subchip.active { background: rgba(109, 94, 252, 0.16); color: var(--accent2); border-color: rgba(109, 94, 252, 0.35); }
.subchip:active { transform: scale(0.97); }

/* ─── Collapsible search-template categories ───────────────────────────────── */
.tmpl-cat { border-top: 1px solid var(--line); }
.tmpl-cat:first-child { border-top: none; }
.tmpl-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: transparent; border: none; color: var(--fg);
  font-size: 14px; font-weight: 700; padding: 12px 2px; text-align: left;
}
.tmpl-n {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  font-size: 11px; font-weight: 700; color: var(--hint);
  background: rgba(255, 255, 255, 0.06); border-radius: 9px;
}
.tmpl-arrow { color: var(--hint); transition: transform 0.2s; flex: 0 0 auto; }
.tmpl-cat.open .tmpl-arrow { transform: rotate(180deg); }
.tmpl-cat .tmpl-chips { display: none; padding: 2px 0 12px; } /* 2 classes — beats later .bc-chips */
.tmpl-cat.open .tmpl-chips { display: flex; }

/* ─── Repo analysis result (server HTML, Telegram-style markup) ─────────────── */
.analysis-body {
  white-space: pre-wrap; word-break: break-word; line-height: 1.55;
  font-size: 14px; color: var(--fg);
}
.analysis-body a { color: var(--accent2); }
.analysis-body code {
  background: rgba(255, 255, 255, 0.08); border-radius: 5px;
  padding: 1px 5px; font-size: 12.5px;
}
.analysis-body b { color: var(--fg); }
.analysis-body i { color: var(--hint); }

/* ─── Code-search snippet ──────────────────────────────────────────────────── */
.code-snip {
  margin-top: 6px; padding: 7px 9px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.05); color: var(--hint);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}

/* ─── Action sheet ───────────────────────────────────────────────────────── */
.sheet-overlay {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: flex-end;
}
.sheet {
  position: relative;
  width: 100%; background: var(--bg2); border-radius: 18px 18px 0 0;
  border-top: 1px solid var(--line2);
  padding: 18px 16px calc(16px + env(safe-area-inset-bottom));
  max-height: 88vh; overflow-y: auto;
  animation: slideup 0.18s ease;
}
@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-head { margin-bottom: 6px; }
.sheet-title { font-size: 17px; font-weight: 700; }
.sheet-sub { color: var(--hint); font-size: 13px; margin-top: 4px; }
.sheet-section-label { font-size: 11px; color: var(--hint); margin: 14px 2px 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gbtn {
  padding: 13px 6px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--bg3); color: var(--text); font-size: 14px; font-weight: 600;
}
.gbtn:active { transform: scale(0.96); border-color: var(--accent); }
.gbtn.wide { grid-column: span 2; }
.gbtn.life { background: rgba(252, 211, 77, 0.13); color: var(--gold); border-color: rgba(252, 211, 77, 0.25); }
.gbtn.danger { background: rgba(251, 113, 133, 0.12); color: var(--bad); border-color: rgba(251, 113, 133, 0.22); }
.gbtn.ok { background: rgba(52, 211, 153, 0.13); color: var(--ok); border-color: rgba(52, 211, 153, 0.22); }
.sheet-note {
  background: rgba(252, 211, 77, 0.1); color: var(--gold);
  border: 1px solid rgba(252, 211, 77, 0.2);
  border-radius: 12px; padding: 16px; font-size: 14px; line-height: 1.45; text-align: center;
}
.sheet-close {
  width: 100%; margin-top: 16px; padding: 14px;
  border: none; border-radius: 13px; background: var(--bg3); color: var(--text);
  font-size: 15px; font-weight: 700;
}

/* ─── Broadcast composer ─────────────────────────────────────────────────── */
.bc-label { font-size: 12px; color: var(--hint); margin: 16px 2px 8px; text-transform: uppercase; letter-spacing: 0.03em; }
.bc-label:first-child { margin-top: 0; }
.bc-photo { margin-bottom: 4px; }
/* User "Мои" card */
.me-card { display: flex; align-items: center; gap: 14px;
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.me-ava { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex: 0 0 auto;
  background: var(--grad); display: flex; align-items: center; justify-content: center; }
.me-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me-ava.noimg::before { content: attr(data-ini); color: #fff; font-weight: 800; font-size: 22px; }
.me-card-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.me-name { font-size: 16px; font-weight: 700; color: var(--text); word-break: break-word; }
.me-role { font-size: 13px; font-weight: 700; color: var(--accent2); }
.me-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.me-row > span { color: var(--hint); font-size: 14px; }
.me-row > b { color: var(--text); font-size: 14px; }
.me-bar { height: 8px; border-radius: 6px; background: var(--bg3); overflow: hidden; margin: -2px 0 8px; }
.me-bar > i { display: block; height: 100%; background: var(--grad); border-radius: 6px; }

/* Favorites library */
.fav-card { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg2);
  border: 1px solid var(--line2); border-radius: 14px; margin-bottom: 10px; }
.fav-av { width: 44px; height: 44px; border-radius: 10px; flex: 0 0 auto; background: var(--bg3); object-fit: cover; }
.fav-main { flex: 1 1 auto; min-width: 0; }
.fav-name { display: block; font-weight: 700; color: var(--accent2); font-size: 15px; text-decoration: none; word-break: break-word; }
.fav-name.link { cursor: pointer; }
.fav-name.link:active { opacity: 0.7; }
.health-verdict { display: flex; align-items: center; gap: 8px; font-size: 16px; margin-bottom: 8px; }
.health-verdict .health-score { margin-left: auto; color: var(--hint); font-weight: 700; font-size: 14px; }
.repo-diagram { width: 100%; border-radius: 12px; display: block; margin-top: 12px; border: 1px solid var(--line2); }

/* Compare tray bar + table */
.cmp-bar { position: fixed; left: 12px; right: 12px; z-index: 15;
  bottom: calc(72px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px;
  background: var(--grad); color: #fff; border-radius: 14px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); font-weight: 700; font-size: 14px; }
.cmp-bar > span { flex: 1 1 auto; }
.cmp-bar-go { border: none; border-radius: 10px; padding: 9px 16px; font-weight: 800; font-size: 13px; background: #fff; color: var(--accent2); }
.cmp-bar-go:disabled { opacity: 0.5; }
.cmp-bar-x { border: none; background: rgba(255, 255, 255, 0.2); color: #fff; border-radius: 9px; width: 32px; height: 32px; font-size: 14px; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.cmp-table td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: top; color: var(--text); }
.cmp-table thead td { vertical-align: bottom; }
.cmp-table thead b { color: var(--accent2); font-size: 13px; word-break: break-word; }
.cmp-table .cmp-owner { color: var(--hint); font-size: 10px; }
.cmp-table .cmp-l { text-align: left; color: var(--hint); white-space: nowrap; }

/* Chat with repo */
.sheet.chat-sheet { display: flex; flex-direction: column; max-height: 86vh; overflow: hidden; }
.chat-msgs { flex: 1 1 auto; overflow-y: auto; min-height: 200px; max-height: 58vh; padding: 4px 2px; }
.chat-input-row { display: flex; gap: 8px; padding-top: 10px; }
.chat-input-row .search { flex: 1 1 auto; }
.chat-input-row .sort { flex: 0 0 auto; min-width: 48px; font-size: 18px; }
.chat-q, .chat-a { padding: 10px 13px; border-radius: 14px; margin-bottom: 8px; font-size: 14px; line-height: 1.45; max-width: 88%; word-break: break-word; }
.chat-q { background: var(--accent2); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-a { background: var(--bg3); color: var(--text); border-bottom-left-radius: 4px; }
.chat-a pre { background: var(--bg); border-radius: 8px; padding: 8px 10px; overflow-x: auto; font-size: 12px; margin: 6px 0; white-space: pre-wrap; }
.chat-a code { background: var(--bg); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* Explain repo */
.ex-block { color: var(--text); font-size: 14px; line-height: 1.5; background: var(--bg2);
  border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; margin-bottom: 6px; }
.ex-ideas { margin: 0 0 6px; padding-left: 22px; color: var(--text); font-size: 14px; line-height: 1.5; }
.ex-ideas li { margin-bottom: 6px; }
.tools-sep { height: 1px; background: var(--line); margin: 22px 0 16px; }

.rc-pre { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  color: var(--text); font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
  max-height: 420px; overflow: auto; margin: 0; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.scaf-item { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.scaf-item:last-child { border-bottom: none; margin-bottom: 0; }

.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.badge { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; opacity: 0.45; filter: grayscale(0.6); transition: opacity .15s; }
.badge.on { opacity: 1; filter: none; border-color: var(--accent); }
.badge-ic { font-size: 30px; line-height: 1; }
.badge-nm { font-weight: 700; margin-top: 6px; font-size: 14px; }
.badge-ds { font-size: 12px; color: var(--hint); margin-top: 2px; line-height: 1.35; }
.badge-chk { position: absolute; top: 10px; right: 12px; color: var(--accent2); font-weight: 800; }

/* Morning brief — vacancy rows */
.brief-job { display: block; text-decoration: none; padding: 12px 14px; background: var(--bg2);
  border: 1px solid var(--line2); border-radius: 14px; margin-bottom: 10px; }
.brief-job-title { font-weight: 700; color: var(--accent2); font-size: 14px; word-break: break-word; }
.brief-job-sub { color: var(--hint); font-size: 12px; margin-top: 4px; }

/* "Для тебя" swipe deck */
.fy-stage { min-height: 360px; display: flex; align-items: center; justify-content: center; padding: 14px 0; }
.fy-card { width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 20px;
  padding: 26px 20px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); will-change: transform; touch-action: pan-y; }
.fy-av { width: 88px; height: 88px; border-radius: 22px; object-fit: cover; background: var(--bg3); margin-bottom: 14px; }
.fy-name { font-size: 18px; font-weight: 800; color: var(--accent2); word-break: break-word; }
.fy-desc { color: var(--text); font-size: 14px; line-height: 1.45; margin-top: 10px; opacity: 0.9; }
.fy-meta { color: var(--hint); font-size: 13px; margin-top: 12px; }
.fy-actions { display: flex; gap: 10px; justify-content: center; padding: 4px 0 8px; }
.fy-btn { width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--line2); background: var(--bg2);
  font-size: 24px; display: flex; align-items: center; justify-content: center; }
.fy-btn:active { transform: scale(0.92); }
.fy-btn:disabled { opacity: 0.4; }
.fy-btn.save { background: rgba(245, 197, 24, 0.16); border-color: rgba(245, 197, 24, 0.4); }
.fy-btn.skip { background: rgba(251, 113, 133, 0.14); border-color: rgba(251, 113, 133, 0.3); }

/* Vacancy board */
.jb-card { background: var(--bg2); border: 1px solid var(--line2); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.jb-top { display: flex; align-items: flex-start; gap: 10px; }
.jb-title { flex: 1 1 auto; font-weight: 700; color: var(--text); font-size: 15px; line-height: 1.35; }
.jb-title.link { cursor: pointer; }
.jb-title.link:active { opacity: 0.7; }
.jb-bm { flex: 0 0 auto; background: transparent; border: none; font-size: 20px; padding: 2px 4px; }
.jb-meta { color: var(--hint); font-size: 13px; margin-top: 6px; }
.jb-fit { color: var(--accent2); font-size: 12px; margin-top: 6px; }
.jb-fit b { color: var(--accent2); }
.jb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.jb-chip { background: var(--bg3); color: var(--accent2); font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.jb-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
.jb-src { color: var(--hint); font-size: 11px; }
.jb-apply { color: var(--accent2); font-weight: 700; font-size: 13px; text-decoration: none; white-space: nowrap; }
.fav-desc {
  color: var(--text); font-size: 13px; margin-top: 3px; opacity: 0.85;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.repo-priv { display: inline-block; margin-left: 6px; font-size: 11px; color: var(--gold); font-weight: 600; }
.fav-reason {
  font-size: 12.5px; margin-top: 4px; line-height: 1.4; color: var(--accent2);
  background: rgba(109, 94, 252, 0.1); border-radius: 8px; padding: 6px 9px;
}
.fav-meta { color: var(--hint); font-size: 12px; margin-top: 5px; }
.fav-del { flex: 0 0 auto; background: transparent; border: none; font-size: 18px; padding: 6px; border-radius: 8px; color: var(--hint); }
.fav-del:active { background: var(--bg3); }
.fav-star { flex: 0 0 auto; background: transparent; border: none; font-size: 22px; padding: 4px 6px; border-radius: 8px; color: var(--hint); }
.fav-star.on { color: #f5c518; }
.fav-star:active { background: var(--bg3); }

/* Subscriptions dashboard */
.subs-snooze { margin: 4px 0 12px; }
.subs-snooze.on { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(109, 94, 252, 0.14); border: 1px solid rgba(109, 94, 252, 0.3); color: var(--accent2);
  border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; }
.subs-snzbtn { border: none; border-radius: 10px; padding: 9px 14px; font-size: 13px; font-weight: 700;
  background: var(--accent2); color: #fff; }
.subs-snzbtn.ghost { width: 100%; background: var(--bg2); color: var(--accent2); border: 1px solid var(--line2); padding: 13px; }
.sub-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--bg2);
  border: 1px solid var(--line2); border-radius: 14px; margin-bottom: 10px; cursor: pointer; }
.sub-card:active { background: var(--bg3); }
.sub-ic { font-size: 22px; flex: 0 0 auto; width: 28px; text-align: center; }
.sub-main { flex: 1 1 auto; min-width: 0; }
.sub-name { font-weight: 700; color: var(--text); font-size: 15px; }
.sub-sub { color: var(--hint); font-size: 12px; margin-top: 3px; }
.sw { position: relative; width: 46px; height: 28px; flex: 0 0 auto; }
.sw input { opacity: 0; width: 0; height: 0; }
.sw span { position: absolute; inset: 0; cursor: pointer; background: var(--bg3); border: 1px solid var(--line2); border-radius: 999px; transition: 0.2s; }
.sw span::before { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: 0.2s; }
.sw input:checked + span { background: var(--accent2); border-color: transparent; }
.sw input:checked + span::before { transform: translateX(18px); }

.bc-gen { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line2); }
.bc-gen-row { display: flex; gap: 8px; margin: 8px 0; }
.bc-gen-row > select { flex: 1; min-width: 0; }
.bc-gen #bcGenBtn { width: 100%; }
.bc-photo-btn {
  width: 100%; padding: 14px; border: 1px dashed var(--line2); border-radius: 12px;
  background: var(--bg2); color: var(--accent2); font-size: 14px; font-weight: 600;
}
.bc-photo-btn:active { background: var(--bg3); }
.bc-photo-prev { position: relative; }
.bc-photo-prev img { width: 100%; border-radius: 12px; display: block; max-height: 260px; object-fit: cover; }
.bc-photo-del {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0, 0, 0, 0.62); color: #fff; border: none; border-radius: 9px;
  padding: 7px 11px; font-size: 13px; font-weight: 600;
}
.bc-photo-note {
  background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px;
  padding: 16px; text-align: center; color: var(--accent2); font-weight: 600;
}
.bc-brief {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--bg2); color: var(--text); font-size: 14px; line-height: 1.4;
  resize: vertical; min-height: 56px; font-family: inherit;
}
.bc-brief::placeholder { color: var(--hint); }
.bc-brief:focus { outline: none; border-color: var(--accent); }
.bc-ai { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.bc-aibtn {
  flex: 1; min-width: 120px; padding: 12px; border: 1px solid var(--line2); border-radius: 11px;
  background: var(--bg3); color: var(--text); font-size: 14px; font-weight: 600;
}
.bc-aibtn.primary { background: rgba(109, 94, 252, 0.16); color: var(--accent2); border-color: rgba(109, 94, 252, 0.3); }
.bc-aibtn:disabled { opacity: 0.5; }
.bc-aibtn:active { transform: scale(0.98); }
.bc-chips, .bc-tools { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 1px solid var(--line2); background: var(--bg2); color: var(--accent2);
  border-radius: 9px; padding: 7px 11px; font-size: 13px; font-weight: 600;
}
.chip:active { background: var(--bg3); }
.tool {
  border: 1px solid var(--line2); background: var(--bg2); color: var(--text);
  border-radius: 9px; min-width: 42px; padding: 8px 10px; font-size: 14px; font-weight: 700;
}
.tool:active { background: var(--accent); border-color: var(--accent); }
.bc-text {
  width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line2); background: var(--bg2); color: var(--text);
  font-size: 15px; line-height: 1.45; resize: vertical; min-height: 140px; font-family: inherit;
}
.bc-text:focus { outline: none; border-color: var(--accent); }
.bc-counter { text-align: right; color: var(--hint); font-size: 12px; margin-top: 5px; }
.bc-counter.over { color: var(--bad); font-weight: 700; }
.bc-preview {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 14px; min-height: 44px; font-size: 15px; line-height: 1.45;
  white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere;
}
.bc-preview:empty::before { content: "—"; color: var(--hint); }
.bc-preview a { color: var(--accent2); }
.bc-preview blockquote { margin: 6px 0; padding-left: 10px; border-left: 3px solid var(--line2); color: var(--hint); }
.bc-preview code { background: var(--bg3); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.bc-preview pre { background: var(--bg3); padding: 8px 10px; border-radius: 8px; font-size: 13px; white-space: pre-wrap; overflow-x: auto; }
.bc-preview tg-spoiler { background: var(--bg3); border-radius: 4px; padding: 0 3px; }
.bc-effect {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--bg2); color: var(--text); font-size: 15px;
}
.bc-edit { width: 100%; margin-top: 10px; }
.bc-btn.danger-btn { background: rgba(251, 113, 133, 0.14); color: var(--bad); border: 1px solid rgba(251, 113, 133, 0.25); }
.bc-editing {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(109, 94, 252, 0.14); border: 1px solid rgba(109, 94, 252, 0.3);
  color: var(--accent2); border-radius: 12px; padding: 10px 14px; font-size: 14px; margin-bottom: 12px;
}
.bc-editing b { color: var(--text); }
.bc-newbtn { background: var(--bg3); color: var(--text); border: 1px solid var(--line2); border-radius: 9px; padding: 7px 11px; font-size: 13px; font-weight: 600; flex: none; }
.bc-sched { margin-top: 8px; }
.bc-row2 { display: flex; gap: 10px; margin-top: 10px; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
#savedList { max-height: 55vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.saved-row { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 11px; background: var(--bg2); border: 1px solid var(--line); }
.saved-row .s-main { flex: 1; min-width: 0; }
.saved-row .s-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-row .s-sub { color: var(--hint); font-size: 12px; margin-top: 3px; }
.saved-row .s-del { background: rgba(251, 113, 133, 0.14); color: var(--bad); border: none; border-radius: 9px; padding: 9px 12px; font-size: 15px; flex: none; }
.saved-row .s-ran { background: rgba(52, 211, 153, 0.16); color: var(--ok); border-radius: 8px; padding: 5px 8px; font-size: 11px; font-weight: 700; white-space: nowrap; flex: none; }
.bc-aud { display: flex; gap: 8px; }
.bc-audbtn {
  flex: 1; padding: 12px; border: 1px solid var(--line2); border-radius: 11px;
  background: var(--bg3); color: var(--text); font-size: 14px; font-weight: 600;
}
.bc-audbtn.active { background: rgba(109, 94, 252, 0.16); color: var(--accent2); border-color: rgba(109, 94, 252, 0.3); }
.bc-audbtn:active { transform: scale(0.98); }
.bc-selinfo {
  margin-top: 10px; padding: 11px 14px; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 11px; font-size: 14px; color: var(--accent2); font-weight: 600;
}
.aud-row { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 11px; background: var(--bg2); border: 1px solid var(--line); }
.aud-row.sel { border-color: var(--accent); background: rgba(109, 94, 252, 0.1); }
.aud-row .chk { width: 21px; height: 21px; border-radius: 6px; border: 2px solid var(--line2); flex: none; display: flex; align-items: center; justify-content: center; font-size: 13px; color: transparent; }
.aud-row.sel .chk { background: var(--accent); border-color: var(--accent); color: #fff; }
.aud-row .aud-main { flex: 1; min-width: 0; }
.aud-row .aud-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aud-row .aud-sub { color: var(--hint); font-size: 12px; }
#audList { max-height: 50vh; overflow-y: auto; }
.bc-opts { display: flex; flex-direction: column; gap: 12px; margin: 18px 2px; }
.bc-opt { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.bc-opt input { width: 18px; height: 18px; accent-color: var(--accent); }
.bc-actions { display: flex; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.bc-btn { flex: 1; padding: 14px; border: none; border-radius: 13px; font-size: 15px; font-weight: 700; }
.bc-btn.ghost { background: var(--bg3); color: var(--text); border: 1px solid var(--line2); }
.bc-btn.primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(109, 94, 252, 0.4); }
.bc-btn:active { transform: scale(0.98); }
.btn-lock, button:disabled { opacity: 0.55; box-shadow: none; cursor: default; }
.btn-lock:active { transform: none; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  z-index: 40; max-width: 90%;
  background: var(--grad); color: #fff; padding: 11px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(109, 94, 252, 0.4);
}

/* ─── Learning paths (#25) ──────────────────────────────────────────────────── */
.path-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 16px; padding: 13px 14px; margin-bottom: 10px;
  cursor: pointer; transition: transform 0.12s, background 0.12s;
}
.path-card:active { transform: scale(0.985); background: var(--bg3); }
.path-card.done { border-color: rgba(52, 211, 153, 0.3); }
.path-ic { font-size: 26px; line-height: 1; flex-shrink: 0; width: 30px; text-align: center; }
.path-body { flex: 1; min-width: 0; }
.path-nm { font-weight: 600; font-size: 15px; }
.path-lv { color: var(--accent2); font-size: 11px; font-weight: 600; margin-left: 6px; }
.path-ds { color: var(--hint); font-size: 12px; margin-top: 2px; line-height: 1.35; }
.path-bar { height: 6px; border-radius: 4px; background: var(--bg3); margin-top: 8px; overflow: hidden; }
.path-bar > i { display: block; height: 100%; background: var(--grad); border-radius: 4px; transition: width 0.3s; }
.path-pct { color: var(--hint); font-size: 11px; font-weight: 600; margin-top: 4px; }
.path-card.done .path-pct { color: var(--ok); }

.path-prog { margin-bottom: 14px; }
.path-prog .path-bar { height: 8px; }
.path-prog .path-pct { font-size: 13px; margin-top: 6px; text-align: center; }

.step {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 9px;
  cursor: pointer; transition: background 0.12s, transform 0.1s;
}
.step:active { transform: scale(0.99); }
.step-chk {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 7px; margin-top: 1px;
  border: 2px solid var(--line2); display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: transparent; transition: all 0.15s;
}
.step.on .step-chk { background: var(--ok); border-color: var(--ok); color: #0b1411; }
.step-body { flex: 1; min-width: 0; }
.step-nm { font-weight: 600; font-size: 14px; }
.step.on .step-nm { color: var(--hint); text-decoration: line-through; }
.step-ds { color: var(--hint); font-size: 12px; margin-top: 3px; line-height: 1.4; }
.step-tool {
  display: inline-block; margin-top: 7px; padding: 2px 9px; border-radius: 8px;
  background: rgba(109, 94, 252, 0.14); color: var(--accent2);
  font-size: 11px; font-weight: 600;
}

/* ─── Gamification: streak + badges (#26) ───────────────────────────────────── */
.streak-banner {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(252, 211, 77, 0.16), rgba(251, 113, 133, 0.14));
  border: 1px solid rgba(252, 211, 77, 0.28); border-radius: 16px;
  padding: 12px 14px; margin-bottom: 6px; cursor: pointer;
  transition: transform 0.12s;
}
.streak-banner:active { transform: scale(0.99); }
.streak-fire { font-size: 30px; line-height: 1; flex-shrink: 0; }
.streak-fire.cold { filter: grayscale(0.85); opacity: 0.65; }
.streak-txt { flex: 1; min-width: 0; }
.streak-n { font-weight: 800; font-size: 17px; }
.streak-sub { color: var(--hint); font-size: 12px; margin-top: 2px; }
.streak-go { color: var(--hint); font-size: 22px; opacity: 0.5; }

/* 🏁 Challenge feed card (#30) */
.ch-card {
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.13), rgba(56, 189, 248, 0.10));
  border: 1px solid rgba(109, 94, 252, 0.28); border-radius: 16px;
  padding: 14px; margin-bottom: 12px;
}
.ch-head { font-weight: 800; font-size: 17px; }
.ch-sec { font-weight: 700; font-size: 12px; color: var(--hint); margin: 12px 0 6px; letter-spacing: 0.04em; }
.ch-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.ch-emoji { font-size: 21px; flex-shrink: 0; width: 26px; text-align: center; }
.ch-mid { flex: 1; min-width: 0; }
.ch-title { font-weight: 700; font-size: 14px; }
.ch-bar { height: 6px; background: var(--bg3); border-radius: 4px; overflow: hidden; margin: 5px 0 3px; }
.ch-fill { height: 100%; background: var(--grad); border-radius: 4px; transition: width 0.3s; }
.ch-sub { color: var(--hint); font-size: 11px; }
.ch-act { flex-shrink: 0; }
.ch-rew { color: var(--hint); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ch-done { font-size: 18px; }
.ch-claim {
  background: var(--grad); color: #fff; border: none; border-radius: 10px;
  padding: 8px 12px; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.ch-claim:active { transform: scale(0.97); }
.ch-comp { display: block; width: 100%; margin-top: 10px; padding: 12px; }
.ch-comp.done { background: none; color: var(--good, #34d399); text-align: center; font-weight: 700; font-size: 13px; }
.ch-empty { color: var(--hint); font-size: 13px; padding: 6px 0; }
.ch-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.ch-daychip { display: inline-flex; align-items: center; gap: 4px; background: var(--bg3); border: 1px solid var(--line2); border-radius: 10px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.ch-daychip input { margin: 0; }
.ch-rew-sec { font-weight: 700; font-size: 12px; color: var(--hint); margin: 10px 0 4px; }
.ch-rew-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.ch-rew-lbl { flex: 1; min-width: 0; }
.ch-rew-name { font-size: 13px; font-weight: 600; }
.ch-rew-desc { font-size: 11px; color: var(--hint); margin-top: 1px; }
.ch-rew-row select.chRewKind { width: 70px; flex-shrink: 0; }
.ch-rew-row input.chRewAmt { width: 64px; flex-shrink: 0; text-align: center; }

/* ⚠️ Error log rows */
.err-row { border-top: 1px solid var(--line); padding: 8px 0; }
.err-meta { font-size: 11px; color: var(--hint); margin-bottom: 3px; }
.err-msg { font-size: 12px; font-family: ui-monospace, monospace; word-break: break-word; color: var(--text); }
.err-stack { margin-top: 4px; }
.err-stack summary { font-size: 11px; color: var(--hint); cursor: pointer; }
.err-stack pre { font-size: 10px; color: var(--hint); white-space: pre-wrap; word-break: break-word; margin: 4px 0 0; }

.game-streak {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.game-stat {
  flex: 1; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 8px; text-align: center;
}
.game-stat b { display: block; font-size: 22px; font-weight: 800; }
.game-stat span { color: var(--hint); font-size: 11px; }
.game-stat.hot b { color: var(--gold); }

/* Club leaderboard (#28) */
.lb-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; margin-bottom: 8px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 13px;
}
.lb-row.me { border-color: var(--accent); background: rgba(109, 94, 252, 0.12); }
.lb-rank {
  flex-shrink: 0; min-width: 30px; text-align: center; font-weight: 800; font-size: 15px; color: var(--hint);
}
.lb-rank.top { font-size: 20px; }
.lb-name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; overflow: hidden; }
.lb-un { color: var(--accent2); font-weight: 500; font-size: 12px; }
.lb-meta { display: block; color: var(--hint); font-size: 11px; font-weight: 500; margin-top: 2px; }
.lb-score { flex-shrink: 0; font-weight: 800; color: var(--accent2); font-size: 15px; }

.badge-prog { height: 4px; border-radius: 3px; background: var(--bg3); margin-top: 8px; overflow: hidden; }
.badge-prog > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.badge-prog-t { font-size: 10px; color: var(--hint); margin-top: 4px; }

/* ─── Daily mystery chest (#27) ──────────────────────────────────────────────── */
.chest-banner {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(109, 94, 252, 0.18), rgba(56, 189, 248, 0.14));
  border: 1px solid rgba(109, 94, 252, 0.32); border-radius: 16px;
  padding: 12px 14px; margin-bottom: 6px; cursor: pointer; transition: transform 0.12s;
}
.chest-banner:active { transform: scale(0.99); }
.chest-banner.done { opacity: 0.6; cursor: default; }
.chest-ic { font-size: 28px; line-height: 1; flex-shrink: 0; }
.chest-banner:not(.done) .chest-ic { animation: chestWiggle 1.8s ease-in-out infinite; }
@keyframes chestWiggle { 0%,88%,100% { transform: rotate(0); } 92% { transform: rotate(-12deg); } 96% { transform: rotate(12deg); } }
.chest-txt { flex: 1; min-width: 0; }
.chest-n { font-weight: 700; font-size: 15px; }
.chest-sub { color: var(--hint); font-size: 12px; margin-top: 2px; }

/* Mini-games hub entry banner + cards */
.games-banner {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.16), rgba(56, 189, 248, 0.14));
  border: 1px solid rgba(52, 211, 153, 0.28); border-radius: 16px;
  padding: 12px 14px; margin-bottom: 6px; cursor: pointer; transition: transform 0.12s;
}
.games-banner:active { transform: scale(0.99); }
.games-banner .gb-ic { font-size: 26px; }
.games-banner .gb-tx { flex: 1; font-weight: 700; font-size: 15px; }
.games-banner .gb-go { color: var(--hint); font-size: 22px; opacity: 0.5; }
.game-card {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 14px; margin-bottom: 10px; transition: transform 0.12s, background 0.12s;
}
.game-card:active { transform: scale(0.985); background: var(--bg3); }
.game-card .gc-ic { font-size: 26px; width: 30px; text-align: center; flex-shrink: 0; }
.game-card .gc-body { flex: 1; min-width: 0; }
.game-card .gc-nm { font-weight: 600; font-size: 15px; }
.game-card .gc-ds { color: var(--hint); font-size: 12px; margin-top: 2px; }
.game-card .gc-go { color: var(--hint); font-size: 22px; opacity: 0.5; }

/* Tapper */
.tap-bar { height: 14px; border-radius: 8px; background: var(--bg3); overflow: hidden; margin: 4px 0 8px; }
.tap-bar > i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 8px; transition: width 0.12s; }
.tap-count { text-align: center; font-weight: 800; font-size: 17px; margin-bottom: 14px; }
.tap-pad {
  width: 100%; aspect-ratio: 1.7; border-radius: 22px; border: none; cursor: pointer;
  background: radial-gradient(120% 120% at 50% 0%, #7d6cff, #5b4ee0);
  color: #fff; box-shadow: 0 10px 26px rgba(109, 94, 252, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.18);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
  transition: transform 0.06s, box-shadow 0.1s;
}
.tap-pad:active { transform: scale(0.965); box-shadow: 0 5px 16px rgba(109, 94, 252, 0.4); }
.tap-pad:disabled { filter: grayscale(0.7); opacity: 0.5; cursor: default; }
.tap-pad .tp-em { font-size: 48px; line-height: 1; }
.tap-pad .tp-lb { font-weight: 800; font-size: 18px; letter-spacing: 1px; }

/* Wheel of fortune */
.wheel-wrap { position: relative; display: flex; justify-content: center; padding-top: 14px; }
.wheel-wrap canvas { width: min(300px, 78vw); height: min(300px, 78vw); filter: drop-shadow(0 8px 22px rgba(0,0,0,0.4)); }
.wheel-ptr {
  position: absolute; top: 2px; left: 50%; transform: translateX(-50%);
  color: var(--gold); font-size: 26px; z-index: 2; text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Stop the bar */
.stop-track {
  position: relative; height: 46px; margin-top: 18px; border-radius: 12px;
  background: linear-gradient(180deg, #20242f, #171a23); border: 1px solid var(--line2);
  overflow: hidden;
}
.stop-zone {
  position: absolute; top: 0; bottom: 0; background: rgba(52, 211, 153, 0.28);
  border-left: 2px solid var(--ok); border-right: 2px solid var(--ok);
}
.stop-marker {
  position: absolute; top: -3px; bottom: -3px; width: 5px; left: 0;
  background: var(--gold); border-radius: 3px; box-shadow: 0 0 10px rgba(252, 211, 77, 0.8);
  transform: translateX(-50%);
}

/* Referrals */
.ref-reward { background: var(--bg2); border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; font-size: 14px; line-height: 1.5; }
.ref-link {
  background: var(--bg3); border: 1px solid var(--line2); border-radius: 11px; padding: 11px 13px;
  font-size: 12px; word-break: break-all; color: var(--accent2); font-family: monospace;
}

/* Granular reset picker rows */
.reset-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 12px; margin-bottom: 8px;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 14px;
}
.reset-row input { width: 19px; height: 19px; flex-shrink: 0; accent-color: var(--bad); }

/* Collapsible admin config cards */
.cfg-h { cursor: pointer; display: flex; align-items: center; justify-content: space-between; margin: 0; user-select: none; }
.cfg-chev { color: var(--hint); font-size: 14px; transition: transform 0.15s; }
.cfg.collapsed .cfg-body { display: none; }
.cfg-htl { display: inline-flex; align-items: center; gap: 4px; }
.cfg-drag { cursor: grab; color: var(--hint); font-size: 13px; padding: 0 2px; user-select: none; touch-action: none; }
.cfg-drag:active { cursor: grabbing; }
.cfg.dragging { opacity: 0.45; outline: 1px dashed var(--accent2); }

/* ─── Jobs board source settings ───────────────────────────────────────────── */
.jb-srcs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 6px; }
.jb-src { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--fg); }
.jb-src input { width: 16px; height: 16px; }

/* ─── 🥊 Repo battle of the day ────────────────────────────────────────────── */
.bt-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.bt-side { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 14px; padding: 14px 12px; text-align: center; }
.bt-side.mine { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2) inset; }
.bt-av { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; }
.bt-nm { font-weight: 700; font-size: 13.5px; margin-top: 8px; word-break: break-word; }
.bt-meta { color: var(--hint); font-size: 12px; margin-top: 3px; }
.bt-desc { color: var(--hint); font-size: 11.5px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bt-vote { width: 100%; margin-top: 10px; }
.bt-bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 10px; }
.bt-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.bt-pct { font-size: 12px; font-weight: 700; margin-top: 5px; color: var(--fg); }
.bt-vs { font-weight: 800; color: var(--hint); font-size: 13px; }
.qz-bank { max-height: 260px; overflow-y: auto; }

/* Quiz of the day */
.quiz-lvl { font-size: 12px; font-weight: 700; color: var(--hint); margin-bottom: 6px; }
.quiz-q { font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 14px; }
.quiz-opts { display: flex; flex-direction: column; gap: 9px; }
.quiz-opt {
  text-align: left; padding: 13px 15px; border-radius: 13px; font-size: 14px; cursor: pointer;
  background: var(--bg2); border: 1px solid var(--line2); color: var(--text); transition: all 0.12s;
}
.quiz-opt:not(:disabled):active { transform: scale(0.99); }
.quiz-opt:not(:disabled):hover { border-color: var(--accent); }
.quiz-opt:disabled { cursor: default; opacity: 0.85; }
.quiz-opt.ok { background: rgba(52, 211, 153, 0.16); border-color: var(--ok); color: var(--ok); font-weight: 600; }
.quiz-opt.bad { background: rgba(251, 113, 133, 0.16); border-color: var(--bad); color: var(--bad); }
.quiz-foot { margin-top: 14px; }
.quiz-res { text-align: center; font-weight: 800; font-size: 16px; }
.quiz-res.ok { color: var(--ok); }
.quiz-res.bad { color: var(--bad); }
.quiz-exp {
  margin-top: 10px; padding: 11px 13px; border-radius: 12px; font-size: 13px; line-height: 1.45;
  background: rgba(109, 94, 252, 0.12); border: 1px solid rgba(109, 94, 252, 0.25);
}
/* Admin quiz bank rows */
.qz-item { display: flex; gap: 9px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.qz-item .qz-q { flex: 1; line-height: 1.4; }
.qz-item .qz-lv { flex-shrink: 0; color: var(--hint); }
.qz-item .qz-del { flex-shrink: 0; background: none; border: none; color: var(--bad); font-size: 16px; cursor: pointer; }
.qz-prev { background: var(--bg3); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 12px; }
.qz-prev b { font-size: 13px; }

/* Admin day-of-week picker */
.day-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.day-b {
  flex: 1; min-width: 38px; padding: 8px 0; border-radius: 9px;
  background: var(--bg3); border: 1px solid var(--line2); color: var(--hint);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.12s;
}
.day-b.on { background: var(--accent); border-color: var(--accent); color: #fff; }

.chest-mute {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 11px; font-size: 18px;
  background: var(--bg3); border: 1px solid var(--line2); color: var(--text);
  cursor: pointer; transition: transform 0.12s, border-color 0.15s;
}
.chest-mute:active { transform: scale(0.92); }
.chest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 4px; }
.chest-box {
  aspect-ratio: 1; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.10);
  background:
    radial-gradient(130% 130% at 50% 0%, rgba(109, 94, 252, 0.30), rgba(155, 125, 255, 0.06) 55%),
    linear-gradient(180deg, #262b3d, #1b1f2c);
  font-size: 34px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; overflow: hidden;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.16s, box-shadow 0.18s, border-color 0.18s, background 0.2s;
}
/* diagonal light sweep across closed boxes */
.chest-box::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.12) 50%, transparent 58%);
  transform: translateX(-130%);
}
.chest-grid:not(.locked) .chest-box::after { animation: chestShine 3.4s ease-in-out infinite; }
.chest-grid:not(.locked) .chest-box:nth-child(3n+2)::after { animation-delay: 0.5s; }
.chest-grid:not(.locked) .chest-box:nth-child(3n)::after { animation-delay: 1s; }
@keyframes chestShine { 0%, 72%, 100% { transform: translateX(-130%); } 84% { transform: translateX(130%); } }
.chest-box:active { transform: scale(0.93); }
.chest-box:not(.dim):not(.win):not(.miss):not(.prize):hover {
  transform: translateY(-3px); border-color: var(--accent2);
  box-shadow: 0 10px 24px rgba(109, 94, 252, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.chest-box.win {
  background: var(--grad); border-color: var(--accent2);
  box-shadow: 0 0 26px rgba(155, 125, 255, 0.6); animation: chestPop 0.5s ease;
}
.chest-box.prize {
  background: radial-gradient(130% 130% at 50% 0%, rgba(252, 211, 77, 0.4), rgba(252, 211, 77, 0.06) 60%), #20222e;
  border-color: var(--gold); box-shadow: 0 0 24px rgba(252, 211, 77, 0.5); animation: chestPop 0.5s ease;
}
.chest-box.miss {
  background: radial-gradient(130% 130% at 50% 0%, rgba(251, 113, 133, 0.32), rgba(27, 31, 44, 0.6) 60%), #1b1f2c;
  border-color: var(--bad); animation: chestShake 0.4s ease;
}
.chest-box.dim { opacity: 0.3; box-shadow: none; }
.chest-grid.locked .chest-box { cursor: default; }
.chest-grid.locked .chest-box::after { display: none; }
@keyframes chestPop { 0% { transform: scale(0.55) rotate(-6deg); } 55% { transform: scale(1.2) rotate(3deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes chestShake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.chest-result {
  margin-top: 14px; text-align: center; padding: 16px 14px; border-radius: 14px;
  background: var(--bg2); border: 1px solid var(--accent);
}
.chest-result.miss { border-color: rgba(251, 113, 133, 0.5); }
.chest-result .cr-em { font-size: 40px; }
.chest-result .cr-t { font-weight: 800; font-size: 18px; margin-top: 6px; }
.chest-result .cr-s { color: var(--hint); font-size: 13px; margin-top: 4px; }
.chest-result .cr-tip {
  margin-top: 12px; padding: 11px 13px; border-radius: 12px; text-align: left;
  background: rgba(109, 94, 252, 0.12); border: 1px solid rgba(109, 94, 252, 0.25);
  font-size: 13px; line-height: 1.45;
}

/* Vibe-coder tips collection */
.tip-row { display: flex; gap: 11px; align-items: flex-start; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.tip-row:last-child { border-bottom: none; }
.tip-n {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 8px; background: rgba(109, 94, 252, 0.16);
  color: var(--accent2); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center;
}
.tip-txt { flex: 1; font-size: 14px; line-height: 1.45; }
.tip-row.locked .tip-n { background: rgba(134, 140, 160, 0.14); }
.tip-locked { color: var(--hint); font-style: italic; opacity: 0.7; }
