/* PadelDraw by The Bullet */

:root {
  --teal: #25A8B7;
  --teal-dark: #227079;
  --teal-light: #7FDCE6;
  --black: #000000;
  --white: #FFFFFF;
  --ball: #DFF24A;
  --danger: #ff6b6b;

  --bg: #031113;
  --bg-2: #062428;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.12);
  --text: #F2FBFC;
  --muted: rgba(242, 251, 252, 0.66);

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --glow: 0 0 0 1px rgba(37, 168, 183, 0.35), 0 18px 50px -12px rgba(37, 168, 183, 0.55);

  --font-display: 'Unica One', 'Arial Narrow', sans-serif;
  --font-body: 'Karla', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-type: 'Special Elite', 'Courier New', monospace;

  --gutter: 16px;
  --max: 1120px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--teal-light); }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--ball); outline-offset: 3px; border-radius: 10px; }

/* ---------- achtergrond ---------- */

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; }
.bg-glow-1 { width: 70vmax; height: 70vmax; left: -25vmax; top: -30vmax; background: radial-gradient(circle, var(--teal-dark), transparent 65%); animation: float 18s ease-in-out infinite alternate; }
.bg-glow-2 { width: 60vmax; height: 60vmax; right: -25vmax; bottom: -30vmax; background: radial-gradient(circle, rgba(37,168,183,.55), transparent 65%); animation: float 22s ease-in-out infinite alternate-reverse; }
.bg-lines {
  position: absolute; inset: -2px;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.035) calc(50% - 1px), rgba(255,255,255,.035) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(transparent calc(30% - 1px), rgba(255,255,255,.03) calc(30% - 1px), rgba(255,255,255,.03) calc(30% + 1px), transparent calc(30% + 1px)),
    linear-gradient(transparent calc(70% - 1px), rgba(255,255,255,.03) calc(70% - 1px), rgba(255,255,255,.03) calc(70% + 1px), transparent calc(70% + 1px));
}
@keyframes float { to { transform: translate(6vmax, 4vmax) scale(1.08); } }

/* ---------- topbar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px;
  background: linear-gradient(to bottom, rgba(3,17,19,.92), rgba(3,17,19,.6));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-ball {
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--teal-light), var(--teal) 50%, var(--teal-dark));
  box-shadow: inset -3px -4px 8px rgba(0,0,0,.25), 0 0 16px rgba(37,168,183,.5);
  position: relative;
  animation: brandspin 8s linear infinite;
}
.brand-ball::before, .brand-ball::after {
  content: ''; position: absolute; top: 18%; bottom: 18%; width: 40%;
  border: 2px solid rgba(255,255,255,.9); border-radius: 50%;
}
.brand-ball::before { left: -18%; border-left-color: transparent; border-top-color: transparent; border-bottom-color: transparent; }
.brand-ball::after { right: -18%; border-right-color: transparent; border-top-color: transparent; border-bottom-color: transparent; }
@keyframes brandspin { to { transform: rotate(360deg); } }
.brand-name { font-family: var(--font-display); font-size: 26px; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.brand-name b { color: var(--teal); font-weight: 400; }

.by { display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 0 12px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.15); text-decoration: none; transition: opacity .2s; }
.by:hover { opacity: .85; }
.by-text { font-family: var(--font-type); font-size: 13px; color: var(--muted); }
.by img { display: block; height: 30px; width: auto; filter: brightness(1.15); }
@media (min-width: 720px) { .by img { height: 36px; } }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  cursor: pointer; transition: background .2s, transform .15s, border-color .2s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: var(--surface-2); border-color: rgba(37,168,183,.5); }
.icon-btn:active { transform: scale(.92); }
.icon-btn-sm { width: 38px; height: 38px; }
.icon-btn-sm svg { width: 18px; height: 18px; }

/* ---------- layout ---------- */

main.view {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px var(--gutter) 40px;
  outline: none;
}
main.view.enter > * { animation: rise .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

.footer { text-align: center; padding: 18px var(--gutter) calc(22px + env(safe-area-inset-bottom)); color: var(--muted); font-size: 14px; }
.footer a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--teal); }

