:root {
  --navy: #1d2652;
  --magenta: #ad1d63;
  --blue: #2470ab;
  --bg: #ffffff;
  --paper: #f4f5f9;
  --line: #d5d9e6;
  --muted: #5a6180;
  --danger: #b3261e;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--navy);
  font: 400 16px/1.5 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  min-height: 100dvh;
}
#app { max-width: 440px; margin: 0 auto; padding: 0 16px calc(32px + env(safe-area-inset-bottom)); }

.brand { padding: 24px 0 16px; border-bottom: 3px solid var(--navy); }
.brand img { display: block; height: 44px; width: auto; }
.event { margin: 20px 0 4px; font-size: 14px; color: var(--muted); }
h1 { margin: 0 0 20px; font-size: 26px; line-height: 1.2; font-weight: 700; }
h2 { margin: 24px 0 8px; font-size: 16px; font-weight: 600; }
p { margin: 0 0 12px; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.areas { display: grid; gap: 8px; }

.choice, .chip, .area {
  font: inherit; color: var(--navy); background: var(--bg);
  border: 2px solid var(--line); border-radius: var(--radius);
  cursor: pointer; touch-action: manipulation;
  transition: border-color .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease);
}
.choice { min-height: 56px; font-weight: 600; font-size: 17px; }
.chip { min-width: 52px; min-height: 52px; font-weight: 600; font-size: 18px; font-variant-numeric: tabular-nums; }
.area { min-height: 56px; padding: 0 16px; text-align: left; font-weight: 500; display: flex; align-items: center; justify-content: space-between; }
.area::after { content: ''; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); transition: inherit; }
.choice[aria-pressed="true"], .chip[aria-pressed="true"], .area[aria-pressed="true"] {
  border-color: var(--magenta); background: #fbeef4;
}
.area[aria-pressed="true"]::after { border-color: var(--magenta); background: var(--magenta); box-shadow: inset 0 0 0 3px #fbeef4; }
.choice:active, .chip:active, .area:active { background: var(--paper); }

.btn {
  display: block; width: 100%; min-height: 56px; margin-top: 28px;
  font: 600 17px/1 'Figtree', system-ui, sans-serif; color: #fff; background: var(--navy);
  border: 0; border-radius: var(--radius); cursor: pointer; touch-action: manipulation;
  transition: background-color .15s var(--ease), opacity .15s var(--ease);
}
.btn:active { background: #141b3c; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); margin-top: 16px; }
.btn.ghost:active { background: var(--paper); }

.error { margin-top: 12px; color: var(--danger); font-weight: 500; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* QR ticket */
.ticket {
  position: relative; margin: 8px 0 0; padding: 24px 20px 20px; text-align: center;
  background: var(--paper); border-radius: var(--radius); border-top: 6px solid var(--magenta);
  animation: rise .35s var(--ease);
}
.ticket::before, .ticket::after {
  content: ''; position: absolute; top: 58%; width: 24px; height: 24px; border-radius: 50%; background: var(--bg);
}
.ticket::before { left: -12px; }
.ticket::after { right: -12px; }
.qr { display: inline-block; padding: 12px; background: #fff; border-radius: 10px; line-height: 0; }
.qr canvas, .qr img { display: block; }
.ticket .who { margin: 20px 0 2px; font-size: 20px; font-weight: 700; }
.ticket .meta { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.hint { margin-top: 16px; font-size: 14px; color: var(--muted); text-align: center; }

.center { padding-top: 64px; text-align: center; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
