/* ---------- Tokens ---------- */
:root {
  --accent: #e8799f;
  --on-accent: #fff;
  --p1: #3d8fd1;
  --p2: #e8799f;
  --samen: #e2486f;
  --radius: 22px;
  --radius-sm: 14px;
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
:root, :root[data-mode="light"] {
  --bg: color-mix(in srgb, var(--accent) 6%, #fffaf8);
  --card: #ffffff;
  --ink: #2d2630;
  --muted: #8b8290;
  --line: color-mix(in srgb, var(--accent) 14%, #ece8ea);
  --soft: color-mix(in srgb, var(--accent) 12%, #ffffff);
  --shadow: 0 1px 2px rgba(60, 30, 50, .04), 0 8px 24px rgba(60, 30, 50, .06);
}
:root[data-mode="dark"] {
  --bg: color-mix(in srgb, var(--accent) 5%, #141217);
  --card: #201d25;
  --ink: #f3eef5;
  --muted: #a59cad;
  --line: #322d39;
  --soft: color-mix(in srgb, var(--accent) 18%, #201d25);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}
:root[data-mode="noir"] {
  --bg: #0d0c0b;
  --card: #1a1814;
  --ink: #f5ecd6;
  --muted: #a89b7e;
  --line: #2f2a20;
  --soft: color-mix(in srgb, var(--accent) 16%, #1a1814);
  --shadow: 0 0 0 1px rgba(212, 175, 55, .12), 0 8px 24px rgba(0, 0, 0, .4);
}

/* ---------- Basis ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.45;
  background: var(--bg); color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  transition: background .3s var(--ease), color .3s var(--ease);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h2 { font-size: 1.05rem; font-weight: 800; }
h3 { font-size: .9rem; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

#app {
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 24px);
  max-width: 1120px; margin: 0 auto;
  animation: fade .35s var(--ease);
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Navigatie ---------- */
#nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around; align-items: stretch;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 6px 6px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
#nav[hidden] { display: none; }
#nav .brand { display: none; }
#nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 700; border-radius: 16px;
  transition: color .2s, background .2s;
}
#nav svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
#nav a[data-tab="meer"] svg { fill: currentColor; stroke: none; }
#nav a.active { color: var(--accent); }
#nav a.active svg { transform: translateY(-1px) scale(1.08); }
#nav a[data-tab="wij"].active svg { fill: var(--accent); }

@media (min-width: 900px) {
  #nav {
    top: 0; right: auto; width: 220px; height: auto; flex-direction: column; justify-content: flex-start;
    gap: 4px; padding: 24px 14px; border-top: 0; border-right: 1px solid var(--line);
  }
  #nav .brand { display: block; font-weight: 800; font-size: 1.3rem; padding: 4px 12px 20px; }
  #nav a { flex: 0; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px; font-size: .98rem; }
  #nav a.active { background: var(--soft); }
  body.has-nav #app { margin-left: 220px; padding: 32px 32px 48px; max-width: none; }
  body.has-nav #app > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
}

/* ---------- Kaarten en knoppen ---------- */
.card {
  background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
  margin-bottom: 14px; border: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 999px; font-weight: 800;
  background: var(--accent); color: var(--on-accent);
  transition: transform .15s var(--ease), filter .2s, box-shadow .2s;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn:active { transform: scale(.96); }
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: var(--soft); color: var(--ink); box-shadow: none; }
.btn.danger { background: transparent; color: #d0455f; box-shadow: none; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .88rem; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--soft); font-size: 1.1rem; font-weight: 800; transition: transform .15s var(--ease);
}
.icon-btn:active { transform: scale(.92); }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 4px; gap: 2px; }
.seg button { padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--muted); transition: background .2s, color .2s; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: var(--soft); font-weight: 700; font-size: .88rem; border: 2px solid transparent; transition: all .2s var(--ease);
}
.chip.on { border-color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 16%, var(--card)); }
.chip.off { opacity: .45; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); display: inline-block; flex: none; }
.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); z-index: 15;
  width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  font-size: 1.9rem; font-weight: 700; display: grid; place-items: center;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 40%, transparent);
  transition: transform .2s var(--ease);
}
.fab:active { transform: scale(.9) rotate(90deg); }
@media (min-width: 900px) { .fab { bottom: 28px; right: 32px; } }

/* ---------- Login ---------- */
.login { min-height: 80vh; display: grid; place-items: center; text-align: center; }
.login .card { max-width: 380px; width: 100%; padding: 28px 22px; }
.login h1 { font-size: 1.7rem; margin: 6px 0 4px; }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0 14px; }
.who button {
  padding: 18px 8px; border-radius: var(--radius); background: var(--soft); border: 2px solid transparent;
  font-weight: 800; font-size: 1.05rem; transition: all .2s var(--ease);
}
.who button .av { font-size: 2.2rem; display: block; margin-bottom: 6px; }
.who button.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 15%, var(--card)); transform: translateY(-2px); }
.field { display: grid; gap: 6px; text-align: left; margin-bottom: 14px; }
.field > label, .label { font-weight: 700; font-size: .85rem; color: var(--muted); }
.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--card); outline: none; transition: border .2s;
}
.input:focus { border-color: var(--accent); }
textarea.input { min-height: 80px; resize: vertical; }
.error { color: #d0455f; font-weight: 700; font-size: .9rem; min-height: 1.2em; }

/* ---------- Vandaag ---------- */
.hero { padding: 6px 2px 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hero h1 { font-size: 1.65rem; font-weight: 800; letter-spacing: -.01em; }
.hero .date { color: var(--muted); font-weight: 600; margin-top: 2px; }
.today-grid { display: grid; gap: 14px; }
.today-grid > .card { margin: 0; }
@media (min-width: 760px) {
  .today-grid { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .today-grid .span { grid-column: 1 / -1; }
}
.weather { display: flex; align-items: center; gap: 14px; }
.weather .w-icon { font-size: 2.6rem; line-height: 1; }
.weather .w-temp { font-size: 1.6rem; font-weight: 800; }
.weather .w-tip { font-size: .9rem; color: var(--muted); }
.skeleton { height: 54px; border-radius: 14px; background: linear-gradient(90deg, var(--soft), var(--card), var(--soft)); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.split .col h3 { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.together { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.item-list { display: grid; gap: 6px; }
.item {
  display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--c) 10%, var(--card)); border-left: 4px solid var(--c);
  cursor: pointer; transition: transform .15s var(--ease), opacity .3s;
}
.item:active { transform: scale(.98); }
.item .it-main { flex: 1; min-width: 0; }
.item .it-title { font-weight: 700; font-size: .92rem; overflow-wrap: anywhere; }
.item .it-time { font-size: .78rem; color: var(--muted); font-weight: 600; }
.item.done .it-title { text-decoration: line-through; opacity: .55; }
.check {
  flex: none; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--c);
  display: grid; place-items: center; background: var(--card); transition: all .2s var(--ease); margin-top: 1px;
}
.check svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.4); transition: all .25s var(--ease); }
.done .check { background: var(--c); }
.done .check svg { opacity: 1; transform: scale(1); }
.empty { color: var(--muted); font-size: .88rem; padding: 6px 2px; }

.free-today { font-weight: 700; }
.free-list { display: grid; gap: 8px; margin-top: 10px; }
.free-pill {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left;
  padding: 11px 14px; border-radius: var(--radius-sm); width: 100%;
  background: color-mix(in srgb, var(--samen) 9%, var(--card)); border: 1.5px dashed color-mix(in srgb, var(--samen) 45%, transparent);
  font-weight: 700; transition: transform .15s var(--ease);
}
.free-pill:active { transform: scale(.98); }
.free-pill span:last-child { font-size: .8rem; color: var(--samen); white-space: nowrap; }
.free-banner {
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; font-weight: 700;
  background: linear-gradient(120deg, color-mix(in srgb, var(--p1) 18%, var(--card)), color-mix(in srgb, var(--p2) 22%, var(--card)));
}

/* ---------- Kalender ---------- */
.cal-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cal-title { font-size: 1.35rem; font-weight: 800; }
.cal-title::first-letter { text-transform: uppercase; }
.cal-nav { display: flex; gap: 6px; align-items: center; }
.cal-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.grid-card { padding: 0; overflow: hidden; }
.grid-scroll { overflow: auto; max-height: calc(100vh - 260px); max-height: calc(100dvh - 250px); overscroll-behavior: contain; }
.grid { --hh: 46px; display: grid; grid-template-columns: 46px repeat(var(--days), minmax(var(--colmin, 0px), 1fr)); position: relative; }
.grid.week { --colmin: 104px; min-width: 774px; }
.g-head { position: sticky; top: 0; z-index: 4; background: var(--card); border-bottom: 1px solid var(--line); padding: 8px 4px; text-align: center; cursor: pointer; }
.g-head .dn { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.g-head .dd { font-size: 1.1rem; font-weight: 800; width: 34px; height: 34px; margin: 2px auto 0; border-radius: 50%; display: grid; place-items: center; }
.g-head .lanes { display: grid; grid-template-columns: 1fr 1fr; font-weight: 800; font-size: .9rem; padding: 4px 0; }
.g-head.today .dd { background: var(--accent); color: var(--on-accent); }
.g-corner { position: sticky; top: 0; left: 0; z-index: 6; background: var(--card); border-bottom: 1px solid var(--line); }
.g-allday { border-bottom: 1px solid var(--line); padding: 4px 3px; display: grid; gap: 3px; align-content: start; min-height: 8px; }
.g-allday-label { position: sticky; left: 0; z-index: 3; background: var(--card); font-size: .64rem; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.g-gutter { position: sticky; left: 0; z-index: 3; background: var(--card); }
.g-gutter div { height: var(--hh); font-size: .7rem; color: var(--muted); text-align: right; padding-right: 6px; transform: translateY(-.55em); font-weight: 600; }
.g-col {
  position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hh) - 1px), var(--line) calc(var(--hh) - 1px), var(--line) var(--hh));
}
.g-col.today { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
.g-col .lane-split { position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dotted color-mix(in srgb, var(--line) 70%, transparent); pointer-events: none; }
.ev {
  position: absolute; border-radius: 9px; padding: 3px 5px; overflow: hidden; cursor: pointer;
  background: color-mix(in srgb, var(--c) 20%, var(--card)); border-left: 3px solid var(--c);
  font-size: .74rem; line-height: 1.2; font-weight: 700; z-index: 2;
  transition: transform .15s var(--ease), box-shadow .2s;
}
.ev:hover { box-shadow: 0 4px 12px rgba(0, 0, 0, .12); z-index: 3; }
.ev .t { font-weight: 600; color: var(--muted); font-size: .68rem; display: block; }
.ev.done { opacity: .5; }
.ev.done .ttl { text-decoration: line-through; }
.ev.samen { z-index: 1; }
.chip-ev { font-size: .72rem; font-weight: 700; padding: 3px 6px; border-radius: 7px; background: color-mix(in srgb, var(--c) 20%, var(--card)); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.free-block {
  position: absolute; left: 2px; right: 2px; border-radius: 10px; z-index: 0; cursor: pointer;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--samen) 9%, transparent) 0 8px, transparent 8px 16px);
  border: 1.5px dashed color-mix(in srgb, var(--samen) 40%, transparent);
  font-size: .66rem; font-weight: 800; color: var(--samen); padding: 3px 5px;
}
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--samen); z-index: 4; pointer-events: none; }
.now-line::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--samen); }