.eyebrow {
  margin: 0 0 6px;
  font-family: var(--font-type);
  font-size: 14px; letter-spacing: .06em;
  color: var(--teal-light);
  text-transform: lowercase;
}
.page-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 8vw, 56px);
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  letter-spacing: .05em; font-size: 26px; margin: 0 0 14px;
  display: flex; align-items: center; gap: 12px;
}
.section-title::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, var(--teal), transparent); }
.muted { color: var(--muted); margin: 6px 0 0; }
.label { display: block; font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }

.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 700; margin-bottom: 14px; }
.back-link svg { width: 20px; height: 20px; }
.back-link:hover { color: var(--text); }

/* ---------- knoppen ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--font-display); font-size: 20px; letter-spacing: .06em; text-transform: uppercase; line-height: 1;
  text-decoration: none; color: var(--text);
  transition: transform .15s, box-shadow .25s, background .25s, filter .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:active { transform: scale(.96); }
.btn-primary {
  background: linear-gradient(135deg, var(--teal) 0%, #1f93a1 55%, var(--teal-dark) 100%);
  color: var(--white);
  box-shadow: var(--glow);
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 0 0 1px rgba(127,220,230,.6), 0 20px 60px -10px rgba(37,168,183,.75); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(37,168,183,.55); }
.btn-ghost-danger:hover { border-color: rgba(255,107,107,.7); color: #ffd1d1; }
.btn-danger { background: #c94848; color: #fff; }
.btn-danger:hover { background: #d95656; }
.btn-xl { min-height: 62px; padding: 16px 30px; font-size: 25px; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 17px; }
.btn-sm svg { width: 18px; height: 18px; }
.btn-block { width: 100%; }

/* ---------- home ---------- */

.hero { text-align: center; padding: 10px 0 34px; }
.hero-ball { position: relative; width: 150px; height: 170px; margin: 0 auto 10px; }
.ball-3d {
  position: absolute; left: 15px; top: 0; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #b8f1f6 0%, var(--teal-light) 14%, var(--teal) 48%, var(--teal-dark) 100%);
  box-shadow: inset -10px -14px 26px rgba(0,0,0,.3), 0 0 50px rgba(37,168,183,.55);
  animation: bounce 1.6s cubic-bezier(.45,0,.55,1) infinite;
}
.ball-3d .seam { position: absolute; inset: 0; width: 100%; height: 100%; animation: brandspin 3.2s linear infinite; }
.seam path { fill: none; stroke: rgba(255,255,255,.92); stroke-width: 3.2; stroke-linecap: round; }
.hero-shadow {
  position: absolute; left: 35px; bottom: 6px; width: 80px; height: 14px; border-radius: 50%;
  background: radial-gradient(rgba(0,0,0,.6), transparent 70%);
  animation: shadow 1.6s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes bounce { 0%,100% { transform: translateY(0) scale(1.04, .96); } 12% { transform: translateY(-4px) scale(1); } 50% { transform: translateY(-36px); } 88% { transform: translateY(-4px); } }
@keyframes shadow { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(.6); opacity: .4; } }

.hero-title {
  margin: 0 auto 14px; max-width: 14ch;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(44px, 12vw, 88px); line-height: .92; letter-spacing: .01em;
}
.hero-title span {
  display: block; margin-top: 8px;
  font-size: .5em;
  background: linear-gradient(90deg, var(--teal-light), var(--teal), var(--teal-light));
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 4s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }
.lead { max-width: 34em; margin: 0 auto 26px; color: var(--muted); font-size: 18px; }

.steps { list-style: none; padding: 0; margin: 30px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 620px; }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); line-height: 1.3; }
.steps b {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--teal); font-family: var(--font-display); font-size: 22px; font-weight: 400; color: var(--text);
}

.day-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.day-card {
  display: grid; grid-template-columns: auto 1fr; gap: 14px 16px; align-items: start;
  padding: 16px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(37,168,183,.12), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise .5s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: calc(var(--i) * 60ms + 150ms);
}
.day-date {
  width: 62px; height: 68px; border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--teal-dark); border: 1px solid rgba(127,220,230,.35);
}
.day-num { font-family: var(--font-display); font-size: 32px; line-height: 1; }
.day-month { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--teal-light); font-weight: 700; }
.day-info p { margin: 0; }
.day-when { font-weight: 700; text-transform: capitalize; }
.day-org { font-family: var(--font-display); font-size: 24px; line-height: 1.1; text-transform: uppercase; letter-spacing: .03em; }
.day-meta { color: var(--muted); font-size: 15px; margin-bottom: 8px !important; }
.day-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.day-tools { display: flex; gap: 8px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.badge-done { background: rgba(37,168,183,.2); color: var(--teal-light); }
.badge-live { background: rgba(223,242,74,.16); color: var(--ball); }
.badge-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ball); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }

