/* Inschrijfzuil – maten volgen het ontwerp (792 × 1224 pt), geschaald via --u.
   Op de 21" kiosk (1080 × 1920 staand) is 1 pt ≈ 1,36 px. */
:root {
  --u: min(calc(100vw / 792), calc(100dvh / 1390));
  --purple: #7c489a;
  --purple-dark: #5d2f7a;
  --purple-soft: #efe6f4;
  --field: #f2f2f3;
  --ink: #000;
  --muted: #5b5b66;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #fff; }
body {
  font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  overflow: hidden;
  overscroll-behavior: none;
  user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
img { -webkit-user-drag: none; user-select: none; pointer-events: none; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }

.kiosk {
  position: relative;
  width: calc(792 * var(--u));
  height: 100dvh;
  margin: 0 auto;
  display: flex; flex-direction: column;
  overflow: hidden;
  background: #fff;
}
.top { flex: none; padding-top: calc(16 * var(--u)); position: relative; }
.clock { position: absolute; right: calc(66 * var(--u)); top: calc(26 * var(--u)); text-align: right; color: var(--purple); }
.clock-time { font-weight: 900; font-size: calc(46 * var(--u)); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.clock-date { margin-top: calc(6 * var(--u)); font-size: calc(16 * var(--u)); color: var(--muted); }
.top .logo { display: block; width: calc(232 * var(--u)); height: auto; margin-left: calc(62 * var(--u)); }
.top .swoosh { display: block; width: calc(873 * var(--u)); max-width: none; height: calc(19 * var(--u)); margin: calc(16 * var(--u)) 0 0 calc(-3 * var(--u)); }

.screen {
  flex: 1;
  padding: calc(24 * var(--u)) calc(66 * var(--u)) 0;
  display: flex; flex-direction: column;
  min-height: 0;
}
.screen[hidden] { display: none; }

.title {
  margin: 0;
  color: var(--purple);
  font-weight: 900;
  font-size: calc(32.4 * var(--u));
  line-height: 1.15;
  letter-spacing: 0.005em;
}
.subtitle { margin: calc(4 * var(--u)) 0 0; font-size: calc(20.5 * var(--u)); }

.q { margin-top: calc(34 * var(--u)); }
.q[hidden] { display: none; }
.q h2 { margin: 0 0 calc(12 * var(--u)); font-weight: 400; font-size: calc(20.5 * var(--u)); }

.field {
  width: calc(616 * var(--u));
  height: calc(52 * var(--u));
  background: var(--field);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 calc(18 * var(--u)) 0 calc(14 * var(--u));
  text-align: left;
  font-size: calc(17 * var(--u));
  border-radius: calc(2 * var(--u));
  outline: calc(2.5 * var(--u)) solid transparent;
  transition: outline-color .15s, background .15s;
}
.field.active, .field:focus-visible { outline-color: var(--purple); background: #fff; }
.field .value { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.field .value.placeholder { color: #333; }
.field .value:not(.placeholder) { font-weight: 700; font-size: calc(19 * var(--u)); }
.field .tri {
  flex: none;
  width: 0; height: 0;
  border-left: calc(12.5 * var(--u)) solid transparent;
  border-right: calc(12.5 * var(--u)) solid transparent;
  border-top: calc(12 * var(--u)) solid var(--purple);
}
.field .caret { display: none; }

.reasons {
  display: grid;
  grid-template-columns: repeat(3, calc(157 * var(--u)));
  column-gap: calc(21 * var(--u));
  row-gap: calc(13 * var(--u));
  padding-left: calc(3 * var(--u));
}
.reason {
  position: relative;
  height: calc(83 * var(--u));
  border-radius: calc(20 * var(--u));
  background: var(--purple);
  color: #fff;
  font-size: calc(20.5 * var(--u));
  line-height: 1.12;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 calc(8 * var(--u));
  text-align: center;
  border: calc(2.5 * var(--u)) solid var(--purple);
  transition: transform .08s, background .15s, color .15s;
}
.reason:active { transform: scale(.97); }
/* Na een keuze: gekozen knop blijft vol paars, de rest wordt wit met paarse rand */
.reasons.has-choice .reason:not(.selected) { background: #fff; color: var(--purple); }

.submit-row { margin-top: auto; padding: calc(28 * var(--u)) 0 calc(22 * var(--u)); }
.submit {
  width: calc(616 * var(--u));
  height: calc(72 * var(--u));
  border-radius: calc(20 * var(--u));
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: calc(24 * var(--u));
  letter-spacing: .02em;
  transition: background .15s, transform .08s, opacity .15s;
}
.submit:active:not(:disabled) { transform: scale(.985); background: var(--purple-dark); }
.submit:disabled { background: #cdbfd6; cursor: default; }
.submit.busy { opacity: .7; }
.hint { margin: calc(10 * var(--u)) 0 0; color: var(--muted); font-size: calc(15 * var(--u)); min-height: 1.3em; }
.privacy { margin: calc(22 * var(--u)) 0 0; color: #8b8794; font-size: calc(13.5 * var(--u)); line-height: 1.45; width: calc(616 * var(--u)); }
.req { color: var(--purple); font-weight: 700; }

.bottom { flex: none; }
.bottom img { display: block; width: 100%; height: auto; }
.bottom .band { height: calc(34 * var(--u)); background: var(--purple); margin-top: calc(-8 * var(--u)); position: relative; }

/* ---------- Bevestiging ---------- */
.confirm { align-items: center; text-align: center; padding-top: calc(50 * var(--u)); }
.confirm .title { font-size: calc(36 * var(--u)); }
.check svg { width: calc(88 * var(--u)); height: calc(88 * var(--u)); margin-bottom: calc(18 * var(--u)); }
.check circle { fill: var(--purple-soft); stroke: var(--purple); stroke-width: 2.5; }
.check path {
  fill: none; stroke: var(--purple); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s .15s ease-out forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.pass {
  margin-top: calc(40 * var(--u));
  width: calc(360 * var(--u));
  padding: calc(26 * var(--u)) 0 calc(20 * var(--u));
  border-radius: calc(28 * var(--u));
  background: var(--purple);
  color: #fff;
  display: flex; flex-direction: column; align-items: center;
  box-shadow: 0 calc(14 * var(--u)) calc(40 * var(--u)) rgba(124, 72, 154, .28);
  animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
.pass-label { font-size: calc(22 * var(--u)); letter-spacing: .04em; }
.pass-number { font-weight: 900; font-size: calc(150 * var(--u)); line-height: 1; margin-top: calc(6 * var(--u)); font-variant-numeric: tabular-nums; }
.pass.none { background: #fff; color: var(--purple); border: calc(3 * var(--u)) solid var(--purple); box-shadow: none; }
.pass.none .pass-number { font-size: calc(30 * var(--u)); font-weight: 700; padding: calc(10 * var(--u)) calc(20 * var(--u)) calc(6 * var(--u)); line-height: 1.25; }
.confirm-text { margin: calc(36 * var(--u)) 0 0; font-size: calc(26 * var(--u)); font-weight: 700; max-width: calc(600 * var(--u)); }
.confirm-sub { margin: calc(10 * var(--u)) 0 0; font-size: calc(19 * var(--u)); color: var(--muted); }
.submit.ghost { margin-top: auto; background: #fff; color: var(--purple); border: calc(2.5 * var(--u)) solid var(--purple); width: calc(360 * var(--u)); }
.countdown { width: calc(360 * var(--u)); height: calc(5 * var(--u)); background: var(--purple-soft); border-radius: 99px; margin: calc(16 * var(--u)) 0 calc(28 * var(--u)); overflow: hidden; }
.countdown .bar { height: 100%; width: 100%; background: var(--purple); transform-origin: left; }

/* ---------- Schermtoetsenbord ---------- */
.keyboard {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #ecebf0;
  padding: calc(14 * var(--u)) calc(14 * var(--u)) calc(22 * var(--u));
  box-shadow: 0 calc(-8 * var(--u)) calc(30 * var(--u)) rgba(0, 0, 0, .14);
  transform: translateY(105%);
  transition: transform .22s ease-out;
  z-index: 20;
}
.keyboard.open { transform: none; }
.kb-head { display: flex; gap: calc(10 * var(--u)); margin-bottom: calc(12 * var(--u)); }
.kb-preview {
  flex: 1; height: calc(60 * var(--u)); background: #fff; border-radius: calc(10 * var(--u));
  display: flex; align-items: center; padding: 0 calc(18 * var(--u));
  font-size: calc(26 * var(--u)); font-weight: 700; overflow: hidden; white-space: nowrap;
}
.kb-preview .placeholder { color: #9a9aa6; font-weight: 400; }
.kb-cursor { display: inline-block; width: calc(2.5 * var(--u)); height: 1.1em; background: var(--purple); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.kb-done {
  width: calc(150 * var(--u)); border-radius: calc(10 * var(--u));
  background: var(--purple); color: #fff; font-weight: 700; font-size: calc(22 * var(--u));
}
.kb-rows { display: flex; flex-direction: column; gap: calc(9 * var(--u)); }
.kb-row { display: flex; justify-content: center; gap: calc(7 * var(--u)); }
.key {
  flex: 0 0 calc(68 * var(--u));
  height: calc(72 * var(--u));
  border-radius: calc(10 * var(--u));
  background: #fff;
  font-size: calc(28 * var(--u));
  box-shadow: 0 calc(2 * var(--u)) 0 #c9c7d1;
  display: flex; align-items: center; justify-content: center;
}
.key:active, .key.pressed { background: var(--purple-soft); transform: translateY(1px); box-shadow: none; }
.key.wide { flex-basis: calc(110 * var(--u)); font-size: calc(20 * var(--u)); }
.key.space { flex-basis: calc(240 * var(--u)); font-size: calc(18 * var(--u)); color: var(--muted); }
.key.on { background: var(--purple); color: #fff; }

/* ---------- Keuzelijst ---------- */
.sheet-backdrop {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(30, 14, 40, .45);
  display: flex; align-items: flex-end;
  animation: fade .18s ease-out;
}
.sheet-backdrop[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  width: 100%; max-height: 72%;
  background: #fff;
  border-radius: calc(28 * var(--u)) calc(28 * var(--u)) 0 0;
  display: flex; flex-direction: column;
  animation: up .22s ease-out;
}
@keyframes up { from { transform: translateY(30%); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: calc(26 * var(--u)) calc(40 * var(--u)) calc(14 * var(--u)); }
.sheet-head h2 { margin: 0; color: var(--purple); font-weight: 900; font-size: calc(28 * var(--u)); }
.sheet-close { width: calc(60 * var(--u)); height: calc(60 * var(--u)); border-radius: 50%; background: var(--field); font-size: calc(24 * var(--u)); }
.sheet-list { overflow-y: auto; padding: 0 calc(40 * var(--u)) calc(40 * var(--u)); overscroll-behavior: contain; }
.opt {
  width: 100%; min-height: calc(76 * var(--u));
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10 * var(--u)) calc(22 * var(--u));
  margin-top: calc(10 * var(--u));
  background: var(--field); border-radius: calc(14 * var(--u));
  text-align: left; font-size: calc(23 * var(--u));
}
.opt small { display: block; color: var(--muted); font-size: calc(16 * var(--u)); margin-top: calc(2 * var(--u)); }
.opt.selected { background: var(--purple); color: #fff; }
.opt.selected small { color: #eadff1; }
.opt:active { background: var(--purple-soft); }
.opt.selected:active { background: var(--purple-dark); }
.time-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(10 * var(--u)); }
.time-grid .opt { justify-content: center; margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; }
.time-grid .opt.now { grid-column: 1 / -1; }

.offline, .toast {
  position: absolute; left: 50%; transform: translateX(-50%);
  border-radius: 99px; padding: calc(14 * var(--u)) calc(28 * var(--u));
  font-size: calc(18 * var(--u)); font-weight: 700; z-index: 40; white-space: nowrap;
}
.offline { top: calc(130 * var(--u)); background: #b3261e; color: #fff; }
.toast { bottom: calc(200 * var(--u)); background: #222; color: #fff; }
.offline[hidden], .toast[hidden] { display: none; }
