@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}
:root {
  --bg: #5b2bd6;
  --bg2: #8a3ffc;
  --card: #ffffff;
  --text: #1d1440;
  --muted: #6f668c;
  --accent: #ffc531;
  --ok: #19b36b;
  --bad: #ef4b5f;
  --line: #e7e2f5;
  --radius: 22px;
  --shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 14px 34px -10px rgba(30, 0, 90, .45), 0 2px 6px rgba(30, 0, 90, .12);
  --ease-spring: cubic-bezier(.2, 1.4, .4, 1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: transparent;
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
}
#app {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom));
}
.logo {
  text-align: center;
  color: #fff;
  font-size: 44px;
  font-weight: 900;
  letter-spacing: -1px;
  margin: 24px 0 4px;
  text-shadow: 0 4px 0 rgba(0,0,0,.15);
}
.logo span { color: var(--accent); }
.tagline { text-align: center; color: #e9e0ff; margin: 0 0 22px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
h2 { margin: 0 0 12px; font-size: 21px; font-weight: 900; letter-spacing: -.2px; }
label { display: block; font-weight: 600; margin: 8px 0 6px; color: var(--muted); font-size: 14px; }
input {
  width: 100%;
  font-size: 20px;
  padding: 14px 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  outline: none;
  font-family: inherit;
  color: var(--text);
  background: #faf9ff;
}
input:focus { border-color: var(--bg2); background: #fff; }
input.code { text-transform: uppercase; letter-spacing: 6px; text-align: center; font-weight: 800; }
button {
  display: block;
  width: 100%;
  font-size: 19px;
  font-weight: 800;
  padding: 16px;
  margin-top: 12px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #7a4cf0, #5b2bd6);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 5px 0 #3d1a9e, 0 10px 18px -6px rgba(40, 0, 120, .5);
  transition: transform .08s, box-shadow .08s, filter .15s;
  letter-spacing: .2px;
}
button:active { transform: translateY(4px) scale(.99); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 1px 0 #3d1a9e, 0 4px 8px -4px rgba(40, 0, 120, .5); }
button:disabled { opacity: .45; }
button.secondary { background: #f1ecff; color: var(--bg); box-shadow: 0 3px 0 #ddd2fb; }
button.secondary:active { box-shadow: 0 0 0 #ddd2fb; transform: translateY(3px); }
button.accent {
  background: linear-gradient(180deg, #ffd95e, #ffbf1f); color: #2a1a00;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 5px 0 #d99a00, 0 10px 18px -6px rgba(217, 154, 0, .55);
}
button.accent:active { box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 1px 0 #d99a00; }
button.ok { background: linear-gradient(180deg, #2fd389, #16a862); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 5px 0 #0e7d48; }
button.bad { background: linear-gradient(180deg, #ff6b7d, #e83c52); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 5px 0 #b3263a; }
button.small { font-size: 15px; padding: 10px; width: auto; display: inline-block; margin: 0; }
button.link { background: none; color: #fff; box-shadow: none; font-weight: 600; font-size: 15px; opacity: .85; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.or { text-align: center; color: var(--muted); margin: 14px 0 0; font-size: 14px; }

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  color: #fff; font-weight: 700; margin-bottom: 12px; gap: 8px;
}
.pill {
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.18);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 15px;
  white-space: nowrap;
}
.bigcode {
  font-size: 50px; font-weight: 1000; letter-spacing: 8px; text-align: center;
  color: var(--bg); margin: 2px 0;
  background: linear-gradient(90deg, #5b2bd6, #c03fe0); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); }
.center { text-align: center; }
.players { list-style: none; padding: 0; margin: 0; }
.players li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 18px;
}
.players li:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.off { background: #c9c3dc; }
.tag {
  font-size: 12px; font-weight: 700; background: #efeaff; color: var(--bg);
  padding: 3px 8px; border-radius: 999px;
}
.tag.yellow { background: #fff3c9; color: #8a6400; }
.grow { flex: 1; }
.stepper { display: flex; align-items: center; gap: 12px; justify-content: center; margin: 6px 0; }
.stepper button { width: 56px; height: 56px; margin: 0; font-size: 28px; padding: 0; }
.stepper .num { font-size: 40px; font-weight: 900; min-width: 70px; text-align: center; }

.word {
  font-size: clamp(34px, 11vw, 56px);
  font-weight: 900;
  text-align: center;
  color: var(--bg);
  word-break: break-word;
  margin: 6px 0 2px;
  line-height: 1.1;
}
.wordlabel { text-align: center; color: var(--muted); font-size: 14px; font-weight: 600; }
.secret {
  font-size: 80px; text-align: center; margin: 4px 0;
}
.hints { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.hint {
  display: flex; align-items: center; gap: 10px;
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(180deg, #fff, #f8f6ff);
  box-shadow: 0 2px 0 #ebe6f8;
  transition: transform .15s var(--ease-spring), opacity .2s;
}
.hint.tap:active { transform: scale(.97); }
.hint small { font-size: 13px; font-weight: 600; color: var(--muted); }
.hint .txt { flex: 1; word-break: break-word; }
.hint.dupe { border-color: var(--accent); background: #fffaea; }
.hint.struck .txt, .hint.struck .hintimg { opacity: .55; }
.hint.struck .txt { text-decoration: line-through; text-decoration-thickness: 3px; color: var(--bad); }
.hint.tap { cursor: pointer; user-select: none; }
.hint.big { font-size: 30px; justify-content: center; text-align: center; }
.timer {
  font-size: 64px; font-weight: 900; text-align: center; font-variant-numeric: tabular-nums;
  color: var(--bg);
}
.timer.low { color: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 4px 0 6px; }
.bar > div { height: 100%; background: var(--accent); transition: width .25s linear; }
.result { font-size: 70px; text-align: center; margin: 0; }
.score { font-size: 48px; font-weight: 900; text-align: center; color: var(--bg); }
.history { list-style: none; padding: 0; margin: 0; }
.history li { display: flex; gap: 8px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.history li:last-child { border-bottom: 0; }
.status { margin-top: 10px; font-size: 15px; color: var(--muted); }
.status b { color: var(--text); }
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: rgba(29, 20, 64, .92); color: #fff; padding: 13px 20px; border-radius: 16px;
  font-weight: 700; max-width: 90vw; z-index: 30; text-align: center;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px -8px rgba(0,0,0,.4);
  animation: toastin .35s var(--ease-spring);
}
@keyframes toastin { from { transform: translate(-50%, 20px) scale(.9); opacity: 0; } }
.hidden { display: none; }
.banner {
  background: var(--bad); color: #fff; text-align: center; padding: 8px; border-radius: 12px;
  margin-bottom: 10px; font-weight: 700;
}

/* spelinstellingen */
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt {
  margin: 0; padding: 12px; text-align: left; font-size: 15px;
  background: #f4f1ff; color: var(--text); box-shadow: none;
  border: 2px solid transparent;
}
.opt small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 3px; }
.opt.on { border-color: var(--bg); background: #e9e1ff; }
.opt:disabled { opacity: .55; }
.opt.on:disabled { opacity: 1; }

/* schrijfvak */
.padslot { margin: 4px 0 0; }
.pad {
  display: block; width: 100%; aspect-ratio: 2 / 1;
  background: #fff;
  background-image: linear-gradient(to bottom, transparent 74%, #e7e2f5 74%, #e7e2f5 75%, transparent 75%);
  border: 2px dashed #c9bdf0; border-radius: 14px;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.hint { position: relative; }
.hintimg { display: block; width: 100%; max-width: 320px; aspect-ratio: 2 / 1; margin: 0 auto; flex: 1; }
.hint.struck .hintimg { opacity: .6; }
.hint.struck:has(.hintimg)::after {
  content: ""; position: absolute; left: 10px; right: 10px; top: 50%;
  border-top: 4px solid var(--bad); transform: rotate(-6deg);
}

/* hintgevers tonen hun eigen gsm */
.showtop {
  display: flex; justify-content: space-between; align-items: center;
  color: #fff; font-size: 17px; margin: 0 4px 8px;
}
.timer.mini { color: #fff; font-size: 26px; }
.timer.mini.low { color: #ffd0d6; }
.showhint {
  background: #fff; border: 5px solid var(--accent); border-radius: 22px;
  height: calc(100vh - 290px); height: calc(100dvh - 290px); min-height: 180px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 10px 30px rgba(20, 0, 60, .18);
}
.showhint .fit {
  display: inline-block; white-space: nowrap; font-weight: 900; line-height: 1;
  color: var(--text); font-size: 64px;
}
.showimg { display: block; width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.timer.small { font-size: 34px; }
.hint:has(.hintimg) { flex-direction: column; align-items: stretch; gap: 2px; }
.hint:has(.hintimg) small { align-self: flex-end; }

/* keuze schrijven / typen per speler */
.switch { display: flex; background: #f4f1ff; border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 6px; }
.switch button {
  margin: 0; padding: 9px; font-size: 15px; background: transparent; color: var(--muted);
  box-shadow: none; border-radius: 9px;
}
.switch button.on { background: #fff; color: var(--bg); box-shadow: 0 1px 4px rgba(40,0,120,.15); }

/* geluid aan/uit */
.soundbtn {
  width: auto; margin: 0; border: 0; box-shadow: none; color: #fff;
  font-size: 15px; padding: 7px 12px; cursor: pointer;
}

/* versienummer onderaan */
.version {
  text-align: center; color: rgba(255,255,255,.55); font-size: 12px;
  padding: 0 0 calc(14px + env(safe-area-inset-bottom));
}

/* rader mag niet kijken */
.warn { color: var(--bad); }
h2.warn { font-size: 30px; }
.nolook { border: 4px solid var(--bad); }
.warnbar {
  background: #ffe8eb; color: var(--bad); font-weight: 800; text-align: center;
  border-radius: 12px; padding: 10px; margin: 0 0 12px;
}

/* ander woord kiezen */
button.skip {
  width: auto; margin: 10px auto 0; padding: 8px 14px; font-size: 14px; font-weight: 700;
  background: #f4f1ff; color: var(--bg); box-shadow: none; border-radius: 999px;
}

/* automatisch doorgestreept */
.autotag {
  display: inline-block; background: #ffe8eb; color: var(--bad); border-radius: 999px;
  padding: 2px 8px; font-size: 11px; font-weight: 800; margin-right: 4px;
}
.hint.struck small { text-decoration: none; }
.readtag {
  display: inline-block; background: #efeaff; color: var(--bg); border-radius: 999px;
  padding: 2px 8px; font-size: 11px; font-weight: 800; margin-right: 4px;
}
.opts.single { grid-template-columns: 1fr; }
.reason { margin: 10px 0 4px; }
.hint.struck .autotag { opacity: 1; }

/* stem-race */
.meter { margin-top: 14px; }
.mtitle { text-align: center; font-weight: 900; font-size: 20px; margin: 0; }
.msub { text-align: center; color: var(--muted); margin: 2px 0 10px; font-size: 14px; }
.vrow { margin: 8px 0; }
.vhead { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 4px; }
.vhead span { color: var(--muted); font-weight: 600; }
.slots { display: flex; gap: 8px; flex-wrap: wrap; }
.slot {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px dashed #d6cdee; display: flex; align-items: center; justify-content: center;
  font-size: 24px; background: #faf9ff;
}
.vrow.yes .slot.full { border: 3px solid var(--ok); background: #e3f8ee; }
.vrow.no .slot.full { border: 3px solid var(--bad); background: #ffe8eb; }
.slot.pop { animation: pop .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop { 0% { transform: scale(.2); } 100% { transform: scale(1); } }

/* minispelletje voor de rader */
.gameslot { margin-top: 10px; }
.minigame {
  display: block; width: 100%; aspect-ratio: 600 / 340; border-radius: 14px;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: pointer;
}
.switch button { white-space: nowrap; }

/* jouw hint is doorgestreept */
.mystruck {
  background: #fff; border: 3px solid var(--bad); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 14px; box-shadow: 0 10px 30px rgba(20, 0, 60, .18);
}
.mshead { color: var(--bad); font-weight: 900; font-size: 18px; }
.msbody { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; }
.mshint { font-size: 22px; font-weight: 900; text-decoration: line-through; color: var(--bad); }
.mshint .hintimg { width: 120px; display: inline-block; vertical-align: middle; }
.autotag { font-size: 12px; }

/* nieuwe versie */
button.updatebar {
  background: var(--accent); color: var(--text); margin: 0 0 10px; padding: 10px; font-size: 15px;
}

/* spelleider overrulet */
button.link.dark { color: var(--bg); opacity: 1; margin-top: 6px; }
.overruled { color: #8a6400; background: #fff3c9; display: inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.histbtn { width: auto; margin: 0; padding: 2px 6px; background: #f4f1ff; box-shadow: none; font-size: 18px; }
.ovtag { font-size: 11px; font-weight: 700; color: #8a6400; background: #fff3c9; padding: 2px 6px; border-radius: 999px; }
.history li { align-items: center; }

/* vraag om ander woord */
.skipreq { border: 3px solid var(--accent); }
.skipnote {
  background: #fff3c9; color: #8a6400; font-weight: 700; text-align: center;
  border-radius: 12px; padding: 10px; margin-bottom: 12px;
}

/* instellingen met 3 of 4 korte keuzes */
.opts.row3 { grid-template-columns: repeat(3, 1fr); }
.opts.row4 { grid-template-columns: repeat(4, 1fr); }
.opts.row3 .opt, .opts.row4 .opt { text-align: center; padding: 12px 4px; font-size: 14px; }

/* aftellen 5-4-3-2-1 */
.countdown {
  text-align: center; color: #fff; padding: 30px 10px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.cdtitle { font-size: 26px; font-weight: 900; letter-spacing: .5px; text-shadow: 0 3px 0 rgba(0,0,0,.15); }
.cdring {
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0, #f4efff 60%, #e3d8ff 100%);
  box-shadow: 0 0 0 10px rgba(255,255,255,.18), 0 0 0 22px rgba(255,255,255,.08), 0 20px 40px rgba(20,0,60,.3);
  display: flex; align-items: center; justify-content: center;
  animation: breathe 1s ease-in-out infinite;
}
.cdnum { font-size: 130px; font-weight: 900; line-height: 1; color: var(--bg); }
.cdnum.n5 { color: #5b2bd6; } .cdnum.n4 { color: #8a3ffc; } .cdnum.n3 { color: #e0559d; }
.cdnum.n2 { color: #f08a24; } .cdnum.n1 { color: #19b36b; }
.cdnum.go { animation: cdpop .9s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes cdpop {
  0% { transform: scale(2.4) rotate(-12deg); opacity: 0; }
  35% { transform: scale(.9) rotate(4deg); opacity: 1; }
  60% { transform: scale(1.05) rotate(0); }
  100% { transform: scale(1); }
}
@keyframes breathe { 50% { transform: scale(1.04); } }
.cdsub { font-size: 20px; font-weight: 800; line-height: 1.4; }
.cdsub small { font-size: 15px; font-weight: 600; opacity: .85; }

/* nieuw woord verschijnt */
.word.pop-in { animation: cdpop .6s cubic-bezier(.2, 1.6, .4, 1) both; }

/* schrijftimer */
.wtimer { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--muted); font-size: 15px; }
.wtimer b { font-size: 22px; color: var(--bg); font-variant-numeric: tabular-nums; }
.wtimer b.low { color: var(--bad); animation: pulse 1s infinite; }

/* vuurwerk */
.fireworks {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 20; transition: opacity .6s;
}
.fireworks.fade { opacity: 0; }

/* =====================================================================
   NEXT LEVEL
   ===================================================================== */

/* levende achtergrond: zacht bewegende kleurvlekken */
body::before, body::after {
  content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .75;
  pointer-events: none;
}
body::before {
  width: 70vmax; height: 70vmax; left: -25vmax; top: -25vmax;
  background: radial-gradient(circle, #8a3ffc 0, transparent 65%);
  animation: drift1 18s ease-in-out infinite alternate;
}
body::after {
  width: 65vmax; height: 65vmax; right: -25vmax; bottom: -20vmax;
  background: radial-gradient(circle, #e0559d 0, transparent 60%);
  animation: drift2 22s ease-in-out infinite alternate;
}
html { background: linear-gradient(160deg, #4a1fc4 0%, #5b2bd6 45%, #7b2fd8 100%) fixed; }
@keyframes drift1 { to { transform: translate(18vmax, 22vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-16vmax, -18vmax) scale(1.1); } }
@media (prefers-reduced-motion: reduce) {
  body::before, body::after, .floaters span, .bubble, .beefly, .bee ellipse { animation: none !important; }
}

/* schermovergang */
.screen.enter > * { animation: rise .45s var(--ease-spring) both; }
.screen.enter > *:nth-child(2) { animation-delay: .04s; }
.screen.enter > *:nth-child(3) { animation-delay: .08s; }
.screen.enter > *:nth-child(4) { animation-delay: .12s; }
.screen.enter > *:nth-child(5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }

/* bovenbalk */
.topbar { margin-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 8px; }
.mark {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; color: var(--bg); font-weight: 1000; font-size: 17px; letter-spacing: -1px;
  box-shadow: 0 4px 12px -2px rgba(0,0,0,.25); position: relative;
}
.mark::after { content: ""; position: absolute; left: 7px; bottom: -5px; border: 5px solid transparent; border-top-color: #fff; border-left-color: #fff; }
.pill.code { letter-spacing: 2px; font-weight: 900; }
.tright { display: flex; gap: 6px; align-items: center; }
.pill.scorepill b { font-weight: 1000; }
.dots { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; max-width: 45%; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.28); display: block; }
.dots i.ok { background: #5df0a6; }
.dots i.bad { background: #ff8a98; }
.dots i.now { background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.3); animation: pulse 1.4s infinite; }

/* avatars */
.av {
  --c: #748ffc;
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.45), transparent 45%), var(--c);
  color: #fff; font-weight: 1000; font-size: 16px; text-shadow: 0 1px 1px rgba(0,0,0,.2);
  box-shadow: 0 0 0 3px #fff, 0 3px 8px rgba(0,0,0,.18);
  position: relative;
}
.av::after {
  content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--ok); box-shadow: 0 0 0 2px #fff;
}
.av.off { filter: grayscale(1) opacity(.55); }
.av.off::after { background: #c9c3dc; }
.av.xs { width: 20px; height: 20px; font-size: 11px; box-shadow: 0 0 0 2px #fff; }
.av.xs::after, .av.lg.ghost::after { display: none; }
.av.lg { width: 58px; height: 58px; font-size: 26px; }
.av.lg::after { width: 14px; height: 14px; }
.av.ghost { background: #f1ecff; color: #b9a8ef; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #e4dbff; border: 2px dashed #c9bdf0; }
.who { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
.players li { gap: 12px; }
.pname { font-weight: 700; }
.offline { font-size: 12px; color: var(--muted); font-weight: 700; }
.players .dot { display: none; }

/* wachtruimte */
.joinrow { display: flex; align-items: center; gap: 16px; justify-content: center; }
.qr {
  width: 120px; height: 120px; padding: 8px; border-radius: 16px; background: #fff; flex: none;
  box-shadow: 0 0 0 2px var(--line), 0 6px 16px -6px rgba(40,0,120,.35);
}
.qr svg { width: 100%; height: 100%; display: block; }
.qr svg path, .qr svg rect[fill="black"] { fill: #2b145f; }
.joininfo { text-align: left; }
.joininfo .bigcode { text-align: left; font-size: 44px; letter-spacing: 6px; }
.small { font-size: 13px; }
.count { font-size: 14px; color: var(--muted); font-weight: 800; background: #f1ecff; padding: 3px 10px; border-radius: 999px; vertical-align: middle; margin-left: 6px; }
.avgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 14px 8px; }
.avitem { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-weight: 800; font-size: 14px; animation: rise .4s var(--ease-spring) both; }
.avitem span:not(.av) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avitem em { font-style: normal; font-size: 11px; color: #8a6400; background: #fff3c9; padding: 1px 7px; border-radius: 999px; }
.avitem.off span:not(.av) { color: var(--muted); }
.avitem.waiting { color: #b9a8ef; }
.avitem.waiting .av { animation: breathe 1.6s ease-in-out infinite; }
.avitem button.small { padding: 4px 8px; font-size: 12px; }

/* startscherm */
.hero { position: relative; text-align: center; padding: 22px 0 6px; }
.hero.small { padding: 40px 0 10px; }
.bubble {
  width: 92px; height: 78px; margin: 0 auto 6px; background: #fff; border-radius: 26px; position: relative;
  display: flex; align-items: center; justify-content: center; gap: 1px;
  font-size: 46px; font-weight: 1000; color: var(--bg); letter-spacing: -2px;
  box-shadow: 0 16px 34px -10px rgba(20, 0, 70, .55);
  animation: bob 3.2s ease-in-out infinite;
}
.bubble::after { content: ""; position: absolute; left: 20px; bottom: -14px; border: 9px solid transparent; border-top-color: #fff; border-left-color: #fff; }
.bubble .bang { color: var(--accent); display: inline-block; animation: wiggle 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }
@keyframes wiggle { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(14deg); } 86% { transform: rotate(-10deg); } }
.logo { font-size: 52px; font-weight: 1000; letter-spacing: -2px; margin: 10px 0 2px; }
/* logo Hintzz: het bijtje vliegt met een stippellijn naar de "zz" */
.logo .lw { position: relative; display: inline-block; color: #fff; }
.logo .lw b { color: var(--accent); font-weight: inherit; }
.logo .trail { position: absolute; left: -60px; top: -78px; width: 230px; height: 90px; overflow: visible; pointer-events: none; }
.logo .trail path { stroke: #fff; stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; fill: none; opacity: .7; }
.logo .beefly { position: absolute; right: -46px; top: -92px; width: 74px; height: 60px; animation: bob 3.2s ease-in-out infinite; }
.hero:has(.lw) { padding-top: 96px; }
.bee { width: 100%; height: 100%; display: block; overflow: visible; }
.bee ellipse[fill="#fff"] { transform-box: fill-box; transform-origin: 50% 100%; animation: flap .18s ease-in-out infinite alternate; }
@keyframes flap { to { scale: 1 .6; } }
.bubble .bee { width: 64px; height: 52px; }
.tagline { font-size: 17px; font-weight: 700; line-height: 1.45; color: #efe6ff; }
.floaters { position: absolute; inset: 0 -14px; overflow: hidden; pointer-events: none; z-index: -1; }
.floaters span {
  position: absolute; left: var(--x); bottom: -30px; font-weight: 900; font-size: 15px; color: rgba(255,255,255,.16);
  padding: 4px 10px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.12);
  animation: floatup 14s linear infinite; animation-delay: var(--d);
}
@keyframes floatup {
  0% { transform: translateY(0) rotate(-6deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-300px) rotate(6deg); opacity: 0; }
}
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: center; line-height: 1.35; color: #3b3360; }
.steps li span {
  width: 42px; height: 42px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(180deg, #f6f2ff, #ebe3ff); box-shadow: 0 2px 0 #ddd2fb;
}
.spinner {
  width: 38px; height: 38px; border-radius: 50%; margin: 6px auto 10px;
  border: 4px solid #ebe3ff; border-top-color: var(--bg); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* invoer */
input { border-radius: 16px; font-weight: 800; transition: border-color .15s, box-shadow .15s; }
input:focus { box-shadow: 0 0 0 4px rgba(138, 63, 252, .18); }
input::placeholder { color: #b4abcf; font-weight: 700; }

/* ronde timer */
.ring { position: relative; width: 168px; height: 168px; margin: 0 auto 8px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 10; }
.ring .track { stroke: #efeaff; }
.ring .prog {
  stroke: var(--bg); stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear, stroke .3s;
}
.ring .prog.low { stroke: var(--bad); }
.ring .timer { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; }

/* het woord */
.word {
  font-weight: 1000; letter-spacing: -1px;
  background: linear-gradient(90deg, #5b2bd6, #c03fe0); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: 0 4px 4px;
}
.wordlabel { text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; font-weight: 900; color: #a094c7; }

/* instellingen */
.opt { border-radius: 16px; transition: transform .12s, border-color .15s, background .15s; }
.opt.on { box-shadow: 0 0 0 4px rgba(91, 43, 214, .12); }
.opt:active { transform: scale(.97); }
.switch { border-radius: 14px; }

/* kleine verfijningen */
.tag { font-weight: 800; }
.result { font-size: 84px; animation: cdpop .7s var(--ease-spring) both; }
.score { font-weight: 1000; }
.history li { padding: 10px 2px; }
.slot { transition: transform .2s; }
.timer { font-weight: 1000; }
::selection { background: #e0d4ff; }

/* nieuw spel met nieuwe code */
.movedcard { border: 3px solid var(--accent); animation: rise .45s var(--ease-spring) both; }
.mcode { letter-spacing: 3px; font-size: 20px; color: var(--bg); }

/* snelkeuze rondes */
.perrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.per {
  margin: 0; padding: 10px 4px; font-size: 13px; font-weight: 800; line-height: 1.2;
  background: #f4f1ff; color: var(--text); box-shadow: none; border: 2px solid transparent; border-radius: 14px;
}
.per small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 2px; }
.per.on { border-color: var(--bg); background: #e9e1ff; box-shadow: 0 0 0 4px rgba(91, 43, 214, .12); }

/* =====================================================================
   OPENINGSANIMATIE EN NIEUW SPEL
   ===================================================================== */
.intro {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px; color: #fff; text-align: center;
  background: radial-gradient(circle at 50% 40%, #8a3ffc 0, #5b2bd6 45%, #3a14a8 100%);
  transition: opacity .45s, transform .45s;
}
.intro.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
.ibubble {
  width: 132px; height: 112px; background: #fff; border-radius: 36px; position: relative;
  display: flex; align-items: center; justify-content: center;
  font-size: 66px; font-weight: 1000; color: var(--bg); letter-spacing: -3px;
  box-shadow: 0 24px 50px -12px rgba(10, 0, 50, .6);
  animation: bubblein .8s cubic-bezier(.2, 1.6, .4, 1) both;
}
.ibubble::after { content: ""; position: absolute; left: 28px; bottom: -18px; border: 12px solid transparent; border-top-color: #fff; border-left-color: #fff; }
.ibubble .bee { width: 96px; height: 78px; }
@keyframes bubblein {
  0% { transform: translateY(-120vh) rotate(-20deg); }
  60% { transform: translateY(12px) rotate(6deg) scale(1.05, .92); }
  80% { transform: translateY(-6px) rotate(-2deg); }
  100% { transform: none; }
}
@keyframes bangin { 0% { transform: scale(0) rotate(-40deg); } 100% { transform: none; } }
.ititle { font-size: 54px; font-weight: 1000; letter-spacing: -2px; margin-top: 18px; display: flex; }
.ititle em { font-style: normal; color: var(--accent); display: flex; }
.ititle span { display: inline-block; animation: letterin .55s cubic-bezier(.2, 1.7, .4, 1) both; }
@keyframes letterin { 0% { opacity: 0; transform: translateY(40px) scale(.3) rotate(-15deg); } 100% { opacity: 1; transform: none; } }
.isub { font-size: 18px; font-weight: 800; opacity: 0; animation: fadeup .5s 1.1s ease-out forwards; }
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } to { opacity: .9; transform: none; } }

/* sterretjes die uit het midden spatten */
.isparks { position: absolute; left: 50%; top: 42%; width: 0; height: 0; pointer-events: none; }
.isparks i {
  position: absolute; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); opacity: 0;
  animation: spark 1.1s .55s ease-out forwards;
}
.isparks i:nth-child(3n) { background: #ff5d8f; } .isparks i:nth-child(3n+1) { background: #7bdcff; }
.isparks i:nth-child(1) { --x: 140px; --y: -60px; } .isparks i:nth-child(2) { --x: -150px; --y: -40px; }
.isparks i:nth-child(3) { --x: 100px; --y: 120px; } .isparks i:nth-child(4) { --x: -110px; --y: 110px; }
.isparks i:nth-child(5) { --x: 20px; --y: -160px; } .isparks i:nth-child(6) { --x: -30px; --y: 170px; }
.isparks i:nth-child(7) { --x: 170px; --y: 40px; } .isparks i:nth-child(8) { --x: -175px; --y: 50px; }
.isparks i:nth-child(9) { --x: 80px; --y: -140px; } .isparks i:nth-child(10) { --x: -90px; --y: -130px; }
.isparks i:nth-child(11) { --x: 130px; --y: 150px; } .isparks i:nth-child(12) { --x: -140px; --y: 150px; }
@keyframes spark {
  0% { opacity: 1; transform: translate(0, 0) scale(.4) rotate(0); }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1.2) rotate(240deg); }
}

/* nieuw spel: code rolt uit */
.ngtitle { font-size: 36px; font-weight: 1000; animation: bubblein .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.tiles { display: flex; gap: 10px; }
.tiles b {
  width: 64px; height: 80px; border-radius: 18px; background: #fff; color: var(--bg);
  display: grid; place-items: center; font-size: 46px; font-weight: 1000;
  box-shadow: 0 6px 0 #d8ccff, 0 18px 30px -10px rgba(10, 0, 50, .55);
}
.tiles b.land { animation: land .4s cubic-bezier(.2, 1.8, .4, 1); background: linear-gradient(180deg, #fff, #f3edff); }
@keyframes land { 0% { transform: translateY(-14px) scale(1.15); } 100% { transform: none; } }
.newgame .isub { animation-delay: 1.4s; }
.newgame .isparks i { animation-delay: 1.3s; }
@media (prefers-reduced-motion: reduce) {
  .intro *, .intro { animation-duration: .01s !important; animation-delay: 0s !important; }
}

/* =====================================================================
   UITLEG
   ===================================================================== */
.helpwrap {
  position: fixed; inset: 0; z-index: 40; background: rgba(20, 8, 60, 0); display: flex; align-items: flex-end; justify-content: center;
  transition: background .3s;
}
.helpwrap.open { background: rgba(20, 8, 60, .55); }
.helpsheet {
  width: 100%; max-width: 560px; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column;
  background: #fff; border-radius: 26px 26px 0 0; box-shadow: 0 -20px 50px rgba(0,0,0,.3);
  transform: translateY(100%); transition: transform .35s var(--ease-spring);
  padding-bottom: env(safe-area-inset-bottom);
}
.helpwrap.open .helpsheet { transform: none; }
.grab { width: 44px; height: 5px; border-radius: 9px; background: #ddd5f3; margin: 10px auto 2px; }
.hhead { display: flex; align-items: center; justify-content: space-between; padding: 6px 18px 0; }
.hhead h2 { margin: 0; }
.hclose { width: 38px; height: 38px; margin: 0; padding: 0; border-radius: 50%; font-size: 16px; background: #f1ecff; color: var(--bg); box-shadow: none; }
.htabs { display: flex; gap: 6px; overflow-x: auto; padding: 12px 18px 10px; scrollbar-width: none; }
.htabs::-webkit-scrollbar { display: none; }
.htabs button {
  width: auto; flex: none; margin: 0; padding: 8px 13px; font-size: 14px; border-radius: 999px;
  background: #f4f1ff; color: var(--muted); box-shadow: none;
}
.htabs button.on { background: var(--bg); color: #fff; }
.hbody { overflow-y: auto; padding: 4px 20px 24px; line-height: 1.5; color: #3b3360; -webkit-overflow-scrolling: touch; }
.hbody h3 { font-size: 17px; font-weight: 900; color: var(--text); margin: 18px 0 8px; }
.hbody .lead { font-size: 16px; background: #f6f2ff; border-radius: 14px; padding: 12px 14px; margin: 4px 0 0; }
.hbody .note { font-size: 14px; color: var(--muted); }
.hsteps { padding-left: 0; margin: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.hsteps li { counter-increment: s; position: relative; padding-left: 40px; }
.hsteps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(180deg, #7a4cf0, #5b2bd6); color: #fff; font-weight: 900; display: grid; place-items: center; font-size: 14px;
}
.hlist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.hlist.tips li { background: #faf8ff; border-radius: 12px; padding: 10px 12px; }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { font-weight: 900; color: var(--text); cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--bg); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 8px 0 0; }
.grab, .hhead, .htabs { flex: none; }
.hbody { flex: 1; min-height: 0; }

/* uitleg bij instellingen */
.sethelp {
  margin: 8px 0 14px; padding: 9px 12px; border-radius: 12px; background: #f8f6ff;
  color: #5d5480; font-size: 13.5px; line-height: 1.45;
}
.sethelp b { color: var(--text); }
.card label { color: var(--text); font-weight: 800; font-size: 15px; margin-top: 14px; }

/* =====================================================================
   EIGEN BEVESTIGINGSVENSTER
   ===================================================================== */
.dlgwrap {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px;
  background: rgba(20, 8, 60, 0); transition: background .2s;
}
.dlgwrap.open { background: rgba(20, 8, 60, .55); }
.dlg {
  width: 100%; max-width: 360px; background: #fff; border-radius: 26px; padding: 22px 20px 18px; text-align: center;
  box-shadow: 0 30px 60px -15px rgba(10, 0, 50, .6);
  transform: scale(.85) translateY(20px); opacity: 0; transition: transform .25s var(--ease-spring), opacity .2s;
}
.dlgwrap.open .dlg { transform: none; opacity: 1; }
.dlgicon {
  width: 64px; height: 64px; margin: -54px auto 10px; border-radius: 50%; display: grid; place-items: center; font-size: 30px;
  background: linear-gradient(180deg, #fff, #f1ecff); box-shadow: 0 0 0 6px #fff, 0 10px 20px -6px rgba(40, 0, 120, .4);
}
.dlg h2 { margin: 0 0 8px; font-size: 22px; }
.dlg p { margin: 0 0 4px; color: #5d5480; line-height: 1.45; }
.dlg p b { color: var(--text); }
.dlgbtns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.dlgbtns button { margin: 0; padding: 14px 8px; font-size: 16px; }

/* wegsturen en op slot */
button.kick {
  width: 28px; height: 28px; margin: 0; padding: 0; border-radius: 50%; font-size: 13px; flex: none;
  background: #ffe8eb; color: var(--bad); box-shadow: none;
}
.avitem { position: relative; }
.avitem button.kick { position: absolute; top: -4px; right: calc(50% - 40px); }
.lockbtn {
  display: flex; align-items: center; gap: 12px; text-align: left; margin-top: 10px; padding: 12px 14px;
  background: #f4fbf7; color: var(--text); box-shadow: none; border: 2px solid #cdeedd; font-size: 15px;
}
.lockbtn > span:first-child { font-size: 26px; }
.lockbtn small { display: block; font-weight: 600; font-size: 13px; color: var(--muted); margin-top: 2px; }
.lockbtn.on { background: #fff6f7; border-color: #ffc9d1; }
.lockinfo { margin: 10px 0 0; font-weight: 800; font-size: 14px; color: var(--bad); }

/* ❤️ bij hints */
button.like {
  width: auto; margin: 0 0 0 4px; padding: 6px 10px; border-radius: 999px; flex: none;
  background: #fff0f3; color: var(--bad); box-shadow: none; font-size: 16px; display: inline-flex; gap: 4px; align-items: center;
}
button.like b { font-size: 13px; }
button.like.on { background: #ffd9e1; }
button.like:disabled { opacity: .35; }
.hint.struck button.like { opacity: .6; }

/* prijsjes */
.awards { display: flex; flex-direction: column; gap: 10px; }
.award {
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 18px;
  background: linear-gradient(135deg, #fffbe9, #f6f0ff); border: 2px solid #f1e7c0;
  animation: rise .5s var(--ease-spring) both;
}
.aicon {
  width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 30px;
  background: #fff; box-shadow: 0 4px 10px -4px rgba(120, 80, 0, .35);
}
.atitle { font-weight: 1000; font-size: 16px; }
.awho { font-weight: 800; margin-top: 2px; }
.adetail { font-size: 13px; color: var(--muted); font-weight: 700; }

/* thema's en eigen woorden */
.opts.themes .opt { padding: 10px 12px; }
.opts.themes .opt b { font-size: 14px; }
.custombox { margin: 4px 0 10px; }
.custombox textarea {
  width: 100%; border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; font: inherit; font-weight: 700;
  font-size: 16px; color: var(--text); background: #faf9ff; resize: vertical; outline: none;
}
.custombox textarea:focus { border-color: var(--bg2); background: #fff; box-shadow: 0 0 0 4px rgba(138, 63, 252, .18); }
.customrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; font-size: 14px; font-weight: 800; color: var(--muted); }
.customrow button { padding: 10px 14px; }
.custominfo { margin: 6px 0 12px; font-size: 14px; color: var(--muted); }

/* spelen met één gsm */
.localcard .lrow { display: flex; gap: 12px; align-items: center; line-height: 1.4; }
.lico { font-size: 34px; }
.lnames { display: flex; flex-direction: column; gap: 8px; }
.lname { display: flex; gap: 8px; align-items: center; }
.lname input { padding: 11px 12px; font-size: 18px; }
.lnum { width: 26px; flex: none; text-align: center; font-weight: 900; color: var(--muted); }
.passcard { padding: 30px 20px; }
.passname {
  font-size: clamp(36px, 11vw, 52px); font-weight: 1000; letter-spacing: -1px; margin: 4px 0 6px;
  background: linear-gradient(90deg, #5b2bd6, #c03fe0); -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: cdpop .6s cubic-bezier(.2, 1.6, .4, 1) both;
}

/* feedback */
.dlg.fb { max-width: 400px; }
.moods { display: flex; justify-content: center; gap: 10px; margin: 6px 0 12px; }
.moods button {
  width: 56px; height: 56px; margin: 0; padding: 0; border-radius: 18px; font-size: 30px;
  background: #f4f1ff; box-shadow: none; border: 2px solid transparent; transition: transform .15s var(--ease-spring);
}
.moods button.on { border-color: var(--bg); background: #e9e1ff; transform: scale(1.12); }
.dlg.fb textarea {
  width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; font: inherit; font-weight: 700;
  font-size: 16px; color: var(--text); background: #faf9ff; resize: vertical; outline: none;
}
.fbnote { font-size: 12px !important; color: var(--muted) !important; margin-top: 8px !important; }
/* in een witte ballon: vleugels lichtpaars zodat ze zichtbaar blijven */
.bubble .bee ellipse[fill="#fff"], .ibubble .bee ellipse[fill="#fff"] { fill: #d9ccff; opacity: 1; }

/* rustiger startscherm */
.howcard .steps { gap: 10px; }
.homelinks { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.homelinks button {
  width: auto; margin: 0; padding: 9px 14px; font-size: 14px; font-weight: 800; border-radius: 999px;
  background: rgba(255,255,255,.16); color: #fff; box-shadow: none; border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* wachtruimte: samenvatting van de instellingen */
.schips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.readycard.center .schips { justify-content: center; }
.schip { background: #f4f1ff; color: #3b3360; font-weight: 800; font-size: 13px; padding: 6px 11px; border-radius: 999px; }
button.big { font-size: 21px; padding: 18px; }

/* QR-code tijdens het spel */
.joindlg .qr.big { width: 200px; height: 200px; margin: 12px auto 6px; padding: 12px; }
.joindlg .bigcode { font-size: 40px; }
.joindlg .lockinfo { margin: 8px 0 0; }

/* spelletje: record van dit spel en geluidsknop */
.gamebar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); font-weight: 700; }
.gamebar b { color: var(--text); }
button.gsound { width: auto; margin: 0; padding: 6px 10px; font-size: 13px; border-radius: 999px; background: #f4f1ff; color: var(--bg); box-shadow: none; flex: none; }

/* logo in de bovenbalk: het bijtje (lichtpaarse achtergrond zodat de witte vleugels zichtbaar zijn) */
.mark { background: linear-gradient(180deg, #f6f2ff, #e6dcff); }
.mark::after { border-top-color: #e6dcff; border-left-color: #e6dcff; }
.mark svg.bee { width: 30px; height: auto; display: block; margin-left: 1px; }