.empty { text-align: center; padding: 34px 20px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty.big { margin-top: 40px; border: 0; }
.empty-title { font-family: var(--font-display); font-size: 28px; text-transform: uppercase; color: var(--text); margin: 0 0 6px; }
.empty .btn { margin-top: 14px; }

/* ---------- formulier ---------- */

.setup { max-width: 640px; margin: 0 auto; }
.form { margin-top: 22px; display: grid; gap: 22px; }
.form.shake { animation: shake .4s; }
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
.field { display: block; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input {
  width: 100%; min-height: 54px; padding: 12px 16px;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: rgba(0,0,0,.35); color: var(--text);
  font: inherit; font-size: 18px;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: rgba(242,251,252,.4); }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(37,168,183,.25); }
.input.invalid { border-color: var(--danger); }
.input-sm { min-height: 46px; font-size: 16px; padding: 10px 12px; }
input[type="date"].input, input[type="time"].input { -webkit-appearance: none; appearance: none; }
::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.7); }
.hint { display: block; margin-top: 8px; color: var(--teal-light); font-weight: 700; }
.error { display: block; color: var(--danger); font-weight: 700; font-size: 15px; }
.error:empty { display: none; }

.stepper { display: flex; align-items: center; gap: 12px; }
.step-btn {
  flex: none; width: 60px; height: 60px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
  display: grid; place-items: center; transition: transform .12s, background .2s, border-color .2s;
}
.step-btn svg { width: 26px; height: 26px; }
.step-btn:hover { border-color: var(--teal); background: rgba(37,168,183,.15); }
.step-btn:active { transform: scale(.9); }
.stepper-input {
  flex: 1; min-width: 0; height: 76px; text-align: center;
  border-radius: 20px; border: 1.5px solid var(--line); background: rgba(0,0,0,.35); color: var(--text);
  font-family: var(--font-display); font-size: 52px; line-height: 1;
  -moz-appearance: textfield;
}
.stepper-input::-webkit-outer-spin-button, .stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(37,168,183,.25); }
.stepper-input.invalid { border-color: var(--danger); }
.stepper-input.bump { animation: bump .3s; }
@keyframes bump { 40% { transform: scale(1.08); } }

