/* Kouwekant.nl — palet geleend van de foto:
   betonwit, terrastafel-zwart, bordeauxjas, legergroene parka, teddy-beige. */
:root {
  --concrete: #e9ebee;
  --column: #f7f7f5;
  --stone: #b9bec6;
  --ink: #1d1f24;
  --muted: #5f6672;
  --burgundy: #8b1e2d;
  --burgundy-dark: #6a1421;
  --parka: #5b6142;
  --teddy: #e3cdb8;
  --ice: #cfe6f5;
  --ice-dark: #3d7fae;
  --sun: #f59e0b;
  --hot: #e4572e;
  --radius: 14px;
  --shadow: 0 2px 4px rgba(20, 24, 32, .06), 0 8px 24px rgba(20, 24, 32, .08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  /* de witte zuilen van het terras */
  background:
    repeating-linear-gradient(90deg, var(--column) 0 46px, #e4e6e9 46px 52px),
    var(--concrete);
}
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -.02em; }
h2 { font-size: 1.2rem; }
a { color: var(--burgundy); }
.muted { color: var(--muted); margin-top: 0; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--burgundy); margin: 0 0 .5em; }
.fineprint { font-size: .85rem; color: var(--muted); }

/* ---------- logo ---------- */
.logo {
  font-weight: 900; letter-spacing: -.04em; font-size: clamp(2.2rem, 6vw, 3.4rem);
  color: var(--ice-dark); margin: 0; text-decoration: none;
}
.logo span { color: var(--burgundy); }
.logo.small { font-size: 1.35rem; white-space: nowrap; }
.tagline { font-size: 1.15rem; margin-top: .2em; }

/* ---------- buttons & forms ---------- */
.btn {
  border: 0; border-radius: 999px; padding: .7em 1.3em; font: inherit; font-weight: 700;
  cursor: pointer; transition: transform .1s ease, box-shadow .2s ease, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-hot { background: linear-gradient(135deg, var(--sun), var(--hot)); color: white; box-shadow: 0 4px 14px rgba(228, 87, 46, .35); }
.btn-hot:hover { box-shadow: 0 6px 20px rgba(228, 87, 46, .5); }
.btn-ghost { background: white; color: var(--ink); border: 1px solid var(--stone); }
.btn-small { padding: .35em .8em; font-size: .85rem; }
.btn-link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }
.btn-icon { background: none; border: 0; cursor: pointer; font-size: 1rem; opacity: .5; padding: .2em .4em; }
.btn-icon:hover { opacity: 1; }

input, textarea, select {
  font: inherit; padding: .65em .8em; border: 1px solid var(--stone); border-radius: 10px;
  background: white; width: 100%; color: var(--ink);
}
input:focus, textarea:focus { outline: 3px solid var(--ice); border-color: var(--ice-dark); }
label { display: grid; gap: .3em; font-weight: 600; font-size: .9rem; }
.stack { display: grid; gap: .9rem; }
.form-inline { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; }
.form-inline > input { flex: 1 1 200px; }
.form-inline > label { flex: 0 1 170px; }
.form-error { color: var(--burgundy); font-weight: 600; min-height: 1.2em; margin: 0; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; }
.login-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; align-items: center;
  background: rgba(255, 255, 255, .92); border-radius: 24px; padding: 2.5rem; box-shadow: var(--shadow);
  max-width: 900px; width: 100%;
}
@media (max-width: 760px) { .login-card { grid-template-columns: 1fr; padding: 1.5rem; } }

