/* Vriendenweekend: one loud thing (the wristband), everything else quiet. */

:root {
  color-scheme: light dark;
  --bg: #F2F1F6;
  --surface: #FFFFFF;
  --ink: #1D1A33;
  --muted: #5B5775;
  --line: #DAD7E6;
  --accent: #D02D65;
  --on-accent: #FFFFFF;
  --link: #2F4FCC;
  --tag-bg: #FCE3EC;
  --tag-ink: #9C1E4B;
  --ok: #13877F;
  --danger: #B3261E;
  --focus: #2F4FCC;

  /* Wristband colours stay the same in dark mode */
  --band: #D02D65;
  --band-clip: #F5B92E;

  --font-kop: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-tekst: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17161F;
    --surface: #22202E;
    --ink: #EEECF6;
    --muted: #A9A5BF;
    --line: #36334B;
    --accent: #FF6B9D;
    --on-accent: #1A0F17;
    --link: #9DB0FF;
    --tag-bg: #4A2235;
    --tag-ink: #FFC2D6;
    --ok: #3CC7BD;
    --danger: #FF8A80;
    --focus: #9DB0FF;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.55 var(--font-tekst);
  overflow-x: hidden;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px)
           env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

/* ---------- Layout ---------- */

.kop, .inhoud { max-width: 36rem; margin: 0 auto; padding-inline: 1.25rem; }
.kop { display: flex; justify-content: space-between; align-items: baseline; padding-top: 1rem; }
.inhoud { padding-top: 1.5rem; padding-bottom: 4rem; }
.inhoud.breed { max-width: 60rem; }

.woordmerk {
  font-family: var(--font-kop);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.kop-link { color: var(--muted); }

section { margin-top: 2.5rem; }
.sectie-kop { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }

/* ---------- Type ---------- */

h1, h2 { font-family: var(--font-kop); line-height: 1.1; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 8vw, 2.75rem); font-weight: 800; font-variation-settings: "wdth" 85; margin: 0 0 .75rem; }
h2 { font-size: 1.25rem; font-weight: 700; margin: 0 0 .5rem; }
p { margin: 0 0 1rem; max-width: 65ch; }
a { color: var(--link); text-underline-offset: .15em; }
.stil { color: var(--muted); font-size: .95rem; }
.ruimte { margin-top: 1.5rem; }

/* ---------- The wristband ---------- */

.bandje {
  position: relative;
  margin: 1rem -2rem 2rem;
  padding: 1rem 5rem 1rem 3rem;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / .09) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(0deg, rgb(0 0 0 / .08) 0 1px, transparent 1px 4px),
    var(--band);
  color: #FFFFFF;
  transform: rotate(-2.5deg);
  font-family: var(--font-kop);
  font-weight: 800;
  font-size: clamp(2.25rem, 11vw, 3.5rem);
  font-variation-settings: "wdth" 75;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 10px 24px -14px rgb(60 10 30 / .6);
}
/* stitched edges */
.bandje::before {
  content: "";
  position: absolute;
  inset: 6px 0;
  border-block: 2px dashed rgb(255 255 255 / .35);
  pointer-events: none;
}
/* plastic snap */
.bandje::after {
  content: "";
  position: absolute;
  right: 1.5rem;
  top: 50%;
  width: 2.25rem;
  height: 2.25rem;
  translate: 0 -50%;
  border-radius: .6rem;
  background: var(--band-clip);
  box-shadow: inset 0 0 0 3px rgb(0 0 0 / .14), inset 0 -5px 0 rgb(0 0 0 / .12);
}
.bandje-leeg { --band: #9C98B3; --band-clip: #CFCBE0; }

/* ---------- Lists ---------- */

.onderdelen, .personen { list-style: none; padding: 0; margin: 2rem 0; border-top: 1px solid var(--line); }
.onderdelen li {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--line);
}
.onderdelen h2 { margin-bottom: .25rem; }
.onderdelen p { margin: 0; color: var(--muted); }

.personen { margin-top: 1rem; }
.personen a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .85rem 0; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.personen .naam { font-weight: 700; }
.personen .status { color: var(--muted); font-size: .9rem; text-align: right; flex: none; }

.tag {
  flex: none;
  display: inline-block;
  font: 700 .8125rem/1.4 var(--font-tekst);
  padding: .15rem .6rem;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-ink);
}

/* ---------- Forms & buttons ---------- */

.stapel { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }

textarea, input.link, input[type=search], input[type=number],
input[type=datetime-local], .inline input {
  width: 100%;
  font: inherit;
  padding: .75rem .9rem;
  border: 2px solid var(--line);
  border-radius: .75rem;
  background: var(--surface);
  color: var(--ink);
}
input.link { font-size: .95rem; margin: .35rem 0 .75rem; }