.courts-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mini-court {
  width: 34px; height: 22px; border-radius: 4px;
  background: linear-gradient(90deg, var(--teal-dark), var(--teal));
  border: 1.5px solid rgba(255,255,255,.7); position: relative;
  animation: pop .35s cubic-bezier(.3,1.6,.5,1) both; animation-delay: calc(var(--i) * 30ms);
}
.mini-court i { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: #fff; }
@keyframes pop { from { transform: scale(0); opacity: 0; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt {
  min-width: 54px; min-height: 48px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface);
  font-family: var(--font-display); font-size: 20px; letter-spacing: .04em; text-transform: uppercase;
  transition: all .2s;
}
.chip-opt:hover { border-color: rgba(37,168,183,.6); }
.chip-opt.active { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 8px 24px -8px rgba(37,168,183,.8); transform: translateY(-1px); }

.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; }
.switch em { font-style: normal; color: var(--muted); font-weight: 400; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { flex: none; width: 54px; height: 32px; border-radius: 999px; background: var(--surface-2); border: 1.5px solid var(--line); position: relative; transition: background .2s; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.switch input:checked + .switch-track { background: var(--teal); border-color: var(--teal); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(22px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--ball); outline-offset: 3px; }

.names { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.name-field { display: flex; align-items: center; gap: 8px; }
.name-field span { flex: none; width: 26px; text-align: right; font-family: var(--font-display); font-size: 20px; color: var(--teal-light); }

.summary { display: flex; flex-wrap: wrap; gap: 8px; }
.summary:empty { display: none; }
.summary span { padding: 8px 14px; border-radius: 12px; background: rgba(37,168,183,.12); border: 1px solid rgba(37,168,183,.3); font-size: 15px; }
.summary b { font-family: var(--font-display); font-weight: 400; font-size: 20px; margin-right: 2px; }

/* ---------- trekking ---------- */

.draw-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.counter { position: relative; flex: none; width: 96px; height: 96px; }
.counter svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.counter-bg { fill: rgba(0,0,0,.3); stroke: rgba(255,255,255,.1); stroke-width: 7; }
.counter-fg { fill: none; stroke: var(--teal); stroke-width: 7; stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.3,1.3,.5,1); filter: drop-shadow(0 0 6px rgba(37,168,183,.8)); }
.counter-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.counter-text b { font-family: var(--font-display); font-weight: 400; font-size: 36px; }
.counter-text span { font-size: 13px; color: var(--muted); font-weight: 700; }

.who { margin-top: 20px; }
.who-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.who-chip {
  padding: 10px 16px; min-height: 46px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 16px;
  transition: all .2s; animation: pop .3s both;
}
.who-chip:hover { border-color: var(--teal); }
.who-chip.active { background: var(--white); color: var(--black); border-color: var(--white); transform: scale(1.05); box-shadow: 0 8px 26px -6px rgba(255,255,255,.5); }

.stage { display: flex; flex-direction: column; align-items: center; padding: 30px 0 6px; }
.ball-btn {
  --size: min(64vw, 38vh, 300px);
  position: relative; width: var(--size); height: var(--size);
  border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ball-btn:focus-visible { outline-offset: 10px; border-radius: 50%; }
.ball {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%, #c9f5f9 0%, var(--teal-light) 13%, var(--teal) 46%, var(--teal-dark) 88%, #164c52 100%);
  box-shadow: inset -18px -24px 50px rgba(0,0,0,.35), inset 10px 12px 30px rgba(255,255,255,.18), 0 30px 70px -20px rgba(37,168,183,.9);
  transition: transform .2s cubic-bezier(.3,1.5,.5,1);
  animation: breathe 2.4s ease-in-out infinite;
}
.ball .seam { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .95; transition: transform .3s; }
.ball .seam path { stroke-width: 2.6; }
.ball-btn:hover .ball { transform: scale(1.03); }
.ball-btn:active .ball { transform: scale(.93); }
@keyframes breathe { 50% { transform: scale(1.035); } }

.ball-orbit {
  position: absolute; inset: -16px; border-radius: 50%;
  border: 2px dashed rgba(127,220,230,.45);
  animation: brandspin 14s linear infinite;
}
.ball-pulse { position: absolute; inset: 0; border-radius: 50%; }
.ball-pulse::before, .ball-pulse::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid rgba(37,168,183,.7);
  animation: ripple 2.4s cubic-bezier(.2,.6,.3,1) infinite;
}
.ball-pulse::after { animation-delay: 1.2s; }
@keyframes ripple { from { transform: scale(1); opacity: .8; } to { transform: scale(1.45); opacity: 0; } }

.ball-face { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; line-height: .9; text-shadow: 0 4px 18px rgba(0,0,0,.35); }
.ball-who {
  font-family: var(--font-display); font-size: calc(var(--size) * .085); letter-spacing: .08em; text-transform: uppercase;
  padding: .25em .7em; margin-bottom: .35em; border-radius: 999px;
  background: rgba(0,0,0,.28); border: 1.5px solid rgba(255,255,255,.55);
  animation: pop .35s cubic-bezier(.3,1.6,.5,1) both;
}
.ball-label { font-family: var(--font-display); font-size: calc(var(--size) * .3); text-transform: uppercase; letter-spacing: .04em; }
.ball-sub { font-family: var(--font-type); font-size: calc(var(--size) * .075); margin-top: 6px; opacity: .95; }
.ball-number { font-family: var(--font-display); font-size: calc(var(--size) * .48); line-height: 1; display: block; }
.ball-number.roll { animation: roll .09s ease-out; }
.ball-number.landed { animation: land .6s cubic-bezier(.3,1.8,.5,1); color: #fff; text-shadow: 0 0 30px rgba(255,255,255,.7), 0 4px 18px rgba(0,0,0,.4); }
@keyframes roll { from { transform: translateY(-30%) scale(.85); opacity: .3; } }
@keyframes land { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

.ball-btn.spinning .ball { animation: wobble .18s linear infinite; }
.ball-btn.spinning .seam { animation: brandspin .5s linear infinite; }
.ball-btn.spinning .ball-orbit { animation-duration: 1.2s; border-color: var(--ball); }
.ball-btn.spinning .ball-pulse::before, .ball-btn.spinning .ball-pulse::after { animation-duration: .7s; border-color: var(--ball); }
.ball-btn.landed .ball { animation: none; box-shadow: inset -18px -24px 50px rgba(0,0,0,.35), 0 0 0 8px rgba(223,242,74,.5), 0 0 90px rgba(223,242,74,.6); }
@keyframes wobble { 0%,100% { transform: rotate(-3deg) scale(1.02); } 50% { transform: rotate(3deg) scale(.99); } }

.ball-btn:disabled { cursor: default; }
.ball-btn.waiting .ball { filter: saturate(.4) brightness(.7); animation: none; }
.ball-btn.waiting .ball-pulse { display: none; }

.tap-hint { margin: 24px 0 0; text-align: center; font-family: var(--font-type); font-size: 17px; color: var(--muted); min-height: 2.6em; max-width: 28em; }

.board-wrap { margin-top: 10px; padding: 16px; border-radius: var(--radius); background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.board-label span { color: var(--teal-light); text-transform: none; letter-spacing: 0; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.num {
  position: relative; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  border: 2px solid rgba(37,168,183,.55); background: rgba(37,168,183,.08);
  font-family: var(--font-display); font-size: 22px;
  transition: transform .12s, background .12s, border-color .12s, opacity .3s;
}
.num svg { position: absolute; width: 50%; height: 50%; opacity: 0; color: var(--teal-light); }
.num.taken { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
.num.taken b { opacity: .22; }
.num.taken svg { opacity: .85; }
.num.hot { background: var(--ball); border-color: var(--ball); color: var(--black); transform: scale(1.2); box-shadow: 0 0 24px rgba(223,242,74,.75); z-index: 1; }
.num.hot svg { opacity: 0; }
.num.win { background: var(--white); border-color: var(--white); color: var(--black); animation: winpop .6s cubic-bezier(.3,1.8,.5,1); box-shadow: 0 0 30px rgba(255,255,255,.7); z-index: 1; }
.num.win b { opacity: 1; }
.num.win svg { opacity: 0; }
@keyframes winpop { 0% { transform: scale(.5); } 60% { transform: scale(1.45); } 100% { transform: scale(1.15); } }

/* ---------- modal ---------- */

#modal-root { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--gutter); pointer-events: none; }
#modal-root.open { pointer-events: auto; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,6,8,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s; }
#modal-root.open .modal-backdrop { opacity: 1; }
.modal {
  position: relative; width: 100%; max-width: 440px;
  padding: 26px 22px 22px; border-radius: 28px;
  background: linear-gradient(170deg, #0b3a40, #061f23 60%);
  border: 1px solid rgba(127,220,230,.25);
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.04);
  transform: translateY(30px) scale(.94); opacity: 0;
  transition: transform .35s cubic-bezier(.3,1.4,.5,1), opacity .25s;
}
#modal-root.open .modal { transform: none; opacity: 1; }
.modal-title { margin: 0 0 8px; font-family: var(--font-display); font-weight: 400; font-size: 32px; text-transform: uppercase; line-height: 1; }
.modal-body p { margin: 0 0 8px; color: var(--muted); }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1 1 auto; }
.share-input { font-size: 14px; }

.modal.result { text-align: center; padding-top: 30px; }
.result-kicker { font-family: var(--font-type); font-size: 20px; color: var(--text) !important; margin: 0 !important; }
.result-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.result-ball {
  position: relative; width: 210px; height: 210px; margin: 16px auto 12px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 32% 26%, #ffffff 0%, #f1fbfc 40%, #cfeff2 100%);
  box-shadow: inset -14px -18px 36px rgba(0,0,0,.18), 0 0 0 8px rgba(37,168,183,.35), 0 0 80px rgba(37,168,183,.7);
  animation: resultIn .7s cubic-bezier(.3,1.7,.5,1) both;
}
.result-ball .seam { position: absolute; inset: 0; width: 100%; height: 100%; }
.result-ball .seam path { stroke: var(--teal); stroke-width: 2.4; opacity: .55; }
.result-ball span { position: relative; font-family: var(--font-display); font-size: 120px; line-height: 1; color: var(--teal-dark); }
@keyframes resultIn { 0% { transform: scale(.2) rotate(-200deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.result-note { font-size: 17px; }
.result-count { font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-light) !important; }

/* ---------- verwerking ---------- */

.processing { max-width: 560px; margin: 0 auto; text-align: center; padding-top: 10px; }
.proc-court {
  position: relative; height: 220px; margin: 0 auto 26px; border-radius: 18px; overflow: hidden;
  background: linear-gradient(90deg, var(--teal-dark), var(--teal) 50%, var(--teal-dark));
  border: 3px solid rgba(255,255,255,.85);
  box-shadow: var(--shadow), 0 0 60px rgba(37,168,183,.35);
}
.proc-court::before, .proc-court::after { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.7); }
.proc-court::before { left: 22%; }
.proc-court::after { right: 22%; }
.proc-net { position: absolute; left: 50%; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: repeating-linear-gradient(#fff 0 6px, rgba(255,255,255,.3) 6px 10px); z-index: 1; }
.proc-ball {
  position: absolute; width: 26px; height: 26px; border-radius: 50%; top: 50%; left: 10%; z-index: 3;
  background: radial-gradient(circle at 35% 30%, #fff, var(--ball) 55%, #a9bb22);
  box-shadow: 0 0 20px rgba(223,242,74,.8);
  animation: rally 1.1s cubic-bezier(.45,0,.55,1) infinite alternate;
}
@keyframes rally {
  0% { transform: translate(0, -40px); }
  50% { transform: translate(min(37vw, 230px), -90px) scale(1.15); }
  100% { transform: translate(min(74vw, 440px), 30px); }
}
.proc-num {
  position: absolute; left: var(--x); top: var(--y); z-index: 2;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; color: var(--teal-dark);
  font-family: var(--font-display); font-size: 18px;
  animation: shuffle 1.4s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -170ms);
  opacity: .9;
}
@keyframes shuffle {
  0% { transform: translate(0,0) scale(.9); }
  33% { transform: translate(40px, -24px) scale(1.05); }
  66% { transform: translate(-30px, 20px) scale(.95); }
  100% { transform: translate(10px, 30px) scale(1); }
}
.proc-steps { list-style: none; padding: 0; margin: 22px auto; display: grid; gap: 10px; max-width: 320px; text-align: left; }
.proc-steps li { display: flex; align-items: center; gap: 12px; font-size: 19px; color: rgba(242,251,252,.35); transition: color .3s; }
.proc-steps li svg { width: 26px; height: 26px; flex: none; padding: 4px; border-radius: 50%; border: 2px solid currentColor; color: transparent; transition: all .3s; }
.proc-steps li.active { color: var(--text); }
.proc-steps li.active svg { border-color: var(--teal); border-top-color: transparent; animation: brandspin .7s linear infinite; }
.proc-steps li.done { color: var(--text); }
.proc-steps li.done svg { color: #fff; background: var(--teal); border-color: var(--teal); }
.proc-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; max-width: 360px; margin: 0 auto; }
.proc-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--ball)); transition: width .6s cubic-bezier(.3,1,.5,1); }

/* ---------- overzicht ---------- */

.ov-head { display: flex; flex-direction: column; gap: 16px; }
.ov-meta { margin: 8px 0 0; color: var(--muted); }
.ov-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.finder { margin: 22px 0 8px; padding: 14px 16px; border-radius: var(--radius); background: rgba(0,0,0,.28); border: 1px solid var(--line); }
.finder-nums { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.fn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid rgba(37,168,183,.5); background: transparent;
  font-family: var(--font-display); font-size: 20px; transition: all .2s;
}
.fn:hover { background: rgba(37,168,183,.15); }
.fn.active { background: var(--ball); border-color: var(--ball); color: var(--black); transform: scale(1.08); }
.finder-result { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 15px; color: var(--muted); }
.finder-result:empty { display: none; }
.finder-result strong { width: 100%; color: var(--text); font-family: var(--font-display); font-weight: 400; font-size: 22px; text-transform: uppercase; letter-spacing: .03em; }
.finder-result b { color: var(--ball); }

.rotations { display: grid; gap: 18px; margin-top: 18px; }
.rotation {
  padding: 16px; border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(37,168,183,.13), rgba(255,255,255,.025) 60%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.rotation.live { border-color: rgba(223,242,74,.6); box-shadow: 0 0 0 1px rgba(223,242,74,.35), 0 20px 60px -20px rgba(223,242,74,.35); }
.rotation-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 12px; }
.rotation-head h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; text-transform: uppercase; }
.rotation-head h2 span { color: var(--teal-light); }
.rotation-time { margin: 0; font-family: var(--font-display); font-size: 24px; letter-spacing: .04em; text-transform: uppercase; }
.rotation-head .badge { align-self: center; }

.courts { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.court-label { margin: 0 0 6px; font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.court-field {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch;
  border-radius: 14px; overflow: hidden;
  background: linear-gradient(90deg, #1d6870, var(--teal) 50%, #1d6870);
  border: 2.5px solid rgba(255,255,255,.88);
  min-height: 118px;
}
.court-field::before, .court-field::after { content: ''; position: absolute; top: 0; bottom: 0; width: 1.5px; background: rgba(255,255,255,.55); }
.court-field::before { left: 26%; }
.court-field::after { right: 26%; }
.side { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; padding: 10px 6px; }
.net { position: relative; z-index: 1; width: 34px; display: grid; place-items: center; }
.net::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: repeating-linear-gradient(#fff 0 5px, rgba(255,255,255,.35) 5px 9px); }
.net span { position: relative; padding: 4px 3px; background: var(--teal-dark); border-radius: 8px; font-family: var(--font-display); font-size: 16px; text-transform: uppercase; border: 1.5px solid rgba(255,255,255,.8); }

.p { display: flex; align-items: center; gap: 8px; max-width: 100%; transition: opacity .25s, transform .25s; }
.p b {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff, #e8f8fa 60%, #c7ecef);
  color: var(--teal-dark); font-family: var(--font-display); font-weight: 400; font-size: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.p small { font-size: 14px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 9ch; }

.overview.focusing .court:not(.has-match) { opacity: .35; }
.overview.focusing .p:not(.match) { opacity: .55; }
.overview.focusing .p.match { transform: scale(1.08); }
.p.match b { background: var(--ball); color: var(--black); box-shadow: 0 0 0 4px rgba(223,242,74,.35), 0 0 24px rgba(223,242,74,.8); }
.court { transition: opacity .25s; }

.overview.reveal .rotation { animation: rise .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--r) * 160ms + 100ms); }
.overview.reveal .court { animation: courtIn .55s cubic-bezier(.3,1.4,.5,1) both; animation-delay: calc(var(--i) * 70ms + 300ms); }
@keyframes courtIn { from { opacity: 0; transform: scale(.85) translateY(14px); } }

.tv-exit { display: none; }

/* ---------- toast ---------- */

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 999px;
  background: var(--white); color: var(--black); font-weight: 800; box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.3,1.4,.5,1), opacity .25s;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

/* ---------- groter scherm ---------- */

@media (min-width: 720px) {
  body { font-size: 18px; }
  main.view { padding-top: 34px; }
  .day-list { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); }
  .day-card { grid-template-columns: auto 1fr auto; align-items: center; }
  .day-actions { grid-column: auto; flex-direction: column; align-items: flex-end; }
  .ov-head { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .ov-actions { justify-content: flex-end; max-width: 420px; }
  .finder-nums { flex-wrap: wrap; overflow: visible; }
  .draw { max-width: 900px; margin: 0 auto; }
  .stage { padding-top: 40px; }
}

@media (min-width: 1000px) {
  .rotations { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- clubscherm ---------- */

body.tv .topbar, body.tv .footer, body.tv .back-link, body.tv .ov-actions, body.tv .finder { display: none; }
body.tv main.view { max-width: none; padding: 2.2vw 2.4vw; }
body.tv .page-title { font-size: 4vw; }
body.tv .ov-meta { font-size: 1.6vw; }
body.tv .rotations { grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); gap: 1.4vw; }
body.tv .rotation-head h2 { font-size: 3vw; }
body.tv .rotation-time { font-size: 2.2vw; }
body.tv .court-field { min-height: 9vw; }
body.tv .p b { width: 3.6vw; height: 3.6vw; min-width: 46px; min-height: 46px; font-size: max(24px, 2vw); }
body.tv .p small { font-size: max(14px, 1.1vw); }
body.tv .tv-exit { display: inline-flex; position: fixed; right: 16px; top: 16px; z-index: 30; opacity: .12; }
body.tv .tv-exit:hover, body.tv .tv-exit:focus-visible { opacity: 1; }

/* ---------- minder beweging ---------- */

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

@media (max-width: 380px) {
  .field-row { grid-template-columns: 1fr; }
  .p small { display: none; }
}
