:root{
  --bg:#0a0e1a;
  --void:#0a0e1a; /* alias used by inline SVG fills in index.html */
  --surface:#131a2e;
  --surface-2:#1b2440;
  --border:#242f4d;
  --text:#eef1f8;
  --text-dim:#8a93ac;
  --accent:#5c8df6;
  --accent-light:#8fb0ff;
  --accent-soft:rgba(92,141,246,.14);
  --live:#ff6b7a;
  --live-soft:rgba(255,107,122,.14);
  --radius-lg:20px;
  --radius-md:14px;
  --radius-sm:10px;
  --content-w:1100px;
}
*{box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent;}
html{
  background:var(--bg);
  scroll-behavior:smooth;
}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'Manrope', sans-serif;
  min-height:100vh;
  overflow-x:hidden;
  padding-bottom:env(safe-area-inset-bottom);
}
a, button{ touch-action:manipulation; }

.kicker{
  font-family:'Manrope', sans-serif;
  font-size:.85rem;
  font-weight:600;
  color:var(--text-dim);
  margin-bottom:8px;
}

/* ---------- nav ---------- */
.site-nav{
  position:sticky; top:0; z-index:20;
  background:var(--surface);
  border-bottom:1px solid var(--border);
}
.nav-inner{
  max-width:var(--content-w);
  margin:0 auto;
  padding:14px 22px;
  padding-top:calc(14px + env(safe-area-inset-top));
  display:flex; align-items:center; gap:24px;
  position:relative;
}
.nav-brand{
  display:flex; align-items:center; gap:9px;
  text-decoration:none; color:var(--text);
  font-family:'Baloo 2', sans-serif;
  font-weight:700; font-size:1.05rem;
}
.nav-logo{width:28px; height:28px; border-radius:50%;}
.nav-links{
  display:flex; gap:24px;
  margin-left:auto;
}
.nav-links a{
  color:var(--text-dim);
  text-decoration:none;
  font-size:.9rem;
  font-weight:600;
  transition:color .15s ease;
}
.nav-links a:hover{ color:var(--text); }
.nav-links a[aria-current="page"]{ color:var(--text); }

