/* Peejelandse Top 44 — carnaval in yellow and purple, mobile first. */
:root {
  --purple-900: #1f0736;
  --purple-800: #2a0a45;
  --purple-700: #3b0f60;
  --purple-600: #4b1678;
  --purple-400: #8e4fc9;
  --purple-100: #f3ecf9;
  --yellow: #ffd60a;
  --yellow-soft: #fff3b0;
  --orange: #ff8a00;
  --green: #2fbf71;
  --pink: #ff4fa3;
  --ink: #1f0736;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(10, 0, 25, .35);
  --font: "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --display: "Arial Black", "Avenir Next Heavy", "Segoe UI Black", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--white);
  font: 17px/1.5 var(--font);
  background-color: var(--purple-800);
  /* confetti */
  background-image:
    radial-gradient(circle at 12% 18%, var(--yellow) 0 3px, transparent 4px),
    radial-gradient(circle at 78% 12%, var(--pink) 0 3px, transparent 4px),
    radial-gradient(circle at 34% 72%, var(--green) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 88% 64%, var(--orange) 0 3px, transparent 4px),
    radial-gradient(circle at 56% 38%, var(--yellow) 0 2px, transparent 3px),
    radial-gradient(circle at 6% 88%, var(--purple-400) 0 3px, transparent 4px),
    linear-gradient(180deg, var(--purple-600) 0%, var(--purple-800) 55%, var(--purple-900) 100%);
  background-size: 260px 260px, 300px 300px, 220px 220px, 340px 340px, 180px 180px, 280px 280px, 100% 100%;
}

a { color: var(--yellow); }
a:hover { color: var(--yellow-soft); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 50;
  background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: 10px;
}
.skip:focus { top: 8px; }

/* --- frame --- */

.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 0;
  max-width: 44rem; width: 100%; margin: 0 auto;
}
.brand img { display: block; width: 120px; height: auto; transform: rotate(-2deg); }
.top-nav a {
  display: inline-block; padding: 8px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .1); color: var(--white); text-decoration: none; font-weight: 700;
}
.top-nav a[aria-current] { background: var(--yellow); color: var(--ink); }

.page {
  flex: 1;
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 16px 16px 140px; /* room for the voting tray */
}

.foot {
  text-align: center; font-size: 14px; color: rgba(255, 255, 255, .7); padding: 16px;
}
.foot a { color: inherit; }

.flash {
  max-width: 44rem; margin: 12px auto 0; width: calc(100% - 32px);
  background: var(--yellow); color: var(--ink); padding: 12px 16px; border-radius: 14px; font-weight: 600;
  box-shadow: var(--shadow);
}

/* --- type --- */

h1, h2 { font-family: var(--display); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 8vw, 2.8rem); color: var(--yellow); text-shadow: 3px 3px 0 var(--purple-900); }
h2 { font-size: 1.25rem; }
.lead { font-size: 1.1rem; margin: 0 0 1.25rem; }
.note { font-size: .95rem; color: rgba(255, 255, 255, .85); }
.hint { font-size: .9rem; color: rgba(255, 255, 255, .75); margin: .35rem 0 0; }
.optional { font-weight: 400; opacity: .75; }
.center { text-align: center; }
.narrow { max-width: 30rem; margin: 0 auto; }
.prose li { margin-bottom: .4em; }

/* --- buttons --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 48px; padding: 10px 22px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--yellow); color: var(--ink);
  font: 800 1.05rem/1.2 var(--font); text-decoration: none;
  box-shadow: 0 4px 0 #c9a400;
  transition: transform .08s ease, box-shadow .08s ease, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--yellow-soft); color: var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #c9a400; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 #c9a400; }
.btn-big { min-height: 60px; font-size: 1.3rem; padding: 14px 34px; width: 100%; }
.btn-ghost {
  background: transparent; color: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow);
}
.btn-ghost:hover { background: rgba(255, 214, 10, .12); color: var(--yellow); }
.btn-ghost:active { box-shadow: inset 0 0 0 2px var(--yellow); }

/* --- home --- */

