/* play.css: de telefoon. Studio-look (donkerblauw, geel accent), één hand, tap targets >= 56 px. */

:root {
  --team: var(--bulb);
  --team-ink: var(--void);
  --card: rgba(247, 245, 240, 0.07);
  --card-2: rgba(247, 245, 240, 0.11);
  --line: rgba(247, 245, 240, 0.16);
  --line-2: rgba(247, 245, 240, 0.32);
  --gutter: 16px;
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

html { background: var(--void); }
body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--void);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
/* Studiolicht: vast achter alles (iOS negeert background-attachment: fixed). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(130% 60% at 50% -8%, rgba(43, 56, 170, 0.95) 0%, rgba(22, 32, 122, 0.85) 38%, rgba(10, 15, 69, 0) 78%),
    linear-gradient(180deg, var(--deep) 0%, var(--void) 100%);
}
:focus-visible { outline: 3px solid var(--bulb); outline-offset: 2px; }

.pq-boot { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

.pq { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

/* ---------------------------------------------------------------- kopbalk */
.pq-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: calc(8px + var(--safe-t)) calc(var(--gutter) + var(--safe-r)) 8px calc(var(--gutter) + var(--safe-l));
  background: rgba(5, 8, 41, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 6px solid var(--team);
  box-shadow: 0 1px 0 var(--line);
}
.pq:not(.has-team) .pq-bar { border-top-color: var(--bulb); }
.pq-bar-dot {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--team);
  box-shadow: 0 0 0 4px rgba(247, 245, 240, 0.08), 0 0 16px var(--team);
}
.pq-bar-id { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pq-bar-name {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pq-bar-role {
  align-self: flex-start;
  max-width: 100%;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pq-bar-role.cap {
  color: var(--team-ink);
  background: var(--team);
  padding: 2px 8px;
  border-radius: 999px;
}

/* timerring */
.pq-ring { position: relative; flex: 0 0 auto; width: 48px; height: 48px; }
.pq-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pq-ring-trk { fill: rgba(10, 15, 69, 0.7); stroke: rgba(247, 245, 240, 0.15); stroke-width: 5; }
.pq-ring-prog { fill: none; stroke: var(--bulb); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 0.2s linear; }
.pq-ring-n { position: absolute; inset: 0; display: grid; place-items: center; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pq-ring.long .pq-ring-n { font-size: 14px; letter-spacing: -0.02em; }
.pq-ring.low .pq-ring-prog { stroke: #FF8A3C; }
.pq-ring.done .pq-ring-prog { stroke: var(--bad); }
.pq-ring.done .pq-ring-n { color: var(--bad); }

.pq-sub {
  padding: 10px calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l));
  font-size: 14px;
  font-weight: 600;
  color: var(--bulb);
  letter-spacing: 0.01em;
}
.pq-sub-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pq-notice {
  margin: 12px calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l));
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 201, 60, 0.14);
  border: 1px solid rgba(255, 201, 60, 0.5);
  font-size: 15px;
  display: grid;
  gap: 2px;
}
.pq-notice b { color: var(--bulb); font-size: 16px; }

