/* Dorstige Downies Pubgolf 2026 – Host interface
   Mobile-first; vanaf 900px twee kolommen (bediening + tussenstand). */

:root {
  --tabbar-h: 66px;
  --topbar-h: 60px;
  --read-scale: 1;
}

body.host { padding-bottom: 0; }
body.host.in-app { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); }
body.modal-open { overflow: hidden; }

.between { justify-content: space-between; }
.only-mobile { display: block; }
.empty-note { margin: 0; color: var(--muted); font-size: .95rem; }
.note {
  background: var(--gold-100);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: .92rem;
}
.is-busy { position: relative; }
.is-busy::after {
  content: '';
  width: 14px; height: 14px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-left: 6px;
}

/* ===========================================================================
   Volledige schermen (laden, inloggen, geen spel)
   =========================================================================== */
.screen { min-height: 100vh; min-height: 100dvh; padding: calc(24px + var(--safe-top)) 16px calc(24px + var(--safe-bottom)); }
.screen-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
.loader-ball { font-size: 4rem; }
.loading-text { font-size: 1.6rem; }

.hero-logo {
  display: flex; align-items: flex-end; justify-content: center; gap: 18px;
  font-size: clamp(4rem, 22vw, 6.5rem); line-height: 1;
  filter: drop-shadow(0 6px 0 var(--ink)) drop-shadow(0 0 30px rgba(255, 201, 40, .35));
}
.hero-logo span:last-child { animation: float 3s ease-in-out infinite; }
.hero-title { font-size: clamp(2.2rem, 9vw, 3.4rem); }
.hero-sub { margin: 0; max-width: 420px; font-size: 1.1rem; color: var(--cream); }
.login-card { width: 100%; max-width: 380px; text-align: left; display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.login-card input { font-size: 1.4rem; text-align: center; letter-spacing: 3px; }
.form-error { margin: 0; color: #fff; background: var(--danger); border: 2px solid var(--ink); border-radius: 10px; padding: 8px 12px; font-weight: 600; }
.start-btn { min-height: 76px; font-size: 1.7rem; padding: 14px 32px; margin-top: 8px; }
.logout-link { margin-top: 10px; }

/* ===========================================================================
   Topbalk
   =========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  background: linear-gradient(180deg, rgba(6, 47, 53, .97), rgba(10, 65, 72, .94));
  border-bottom: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0,0,0,.25);
  padding-top: var(--safe-top);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  max-width: 1320px;
  margin: 0 auto;
  min-height: var(--topbar-h);
}
.brand { display: flex; align-items: center; gap: 6px; flex: none; }
.brand-icon { font-size: 1.5rem; }
.brand-text { display: inline; font-family: var(--font-display); font-size: 1.3rem; color: var(--gold-400); -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }

.topbar-stats { display: flex; align-items: center; gap: 6px; margin-left: auto; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.topbar-stats .pill { font-size: .78rem; padding: 3px 9px; }
.phase-pill { display: inline-flex; }
.host-pill-label { display: none; }
.desk-tabs { display: none; }

/* ===========================================================================
   Onderste tabbalk (mobiel)
   =========================================================================== */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 400;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--teal-900);
  border-top: 3px solid var(--ink);
  box-shadow: 0 -4px 0 rgba(0,0,0,.25);
  padding-bottom: var(--safe-bottom);
}
.tabbar button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: .95rem;
  letter-spacing: .5px;
  height: var(--tabbar-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  touch-action: manipulation;
}
.tabbar .tb-icon { font-size: 1.45rem; line-height: 1; transition: transform .2s cubic-bezier(.2, 1.4, .4, 1); }
.tabbar button.active { color: var(--gold-400); }
.tabbar button.active .tb-icon { transform: translateY(-2px) scale(1.15); }
.tabbar button.active::before {
  content: '';
  position: absolute;
  top: 0; left: 22%; right: 22%;
  height: 5px;
  background: var(--gold-400);
  border: 2px solid var(--ink);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}

body.in-app .toast-wrap { bottom: calc(var(--tabbar-h) + 86px + var(--safe-bottom)); }
body.in-app .conn-banner { top: calc(var(--topbar-h) + 14px + var(--safe-top)); }