.hero { text-align: center; padding-top: 8px; }
.hero h1 { font-size: clamp(2.2rem, 11vw, 3.6rem); transform: rotate(-2deg); }
.hero .btn-big { max-width: 22rem; animation: wobble 2.6s ease-in-out infinite; }
.big-date {
  display: inline-block; font: 900 1.3rem/1.3 var(--display); color: var(--ink);
  background: var(--yellow); padding: 12px 18px; border-radius: 14px; transform: rotate(1deg);
}
.flyer {
  display: block; width: 100%; max-width: 30rem; height: auto; margin: 28px auto 0;
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.event { font-size: 1.1rem; }

@keyframes wobble {
  0%, 100% { transform: rotate(0); }
  4% { transform: rotate(-2deg) scale(1.03); }
  8% { transform: rotate(2deg) scale(1.03); }
  12% { transform: rotate(0); }
}

/* --- forms --- */

.form { display: block; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=search], input:not([type]), textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  font: 1.05rem/1.4 var(--font); /* >=16px: no zoom on iOS */
  color: var(--ink); background: var(--white);
  border: 3px solid transparent; border-radius: 14px;
}
input:focus, textarea:focus { outline: none; border-color: var(--yellow); }
textarea { resize: vertical; }
.check { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.check label { flex: 1; }
.check .field-error { flex-basis: 100%; }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--yellow); }
.check label { font-weight: 400; }
.field-error {
  margin: 6px 0 0; padding: 6px 10px; border-radius: 10px;
  background: var(--pink); color: var(--white); font-weight: 700; font-size: .95rem;
}
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.code-input { font: 900 2rem/1 var(--display); letter-spacing: .3em; text-align: center; }
.help { margin-top: 24px; background: rgba(255, 255, 255, .08); padding: 12px 16px; border-radius: 14px; }
.help summary { cursor: pointer; font-weight: 700; }
.help li { margin: 4px 0; }
.logout { margin-top: 28px; }

/* --- voting --- */

.search { position: sticky; top: 0; z-index: 5; padding: 8px 0; }
.search input {
  min-height: 56px; font-size: 1.15rem; padding-left: 48px; box-shadow: var(--shadow);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%234b1678' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 16px center;
}
.results-info { min-height: 1.5em; margin: 4px 2px 8px; font-size: .95rem; color: rgba(255, 255, 255, .8); }