/* ---------------------------------------------------------------- inhoud */
.pq-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px calc(var(--gutter) + var(--safe-r)) calc(32px + var(--safe-b)) calc(var(--gutter) + var(--safe-l));
}
.pq-screen { display: flex; flex-direction: column; gap: 16px; }
.pq-in { animation: pq-in 0.38s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
@keyframes pq-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pq-rise > * { animation: pq-rise 0.55s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
.pq-rise > *:nth-child(2) { animation-delay: 0.05s; }
.pq-rise > *:nth-child(3) { animation-delay: 0.1s; }
.pq-rise > *:nth-child(4) { animation-delay: 0.15s; }
.pq-rise > *:nth-child(n+5) { animation-delay: 0.2s; }
@keyframes pq-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.pq-lead { display: flex; flex-direction: column; gap: 6px; }
.pq-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px 4px 8px;
  min-height: 52vh;
  justify-content: center;
}
.pq-kicker { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bulb); }
.pq-h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variation-settings: 'wdth' 85;
}
.pq-center .pq-h1 { font-size: 36px; }
/* Gecentreerde koppen en zinnen evenwichtig afbreken (geen los "tv." op de laatste regel). */
.pq-center .pq-h1, .pq-center .pq-p { text-wrap: balance; }
.pq-center .pq-receipt { align-self: stretch; text-align: left; }
.pq-h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.pq-h3 { margin: 6px 0 0; font-size: 17px; font-weight: 800; }
.pq-p { margin: 0; font-size: 18px; line-height: 1.4; max-width: 34ch; }
.pq-lead .pq-p { max-width: none; }
.pq-muted { color: var(--muted); }
.pq-small { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.pq-emoji { font-size: 64px; line-height: 1; margin-bottom: 4px; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.35)); }
.pq-label { font-size: 15px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.pq-err { color: #FF8A95; font-size: 16px; font-weight: 600; min-height: 0; }
.pq-err:empty { display: none; }
.pq-hint { font-size: 15px; color: var(--bulb); font-weight: 600; }
.pq-hint:empty { display: none; }
.pq-empty { grid-column: 1 / -1; padding: 18px; border: 2px dashed var(--line); border-radius: 14px; color: var(--muted); font-size: 15px; text-align: center; }
.pq-waitline {
  margin-top: 6px;
  align-self: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
}
.pq-spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid rgba(247, 245, 240, 0.15); border-top-color: var(--bulb);
  animation: pq-spin 0.9s linear infinite;
}
@keyframes pq-spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- knoppen */
.pq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 12px 22px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: var(--card-2);
  color: var(--chalk);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s ease;
}
.pq-btn:active:not(:disabled) { transform: scale(0.97); }
.pq-btn:disabled { opacity: 0.4; cursor: default; }
.pq-btn-main { background: var(--bulb); color: var(--void); box-shadow: 0 6px 22px rgba(255, 201, 60, 0.25); }
.pq-btn-ghost { background: transparent; border-color: var(--line-2); }
.pq-btn-block { width: 100%; }
.pq-btn-xl { min-height: 68px; font-size: 21px; border-radius: 20px; }
.pq-row { display: flex; gap: 10px; }
.pq-row > .pq-btn { flex: 1 1 0; min-width: 0; }
.pq-mini {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 0;
  background: var(--bulb);
  color: var(--void);
  font-size: 15px;
  font-weight: 800;
  touch-action: manipulation;
}
.pq-mini-ghost { background: transparent; color: var(--chalk); border: 2px solid var(--line-2); }

/* ---------------------------------------------------------------- antwoordopties */
.pq-controls { display: flex; flex-direction: column; gap: 12px; }
.pq-opts { display: grid; gap: 12px; }
.pq-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 18px;
  border-radius: 20px;
  border: 2px solid var(--line-2);
  background: var(--card);
  color: var(--chalk);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.08s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.pq-opt:active:not(:disabled) { transform: scale(0.97); }
.pq-opt:disabled { opacity: 0.45; cursor: default; }
.pq-opt.on { background: var(--bulb); border-color: var(--bulb); color: var(--void); box-shadow: 0 8px 26px rgba(255, 201, 60, 0.3); }
.pq-opt.on::after {
  content: "✓";
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
  background: var(--void);
  color: var(--bulb);
}
.pq-opt.on:disabled { opacity: 1; }
.pq-opt.sending { border-color: var(--bulb); animation: pq-pulse 0.9s ease-in-out infinite; }
@keyframes pq-pulse { 50% { background: rgba(255, 201, 60, 0.22); } }
.pq-opt-label { min-width: 0; overflow-wrap: anywhere; }
.pq-opt-badge {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(247, 245, 240, 0.12);
  font-size: 22px;
  font-weight: 900;
}
.pq-opt.on .pq-opt-badge { background: var(--void); color: var(--bulb); }
.pq-opts-mc .pq-opt { padding-right: 48px; }