/* ===========================================================================
   Layout
   =========================================================================== */
.layout { max-width: 1320px; margin: 0 auto; padding: 14px 12px 24px; }
.main-col { min-width: 0; }
.side-col { display: none; }
.tabpane > * + * { margin-top: 14px; }
.section-head { display: flex; flex-direction: column; gap: 4px; }
.section-head h2 { font-size: 1.9rem; }
.section-head p { margin: 0; }

.nav-sticky {
  position: sticky;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px);
  z-index: 50;
  padding: 10px;
  margin-left: -4px;
  margin-right: -4px;
  background: rgba(6, 47, 53, .88);
  backdrop-filter: blur(6px);
  border: 3px solid var(--ink);
  border-radius: 20px;
  box-shadow: 0 6px 0 rgba(0,0,0,.35);
}
.nav-sticky .hint { margin: 8px 0 0; }
.nav-row { display: flex; gap: 10px; align-items: stretch; }
.nav-row .btn { min-width: 0; }
.nav-row .grow { flex: 1 1 auto; }

.info-card p { margin: 0 0 8px; }
.info-card p:last-child { margin-bottom: 0; }
.status-strip {
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 8px 12px;
  background: var(--teal-900);
  font-weight: 600;
  box-shadow: var(--shadow-pop-sm);
}
.status-strip.ok { background: #1b7a32; color: #fff; }
.status-strip.warn { background: var(--gold-400); color: var(--ink); }
.status-strip + .status-strip { margin-top: 8px; }

/* Toggles & schakelaars */

/* Tekstgrootte */
.size-ctl { display: inline-flex; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 0 var(--ink); flex: none; }
.size-ctl button {
  appearance: none;
  border: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  min-width: 46px;
  min-height: 38px;
  cursor: pointer;
}
.size-ctl button + button { border-left: 2px solid var(--ink); }
.size-ctl button:active { background: var(--gold-300); }

/* ===========================================================================
   Lobby
   =========================================================================== */

/* ===========================================================================
   Voorleesteksten
   =========================================================================== */
.read-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.read-tools { gap: 8px; }
.read-card { padding: 18px; }
.read-card .read-head { margin-bottom: 12px; }
.read-card.collapsed .read-head { margin-bottom: 0; }
.read-badge { font-family: var(--font-display); font-size: 1.1rem; color: var(--teal-700); }
.read-title { font-size: calc(1.6rem * var(--read-scale)); color: var(--teal-800); margin-bottom: 12px; }
.big-read { font-size: calc(1.18rem * var(--read-scale)); line-height: 1.5; }
.rules-title { font-size: calc(1.25rem * var(--read-scale)); color: var(--teal-800); margin: 16px 0 8px; }
.rules { margin: 0; padding-left: 1.4em; }
.rules li { margin-bottom: .4em; }
.rules li::marker { font-family: var(--font-display); color: var(--gold-700); }
.intro > * + * { margin-top: 14px; }

/* ===========================================================================
   Teams
   =========================================================================== */
.teams-phase > * + *, #tab-teams > * + * { margin-top: 14px; }
.board { display: grid; grid-template-columns: 1fr; gap: 12px; }
.team-col {
  border: var(--outline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--team-soft);
  box-shadow: var(--shadow-pop);
  color: var(--ink);
}
.team-col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--team);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.3rem;
  border-bottom: 3px solid var(--ink);
  -webkit-text-stroke: 1px var(--ink);
  paint-order: stroke fill;
}
.team-count {
  min-width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  font-size: 1rem;
  -webkit-text-stroke: 0;
}
.team-col-body { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; min-height: 64px; align-items: center; }
.team-empty { margin: 0; color: rgba(0,0,0,.5); font-style: italic; }

.chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 6px 14px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
  touch-action: manipulation;
}
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }

.bench { border: 3px dashed rgba(255,255,255,.4); border-radius: var(--radius); padding: 12px; }
.bench h4 { margin: 0 0 8px; font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; color: var(--gold-300); }
.bench-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.teams-actions { gap: 10px; }

