/* Stijl van de save-the-date: papier, kobaltblauw, rood-oranje, handgetekende lijnen, maar met gewone leesbare letters. */
:root {
  --paper: #f5f4f0;
  --card: #fbfaf7;
  --ink: #23324d;
  --muted: #6f7a8f;
  --line: #d3dcec;
  --blue: #3767b3;
  --blue-dark: #2a5296;
  --blue-soft: #e3eaf6;
  --red: #dc4c34;
  --red-soft: #fbe5e0;
  --late: #b42318;
  --late-soft: #fde8e6;
  --radius: 16px;
  --hand: Georgia, serif;
  --script: "Yellowtail", "Brush Script MT", cursive;
  --scallop-frame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cpath d='M20 12 A10 10 0 0 1 40 12 C58 2 58 2 48 20 A10 10 0 0 1 48 40 C58 58 58 58 40 48 A10 10 0 0 1 20 48 C2 58 2 58 12 40 A10 10 0 0 1 12 20 C2 2 2 2 20 12 Z' fill='none' stroke='%233767b3' stroke-width='3.2' stroke-linejoin='round'/%3E%3C/svg%3E");
  --wavy-frame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M8 16 A8 8 0 0 1 16 8 Q20 4 24 8 T32 8 A8 8 0 0 1 40 16 Q44 20 40 24 T40 32 A8 8 0 0 1 32 40 Q28 44 24 40 T16 40 A8 8 0 0 1 8 32 Q4 28 8 24 T8 16 Z' fill='%23fbfaf7' stroke='%233767b3' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
  --wavy-frame-now: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M8 16 A8 8 0 0 1 16 8 Q20 4 24 8 T32 8 A8 8 0 0 1 40 16 Q44 20 40 24 T40 32 A8 8 0 0 1 32 40 Q28 44 24 40 T16 40 A8 8 0 0 1 8 32 Q4 28 8 24 T8 16 Z' fill='%23fbfaf7' stroke='%23dc4c34' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
  --wavy-line: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 4 Q6 0 12 4 T24 4' fill='none' stroke='%233767b3' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-family: var(--hand); font-weight: normal; color: var(--blue); }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--blue); }
label { display: grid; gap: 4px; font-size: 14px; color: var(--muted); }
label.inline { display: inline-flex; align-items: center; gap: 6px; }
a { color: var(--blue); }

.primary { background: var(--blue); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; white-space: nowrap; font-family: var(--hand); font-size: 15px; }
.primary:hover { background: var(--blue-dark); }
.secondary { background: transparent; color: var(--blue); border: 1.5px solid var(--blue); border-radius: 999px; padding: 8px 16px; white-space: nowrap; font-family: var(--hand); font-size: 15px; }
.link-button { background: none; border: 0; color: var(--blue); text-decoration: underline; text-decoration-style: wavy; text-underline-offset: 4px; padding: 0; }
.link-button.danger-link { color: var(--red); }
.danger { background: none; border: 0; color: var(--red); padding: 8px 0; }
.muted { color: var(--muted); font-size: 14px; }
.hidden { display: none !important; }
.script { font-family: var(--script); color: var(--red); font-weight: normal; }
.scalloped { border: 24px solid transparent; border-image: var(--scallop-frame) 20 round; }

/* ---------- Kop en navigatie ---------- */
.app-header { background: var(--paper); color: var(--blue); display: flex; align-items: center; gap: 16px; padding: 10px 20px 14px; position: sticky; top: 0; z-index: 10; }
.app-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--wavy-line) repeat-x; background-size: 24px 8px; }
.brand { font-family: var(--script); color: var(--red); font-size: 28px; white-space: nowrap; }
.tabs { display: flex; gap: 4px; flex: 1; }
.tabs button, .tabs a { background: none; border: 0; color: var(--blue); padding: 6px 12px; border-radius: 999px; font-family: var(--hand); font-size: 16px; }
.tabs button.active, .tabs a.active { background: var(--blue); color: #fff; }
.tabs .icon { margin-right: 4px; }
.account { display: flex; align-items: center; gap: 10px; font-size: 14px; white-space: nowrap; }
.account button { background: none; color: var(--blue); border: 1.5px solid var(--blue); border-radius: 999px; padding: 4px 12px; font-family: var(--hand); font-size: 14px; }

.page { max-width: 1080px; margin: 0 auto; padding: 24px 16px 100px; }
.section-title { font-size: 25px; margin: 30px 0 10px; display: flex; align-items: baseline; gap: 10px; }
.section-title:first-child { margin-top: 0; }

/* ---------- Bouwstenen ---------- */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin: 0 0 6px; font-size: 21px; }
.card.clickable { cursor: pointer; }
.card.clickable:hover { border-color: var(--blue); }
.big-number { font-family: var(--script); font-size: 46px; color: var(--red); line-height: 1.1; }
.big-number.late { color: var(--late); }
.bar { height: 8px; background: var(--blue-soft); border-radius: 4px; overflow: hidden; margin: 8px 0 4px; }
.bar span { display: block; height: 100%; background: var(--blue); }
.pill { display: inline-block; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); white-space: nowrap; border: 0; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.outline { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 1.2px var(--blue); }
.pill.grey { background: #ecebe6; color: var(--muted); }
.pill.late { background: var(--late-soft); color: var(--late); }
.pill.priority { background: var(--red); color: #fff; }
.pill.off { background: #efeee9; color: #b3b8c3; }
button.pill { cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.segmented { display: flex; max-width: 100%; min-width: 0; border: 1.5px solid var(--blue); border-radius: 999px; padding: 3px; overflow-x: auto; }
.segmented button, .segmented a { flex-shrink: 0; border: 0; background: none; padding: 5px 15px; border-radius: 999px; white-space: nowrap; color: var(--blue); font-family: var(--hand); font-size: 15px; }
.segmented button.active, .segmented a.active { background: var(--blue); color: #fff; }
.filters { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-items: center; margin-bottom: 16px; }
.filters label.inline { color: var(--ink); }

.list { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.group-heading { padding: 9px 14px; background: var(--blue-soft); color: var(--blue); font-family: var(--hand); font-size: 16px; display: flex; justify-content: space-between; align-items: baseline; }
.group-heading .muted { font-family: system-ui, sans-serif; }
.empty { padding: 16px; color: var(--muted); text-align: center; }

/* ---------- Taken ---------- */
.task-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); }
.task-row:first-child, .group-heading + .task-row { border-top: 0; }
.task-row input[type=checkbox] { width: 20px; height: 20px; flex-shrink: 0; }
.task-title { flex: 1; text-align: left; background: none; border: 0; padding: 0; color: var(--ink); min-width: 0; }
.task-row.done .task-title { text-decoration: line-through; color: var(--muted); }
.task-row .chips { justify-content: flex-end; }

.board { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.board-column { background: var(--blue-soft); border-radius: var(--radius); padding: 10px; min-height: 160px; scroll-snap-align: start; }
.board-column.drop-target { outline: 2px dashed var(--blue); }
.board-column h3 { font-size: 19px; margin: 4px 4px 10px; display: flex; justify-content: space-between; }
.board-card { background: #fff; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; border: 1px solid var(--line); }
.board-card[draggable=true] { cursor: grab; }
.board-card .task-title { font-weight: 600; display: block; margin-bottom: 6px; }
.board-card .card-footer { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.advance { margin-left: auto; border: 0; background: var(--blue-soft); color: var(--blue); border-radius: 999px; padding: 4px 9px; font-size: 12px; }

/* ---------- Draaiboek ---------- */
.day-date { color: var(--muted); margin: 0 0 12px; }
.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 27px; top: 0; bottom: 0; border-left: 2px dashed var(--blue); opacity: .45; }
.moment { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 10px; margin-bottom: 12px; }
.moment > time { background: var(--paper); position: relative; z-index: 1; text-align: center; font-family: var(--hand); font-size: 16px; color: var(--red); padding-top: 12px; align-self: start; }
.moment details { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.moment summary { cursor: pointer; list-style: none; }
.moment summary::-webkit-details-marker { display: none; }
.moment-title { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.moment .details-text { color: var(--muted); font-size: 14px; margin: 8px 0; }
.moment .list { margin: 10px 0; }
.moment-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Dialogen en meldingen ---------- */
dialog { border: 0; border-radius: 20px; padding: 0; width: min(520px, 94vw); max-height: 92vh; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: rgba(35, 50, 77, .45); }
dialog form { display: grid; gap: 12px; padding: 20px; }
dialog h2 { margin: 0; font-size: 28px; }
dialog fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dialog-actions span { display: flex; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--blue); color: #fff; padding: 12px 18px; border-radius: 999px; z-index: 50; max-width: 90vw; }

.stacked-form { display: grid; gap: 10px; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.form-row > * { flex: 1; min-width: 140px; }
.form-row > button { flex: 0; }

/* ---------- Inloggen ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login form { width: min(380px, 100%); background: var(--paper); padding: 22px 18px; display: grid; gap: 12px; }
.login h1 { margin: 0; text-align: center; font-size: 42px; }
.login .eyebrow { text-align: center; margin: 0; }
.error { color: var(--late); font-size: 14px; }
.eyebrow { font-family: var(--hand); color: var(--blue); font-size: 16px; }

/* ---------- Gastenapp ---------- */
.invitation { max-width: 560px; margin: 14px auto 0; text-align: center; padding: 18px 16px 20px; }
.invitation img { width: min(300px, 78%); display: block; margin: 0 auto; }
/* Laat de papierrand van de foto wegvloeien in de achtergrond */
.invitation img {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 3%, #000 92%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 3%, #000 92%, transparent);
  mask-composite: intersect;
}
.invitation h1 { font-family: var(--script); color: var(--red); font-size: clamp(44px, 12vw, 64px); margin: 4px 0 2px; letter-spacing: 0; line-height: 1.15; }
.invitation p { margin: 4px 0 0; font-family: var(--hand); color: var(--blue); font-size: 17px; }
.language-switch { display: flex; justify-content: flex-end; gap: 2px; margin: -6px 0 4px; }
.language-switch button { background: none; border: 0; padding: 4px 8px; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; border-radius: 999px; }
.language-switch button.active { color: var(--blue); font-weight: 600; background: var(--blue-soft, rgba(0,0,0,.05)); }
.guest-page { max-width: 640px; margin: 0 auto; padding: 16px 16px 110px; }
/* The frame svg paints the card colour inside the wave, so the background must stay out of the border. */
.guest-page .card { background-clip: padding-box; border: 12px solid transparent; border-image: var(--wavy-frame) 16 round; padding: 6px 8px; }
.guest-moment .card.now { border-image-source: var(--wavy-frame-now); }
.guest-moment p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.info-card { margin-bottom: 12px; }
.info-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.announcement { border-color: var(--red); background: var(--red-soft); }
.announcement p { color: var(--ink); }
.button-link { display: inline-block; margin-top: 10px; background: var(--blue); color: #fff; padding: 10px 18px; border-radius: 999px; text-decoration: none; font-family: var(--hand); font-size: 16px; }
.rsvp fieldset { border: 1.5px solid var(--line); border-radius: 14px; display: flex; gap: 16px; flex-wrap: wrap; padding: 10px 14px; }
.rsvp legend { color: var(--blue); font-family: var(--hand); font-size: 15px; }
.rsvp label.inline { color: var(--ink); font-size: 16px; }
.thanks { text-align: center; font-family: var(--script); color: var(--red); font-size: 36px; padding: 30px 0 10px; }
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper); display: flex; padding: 6px 0 env(safe-area-inset-bottom); z-index: 10; }
.bottom-nav::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; height: 8px; background: var(--wavy-line) repeat-x; background-size: 24px 8px; }
.bottom-nav button { flex: 1; border: 0; background: none; padding: 7px 0 10px; font-family: var(--hand); font-size: 13px; color: var(--muted); }
.bottom-nav button .icon { display: block; font-size: 20px; }
.bottom-nav button.active { color: var(--blue); }

/* ---------- Mobiel ---------- */
@media (max-width: 760px) {
  .app-header { padding: 10px 14px 14px; }
  .brand { flex: 1; font-size: 25px; }
  .app-header .tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper); padding: 6px 0 env(safe-area-inset-bottom); gap: 0; }
  .app-header .tabs::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; height: 8px; background: var(--wavy-line) repeat-x; background-size: 24px 8px; }
  .app-header .tabs button, .app-header .tabs a { flex: 1; color: var(--muted); font-size: 14px; padding: 6px 0 10px; border-radius: 0; }
  .app-header .tabs button.active, .app-header .tabs a.active { background: none; color: var(--blue); }
  .app-header .tabs .icon { display: block; font-size: 20px; margin: 0; }
  .account .name { display: none; }
  .board { grid-template-columns: repeat(3, 82vw); }
  .task-row { flex-wrap: wrap; }
  .task-row .chips { width: 100%; justify-content: flex-start; padding-left: 30px; }
  summary.task-row { flex-wrap: nowrap; align-items: flex-start; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid .big-number { font-size: 30px; }
  .two-columns { grid-template-columns: 1fr; }
}
.venue-card img { display: block; width: calc(100% + 32px); margin: -16px -16px 14px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius) var(--radius) 0 0; }
.invitation-row .form-row { margin-top: 8px; }
.invitation-row .form-row > a { flex: 0; }
.invitation-choice .chips { gap: 6px 16px; }
.invitation-choice legend { margin-bottom: 6px; }
.invitation-choice label.inline { color: var(--ink); }

/* Groepjes en kamers */
.guest-toolbar { margin-top: 16px; }
.guest-toolbar input[type=search] { flex: 1 1 240px; }
.guest-filters { margin-bottom: 12px; }
.guest-filters .pill { cursor: pointer; font-size: 13px; padding: 5px 12px; }
.party-row + .party-row, .party-row + .empty { border-top: 1px solid var(--line); }
.party-row > .task-row { border-top: 0; }
summary.task-row { cursor: pointer; list-style: none; }
summary.task-row::-webkit-details-marker { display: none; }
summary.task-row:hover { background: var(--blue-soft); }
.party-row[open] > summary { background: var(--blue-soft); }
.party-names { display: block; }
.party-details { display: block; font-size: 14px; }
.member-name.nee { text-decoration: line-through; color: var(--muted); }
.member-name.ja::after { content: " ✓"; color: var(--blue); }
.party-editor { padding: 6px 14px 14px; background: var(--blue-soft); display: flex; flex-direction: column; gap: 8px; }
.party-editor label { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.party-editor .form-row { align-items: flex-end; }
.party-editor .form-row > a { flex: 0 0 auto; text-decoration: none; }
.member-editor { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--card); border-radius: 10px; padding: 8px 12px; }
.member-editor strong { flex: 1 0 120px; }
.member-editor select { width: auto; }
.add-guests summary { cursor: pointer; color: var(--blue); }
.add-guests form { margin-top: 12px; }
.room-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.room-card { display: flex; flex-direction: column; gap: 8px; }
.room-card.full { border-color: var(--blue); }
.occupants { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.floor-plan { margin: 16px 0; }
.floor-plan summary { cursor: pointer; color: var(--blue); }
.floor-plan img { width: 100%; max-width: 900px; display: block; margin: 12px auto 0; }
.member-answer label:not(.inline) { display: block; margin-top: 8px; }
.occupants .link-button { text-decoration: none; margin-left: 4px; }
.tabs a, .segmented a { text-decoration: none; display: inline-block; text-align: center; }

.supplier-files { padding: 4px 16px 14px 16px; display: grid; gap: 6px; }
.supplier-files h4 { margin: 8px 0 0; font-family: var(--hand); font-weight: normal; color: var(--blue); font-size: 16px; }
.supplier-files p { margin: 0; }
.payment-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.file-upload { cursor: pointer; color: var(--blue); }
.file-upload input { width: auto; border: 0; padding: 0; background: none; }
.task-comments { border-top: 1px solid var(--line); padding: 6px 20px 0; }
.task-comments h3 { margin: 6px 0; }
.task-comments ul { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
dialog .task-comments form { display: flex; padding: 12px 0 20px; }
.task-comments input { flex: 1; }
.comment { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.comment p { margin: 2px 0 0; white-space: pre-wrap; }
.gift-input { max-width: 240px; }
.weather-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; margin-top: 6px; }
.weather-day { display: flex; flex-direction: column; align-items: center; gap: 2px; text-transform: capitalize; }
.weather-icon { font-size: 28px; }
.packing-list { margin: 6px 0 0; padding-left: 20px; }
.packing-list li { margin: 2px 0; }
.photo-upload { cursor: pointer; text-align: center; }
.whatsapp-link { display: block; margin-top: 10px; text-align: center; background: #25d366; color: #fff; }
.photo-upload-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.photo-upload.secondary-link { background: var(--blue-soft); color: var(--blue); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.photo { position: relative; margin: 0; }
.photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--blue-soft); }
.photo figcaption { font-size: 12px; color: var(--muted); margin-top: 3px; }
.photo-delete { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .55); color: #fff; font-size: 18px; line-height: 1; }

@media print {
  .app-header, .bottom-nav, .no-print, .toolbar:has(.segmented) { display: none !important; }
  body { background: #fff; }
}
