/* Kinderpagina – stijl overgenomen van David FC (web/style.css), plus het kiesscherm. */
@font-face {
  font-family: "Baloo 2"; font-weight: 600 800; font-style: normal; font-display: swap;
  src: url("fonts/baloo2-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito"; font-weight: 600 800; font-style: normal; font-display: swap;
  src: url("fonts/nunito-latin.woff2") format("woff2");
}

:root {
  --gras: #0E6B3A;
  --geel: #FFD23F;
  --inkt: #14231A;
  --tekst: #3E4C45;
  --grijs: #6B7A72;
  --rand: #E3E8E5;
  --vink: #1E8E4E;
  --wacht: #7C8A83;
  --youtube: #CC0000;
  --logo: clamp(64px, 7.8vw, 92px);
  --kolommen: 4;
  --kolommen-klein: 6;
  --logo-klein: clamp(40px, 4.4vw, 54px);
  --kies: 96px;
}
@media (orientation: portrait) {
  :root { --kolommen: 3; --logo: clamp(60px, 10vw, 92px); --kolommen-klein: 4; --logo-klein: clamp(40px, 7vw, 54px); }
}
@media (max-width: 600px) {
  :root { --kolommen: 2; --logo: 64px; --kolommen-klein: 3; --logo-klein: 40px; --kies: 72px; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: "Nunito", system-ui, sans-serif; color: #fff;
  background-color: var(--gras);
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 98px, rgba(0,0,0,0) 98px 196px);
  background-attachment: fixed;
  padding: max(28px, env(safe-area-inset-top)) max(40px, env(safe-area-inset-right)) 40px max(40px, env(safe-area-inset-left));
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
@media (max-width: 600px) { body { padding-left: 16px; padding-right: 16px; } }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---- kop ---- */
.kop { display: flex; align-items: center; justify-content: space-between; min-height: 64px; margin-bottom: 22px; gap: 16px; }
.kop-naam { display: flex; align-items: center; gap: 14px; min-width: 0; }
.kop-logo { width: 52px; height: 52px; flex: none; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.kop h1 { margin: 0; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 40px; line-height: 1; }
@media (max-width: 600px) { .kop h1 { font-size: 30px; } .kop-logo { width: 40px; height: 40px; } }
.kop-rechts { display: flex; align-items: center; gap: 16px; }
.pil {
  background: var(--geel); color: var(--inkt); border-radius: 999px; padding: 8px 20px;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 22px; line-height: 1.2; white-space: nowrap;
}

/* ---- kiesscherm: logomuur in drie blokken ---- */
.kiezen { padding-bottom: 150px; }
.kiezen-kop { margin: 0 0 18px; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 32px; line-height: 1.1; }
.blok { margin: 0 0 30px; }
.blok-kop {
  display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 18px 0 14px; border-radius: 999px;
  margin-bottom: 16px; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 20px; line-height: 1;
  box-shadow: 0 4px 0 rgba(0,0,0,0.18);
}
.blok-kop svg { width: 24px; height: 24px; flex: none; fill: #fff; }
.blok-kop svg.lijn { fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.keuzes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--kies) + 28px), 1fr)); gap: 18px 10px;
}
.keus {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; min-width: 0;
}
.keus .rond {
  --logo: calc(var(--kies) - 18px);
  width: var(--kies); height: var(--kies); border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 0 rgba(0,0,0,0.2); transition: transform .08s ease, opacity .15s ease, box-shadow .1s ease;
}
.keus .rond .logo { border: 0; }
.keus:active .rond { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,0.2); }
.keus .naam {
  max-width: 100%; font-weight: 800; font-size: 14px; line-height: 1.15; text-align: center;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.keus.aan .rond { box-shadow: 0 0 0 6px var(--geel), 0 8px 0 4px rgba(0,0,0,0.2); }
.keus.aan .naam { color: var(--geel); }
.keus .vinkje {
  position: absolute; top: -4px; right: calc(50% - var(--kies) / 2 - 8px); width: 34px; height: 34px; border-radius: 50%;
  background: var(--vink); border: 3px solid #fff; display: none; align-items: center; justify-content: center;
}
.keus.aan .vinkje { display: flex; }
.keus .vinkje svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.keus.vol .rond { opacity: .4; }
.keus:focus-visible { outline: none; }
.keus:focus-visible .rond { outline: 4px solid #fff; outline-offset: 4px; }

/* onderbalk: vijf vakjes die vollopen, en Klaar */
.kiesbalk {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap;
  padding: 14px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(9, 74, 40, 0.96); box-shadow: 0 -4px 0 rgba(0,0,0,0.15);
}
.vakjes { display: flex; gap: 10px; }
.vakje {
  --logo: 46px;
  width: 58px; height: 58px; border-radius: 50%; border: 3px dashed rgba(255,255,255,0.55);
  display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.08);
}
.vakje.vol { border: 3px solid var(--geel); background: #fff; }
.vakje .logo { border: 0; }
.vakjes.schud { animation: schud .35s ease; }
@keyframes schud { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.klaarknop {
  height: 62px; padding: 0 34px; border: 0; border-radius: 999px; cursor: pointer; touch-action: manipulation;
  background: var(--geel); color: var(--inkt); box-shadow: 0 5px 0 rgba(0,0,0,0.22);
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 28px; line-height: 1;
}
.klaarknop:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0,0,0,0.22); }
.klaarknop:disabled { opacity: .4; cursor: default; transform: none; }
@media (max-width: 600px) {
  .vakje { --logo: 34px; width: 44px; height: 44px; }
  .vakjes { gap: 6px; }
  .klaarknop { height: 52px; padding: 0 24px; font-size: 22px; }
  .kiesbalk { gap: 12px; }
}

/* ---- filter: Alles, de gekozen clubs, en de knop om te wisselen ---- */
.filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: -4px 0 26px; }
.knop {
  border: 0; padding: 0; cursor: pointer; touch-action: manipulation;
  box-shadow: 0 4px 0 rgba(0,0,0,0.18); transition: transform .08s ease, opacity .15s ease;
}
.knop:active { transform: translateY(3px); }
.knop:focus-visible { outline: 4px solid #fff; outline-offset: 4px; }
.knop.aan { box-shadow: 0 0 0 5px var(--geel), 0 6px 0 3px rgba(0,0,0,0.18); }
.knop.uit { opacity: .45; }
.knop.rond {
  --logo: 60px;
  width: 74px; height: 74px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.knop.rond .logo { border: 0; }
.knop.rond > svg { width: 44px; height: 44px; fill: none; stroke: var(--gras); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.knop.wissel { background: var(--geel); margin-left: 8px; }
.knop.wissel > svg { stroke: var(--inkt); stroke-width: 2.2; width: 38px; height: 38px; }
@media (orientation: portrait) { .knop.rond { --logo: 54px; width: 66px; height: 66px; } .knop.rond > svg { width: 40px; height: 40px; } }
@media (max-width: 600px) { .knop.rond { --logo: 46px; width: 56px; height: 56px; } .knop.rond > svg { width: 32px; height: 32px; } }

/* ---- muur ---- */
.muur { display: grid; grid-template-columns: repeat(var(--kolommen), minmax(0, 1fr)); gap: 28px 22px; padding-top: 8px; }
.tegel {
  position: relative; display: flex; flex-direction: column; text-align: left;
  padding: 0; border: 0; border-radius: 22px; background: #fff; color: inherit; text-decoration: none;
  min-height: 262px; cursor: pointer; touch-action: manipulation;
  box-shadow: 0 6px 0 rgba(0,0,0,0.18); transition: transform .08s ease, box-shadow .08s ease;
}
.tegel:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,0.18); }
.tegel:focus-visible { outline: 4px solid var(--geel); outline-offset: 3px; }
.band {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 22px 22px 0 0; color: #fff; font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden;
}
.band svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.band svg.gevuld { fill: #fff; stroke: none; width: 22px; height: 22px; }
.band span { overflow: hidden; text-overflow: ellipsis; }
.tegel.klein .band svg.gevuld { width: 12px; height: 12px; }
.tegel.nieuwtje .band { padding-right: 44px; }
.clubs { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px 8px 10px; }
.club { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.logo {
  width: var(--logo); height: var(--logo); border-radius: 50%; border: 4px solid var(--rand); background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none;
}
.logo img { width: 78%; height: 78%; object-fit: contain; -webkit-user-drag: none; }
.logo.rondje { border-color: rgba(0,0,0,0.12); }
.logo.rondje span {
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: calc(var(--logo) * 0.27); color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.logo.rondje.licht span { color: var(--inkt); text-shadow: none; }
.code { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 20px; line-height: 1; color: var(--inkt); }
.tegen { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 22px; color: var(--grijs); padding-bottom: 28px; }
.onder {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 18px 16px; color: var(--tekst); font-weight: 700; font-size: 16px;
}
.onder .rechts { display: flex; align-items: center; gap: 5px; white-space: nowrap; min-width: 0; }
.onder > span:first-child { white-space: nowrap; }
.onder svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--tekst); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.nieuw {
  position: absolute; top: -20px; right: -10px; transform: rotate(6deg);
  background: var(--geel); color: var(--inkt); border: 3px solid #fff; border-radius: 12px; padding: 0 10px;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 19px; line-height: 1.3; box-shadow: 0 3px 0 rgba(0,0,0,0.15);
}
.vink {
  position: absolute; top: 52px; right: 12px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--vink); display: flex; align-items: center; justify-content: center;
}
.vink svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* alleen op YouTube te zien: rood labeltje, opent YouTube in een nieuw tabblad */
.onder .youtube {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border-radius: 8px;
  background: var(--youtube); color: #fff; font-size: 14px;
}
.onder .youtube svg { stroke: #fff; width: 14px; height: 14px; }
.tegel.klein .onder .youtube { font-size: 11px; padding: 2px 6px 2px 5px; }
.tegel.klein .onder .youtube svg { width: 10px; height: 10px; }

/* ---- oudere wedstrijden: klein, met uitslag ---- */
.eerder-kop { margin: 44px 0 6px; font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 26px; line-height: 1; color: rgba(255,255,255,0.88); }
.muur.klein { --logo: var(--logo-klein); grid-template-columns: repeat(var(--kolommen-klein), minmax(0, 1fr)); gap: 22px 14px; }
.tegel.klein { min-height: 0; border-radius: 16px; box-shadow: 0 4px 0 rgba(0,0,0,0.18); }
.tegel.klein:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,0.18); }
.tegel.klein .band { height: 28px; padding: 0 10px; gap: 5px; font-size: 12px; border-radius: 16px 16px 0 0; }
.tegel.klein .band svg { width: 13px; height: 13px; }
.tegel.klein.nieuwtje .band { padding-right: 30px; }
.tegel.klein .clubs { gap: 4px; padding: 12px 4px 8px; }
.tegel.klein .club { gap: 5px; }
.tegel.klein .logo { border-width: 3px; }
.tegel.klein .code { font-size: 13px; }
.tegel.klein .tegen { font-size: 16px; padding-bottom: 18px; }
.tegel.klein .onder { padding: 0 10px 10px; font-size: 12px; gap: 4px; }
.tegel.klein .onder svg { width: 12px; height: 12px; }
.tegel.klein .nieuw { top: -13px; right: -7px; font-size: 13px; padding: 0 7px; border-width: 2px; border-radius: 9px; }
.tegel.klein .vink { top: 36px; right: 7px; width: 22px; height: 22px; }
.tegel.klein .vink svg { width: 14px; height: 14px; }
.uitslag { display: flex; flex-direction: column; align-items: center; padding-bottom: 18px; min-width: 0; }
.uitslag .stand { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 22px; line-height: 1; color: var(--inkt); white-space: nowrap; }

/* wachtende wedstrijd: gestippeld, lichter, niet aan te tikken */
.tegel.wacht { background: rgba(255,255,255,0.82); border: 3px dashed #B9C4BE; box-shadow: none; cursor: default; }
.tegel.wacht:active { transform: none; }
.tegel.wacht .band { border-radius: 19px 19px 0 0; background: var(--wacht) !important; }
.tegel.wacht .logo img { opacity: .75; }

/* ---- meldingen ---- */
.melding {
  margin: 48px auto 0; max-width: 520px; text-align: center;
  font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 28px; line-height: 1.3;
}
.melding .groot { display: block; font-size: 64px; line-height: 1; margin-bottom: 12px; }

/* ---- speler (YouTube, ingesloten via youtube-nocookie) ---- */
.speler { position: fixed; inset: 0; z-index: 10; background: #000; display: flex; align-items: center; justify-content: center; }
.kader { width: 100%; height: 100%; }
.kader iframe, .kader > div { width: 100%; height: 100%; border: 0; display: block; }
.dek-boven { position: absolute; left: 0; right: 0; top: 0; height: 72px; background: #000; }
.pauze {
  position: absolute; inset: 0; border: 0; padding: 0; background: #000; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pauze svg { width: 140px; height: 140px; padding: 26px 22px 26px 34px; border-radius: 50%; background: var(--geel); fill: var(--inkt); }
.terug {
  position: absolute; top: max(16px, env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left));
  width: 64px; height: 64px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.92); cursor: pointer;
  display: flex; align-items: center; justify-content: center; touch-action: manipulation; z-index: 2;
}
.terug svg { width: 34px; height: 34px; fill: none; stroke: var(--inkt); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* telefoon: kop, tegels en YouTube-label compacter */
@media (max-width: 600px) {
  .kop h1 { font-size: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pil { font-size: 17px; padding: 6px 14px; }
  .tegel { min-height: 0; }
  .clubs { padding: 16px 6px 8px; }
  .onder { padding: 0 12px 12px; font-size: 14px; }
  .onder .youtube { font-size: 0; gap: 0; padding: 4px 6px; }
  .onder .youtube svg { width: 16px; height: 16px; }
  .nieuw { right: -4px; font-size: 16px; }
}