/* ===========================================================================
   Spelen
   =========================================================================== */
.playing > * + * { margin-top: 14px; }
.playing > :empty { display: none; }
.playing > :empty + * { margin-top: 14px; }

.stage-head { padding: 16px; }
.stage-head.is-intermezzo { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.08)), #6b4f9a; }
.stage-head-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.stage-head-top .ribbon small { font-size: .8rem; opacity: .75; letter-spacing: .5px; text-transform: none; }
.stage-title { font-size: clamp(2rem, 8vw, 2.8rem); margin-top: 12px; }
.stage-venue { margin: 6px 0 0; font-size: 1.1rem; font-weight: 600; }
.stage-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.stage-meta .pill { font-size: .95rem; }
.menu-link { min-height: 36px; }

/* Voortgang */
.progress {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 8px 4px 10px;
  scrollbar-width: none;
}
.progress::-webkit-scrollbar { display: none; }
.prog-dot {
  appearance: none;
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: rgba(6, 47, 53, .7);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: .95rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.prog-dot.inter { width: 28px; height: 28px; font-size: .8rem; border-style: dashed; }
.prog-dot.done { background: var(--teal-400); color: var(--ink); }
.prog-dot.locked { background: var(--success); color: #fff; }
.prog-dot.current {
  width: 44px; height: 44px;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  color: var(--ink);
  font-size: 1.2rem;
  box-shadow: 0 0 0 4px rgba(255, 201, 40, .35);
  animation: pulse-glow 1.8s ease-in-out infinite;
  border-style: solid;
}
.prog-line { flex: 1 0 8px; min-width: 8px; height: 4px; background: rgba(255,255,255,.25); border-radius: 2px; }

/* Hulpmiddelen */
.tool-card .card-title { margin-bottom: 8px; }

.sw-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.sw {
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--teal-900);
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "team display" "btns btns";
  align-items: center;
  gap: 8px 12px;
}
.sw:not(.sw-team-card) { grid-template-areas: "display display" "btns btns"; }
.sw-team-card { background: var(--team-dark); }
.sw-team { grid-area: team; font-family: var(--font-display); font-size: 1.2rem; color: #fff; }
.sw-display { grid-area: display; font-family: var(--font-display); font-size: 2.2rem; text-align: right; color: var(--gold-300); font-variant-numeric: tabular-nums; }
.sw:not(.sw-team-card) .sw-display { text-align: center; font-size: 2.6rem; }
.sw.running .sw-display { color: #fff; }
.sw-btns { grid-area: btns; display: flex; gap: 8px; flex-wrap: wrap; }
.sw-btns .btn { flex: 1 1 auto; }

/* Scorekaarten */
.score-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.score-card {
  position: relative;
  border: var(--outline);
  border-radius: var(--radius);
  background: var(--team-soft);
  color: var(--ink);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}

.sc-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  padding: 10px 14px;
  background: var(--team);
  color: #fff;
  border-bottom: 3px solid var(--ink);
}
.sc-team { font-family: var(--font-display); font-size: 1.4rem; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.sc-members { display: flex; flex-wrap: wrap; gap: 6px; }
.mem { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: .85rem; background: rgba(0,0,0,.22); border-radius: 999px; padding: 2px 8px 2px 4px; }
.mem .dot { width: 9px; height: 9px; border-width: 1.5px; }

.sc-body { padding: 12px 14px 14px; }
.sc-label { font-family: var(--font-display); font-size: 1.05rem; color: var(--team-dark); margin-bottom: 6px; }
.sc-label small { font-family: var(--font-body); font-weight: 600; font-size: .8rem; color: rgba(0,0,0,.6); }

.stepper { display: flex; align-items: center; gap: 10px; }
.stepper.big { justify-content: center; }
.step {
  appearance: none;
  width: 72px; height: 72px;
  border-radius: 20px;
  border: 3px solid var(--ink);
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: 1;
  box-shadow: var(--shadow-pop);
  cursor: pointer;
  touch-action: manipulation;
  display: grid;
  place-items: center;
  padding: 0;
  flex: none;
}
.step:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.step:disabled { filter: grayscale(.9); opacity: .45; cursor: not-allowed; }
.stepper.big .step-val {
  min-width: 96px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 4rem;
  line-height: 1;
  color: var(--team, var(--ink));
  -webkit-text-stroke: 3px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--ink);
}
.stepper.big .step-val.empty { color: rgba(0,0,0,.25); -webkit-text-stroke: 0; text-shadow: none; }
.stepper.small .step { width: 44px; height: 44px; font-size: 1.6rem; border-radius: 12px; box-shadow: var(--shadow-pop-sm); }
.stepper.small .step-val { min-width: 34px; text-align: center; font-family: var(--font-display); font-size: 1.6rem; }
.step-val.bump { animation: bump .45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.35) rotate(-4deg); } 100% { transform: scale(1); } }