/* ---------- polaroid ---------- */
.polaroid { background: white; padding: 12px 12px 4px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); border-radius: 4px; }
.polaroid img { display: block; width: 100%; height: auto; border-radius: 2px; filter: saturate(.85) contrast(1.05); }
.polaroid-caption { font-family: "Comic Sans MS", "Marker Felt", "Segoe Print", cursive; text-align: center; margin: .5em 0; color: var(--muted); }
.tilt-left { transform: rotate(-3deg); }
.tilt-right { transform: rotate(2.5deg); }
.polaroid { transition: transform .4s ease, filter .4s ease; }
.polaroid:hover { transform: rotate(0) scale(1.02); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1rem;
  padding: .7rem 1.2rem; background: rgba(29, 31, 36, .94); color: white; backdrop-filter: blur(6px);
}
.topbar .logo { color: var(--ice); }
.topbar .logo span { color: #ff8c94; }
.tabs { display: flex; gap: .25rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs a {
  color: #d5d8de; text-decoration: none; padding: .5em .85em; border-radius: 999px; white-space: nowrap; font-weight: 600; font-size: .95rem;
}
.tabs a:hover { background: rgba(255, 255, 255, .08); color: white; }
.tabs a.active { background: var(--burgundy); color: white; }
.me { display: flex; gap: .6rem; align-items: center; white-space: nowrap; font-size: .9rem; }
.me .btn-link { color: #aab0ba; }
@media (max-width: 900px) {
  .tabs a span { display: none; }
  .tabs a { font-size: 1.3rem; padding: .3em .55em; }
}
@media (max-width: 520px) {
  .topbar { flex-wrap: wrap; }
  .topbar .logo { flex: 1; }
  .tabs { order: 3; flex-basis: 100%; justify-content: space-around; }
}

main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.page { display: none; animation: thaw .35s ease; }
.page.active { display: grid; gap: 1.2rem; grid-template-columns: minmax(0, 1fr); }
@keyframes thaw { from { opacity: 0; transform: translateY(8px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
.page-head { background: rgba(255, 255, 255, .85); border-radius: var(--radius); padding: 1.3rem 1.5rem; }
.page-head .lead { margin: 0; }

.card { background: white; border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow); }
.grid-3 { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 2rem; align-items: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, .95), rgba(227, 205, 184, .55));
  border-radius: 24px; padding: 2rem; box-shadow: var(--shadow);
}
@media (max-width: 760px) { .hero { grid-template-columns: 1fr; padding: 1.3rem; } }
.countdown { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }
.countdown .unit { background: var(--ink); color: white; border-radius: 12px; padding: .6rem .9rem; text-align: center; min-width: 74px; }
.countdown .num { font-size: 1.8rem; font-weight: 800; display: block; font-variant-numeric: tabular-nums; }
.countdown .lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: #c8ccd3; }
.countdown .pending { background: var(--ice); color: var(--ice-dark); border-radius: 12px; padding: .8rem 1rem; font-weight: 600; }

/* ---------- thermometer ---------- */
.thermo { display: flex; flex-direction: column; align-items: center; margin: .6rem 0; }
.thermo-tube { width: 26px; height: 150px; background: #eef1f4; border: 3px solid var(--stone); border-bottom: 0; border-radius: 14px 14px 0 0; position: relative; overflow: hidden; }
.thermo-fill { position: absolute; bottom: 0; left: 0; right: 0; height: 0; background: linear-gradient(to top, var(--ice-dark), var(--sun), var(--hot)); background-size: 100% 150px; background-position: bottom; transition: height 1s ease; }
.thermo-bulb { width: 48px; height: 48px; border-radius: 50%; background: var(--hot); border: 3px solid var(--stone); margin-top: -4px; }
.thermo-label { text-align: center; font-weight: 700; margin: .3rem 0 0; }

/* ---------- moods ---------- */
.moods { display: grid; gap: .5rem; }
.mood {
  display: flex; align-items: center; gap: .7rem; text-align: left; background: #f6f7f9; border: 2px solid transparent;
  border-radius: 12px; padding: .5rem .8rem; cursor: pointer; font: inherit;
}
.mood:hover { background: #eef0f3; }
.mood.active { border-color: var(--burgundy); background: #fbf1f2; }
.mood .emo { font-size: 1.5rem; }
.mood small { display: block; color: var(--muted); }

/* ---------- members ---------- */
.members { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.members li { display: flex; align-items: center; gap: .5rem; background: #f6f7f9; border-radius: 999px; padding: .35rem .9rem .35rem .4rem; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: white; font-size: .9rem; flex: none; }
.members .mood-emo { font-size: 1.1rem; }

/* ---------- summary ---------- */
.summary-row { display: flex; justify-content: space-between; gap: .5rem; padding: .45rem 0; border-bottom: 1px dashed #e1e3e7; }
.summary-row:last-child { border-bottom: 0; }
.summary-row strong { text-align: right; }
.locked { color: var(--parka); }

/* ---------- list (destinations) ---------- */
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; counter-reset: rank; }
.dest { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; position: relative; overflow: hidden; }
.dest::before {
  counter-increment: rank; content: counter(rank);
  font-weight: 900; font-size: 1.6rem; color: var(--stone); width: 2ch; text-align: center;
}
.dest.chosen { outline: 3px solid var(--sun); }
.dest.chosen::after { content: "GEKOZEN ☀️"; position: absolute; top: 10px; right: -34px; transform: rotate(35deg); background: var(--sun); color: white; font-weight: 800; font-size: .7rem; padding: .2rem 2.4rem; }
.dest h3 { margin: 0; font-size: 1.15rem; }
.dest p { margin: .2rem 0; color: var(--muted); }
.dest .meta { font-size: .8rem; color: var(--muted); display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.temp-bar { height: 8px; border-radius: 999px; background: #eef1f4; overflow: hidden; margin-top: .5rem; display: flex; }
.temp-bar .warm { background: linear-gradient(90deg, var(--sun), var(--hot)); }
.temp-bar .cold { background: var(--ice-dark); margin-left: auto; }
.vote { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.vote button { background: #f3f4f6; border: 2px solid transparent; border-radius: 12px; font-size: 1.3rem; padding: .2rem .5rem; cursor: pointer; }
.vote button.on.warm { background: #fff1e6; border-color: var(--hot); }
.vote button.on.cold { background: var(--ice); border-color: var(--ice-dark); }
.vote .score { font-weight: 900; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.voters { font-size: .8rem; color: var(--muted); }

/* ---------- datumprikker ---------- */
.table-wrap { overflow-x: auto; background: white; border-radius: var(--radius); box-shadow: var(--shadow); }
.prikker { border-collapse: collapse; width: 100%; min-width: 520px; }
.prikker th, .prikker td { padding: .6rem .7rem; border-bottom: 1px solid #edf0f3; text-align: center; vertical-align: middle; }
.prikker th:first-child, .prikker td:first-child { text-align: left; position: sticky; left: 0; background: white; }
.prikker thead th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.prikker .period { font-weight: 700; white-space: nowrap; }
.prikker .period small { display: block; font-weight: 400; color: var(--muted); }
.prikker .cell-yes { background: #fff3e0; }
.prikker .cell-maybe { background: #fafafa; }
.prikker .cell-no { background: #eaf4fb; }
.prikker tr.best td { box-shadow: inset 0 0 0 9999px rgba(245, 158, 11, .08); }
.prikker tr.chosen td:first-child { border-left: 5px solid var(--sun); }
.answer { display: inline-flex; gap: .2rem; }
.answer button { border: 2px solid transparent; background: #f3f4f6; border-radius: 10px; cursor: pointer; font-size: 1.1rem; padding: .15rem .35rem; }
.answer button.on { border-color: var(--ink); background: white; }
.tally { font-weight: 800; white-space: nowrap; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }

/* ---------- tasks ---------- */
.tasks { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.task { display: flex; gap: .8rem; align-items: center; background: white; border-radius: 12px; padding: .7rem 1rem; box-shadow: var(--shadow); }
.task input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--parka); flex: none; }
.task .title { flex: 1; }
.task.done .title { text-decoration: line-through; color: var(--muted); }
button.who { border: 0; cursor: pointer; font: inherit; }
.empty-wide { grid-column: 1 / -1; }
.task .who { background: #eef1e6; color: var(--parka); border-radius: 999px; padding: .15rem .6rem; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.task .who.nobody { background: #fbeaec; color: var(--burgundy); }
.task .due { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.task .due.late { color: var(--burgundy); font-weight: 700; }

/* ---------- messages ---------- */
.messages { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.note {
  background: #fff8c5; padding: 1rem 1.1rem 1.3rem; border-radius: 3px; box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
  position: relative; white-space: pre-wrap; word-wrap: break-word;
}
.note:nth-child(3n+1) { transform: rotate(-1deg); }
.note:nth-child(3n+2) { transform: rotate(1.2deg); background: #e3f1fb; }
.note:nth-child(3n) { transform: rotate(-.4deg); background: #fde7e9; }
.note::before { content: "📌"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-size: 1.3rem; }
.note .meta { font-size: .8rem; color: var(--muted); margin-top: .8rem; display: flex; justify-content: space-between; align-items: center; white-space: normal; }

/* ---------- footer, toast, snow ---------- */
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 1rem 1rem 2rem; }
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, calc(100% + 3rem)); visibility: hidden; background: var(--ink); color: white;
  padding: .8rem 1.2rem; border-radius: 12px; box-shadow: var(--shadow); transition: transform .3s ease, visibility .3s; z-index: 50; max-width: 90vw;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast.error { background: var(--burgundy); }

.snow { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.flake { position: absolute; top: -20px; color: white; text-shadow: 0 0 3px rgba(61, 127, 174, .5); animation: fall linear forwards; user-select: none; }
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }
#app, .login { position: relative; z-index: 1; }

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

/* ---------- campings ---------- */
details summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: .9rem; }
details textarea { margin-top: .6rem; }
.compare-wrap { max-height: none; }
.compare { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
.compare th, .compare td { padding: .6rem .8rem; border-bottom: 1px solid #edf0f3; vertical-align: top; text-align: left; width: 260px; max-width: 260px; font-size: .92rem; }
.compare .rowhead { position: sticky; left: 0; z-index: 2; background: #fafbfc; width: 150px; min-width: 150px; max-width: 150px; font-size: .85rem; color: var(--muted); font-weight: 700; border-right: 1px solid #edf0f3; }
.compare thead th { background: white; vertical-align: top; }
.compare thead .rowhead { background: white; }
.camping-col.chosen { box-shadow: inset 0 4px 0 var(--sun); }
.camping-img { display: block; width: 100%; height: 120px; object-fit: cover; border-radius: 10px; background: #eef1f4; }
.camping-img.placeholder { display: grid; place-items: center; font-size: 2.5rem; }
.camping-title { font-size: 1.05rem; font-weight: 800; margin-top: .5rem; color: var(--ink); }
.camping-title a { color: var(--ink); text-decoration: none; }
.camping-title a:hover { text-decoration: underline; }
.chosen-badge { display: inline-block; background: var(--sun); color: white; font-size: .65rem; font-weight: 800; padding: .1rem .5rem; border-radius: 999px; margin-right: .4rem; vertical-align: middle; }
.camping-loc { color: var(--muted); font-size: .82rem; font-weight: 500; margin-top: .15rem; }
.vote-row { flex-direction: row; justify-content: flex-start; gap: .5rem; margin-top: .5rem; }
.camping-actions { margin-top: .3rem; display: flex; gap: .1rem; }
.cell-sub { color: var(--muted); font-size: .82rem; }
.compare td.best { background: #fff3e0; }
.compare td.best::after { content: " 🏆"; }
.compare td.st-yes { background: #f3f8ec; }
.compare td.st-no { background: #fdf1f2; }
.status { font-size: 1.05rem; }
.proscons { margin: 0; padding-left: 1.1rem; }
.proscons li { margin: .15rem 0; }
.pros li::marker { content: "＋ "; color: #2f855a; font-weight: 800; }
.cons li::marker { content: "－ "; color: var(--burgundy); font-weight: 800; }
.pending-cell { background: repeating-linear-gradient(45deg, #f6f7f9 0 10px, #eef1f4 10px 20px); }
.spinner { display: inline-block; animation: pulse 1.2s ease-in-out infinite; font-weight: 600; }
@keyframes pulse { 50% { opacity: .4; } }
.failed-cell { color: var(--burgundy); font-size: .85rem; }
.compare tfoot td, .compare tfoot th { border-bottom: 0; }

.dialog { border: 0; border-radius: 18px; padding: 1.5rem; width: min(720px, 94vw); max-height: 90vh; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.dialog::backdrop { background: rgba(29, 31, 36, .55); backdrop-filter: blur(2px); }
.edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.edit-grid .wide { grid-column: 1 / -1; }
.feature-edit { display: grid; grid-template-columns: 130px 1fr; gap: .4rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .6rem; }
@media (max-width: 600px) {
  .compare th, .compare td { width: 210px; max-width: 210px; padding: .5rem .6rem; }
  .compare .rowhead { width: 96px; min-width: 96px; max-width: 96px; font-size: .78rem; }
  .camping-img { height: 90px; }
}
