[hidden] { display: none !important; }

:root {
  --bg: #fff4f2;
  --dot: #ffd9de;
  --ink: #5a3d4a;
  --muted: #a07d8c;
  --pink: #ff8fa8;
  --pink-dark: #e0647f;
  --mint: #bfeedd;
  --mint-dark: #6cc4a4;
  --butter: #ffe9a8;
  --sky: #cfe6ff;
  --lilac: #e6d8ff;
  --card: #ffffff;
  --done: #cdbcc4;
  --outline: #5a3d4a;
  --head-font: "Fredoka", "Nunito", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 16px/1.55 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Polkadot-sneeuw */
  background-color: var(--bg);
  background-image:
    radial-gradient(var(--dot) 3px, transparent 3.5px),
    radial-gradient(var(--dot) 2px, transparent 2.5px);
  background-size: 48px 48px, 48px 48px;
  background-position: 0 0, 24px 24px;
  overflow-x: hidden;
}

/* Zachte vallende sneeuwvlokjes */
body::before {
  content: "❄ ❅ ❆ ❄ ❅ ❆ ❄ ❅";
  position: fixed;
  inset: -40px 0 auto 0;
  z-index: 0;
  pointer-events: none;
  text-align: center;
  word-spacing: 9vw;
  font-size: 18px;
  color: #b9d9ff;
  animation: flakes 12s linear infinite;
}
@keyframes flakes {
  from { transform: translateY(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  to   { transform: translateY(105vh) rotate(25deg); opacity: 0; }
}

main {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 16px 72px;
}

/* ---------- Vlaggetjesslinger ---------- */
main::before {
  content: "";
  display: block;
  height: 30px;
  margin: 0 -16px;
  border-top: 3px solid #e7c9d2;
  background:
    conic-gradient(from -45deg at 50% 100%, var(--pink) 0 90deg, transparent 0) 0 0 / 108px 30px repeat-x,
    conic-gradient(from -45deg at 50% 100%, var(--mint) 0 90deg, transparent 0) 36px 0 / 108px 30px repeat-x,
    conic-gradient(from -45deg at 50% 100%, var(--butter) 0 90deg, transparent 0) 72px 0 / 108px 30px repeat-x;
  filter: drop-shadow(0 3px 0 rgba(90, 61, 74, 0.12));
}

/* ---------- Kop ---------- */
header {
  text-align: center;
  margin: 28px 0 30px;
}
header::before {
  content: "⛄ 🎄 🦌";
  display: block;
  font-size: 2rem;
  letter-spacing: 0.3em;
  margin-bottom: 4px;
  animation: bob 2.6s ease-in-out infinite;
}
header h1 {
  margin: 0;
  font-family: var(--head-font);
  font-weight: 700;
  font-size: clamp(2.4rem, 9vw, 3.4rem);
  line-height: 1.1;
  color: var(--pink-dark);
  text-shadow: 3px 3px 0 #fff, 5px 5px 0 #ffd1dc;
  letter-spacing: 0.01em;
}
.star {
  display: inline-block;
  color: #ffc94d;
  text-shadow: 2px 2px 0 #fff;
  animation: wiggle 2.2s ease-in-out infinite;
}
header p {
  display: inline-block;
  margin: 14px auto 0;
  max-width: 32em;
  padding: 8px 16px;
  background: #fff;
  border: 2px dashed #f4b8c6;
  border-radius: 18px;
  color: var(--muted);
  font-weight: 600;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50%      { transform: rotate(8deg) scale(1.12); }
}

/* ---------- Kaartjes als stickers ---------- */
ul.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }

.item {
  --tint: var(--mint);
  position: relative;
  background: var(--card);
  border: 3px solid var(--outline);
  border-radius: 22px;
  padding: 16px 16px 16px 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  box-shadow: 5px 5px 0 var(--tint);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.item:nth-child(4n+2) { --tint: var(--pink); }
.item:nth-child(4n+3) { --tint: var(--butter); }
.item:nth-child(4n+4) { --tint: var(--sky); }
.item:nth-child(odd)  { transform: rotate(-0.6deg); }
.item:nth-child(even) { transform: rotate(0.6deg); }
.item:hover { transform: rotate(0) translate(-2px, -2px); box-shadow: 8px 8px 0 var(--tint); }

/* Cadeautje in een gekleurd rondje */
.item::before {
  content: "🎁";
  position: absolute;
  left: 12px;
  top: 50%;
  translate: 0 -50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  background: var(--tint);
  border-radius: 50%;
}
.item:nth-child(4n+2)::before { content: "🧸"; }
.item:nth-child(4n+3)::before { content: "🍪"; }
.item:nth-child(4n+4)::before { content: "🧦"; }

.item .body { flex: 1 1 140px; min-width: 0; }
.item .actions { margin-left: auto; }
.item .title {
  font-family: var(--head-font);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.25;
  overflow-wrap: break-word;
}
.item .meta { color: var(--muted); font-size: 0.92rem; margin-top: 3px; overflow-wrap: anywhere; }
.item .meta a { color: var(--pink-dark); font-weight: 700; text-decoration-style: wavy; text-underline-offset: 3px; }

.item.claimed {
  --tint: #efe6ea;
  border-color: var(--done);
  background: #fbf8f9;
}
.item.claimed::before { content: "💝"; }
.item.claimed .title { color: var(--done); text-decoration: line-through 3px var(--pink); }
.item.claimed .meta, .item.claimed .meta a { color: var(--done); }

.badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #3f8f72;
  background: var(--mint);
  border-radius: 999px;
  padding: 3px 12px;
}
.badge::before { content: "✓ "; }

/* ---------- Knoppen als snoepjes ---------- */
button {
  font: inherit;
  font-family: var(--head-font);
  font-weight: 600;
  border: 3px solid var(--outline);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 0 var(--outline);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--outline); }