.nav-toggle{
  display:none;
  align-items:center; justify-content:center;
  width:38px; height:38px;
  margin-left:auto;
  background:transparent;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  cursor:pointer;
  flex-shrink:0;
}
.nav-toggle-bar{
  position:relative;
  width:16px; height:2px;
  background:var(--text);
  border-radius:2px;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after{
  content:"";
  position:absolute; left:0;
  width:16px; height:2px;
  background:var(--text);
  border-radius:2px;
  transition:transform .18s ease, opacity .18s ease, top .18s ease;
}
.nav-toggle-bar::before{ top:-5px; }
.nav-toggle-bar::after{ top:5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar{ background:transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before{ top:0; transform:rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after{ top:0; transform:rotate(-45deg); }
.nav-live{
  display:flex; align-items:center; gap:7px;
  padding:8px 14px;
  border-radius:999px;
  background:var(--surface-2);
  color:var(--text-dim);
  text-decoration:none;
  font-size:.82rem; font-weight:600;
  flex-shrink:0;
  transition:background .15s ease, color .15s ease;
}
.nav-live:hover{ background:var(--accent-soft); color:var(--accent-light); }
.nav-live.is-live{
  background:var(--live-soft);
  color:var(--live);
}
.nav-live .status-dot{
  width:6px; height:6px; border-radius:50%;
  background:var(--text-dim);
  flex-shrink:0;
}
.nav-live.is-live .status-dot{
  background:var(--live);
  animation:pulse-dot 1.6s ease-out infinite;
}

/* ---------- hero ---------- */
.hero{
  max-width:var(--content-w);
  margin:0 auto;
  padding:40px 22px 44px;
}
.masthead{
  position:relative;
  overflow:hidden;
  line-height:0;
  height:clamp(150px, 22vw, 300px);
}
.masthead img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 42%;
}
.masthead::after{
  content:"";
  position:absolute; left:0; right:0; bottom:0; height:60%;
  background:linear-gradient(180deg, transparent 0%, var(--bg) 100%);
  pointer-events:none;
}
.hero-copy{
  max-width:64ch;
  margin:0 auto;
  text-align:center;
}
.hero h1{
  font-family:'Baloo 2', sans-serif;
  font-weight:800;
  font-size:2.6rem;
  line-height:1.15;
  color:var(--text);
}
.hero .tagline{
  margin:16px auto 0;
  color:var(--text-dim);
  font-size:1.02rem;
  max-width:46ch;
  line-height:1.65;
}
.hero-actions{
  margin-top:28px;
  display:flex; flex-wrap:wrap; justify-content:center; gap:12px;
}

/* ---------- simple page header (for sub-pages without the full hero) ---------- */
.page-header{
  max-width:var(--content-w);
  margin:0 auto;
  padding:48px 22px 8px;
}
.page-header h1{
  font-family:'Baloo 2', sans-serif;
  font-weight:800;
  font-size:2rem;
  color:var(--text);
}
.page-header p{
  margin-top:10px;
  color:var(--text-dim);
  max-width:60ch;
  line-height:1.6;
}

/* ---------- grove divider (forest banner) ---------- */
.grove{
  position:relative;
  margin:8px 0 0;
  height:min(38vh, 320px);
  min-height:170px;
  overflow:hidden;
}
.grove img{
  width:100%; height:100%;
  object-fit:cover;
  object-position:center 60%;
  display:block;
}
.grove::before{
  content:"";
  position:absolute; left:0; right:0; top:0; height:45%;
  background:linear-gradient(0deg, transparent 0%, var(--bg) 100%);
  pointer-events:none;
  z-index:1;
}
.grove::after{
  content:"";
  position:absolute; left:0; right:0; bottom:0; height:55%;
  background:linear-gradient(180deg, transparent 0%, var(--bg) 100%);
  pointer-events:none;
  z-index:1;
}
.grove-overlay{
  position:absolute; inset:0;
  z-index:2;
  display:flex; align-items:center; justify-content:center;
  padding:0 22px;
  background:linear-gradient(180deg, rgba(10,14,26,.05) 0%, rgba(10,14,26,.35) 55%, rgba(10,14,26,.6) 100%);
}
.grove-text{
  max-width:38ch;
  text-align:center;
  font-family:'Baloo 2', sans-serif;
  font-weight:600;
  font-size:1.2rem;
  line-height:1.4;
  color:var(--text);
}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 22px;
  border-radius:var(--radius-sm);
  text-decoration:none;
  font-weight:700; font-size:.92rem;
  transition:transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn-primary{
  background:var(--accent);
  color:#0a0e1a;
}
.btn-primary:hover{ background:var(--accent-light); transform:translateY(-1px); }
.btn-ghost{
  background:transparent;
  color:var(--text);
  border:1px solid var(--border);
}
.btn-ghost:hover{ border-color:var(--accent); color:var(--accent-light); }
.btn-small{ padding:9px 16px; font-size:.84rem; flex-shrink:0; }
label.btn{ cursor:pointer; }
.btn:focus-visible{ outline:2px solid var(--accent-light); outline-offset:2px; }

/* ---------- sections ---------- */
.section{
  max-width:var(--content-w);
  margin:0 auto;
  padding:0 22px 52px;
}
.section-head{
  padding-top:52px;
  margin-bottom:18px;
}
.section-head h2{
  font-family:'Baloo 2', sans-serif;
  font-weight:700;
  font-size:1.55rem;
  color:var(--text);
}

/* ---------- cards (shared surface) ---------- */
.band{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  overflow:hidden;
}
.panel-inner{
  padding:26px;
}
.stream-top{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.stream-id{
  display:flex; align-items:center; gap:12px;
}
.stream-avatar-wrap{
  width:46px; height:46px; border-radius:50%;
  overflow:hidden;
  background:var(--surface-2);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
  border:1px solid var(--border);
}
.stream-avatar-wrap img{width:100%; height:100%; object-fit:cover;}
.stream-name{
  font-family:'Baloo 2', sans-serif;
  font-weight:700; font-size:1.05rem;
}
.status-pill{
  display:inline-flex; align-items:center; gap:6px;
  font-family:'Manrope', sans-serif;
  font-size:.78rem;
  font-weight:600;
  padding:4px 10px 4px 8px;
  border-radius:999px;
  background:var(--surface-2);
  color:var(--text-dim);
  width:max-content;
  margin-top:4px;
}
.status-dot{
  width:6px; height:6px; border-radius:50%;
  background:var(--text-dim);
  flex-shrink:0;
}
.stream-panel.is-live .status-pill{
  background:var(--live-soft);
  color:var(--live);
}
.stream-panel.is-live .status-dot{
  background:var(--live);
  box-shadow:0 0 0 0 rgba(255,107,122,.6);
  animation:pulse-dot 1.6s ease-out infinite;
}
@keyframes pulse-dot{
  0%{box-shadow:0 0 0 0 rgba(255,107,122,.55);}
  70%{box-shadow:0 0 0 8px rgba(255,107,122,0);}
  100%{box-shadow:0 0 0 0 rgba(255,107,122,0);}
}
.stream-title{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid var(--border);
  font-size:.94rem;
  color:var(--text);
  line-height:1.5;
  overflow-wrap:break-word;
}
.stats-grid{
  margin-top:20px;
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:10px;
}
.stat-tile{
  padding:16px;
  background:var(--surface-2);
  border-radius:var(--radius-md);
  display:flex; flex-direction:column; gap:6px;
  min-width:0;
}
.stat-value{
  font-family:'Manrope', sans-serif;
  font-size:1.35rem;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  color:var(--accent-light);
}
.stat-value-text{
  font-size:.92rem;
  font-weight:700;
  color:var(--text);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.stat-label{
  font-size:.76rem;
  color:var(--text-dim);
}

/* ---------- leaderboard tabs ---------- */
.leaderboard-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:18px;
}
.leaderboard-tab{
  padding:9px 16px;
  border-radius:999px;
  border:1px solid var(--border);
  background:transparent;
  color:var(--text-dim);
  font-family:'Manrope', sans-serif;
  font-size:.84rem;
  font-weight:700;
  cursor:pointer;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.leaderboard-tab:hover{ color:var(--text); border-color:var(--accent); }
.leaderboard-tab.is-active{
  background:var(--accent);
  color:var(--void);
  border-color:var(--accent);
}
.leaderboard-tab:focus-visible{ outline:2px solid var(--accent-light); outline-offset:2px; }

/* ---------- leaderboard (embedded) ---------- */
.leaderboard-list{
  list-style:none;
}
.leaderboard-row{
  display:flex; align-items:center; gap:14px;
  padding:12px 8px;
  border-bottom:1px solid var(--border);
}
.leaderboard-row:last-child{ border-bottom:none; }
.leaderboard-rank{
  display:flex; align-items:center; justify-content:center;
  width:26px; height:26px;
  border-radius:50%;
  background:var(--surface-2);
  font-size:.78rem;
  font-weight:700;
  color:var(--text-dim);
  flex-shrink:0;
}
.leaderboard-row:nth-child(1) .leaderboard-rank,
.leaderboard-row:nth-child(2) .leaderboard-rank,
.leaderboard-row:nth-child(3) .leaderboard-rank{
  background:var(--accent-soft);
  color:var(--accent-light);
}
.leaderboard-name{
  flex:1;
  font-weight:600;
  font-size:.94rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.leaderboard-points{
  font-weight:700;
  font-variant-numeric:tabular-nums;
  font-size:.88rem;
  color:var(--accent-light);
  flex-shrink:0;
}
/* ---------- clips (reuses leaderboard-row) ---------- */
.clip-thumb{
  display:block;
  width:96px; height:54px;
  border-radius:var(--radius-sm);
  overflow:hidden;
  background:var(--surface-2);
  flex-shrink:0;
}
.clip-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.clip-info{
  flex:1;
  min-width:0;
  display:flex; flex-direction:column; gap:4px;
}
.clip-title{
  color:var(--text);
  text-decoration:none;
  font-weight:600;
  font-size:.9rem;
  line-height:1.35;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.clip-title:hover{ color:var(--accent-light); }
.clip-meta{
  font-size:.76rem;
  color:var(--text-dim);
  font-variant-numeric:tabular-nums;
}
.clips-pagination{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:8px;
  margin-top:18px;
}
.clips-pagination button:disabled{
  opacity:.35;
  cursor:default;
}
.clips-pagination button:disabled:hover{
  color:var(--text-dim);
  border-color:var(--border);
}

.leaderboard-loading,
.leaderboard-empty,
.leaderboard-error{
  color:var(--text-dim);
  font-size:.9rem;
  justify-content:center;
  text-align:center;
  border-bottom:none;
}
.leaderboard-more{
  display:inline-block;
  margin-top:18px;
  font-size:.84rem;
  font-weight:600;
  color:var(--text-dim);
  text-decoration:none;
  border-bottom:1px solid transparent;
  transition:color .15s ease, border-color .15s ease;
}
.leaderboard-more:hover{
  color:var(--accent-light);
  border-color:var(--accent-light);
}

/* ---------- dashboard grid (stream + schedule side by side) ---------- */
.dashboard-grid{
  display:grid;
  grid-template-columns:1.35fr 1fr;
  gap:20px;
  align-items:stretch;
}
.dashboard-grid > .band{
  height:100%;
  display:flex;
  flex-direction:column;
}
.dashboard-grid .panel-inner{
  height:100%;
  display:flex;
  flex-direction:column;
}
.dashboard-grid .stats-grid{
  margin-top:auto;
  padding-top:20px;
}

/* ---------- schema (weekly schedule) ---------- */
.schema-panel{
  height:100%;
}
.schema-body{
  padding:26px;
  display:flex; flex-direction:column; gap:14px;
  height:100%;
}
.schema-heading{
  font-family:'Baloo 2', sans-serif;
  font-weight:700;
  font-size:1.15rem;
  color:var(--text);
}
.schema-notes{
  display:flex; flex-direction:column; gap:6px;
  margin-top:auto;
  padding-top:14px;
}
.schema-note{
  font-size:.86rem;
  color:var(--text-dim);
  line-height:1.5;
}
.schema-list{
  list-style:none;
  display:flex; flex-direction:column;
}
.schema-list li{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  padding:8px 2px;
  border-bottom:1px solid var(--border);
}
.schema-list li:last-child{ border-bottom:none; }
.schema-day{
  font-weight:700;
  font-size:.92rem;
  color:var(--text);
}
.schema-time{
  font-weight:700;
  font-variant-numeric:tabular-nums;
  font-size:.9rem;
  color:var(--accent-light);
  flex-shrink:0;
}

/* ---------- socials grid ---------- */
.socials-grid{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
}
.social-card{
  display:flex; flex-direction:column; align-items:flex-start; gap:10px;
  padding:22px;
  text-decoration:none;
  color:var(--text);
  transition:background .15s ease;
  min-width:0;
  border-right:1px solid var(--border);
}
.social-card:last-child{ border-right:none; }
.social-card:hover{
  background:var(--surface-2);
}
.social-card:focus-visible{ outline:2px solid var(--accent-light); outline-offset:-2px; }
.social-icon{
  width:38px; height:38px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:var(--accent);
  flex-shrink:0;
}
.social-icon svg{width:18px; height:18px;}
.social-body{
  display:flex; flex-direction:column; gap:2px;
  min-width:0;
}
.social-name{ font-weight:700; font-size:.95rem; }
.social-desc{ font-size:.8rem; color:var(--text-dim); }
.social-handle{
  font-size:.8rem;
  color:var(--text-dim);
  flex-shrink:0;
}

footer{
  padding:24px 22px 44px;
  font-size:.78rem;
  color:var(--text-dim);
  text-align:center;
}

/* ---------- responsive ---------- */
@media (max-width:760px){
  .nav-inner{ padding-left:16px; padding-right:16px; gap:12px; }
  .nav-toggle{ display:flex; order:3; }
  .nav-live{ order:2; margin-left:0; }
  .nav-links{
    order:4;
    position:absolute;
    top:100%;
    left:50%;
    width:100vw;
    transform:translateX(-50%);
    flex-direction:column;
    gap:0;
    background:var(--surface);
    border-bottom:1px solid var(--border);
    max-height:0;
    overflow:hidden;
    opacity:0;
    transition:max-height .22s ease, opacity .18s ease;
  }
  .nav-links a{ text-align:center; }
  .nav-links.is-open{
    max-height:220px;
    opacity:1;
  }
  .nav-links a{
    padding:14px 22px;
    border-top:1px solid var(--border);
    font-size:1rem;
  }
  .hero{ padding:28px 20px 36px; }
  .hero h1{ font-size:2rem; }
  .hero .tagline{ font-size:.98rem; }
  .hero-actions{ flex-direction:column; align-items:stretch; }
  .hero-actions .btn{ width:100%; padding:14px 22px; }
  .page-header{ padding:32px 20px 4px; }
  .section{ padding:0 20px 44px; }
  .section-head{ padding-top:40px; }
  .panel-inner, .schema-body{ padding:20px; }
  .grove-text{ font-size:1.05rem; }
  .stats-grid{ grid-template-columns:1fr 1fr; }
  .dashboard-grid{ grid-template-columns:1fr; gap:16px; }
  .socials-grid{ grid-template-columns:1fr; }
  .social-card{ border-right:none; border-bottom:1px solid var(--border); padding:18px; }
  .social-card:last-child{ border-bottom:none; }
  .btn-small{ padding:10px 16px; }
}
@media (max-width:460px){
  .stats-grid{ grid-template-columns:1fr; }
  .hero h1{ font-size:1.75rem; }
  .nav-brand span{ display:none; }
  .leaderboard-tab{ padding:8px 12px; font-size:.8rem; }
  .clip-thumb{ width:72px; height:41px; }
  .clip-title{ font-size:.84rem; }
}

@media (prefers-reduced-motion: reduce){
  .status-dot{ animation:none !important; }
  html{ scroll-behavior:auto; }
}

/* ---------- tournament ---------- */
.tournament-panel, .admin-box{ margin-top:0; position:relative; overflow:hidden; }
.tournament-top{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:wrap;
  margin-bottom:14px;
}
.tournament-status-badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:7px 14px;
  border-radius:999px;
  font-size:.82rem;
  font-weight:700;
  background:var(--surface-2);
  color:var(--text-dim);
  border:1px solid var(--border);
}
.tournament-status-badge.is-open{
  background:rgba(92,141,246,.14);
  color:var(--accent-light);
  border-color:transparent;
}
.tournament-status-badge.is-closed{
  background:var(--live-soft);
  color:var(--live);
  border-color:transparent;
}
.tournament-count{
  font-size:.85rem;
  color:var(--text-dim);
  font-weight:600;
}
.tournament-instructions{
  color:var(--text-dim);
  font-size:.92rem;
  line-height:1.6;
  margin-bottom:22px;
}
.tournament-instructions code{
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:6px;
  padding:1px 7px;
  font-size:.86em;
  color:var(--accent-light);
}
.tournament-subheading{
  font-family:'Baloo 2', sans-serif;
  font-weight:700;
  font-size:1.05rem;
  margin:22px 0 12px;
}
.tournament-subheading:first-child{ margin-top:0; }
.tournament-wait{
  color:var(--text-dim);
  font-size:.9rem;
  background:var(--surface-2);
  border:1px dashed var(--border);
  border-radius:var(--radius-sm);
  padding:14px 16px;
}
.tournament-rank-pill{
  padding:4px 11px;
  border-radius:999px;
  background:var(--surface-2);
  color:var(--text-dim);
  font-size:.78rem;
  font-weight:700;
  flex-shrink:0;
}
.team-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:10px;
}
.team-card{
  display:flex; flex-direction:column; gap:4px;
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:14px 16px;
}
.team-number{
  font-size:.74rem;
  font-weight:700;
  color:var(--accent-light);
  text-transform:uppercase;
  letter-spacing:.04em;
}
.team-players{
  font-weight:600;
  font-size:.95rem;
}
.matchup-list{
  display:flex; flex-direction:column; gap:8px;
}
.matchup-row{
  display:flex; align-items:center; justify-content:center; gap:14px;
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:12px 16px;
  font-weight:700;
  font-size:.92rem;
}
.vs-divider{
  color:var(--text-dim);
  font-size:.78rem;
  font-weight:700;
  text-transform:uppercase;
}
.tournament-admin-note{
  margin-top:16px;
  font-size:.85rem;
  color:var(--text-dim);
  text-align:center;
}
.tournament-admin-note a{ color:var(--accent-light); }

/* ---------- tournament: lotingwiel (draw wheel) ---------- */
.draw-stage{ margin-bottom:8px; }
.draw-heading{
  display:flex; align-items:flex-start; gap:12px;
  margin-bottom:20px;
}
.draw-emoji{
  font-size:1.6rem;
  line-height:1;
  flex-shrink:0;
  filter:drop-shadow(0 0 10px var(--accent-soft));
}
.draw-title{ margin:0 0 4px !important; }
.draw-sub{
  color:var(--text-dim);
  font-size:.88rem;
}
.draw-heading-done .draw-emoji{ filter:drop-shadow(0 0 10px rgba(120,220,150,.35)); }

.wheel-outer{
  position:relative;
  width:min(340px, 78vw);
  aspect-ratio:1/1;
  margin:0 auto 22px;
}
.wheel-outer-idle .wheel-svg-host{ opacity:.9; }
.wheel-svg-host{ width:100%; height:100%; }
.wheel-svg{
  width:100%; height:100%;
  display:block;
  filter:drop-shadow(0 10px 26px rgba(0,0,0,.35));
}
.wheel-rotor{ transform-origin:100px 100px; transform-box:view-box; }
.wheel-rotor-idle{ animation:wheelIdleSpin 26s linear infinite; }
@keyframes wheelIdleSpin{ to{ transform:rotate(360deg); } }

.wheel-slice{ transition:fill .2s ease, filter .2s ease; }
.wheel-slice-even{ fill:var(--surface-2); }
.wheel-slice-odd{ fill:#202c4e; }
.wheel-slice-hit{ fill:var(--accent) !important; filter:drop-shadow(0 0 8px var(--accent)); }
.wheel-label{
  font-family:'Manrope', sans-serif;
  font-weight:700;
  font-size:8.5px;
  fill:var(--text-dim);
  pointer-events:none;
}
.wheel-label-hit{ fill:var(--void); }
.wheel-hub{ fill:var(--surface); stroke:var(--accent); stroke-width:2; }
.wheel-hub-img{ pointer-events:none; }
.wheel-empty-ring{ fill:var(--surface-2); stroke:var(--border); stroke-width:2; }

.wheel-pointer{
  position:absolute;
  top:-6px; left:50%;
  transform:translateX(-50%);
  width:0; height:0;
  border-left:11px solid transparent;
  border-right:11px solid transparent;
  border-top:18px solid var(--accent);
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.4));
  z-index:2;
}

.draw-controls{
  display:flex; justify-content:center;
  margin-bottom:18px;
}

/* clickable wheel used on /admin - same look as the read-only wheel, but a
   real <button> the admin taps to trigger the next spin */
.wheel-outer-clickable{
  display:block;
  background:none;
  border:none;
  padding:0;
  cursor:pointer;
  transition:transform .15s ease, filter .15s ease;
}
.wheel-outer-clickable:hover:not(.wheel-outer-spinning){ transform:scale(1.015); }
.wheel-outer-clickable:hover:not(.wheel-outer-spinning) .wheel-svg{ filter:drop-shadow(0 10px 26px rgba(0,0,0,.35)) drop-shadow(0 0 14px var(--accent-soft)); }
.wheel-outer-clickable:active:not(.wheel-outer-spinning){ transform:scale(.99); }
.wheel-outer-clickable:focus-visible{ outline:2px solid var(--accent-light); outline-offset:4px; }
.wheel-outer-spinning{ cursor:default; pointer-events:none; opacity:.9; }

.reveal-list{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:10px;
  margin-bottom:6px;
}
.reveal-card-in{ animation:revealPop .4s cubic-bezier(.2,.9,.3,1.4) both; }
@keyframes revealPop{
  0%{ opacity:0; transform:scale(.85) translateY(6px); }
  100%{ opacity:1; transform:scale(1) translateY(0); }
}

@media (prefers-reduced-motion: reduce){
  .wheel-rotor-idle{ animation:none; }
  .reveal-card-in{ animation:none; }
}

/* ---------- admin ---------- */
.admin-login-form{
  display:flex; gap:10px; flex-wrap:wrap;
  margin-top:16px;
}
.admin-input{
  flex:1; min-width:180px;
  padding:12px 14px;
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  background:var(--surface-2);
  color:var(--text);
  font-family:'Manrope', sans-serif;
  font-size:.92rem;
}
.admin-input:focus-visible{ outline:2px solid var(--accent-light); outline-offset:1px; }
.admin-error{
  margin-top:12px;
  color:var(--live);
  font-size:.85rem;
  font-weight:600;
}
.admin-btn-row{
  display:flex; gap:8px; flex-wrap:wrap;
  margin-bottom:18px;
}
.admin-danger:hover{ border-color:var(--live); color:var(--live); }
.admin-add-form{
  display:flex; gap:10px; flex-wrap:wrap;
  margin-bottom:20px;
  padding-bottom:20px;
  border-bottom:1px solid var(--border);
}
.admin-select{
  flex:1; min-width:180px;
  appearance:none;
  background-image:linear-gradient(45deg, transparent 50%, var(--text-dim) 50%), linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position:calc(100% - 18px) center, calc(100% - 13px) center;
  background-size:5px 5px, 5px 5px;
  background-repeat:no-repeat;
  padding-right:34px;
}
.admin-draw-section{
  margin-bottom:20px;
  padding-bottom:20px;
  border-bottom:1px solid var(--border);
  cursor:pointer;
}
.admin-player-row{ justify-content:space-between; }
.admin-remove-btn{
  background:transparent;
  border:1px solid var(--border);
  color:var(--text-dim);
  width:28px; height:28px;
  border-radius:50%;
  cursor:pointer;
  flex-shrink:0;
  font-size:.8rem;
  line-height:1;
  transition:border-color .15s ease, color .15s ease;
}
.admin-remove-btn:hover{ border-color:var(--live); color:var(--live); }

/* admin panel: buttons without borders, except the top action row
   (Open/sluit aanmeldingen, Toernooi resetten, Uitloggen), which keeps its
   ghost-button border/styling */
#loginSection .btn,
#adminSection .btn,
#adminSection .admin-remove-btn{
  cursor:pointer;
  border:none;
}
#adminSection .admin-btn-row .btn{
  border:1px solid var(--border);
  cursor:pointer;
}

@media (max-width:600px){
  .team-grid{ grid-template-columns:1fr; }
  .reveal-list{ grid-template-columns:1fr; }
  .wheel-outer{ width:min(280px, 86vw); }
  .admin-login-form, .admin-add-form{ flex-direction:column; }
  .admin-btn-row{ flex-direction:column; }
  .admin-btn-row .btn{ width:100%; }
}

/* ---------- admin dashboard: tabs ---------- */
.admin-tabbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:12px; flex-wrap:wrap;
  padding:18px 26px 0;
}
.admin-tabs{ margin-bottom:0; }
.admin-panel-inner{ padding-top:20px; }
.admin-tab-panel{ }
.admin-tab-panel[hidden]{ display:none; }

/* ---------- admin dashboard: overview stats ---------- */
.admin-stats-grid{ margin-top:0; margin-bottom:26px; }
#statsChatters, #statsClips, #statsActivity{ margin-bottom:26px; }

/* ---------- admin dashboard: alerts ---------- */
.overlay-url-box{
  display:flex; align-items:flex-end; justify-content:space-between;
  gap:16px; flex-wrap:wrap;
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:16px 18px;
  margin-bottom:22px;
}
.overlay-url-code{
  display:inline-block;
  margin-top:8px;
  padding:6px 10px;
  background:var(--bg);
  border:1px solid var(--border);
  border-radius:8px;
  color:var(--accent-light);
  font-size:.84rem;
  word-break:break-all;
}
.alert-events-list{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));
  gap:14px;
  margin-bottom:28px;
}
.alert-event-card{
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:16px;
  display:flex; flex-direction:column; gap:8px;
}
.alert-event-head{
  display:flex; align-items:center; gap:10px;
  margin-bottom:4px;
}
.alert-event-icon{ font-size:1.2rem; flex-shrink:0; }
.alert-event-title{
  font-family:'Baloo 2', sans-serif;
  font-weight:700;
  font-size:1rem;
  flex:1;
}
.alert-toggle{
  position:relative;
  width:38px; height:22px;
  flex-shrink:0;
  cursor:pointer;
}
.alert-toggle input{
  position:absolute; opacity:0; width:100%; height:100%; margin:0; cursor:pointer;
}
.alert-toggle-slider{
  position:absolute; inset:0;
  background:var(--border);
  border-radius:999px;
  transition:background .15s ease;
}
.alert-toggle-slider::before{
  content:"";
  position:absolute; top:3px; left:3px;
  width:16px; height:16px;
  border-radius:50%;
  background:var(--text);
  transition:transform .15s ease;
}
.alert-toggle input:checked + .alert-toggle-slider{ background:var(--accent); }
.alert-toggle input:checked + .alert-toggle-slider::before{ transform:translateX(16px); }
.alert-field-label{
  font-size:.76rem;
  font-weight:700;
  color:var(--text-dim);
  text-transform:uppercase;
  letter-spacing:.03em;
  margin-top:4px;
}
.alert-field-row{
  display:flex; align-items:center; gap:8px;
}
.alert-field-row .admin-input{ flex:1; min-width:0; }
.ae-volume{ flex:1; accent-color:var(--accent); }
.ae-clipvolume{ flex:1; accent-color:var(--accent); }
.ae-volume-val{
  font-size:.8rem; font-weight:700; color:var(--text-dim);
  width:38px; text-align:right; flex-shrink:0;
}
.ae-clipvolume-val{
  font-size:.8rem; font-weight:700; color:var(--text-dim);
  width:38px; text-align:right; flex-shrink:0;
}
.alert-event-actions{
  display:flex; gap:8px; flex-wrap:wrap;
  margin-top:10px;
}
.alert-log-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:10px;
}
.alert-log{
  display:flex; flex-direction:column;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  overflow:hidden;
  max-height:320px;
  overflow-y:auto;
}
.alert-log-row{
  display:flex; align-items:center; gap:10px;
  padding:10px 14px;
  border-bottom:1px solid var(--border);
  font-size:.86rem;
}
.alert-log-row:last-child{ border-bottom:none; }
.alert-log-icon{ flex-shrink:0; }
.alert-log-text{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.alert-log-time{ flex-shrink:0; color:var(--text-dim); font-size:.78rem; }

/* ---------- admin dashboard: clip library ---------- */
.clip-library-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
  gap:10px;
}
.clip-lib-card{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:12px 14px;
}
.clip-lib-info{ min-width:0; display:flex; flex-direction:column; gap:2px; }
.clip-lib-label{ font-weight:700; font-size:.9rem; }
.clip-lib-url{
  font-size:.76rem;
  color:var(--text-dim);
  text-decoration:none;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:block; max-width:220px;
}
.clip-lib-url:hover{ color:var(--accent-light); }

