:root {
  --wool: #f26a1b;
  --wool-deep: #c4510e;
  --wool-shade: #e05e12;
  --ink: #14213a;
  --ink-soft: #4a5872;
  --snow: #ffffff;
  --mist: #eef2f6;
  --line: #d3dbe6;
  --ok: #1d7a4c;
  --bad: #b3261e;
  --display: "Anybody", "Arial Black", system-ui, sans-serif;
  --text: "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2f8;
    --ink-soft: #a9b6cc;
    --snow: #17223a;
    --mist: #0e1626;
    --line: #2a3854;
    --ok: #4cc28a;
    --bad: #ff8a80;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--text);
}
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* Navy podium voor de oranje muts; oranje leeft alleen in de geribde boordstrook en het prijslabel */
.cuff {
  --stage: #14213a;
  --stage-text: #dde3ee;
  color: #fff;
  background: var(--stage);
  padding: 0 var(--gutter);
}
.cuff::before {
  content: ""; display: block; height: 14px;
  margin: 0 calc(-1 * var(--gutter));
  background: repeating-linear-gradient(90deg,
    #f26a1b 0 7px, #d4560f 7px 9px, #f8904f 9px 11px, #f26a1b 11px 14px);
}
.cuff :focus-visible { outline-color: #fff; }

.bar {
  max-width: 960px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0;
}
.club { font: 800 1.05rem/1 var(--display); font-stretch: 125%; letter-spacing: .01em; }
.team { font-weight: 500; color: #f9a46d; margin-left: 4px; }

.who {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 16px;
  border: 2px solid var(--wool); border-radius: 999px;
  background: var(--wool); color: #14213a;
  font-weight: 700; cursor: pointer;
}
.who.is-set { background: transparent; border-color: rgba(255,255,255,.55); color: #fff; }
.who.is-set::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--wool);
}
.who.nudge { animation: nudge .5s ease 2; }
@keyframes nudge { 50% { transform: scale(1.08); } }

.hero {
  max-width: 960px; margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "title hat" "info hat";
  align-items: center; column-gap: 24px;
  padding: 8px 0 44px;
}
.hero > * { min-width: 0; }
.hero-text { display: contents; }
h1 {
  grid-area: title; align-self: end;
  margin: 0 0 16px;
  font: 900 clamp(2.4rem, 7.4vw, 4.6rem)/.92 var(--display);
  font-stretch: 125%;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.hero-info { grid-area: info; align-self: start; }
.price { margin: 0 0 12px; font-size: 1.1rem; color: var(--stage-text); }
.euro {
  font: 900 2.2rem/1 var(--display); font-stretch: 110%;
  background: #f26a1b; color: #14213a;
  padding: 2px 10px 4px; border-radius: 6px; margin-right: 6px;
  display: inline-block; transform: rotate(-3deg);
}
.lede { margin: 0; max-width: 36ch; color: var(--stage-text); }

/* Voorraad: hoeveel van de gebreide oplage er nog is */
.stock { margin: 0 0 14px; max-width: 260px; }
.stock p { margin: 0 0 6px; color: var(--stage-text); font-size: .98rem; }
.stock strong { font: 900 1.25rem/1 var(--display); font-stretch: 110%; color: #fff; font-variant-numeric: tabular-nums; }
.stock-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.16); overflow: hidden; }
.stock-bar > span { display: block; height: 100%; background: #f26a1b; border-radius: 3px; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.hat {
  grid-area: hat;
  width: clamp(150px, 34vw, 320px); height: auto;
  filter: drop-shadow(0 16px 20px rgba(0,0,0,.5));
}

@media (max-width: 520px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 46%;
    grid-template-areas: "title title" "info hat";
    align-items: end; column-gap: 8px;
    padding-bottom: 36px;
  }
  h1 { font-size: clamp(2.3rem, 12vw, 3.3rem); font-stretch: 118%; margin-bottom: 4px; }
  .hat { width: 100%; justify-self: end; margin-right: -6px; }
  .hero-info { align-self: center; }
  .lede { font-size: 1rem; }
  /* Zodra een speler gekozen is, kent die het verhaal al: korter, zodat de betaalknop hoger komt */
  .has-seller .lede { display: none; }
  .has-seller .hero {
    grid-template-columns: minmax(0, 1fr) 40%;
    grid-template-areas: "title hat" "info hat";
    padding-bottom: 26px;
  }
  .has-seller h1 { font-size: clamp(1.9rem, 9.4vw, 2.6rem); font-stretch: 112%; margin-bottom: 12px; }
  .has-seller .hero-info { align-self: start; }
  .has-seller .price { margin: 0 0 10px; }
  .has-seller .stock { margin: 0; }
  .stock p { font-size: .9rem; }
}

main { padding: 0 var(--gutter); }

.order {
  position: relative;
  max-width: 560px; margin: -14px auto 0;
  background: var(--snow);
  border-radius: 18px 18px 14px 14px;
  padding: 24px 20px 26px;
  border: 1px solid var(--line);
}
@media (min-width: 900px) {
  .order { margin-top: 32px; }
}

h2 { font: 800 1.45rem/1.15 var(--display); font-stretch: 112%; margin: 0 0 14px; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset:disabled { display: none; }

.seller-line { font-weight: 600; }
.seller-line strong { color: var(--wool-deep); font-weight: 900; }
@media (prefers-color-scheme: dark) { .seller-line strong { color: var(--wool); } }

.qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 20px; }
.qty-label { font-weight: 700; }
.stepper { display: flex; align-items: center; gap: 4px; }
.step {
  width: 52px; height: 52px; border-radius: 50%;
  border: 2px solid var(--ink); background: transparent;
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.step:disabled { border-color: var(--line); color: var(--ink-soft); cursor: not-allowed; }
#qty {
  min-width: 2.2ch; text-align: center;
  font: 900 3.2rem/1 var(--display); font-stretch: 120%;
  font-variant-numeric: tabular-nums;
}

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 700; margin-bottom: 6px; }
.field input {
  width: 100%; min-height: 50px; padding: 10px 14px;
  border: 2px solid var(--line); border-radius: 10px;
  background: var(--mist);
}
.field input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(242,106,27,.45); }
.field small { display: block; color: var(--ink-soft); margin-top: 4px; font-size: .9rem; }