/* A · links / B · rechts */
.pq-opts-pair { grid-template-columns: 1fr 1fr; }
.pq-opts-pair .pq-opt {
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 180px;
  text-align: center;
  border-radius: 24px;
}
.pq-opt-letter { font-size: 84px; font-weight: 900; line-height: 0.9; letter-spacing: -0.03em; }
.pq-opt-sub { font-size: 18px; font-weight: 700; opacity: 0.75; text-transform: lowercase; }

/* flits: twee enorme knoppen */
.pq-opts-flash .pq-opt {
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: max(150px, 25vh);
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  border-radius: 26px;
}
.pq-opt-icon { font-size: 64px; line-height: 1; }

/* wie van de twee */
.pq-opts-couple .pq-opt { min-height: 84px; justify-content: center; text-align: center; font-size: 24px; font-weight: 800; padding: 14px 48px; }
.pq-opts-couple .pq-opt-x { min-height: 64px; font-size: 18px; font-weight: 700; border-style: dashed; }
.pq-opts-couple .pq-opt-x.on { border-style: solid; }

/* aftelbalk flits */
.pq-fbar {
  position: relative;
  height: 44px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(247, 245, 240, 0.1);
}
.pq-fbar-fill {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--bulb), #FFE08A);
  transition: transform 0.2s linear;
}
.pq-fbar.low .pq-fbar-fill { background: linear-gradient(90deg, #FF8A3C, var(--bulb)); }
.pq-fbar.done .pq-fbar-fill { background: var(--bad); }
.pq-fbar-n {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  color: var(--void);
  font-variant-numeric: tabular-nums;
  mix-blend-mode: normal;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.35);
}
.pq-fbar.done .pq-fbar-n { color: var(--chalk); text-shadow: none; }

/* ---------------------------------------------------------------- invoer */
.pq-field {
  width: 100%;
  min-height: var(--tap);
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid var(--line-2);
  background: rgba(5, 8, 41, 0.55);
  color: var(--chalk);
  font-size: 20px;
  line-height: 1.3;
  resize: none;
  -webkit-appearance: none;
  appearance: none;
}
.pq-field::placeholder { color: rgba(247, 245, 240, 0.42); }
.pq-field:focus { outline: none; border-color: var(--bulb); box-shadow: 0 0 0 4px rgba(255, 201, 60, 0.2); }
.pq-field:disabled { opacity: 0.5; }
textarea.pq-field { min-height: 92px; }
.pq-edit { display: flex; flex-direction: column; gap: 10px; }
.pq-counter { align-self: flex-end; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pq-counter.near { color: var(--bulb); }
.pq-counter.full { color: #FF8A95; font-weight: 700; }

.pq-numrow { display: flex; align-items: center; gap: 12px; }
.pq-field-num { font-size: 30px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.pq-unit { flex: 0 0 auto; font-size: 20px; font-weight: 700; color: var(--muted); max-width: 40%; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- status en resultaat */
.pq-receipt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--card);
  border: 2px solid var(--line);
}
.pq-receipt-k { font-size: 15px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.pq-receipt-v { display: flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.pq-receipt.ok { border-color: rgba(63, 212, 122, 0.55); background: rgba(63, 212, 122, 0.1); }
.pq-receipt.ok .pq-receipt-k { color: var(--ok); }
.pq-receipt.ok .pq-receipt-k::before { content: "✓ "; }
.pq-receipt.sending { border-color: rgba(255, 201, 60, 0.5); }
.pq-receipt.sending .pq-receipt-k { color: var(--bulb); }
.pq-receipt.empty { border-style: dashed; background: transparent; }
.pq-receipt.plain .pq-receipt-k::before { content: none; }
.pq-receipt.big .pq-receipt-v { font-size: 32px; }
.pq-flag { font-size: 1.3em; line-height: 1; }
.pq-receipt.big .pq-flag { font-size: 48px; }

.pq-closed {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 77, 94, 0.14);
  border: 2px solid rgba(255, 77, 94, 0.5);
  text-align: center;
  font-size: 19px;
}
.pq-closed b { color: #FF8A95; }

.pq-result {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  width: 100%;
  padding: 22px 22px;
  border-radius: 24px;
  text-align: left;
  color: var(--void);
  background: var(--ok);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.pq-result-big { font-size: 34px; font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; }
.pq-result-pts { font-size: 54px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.pq-result-sub { grid-column: 1 / -1; font-size: 16px; font-weight: 600; opacity: 0.85; }
.pq-result.half { background: var(--bulb); }
.pq-result.bad { background: var(--bad); color: #fff; }
.pq-result.wait { background: var(--card-2); color: var(--chalk); border: 2px dashed var(--line-2); box-shadow: none; }
.pq-result.pop { animation: pq-pop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
@keyframes pq-pop { from { opacity: 0; transform: scale(0.75); } to { opacity: 1; transform: scale(1); } }

/* ---------------------------------------------------------------- landenkiezer */
.pq-geo { display: flex; flex-direction: column; gap: 10px; }
.pq-geo-list { display: flex; flex-direction: column; gap: 8px; }
.pq-geo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--tap);
  padding: 10px 16px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--chalk);
  font-size: 19px;
  font-weight: 700;
  text-align: left;
  touch-action: manipulation;
}
.pq-geo-row:active { background: rgba(255, 201, 60, 0.2); }
.pq-geo-row.on { border-color: var(--bulb); }
.pq-geo-row .pq-flag { font-size: 28px; width: 34px; text-align: center; flex: 0 0 auto; }
.pq-geo-name { flex: 1 1 auto; min-width: 0; }
.pq-geo-alt { flex: 0 1 auto; font-size: 14px; font-weight: 600; color: var(--muted); }
.pq-geo-hint { padding: 8px 4px; color: var(--muted); font-size: 16px; }

/* ---------------------------------------------------------------- spelersnamen */
.pq-names { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pq-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 2px solid var(--line-2);
  background: var(--card);
  color: var(--chalk);
  font-size: 19px;
  font-weight: 800;
  touch-action: manipulation;
}
.pq-name:active:not(:disabled) { background: var(--bulb); color: var(--void); }
.pq-name.taken { opacity: 0.4; border-style: dashed; }
.pq-name small { font-size: 13px; font-weight: 600; color: var(--muted); }

/* ---------------------------------------------------------------- proefronde */
.pq-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  text-align: left;
}
.pq-rules li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.2;
}
.pq-rules b {
  flex: 0 0 auto;
  min-width: 34px;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(247, 245, 240, 0.12);
}
.pq-rules li.ok b { background: rgba(63, 212, 122, 0.25); color: var(--ok); }
.pq-rules li.bad b { background: rgba(255, 77, 94, 0.22); color: #FF8A95; }

.pq-checks { display: flex; flex-direction: column; gap: 10px; }
.pq-check {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 64px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 2px solid var(--line-2);
  background: var(--card);
  color: var(--chalk);
  font-size: 20px;
  font-weight: 700;
  text-align: left;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.pq-check-box {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  border: 3px solid var(--line-2);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
  color: var(--void);
}
.pq-check.on { background: rgba(255, 201, 60, 0.16); border-color: var(--bulb); }
.pq-check.on .pq-check-box { background: var(--bulb); border-color: var(--bulb); }
.pq-check.on .pq-check-box::after { content: "✓"; }
.pq-check-name { min-width: 0; overflow-wrap: anywhere; }

.pq-ages { display: grid; grid-template-columns: repeat(auto-fit, minmax(68px, 1fr)); gap: 8px; }
.pq-age {
  min-height: 60px;
  border-radius: 14px;
  border: 2px solid var(--line-2);
  background: var(--card);
  color: var(--chalk);
  font-size: 20px;
  font-weight: 800;
  touch-action: manipulation;
}
.pq-age.on { background: var(--bulb); border-color: var(--bulb); color: var(--void); }

.pq-save { font-size: 15px; font-weight: 600; color: var(--muted); min-height: 1.3em; }
.pq-save.ok { color: var(--ok); }
.pq-save.busy { color: var(--bulb); }
.pq-save.err { color: #FF8A95; }

.pq-jrs { display: flex; flex-direction: column; gap: 8px; }
.pq-jr {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--card);
  border: 2px solid var(--line);
  font-size: 18px;
  font-weight: 700;
}
.pq-jr-mark { flex: 0 0 auto; width: 26px; text-align: center; font-size: 20px; font-weight: 900; }
.pq-jr-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.pq-jr-tag { flex: 0 0 auto; font-size: 15px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: rgba(247, 245, 240, 0.12); }
.pq-jr.ok { border-color: rgba(63, 212, 122, 0.6); }
.pq-jr.ok .pq-jr-mark, .pq-jr.ok .pq-jr-tag { color: var(--ok); }
.pq-jr.bad { border-color: rgba(255, 77, 94, 0.6); }
.pq-jr.bad .pq-jr-mark, .pq-jr.bad .pq-jr-tag { color: #FF8A95; }
.pq-jr.miss { border-style: dashed; }
.pq-jr.miss .pq-jr-tag { color: var(--bulb); }
.pq-jr.none { opacity: 0.55; }

/* ---------------------------------------------------------------- profielbouw */
.pq-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px;
  border-radius: 22px;
  background: rgba(10, 15, 69, 0.6);
  border: 1px solid var(--line);
}
.pq-up-info { font-size: 15px; font-weight: 600; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.pq-up-limit { font-size: 15px; font-weight: 600; color: var(--bulb); text-align: center; }
.pq-up-limit:empty { display: none; }
.pq-upq { display: flex; flex-direction: column; gap: 8px; }
.pq-upq:empty { display: none; }
.pq-up {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
}
.pq-up-thumb { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: rgba(247, 245, 240, 0.08); }
.pq-up-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pq-up-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pq-up-t { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pq-up-bar { height: 6px; border-radius: 3px; background: rgba(247, 245, 240, 0.12); overflow: hidden; }
.pq-up-bar i { display: block; height: 100%; background: var(--bulb); border-radius: 3px; transition: width 0.2s ease; }
.pq-up-prep .pq-up-bar i, .pq-up-wait .pq-up-bar i, .pq-up-retry .pq-up-bar i { width: 30% !important; animation: pq-indet 1.1s ease-in-out infinite; }
.pq-up-retry .pq-up-t { color: var(--bulb); }
@keyframes pq-indet { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.pq-up-ok { border-color: rgba(63, 212, 122, 0.5); }
.pq-up-ok .pq-up-t { color: var(--ok); }
.pq-up-err { border-color: rgba(255, 77, 94, 0.5); }
.pq-up-err .pq-up-t { color: #FF8A95; }
.pq-up-msg { font-size: 14px; font-weight: 600; color: #FF8A95; }
.pq-up-act { display: flex; gap: 6px; flex: 0 0 auto; }

.pq-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pq-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 16px;
  border: 2px dashed var(--line-2);
  background: var(--card);
  color: var(--chalk);
  overflow: hidden;
  text-align: left;
  touch-action: manipulation;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}
.pq-slot:active { transform: scale(0.98); }
.pq-slot.full { border-style: solid; border-color: var(--line); }
.pq-slot.sel { border: 3px solid var(--bulb); box-shadow: 0 0 0 4px rgba(255, 201, 60, 0.28), 0 8px 24px rgba(255, 201, 60, 0.2); }
.pq-slot-img { display: grid; place-items: center; aspect-ratio: 4 / 5; width: 100%; background: rgba(5, 8, 41, 0.45); overflow: hidden; }
.pq-slot-img img { width: 100%; height: 100%; object-fit: cover; }
.pq-slot-plus { font-size: 42px; font-weight: 300; color: var(--line-2); }
.pq-slot.sel .pq-slot-plus { color: var(--bulb); }
.pq-slot-n {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 900;
  background: var(--void);
  color: var(--bulb);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.pq-selbar {
  position: sticky;
  bottom: calc(10px + var(--safe-b));
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--deep);
  border: 2px solid var(--bulb);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.pq-selbar-t { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.pq-selbar-t b { color: var(--bulb); font-size: 16px; }
.pq-selbar-b { display: flex; gap: 8px; justify-content: flex-end; }

.pq-pool { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pq-tile { position: relative; }
.pq-tile-btn {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(247, 245, 240, 0.08);
  touch-action: manipulation;
}
.pq-tile-btn img { width: 100%; height: 100%; object-fit: cover; }
button.pq-tile-btn:active { transform: scale(0.97); }
.pq-tile.used .pq-tile-btn img { opacity: 0.45; }
.pq-tile-badge {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
  background: var(--bulb);
  color: var(--void);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.pq-tile-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  background: rgba(5, 8, 41, 0.78);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  touch-action: manipulation;
}

.pq-prompt { display: flex; flex-direction: column; gap: 8px; }
.pq-prompt + .pq-prompt { padding-top: 14px; border-top: 1px solid var(--line); }
.pq-prompt-q { font-size: 17px; font-weight: 800; color: var(--bulb); }
.pq-prompt-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pq-prompt-foot .pq-counter { align-self: auto; }

.pq-preview summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--tap);
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.pq-preview summary::-webkit-details-marker { display: none; }
.pq-preview summary::after { content: "▾"; font-size: 22px; color: var(--bulb); transition: transform 0.2s ease; }
.pq-preview[open] summary::after { transform: rotate(180deg); }
.pq-preview-box { padding-top: 8px; }

.pq-submit { background: rgba(255, 201, 60, 0.08); border-color: rgba(255, 201, 60, 0.35); text-align: center; }
.pq-submit-info { font-size: 16px; font-weight: 700; color: var(--chalk); }

/* telefoon-mockup: zo ziet Floor het */
.pq-phone {
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto;
  padding: 12px;
  border-radius: 40px;
  background: #0B0B12;
  box-shadow: 0 0 0 2px #2A2D45, 0 20px 50px rgba(0, 0, 0, 0.55);
}
.pq-phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 22px;
  border-radius: 0 0 14px 14px;
  background: #0B0B12;
  z-index: 2;
}
.pq-phone-screen {
  max-height: 600px;
  overflow-y: auto;
  border-radius: 30px;
  background: #F4F1EC;
  color: #1A1A22;
  padding-bottom: 12px;
  -webkit-overflow-scrolling: touch;
}
.pq-pf-head { display: flex; align-items: baseline; gap: 8px; padding: 36px 16px 12px; }
.pq-pf-name { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.pq-pf-age { font-size: 22px; font-weight: 500; color: #5A5A66; }
.pq-pf-photo {
  margin: 0 10px 10px;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: #E2DED6;
}
.pq-pf-photo img { width: 100%; height: 100%; object-fit: cover; }
.pq-pf-photo.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  aspect-ratio: 4 / 3;
  border: 2px dashed #C9C3B8;
  background: transparent;
  color: #8A8578;
  font-weight: 700;
}
.pq-pf-prompt { margin: 0 10px 10px; padding: 18px 16px 22px; border-radius: 14px; background: #fff; }
.pq-pf-q { font-size: 14px; font-weight: 700; color: #5A5A66; margin-bottom: 8px; }
.pq-pf-a { font-size: 22px; font-weight: 700; line-height: 1.2; white-space: pre-wrap; overflow-wrap: anywhere; }
.pq-pf-a.empty { color: #B5AFA4; font-weight: 500; font-style: italic; }

/* ---------------------------------------------------------------- voet en meldingen */
.pq-foot {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 18px calc(var(--gutter) + var(--safe-r)) calc(24px + var(--safe-b)) calc(var(--gutter) + var(--safe-l));
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.pq-foot-q { font-size: 15px; color: var(--muted); }

.pq-toast {
  position: fixed;
  left: 50%;
  top: calc(76px + var(--safe-t));
  z-index: 50;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--chalk);
  color: var(--void);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.pq-toast.show { opacity: 1; transform: translate(-50%, 0); }

.conn-chip { bottom: calc(16px + var(--safe-b)); }

@media (max-width: 360px) {
  .pq-h1 { font-size: 28px; }
  .pq-center .pq-h1 { font-size: 30px; }
  .pq-opt-letter { font-size: 70px; }
  .pq-rules { grid-template-columns: 1fr; }
  .pq-pool { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
