/* ---------- thema's ---------- */
:root, [data-theme="camping"] {
  --bg: #f4efe3; --bg2: #fffaf0; --card: #ffffff; --ink: #1f2a1f; --muted: #6b705c; --line: #e4dccb;
  --brand: #2f5d3a; --brand-ink: #fff; --accent: #f28c28; --accent-ink: #fff;
  --free: #3fae5a; --later: #f2c14e; --taken: #4a7bd0; --closed: #9aa0a6;
  --radius: 22px; --radius-sm: 14px; --shadow: 0 2px 0 rgba(31,42,31,.08), 0 8px 24px rgba(31,42,31,.06);
  --font: 'Nunito', system-ui, sans-serif; --display: 'Fredoka', system-ui, sans-serif;
  --pattern: radial-gradient(circle at 20% 0%, #e8f0dc 0, transparent 40%), radial-gradient(circle at 100% 30%, #fde7cf 0, transparent 35%);
}
[data-theme="retro"] {
  --bg: #f6e7c8; --bg2: #fbf1dc; --card: #fffaf0; --ink: #3b2416; --muted: #8a6a4f; --line: #e8d2a8;
  --brand: #c8541e; --brand-ink: #fff8ec; --accent: #e3a72f; --accent-ink: #3b2416;
  --free: #6f8f3a; --later: #e3a72f; --taken: #2f6f73; --closed: #b39b80;
  --radius: 28px; --radius-sm: 16px; --shadow: 4px 4px 0 #3b2416;
  --font: 'Nunito', system-ui, sans-serif; --display: 'Shrikhand', serif;
  --pattern: repeating-linear-gradient(180deg, transparent 0 46px, rgba(200,84,30,.06) 46px 52px, rgba(227,167,47,.08) 52px 58px);
}
[data-theme="strak"] {
  --bg: #f6f7f9; --bg2: #ffffff; --card: #ffffff; --ink: #111827; --muted: #6b7280; --line: #e5e7eb;
  --brand: #1f4fd6; --brand-ink: #fff; --accent: #111827; --accent-ink: #fff;
  --free: #16a34a; --later: #d97706; --taken: #2563eb; --closed: #9ca3af;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 0 rgba(0,0,0,.03);
  --font: 'Inter', system-ui, sans-serif; --display: 'Inter', system-ui, sans-serif;
  --pattern: none;
}
[data-theme="nacht"] {
  --bg: #15130f; --bg2: #1e1a14; --card: #241f18; --ink: #f6ead7; --muted: #b3a48c; --line: #3a3127;
  --brand: #ff8a3d; --brand-ink: #1a1209; --accent: #ffcf5c; --accent-ink: #1a1209;
  --free: #7ad67f; --later: #ffcf5c; --taken: #7aa7ff; --closed: #6c6255;
  --radius: 20px; --radius-sm: 12px; --shadow: 0 0 0 1px #3a3127, 0 10px 30px rgba(0,0,0,.4);
  --font: 'Nunito', system-ui, sans-serif; --display: 'Fredoka', system-ui, sans-serif;
  --pattern: radial-gradient(circle at 50% -10%, rgba(255,138,61,.25) 0, transparent 50%);
}
/* swatches in de themakiezer tonen elk hun eigen kleuren */
[data-theme-swatch="camping"] .sw { background: linear-gradient(135deg, #2f5d3a 50%, #f28c28 50%); }
[data-theme-swatch="retro"] .sw { background: linear-gradient(135deg, #c8541e 33%, #e3a72f 33% 66%, #3b2416 66%); }
[data-theme-swatch="strak"] .sw { background: linear-gradient(135deg, #1f4fd6 50%, #f6f7f9 50%); }
[data-theme-swatch="nacht"] .sw { background: linear-gradient(135deg, #15130f 50%, #ff8a3d 50%); }

/* ---------- basis ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); background-image: var(--pattern); background-attachment: fixed; color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .4em; font-weight: 600; }
[data-theme="retro"] h1, [data-theme="retro"] h2 { font-weight: 400; letter-spacing: .01em; }
h1 { font-size: 1.8rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; margin-top: 1.1em; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
p { margin: 0 0 .8em; }
a { color: var(--brand); cursor: pointer; text-decoration: none; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .tiny { font-size: .78rem; }
.lead { font-size: 1.08rem; }
.center { text-align: center; } .center .avatar { margin: 0 auto 10px; }
.grow { flex: 1; min-width: 0; }
.grow small, .row small { display: block; color: var(--muted); font-size: .82rem; }

/* ---------- knoppen & velden ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-direction: column; border: 0; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font: 700 1rem var(--font); padding: 12px 20px; cursor: pointer; text-align: center; box-shadow: var(--shadow); transition: transform .08s; }
.btn:active { transform: scale(.97); }
.btn.big { width: 100%; padding: 16px 20px; font-size: 1.08rem; }
.btn.big small { font-weight: 500; opacity: .8; font-size: .8rem; }
.btn.sm { padding: 8px 14px; font-size: .88rem; flex-direction: row; }
.btn.ghost { background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn:disabled { opacity: .5; }
.btn.danger, .link.danger { color: #c0392b; }
.link { background: none; border: 0; font: 600 .92rem var(--font); color: var(--brand); padding: 6px 0; cursor: pointer; display: inline-block; }
.input { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--bg2); color: var(--ink); font: 1rem var(--font); margin-top: 4px; }
.input:focus { outline: none; border-color: var(--brand); }
.input.sm { padding: 8px 12px; font-size: .9rem; margin: 0; }
label { display: block; font-weight: 700; font-size: .9rem; margin: 10px 0; }
.stack { display: grid; gap: 12px; margin: 20px 0; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.note { background: color-mix(in srgb, var(--accent) 16%, var(--card)); border-radius: var(--radius-sm); padding: 10px 14px; font-size: .92rem; }

/* ---------- landing & onboarding ---------- */
.landing { padding: 40px 20px 60px; text-align: center; }
.landing.left { text-align: left; }
.display { font-family: var(--display); font-size: 3rem; margin: 10px 0; color: var(--brand); }
.display.sm { font-size: 1.9rem; color: var(--ink); }
.hero-art { font-size: 3rem; margin: 10px 0; letter-spacing: 6px; }
.hero-art .avatar { margin: 0 auto; }
.back { display: inline-block; margin-bottom: 12px; font-weight: 700; }
.badge-sign { display: inline-flex; flex-direction: column; background: var(--brand); color: var(--brand-ink); padding: 16px 28px 18px; border-radius: var(--radius); box-shadow: var(--shadow); transform: rotate(-2deg); margin-top: 10px; }
.badge-sign span { font-size: .85rem; text-transform: uppercase; letter-spacing: .15em; opacity: .85; }
.badge-sign b { font-family: var(--display); font-size: 2.2rem; line-height: 1.1; font-weight: 600; }
[data-theme="retro"] .badge-sign b { font-weight: 400; }
.badge-sign small { opacity: .85; }
.bullets { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.bullets li { background: var(--card); padding: 12px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.bullets.small li { box-shadow: none; background: var(--bg2); padding: 8px 12px; font-size: .92rem; }
.progress { height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 18px; }
.progress i { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.avatar-preview { display: flex; justify-content: center; margin: 10px 0; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin: 12px 0; }
.emoji-grid button { font-size: 1.5rem; aspect-ratio: 1; border: 2px solid transparent; border-radius: 12px; background: var(--card); cursor: pointer; padding: 0; }
.emoji-grid button.on { border-color: var(--brand); transform: scale(1.08); }
.emoji-grid.small { grid-template-columns: repeat(8, 1fr); }
.color-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.color-row button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.color-row button.on { border-color: var(--ink); }
.seg { display: flex; background: var(--line); border-radius: 999px; padding: 4px; margin: 12px 0; }
.seg button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 999px; font: 700 .92rem var(--font); color: var(--ink); cursor: pointer; }
.seg button.on { background: var(--card); box-shadow: var(--shadow); }
.choice { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font: inherit; color: inherit; cursor: pointer; margin: 0 0 8px; }
.choice.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--card)); }
.choice .ic { font-size: 1.8rem; }
.choice small { display: block; color: var(--muted); font-weight: 400; }
.choice input[type=date] { font: inherit; border: 1px solid var(--line); border-radius: 6px; padding: 2px 4px; background: var(--bg2); color: var(--ink); }
.picked { margin: 8px 0 14px; }
.demo-box { margin-top: 28px; padding: 14px; border: 2px dashed var(--line); border-radius: var(--radius-sm); font-size: .9rem; }
.demo-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.demo-row button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; color: var(--ink); font: .75rem var(--font); }

/* ---------- app-frame ---------- */
.top { position: sticky; top: 0; z-index: 500; display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; background: var(--brand); border-radius: 12px; font-size: 1.3rem; }
.brand b { display: block; font-family: var(--display); font-size: 1.1rem; font-weight: 600; line-height: 1.1; }
[data-theme="retro"] .brand b { font-weight: 400; }
.brand small { color: var(--muted); font-size: .75rem; }
.page { padding: 4px 16px 110px; }
.page > section { margin-bottom: 18px; }
.tabs { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; z-index: 600; display: flex; background: var(--card); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: .7rem; font-weight: 700; color: var(--muted); padding: 4px 0; border-radius: 12px; }
.tabs a span { font-size: 1.35rem; line-height: 1.2; filter: grayscale(.6); }
.tabs a.on { color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
.tabs a.on span { filter: none; }
.design-fab { position: fixed; left: 12px; bottom: 84px; z-index: 700; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 1.3rem; box-shadow: var(--shadow); cursor: pointer; }
.landing ~ .design-fab, .landing + .design-fab { bottom: 16px; }

/* ---------- kaarten ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
[data-theme="retro"] .card { border: 2px solid #3b2416; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 800; color: var(--muted); margin: 0 0 4px; }
.greet h1 { font-size: 1.6rem; margin-top: 6px; }
.hero-card.nudge { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, var(--card)), var(--card)); }
.hero-card.nudge h2 { animation: wiggle 3s ease-in-out infinite; transform-origin: left; }
@keyframes wiggle { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-1.2deg); } 96% { transform: rotate(1.2deg); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { border: 2px solid var(--brand); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 14px; font: 700 .9rem var(--font); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.chip small { color: var(--accent); font-weight: 800; }
[data-theme="nacht"] .chip small, [data-theme="retro"] .chip small { color: var(--brand); }
.chip:active { background: var(--brand); color: var(--brand-ink); }
.chips.small .chip { padding: 6px 12px; font-size: .82rem; border-width: 1.5px; }
.find-card { text-align: center; }
.big-num { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin-bottom: 12px; }
.big-num b { font-family: var(--display); font-size: 3.4rem; color: var(--free); line-height: 1; }
.score-card { cursor: pointer; background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 14%, var(--card)), var(--card)); }
.score-top { display: flex; gap: 12px; align-items: center; }
.score-top h2 { margin: 0; }
.rank-ic { font-size: 2.4rem; }
.pts { margin-left: auto; text-align: right; }
.pts b { font-family: var(--display); font-size: 1.8rem; display: block; line-height: 1; }
.pts small { color: var(--muted); font-size: .72rem; }
.bar { height: 10px; background: var(--line); border-radius: 9px; overflow: hidden; margin: 14px 0 6px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--brand)); border-radius: 9px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; text-align: center; }
.stats span { background: var(--bg2); border-radius: var(--radius-sm); padding: 8px 4px; font-family: var(--display); font-size: 1.3rem; }
.stats small { display: block; font-family: var(--font); font-size: .72rem; color: var(--muted); }

.list { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; background: var(--card); padding: 10px 12px; border-radius: var(--radius-sm); box-shadow: var(--shadow); color: var(--ink); border: 0; font: inherit; text-align: left; width: 100%; }
button.row { cursor: pointer; }
.card .row { box-shadow: none; background: var(--bg2); }
.pill { display: inline-block; font: 800 .7rem var(--font); text-transform: uppercase; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; vertical-align: middle; }
.pill.free { background: color-mix(in srgb, var(--free) 22%, transparent); color: color-mix(in srgb, var(--free) 70%, var(--ink)); }
.pill.later { background: color-mix(in srgb, var(--later) 28%, transparent); color: color-mix(in srgb, var(--later) 50%, var(--ink)); }
.pill.taken { background: color-mix(in srgb, var(--taken) 20%, transparent); color: color-mix(in srgb, var(--taken) 70%, var(--ink)); }
.pill.closed { background: var(--line); color: var(--muted); }
.avatar { width: var(--s); height: var(--s); min-width: var(--s); border-radius: 50%; display: inline-grid; place-items: center; font-size: calc(var(--s) * .55); object-fit: cover; box-shadow: 0 0 0 2px var(--card); line-height: 1; }
.empty { text-align: center; padding: 20px; }

/* ---------- kaart ---------- */
.map { height: 340px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin: 8px 0; z-index: 1; }
.map.tall { height: 56vh; min-height: 360px; }
.map-head { display: flex; align-items: center; justify-content: space-between; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: .78rem; font-weight: 700; }
.lg::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.lg.vrij::before { background: var(--free); } .lg.straks::before { background: var(--later); } .lg.bezet::before { background: var(--taken); } .lg.dicht::before { background: var(--closed); }
.leaflet-container { font-family: var(--font); background: #c9c3b5; }
path.spot { stroke: #fff; fill-opacity: .75; cursor: pointer; }
path.spot.vrij { fill: var(--free); } path.spot.straks { fill: var(--later); } path.spot.bezet { fill: var(--taken); } path.spot.dicht { fill: var(--closed); fill-opacity: .55; }
path.spot.mine { stroke: var(--accent); stroke-width: 4; }
path.spot.open { fill: #fff; fill-opacity: .45; stroke-dasharray: 4 3; }
path.spot.taken { fill: var(--closed); fill-opacity: .6; }
path.spot.sel { fill: var(--accent); fill-opacity: .9; stroke: #fff; stroke-width: 3; }
.leaflet-tooltip.spot-label { background: none; border: 0; box-shadow: none; padding: 0; font: 800 12px var(--font); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); }
.leaflet-tooltip.spot-label::before { display: none; }
.house-nr { font: 700 10px var(--font); color: #fff; background: rgba(0,0,0,.55); border-radius: 4px; text-align: center; line-height: 16px; }
.admin-map-tools { display: flex; gap: 10px; align-items: center; }
.leaflet-control-layers { border-radius: 12px !important; }

/* ---------- plek-detail & tijden ---------- */
.spot-head { display: flex; gap: 14px; align-items: center; }
.spot-head h1 { margin: 0; }
.week { display: grid; gap: 6px; }
.week-row { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 8px; color: var(--ink); font-size: .82rem; font-weight: 700; padding: 2px 4px; border-radius: 8px; }
.week-row.on { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.week.mini .week-row { grid-template-columns: 70px 1fr; font-size: .75rem; }
.daybar { position: relative; height: 18px; background: var(--line); border-radius: 6px; overflow: hidden; }
.daybar i { position: absolute; top: 0; bottom: 0; }
.daybar i.free { background: var(--free); }
.daybar i.taken { background: repeating-linear-gradient(45deg, var(--taken) 0 5px, color-mix(in srgb, var(--taken) 70%, #fff) 5px 10px); }
.daybar b.now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--accent); }
.axis { display: flex; justify-content: space-between; margin-left: 90px; font-size: .7rem; color: var(--muted); }
.when { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; align-items: end; }
.when label { margin: 6px 0; }
.spot-card .spot-title { display: flex; align-items: center; gap: 10px; }
.spot-card .spot-title h2 { margin: 0; }
details summary { cursor: pointer; font-weight: 700; color: var(--brand); margin: 6px 0; }
.day-chips { display: flex; gap: 6px; margin: 8px 0; }
.day-chips button { flex: 1; padding: 8px 0; border-radius: 10px; border: 2px solid var(--line); background: var(--card); font: 700 .82rem var(--font); color: var(--ink); cursor: pointer; }
.day-chips button.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.sched.off { opacity: .45; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--free); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch-row { display: flex; justify-content: space-between; align-items: center; }

/* ---------- prikbord ---------- */
.post { background: var(--card); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow); }
.post header { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.post header small { display: block; color: var(--muted); font-size: .75rem; }
.post p { margin: 0 0 6px; }
.post.thanks { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--card)), var(--card)); }
.post .gift { font-size: 2rem; }
.post.system { display: flex; gap: 8px; align-items: center; font-size: .85rem; background: transparent; box-shadow: none; padding: 4px 6px; color: var(--muted); }
.post.system b { color: var(--ink); }
.post footer { display: flex; gap: 6px; }
.react { border: 1px solid var(--line); background: var(--bg2); border-radius: 999px; padding: 3px 9px; font-size: .85rem; cursor: pointer; color: var(--ink); }
.react.on { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--card)); }
.reply { display: flex; gap: 8px; align-items: center; font-size: .88rem; margin-top: 8px; padding-left: 8px; }
.reply-form { display: flex; gap: 6px; margin-top: 8px; }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer .input { margin: 0; }

/* ---------- ranglijst ---------- */
.podium { display: grid; grid-template-columns: 1fr 1.2fr 1fr; align-items: end; gap: 8px; text-align: center; margin: 18px 0; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.pod b { font-size: .9rem; } .pod small { color: var(--muted); font-weight: 700; }
.pod .block { width: 100%; background: var(--brand); color: var(--brand-ink); font-family: var(--display); font-size: 1.6rem; border-radius: var(--radius-sm) var(--radius-sm) 0 0; margin-top: 4px; }
.pod.p1 .block { height: 90px; background: var(--accent); color: var(--accent-ink); }
.pod.p2 .block { height: 64px; } .pod.p3 .block { height: 44px; opacity: .85; }
.pod .crown { position: absolute; top: -22px; font-size: 1.6rem; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.row.lb .pos { font-family: var(--display); font-size: 1.1rem; width: 22px; text-align: center; color: var(--muted); }
.row.lb .pts { font-family: var(--display); white-space: nowrap; }
.row.lb.me { outline: 2px solid var(--accent); }
.ranks { display: grid; gap: 6px; }
.ranks span { display: flex; justify-content: space-between; background: var(--bg2); padding: 6px 10px; border-radius: 10px; font-weight: 700; font-size: .9rem; }
.ranks small { color: var(--muted); }

/* ---------- admin ---------- */
.tabs-inline { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.tabs-inline a { white-space: nowrap; padding: 8px 12px; border-radius: 999px; background: var(--card); color: var(--ink); font-weight: 700; font-size: .85rem; border: 2px solid var(--line); }
.tabs-inline a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
pre.wa { white-space: pre-wrap; background: #dcf8c6; color: #111; border-radius: 12px; padding: 12px 14px; font: .9rem/1.45 system-ui, sans-serif; }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.theme-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: var(--card); color: var(--ink); text-align: left; cursor: pointer; font: inherit; margin: 0; }
.theme-card input { display: none; }
.theme-card:has(input:checked) { border-color: var(--brand); }
.theme-card .sw { height: 44px; border-radius: 10px; }
.theme-card small { color: var(--muted); font-weight: 400; font-size: .78rem; }
select.input { appearance: auto; }
input[type=range] { width: 100%; }

/* ---------- overlays ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,0); display: flex; align-items: flex-end; justify-content: center; transition: background .25s; }
.sheet-wrap.in { background: rgba(0,0,0,.35); }
.sheet { width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto; background: var(--bg); border-radius: var(--radius) var(--radius) 0 0; padding: 10px 18px calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .25s ease-out; }
.sheet-wrap.in .sheet { transform: none; }
.sheet-grip { width: 44px; height: 5px; background: var(--line); border-radius: 9px; margin: 0 auto 14px; }
.sheet .map { height: 300px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-weight: 700; z-index: 2000; transition: .25s; max-width: 90vw; text-align: center; }
.toast.in { opacity: 1; transform: translate(-50%, 0); }
.confetti { position: fixed; top: -40px; z-index: 3000; pointer-events: none; animation: fall 2.4s ease-in forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }

@media (min-width: 560px) {
  #app { box-shadow: 0 0 0 1px var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent); }
}
.drag-handle { display: grid; place-items: center; background: var(--accent); color: #fff; border: 2px solid #fff; border-radius: 50%; font-size: 18px; box-shadow: 0 2px 6px rgba(0,0,0,.4); cursor: grab; }
.admin-map-tools { flex-wrap: wrap; }
.drag-handle.turn { background: var(--brand); font-size: 16px; }
.map-wrap { position: relative; }
.spot-editor { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 900; background: var(--card); border-radius: var(--radius-sm); box-shadow: 0 6px 24px rgba(0,0,0,.3); padding: 10px 12px; display: grid; gap: 8px; }
.spot-editor label { margin: 0; font-size: .78rem; }
.spot-editor .input { padding: 8px 10px; margin-top: 2px; }
.ed-row { display: flex; gap: 8px; align-items: end; }
.ed-name { flex: 0 0 34%; } .ed-owner { flex: 1; min-width: 0; }
.ed-row.rot { align-items: center; justify-content: space-between; }
.ed-row.rot span { font-weight: 800; min-width: 44px; text-align: center; }
.ed-row #ok { margin-left: auto; }
.row.danger { color: #c0392b; }
[hidden] { display: none !important; }
.btn.danger-fill { background: #c0392b; color: #fff; }
/* toasts en confetti mogen nooit een tik op een knop eronder opvangen */
.toast { pointer-events: none; }
.card.left { text-align: left; display: grid; gap: 10px; }
.install-card { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; position: relative; }
.install-card img { border-radius: 12px; }
.install-card p { margin: 2px 0 0; }
.install-card .x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: var(--muted); font-size: 14px; cursor: pointer; }
.install-card .btn { margin-right: 14px; }
.steps { padding-left: 20px; line-height: 1.9; }
.ios-share { display: inline-block; border: 1.5px solid currentColor; border-radius: 4px; padding: 0 4px; font-size: 12px; }
.code-form { display: grid; gap: 8px; margin-top: 8px; }
.input.code { font-size: 24px; letter-spacing: 6px; text-align: center; }
