:root {
  --plum: #2A1135;
  --plum-2: #3B1A4C;
  --rose: #FF4F7B;
  --rose-deep: #D92A5A;
  --peach: #FFB48F;
  --lilac: #CDB8FF;
  --butter: #FFE08A;
  --blush: #FFF1F4;
  --white: #ffffff;
  --muted: #7B6383;
  --hair: #EBD9E2;
  --display: 'Unbounded', 'Arial Black', sans-serif;
  --body: 'Instrument Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  background: var(--blush);
  color: var(--plum);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rose-deep); text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 6px; }
main { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 32px 20px 64px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 12px 24px; background: rgba(42, 17, 53, .96); backdrop-filter: blur(8px); color: var(--blush);
}
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.25rem; color: var(--blush); text-decoration: none; letter-spacing: -0.02em; }
.logo img { width: 30px; height: 30px; }
nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
nav a {
  color: var(--blush); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 7px 13px; border-radius: 999px; opacity: .85;
}
nav a:hover { opacity: 1; background: rgba(255, 241, 244, .1); }
nav a.active { opacity: 1; background: var(--rose); color: var(--white); }
.badge { background: var(--butter); color: var(--plum); border-radius: 999px; padding: 0 7px; font-size: .75rem; margin-left: 5px; font-weight: 700; }

.foot { text-align: center; font-size: .9rem; color: var(--muted); padding: 28px 20px 36px; border-top: 1px solid var(--hair); background: var(--white); }
.foot p { margin: 4px auto; }
.credits { margin-top: 10px !important; }
.credits span { font-family: var(--display); font-size: .8rem; color: var(--rose-deep); }

#announce { background: var(--butter); color: var(--plum); text-align: center; font-weight: 600; padding: 10px 16px; }

/* type */
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 16px; }
h2 { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 10px; }
p { max-width: 62ch; }
.lead { font-size: 1.2rem; }
.muted { color: var(--muted); }
small { font-size: .85rem; }

/* surfaces */
.panel { background: var(--white); border: 1px solid var(--hair); border-radius: 22px; padding: 26px; margin-bottom: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; padding: 13px 22px; border-radius: 999px;
  border: 0; background: var(--rose); color: var(--white); cursor: pointer; text-decoration: none;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--rose-deep); }
.btn:active { transform: scale(.97); }
.btn.alt { background: var(--plum); color: var(--blush); }
.btn.alt:hover { background: var(--plum-2); }
.btn.ghost { background: transparent; color: var(--plum); box-shadow: inset 0 0 0 2px var(--plum); }
.btn.ghost:hover { background: rgba(42, 17, 53, .06); }
.btn.small { padding: 7px 14px; font-size: .9rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

label { display: block; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=date], select {
  width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid #D9C4D0; border-radius: 12px; background: var(--white); color: var(--plum);
}
input:focus, select:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 4px rgba(255, 79, 123, .18); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--rose); }
.err { color: var(--rose-deep); font-weight: 600; min-height: 1.2em; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* auth pages */
.auth { display: grid; grid-template-columns: 1fr 1fr; max-width: 900px; margin: 0 auto; background: var(--white); border-radius: 28px; overflow: hidden; border: 1px solid var(--hair); }
.auth-art { background: var(--plum); display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-art img { width: 100%; max-width: 380px; }
.auth-form { padding: 40px; }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; margin: 8px 0 56px; }
.hero h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); }
.hero-art { position: relative; }
.hero-art img { width: 100%; filter: drop-shadow(0 30px 40px rgba(42, 17, 53, .25)); }
.hero-tag {
  position: absolute; left: -18px; bottom: 36px; background: var(--white); border-radius: 16px; padding: 10px 14px;
  font-weight: 700; font-size: .9rem; box-shadow: 0 12px 30px rgba(42, 17, 53, .18); display: flex; align-items: center; gap: 8px;
}
.hero-tag i { width: 12px; height: 12px; border-radius: 50%; background: var(--rose); display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .hero-art img { animation: float 7s ease-in-out infinite; }
  @keyframes float { 50% { transform: translateY(-10px); } }
}

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.how article { background: var(--white); border-radius: 22px; padding: 22px; border: 1px solid var(--hair); }
.how img { width: 100%; height: 130px; object-fit: contain; margin-bottom: 12px; }
.how .step { display: inline-block; font-family: var(--display); font-weight: 800; color: var(--rose); margin-right: 6px; }