/* ---------- admin dashboard: chat commands ---------- */
.cmd-list{ grid-template-columns:minmax(0,1fr); } /* minmax(0,…) lets cards shrink on narrow screens instead of overflowing */
.cmd-card{
  display:flex; flex-direction:column; gap:10px;
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:14px 16px;
}
.cmd-card-top{ display:flex; align-items:center; gap:10px; }
.cmd-toggle{ flex-shrink:0; }
.cmd-trigger{
  flex:1; min-width:0;
  font-family:monospace;
  font-weight:700;
  font-size:.95rem;
  color:var(--accent-light);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.cmd-card-bottom{ display:flex; align-items:center; gap:8px; }
.cmd-response{ flex:1; min-width:0; }
.cmd-save{ flex-shrink:0; }

.placeholder-chips{
  display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  margin-top:8px;
}
.placeholder-chips-label{
  font-size:.72rem;
  font-weight:700;
  color:var(--text-dim);
  text-transform:uppercase;
  letter-spacing:.04em;
  margin-right:4px;
}
.placeholder-chip{
  font-family:monospace;
  font-size:.76rem;
  font-weight:600;
  color:var(--accent-light);
  background:var(--surface-2);
  border:1px solid var(--border);
  border-radius:999px;
  padding:4px 10px;
  cursor:pointer;
  transition:border-color .15s ease, color .15s ease;
}
.placeholder-chip:hover{ border-color:var(--accent); color:var(--text); }
.placeholder-chip:focus-visible{ outline:2px solid var(--accent-light); outline-offset:1px; }
/* the admin panel strips borders off .btn - chips are buttons but need theirs */
#adminSection .placeholder-chip{ border:1px solid var(--border); }
#adminSection .placeholder-chip:hover{ border-color:var(--accent); }

/* add-command block: form + its codes, closed off by one divider so the chips
   clearly belong to the "Reactie" field and not to the first command below */
.cmd-add{
  margin-bottom:20px;
  padding-bottom:20px;
  border-bottom:1px solid var(--border);
}
.cmd-add .admin-add-form{
  margin:0; padding:0; border:none;
}
.cmd-add .placeholder-chips{ margin-top:12px; }

/* command cards: chips sit on a darker surface so they don't blend into the
   card, and only show while that card is being edited (keeps a long list calm) */
.cmd-card .placeholder-chips{ margin-top:0; display:none; }
.cmd-card:focus-within .placeholder-chips{ display:flex; }
.cmd-card .placeholder-chip{ background:var(--surface); }

/* "Opslaan" on a command card - the admin panel's borderless-button rule made
   the ghost style look like plain text */
#adminSection .cmd-save{
  background:var(--accent-soft);
  color:var(--accent-light);
}
#adminSection .cmd-save:hover{
  background:var(--accent);
  color:#0a0e1a;
}

@media (max-width:700px){
  .admin-tabbar{ padding:16px 18px 0; flex-direction:column; align-items:stretch; }
  .admin-tabbar .btn{ width:100%; }
  .alert-events-list{ grid-template-columns:1fr; }
  .overlay-url-box{ flex-direction:column; align-items:stretch; }
}