.knop {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem;
  padding: .75rem 1.25rem;
  border: 0;
  border-radius: .75rem;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 1rem/1.2 var(--font-tekst);
  text-decoration: none;
  cursor: pointer;
}
.knop:active { translate: 0 1px; }
.knop-breed { width: 100%; }
.knop-stil { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.knoppen { display: flex; flex-wrap: wrap; gap: .75rem; }

.knop-tekst {
  background: none; border: 0; padding: .4rem 0;
  font: 700 1rem/1.3 var(--font-tekst);
  color: var(--link);
  text-decoration: underline; text-underline-offset: .15em;
  cursor: pointer;
}
.knop-tekst.stil { color: var(--muted); font-weight: 400; }
.knop-gevaar { color: var(--danger); }

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

.melding {
  padding: .75rem 1rem;
  border-radius: .75rem;
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--ok);
}

.acties form { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.acties form p { margin: 0; color: var(--muted); font-size: .9rem; }

/* ---------- QR ---------- */

.qr { width: min(100%, 17rem); margin: 1.25rem 0; padding: 1rem; background: #FFFFFF; border-radius: 1rem; }
.qr svg { display: block; width: 100%; height: auto; }


/* ---------- Home rows that link somewhere ---------- */

.onderdelen li:has(> a) { padding: 0; }
.onderdelen li > a {
  flex: 1;
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding: 1rem 0;
  color: var(--ink); text-decoration: none;
}
.onderdelen li > a h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .2em; text-decoration-color: var(--accent); }

.tag-live { background: var(--ok); color: #FFFFFF; }
.tag-stil { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.teller { font-family: var(--font-tekst); font-weight: 400; font-size: .95rem; color: var(--muted); margin-left: .35rem; }

/* ---------- Song rows ---------- */

.nummers, .rij, .kaal { list-style: none; padding: 0; margin: 0; }
.nummer {
  display: flex; align-items: center; gap: .85rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line);
}
.nummers { border-top: 1px solid var(--line); }
.hoesje { flex: none; width: 3.25rem; height: 3.25rem; border-radius: .5rem; object-fit: cover; background: var(--line); }
.nummer-tekst { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.nummer-tekst strong, .nummer-tekst span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nummer-tekst span { color: var(--muted); font-size: .95rem; }
.nummer-tekst .duur { font-size: .85rem; font-variant-numeric: tabular-nums; }
.rij-knoppen { flex: none; display: flex; gap: .75rem; align-items: center; }
.knop-klein { min-height: 2.5rem; padding: .45rem .85rem; font-size: .9rem; border-radius: .6rem; }
.zoeken input { margin-top: .35rem; }
.zoek-status { min-height: 1.5em; margin: .5rem 0; }

ol.rij { counter-reset: plek; border-top: 1px solid var(--line); }
ol.rij > li { counter-increment: plek; }
ol.rij > li::before { content: counter(plek); flex: none; width: 1.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
ul.rij { border-top: 1px solid var(--line); }

/* ---------- Now playing ---------- */

.hoes {
  display: block; width: min(100%, 22rem); aspect-ratio: 1; object-fit: cover;
  border-radius: 1rem; background: var(--line); margin: .5rem 0 1.25rem;
  box-shadow: 0 18px 40px -24px rgb(30 10 40 / .6);
}
.nu-titel { margin-bottom: .25rem; }
.nu-artiest { font-size: 1.15rem; color: var(--muted); margin-bottom: 1rem; }
.voortgang { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-bottom: 1.25rem; }
.voortgang > div { height: 100%; width: 0; background: var(--accent); transition: width .25s linear; }
.stemmen { margin-bottom: .5rem; }
.stemmen .knop { flex: 1; }
.stemmen .knop[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.aantal { font-weight: 400; margin-left: .35rem; font-variant-numeric: tabular-nums; }

.namen { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.naam-knop {
  min-height: 2.75rem; padding: .5rem 1rem;
  border: 2px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: 700 1rem/1.2 var(--font-tekst); cursor: pointer;
}
.naam-knop[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.vorige { padding-top: 1.5rem; border-top: 1px solid var(--line); }

/* ---------- Results ---------- */

.stand { padding: 0; margin: 0; list-style: none; counter-reset: plek; border-top: 1px solid var(--line); }
.stand li {
  counter-increment: plek;
  display: flex; gap: 1rem; align-items: baseline;
  padding: .75rem 0; border-bottom: 1px solid var(--line);
}
.stand li::before { content: counter(plek); width: 1.5rem; flex: none; font: 800 1.25rem/1 var(--font-kop); color: var(--accent); }
.stand .naam { flex: 1; font-weight: 700; }
.stand .naam .stil { font-weight: 400; }
.stand .punten { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.persoon-kop { font: 700 1.05rem/1.2 var(--font-kop); margin: 1.25rem 0 .35rem; }
.kaal li { padding: .2rem 0; }
.per-persoon li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }

/* ---------- Admin forms ---------- */

.instellingen { gap: .4rem; }
.instellingen input[type=number] { max-width: 8rem; }
.instellingen input[type=datetime-local] { max-width: 18rem; }
.instellingen .knop { margin-top: .75rem; }
.vink { display: flex; gap: .6rem; align-items: center; padding: .35rem 0; }
.vink input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); flex: none; }
fieldset { border: 0; padding: 0; margin: .75rem 0 0; }
legend { padding: 0; margin-bottom: .25rem; }
.hint { margin: -.15rem 0 .5rem; font-size: .9rem; }
.inline { display: flex; gap: .5rem; }
.inline input { flex: 1; min-width: 0; }
.naam-wijzigen { padding-bottom: .9rem; }
.stappen { padding-left: 1.25rem; }
.stappen li { padding: .25rem 0; }
code { font-size: .95em; padding: .1rem .35rem; border-radius: .3rem; background: var(--surface); }

/* ---------- TV screen ---------- */

body.tv {
  --bg: #17161F; --ink: #F3F1FA; --muted: #B4B0C9; --line: #36334B; --accent: #FF6B9D;
  color-scheme: dark;
  background: var(--bg); color: var(--ink);
  min-height: 100vh; overflow: hidden;
}
.tv-scherm { min-height: 100vh; padding: 6vh 6vw 22vh; display: flex; flex-direction: column; justify-content: center; }
.tv-nu { display: grid; grid-template-columns: auto 1fr; gap: 4vw; align-items: center; }
.tv-hoes { width: min(46vh, 38vw); aspect-ratio: 1; object-fit: cover; border-radius: 1.5vw; background: var(--line);
           box-shadow: 0 3vh 6vh -3vh rgb(0 0 0 / .7); }
.tv-info { min-width: 0; }
.tv-titel { font: 800 clamp(2.5rem, 5.2vw, 6rem)/1.02 var(--font-kop); font-variation-settings: "wdth" 80;
            letter-spacing: -0.02em; margin: 0 0 1.5vh; overflow-wrap: anywhere; }
.tv-artiest { font-size: clamp(1.25rem, 2.4vw, 2.75rem); color: var(--muted); margin: 0 0 4vh; }
.tv-voortgang { height: .9vh; border-radius: .45vh; max-width: 60vw; }
.tv-stemmen { font-size: clamp(1rem, 1.5vw, 1.75rem); color: var(--muted); margin-top: 2vh; min-height: 1.5em; }
.tv-vorige { position: fixed; left: 6vw; right: 6vw; bottom: 17vh; margin: 0; max-width: none;
             font-size: clamp(1rem, 1.5vw, 1.75rem); color: var(--muted); }
.tv-leeg { text-align: center; font-size: clamp(1.25rem, 2.5vw, 3rem); color: var(--muted); }
.tv-merk { font: 800 clamp(3rem, 8vw, 9rem)/1 var(--font-kop); color: var(--ink); margin-bottom: 2vh; }
.tv-band {
  position: fixed; left: -3vw; right: -3vw; bottom: 4vh; margin: 0;
  padding: 2vh 12vw 2vh 8vw;
  font-size: clamp(1.25rem, 2.3vw, 3rem);
  transform: rotate(-1.5deg);
}
.tv-band::after { right: 5vw; width: 1.8em; height: 1.8em; border-radius: .45em; }

/* ---------- Printable cards ---------- */

.kaartjes { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1rem; margin-top: 2rem; }
.kaartje {
  background: #FFFFFF; color: #1D1A33;
  border: 1px solid var(--line); border-radius: 1rem; overflow: hidden;
  break-inside: avoid;
}
.kaartje-naam {
  padding: .6rem 1rem;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / .09) 0 2px, transparent 2px 6px),
    var(--band);
  color: #FFFFFF;
  font: 800 1.5rem/1.1 var(--font-kop);
  font-variation-settings: "wdth" 80;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kaartje .qr { width: 72%; margin: .75rem auto .25rem; padding: 0; }
.kaartje p { margin: 0; padding: 0 1rem 1rem; font-size: .8rem; color: #5B5775; }

@media print {
  :root { color-scheme: light; }
  body { background: #FFFFFF; padding: 0; }
  .kop, .geen-print { display: none; }
  .inhoud, .inhoud.breed { max-width: none; padding: 0; }
  .kaartjes { grid-template-columns: repeat(3, 1fr); gap: 6mm; margin: 0; }
  .kaartje { border: 1px dashed #999999; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  .knop:active { translate: none; }
}