.total {
  display: flex; align-items: baseline; justify-content: space-between;
  border-top: 2px dashed var(--line); padding-top: 14px; margin: 6px 0 16px;
  font-weight: 700;
}
.total strong { font: 900 2rem/1 var(--display); font-stretch: 115%; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 56px; padding: 12px 18px;
  border: 0; border-radius: 12px;
  font-weight: 700; font-size: 1.1rem; text-decoration: none; cursor: pointer;
}
.btn-pay { background: #cc0066; color: #fff; box-shadow: 0 6px 14px rgba(20,33,58,.22); }
.btn-pay:active { transform: translateY(1px); box-shadow: 0 2px 6px rgba(20,33,58,.22); }
.btn-pay[aria-busy="true"] { opacity: .7; cursor: progress; }
.btn-ink { background: var(--ink); color: var(--snow); }
.btn-ghost { background: transparent; border: 2px solid var(--line); margin-top: 10px; }

.fineprint { color: var(--ink-soft); font-size: .9rem; margin: 12px 0 0; }
.error { color: var(--bad); font-weight: 700; margin: 0 0 12px; }

/* Slot: zonder speler geen formulier */
.soldout p { margin: 0; color: var(--ink-soft); }
.order.is-soldout #orderForm { display: none; }
.locked { display: none; }
.order.is-locked .locked { display: block; }
.locked p { margin: 0 0 18px; color: var(--ink-soft); }

.done:focus { outline: none; }
.done h2 { margin-bottom: 8px; }
.done-lead { margin: 0 0 16px; }

/* Betaalkaart: QR altijd donker op wit, ook in donkere modus, zodat elke camera hem leest */
.pay-card {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center;
  padding: 18px; border-radius: 14px;
  background: #fff; color: #14213a;
  border: 2px solid #14213a;
}
.qr { width: 132px; aspect-ratio: 1; }
.qr svg { display: block; width: 100%; height: 100%; }
.qr svg path, .qr svg rect[fill="black"] { fill: #14213a; }
.pay-facts { margin: 0; display: grid; gap: 12px; }
.pay-facts dt { font-size: .9rem; color: #4a5872; }
.pay-facts dd { margin: 0; font: 900 1.5rem/1.1 var(--display); font-stretch: 110%; overflow-wrap: anywhere; }
@media (max-width: 360px) {
  .pay-card { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .qr { width: 180px; }
}
.pay-here {
  display: inline-block; margin: 12px 0 0; padding: 10px 0;
  color: var(--ink); font-weight: 700;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
  text-decoration-color: #cc0066;
}

.paid-check {
  margin-top: 18px; padding-top: 18px;
  border-top: 2px dashed var(--line);
}
.paid-check h3 { font: 800 1.3rem/1.15 var(--display); font-stretch: 112%; margin: 0 0 4px; }
.paid-check p { margin: 0 0 14px; color: var(--ink-soft); }
.paid-check .btn:disabled { opacity: .6; cursor: progress; }
.back-link {
  display: block; margin: 18px auto 0; padding: 10px 8px; min-height: 44px;
  background: none; border: 0; cursor: pointer;
  color: var(--ink-soft); font-size: .92rem;
  text-decoration: underline; text-underline-offset: 3px;
}
.back-link:disabled { cursor: progress; }
.paid-check .error { margin: 12px 0 0; }

.notice {
  margin: 0 0 16px; padding: 10px 14px; border-radius: 10px;
  background: #d6f0e2; color: #145a37; font-weight: 700;
  transition: opacity .4s ease-out;
}
.notice.is-fading { opacity: 0; }

.foot { max-width: 560px; margin: 0 auto; padding: 22px var(--gutter) 40px; color: var(--ink-soft); font-size: .95rem; }

/* Naamkiezer */
dialog {
  width: min(560px, calc(100% - 2 * var(--gutter)));
  border: 0; border-radius: 18px; padding: 0;
  background: var(--snow); color: var(--ink);
}
dialog::backdrop { background: rgba(20,33,58,.6); }
.picker-inner { padding: 22px 18px 18px; }
.picker-inner p { margin: 0 0 16px; color: var(--ink-soft); }
.names { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.names button {
  min-height: 54px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--line); background: var(--mist);
  font: 800 1.1rem var(--display); font-stretch: 110%;
}
.names button[aria-pressed="true"] { background: var(--wool); border-color: var(--wool); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