button.primary {
  background: var(--pink);
  color: #fff;
  text-shadow: 1px 1px 0 var(--pink-dark);
}
button.primary:hover:not(:disabled) { background: #ff9fb4; animation: boing 0.45s ease; }
@keyframes boing {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.12, 0.9); }
  60%  { transform: scale(0.95, 1.06); }
  100% { transform: scale(1); }
}
button:disabled {
  cursor: default;
  border-color: var(--done);
  color: var(--done);
  box-shadow: 0 3px 0 var(--done);
}
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px dashed var(--pink-dark); outline-offset: 3px; }

/* ---------- Formulieren (admin) ---------- */
form.stack {
  display: grid;
  gap: 12px;
  background: #fff;
  border: 3px solid var(--outline);
  border-radius: 24px;
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: 6px 6px 0 var(--lilac);
}
label { display: grid; gap: 5px; font-family: var(--head-font); font-weight: 600; font-size: 0.95rem; color: var(--ink); }
input, textarea {
  font: inherit;
  font-family: "Nunito", system-ui, sans-serif;
  font-weight: 600;
  color: var(--ink);
  background: #fff9fa;
  border: 2px solid #f1d3db;
  border-radius: 14px;
  padding: 9px 12px;
  width: 100%;
}
input::placeholder, textarea::placeholder { color: #d0b3be; }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.empty, .status {
  text-align: center;
  padding: 28px 0;
  color: var(--muted);
  font-family: var(--head-font);
  font-size: 1.1rem;
}
.empty::before { content: "🐧 "; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 10;
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--outline);
  box-shadow: 4px 4px 0 var(--pink);
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--head-font);
  font-weight: 600;
  max-width: calc(100% - 32px);
  animation: pop 0.3s ease;
}
@keyframes pop {
  from { transform: translateX(-50%) scale(0.6); opacity: 0; }
  to   { transform: translateX(-50%) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
  header::before, .star, .toast, button.primary:hover:not(:disabled) { animation: none; }
  .item, button { transition: none; }
}
