:root {
  color-scheme: dark;
  --bg: #08111f;
  --card: rgba(16, 24, 39, 0.78);
  --card2: rgba(23, 36, 60, 0.72);
  --text: #edf5ff;
  --muted: #a9b8d0;
  --line: rgba(255,255,255,0.12);
  --brand: #7c3aed;
  --brand2: #06b6d4;
  --good: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --shadow: 0 24px 80px rgba(0,0,0,0.38);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--text); background: var(--bg); }
button, input { font: inherit; }
.bg { position: fixed; inset: 0; background: radial-gradient(circle at 10% 10%, rgba(124,58,237,.38), transparent 32rem), radial-gradient(circle at 90% 20%, rgba(6,182,212,.28), transparent 28rem), linear-gradient(135deg, #07101d, #111827 52%, #090f1c); z-index: -1; }
.shell { width: min(1180px, calc(100% - 28px)); margin: 0 auto; padding: 28px 0 48px; }
.card { border: 1px solid var(--line); background: var(--card); backdrop-filter: blur(18px); border-radius: 28px; box-shadow: var(--shadow); }
.hero { padding: clamp(24px, 5vw, 56px); margin-top: 5vh; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .16em; color: #8bdcf0; font-size: .75rem; font-weight: 800; }
h1 { margin: 0; font-size: clamp(2.1rem, 8vw, 5rem); line-height: .95; max-width: 920px; }
h2 { margin: 0; font-size: clamp(1.2rem, 3vw, 1.7rem); }
.lead { max-width: 760px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.22rem); line-height: 1.7; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 820px; margin-top: 30px; }
label { color: var(--muted); display: grid; gap: 8px; font-weight: 700; }
input { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; color: var(--text); background: rgba(255,255,255,.06); outline: none; }
input:focus { border-color: rgba(6,182,212,.8); box-shadow: 0 0 0 4px rgba(6,182,212,.12); }
.check { grid-template-columns: auto 1fr; align-items: center; align-self: end; padding: 12px 0; }
.check input { width: 20px; height: 20px; }
.actions, .controls, .top-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
button { border: 0; border-radius: 999px; padding: 13px 18px; color: var(--text); cursor: pointer; font-weight: 900; transition: transform .15s ease, opacity .15s ease, border .15s ease; }
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
.primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); }
.secondary { background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.hint { color: var(--muted); }
.hidden { display: none !important; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 20px; margin-bottom: 18px; }
.titleInput { border: 0; background: transparent; padding: 0; font-size: clamp(1.6rem, 5vw, 3rem); font-weight: 950; line-height: 1.05; }
.grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); gap: 18px; }
.panel { padding: 20px; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 8px 12px; font-size: .85rem; font-weight: 900; border: 1px solid var(--line); background: rgba(255,255,255,.07); }
.pill::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--warn); }
.pill.online::before { background: var(--good); }
.pill.offline::before { background: var(--bad); }
.deck { display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); gap: 12px; }
.cardBtn { min-height: 116px; border-radius: 22px; background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05)); border: 1px solid var(--line); font-size: 2rem; box-shadow: inset 0 1px rgba(255,255,255,.16); }
.cardBtn.selected { outline: 3px solid rgba(6,182,212,.78); background: linear-gradient(135deg, rgba(124,58,237,.9), rgba(6,182,212,.68)); }
.people { display: grid; gap: 10px; }
.person { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.05); border-radius: 18px; }
.person small { color: var(--muted); display: block; margin-top: 4px; }
.vote { min-width: 52px; min-height: 52px; display: grid; place-items: center; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.08); font-size: 1.2rem; font-weight: 950; }
.vote.done { color: #05121a; background: linear-gradient(135deg, #a7f3d0, #67e8f9); }
.vote.hiddenVote { font-size: 1rem; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.stat { padding: 12px; border-radius: 18px; background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.stat b { display: block; font-size: 1.4rem; }
.stat span { color: var(--muted); font-size: .85rem; }
.settings { margin-top: 20px; color: var(--muted); }
.settings summary { cursor: pointer; font-weight: 900; }
.settings label { margin-top: 14px; }
.settings-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }
.historyBlock { margin-top: 18px; }
.history { display: grid; gap: 10px; color: var(--muted); }
.roundItem { padding: 12px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.roundItem b { color: var(--text); }
.empty { color: var(--muted); }
@media (max-width: 840px) {
  .form-grid, .grid, .settings-row { grid-template-columns: 1fr; }
  .topbar { align-items: stretch; flex-direction: column; }
  .deck { grid-template-columns: repeat(3, 1fr); }
  .cardBtn { min-height: 92px; }
}