.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(40px, 1fr)); gap: 6px; margin-top: 12px; }
.q {
  appearance: none;
  min-height: 46px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  touch-action: manipulation;
  padding: 0;
}
.q:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.q.sel { background: var(--team, var(--gold-400)); color: #fff; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.q:disabled { opacity: .45; cursor: not-allowed; }

.sc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pen { display: flex; align-items: center; gap: 10px; }
.pen-label { font-weight: 700; font-size: .95rem; color: var(--team-dark, var(--ink)); }
.sc-row .btn.ghost { color: var(--ink); border-color: rgba(0,0,0,.35); }
.sc-total {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.7);
  border: 2px solid rgba(0,0,0,.15);
  font-size: 1.05rem;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
}
.sc-total strong { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; }
.vs { font-family: var(--font-display); font-size: 1.15rem; padding: 0 8px; border-radius: 8px; border: 2px solid var(--ink); background: var(--cream); color: var(--ink); }
.vs.under { background: var(--success); color: #fff; }
.vs.over { background: #ffb3b9; }
.vs.even { background: var(--gold-300); }
.term { font-weight: 700; color: rgba(0,0,0,.65); }
.score-card.locked .sc-body { opacity: .7; }
.sc-locked {
  position: absolute;
  top: 54px; right: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  padding: 3px 10px;
  border-radius: 999px;
  transform: rotate(4deg);
}
.unscored-card .btn { margin-top: 6px; }

.lock-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px;
  border: 3px dashed rgba(255,255,255,.35);
  border-radius: 16px;
}
.lock-bar.locked { border: 3px solid var(--ink); background: var(--teal-900); font-weight: 700; }

/* Jokers */

/* Leaderboard */
.lb-mid { min-width: 0; }
.lb-members { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-row { border-color: var(--ink); }
.lb-row .lb-name { -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }

/* ===========================================================================
   Finish / podium
   =========================================================================== */
.finish > * + * { margin-top: 16px; }
.finish-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.finish-title { font-size: clamp(2.4rem, 10vw, 3.6rem); }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; padding-top: 10px; }
.podium.podium-1 { grid-template-columns: minmax(0, 1fr); max-width: 260px; margin-left: auto; margin-right: auto; }
.podium.podium-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.podium-col { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; animation: slide-up .7s cubic-bezier(.2, 1.2, .4, 1) both; animation-delay: var(--d, 0s); }
.pod-name { font-family: var(--font-display); font-size: clamp(1rem, 4.5vw, 1.5rem); color: #fff; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; margin-top: 6px; }
.pod-members { font-size: .78rem; font-weight: 600; color: var(--cream); margin: 2px 0 6px; overflow-wrap: anywhere; }
.pod-block {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 2px;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(0,0,0,.12)), var(--team);
  border: var(--outline);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  color: #fff;
  box-shadow: inset 0 -10px 0 rgba(0,0,0,.15);
}
.place-1 .pod-block { height: 170px; }
.place-2 .pod-block { height: 120px; }
.place-3 .pod-block { height: 90px; }
.pod-rank { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; color: var(--gold-400); }
.pod-score { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.pod-score small { display: block; font-family: var(--font-body); font-weight: 700; font-size: .8rem; -webkit-text-stroke: 0; opacity: .95; margin-top: 2px; }
.medal { font-size: 2.6rem; line-height: 1; animation: float 3s ease-in-out infinite; }
.winner-badge { position: relative; display: grid; place-items: center; margin-top: 30px; }
.winner-badge .trophy { font-size: clamp(3.4rem, 16vw, 5rem); line-height: 1; filter: drop-shadow(0 6px 0 var(--ink)) drop-shadow(0 0 22px rgba(255, 201, 40, .6)); animation: float 3s ease-in-out infinite; }
.crown { position: absolute; top: -34px; left: 50%; transform: translateX(-50%) rotate(-8deg); font-size: 2.6rem; filter: drop-shadow(0 3px 0 var(--ink)); animation: wobble 2.4s ease-in-out infinite; z-index: 1; }
.finish-actions { display: flex; flex-direction: column; gap: 10px; }

/* ===========================================================================
   Scorekaart-tabel
   =========================================================================== */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: var(--outline);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
  background: var(--cream);
}
.scorecard { width: 100%; border-collapse: separate; border-spacing: 0; color: var(--ink); font-size: .95rem; }
.scorecard th, .scorecard td { padding: 0; border-bottom: 2px solid rgba(0,0,0,.12); text-align: center; vertical-align: middle; }
.scorecard thead th { background: var(--teal-800); color: #fff; font-family: var(--font-display); font-weight: 400; font-size: 1rem; padding: 8px 6px; border-bottom: 3px solid var(--ink); }
.scorecard .st-col {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  background: var(--cream);
  padding: 6px 8px;
  min-width: 128px;
  max-width: 170px;
  border-right: 2px solid rgba(0,0,0,.15);
  font-weight: 400;
}
.scorecard thead .st-col { background: var(--teal-800); z-index: 2; }
.st-label {
  display: inline-grid; place-items: center;
  min-width: 30px; height: 26px;
  padding: 0 4px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: var(--gold-400);
  font-family: var(--font-display);
  font-size: .9rem;
  margin-right: 4px;
  vertical-align: middle;
}
.unscored .st-label { background: #d9d0f0; }
.st-title { font-weight: 600; font-size: .82rem; line-height: 1.15; display: inline; }
.st-title small { color: rgba(0,0,0,.55); }
.par-col { width: 46px; font-family: var(--font-display); font-size: 1.1rem; color: var(--teal-700); }
.team-th { background: var(--team) !important; min-width: 74px; -webkit-text-stroke: 1px var(--ink); paint-order: stroke fill; }
.team-th span { display: block; font-size: 1.15rem; }
.team-th small { display: block; font-family: var(--font-body); font-size: .68rem; font-weight: 600; -webkit-text-stroke: 0; opacity: .9; line-height: 1.15; }
.cell-btn {
  appearance: none;
  width: 100%;
  min-height: 48px;
  border: 0;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
  cursor: pointer;
  position: relative;
  padding: 4px 6px;
}
.cell-btn:hover, .cell-btn:focus-visible { background: var(--gold-100); }
.cell-empty { color: rgba(0,0,0,.25); }
.cell-pen { font-family: var(--font-body); font-weight: 700; font-size: .8rem; color: var(--danger); margin-left: 2px; }

.scorecard tbody tr.current td, .scorecard tbody tr.current .st-col { background: var(--gold-300); }
.scorecard tbody tr.unscored td { background: rgba(0,0,0,.04); }
.scorecard tfoot th, .scorecard tfoot td { background: var(--teal-900); color: #fff; padding: 8px 6px; font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,.15); }
.scorecard tfoot .st-col { background: var(--teal-900); color: var(--gold-300); }
.scorecard tfoot .par-col { color: var(--muted); }
.legend { margin: 10px 2px 0; }

/* ===========================================================================
   Beheer
   =========================================================================== */
.admin-card .card-title { margin-bottom: 8px; }

.tool-block + .tool-block { margin-top: 16px; padding-top: 14px; border-top: 2px dashed rgba(255,255,255,.2); }
.tool-title { margin: 0 0 6px; font-weight: 600; color: var(--gold-300); }

.stage-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stage-item {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: rgba(6, 47, 53, .55);
}
.stage-item.current { background: rgba(255, 201, 40, .2); border-color: var(--gold-400); }
.si-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.si-label {
  flex: none;
  display: grid; place-items: center;
  min-width: 38px; height: 38px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: var(--gold-400);
  color: var(--ink);
  font-family: var(--font-display);
}
.stage-item.intermezzo .si-label { background: #d9d0f0; }
.si-text { min-width: 0; display: flex; flex-direction: column; }
.si-text strong { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; line-height: 1.15; }
.si-text small { color: var(--muted); font-size: .82rem; }
.si-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.si-actions .sq { width: 42px; padding: 0; }
.si-actions .btn { min-height: 40px; }

.phase-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }

.danger-zone {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.1)), #5a1a20;
  border-color: var(--ink);
  margin-top: 28px !important;
  box-shadow: 0 0 0 3px var(--danger), var(--shadow-pop);
}
.danger-zone .card-title { color: #ffb3b9; }
.danger-list { display: flex; flex-direction: column; gap: 12px; }
.danger-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 2px dashed rgba(255,255,255,.18); }
.danger-item:first-child { border-top: 0; padding-top: 0; }
.danger-item p { margin: 2px 0 0; color: #ffd6d9; }
.danger-item .btn { flex: none; }

/* ===========================================================================
   Modals
   =========================================================================== */
.overlay.closing { animation: fade-out .16s ease forwards; }
@keyframes fade-out { to { opacity: 0; } }
.modal { color: var(--cream); }
.modal-wide { max-width: 640px; }
.modal-title { font-size: 1.7rem; margin-bottom: 8px; }
.modal-text { margin: 0 0 14px; font-size: 1.05rem; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.modal-actions .btn { flex: 1 1 140px; }
.modal-danger { box-shadow: 0 0 0 4px var(--danger), 0 0 0 7px var(--ink), var(--shadow-soft); }
.require-field { margin-top: 10px; }
.require-field input { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 4px; text-align: center; text-transform: uppercase; }
.modal .note { margin: 0 0 12px; }
.modal-team {
  display: inline-block;
  background: var(--team);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px 12px;
  font-family: var(--font-display);
  margin-bottom: 8px;
  -webkit-text-stroke: 1px var(--ink);
  paint-order: stroke fill;
}
.modal .stepper.big { margin: 6px 0 4px; }
.modal .stepper.big .step-val { color: var(--gold-400); }
.modal .sc-label { color: var(--gold-300); }
.modal .pen-label { color: var(--cream); }
.modal .sc-row .btn.ghost { color: var(--cream); border-color: rgba(255,255,255,.35); }

.move-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 6px 0 14px; }
.move-btn {
  appearance: none;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 58px;
  padding: 8px 16px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: var(--team, #5b6b6d);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.3rem;
  box-shadow: var(--shadow-pop);
  cursor: pointer;
  -webkit-text-stroke: 1px var(--ink);
  paint-order: stroke fill;
}
.move-btn small { font-family: var(--font-body); font-weight: 700; font-size: .85rem; -webkit-text-stroke: 0; opacity: .9; }
.move-btn.sel { box-shadow: 0 0 0 4px var(--gold-400), var(--shadow-pop); }
.move-btn.sel::after { content: '✓'; margin-left: 8px; }
.move-btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }

.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.form-row input, .form-row select { padding-left: 10px; padding-right: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 26px; height: 26px; accent-color: var(--gold-500); flex: none; }

.code-modal { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* ===========================================================================
   Joker-animatie
   =========================================================================== */

/* Toast uitfaden */
.toast.out { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }

/* ===========================================================================
   Kleine telefoons
   =========================================================================== */
@media (max-width: 380px) {
  
  
  .topbar-stats .pill { font-size: .72rem; padding: 2px 7px; }
  .step { width: 62px; height: 62px; font-size: 2.3rem; }
  .stepper.big .step-val { min-width: 76px; font-size: 3.4rem; }
  .nav-row .btn.big { font-size: 1.2rem; padding: 10px 12px; }
  .nav-row .btn.secondary { padding: 10px 12px; font-size: 1rem; }
  
  
  
  .danger-item { flex-direction: column; align-items: stretch; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .form-row .field:first-child { grid-column: 1 / -1; }
}

/* ===========================================================================
   Tablet
   =========================================================================== */
@media (min-width: 600px) {
  
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team-col-body { flex-direction: column; align-items: stretch; }
  .team-col-body .chip { justify-content: flex-start; }
  
  
  
  
  .phase-pill { display: inline-flex; }
  .stage-item { flex-direction: row; align-items: center; justify-content: space-between; }
  .si-actions { flex-wrap: nowrap; }
  .move-grid { grid-template-columns: 1fr 1fr; }
  .finish-actions { flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .phase-btns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .sw-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .place-1 .pod-block { height: 200px; }
  .place-2 .pod-block { height: 145px; }
  .place-3 .pod-block { height: 105px; }
}

/* ===========================================================================
   Desktop / laptop: twee kolommen, tabs bovenin
   =========================================================================== */
@media (min-width: 900px) {
  :root { --tabbar-h: 0px; }
  body.host.in-app { padding-bottom: 0; }
  .tabbar { display: none; }
  .only-mobile { display: none !important; }
  body.in-app .toast-wrap { bottom: calc(24px + var(--safe-bottom)); }

  .brand-text { display: inline; }
  .host-pill-label { display: inline; }
  .topbar-inner { gap: 14px; padding: 10px 20px; }
  .topbar-stats { margin-left: 0; flex-wrap: nowrap; }
  .desk-tabs { display: flex; gap: 6px; margin-left: auto; }
  .desk-tabs button {
    appearance: none;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--cream);
    background: transparent;
    border: 3px solid transparent;
    border-radius: 12px;
    padding: 6px 14px;
    cursor: pointer;
  }
  .desk-tabs button:hover { background: rgba(255,255,255,.08); }
  .desk-tabs button.active { background: linear-gradient(180deg, var(--gold-300), var(--gold-500)); color: var(--ink); border-color: var(--ink); box-shadow: var(--shadow-pop-sm); }

  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    padding: 22px 20px 40px;
    align-items: start;
  }
  .side-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: calc(var(--topbar-h) + 24px);
    max-height: calc(100dvh - var(--topbar-h) - 40px);
    overflow-y: auto;
    padding: 4px 4px 12px;
  }
  .nav-sticky { bottom: 14px; }

  .score-grid { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
  
  
  
  .podium { gap: 16px; }
}

@media (min-width: 1200px) {
  .layout { grid-template-columns: minmax(0, 1fr) 400px; }
}

/* ---- Rad (jeneverrad) --------------------------------------------------- */
.wheel { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wheel-stage { position: relative; width: min(78vw, 300px); aspect-ratio: 1; margin-top: 14px; }
.wheel-disc {
  width: 100%; height: 100%;
  border-radius: 50%;
  border: 5px solid var(--ink);
  box-shadow: 0 0 0 4px var(--gold-500), 0 0 0 7px var(--ink), 0 10px 0 4px var(--ink);
  background: var(--ink);
  will-change: transform;
}
.wheel-disc text { font-family: var(--font-body); }
.wheel-pointer {
  position: absolute; left: 50%; top: -16px; z-index: 2;
  width: 0; height: 0; transform: translateX(-50%);
  border-left: 16px solid transparent; border-right: 16px solid transparent;
  border-top: 30px solid var(--gold-400);
  filter: drop-shadow(0 3px 0 var(--ink)) drop-shadow(0 -2px 0 var(--ink));
}
.wheel-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.wheel-btn { background: var(--team); color: #fff; min-width: 96px; }
.wheel-results { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.wheel-result {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 12px; border: 2px solid var(--ink); border-radius: 12px;
  background: var(--team, var(--teal-600)); color: #fff;
}
.wheel-result span { font-family: var(--font-display); }
.wheel-result strong { font-size: 1.05rem; text-align: right; }
.wheel-clear { align-self: center; }