.month { display: grid; grid-template-columns: repeat(7, 1fr); }
.month .mh { text-align: center; font-size: .72rem; font-weight: 800; color: var(--muted); padding: 10px 0 6px; text-transform: uppercase; }
.mc {
  min-height: 74px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 4px; cursor: pointer;
  display: flex; flex-direction: column; gap: 3px; transition: background .2s; text-align: left; overflow: hidden;
}
.mc:nth-child(7n + 1) { border-left: 0; }
.mc:hover { background: var(--soft); }
.mc.other { opacity: .4; }
.mc .num { font-weight: 800; font-size: .85rem; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.mc.today .num { background: var(--accent); color: var(--on-accent); }
.mc .row { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.mc .mini { font-size: .66rem; font-weight: 700; padding: 1px 4px; border-radius: 5px; background: color-mix(in srgb, var(--c) 20%, var(--card)); border-left: 2px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: none; }
.mc .heart { font-size: .7rem; margin-left: auto; }
@media (min-width: 700px) {
  .mc { min-height: 104px; }
  .mc .mini { display: block; }
  .mc .dots { display: none; }
}

/* ---------- Sheet / dialog ---------- */
dialog#sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh;
  background: var(--card); color: var(--ink); border-radius: 26px 26px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2);
  overflow: auto;
}
dialog#sheet[open] { animation: up .3s var(--ease); }
dialog#sheet::backdrop { background: rgba(30, 15, 25, .35); backdrop-filter: blur(2px); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
@media (min-width: 700px) { dialog#sheet { margin: auto; border-radius: 26px; } }
.sheet-inner { padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); }
.grabber { width: 42px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 12px; }
.sheet-inner h2 { font-size: 1.25rem; margin-bottom: 16px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-grid .chip { justify-content: center; padding: 9px 6px; font-size: .82rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-weight: 700; }
.toggle { position: relative; width: 50px; height: 30px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: var(--line); transition: background .2s; }
.toggle span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.toggle input:checked + span { background: var(--accent); }
.toggle input:checked + span::after { transform: translateX(20px); }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.sheet-actions .btn:not(.danger) { flex: 1; }
.note-hint { font-size: .8rem; color: var(--muted); margin-top: -6px; margin-bottom: 12px; }

/* ---------- Meer / instellingen ---------- */
.page-title { font-size: 1.6rem; font-weight: 800; margin: 6px 2px 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); text-align: left; position: relative; }
.tile .ti { font-size: 1.8rem; }
.tile b { display: block; margin-top: 6px; }
.tile .soon { position: absolute; top: 12px; right: 12px; font-size: .66rem; font-weight: 800; background: var(--soft); padding: 2px 8px; border-radius: 99px; color: var(--muted); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 10px; }
.swatch {
  display: grid; justify-items: center; gap: 6px; padding: 12px 6px; border-radius: var(--radius-sm);
  border: 2px solid transparent; font-size: .78rem; font-weight: 700; background: var(--soft); transition: all .2s var(--ease);
}
.swatch .sw { width: 36px; height: 36px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .5); }
.swatch.noir .sw { background: linear-gradient(135deg, #111 50%, #d4af37 50%); }
.swatch.on { border-color: var(--accent); transform: translateY(-2px); }
.swatch input[type=color] { width: 36px; height: 36px; border: 0; padding: 0; border-radius: 50%; background: none; cursor: pointer; }
.swatch input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.swatch input[type=color]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.settings-row:first-of-type { border-top: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .88rem; }
.status .dot { --c: #3fae8e; }
.status.local .dot { --c: #e3a417; }
.preview-cols { display: flex; gap: 8px; margin-top: 8px; }
.placeholder { text-align: center; padding: 40px 20px; }
.placeholder .big { font-size: 3rem; }

/* ---------- Toast & effecten ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 20px); z-index: 50;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--card); padding: 11px 18px; border-radius: 999px; font-weight: 700; font-size: .92rem;
  transition: all .3s var(--ease); max-width: calc(100% - 32px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.float-heart { position: fixed; z-index: 60; pointer-events: none; font-size: 1.3rem; animation: floatup 1s var(--ease) forwards; }
@keyframes floatup { to { transform: translate(var(--dx), -70px) scale(1.4); opacity: 0; } }

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

/* ---------- Avatars ---------- */
.avatar { display: inline-block; vertical-align: middle; flex: none; border-radius: 50%; }
.who button .av { display: grid; place-items: center; margin-bottom: 8px; transition: transform .3s var(--ease); }
.who button.on .av, .who button:hover .av { transform: scale(1.06) rotate(-3deg); }
.split .col h3 .avatar { margin-right: 1px; }

/* ---------- Weeklijst (gsm) ---------- */
.wlist { padding: 4px 12px 12px; }
.wlegend {
  display: grid; grid-template-columns: 44px 1fr 1fr; gap: 8px; align-items: center; position: sticky; top: 0; z-index: 2;
  padding: 10px 0 8px; background: var(--card); font-weight: 800; font-size: .85rem; border-bottom: 1px solid var(--line);
}
.wlegend span { display: flex; align-items: center; gap: 6px; }
.wday { display: grid; grid-template-columns: 44px 1fr; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 12px; }
.wday:last-child { border-bottom: 0; }
.wday.past { opacity: .6; }
.wday-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-top: 2px; align-self: start; }
.wday-head .wd { font-size: .7rem; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.wday-head .wn { font-size: 1.15rem; font-weight: 800; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.wday.today .wn { background: var(--accent); color: var(--on-accent); }
.wday-body { display: grid; gap: 8px; min-width: 0; }
.wday-body .split { gap: 8px; }
.wday-body .item { padding: 7px 8px; }
.wday-body .item .it-title { font-size: .85rem; }
.wday-body .empty { padding: 6px 0; }
.wfree { display: grid; gap: 6px; }
.free-pill.sm { padding: 7px 12px; font-size: .82rem; }

/* ---------- Editor: soort, herhaling ---------- */
.kind-seg { display: flex; margin-bottom: 16px; }
.kind-seg button { flex: 1; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.day-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.daybtn {
  aspect-ratio: 1; max-width: 46px; width: 100%; justify-self: center; border-radius: 50%; font-weight: 800; font-size: .85rem;
  background: var(--soft); color: var(--muted); transition: all .2s var(--ease);
}
.daybtn.on { background: var(--accent); color: var(--on-accent); transform: scale(1.05); }
#f-repeat-hint:empty { display: none; }
#f-repeat-hint { margin-top: -4px; font-weight: 700; color: var(--ink); }

/* ---------- To-do-items ---------- */
.item.todo { border-left-style: dashed; background: color-mix(in srgb, var(--c) 6%, var(--card)); }
.item.todo .check { border-radius: 50%; }
.chip-ev.todo { border-left-style: dashed; }
.chip-ev.done { opacity: .55; text-decoration: line-through; }
.mini-check { cursor: pointer; font-size: .85rem; padding-right: 2px; }

/* ---------- Avatar-editor ---------- */
.av-editor { display: grid; gap: 16px; }
.av-preview { display: grid; place-items: center; padding: 4px 0; }
.av-preview .avatar { filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .12)); }
.av-opts { display: grid; gap: 8px; }
.av-opts .label { margin-top: 6px; }
.av-styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.av-style { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: var(--radius-sm); background: var(--soft); border: 2px solid transparent; font-size: .78rem; font-weight: 700; transition: all .2s var(--ease); }
.av-style.on { border-color: var(--accent); }
.av-row { display: flex; flex-wrap: wrap; gap: 8px; }
.av-sw { width: 34px; height: 34px; border-radius: 50%; background: var(--sw); border: 3px solid var(--card); box-shadow: 0 0 0 1.5px var(--line); transition: transform .15s var(--ease); position: relative; overflow: hidden; }
.av-sw.on { box-shadow: 0 0 0 2.5px var(--accent); transform: scale(1.1); }
.av-sw.custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); cursor: pointer; }
.av-sw.custom input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
@media (min-width: 700px) {
  .av-editor { grid-template-columns: 160px 1fr; align-items: start; }
  .av-styles { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- Dates ---------- */
#nav a { position: relative; }
.badge {
  position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--samen); color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center;
  animation: pop .4s var(--ease);
}
@keyframes pop { from { transform: scale(0); } }
@media (min-width: 900px) { .badge { position: static; margin-left: auto; } }
.tile { text-decoration: none; color: inherit; display: block; }
.tile .muted { display: block; margin-top: 2px; }
.tile .soon.live { background: var(--samen); color: #fff; }
.page-head { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; }
.page-head .icon-btn { text-decoration: none; color: inherit; font-size: 1.4rem; }
.section-title { margin: 4px 2px 10px; }

.countdown { display: flex; align-items: center; gap: 14px; cursor: pointer;
  background: linear-gradient(120deg, color-mix(in srgb, var(--samen) 14%, var(--card)), var(--card) 70%); }
.cd-num { display: grid; justify-items: center; min-width: 58px; }
.cd-big { font-size: 2.1rem; font-weight: 800; line-height: 1; color: var(--samen); }
.cd-unit { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.empty-cd { cursor: default; }

.date-card {
  background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow);
  border: 2px solid color-mix(in srgb, var(--samen) 35%, transparent); animation: fade .4s var(--ease);
}
.date-card.waiting { border-style: dashed; border-color: var(--line); }
.dc-head { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.dc-idea { font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.dc-emoji { font-size: 1.6rem; }
.dc-when { margin-top: 4px; font-weight: 700; color: var(--muted); }
.dc-note { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--soft); font-style: italic; }
.dc-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.dc-actions .btn:first-child { flex: 1; }

.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.slot {
  display: grid; gap: 1px; text-align: left; padding: 9px 12px; border-radius: var(--radius-sm); font-size: .85rem;
  background: color-mix(in srgb, var(--samen) 7%, var(--card)); border: 1.5px dashed color-mix(in srgb, var(--samen) 40%, transparent);
  transition: all .2s var(--ease);
}
.slot span { color: var(--muted); font-weight: 700; }
.slot.on { border-style: solid; border-color: var(--samen); background: color-mix(in srgb, var(--samen) 16%, var(--card)); }
.row3 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.row3 > :first-child { grid-column: 1 / -1; }
.row3 > *, .row2 > * { min-width: 0; }
@media (min-width: 520px) { .row3 { grid-template-columns: 1.4fr 1fr 1fr; } .row3 > :first-child { grid-column: auto; } }

.surprise {
  min-height: 96px; border-radius: var(--radius); display: grid; place-content: center; text-align: center; gap: 4px; padding: 16px;
  background: var(--soft); margin-bottom: 12px; transition: transform .2s var(--ease);
}
.surprise .sp-text { font-size: 1.15rem; font-weight: 800; }
.surprise.spinning { transform: scale(.97); }
.surprise.spinning .sp-text { filter: blur(.4px); opacity: .8; }
.surprise.has { background: linear-gradient(120deg, color-mix(in srgb, var(--p1) 16%, var(--card)), color-mix(in srgb, var(--p2) 20%, var(--card))); animation: pop .35s var(--ease); }
.jar-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.jar-actions .btn { flex: 1; }
.btn:disabled { opacity: .5; pointer-events: none; }
.idea-add { display: flex; gap: 8px; }
.idea-add .input { flex: 1; }
.idea-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.idea { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 5px; border-radius: 99px; background: var(--soft); font-weight: 700; font-size: .85rem; }
.idea-x { width: 22px; height: 22px; border-radius: 50%; color: var(--muted); font-size: 1.1rem; line-height: 1; }
.idea-x:hover { background: var(--card); }
.hist { display: grid; }
.hist-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); flex-wrap: wrap; font-weight: 700; }
.hist-row:first-child { border-top: 0; }
.sheet-inner:focus { outline: none; }
.dc-actions .btn { white-space: nowrap; }

/* ---------- 🌶️ Spicy ---------- */
.spicy-tile { background: linear-gradient(135deg, color-mix(in srgb, #e2486f 18%, var(--card)), var(--card)); }
.spicy-tabs { display: flex; margin-bottom: 14px; }
.spicy-tabs button { flex: 1; }
.surprise.spicy.has { background: linear-gradient(120deg, color-mix(in srgb, #e2486f 22%, var(--card)), color-mix(in srgb, #f0956a 18%, var(--card))); }
.surprise.spicy .small { max-width: 420px; margin: 4px auto 0; }
.spicy-btn { background: #e2486f; color: #fff; box-shadow: 0 6px 16px rgba(226, 72, 111, .3); }
.spicy-list { display: grid; gap: 10px; }
@media (min-width: 760px) { .spicy-list { grid-template-columns: 1fr 1fr; } }
.spicy-item { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border-radius: var(--radius-sm); padding: 12px 12px 12px 14px; box-shadow: var(--shadow); transition: opacity .3s; }
.spicy-item.tried { opacity: .7; }
.si-main { flex: 1; min-width: 0; }
.si-main .muted { margin-top: 2px; }
.si-acts { display: flex; flex-direction: column; gap: 4px; }
.si-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); font-size: 1rem; transition: transform .15s var(--ease); }
.si-btn:active { transform: scale(.85); }

/* ---------- To-do ---------- */
.list-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -2px; scrollbar-width: none; }
.list-tabs::-webkit-scrollbar { display: none; }
.list-tabs .chip { white-space: nowrap; flex: none; }
.list-tabs .chip.add { background: transparent; border: 2px dashed var(--line); }
.cnt { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: var(--on-accent); font-size: .72rem; font-weight: 800; }
.icon-btn.sm { width: 32px; height: 32px; font-size: 1rem; }
.todo-add { display: flex; gap: 8px; margin-bottom: 10px; }
.todo-add .input { flex: 1; }
.todo-add .btn { width: 46px; padding: 0; font-size: 1.4rem; }
.sugg { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.sugg::-webkit-scrollbar { display: none; }
.chip.sm { padding: 5px 10px; font-size: .8rem; white-space: nowrap; flex: none; }
.todo-list { display: grid; }
.todo {
  display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line);
  transition: opacity .35s var(--ease), transform .35s var(--ease); animation: fade .3s var(--ease);
}
.todo-list > .todo:first-child { border-top: 0; }
.tcheck {
  flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--accent); display: grid; place-items: center;
  transition: all .25s var(--ease);
}
.tcheck svg { width: 15px; height: 15px; stroke: var(--on-accent); stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.3); transition: all .25s var(--ease); }
.todo.done .tcheck, .todo.checking .tcheck { background: var(--accent); }
.todo.done .tcheck svg, .todo.checking .tcheck svg { opacity: 1; transform: scale(1); }
.todo.checking .tcheck { transform: scale(1.15); }
.todo.checking { opacity: .35; transform: translateX(14px); }
.todo.checking .ttext, .todo.done .ttext { text-decoration: line-through; color: var(--muted); }
.ttext { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; cursor: text; }
.tby { flex: none; display: flex; }
.tx { flex: none; width: 30px; height: 30px; border-radius: 50%; color: var(--muted); font-size: 1.3rem; opacity: .5; transition: opacity .2s, background .2s; }
.tx:hover { opacity: 1; background: var(--soft); }
.todo-empty { color: var(--muted); padding: 16px 2px; text-align: center; font-weight: 600; }
.done-sec { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.done-sec summary { cursor: pointer; font-weight: 800; color: var(--muted); padding: 6px 2px; list-style: none; display: flex; align-items: center; gap: 8px; }
.done-sec summary::-webkit-details-marker { display: none; }
.done-sec summary::before { content: '›'; display: inline-block; transition: transform .2s var(--ease); font-size: 1.2rem; }
.done-sec[open] summary::before { transform: rotate(90deg); }
.done-sec .cnt { background: var(--soft); color: var(--muted); }
.todo-summary { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin: 0; }
.ts-icon { font-size: 1.6rem; }
.emoji-row { display: flex; flex-wrap: wrap; gap: 8px; }
.emo { width: 44px; height: 44px; border-radius: 14px; background: var(--soft); font-size: 1.4rem; border: 2px solid transparent; transition: all .2s var(--ease); }
.emo.on { border-color: var(--accent); transform: scale(1.08); }
.confetti {
  position: fixed; z-index: 70; width: 8px; height: 11px; border-radius: 2px; pointer-events: none;
  animation: confetti 1s cubic-bezier(.15, .7, .3, 1) forwards;
}
@keyframes confetti {
  to { transform: translate(var(--tx), calc(var(--ty) + 90px)) rotate(var(--r)); opacity: 0; }
}

/* ---------- Chat ---------- */
.has-badge { position: relative; text-decoration: none; color: inherit; }
.dot-badge { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--samen); color: #fff; font-size: .66rem; font-weight: 800; display: grid; place-items: center; }
body.chat-mode #nav { display: none; }
body.chat-mode #app { padding: 0; height: 100vh; height: 100dvh; max-width: none; animation: none; }
@media (min-width: 900px) { body.chat-mode.has-nav #app { margin-left: 0; padding: 0; } body.chat-mode #app > * { max-width: 760px; } }
.chat-page { display: flex; flex-direction: column; height: 100%; }
.chat-head {
  display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 14px 10px;
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.chat-head .icon-btn { text-decoration: none; color: inherit; flex: none; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 14px 14px 8px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); font-weight: 700; display: grid; justify-items: center; }
.day-sep { text-align: center; margin: 12px 0 6px; }
.day-sep span { font-size: .72rem; font-weight: 800; color: var(--muted); background: var(--soft); padding: 4px 10px; border-radius: 99px; }
.msg { display: flex; flex-direction: column; max-width: 80%; animation: fade .25s var(--ease); }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg.theirs { align-self: flex-start; align-items: flex-start; }
.bubble { padding: 9px 13px; border-radius: 20px; font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.35; }
.mine .bubble { background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 6px; }
.theirs .bubble { background: var(--card); box-shadow: var(--shadow); border-bottom-left-radius: 6px; }
.bubble a { color: inherit; }
.msg.big .bubble { background: none !important; box-shadow: none; font-size: 2.4rem; padding: 0 4px; }
.meta { font-size: .68rem; color: var(--muted); font-weight: 700; margin: 2px 6px 4px; }
.snap-pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.snap-pill.new { background: none; color: inherit; font: inherit; font-weight: 800; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.chat-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px calc(env(safe-area-inset-bottom) + 10px);
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
}
.chat-bar .input { flex: 1; border-radius: 999px; }
.chat-bar .send { width: 46px; padding: 0; flex: none; }
.chat-bar .icon-btn { flex: none; }
.chat-bar:has(#chatText:placeholder-shown) .send { display: none; }
.chat-bar:not(:has(#chatText:placeholder-shown)) .heart-btn { display: none; }

/* ---------- Camera & snaps ---------- */
.cam { position: fixed; inset: 0; z-index: 80; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; animation: fade .2s var(--ease); }
.cam video, .cam .cam-img { width: 100%; height: 100%; object-fit: cover; }
.cam .cam-img { object-fit: contain; }
.cam video.mirror { transform: scaleX(-1); }
.cam-top, .cam-bottom { position: absolute; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; gap: 10px; }
.cam-top { top: 0; padding-top: calc(env(safe-area-inset-top) + 14px); background: linear-gradient(rgba(0,0,0,.45), transparent); }
.cam-bottom { bottom: 0; padding-bottom: calc(env(safe-area-inset-bottom) + 24px); justify-content: space-around; background: linear-gradient(transparent, rgba(0,0,0,.45)); }
.cam-title { font-weight: 800; display: flex; align-items: center; gap: 8px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.cam-round { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.18); backdrop-filter: blur(8px); display: grid; place-items: center; font-size: 1.2rem; color: #fff; cursor: pointer; }
.shutter { width: 78px; height: 78px; border-radius: 50%; border: 5px solid #fff; background: rgba(255,255,255,.25); transition: transform .12s var(--ease); }
.shutter:active { transform: scale(.88); }
.shutter:disabled { opacity: .3; }
.cam-msg { position: absolute; top: 40%; left: 24px; right: 24px; text-align: center; font-weight: 700; }
.cam-caption { position: absolute; left: 0; right: 0; bottom: 130px; display: flex; justify-content: center; padding: 0 16px; }
.cam-caption input { width: 100%; max-width: 480px; background: rgba(0,0,0,.5); color: #fff; border: 0; padding: 12px 16px; border-radius: 14px; text-align: center; font-weight: 700; outline: none; }
.snap-cap { position: absolute; left: 0; right: 0; top: 55%; background: rgba(0,0,0,.5); padding: 12px 16px; text-align: center; font-weight: 800; font-size: 1.1rem; }
.snap-bar { position: absolute; top: calc(env(safe-area-inset-top) + 6px); left: 12px; right: 12px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); z-index: 2; }
.snap-bar span { display: block; height: 100%; width: 0; background: #fff; border-radius: 3px; transition: width linear; }
.snap-hint { position: absolute; bottom: calc(env(safe-area-inset-bottom) + 18px); left: 0; right: 0; text-align: center; font-size: .8rem; opacity: .7; }

/* ---------- Locatie ---------- */
.loc-card { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin: 0; }
.dist-hero { text-align: center; padding: 22px; background: linear-gradient(120deg, color-mix(in srgb, var(--p1) 16%, var(--card)), color-mix(in srgb, var(--p2) 20%, var(--card))); }
.dist-big { font-size: 2.4rem; font-weight: 800; line-height: 1.1; margin-bottom: 4px; }
.map-card { padding: 0; overflow: hidden; position: relative; }
.map-host, .map { height: 340px; width: 100%; }
@media (min-width: 760px) { .map-host, .map { height: 440px; } }
.map-center { position: absolute; right: 12px; bottom: 12px; z-index: 500; background: var(--card); box-shadow: var(--shadow); }
.loc-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.av-pin { background: none; border: 0; }
.pin { width: 46px; height: 46px; border-radius: 50%; background: #fff; padding: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.pin.old { filter: grayscale(.8); opacity: .7; }
:root[data-mode="dark"] .leaflet-tile, :root[data-mode="noir"] .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
.leaflet-container { font-family: var(--font); background: var(--soft); }

/* ---------- Complimentenbox ---------- */
.comp-stage { display: grid; justify-items: center; text-align: center; padding: 22px 18px; gap: 10px;
  background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--p2) 16%, var(--card)), var(--card) 70%); }
.comp-intro { font-weight: 700; margin: 0 0 6px; max-width: 320px; }
.comp-hint { margin: 4px 0 0; }
.gift { position: relative; width: 150px; height: 150px; margin: 14px auto 6px; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .2s var(--ease); }
.gift:hover { transform: translateY(-3px); }
.gift:active { transform: scale(.95); }
.gift .base { position: absolute; left: 12px; right: 12px; bottom: 0; height: 96px; border-radius: 12px 12px 18px 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--p2) 85%, #fff), var(--p2)); box-shadow: 0 12px 24px color-mix(in srgb, var(--p2) 35%, transparent); }
.gift .lid { position: absolute; left: 2px; right: 2px; top: 22px; height: 36px; border-radius: 10px; z-index: 2;
  background: linear-gradient(160deg, color-mix(in srgb, var(--p2) 70%, #fff), color-mix(in srgb, var(--p2) 90%, #000)); box-shadow: 0 4px 8px rgba(0,0,0,.12);
  transition: transform .55s cubic-bezier(.3, 1.6, .5, 1), opacity .5s; }
.gift .ribbon { position: absolute; left: 50%; width: 20px; margin-left: -10px; bottom: 0; height: 96px; background: #fff; opacity: .85; border-radius: 3px; }
.gift .lid::after { content: ''; position: absolute; left: 50%; width: 20px; margin-left: -10px; top: 0; bottom: 0; background: #fff; opacity: .85; }
.gift .bow { position: absolute; left: 50%; top: -22px; width: 0; height: 0; z-index: 3; }
.gift .bow i { position: absolute; top: 0; width: 34px; height: 24px; border: 6px solid #fff; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: color-mix(in srgb, var(--p2) 30%, #fff); }
.gift .bow i:first-child { right: 0; transform: rotate(-25deg); transform-origin: right bottom; }
.gift .bow i:last-child { left: 0; transform: rotate(25deg); transform-origin: left bottom; }
.gift.wiggle { animation: wiggle .5s ease-in-out; }
@keyframes wiggle { 20% { transform: rotate(-8deg); } 40% { transform: rotate(7deg); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(3deg); } }
.gift.opening { animation: wiggle .35s ease-in-out; }
.gift.opening .lid { transform: translateY(-70px) rotate(-24deg); opacity: 0; }
.comp-card {
  width: 100%; max-width: 420px; background: var(--card); border-radius: var(--radius); padding: 20px 18px 12px; box-shadow: 0 14px 34px rgba(0,0,0,.14);
  border: 2px solid color-mix(in srgb, var(--p2) 40%, transparent); animation: rise .55s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes rise { from { transform: translateY(60px) scale(.8); opacity: 0; } }
.comp-text { font-size: 1.2rem; font-weight: 800; line-height: 1.35; }
.comp-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 10px; }
.fav-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--soft); font-size: 1.25rem; transition: transform .2s var(--ease); flex: none; }
.fav-btn.on { animation: pop .35s var(--ease); }
.fav-btn.sm { width: 34px; height: 34px; font-size: 1rem; }
.comp-progress { width: 100%; max-width: 320px; height: 6px; border-radius: 6px; background: var(--soft); overflow: hidden; margin-top: 8px; }
.comp-progress span { display: block; height: 100%; background: var(--p2); border-radius: 6px; transition: width .5s var(--ease); }
.fav-toggle { display: flex; align-items: center; justify-content: space-between; text-align: left; }
.fav-list { display: grid; gap: 8px; margin-top: 10px; }
.fav-item { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--soft); font-weight: 600; text-align: left; }
.comp-stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 8px; }
.comp-stats b { display: block; font-size: 1.6rem; color: var(--p2); }
.comp-stats span { font-size: .76rem; color: var(--muted); font-weight: 700; }
.comp-form { display: grid; gap: 10px; }
.small-stage .gift { transform: scale(.8); margin: 0 auto; }
.comp-mini { background: linear-gradient(120deg, color-mix(in srgb, var(--p2) 16%, var(--card)), var(--card)); }

/* ---------- Chat v2: emoji, reacties, snaps ---------- */
.chat-input { flex: 1; position: relative; display: flex; }
.chat-input .input { padding-right: 44px; }
.emoji-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; font-size: 1.25rem; }
.emoji-toggle.on { background: var(--soft); }
.chat-bar:has(#chatText:placeholder-shown) .send { display: none; }
.emoji-panel { background: var(--card); border-top: 1px solid var(--line); height: 240px; display: flex; flex-direction: column; animation: up .2s var(--ease); }
.emoji-tabs { display: flex; gap: 2px; padding: 6px 8px 4px; border-bottom: 1px solid var(--line); }
.emoji-tabs button { flex: 1; padding: 6px 0; border-radius: 10px; font-size: 1.15rem; opacity: .55; }
.emoji-tabs button.on { background: var(--soft); opacity: 1; }
.emoji-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); padding: 6px 8px; align-content: start; }
.emoji-grid button { font-size: 1.6rem; height: 44px; border-radius: 10px; transition: transform .1s; }
.emoji-grid button:active { transform: scale(1.3); background: var(--soft); }
.chat-tip { font-size: .66rem; text-align: center; margin: 0; padding: 0 0 calc(env(safe-area-inset-bottom) + 4px); background: color-mix(in srgb, var(--card) 92%, transparent); }
.chat-bar { padding-bottom: 6px; }
.bubble { touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.msg { position: relative; }
.reacts { margin-top: -8px; z-index: 1; background: var(--card); border-radius: 99px; padding: 1px 6px; font-size: .9rem; box-shadow: 0 2px 6px rgba(0,0,0,.15); cursor: pointer; animation: pop .3s var(--ease); }
.mine .reacts { margin-right: 6px; }
.theirs .reacts { margin-left: 6px; }
.react-bar { position: fixed; z-index: 90; display: flex; gap: 2px; padding: 6px; border-radius: 99px; background: var(--card); box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: pop .2s var(--ease); }
.react-bar button { font-size: 1.6rem; width: 44px; height: 44px; border-radius: 50%; transition: transform .12s; }
.react-bar button:hover, .react-bar button:active { transform: scale(1.25); background: var(--soft); }

/* Snapchat-stijl vierkantjes: gevuld = nieuw, open = bekeken */
.sq { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: #e2486f; flex: none; }
.sq.open { background: transparent; border: 2px solid #e2486f; }
.is-snap .bubble { background: var(--card) !important; color: var(--ink) !important; box-shadow: var(--shadow); }
.snap-pill { gap: 8px; }
.snap-pill.new { color: #e2486f; }
.snap-banner {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 14px 16px; margin: 0 0 14px;
  border-radius: var(--radius); background: color-mix(in srgb, #e2486f 14%, var(--card)); border: 2px solid #e2486f; animation: pop .35s var(--ease);
}
.snap-banner b { flex: 1; }
.snap-banner span { font-size: .8rem; font-weight: 800; color: #e2486f; }
.snap-banner .sq { width: 20px; height: 20px; border-radius: 5px; animation: pulse 1.4s infinite; }
.chat-page .snap-banner { margin: 10px 14px 0; width: auto; }

/* Camera v2 */
.cam-live, .cam-preview { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.cam-preview { background: #000; z-index: 2; }
.cam-textbtn { position: absolute; right: 18px; top: calc(env(safe-area-inset-top) + 80px); width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-weight: 800; font-size: 1.1rem; }
.cam-send-row { position: absolute; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 22px); }
.send-snap { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 20px; border-radius: 99px; background: #3d8fd1; color: #fff; font-weight: 800; font-size: 1.05rem; box-shadow: 0 8px 24px rgba(0,0,0,.35); transition: transform .12s; }
.send-snap span { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; }
.send-snap:active { transform: scale(.94); }
.cam-round { text-decoration: none; }
.cam-round.wide { width: auto; padding: 0 18px; border-radius: 99px; font-weight: 800; font-size: .95rem; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 3; }
.flash.go { animation: flash .35s ease-out; }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }
.snap-actions { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 20px); display: flex; justify-content: center; gap: 12px; }
.muted-w { color: rgba(255,255,255,.7); font-weight: 800; }
.snap-view .snap-hint { display: none; }
@media (max-width: 420px) {
  .hero h1 { font-size: 1.4rem; }
  .hero .icon-btn { width: 36px; height: 36px; font-size: 1rem; }
  .hero > div:last-child { gap: 6px !important; }
}

/* ---------- Afwerking: login ---------- */
.remember { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; margin: -4px 0 10px; text-align: left; cursor: pointer; }
.remember input { width: 18px; height: 18px; accent-color: var(--accent); }
.link-btn { background: none; color: var(--accent); font-weight: 700; font-size: .85rem; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.forgot { display: block; margin: 12px auto 0; }
button.tile { font: inherit; color: inherit; cursor: pointer; }
.wij-banner { display: block; text-align: center; font-size: 1.1rem; text-decoration: none; color: inherit; }

/* ---------- Mood & ping ---------- */
.mood-bar { padding: 14px 16px; }
.mood-them { display: flex; align-items: center; gap: 10px; }
.mood-sugg { margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--soft); font-weight: 700; font-size: .88rem; }
.ping-note { margin-top: 8px; font-weight: 700; font-size: .88rem; color: var(--samen); }
.mood-actions { display: flex; gap: 8px; margin-top: 12px; }
.mood-actions .btn { flex: 1; }
.think-btn { background: var(--samen); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--samen) 30%, transparent); }
.mood-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mood-opt { display: grid; justify-items: center; gap: 2px; padding: 10px 4px; border-radius: var(--radius-sm); background: var(--soft); font-weight: 700; font-size: .78rem; border: 2px solid transparent; transition: all .15s var(--ease); }
.mood-opt span { font-size: 1.9rem; }
.mood-opt.on { border-color: var(--accent); transform: scale(1.05); }
.mood-chart { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; }
.mc-grid { stroke: var(--line); stroke-width: 1; }
.mc-y { font-size: 14px; }
.mc-x { font-size: 11px; fill: var(--muted); font-weight: 700; }
.mc-pt:hover circle:first-child { r: 7; }
.mc-legend { display: flex; gap: 16px; justify-content: center; margin-top: 8px; font-size: .82rem; font-weight: 700; }
.mc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.mood-list { display: grid; }
.mood-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.mood-row:first-child { border-top: 0; }
.mood-emo { font-size: 1.4rem; }

/* ---------- Vraag van de dag ---------- */
.q-card .q-text { font-size: 1.05rem; font-weight: 800; margin: 0 0 12px; }
.q-ans { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--soft); margin-top: 6px; font-weight: 600; }
.q-badge { font-size: .72rem; font-weight: 800; background: var(--samen); color: #fff; padding: 3px 8px; border-radius: 99px; }

/* ---------- Briefjes ---------- */
.note-form { display: grid; gap: 10px; }
.note-colors { display: flex; gap: 8px; }
.note-color { width: 30px; height: 30px; border-radius: 8px; border: 2px solid transparent; }
.note-color.on { border-color: var(--ink); transform: scale(1.1); }
.note-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding: 6px 2px 20px; }
.note { background: var(--nc); color: #3a3226; padding: 14px 12px 10px; border-radius: 4px 4px 14px 4px; box-shadow: 0 8px 18px rgba(0,0,0,.15); transform: rotate(var(--rot)); min-height: 130px; display: flex; flex-direction: column; animation: pop .35s var(--ease); font-family: var(--font); }
.note-text { flex: 1; font-weight: 700; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-foot { display: flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700; margin-top: 8px; opacity: .8; }
.note-x { margin-left: auto; color: inherit; font-size: 1.1rem; opacity: .5; }
.note-mini { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: #3a3226; background: var(--nc); margin: 0; transform: rotate(-1deg); }
.note-mini .muted { color: #6b5f4d; }
.note-pin { font-size: 1.1rem; }
.note-mini-text { font-weight: 800; }

/* ---------- Over ons ---------- */
.us-hero { text-align: center; background: linear-gradient(135deg, color-mix(in srgb, var(--p1) 18%, var(--card)), color-mix(in srgb, var(--p2) 22%, var(--card))); }
.us-avs { display: flex; justify-content: center; align-items: center; gap: 6px; }
.us-heart { font-size: 1.6rem; animation: pulse 1.6s infinite; }
.us-days { font-size: 3rem; font-weight: 800; line-height: 1; margin-top: 10px; }
.us-label { font-weight: 800; color: var(--muted); margin-bottom: 4px; }
.ms-list { display: grid; gap: 6px; margin-top: 14px; text-align: left; }
.ms { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--card) 70%, transparent); font-weight: 700; font-size: .9rem; }
.us-tabs { display: flex; margin-bottom: 14px; overflow-x: auto; }
.us-tabs button { flex: 1; white-space: nowrap; font-size: .82rem; padding: 7px 8px; }
.story { line-height: 1.6; font-size: 1.02rem; }
.story-input { min-height: 200px; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-year { font-weight: 800; color: var(--muted); margin: 6px 0 10px -22px; padding-left: 0; }
.tl-item { position: relative; margin-bottom: 14px; }
.tl-dot { position: absolute; left: -20px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--samen); border: 2px solid var(--bg); }
.tl-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tl-photo { display: block; width: 100%; padding: 0; }
.tl-photo img { width: 100%; max-height: 360px; object-fit: cover; display: block; background: var(--soft); min-height: 120px; }
.tl-body { padding: 12px 14px; }
.tl-date { font-weight: 800; font-size: .85rem; color: var(--samen); }
.tl-text { margin-top: 4px; font-weight: 600; white-space: pre-wrap; }
.tl-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.mem-drop { display: grid; place-items: center; min-height: 160px; border-radius: var(--radius); border: 2px dashed var(--line); background: var(--soft); cursor: pointer; overflow: hidden; margin-bottom: 14px; font-weight: 800; color: var(--muted); }
.mem-drop img { width: 100%; max-height: 280px; object-fit: cover; }
.fav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fav-slot { display: grid; gap: 4px; font-weight: 800; font-size: .82rem; color: var(--muted); }
.fav-slot .input { min-height: 40px; padding: 8px 12px; font-weight: 700; color: var(--ink); }
.idate-list { display: grid; gap: 8px; }
.idate { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--soft); width: 100%; }
.idate-icon { font-size: 1.5rem; }
.idate-in { font-weight: 800; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.idate-in.soon { color: var(--samen); }
.reminder-card { display: grid; gap: 4px; text-decoration: none; color: inherit; font-weight: 800; background: linear-gradient(120deg, color-mix(in srgb, #f7c948 22%, var(--card)), var(--card)); }

/* ---------- Cyclus ---------- */
.cyc-status { text-align: center; }
.cyc-ring { width: 120px; height: 120px; border-radius: 50%; margin: 4px auto 10px; display: grid; place-content: center; justify-items: center; border: 8px solid var(--line); }
.cyc-ring span { font-size: 2.6rem; line-height: 1; }
.cyc-ring small { font-weight: 800; color: var(--muted); margin-top: 4px; }
.cyc-ring.ph-menstruatie { border-color: #e2486f; }
.cyc-ring.ph-folliculair { border-color: #3fae8e; }
.cyc-ring.ph-ovulatie { border-color: #e3a417; }
.cyc-ring.ph-luteaal { border-color: #9b87d6; }
.cyc-next { font-weight: 700; margin-bottom: 4px; }
.cyc-actions { display: grid; gap: 8px; margin-bottom: 14px; }
.share-seg { display: flex; }
.share-seg button { flex: 1; font-size: .82rem; padding: 8px 6px; }
.cyc-log { display: grid; gap: 6px; margin-top: 10px; }
.cyc-row { display: grid; gap: 2px; text-align: left; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--soft); width: 100%; }
.cyc-mini { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin: 0 0 14px; }
.today-grid .cyc-mini { margin: 0; }
.cyc-mini.hint { font-weight: 800; background: color-mix(in srgb, #e2486f 10%, var(--card)); }
.cyc-mark { font-size: .7rem; }
.cyc-mark.pred { opacity: .45; }
.mc-marks { font-size: .7rem; display: inline-flex; gap: 1px; }

/* ---------- Chat v3: tab in de onderbalk ---------- */
#nav a { min-width: 0; }
@media (max-width: 899px) { #nav a span { font-size: .66rem; } #nav svg { width: 23px; height: 23px; } }
body.chat-mode #nav { display: flex; }
@media (max-width: 899px) {
  body.chat-mode #app { padding: 0; height: calc(100vh - var(--nav-h) - env(safe-area-inset-bottom)); height: calc(100dvh - var(--nav-h) - env(safe-area-inset-bottom)); }
}
@media (min-width: 900px) {
  body.chat-mode.has-nav #app { margin-left: 220px; padding: 0; height: 100vh; height: 100dvh; }
  body.chat-mode #app > * { max-width: none; }
}
.chat-head { gap: 8px; }
.call-btns { display: flex; gap: 6px; flex: none; }
.call-btns .icon-btn { text-decoration: none; background: color-mix(in srgb, #3fae8e 18%, var(--card)); }
.chat-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.chat-who b { display: block; }
.chat-head .icon-btn.on { background: #f7c948; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3fae8e; margin-right: 5px; }
.typing { color: var(--samen); font-weight: 800; }
.typing i { font-style: normal; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.chat-page.has-bg .day-sep span { background: color-mix(in srgb, var(--card) 85%, transparent); }
.chat-page.has-bg .meta { color: var(--ink); text-shadow: 0 0 6px var(--card); }
.chat-page.has-bg .chat-empty { background: color-mix(in srgb, var(--card) 85%, transparent); padding: 16px; border-radius: var(--radius); }
.saved-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: color-mix(in srgb, #f7c948 25%, var(--card)); font-weight: 800; font-size: .88rem; }
.reply-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 14px; background: var(--soft); font-size: .85rem; border-top: 1px solid var(--line); }
.reply-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-quote { font-size: .74rem; font-weight: 700; color: var(--muted); background: color-mix(in srgb, var(--card) 80%, transparent); border-left: 3px solid var(--accent); padding: 4px 8px; border-radius: 8px; margin-bottom: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-photo .bubble { padding: 4px; background: var(--card) !important; box-shadow: var(--shadow); }
.chat-photo { display: block; padding: 0; border-radius: 16px; overflow: hidden; }
.chat-photo img { display: block; max-width: min(260px, 66vw); max-height: 340px; min-height: 80px; min-width: 120px; object-fit: cover; background: var(--soft); }
.photo-cap { padding: 6px 8px 4px; color: var(--ink); }
.chat-bar label.icon-btn { cursor: pointer; flex: none; }
.chat-bar { gap: 6px; }
.msg-menu { position: fixed; z-index: 90; background: var(--card); border-radius: 18px; box-shadow: 0 12px 34px rgba(0,0,0,.28); padding: 6px; animation: pop .18s var(--ease); min-width: 230px; }
.msg-menu .react-row { display: flex; gap: 2px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.msg-menu .react-row button { font-size: 1.5rem; width: 40px; height: 40px; border-radius: 50%; }
.msg-menu .react-row button:active { transform: scale(1.25); background: var(--soft); }
.menu-list { display: grid; padding-top: 4px; }
.menu-list button { text-align: left; padding: 10px 12px; border-radius: 10px; font-weight: 700; }
.menu-list button:hover { background: var(--soft); }
.menu-list .danger { color: #d0455f; }
.bg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bg-opt { height: 84px; border-radius: 14px; border: 2px solid var(--line); background: var(--soft); display: flex; align-items: flex-end; justify-content: center; padding: 6px; cursor: pointer; overflow: hidden; }
.bg-opt span { background: color-mix(in srgb, var(--card) 85%, transparent); border-radius: 99px; padding: 2px 8px; font-size: .72rem; font-weight: 800; color: var(--ink); }
.bg-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.send-keep { padding: 12px 16px; border-radius: 99px; background: rgba(255,255,255,.2); color: #fff; font-weight: 800; backdrop-filter: blur(8px); margin-right: 8px; }
.cam-send-row { display: flex; align-items: center; }
.snap-actions .cam-round.on { background: #f7c948; color: #222; }

/* Profielfoto */
.avatar-photo { object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 2px var(--c); background: var(--soft); }
.pf-btns { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; align-items: center; }
.pf-btns label { cursor: pointer; }
.av-preview { flex-direction: column; }

/* ---------- Profielen & stopwatch ---------- */
.av-btn { padding: 0; border-radius: 50%; display: inline-flex; cursor: pointer; }
.av-btn:active { transform: scale(.92); }
button.chat-who { text-align: left; cursor: pointer; background: none; }
.wij-people { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.wij-person { display: grid; justify-items: center; gap: 4px; padding: 14px 8px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.profile-sheet .pf-top { display: grid; justify-items: center; gap: 6px; text-align: center; margin-bottom: 14px; }
.profile-sheet .pf-top h2 { margin: 4px 0 0; }
.pf-status { font-weight: 700; color: var(--muted); font-size: .9rem; }
.pf-status.on { color: #3fae8e; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 14px; }
.pf-stats div { background: var(--soft); border-radius: var(--radius-sm); padding: 10px 4px; }
.pf-stats b { display: block; font-size: 1.1rem; }
.pf-stats span { font-size: .72rem; color: var(--muted); font-weight: 700; }
.pf-list { display: grid; }
.pf-list div { display: flex; justify-content: space-between; gap: 10px; padding: 10px 2px; border-top: 1px solid var(--line); font-size: .92rem; }
.pf-list div span { color: var(--muted); font-weight: 700; }
.pf-list div b { text-align: right; overflow-wrap: anywhere; }
.sw-card { text-align: center; background: linear-gradient(135deg, color-mix(in srgb, var(--p1) 14%, var(--card)), color-mix(in srgb, var(--p2) 16%, var(--card))); }
.sw-card .card-head { text-align: left; }
.sw-time { font-size: 2.8rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1.1; }
.sw-card.running .sw-time { color: var(--samen); }
.sw-sub { margin: 4px 0 12px; }
.sw-btn { margin-bottom: 12px; }
.sw-card.running .sw-btn { background: var(--ink); color: var(--card); }
.sw-mini { display: flex; justify-content: space-around; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 700; flex-wrap: wrap; }
.sw-mini b { color: var(--ink); }
.sw-banner { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; margin-bottom: 14px; border-radius: var(--radius); text-decoration: none; color: inherit; background: color-mix(in srgb, var(--samen) 14%, var(--card)); border: 2px solid color-mix(in srgb, var(--samen) 40%, transparent); font-weight: 800; }
.sw-banner b { font-variant-numeric: tabular-nums; color: var(--samen); font-size: 1.15rem; }
.sw-tabs { display: flex; margin-bottom: 10px; }
.sw-tabs button { flex: 1; }
.sw-period { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; text-transform: capitalize; }
.sw-big { font-size: 1.8rem; font-weight: 800; text-align: center; color: var(--samen); }
.sw-big span { display: block; font-size: .78rem; color: var(--muted); }
.sw-bar:hover path { opacity: .8; }
.sw-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-top: 10px; }
.sw-facts b { display: block; }
.sw-facts span { font-size: .72rem; color: var(--muted); font-weight: 700; }
.sw-list { display: grid; }
.sw-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .9rem; }
.sw-row:first-child { border-top: 0; }
.sw-row span:first-child { flex: 1; }
.idea-list { max-height: 280px; overflow: auto; }

/* ---------- Chat-fix: koptekst als raster, toetsenbord op iPhone ---------- */
.chat-head { display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; }
button.chat-who { display: flex; width: 100%; min-width: 0; justify-content: flex-start; align-items: center; padding: 0; border: 0; font: inherit; color: inherit; -webkit-appearance: none; appearance: none; }
.chat-who > div { min-width: 0; overflow: hidden; }
.chat-who b, .chat-who #chatStatus { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.chat-mode { overflow: hidden; overscroll-behavior: none; }
@media (max-width: 899px) {
  body.chat-mode #app { position: fixed; top: 0; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); height: auto; }
  body.chat-mode.kb-open #nav { display: none; }
  body.chat-mode.kb-open #app { top: var(--vvt, 0px); bottom: auto; height: var(--vvh, 100dvh); }
  body.chat-mode.kb-open .chat-bar { padding-bottom: 8px; }
}
.chat-scroll { -webkit-overflow-scrolling: touch; }

/* ---------- Herinnering van de dag ---------- */
.mem-pop { position: fixed; inset: 0; z-index: 85; background: rgba(20, 10, 20, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; animation: fade .3s var(--ease); }
.mem-card { width: 100%; max-width: 400px; background: var(--card); border-radius: 26px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.35); animation: rise .5s cubic-bezier(.2, 1.3, .4, 1); }
.mem-tag { padding: 12px 16px; font-weight: 800; background: linear-gradient(120deg, color-mix(in srgb, var(--p1) 20%, var(--card)), color-mix(in srgb, var(--p2) 24%, var(--card))); }
.mem-card img { width: 100%; max-height: 52vh; object-fit: cover; display: block; }
.mem-body { padding: 14px 16px 4px; }
.mem-body p { margin: 6px 0 0; font-weight: 600; }
.mem-actions { display: flex; gap: 8px; padding: 12px 16px 16px; }
.mem-actions .btn { flex: 1; }

/* ---------- Jaarrecap ---------- */
.recap { position: fixed; inset: 0; z-index: 95; color: #fff; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: calc(env(safe-area-inset-top) + 40px) 24px calc(env(safe-area-inset-bottom) + 30px);
  background: linear-gradient(160deg, #ff7eb3, #8f6ed5 50%, #3d8fd1); animation: fade .3s var(--ease); user-select: none; }
.rc-bars { position: absolute; top: calc(env(safe-area-inset-top) + 12px); left: 12px; right: 12px; display: flex; gap: 4px; }
.rc-bars span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); }
.rc-bars span.done, .rc-bars span.now { background: #fff; }
.rc-x { position: absolute; top: calc(env(safe-area-inset-top) + 24px); right: 14px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.2); color: #fff; font-size: 1.1rem; }
.rc-slide { animation: rise .45s cubic-bezier(.2, 1.3, .4, 1); display: grid; gap: 10px; justify-items: center; }
.rc-slide h1 { font-size: 2rem; }
.rc-slide p { margin: 0; font-size: 1.15rem; font-weight: 700; }
.rc-big { font-size: 4rem; }
.rc-num { font-size: 4rem; font-weight: 800; line-height: 1; text-shadow: 0 4px 20px rgba(0,0,0,.2); }
.rc-small { font-size: .85rem !important; opacity: .75; margin-top: 20px !important; }
.rc-emo { font-size: 1.6rem; }
.rc-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; max-width: 360px; }
.rc-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.rc-moods { display: flex; gap: 30px; }
.rc-moods div { display: grid; justify-items: center; gap: 6px; }
.rc-moods span { font-size: 2.4rem; }
.rc-list { display: grid; gap: 8px; font-weight: 700; font-size: 1.05rem; }
.recap .btn { background: #fff; color: #8f6ed5; margin-top: 16px; }

/* ---------- Dagboek ---------- */
.dy-month { font-weight: 800; color: var(--muted); margin: 14px 4px 8px; text-transform: capitalize; }
.dy-entry { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; border-left: 4px solid var(--p2); }
.dy-entry.mine { border-left-color: var(--accent); }
.dy-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dy-mood { font-size: 1.4rem; }
.dy-text { line-height: 1.6; white-space: normal; overflow-wrap: anywhere; font-family: var(--font); }
.dy-area { min-height: 200px; line-height: 1.6; }

/* ---------- Spelletjes ---------- */
.spicy-games { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.game-seg { display: flex; flex-wrap: wrap; }
.game-seg button { flex: 1; font-size: .8rem; padding: 7px 6px; }
.game-card { text-align: center; }
.game-prog { display: flex; gap: 3px; margin-bottom: 10px; }
.game-prog span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.game-prog span.done { background: color-mix(in srgb, #e2486f 50%, var(--line)); }
.game-prog span.now { background: #e2486f; }
.game-timer { font-size: 3.4rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #e2486f; margin: 8px 0; }
.game-title { font-size: 1.25rem; line-height: 1.35; margin: 0 0 6px; }
.game-desc { color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.game-ctrl { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 14px; }
.game-ctrl .btn { min-width: 140px; }
.game-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: .9rem; }
.game-list li.done { opacity: .45; text-decoration: line-through; }
.game-list li.now { font-weight: 800; color: #e2486f; }
.tod-modes { display: flex; margin-bottom: 14px; }
.tod-modes button { flex: 1; font-size: .85rem; }
.tod-card { text-align: center; min-height: 300px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.tod-card.tod-grappig { background: linear-gradient(160deg, color-mix(in srgb, #f7c948 22%, var(--card)), var(--card)); }
.tod-card.tod-diep { background: linear-gradient(160deg, color-mix(in srgb, #8f6ed5 22%, var(--card)), var(--card)); }
.tod-card.tod-spicy { background: linear-gradient(160deg, color-mix(in srgb, #e2486f 24%, var(--card)), var(--card)); }
.tod-turn { display: grid; justify-items: center; gap: 6px; }
.tod-kind { font-weight: 800; color: var(--muted); text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; }
.tod-text { font-size: 1.35rem; font-weight: 800; line-height: 1.35; animation: pop .35s var(--ease); }
.tod-btns { display: flex; gap: 8px; }
.tod-btns .btn { flex: 1; }
.tod-btns.big .btn { min-height: 70px; font-size: 1.1rem; }
.tod-t { background: #8f6ed5; color: #fff; }
.tod-d { background: #e2486f; color: #fff; }

/* ---------- Spicy spel: stap per stap als verrassing ---------- */
.game-gift { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 26px 12px 20px; margin: 10px 0 8px; border-radius: 22px; color: inherit; font: inherit;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, #e2486f 30%, var(--card)), color-mix(in srgb, #8f2f6b 22%, var(--card)));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #e2486f 40%, transparent); }
.game-gift b { font-size: 1.15rem; }
.gg-box { font-size: 4rem; line-height: 1; animation: gg-wiggle 2.4s ease-in-out infinite; }
@keyframes gg-wiggle { 0%, 70%, 100% { transform: rotate(0) scale(1); } 76% { transform: rotate(-9deg) scale(1.06); } 82% { transform: rotate(8deg) scale(1.06); } 88% { transform: rotate(-5deg); } 94% { transform: rotate(3deg); } }
.game-open .game-title { animation: rise .5s cubic-bezier(.2, 1.3, .4, 1); }
.game-hist summary { cursor: pointer; font-weight: 800; list-style: none; }
.game-hist summary::-webkit-details-marker { display: none; }
.game-hist[open] summary { margin-bottom: 10px; }
@media (prefers-reduced-motion: reduce) { .gg-box, .game-open .game-title { animation: none; } }

/* ---------- Wij: secties ---------- */
.sec-label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 4px 8px; }

/* ---------- Onze playlist ---------- */
.pl-hero { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, color-mix(in srgb, var(--p1) 22%, var(--card)), color-mix(in srgb, var(--p2) 26%, var(--card))); }
.pl-hero b { font-size: 1.1rem; }
.pl-cover { width: 86px; height: 86px; flex: none; border-radius: 14px; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); box-shadow: var(--shadow); }
.pl-cover img { width: 100%; height: 100%; object-fit: cover; }
.pl-cover span { display: grid; place-items: center; font-size: 1.2rem; }
.pl-cover .pl-empty-cover { grid-column: 1 / -1; grid-row: 1 / 3; font-size: 2.2rem; }
.pl-cover:has(> :only-child) { grid-template-columns: 1fr; }
.pl-ours { margin-top: 6px; font-size: .85rem; font-weight: 700; }
.pl-add { display: flex; gap: 8px; margin: 4px 0 10px; }
.pl-add .btn:first-child { flex: 1; }
.pl-filter { margin-bottom: 10px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.song-list { display: grid; gap: 8px; margin-bottom: 12px; }
.song { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); padding: 8px; animation: fade .25s var(--ease); }
.song.ours { box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--p2) 60%, transparent); }
.song-main { display: flex; align-items: center; gap: 10px; }
.song-art { position: relative; width: 54px; height: 54px; flex: none; border-radius: 12px; overflow: hidden; background: var(--soft); display: grid; place-items: center; font-size: 1.4rem; padding: 0; }
.song-art img { width: 100%; height: 100%; object-fit: cover; }
.song-play { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; color: #fff; font-size: .95rem; background: rgba(0,0,0,.28); opacity: .9; }
.song.playing .song-art { box-shadow: 0 0 0 2px var(--accent); }
.song.playing .song-play { background: rgba(0,0,0,.45); }
.song-info { flex: 1; min-width: 0; display: grid; text-align: left; background: none; color: inherit; font: inherit; padding: 0; gap: 1px; }
.song-info b, .song-info > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-by { display: flex; align-items: center; gap: 5px; font-size: .74rem; color: var(--muted); font-weight: 700; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.song-by .avatar { flex: none; }
.song-like { width: 42px; height: 42px; flex: none; border-radius: 50%; background: none; font-size: 1.25rem; }
.song-like.on { animation: pop .3s var(--ease); }
.song-more { margin-top: 10px; display: grid; gap: 10px; }
.song-embed { width: 100%; border: 0; border-radius: 12px; }
.song-links { display: flex; gap: 8px; }
.song-links .btn { flex: 1; text-decoration: none; justify-content: center; }
.song-links .sp { background: #1db954; color: #fff; }
.song-links .am { background: #fa2d48; color: #fff; }
.song-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.danger-txt { color: #d9534f; }
.pl-results { display: grid; gap: 4px; max-height: 46vh; overflow-y: auto; margin-bottom: 12px; }
.pl-hit { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; }
.pl-hit:hover, .pl-hit:active { background: var(--soft); }
.pl-hit img, .pl-hit > span:first-child { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--soft); }
.pl-hit > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.pl-hit b, .pl-hit .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-hit i { font-style: normal; font-weight: 800; color: var(--accent); font-size: 1.2rem; padding: 0 6px; }

/* ---------- Offline ---------- */
.off-pill { position: fixed; z-index: 80; left: 50%; top: calc(env(safe-area-inset-top) + 8px); transform: translate(-50%, calc(-100% - env(safe-area-inset-top) - 24px)); opacity: 0; visibility: hidden; transition: transform .35s var(--ease), opacity .2s, visibility 0s .35s;
  background: #2b2b30; color: #fff; font-weight: 700; font-size: .8rem; padding: 7px 14px; border-radius: 99px; box-shadow: 0 6px 20px rgba(0,0,0,.25); white-space: nowrap; pointer-events: none; }
body.is-offline .off-pill { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .35s var(--ease), opacity .2s; }

/* ---------- Spraakberichten ---------- */
.chat-bar:not(:has(#chatText:placeholder-shown)) .mic-btn { display: none; }
.rec-bar { position: fixed; left: 0; right: 0; z-index: 60; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  background: var(--card); border-top: 1px solid var(--line); animation: fade .2s var(--ease); }
.rec-mid { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-radius: 99px; background: var(--soft); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e2484f; flex: none; animation: blink 1s infinite; }
.rec-time { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 34px; }
.rec-wave { flex: 1; height: 26px; display: flex; align-items: center; justify-content: flex-end; gap: 2px; overflow: hidden; }
.rec-wave i { width: 3px; flex: none; border-radius: 3px; background: #e2484f; min-height: 3px; }
.rec-send { width: 46px; padding: 0; flex: none; }

.msg.is-voice .bubble { padding: 7px 10px; }
.voice { display: flex; align-items: center; gap: 8px; width: min(62vw, 250px); }
.v-play { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .85rem; font-weight: 800;
  background: color-mix(in srgb, currentColor 16%, transparent); color: inherit; padding: 0; }
.v-wave { flex: 1; height: 30px; display: flex; align-items: center; gap: 2px; cursor: pointer; }
.v-wave i { flex: 1; min-width: 2px; border-radius: 3px; background: currentColor; opacity: .35; transition: opacity .15s; }
.v-wave i.on { opacity: 1; }
.voice.new .v-play { box-shadow: 0 0 0 2px var(--samen); }
.v-dur { font-size: .72rem; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 30px; opacity: .85; }
.v-speed { font-size: .68rem; font-weight: 800; padding: 3px 6px; border-radius: 99px; background: color-mix(in srgb, currentColor 14%, transparent); color: inherit; min-width: 30px; }
.voice:not(.playing) .v-speed { display: none; }

/* ---------- Vlogs ---------- */
.chat-video { position: relative; display: block; padding: 0; border-radius: 18px; overflow: hidden; background: #111; width: min(56vw, 220px); aspect-ratio: 3 / 4; }
.chat-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.4rem; }
.cv-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; color: #fff; background: rgba(0,0,0,.42); backdrop-filter: blur(6px); font-size: 1.2rem; padding-left: 3px; }
.cv-dur { position: absolute; left: 8px; bottom: 8px; color: #fff; font-size: .72rem; font-weight: 800; background: rgba(0,0,0,.45); padding: 3px 8px; border-radius: 99px; }
video.cam-img { object-fit: contain; background: #000; }
.vlog-player { width: 100%; height: 100%; }

/* Ontspanknop: tik = foto, ingedrukt houden = vlog */
.shutter { position: relative; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.shutter-ring { position: absolute; inset: -9px; width: calc(100% + 18px); height: calc(100% + 18px); transform: rotate(-90deg); pointer-events: none; }
.shutter-ring circle { fill: none; stroke: #e2484f; stroke-width: 6; stroke-linecap: round; stroke-dasharray: var(--p, 0) 100; opacity: 0; }
.shutter.rec { transform: scale(1.15); background: rgba(226, 72, 79, .55); border-color: #fff; }
.shutter.rec .shutter-ring circle { opacity: 1; }
.cam-hint { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 122px); text-align: center; color: #fff; font-size: .8rem; font-weight: 700; text-shadow: 0 1px 6px rgba(0,0,0,.5); pointer-events: none; }
.cam:has(#camPreview:not([hidden])) .cam-hint { display: none; }
.v-wave { min-width: 0; overflow: hidden; }
.v-wave i { min-width: 0; }
.voice { max-width: 100%; }
.vlog-player { bottom: auto; height: calc(100% - env(safe-area-inset-bottom) - 92px); }

/* ---------- Video-snaps (paars, zoals Snapchat) ---------- */
.sq.vid { background: #9b5de5; }
.sq.vid.open { background: transparent; border-color: #9b5de5; }
.snap-pill.new.vid, .snap-pill.sent.vid { color: #9b5de5; }
.snap-banner.vid { --snapc: #9b5de5; border-color: color-mix(in srgb, #9b5de5 45%, transparent); background: color-mix(in srgb, #9b5de5 14%, var(--card)); }
.snap-banner.vid b { color: #9b5de5; }
.snap-bar.multi { display: flex; gap: 4px; background: none; }
.snap-bar.multi span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.snap-bar.multi i { display: block; height: 100%; width: 0; background: #fff; }
.vsnap video.cam-img { object-fit: cover; }
.vs-load { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff; font-weight: 800; background: rgba(0,0,0,.4); padding: 8px 16px; border-radius: 99px; }
.pv-part { position: absolute; top: calc(env(safe-area-inset-top) + 22px); left: 50%; transform: translateX(-50%); color: #fff; font-weight: 800; font-size: .85rem; text-shadow: 0 1px 6px rgba(0,0,0,.6); z-index: 3; }
.pv-part:empty { display: none; }
.snap-bar.multi span { width: auto; transition: none; }
.snap-banner.vid { border-color: #9b5de5; }
.older-btn { align-self: center; margin: 4px 0 10px; padding: 7px 14px; border-radius: 99px; background: var(--soft); color: var(--muted); font-weight: 800; font-size: .78rem; }
.snap-banner.vid span { color: #9b5de5; }

/* ---------- Finishing touches: aanraakgevoel ---------- */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
.tile, .icon-btn, .chip, .wij-person, .song-like, .v-play, .cam-round, .snap-banner, .older-btn { transition: transform .12s var(--ease), background .2s; }
.tile:active, .wij-person:active, .snap-banner:active { transform: scale(.97); }
.icon-btn:active, .chip:active, .cam-round:active, .song-like:active, .v-play:active { transform: scale(.9); }
#nav a { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#nav a:active svg { transform: scale(.88); transition: transform .1s; }
img, svg { -webkit-user-drag: none; }
.tile img, .avatar, .song-art img, .pl-cover img { -webkit-touch-callout: none; }
input, select, textarea { font-size: max(16px, 1em); } /* geen automatisch inzoomen op iPhone */
.app-foot { text-align: center; color: var(--muted); font-size: .75rem; font-weight: 700; margin: 6px 0 20px; opacity: .8; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
/* Enkel nieuwe berichtjes animeren (niet alles bij het openen van de chat) */
.msg { animation: none; }
.msg.pop { animation: fade .25s var(--ease); }
.chat-scroll { contain: content; }

/* ---------- Muziekspeler onderaan (volledige liedjes) ---------- */
.yt-dock { position: fixed; z-index: 55; left: 10px; right: 10px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 8px);
  display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 6px; border-radius: 18px;
  background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0,0,0,.25); border: 1px solid var(--line);
  transform: translateY(calc(100% + var(--nav-h) + 60px)); transition: transform .35s var(--ease); }
.yt-dock.on { transform: none; }
.yt-frame { width: 96px; height: 54px; flex: none; border-radius: 10px; overflow: hidden; background: #000; }
.yt-frame iframe, .yt-frame > div { width: 100%; height: 100%; display: block; border: 0; }
.yt-info { flex: 1; min-width: 0; display: grid; gap: 1px; cursor: pointer; }
.yt-info b, .yt-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-info b { font-size: .88rem; }
.yt-info span { font-size: .74rem; color: var(--muted); font-weight: 700; }
.yt-prog { height: 3px; border-radius: 3px; background: var(--line); margin-top: 4px; overflow: hidden; }
.yt-prog i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .5s linear; }
.yt-btn { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; color: inherit; }
.yt-btn.main { width: 40px; height: 40px; background: var(--accent); color: var(--on-accent); font-size: 1rem; }
.yt-btn.x { width: 28px; font-size: .8rem; color: var(--muted); }
.yt-btn:active { transform: scale(.9); }
.yt-hint { position: absolute; left: 6px; bottom: calc(100% + 6px); background: var(--ink); color: var(--bg); font-size: .75rem; font-weight: 800; padding: 6px 10px; border-radius: 10px; }
body.has-dock #app { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 100px); }
/* In de chat even uit beeld (muziek speelt gewoon door) */
body.chat-mode .yt-dock.on, body.kb-open .yt-dock.on { transform: translateY(calc(100% + var(--nav-h) + 60px)); }
@media (max-width: 380px) { .yt-btn#ytPrev { display: none; } }
@media (min-width: 900px) { .yt-dock { left: 240px; right: 20px; bottom: 16px; max-width: 640px; } }

/* ---------- Risky rad ---------- */
.spicy-games { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.rad-card { display: grid; gap: 14px; justify-items: center; }
.rad-wrap { position: relative; width: min(84vw, 340px); aspect-ratio: 1; margin-top: 10px; }
.rad-svg { width: 100%; height: 100%; display: block; border-radius: 50%; box-shadow: 0 10px 34px rgba(226, 72, 111, .35), 0 0 0 6px color-mix(in srgb, #e2486f 30%, var(--card)); }
.rad-svg.spin { transition: transform 4.2s cubic-bezier(.12, .7, .1, 1); }
.rad-pointer { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 1.6rem; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.5); }
.rad-opt { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; color: var(--muted); }
.rad-result { text-align: center; animation: rise .5s cubic-bezier(.2, 1.3, .4, 1); background: linear-gradient(160deg, color-mix(in srgb, #e2486f 18%, var(--card)), color-mix(in srgb, #9b5de5 16%, var(--card))); }
.rad-big { font-size: 3.4rem; line-height: 1; }
.rad-result h2 { font-size: 1.3rem; margin: 8px 0 4px; }
.rad-risk { display: flex; justify-content: center; align-items: center; gap: 6px; font-size: .95rem; }
.rad-risk span { font-size: .75rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.rad-result p { margin: 10px 0; font-weight: 600; }
.rad-act { display: inline-block; padding: 8px 14px; border-radius: 99px; background: color-mix(in srgb, #e2486f 22%, var(--card)); font-weight: 800; }
.rad-btns { display: flex; gap: 8px; margin-top: 14px; }
.rad-btns .btn { flex: 1; }
.rad-list { display: grid; gap: 4px; max-height: 340px; overflow-y: auto; }
.rad-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; text-align: left; color: inherit; font: inherit; }
.rad-item:active { background: var(--soft); }
.rad-item span { font-size: 1.3rem; width: 30px; text-align: center; }
.rad-item b { flex: 1; font-size: .9rem; }
.rad-item i { font-style: normal; font-size: .7rem; }
.rad-item.done b { text-decoration: line-through; opacity: .55; }
.rad-note { text-align: center; margin: 4px 8px 18px; }
.update-pill { position: fixed; z-index: 90; left: 50%; top: calc(env(safe-area-inset-top) + 10px); transform: translateX(-50%); background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: .85rem; padding: 10px 16px; border-radius: 99px; box-shadow: 0 8px 24px rgba(0,0,0,.25); white-space: nowrap; animation: rise .4s var(--ease); }
/* Vaste ruimte voor foto's in de chat: niets verspringt meer terwijl ze laden */
.chat-photo img { width: min(240px, 62vw); height: auto; aspect-ratio: 3 / 4; max-height: none; min-height: 0; min-width: 0; }
.chat-photo img[data-landscape] { aspect-ratio: 4 / 3; }

/* ---------- Brieven met een slotje ---------- */
.letter-list { display: grid; gap: 10px; }
.letter { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); color: inherit; font: inherit;
  background-image: linear-gradient(135deg, color-mix(in srgb, #e8799f 10%, transparent), transparent 60%); }
.letter .env { font-size: 2.2rem; flex: none; }
.letter-txt { display: grid; gap: 2px; min-width: 0; }
.letter.locked { opacity: .85; }
.letter.locked .env { filter: grayscale(.3); }
.letter:not(.locked):not(.opened) .env { animation: gg-wiggle 2.4s ease-in-out infinite; }
.letter-view { position: fixed; inset: 0; z-index: 85; background: rgba(20, 10, 20, .55); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 18px; animation: fade .3s var(--ease); }
.paper { width: 100%; max-width: 460px; max-height: 84vh; overflow-y: auto; background: #fffaf3; color: #3a2b2f; border-radius: 18px; padding: 22px 20px 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
  background-image: repeating-linear-gradient(transparent 0 31px, rgba(232, 121, 159, .18) 31px 32px); animation: rise .6s cubic-bezier(.2, 1.3, .4, 1); }
.paper-head { display: grid; justify-items: center; gap: 2px; text-align: center; margin-bottom: 14px; }
.paper-head span:first-child { font-size: 2rem; }
.paper-text { font-family: Georgia, 'Times New Roman', serif; font-size: 1.05rem; line-height: 32px; margin-bottom: 18px; white-space: normal; }

/* ---------- Verlanglijst ---------- */
.wish { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.wish:first-child { border-top: 0; }
.wish-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.wish.bought .wish-main b { text-decoration: line-through; opacity: .6; }

/* ---------- Quiz ---------- */
.quiz-card { text-align: center; }
.quiz-prog { display: flex; gap: 4px; margin-bottom: 10px; }
.quiz-prog span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.quiz-prog span.done { background: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.quiz-prog span.now { background: var(--accent); }
.quiz-q { font-size: 1.3rem; margin: 10px 0 16px; }
.quiz-opts { display: grid; gap: 8px; margin-bottom: 12px; }
.quiz-opt { padding: 14px; border-radius: 14px; background: var(--soft); font-weight: 800; color: inherit; font: inherit; font-weight: 800; transition: transform .1s; }
.quiz-opt:active { transform: scale(.97); background: color-mix(in srgb, var(--accent) 25%, var(--soft)); }
.quiz-cta { text-align: center; }
.quiz-cta .big { font-size: 3rem; }
.quiz-cta h2 { margin: 6px 0; }
.quiz-score { display: flex; justify-content: space-around; text-align: center; margin-bottom: 10px; }
.quiz-score > div { display: grid; justify-items: center; gap: 4px; }
.quiz-score b { font-size: 1.5rem; }
.quiz-hist { display: grid; }
.quiz-row { display: flex; justify-content: space-between; padding: 9px 2px; border-top: 1px solid var(--line); color: inherit; font: inherit; font-size: .9rem; }
.quiz-res { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line); }

/* ---------- Streaks ---------- */
.streak { font-size: .78rem; font-weight: 800; padding: 1px 6px; border-radius: 99px; background: color-mix(in srgb, #f17c5b 20%, transparent); margin-left: 4px; vertical-align: 1px; }
.streak.risk { background: color-mix(in srgb, #f7c948 30%, transparent); }
.wij-streak { display: inline-block; margin-top: 6px; font-size: .85rem; font-weight: 800; }

/* ---------- Album ---------- */
.album-month { font-weight: 800; font-size: .95rem; margin: 16px 4px 8px; text-transform: capitalize; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 14px; overflow: hidden; }
.album-item { position: relative; padding: 0; aspect-ratio: 1; background: var(--soft); overflow: hidden; }
.album-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-item i { position: absolute; right: 6px; bottom: 6px; color: #fff; font-style: normal; font-size: .8rem; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.album-view .cam-img { object-fit: contain; background: #000; }
.album-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 64px; color: #fff; font-size: 2.2rem; background: rgba(0,0,0,.25); z-index: 3; }
.album-nav.l { left: 0; border-radius: 0 12px 12px 0; } .album-nav.r { right: 0; border-radius: 12px 0 0 12px; }

/* ---------- Onze plekken ---------- */
.places-map { height: 46vh; min-height: 260px; border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; background: var(--soft); box-shadow: var(--shadow); }
.place-pin span { display: grid; place-items: center; width: 34px; height: 34px; font-size: 1.5rem; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.place-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 0; border-top: 1px solid var(--line); text-align: left; color: inherit; font: inherit; }
.place-row:first-child { border-top: 0; }
.place-row > span:nth-child(2) { flex: 1; min-width: 0; display: grid; }
.place-e { font-size: 1.4rem; width: 30px; text-align: center; }
.place-row i { font-style: normal; padding: 6px; }

/* ---------- Opslag ---------- */
.stor { margin-bottom: 10px; }
.stor-top { display: flex; justify-content: space-between; font-size: .85rem; font-weight: 700; margin-bottom: 4px; }
.stor-bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.stor-bar i { display: block; height: 100%; background: var(--accent); border-radius: 8px; min-width: 4px; }
/* Kaarten (Leaflet) nooit boven pop-ups en menu's */
.leaflet-container { isolation: isolate; z-index: 0; }