.songs, .picked, .summary { list-style: none; margin: 0; padding: 0; }
.song {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 64px; padding: 8px 12px; margin-bottom: 8px;
  background: var(--white); color: var(--ink); text-align: left;
  border: 0; border-radius: 14px; cursor: pointer;
  font: inherit; box-shadow: 0 3px 0 rgba(0, 0, 0, .25);
  transition: transform .08s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.song:active { transform: scale(.98); }
.song[aria-pressed=true] { background: var(--yellow); }
.song-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.song-title { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-artist { font-size: .92rem; color: var(--purple-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-mark {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; font: 900 1.2rem/1 var(--font);
  background: var(--purple-600); color: var(--yellow);
}
.song[aria-pressed=true] .song-mark { background: var(--green); color: var(--white); }
.cover {
  flex: none; width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: var(--purple-100);
}
.cover-empty {
  display: grid; place-items: center; font: 900 1.3rem/1 var(--display);
  background: var(--purple-600); color: var(--yellow);
}
.more { width: 100%; margin-top: 8px; }
.missing { text-align: center; padding: 16px; background: rgba(255, 255, 255, .08); border-radius: var(--radius); }
.missing-always { text-align: center; margin-top: 24px; }

.back {
  background: none; border: 0; color: var(--yellow); font: 700 1rem var(--font);
  padding: 8px 0; margin-bottom: 8px; cursor: pointer;
}
.summary { counter-reset: n; margin-bottom: 20px; }
.summary li {
  counter-increment: n; display: flex; gap: 10px; align-items: baseline;
  background: rgba(255, 255, 255, .1); padding: 10px 12px; border-radius: 12px; margin-bottom: 6px;
}
.summary li::before {
  content: counter(n); flex: none; width: 1.8em; height: 1.8em; border-radius: 50%;
  display: inline-grid; place-items: center; font-weight: 900; font-size: .85rem;
  background: var(--yellow); color: var(--ink);
}
.summary span { color: rgba(255, 255, 255, .8); font-size: .92rem; }

/* sticky tray with "my list" */
.tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--purple-900);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .45);
  border-radius: 22px 22px 0 0;
  padding-bottom: env(safe-area-inset-bottom);
}
.tray-bar {
  display: flex; align-items: center; gap: 12px;
  max-width: 44rem; margin: 0 auto; padding: 12px 16px;
}
.tray-toggle {
  flex: 1; display: flex; align-items: center; gap: 12px; min-height: 48px;
  background: none; border: 0; color: var(--white); font: inherit; text-align: left; cursor: pointer; padding: 0;
}
.tray-count {
  flex: none; min-width: 3.4em; padding: 6px 10px; border-radius: 999px; text-align: center;
  background: var(--yellow); color: var(--ink); font: 900 1.05rem/1.2 var(--display);
}
.tray-count.bump { animation: bump .3s ease; }
.tray-text { font-weight: 700; font-size: .98rem; line-height: 1.25; }
.tray-toggle::after { content: "▲"; margin-left: auto; font-size: .8rem; opacity: .7; }
.tray-toggle[aria-expanded=true]::after { content: "▼"; }
.progress { height: 5px; background: rgba(255, 255, 255, .12); }
.progress span { display: block; height: 100%; width: 0; background: var(--yellow); transition: width .25s ease; }
.progress.full span { background: var(--green); }
.drawer {
  max-width: 44rem; margin: 0 auto; padding: 14px 16px 0;
  max-height: 50vh; overflow-y: auto;
}
.picked li {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.picked .pick-text { flex: 1; min-width: 0; }
.picked .pick-text span { display: block; font-size: .9rem; opacity: .8; }
.picked .remove {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--pink); color: var(--white); font: 900 1.1rem/1 var(--font);
}
.picked .empty { opacity: .8; border: 0; }

@keyframes bump { 50% { transform: scale(1.25); } }

.toast {
  position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 30;
  width: max-content; max-width: calc(100% - 32px);
  background: var(--pink); color: var(--white); font-weight: 700;
  padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow);
}

/* fragment ▶ button next to a song */
.song-row { display: flex; align-items: stretch; gap: 8px; margin-bottom: 8px; }
.song-row .song { margin-bottom: 0; flex: 1; min-width: 0; width: auto; }
.play {
  flex: none; width: 56px; border: 0; border-radius: 14px; cursor: pointer;
  background: var(--purple-600); color: var(--yellow); font: 900 1.2rem/1 var(--font);
  box-shadow: inset 0 0 0 2px rgba(255, 214, 10, .5);
  -webkit-tap-highlight-color: transparent;
}
.play[aria-pressed=true] { background: var(--yellow); color: var(--ink); }
.play.loading { opacity: .6; }
.play:disabled { opacity: .35; cursor: default; }

/* sponsors */
.sponsors { margin: 36px auto 0; text-align: center; }
.sponsors p { margin: 0 0 12px; font-size: .9rem; color: rgba(255, 255, 255, .75); }
.sponsors ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px 28px; justify-content: center; align-items: center; }
.sponsors img { display: block; max-height: 56px; max-width: 170px; width: auto; height: auto; }
.sponsors span { font-weight: 800; }
.sponsors a { color: inherit; text-decoration: none; }

.share-list { margin: 14px 0 6px; }

/* --- thanks --- */

.thanks { position: relative; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
.card {
  background: rgba(255, 255, 255, .08); border-radius: var(--radius);
  padding: 18px; margin: 20px 0; text-align: left;
}
.top3 { background: var(--yellow); color: var(--ink); transform: rotate(-1deg); box-shadow: var(--shadow); }
.top3 h2 { color: var(--purple-600); }
.podium { list-style: none; margin: 0; padding: 0; }
.podium li { display: flex; gap: 12px; align-items: center; padding: 8px 0; }
.podium .pos {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--purple-600); color: var(--yellow); font: 900 1.3rem/1 var(--display);
}
.podium-song { display: flex; flex-direction: column; }
.remark { font-style: italic; }

@media (min-width: 40rem) {
  .brand img { width: 150px; }
  .page { padding-top: 24px; }
  .btn-big { width: auto; }
  .hero .btn-big { width: 100%; }
}

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