.band { background: var(--plum); color: var(--blush); border-radius: 28px; padding: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.band h2 { color: var(--butter); }
.band p { margin: 0; opacity: .85; }
.band img { width: 52px; height: 52px; margin-bottom: 10px; }

/* bingo board — het opvallende element */
.board-head { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.board {
  display: grid; gap: 8px; background: var(--plum); padding: 12px; border-radius: 26px;
  box-shadow: 10px 10px 0 var(--rose);
}
.cell {
  aspect-ratio: 1; background: var(--white); border-radius: 14px; padding: 8px; display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: clamp(.64rem, 1.55vw, .92rem); font-weight: 600; line-height: 1.18; cursor: pointer;
  position: relative; border: 0; font-family: var(--body); color: var(--plum); overflow: hidden; transition: background .15s;
}
.cell:hover:not(:disabled) { background: #FFE1E9; }
.cell.done { background: var(--rose); color: var(--white); cursor: default; }
.cell.done::after { content: ''; position: absolute; inset: 12%; border: 4px solid rgba(255, 255, 255, .5); border-radius: 50%; }
.cell.free { background: var(--butter); color: var(--plum); }
.cell.pending { background: repeating-linear-gradient(45deg, #fff, #fff 8px, #FFF3CC 8px, #FFF3CC 16px); }
.cell.pending::before { content: '⏳'; position: absolute; top: 4px; right: 6px; font-size: .8rem; }
.cell:disabled:not(.done) { cursor: default; }

.stats { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { background: var(--white); border: 1px solid var(--hair); border-radius: 16px; padding: 10px 16px; min-width: 100px; }
.stat b { display: block; font-family: var(--display); font-size: 1.4rem; color: var(--rose-deep); line-height: 1.2; }
.stat span { font-size: .85rem; color: var(--muted); }

.levels { display: flex; gap: 8px; flex-wrap: wrap; }
.level-pill { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--hair); border-radius: 999px; padding: 5px 14px 5px 5px; background: var(--white); cursor: pointer; font: inherit; font-weight: 700; color: var(--plum); }
.level-pill img { width: 28px; height: 28px; }
.level-pill.current { background: var(--plum); color: var(--blush); border-color: var(--plum); }
.level-pill:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(1); }

.grid2 { display: grid; grid-template-columns: 1.45fr 1fr; gap: 28px; align-items: start; }

/* date-carousel */
.dates { margin-top: 32px; }
.dates-head { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 16px; }
.car-nav { display: flex; gap: 6px; }
.car-nav .btn { width: 40px; height: 40px; padding: 0; font-size: 1.4rem; }
.carousel { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; scrollbar-width: thin; }
.slide { flex: 0 0 300px; scroll-snap-align: start; background: linear-gradient(160deg, #FFE1E9, #F1EAFF); border-radius: 20px; padding: 20px; }
.slide-top { display: flex; align-items: center; gap: 12px; }
.slide-top .avatar { width: 52px; height: 52px; font-size: 1.3rem; box-shadow: 0 0 0 3px var(--white); }
.slide label { font-size: .92rem; }

/* lists */
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.list li:last-child { border: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 800; color: var(--plum); flex: none; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tag { font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #eee; white-space: nowrap; }
.tag.pending { background: var(--butter); }
.tag.confirmed { background: #C8F0E2; color: #0E6B4E; }
.tag.rejected, .tag.expired { background: #EEE6EA; color: var(--muted); }
.empty { text-align: center; padding: 10px 0; }
.empty img { width: 180px; margin: 0 auto 10px; }

/* ranking */
table.rank { width: 100%; border-collapse: collapse; }
table.rank th, table.rank td { padding: 12px 8px; text-align: left; border-bottom: 1px solid var(--hair); }
table.rank th { font-size: .85rem; color: var(--muted); font-weight: 600; }
table.rank td.num, table.rank th.num { text-align: right; }
table.rank tr.me { background: #FFF3CC; }
table.rank td.pos { font-family: var(--display); font-weight: 700; width: 48px; }
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; align-items: end; }
.podium .p { text-align: center; background: var(--white); border: 1px solid var(--hair); border-radius: 22px; padding: 18px 10px; }
.podium .p .medal { font-size: 2rem; }
.podium .p.first { padding: 30px 10px; background: var(--plum); color: var(--blush); border-color: var(--plum); }
.podium .p b { display: block; font-family: var(--display); font-size: 1rem; overflow-wrap: anywhere; margin: 4px 0; }

/* rules */
.rules ol { padding-left: 1.3em; max-width: 70ch; }
.rules li { margin-bottom: 12px; }
.rules li::marker { font-family: var(--display); font-weight: 700; color: var(--rose); }
.points-table { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }

/* ads */
.ad { display: block; margin: 28px 0; border-radius: 22px; padding: 14px; background: var(--white); border: 1px dashed #D9C4D0; text-decoration: none; color: var(--plum); text-align: center; position: relative; min-height: 96px; }
.ad.house { display: flex; flex-direction: column; justify-content: center; gap: 2px; background: linear-gradient(100deg, #FFE1E9, #F1EAFF); border-style: solid; border-color: transparent; }
.ad.house b { font-family: var(--display); font-size: 1.05rem; }
.ad.house:hover { border-color: var(--rose); }
.ad-label { position: absolute; top: 8px; left: 14px; font-size: .72rem; color: var(--muted); }

/* modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(42, 17, 53, .6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
.modal { max-width: 440px; width: 100%; margin: 0; }
#toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(140px);
  background: var(--plum); color: var(--blush); padding: 12px 20px; border-radius: 999px; font-weight: 600;
  transition: transform .25s, visibility .25s; visibility: hidden; z-index: 30; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(42, 17, 53, .3);
}
#toast.show { transform: translateX(-50%) translateY(0); visibility: visible; }

@media (max-width: 820px) {
  .hero, .grid2, .auth { grid-template-columns: 1fr; }
  .hero-art { max-width: 440px; margin: 0 auto; }
  .hero-tag { left: 8px; bottom: 16px; }
  .hero { gap: 24px; }
  .how, .band { grid-template-columns: 1fr; }
  .slide { flex-basis: 82%; }
  .car-nav { display: none; }
  .auth-art { padding: 16px; }
  .auth-art img { max-width: 220px; }
  .auth-form { padding: 26px; }
  .board { gap: 5px; padding: 7px; box-shadow: 6px 6px 0 var(--rose); border-radius: 18px; }
  .cell { padding: 4px; border-radius: 9px; }
  table.rank .hide-sm { display: none; }
  .top { padding: 10px 14px; }
  nav a { padding: 6px 10px; font-size: .88rem; }
}
