/* ═══════════════════════════════════════════════════════════════════════════
   Shreya — cozy, warm, een beetje capybara.
   Kleuren staan als variabelen bovenaan; dark mode volgt automatisch het systeem.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --bg: #fff6f1;
    --bg-2: #ffece4;
    --surface: #ffffff;
    --surface-2: #fff9f6;
    --text: #3a2530;
    --muted: #8b7280;
    --line: #f1dcd6;
    --primary: #e4577f;
    --primary-2: #ff8fab;
    --primary-soft: #ffe1e9;
    --primary-ink: #ffffff;
    --accent: #8a6bd1;
    --accent-soft: #ece5fb;
    --capy: #a9764f;
    --success: #2f9e6e;
    --success-soft: #dcf5ea;
    --warn: #d98a2b;
    --warn-soft: #fdeed9;
    --danger: #d64550;
    --paper: #fffdf8;
    --radius: 22px;
    --radius-sm: 14px;
    --shadow: 0 8px 28px rgba(160, 80, 100, .10);
    --shadow-sm: 0 2px 10px rgba(160, 80, 100, .08);
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bottomnav-h: 66px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #1a1218;
        --bg-2: #22171f;
        --surface: #2a1e27;
        --surface-2: #31242e;
        --text: #f7eaf0;
        --muted: #b49dab;
        --line: #3d2d38;
        --primary: #ff7aa0;
        --primary-2: #ff9fbb;
        --primary-soft: #4a2333;
        --primary-ink: #2a0f19;
        --accent: #b49bf0;
        --accent-soft: #352a4d;
        --success-soft: #1d3a2e;
        --warn-soft: #43321c;
        --paper: #2e2229;
        --shadow: 0 8px 28px rgba(0, 0, 0, .35);
        --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
        color-scheme: dark;
    }
}

/* ── Basis ─────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 100% -10%, var(--primary-soft), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, var(--accent-soft), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .75em; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .75rem; }
.center { text-align: center; justify-content: center; }
.grow { flex: 1 1 auto; min-width: 0; }
.spacer { flex: 1 1 auto; }
.d-block { display: block; }
.serif { font-family: var(--font-display); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .grid-3 { gap: 8px; } }

.section-title { margin: 26px 0 12px; display: flex; align-items: baseline; gap: 8px; }

/* ── Opstartscherm & herverbinden ──────────────────────────────────────────── */

.boot-splash {
    position: fixed; inset: 0; z-index: 100;
    display: grid; place-items: center;
    background: var(--bg);
    transition: opacity .3s ease;
}
body.app-ready .boot-splash { opacity: 0; pointer-events: none; }
.boot-heart, .loading-heart, .reconnect-heart { font-size: 44px; animation: heartbeat 1.2s ease-in-out infinite; }

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.18); }
    30% { transform: scale(1); }
    45% { transform: scale(1.12); }
}

.reconnect {
    display: none; position: fixed; inset: 0; z-index: 200;
    background: rgba(26, 18, 24, .45); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 20px;
}
.reconnect.components-reconnect-show,
.reconnect.components-reconnect-failed,
.reconnect.components-reconnect-rejected { display: flex; }
.reconnect-card {
    background: var(--surface); border-radius: var(--radius); padding: 28px; text-align: center;
    box-shadow: var(--shadow); max-width: 320px; width: 100%;
}
.reconnect-show-text, .reconnect-failed-text, .reconnect-rejected-text { display: none; }
.components-reconnect-show .reconnect-show-text { display: block; }
.components-reconnect-failed .reconnect-failed-text { display: inline-flex; margin: 8px auto 0; }
.components-reconnect-failed p.reconnect-failed-text { display: block; }
.components-reconnect-rejected .reconnect-rejected-text { display: block; }

#blazor-error-ui {
    display: none; position: fixed; left: 12px; right: 12px; bottom: calc(var(--bottomnav-h) + 12px); z-index: 300;
    background: var(--danger); color: #fff; padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow);
}
#blazor-error-ui .reload { color: #fff; font-weight: 800; margin-left: 8px; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

/* ── App-shell ─────────────────────────────────────────────────────────────── */

.shell { min-height: 100vh; }

.sidebar { display: none; }

.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(14px);
}
.topbar-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--text); }
.topbar-brand:hover { text-decoration: none; }
.topbar-avatar:hover { text-decoration: none; }

.content {
    max-width: 860px; margin: 0 auto;
    padding: 8px 16px calc(var(--bottomnav-h) + 28px + env(safe-area-inset-bottom));
}

.bottomnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
}
.bottomnav .tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--muted); font-size: .7rem; font-weight: 700; text-decoration: none;
}
.bottomnav .tab span { font-size: 1.35rem; transition: transform .2s ease; filter: grayscale(.4); }
.bottomnav .tab.active { color: var(--primary); }
.bottomnav .tab.active span { transform: translateY(-2px) scale(1.12); filter: none; }

@media (min-width: 960px) {
    .shell { display: grid; grid-template-columns: 270px 1fr; }
    .sidebar {
        display: flex; flex-direction: column; gap: 6px;
        position: sticky; top: 0; height: 100vh; overflow-y: auto;
        padding: 20px 14px; border-right: 1px solid var(--line);
        background: color-mix(in srgb, var(--surface) 70%, transparent);
    }
    .topbar, .bottomnav { display: none; }
    .content { padding: 32px 32px 60px; }
    #blazor-error-ui { bottom: 16px; left: auto; width: 380px; }
}

.brand {
    display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px;
    font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--text);
}
.brand:hover { text-decoration: none; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-section { margin: 14px 10px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.side-link {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px;
    color: var(--text); font-weight: 600;
}
.side-link:hover { background: var(--primary-soft); text-decoration: none; }
.side-link.active { background: var(--primary); color: var(--primary-ink); }
.side-icon { width: 26px; display: inline-flex; justify-content: center; }
.side-user {
    display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px;
    background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm);
}
.side-user:hover { text-decoration: none; }
.side-user small { display: block; color: var(--muted); }

/* ── Kaarten & koppen ──────────────────────────────────────────────────────── */

.card {
    display: block; background: var(--surface); border-radius: var(--radius); padding: 18px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--line); color: var(--text);
}
a.card:hover, button.card:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
a.card, button.card { transition: transform .15s ease, box-shadow .15s ease; }
.card + .card { margin-top: 14px; }
.grid > .card + .card, .stack > .card + .card { margin-top: 0; }
.card h3:last-child { margin-bottom: 0; }

.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; }

.page-header { display: flex; align-items: center; gap: 14px; margin: 8px 0 20px; flex-wrap: wrap; }
.page-header-icon {
    width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
    background: var(--surface); box-shadow: var(--shadow-sm); flex: none;
}
.page-header-text { flex: 1 1 200px; min-width: 0; }
.page-header h1 { margin: 0; }
.lead { color: var(--muted); margin: 2px 0 0; }

.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .tile-grid { grid-template-columns: repeat(3, 1fr); } }
.tile {
    display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--text);
    transition: transform .15s ease, box-shadow .15s ease;
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.tile-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--bg-2); }
.tile-title { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.tile-desc { color: var(--muted); font-size: .85rem; }

.empty { text-align: center; padding: 40px 16px; }
.empty-icon { margin-bottom: 8px; display: flex; justify-content: center; }
.empty h3 { margin-bottom: 4px; }
.empty .btn { margin-top: 10px; }

.loading { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 48px 0; }

.big-number { font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1; }
.big-emoji { font-size: 64px; margin-bottom: 8px; }

/* ── Knoppen & formulieren ─────────────────────────────────────────────────── */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px; border-radius: 999px; border: 1px solid transparent;
    font: inherit; font-weight: 800; font-size: .95rem; cursor: pointer; text-decoration: none;
    transition: transform .1s ease, background .15s ease, box-shadow .15s ease; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: var(--primary-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; margin-top: 10px; }

.icon-btn {
    border: none; background: transparent; color: var(--text); font-size: 1.15rem; cursor: pointer;
    width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; flex: none;
}
.icon-btn:hover { background: var(--bg-2); }
.icon-btn.small { width: 28px; height: 28px; font-size: .8rem; }

.link-btn { background: none; border: none; padding: 0; color: var(--primary); font: inherit; cursor: pointer; text-align: left; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 700; font-size: .9rem; }
.field-error { color: var(--danger); font-size: .82rem; }
.validation-message { color: var(--danger); font-size: .82rem; }

.input {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
    background: var(--surface-2); color: var(--text); font: inherit; outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
textarea.input { resize: vertical; line-height: 1.6; }
.input-sm { width: auto; padding: 6px 10px; font-size: .85rem; }
.select { appearance: auto; }
.input.search { margin-bottom: 14px; }
.color-input { width: 64px; height: 44px; border: none; background: none; padding: 0; cursor: pointer; }
input[type="range"] { accent-color: var(--primary); width: 100%; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 18px; height: 18px; }
.check { display: flex; align-items: center; gap: 8px; margin: 6px 0 14px; cursor: pointer; }

.alert { background: var(--primary-soft); color: var(--text); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; font-weight: 600; }
.alert-success { background: var(--success-soft); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.chip {
    border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
    padding: 7px 13px; border-radius: 999px; font: inherit; font-size: .88rem; font-weight: 700; cursor: pointer;
}
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 800; background: var(--bg-2); }
.pill-soft { background: var(--accent-soft); color: var(--accent); }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }

.tabs { display: flex; gap: 6px; padding: 4px; background: var(--bg-2); border-radius: 999px; margin-bottom: 16px; overflow-x: auto; }
.tabs.center { justify-content: center; }
.tab-btn {
    flex: 1 0 auto; border: none; background: transparent; padding: 8px 14px; border-radius: 999px;
    font: inherit; font-weight: 800; font-size: .88rem; color: var(--muted); cursor: pointer; white-space: nowrap;
}
.tab-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.segmented { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); }
.segmented span { padding: 0 6px 0 8px; }
.segmented button { border: none; background: transparent; padding: 6px 12px; border-radius: 999px; font: inherit; font-weight: 800; font-size: .85rem; color: var(--muted); cursor: pointer; }
.segmented button.on { background: var(--primary); color: var(--primary-ink); }

.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); width: 100%; }
.list-item:last-child { border-bottom: none; }
.card.list { padding: 6px 18px; }

.progress-row { margin: 10px 0; }
.progress-label { display: flex; justify-content: space-between; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }
.progress { height: 12px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }

.stars { display: inline-flex; gap: 2px; margin: 6px 0 12px; }
.star { border: none; background: none; font-size: 2rem; line-height: 1; color: var(--line); cursor: pointer; padding: 0 2px; transition: transform .1s; }
.star.on { color: #ffc23d; }
.star:active { transform: scale(1.2); }
.stars.readonly .star { cursor: default; font-size: 1.1rem; }

.range-field input { margin-top: 2px; }

/* ── Modal & toast ─────────────────────────────────────────────────────────── */

.modal-backdrop {
    position: fixed; inset: 0; z-index: 90; background: rgba(26, 18, 24, .45); backdrop-filter: blur(3px);
    display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease;
}
.modal {
    background: var(--surface); width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
    border-radius: 26px 26px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    box-shadow: var(--shadow); animation: slide-up .2s ease;
}
.modal-wide { max-width: 760px; }
@media (min-width: 640px) {
    .modal-backdrop { align-items: center; padding: 20px; }
    .modal { border-radius: 26px; }
}
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.modal-head h3 { flex: 1; margin: 0; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 14px; flex-wrap: wrap; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.toast-host {
    position: fixed; z-index: 150; left: 50%; transform: translateX(-50%);
    top: calc(12px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 8px;
    width: min(420px, calc(100% - 24px)); pointer-events: none;
}
.toast {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 16px;
    background: var(--text); color: var(--bg); font-weight: 700; box-shadow: var(--shadow); animation: slide-down .25s ease;
}
.toast-error { background: var(--danger); color: #fff; }
.toast-icon { font-size: 1.2rem; }
@keyframes slide-down { from { transform: translateY(-16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Avatar, iconen & capybara ─────────────────────────────────────────────── */

.avatar {
    display: inline-grid; place-items: center; border-radius: 50%; flex: none; overflow: hidden;
    background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
    border: 2px solid var(--surface); box-shadow: var(--shadow-sm);
}
.icon-emoji { line-height: 1; display: inline-block; }
.icon-capy { display: inline-block; }

.capy-wrap { position: relative; display: inline-block; flex: none; }
.capy-wrap svg { display: block; overflow: visible; }
.capy-acc { position: absolute; left: 30%; top: 2%; transform: translate(-50%, -40%) rotate(-12deg); line-height: 1; }
.capy-zz { position: absolute; right: 10%; top: 0; color: var(--muted); font-weight: 800; animation: float 2s ease-in-out infinite; }
.pet-bounce { animation: bob 3s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes float { 0%, 100% { transform: translateY(0); opacity: .6; } 50% { transform: translateY(-8px); opacity: 1; } }

.icon-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-option {
    width: 54px; height: 54px; border-radius: 16px; border: 2px solid var(--line); background: var(--surface-2);
    display: grid; place-items: center; font-size: 26px; cursor: pointer;
}
.icon-option.on { border-color: var(--primary); background: var(--primary-soft); }
.icon-option.locked { opacity: .45; cursor: not-allowed; }

/* ── Auth ──────────────────────────────────────────────────────────────────── */

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border-radius: 28px; padding: 28px 24px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.auth-brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 8px; }
.auth-logo { font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: var(--primary); }
.auth-title { text-align: center; margin: 8px 0 2px; }
.auth-sub { text-align: center; color: var(--muted); margin-bottom: 20px; }
.auth-switch { text-align: center; margin-top: 18px; color: var(--muted); }
.auth-form .btn-block { margin-top: 6px; }

/* ── Home ──────────────────────────────────────────────────────────────────── */

.home { display: flex; flex-direction: column; gap: 14px; }
.home .card + .card { margin-top: 0; }
.hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 30px 18px; }
.hero-greeting h1 { font-size: 1.9rem; margin: 0; }
.together-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)); }
.couple-avatars { display: flex; align-items: center; justify-content: center; gap: 4px; }
.couple-avatars.small .avatar + .couple-amp { margin: 0 -4px; }
.couple-amp { font-family: var(--font-display); font-size: 1.6rem; color: var(--primary); margin: 0 6px; }
.anniversary { text-align: center; display: flex; flex-direction: column; align-items: center; font-weight: 700; }
.anniversary span { font-size: 1.6rem; }
.mini-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; overflow: hidden; }
.mini-link { color: var(--text); }
.mini-link:hover { text-decoration: none; }
.mini-top { display: flex; align-items: center; gap: 6px; font-size: 1.3rem; }
.mini-card .btn { margin-top: 4px; }
.flame { filter: grayscale(1); opacity: .5; display: inline-block; }
.flame.lit { filter: none; opacity: 1; animation: flicker 1.6s ease-in-out infinite; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.08) rotate(2deg); } }
.notice-card { display: flex; align-items: center; gap: 12px; }
.notice-icon { font-size: 1.6rem; }
.chevron { color: var(--muted); font-size: 1.5rem; }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.feed-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.feed-item a { color: var(--text); }
.feed-icon { font-size: 1.25rem; width: 28px; text-align: center; }

/* ── Mood ──────────────────────────────────────────────────────────────────── */

.mood-card { border-top: 5px solid var(--mood); }
.mood-big { font-size: 2.4rem; }
.mood-line { margin: 10px 0 4px; }
.mood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
@media (min-width: 640px) { .mood-grid { grid-template-columns: repeat(4, 1fr); } }
.mood-option {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 18px;
    border: 2px solid var(--line); background: var(--surface-2); font: inherit; font-weight: 700; font-size: .82rem; color: var(--text); cursor: pointer;
}
.mood-option.on { border-color: var(--mood); background: color-mix(in srgb, var(--mood) 25%, var(--surface)); }
.mood-emoji { font-size: 1.9rem; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.timeline-item { display: flex; gap: 12px; align-items: flex-start; }
.timeline-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 1.2rem; }

/* ── Streak ────────────────────────────────────────────────────────────────── */

.streak-hero { text-align: center; padding: 26px 18px; }
.streak-hero .flame { font-size: 3.4rem; }
.checkin-people { display: flex; justify-content: center; gap: 22px; margin-top: 18px; }
.checkin-person { display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: .55; }
.checkin-person.done { opacity: 1; }
.checkin-person small { color: var(--muted); }
.checkin-person.done small { color: var(--success); font-weight: 800; }
.challenge { background: linear-gradient(135deg, var(--accent-soft), var(--primary-soft)); }
.challenge-text { font-family: var(--font-display); font-size: 1.2rem; margin: 4px 0 0; }
.streak-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 10px 0; }
.streak-cell { aspect-ratio: 1; border-radius: 10px; display: grid; place-items: center; font-size: .78rem; font-weight: 800; background: var(--bg-2); color: var(--muted); }
.streak-cell.one { background: var(--warn-soft); color: var(--warn); }
.streak-cell.both { background: linear-gradient(135deg, #ff9a5a, var(--primary)); color: #fff; }
.streak-cell.today { outline: 2px solid var(--text); outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .8rem; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; vertical-align: middle; margin-right: 4px; background: var(--bg-2); }
.dot.one { background: var(--warn-soft); }
.dot.both { background: var(--primary); }

/* ── Capy ──────────────────────────────────────────────────────────────────── */

.pet-stage { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; background: linear-gradient(180deg, #e8f6ff, var(--surface) 70%); }
@media (prefers-color-scheme: dark) { .pet-stage { background: linear-gradient(180deg, #24324a, var(--surface) 70%); } }
.speech {
    position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px;
    padding: 8px 14px; font-weight: 700; margin-bottom: 4px; box-shadow: var(--shadow-sm);
}
.speech::after { content: ""; position: absolute; left: 40%; bottom: -8px; width: 14px; height: 14px; background: var(--surface); border-right: 1.5px solid var(--line); border-bottom: 1.5px solid var(--line); transform: rotate(45deg); }
.pet-name-row { display: flex; align-items: center; gap: 6px; }
.pet-name { margin: 0; }
.pet-stage .progress-row { width: 100%; max-width: 260px; }
.action-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 14px 0; }
.action-btn {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; border-radius: 18px;
    border: 1px solid var(--line); background: var(--surface); font: inherit; font-weight: 800; font-size: .75rem; color: var(--text);
    cursor: pointer; box-shadow: var(--shadow-sm);
}
.action-btn:active { transform: scale(.95); }
.action-btn:disabled { opacity: .5; }
.action-emoji { font-size: 1.7rem; }

/* ── Bucketlist, afspraken, potje ──────────────────────────────────────────── */

.bucket-card.done { background: linear-gradient(135deg, var(--success-soft), var(--surface)); }
.bucket-emoji { font-size: 1.8rem; }
.bucket-card h3 { margin: 0; }
.bucket-photo { border-radius: 16px; margin: 10px 0; max-height: 260px; width: 100%; object-fit: cover; }
.done-note { margin-top: 8px; font-weight: 700; color: var(--success); }

.agreement.agreed { border-left: 5px solid var(--success); }
.agreement.pending { border-left: 5px solid var(--warn); }
.agreement h3 { margin: 0; }

.pot-hero { text-align: center; background: linear-gradient(135deg, #ffe3ec, #fff3dc); }
@media (prefers-color-scheme: dark) { .pot-hero { background: linear-gradient(135deg, #4a2333, #43321c); } }
.pig { font-size: 3.5rem; animation: bob 3s ease-in-out infinite; }
.request-card { border-left: 5px solid var(--warn); }
.pot-page > * + * { margin-top: 14px; }

/* ── Tekenen ───────────────────────────────────────────────────────────────── */

.prompt { font-family: var(--font-display); font-style: italic; margin: 4px 0 12px; }
.drawpad { display: flex; flex-direction: column; gap: 10px; }
.drawpad-canvas {
    width: 100%; height: auto; border-radius: 18px; background: #fff; border: 2px dashed var(--line);
    touch-action: none; cursor: crosshair; display: block;
}
.drawpad-compact .drawpad-canvas { background: var(--paper); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 3px var(--primary); }
.size-picker { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .85rem; flex: 1 1 140px; }
.drawing-img { width: 100%; border-radius: 18px; background: #fff; margin-bottom: 12px; }
.scoreboard { display: flex; justify-content: space-around; gap: 12px; }
.score { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery-item { margin: 0; background: var(--surface); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.gallery-item img { aspect-ratio: 1; object-fit: cover; width: 100%; background: #fff; }
.gallery-item figcaption { padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; font-size: .85rem; }

/* ── Kluis ─────────────────────────────────────────────────────────────────── */

.vault-emoji { font-size: 1.6rem; }
.vault-item h3 { margin: 0; }
.secret { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; background: var(--bg-2); border-radius: 12px; }
.secret-text { flex: 1; word-break: break-all; font-size: 1rem; }

/* ── Lippenbalsem ──────────────────────────────────────────────────────────── */

.lipbalm-page > * + * { margin-top: 14px; }
.podium-card { background: linear-gradient(135deg, #fff3dc, var(--primary-soft)); }
@media (prefers-color-scheme: dark) { .podium-card { background: linear-gradient(135deg, #43321c, var(--primary-soft)); } }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 12px; }
.podium-place { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; flex: 1; max-width: 140px; }
.place-1 { order: 2; }
.place-2 { order: 1; }
.place-3 { order: 3; }
.medal { font-size: 2rem; }
.place-1 .medal { font-size: 2.6rem; }
.balm-dot { width: 18px; height: 18px; border-radius: 50%; }
.balm-tube {
    width: 22px; height: 46px; border-radius: 8px 8px 4px 4px; flex: none;
    background: linear-gradient(180deg, var(--balm) 0 38%, #e9e2e6 38% 42%, #c9bfc5 42%);
}
.balm-card h3 { margin: 0; }
.score-bubble { background: var(--primary); color: var(--primary-ink); font-weight: 800; border-radius: 999px; padding: 6px 12px; }
.rating-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.rating-summary { background: var(--surface-2); border-radius: 14px; padding: 10px; }

/* ── Verhalen (pad) ────────────────────────────────────────────────────────── */

.story-path { position: relative; display: flex; flex-direction: column; gap: 22px; padding: 10px 0 20px; }
.story-path::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 0; transform: translateX(-50%);
    border-left: 4px dotted var(--primary-2); opacity: .7;
}
.path-step { position: relative; display: flex; align-items: center; width: 100%; }
.path-step.left { justify-content: flex-start; padding-right: calc(50% + 26px); }
.path-step.right { justify-content: flex-end; padding-left: calc(50% + 26px); }
.path-node {
    position: absolute; left: 50%; transform: translateX(-50%); z-index: 1;
    width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.4rem;
    background: var(--surface); border: 3px solid var(--primary); box-shadow: var(--shadow-sm);
}
.path-node.upcoming { border-style: dashed; border-color: var(--accent); }
.path-card { width: 100%; text-align: left; font: inherit; cursor: pointer; }
.path-card h3 { margin: 2px 0 6px; }
.path-card.upcoming { background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border-style: dashed; }
.path-end { align-self: center; font-size: 1.8rem; z-index: 1; background: var(--bg); padding: 4px; }
@media (max-width: 560px) {
    .story-path::before { left: 22px; }
    .path-step.left, .path-step.right { padding: 0 0 0 58px; justify-content: flex-start; }
    .path-node { left: 22px; }
    .path-end { align-self: flex-start; margin-left: 6px; }
}
.story-reader { display: flex; flex-direction: column; gap: 12px; }
.story-reader-head { background: var(--surface); padding: 8px; border-radius: 16px; border: 1px solid var(--line); }
.story-frame { width: 100%; height: calc(100vh - 220px); min-height: 480px; border: none; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }

/* ── Papier: boek, gedichten, brieven, beloftes ────────────────────────────── */

.paper {
    background: var(--paper); border-radius: 18px; padding: 26px 22px; border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    background-image: repeating-linear-gradient(transparent 0 31px, color-mix(in srgb, var(--line) 60%, transparent) 31px 32px);
}
.paper-title { text-align: center; font-size: 1.7rem; margin-bottom: 18px; }
.paper-author { font-weight: 800; color: var(--muted); font-size: .85rem; margin-bottom: 10px; }
.paper-partner { background-color: color-mix(in srgb, var(--accent-soft) 40%, var(--paper)); }
.prose { line-height: 1.75; }
.prose p { margin: 0 0 1em; }
.book-text { font-family: var(--font-display); font-size: 1.08rem; line-height: 2rem; }
.book-editor { font-size: 1.05rem; line-height: 1.9; min-height: 340px; }

.book-page > * + * { margin-top: 14px; }
.book-cover {
    border-radius: 6px 22px 22px 6px; padding: 36px 24px; text-align: center; color: #fff;
    background: linear-gradient(135deg, #c2416b, #8a6bd1); box-shadow: inset 10px 0 0 rgba(0, 0, 0, .15), var(--shadow);
}
.book-cover h1 { font-size: 2.2rem; margin: 6px 0; }
.book-cover p { margin: 0 0 6px; font-weight: 700; }
.book-emoji { font-size: 3rem; }
.toc { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.toc-item { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px 6px 4px 4px; }
.toc-link { display: flex; align-items: center; gap: 10px; padding: 10px; flex: 1; color: var(--text); min-width: 0; }
.toc-link:hover { text-decoration: none; }
.toc-number { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; flex: none; }
.toc-emoji { font-size: 1.4rem; }
.toc-status { display: flex; gap: 10px; font-size: .75rem; margin-top: 2px; }
.toc-status .ok { color: var(--success); font-weight: 800; }
.toc-status .todo { color: var(--muted); }
.toc-move { display: flex; flex-direction: column; }
.chapter-page > * + * { margin-top: 14px; }
.chapter-head { text-align: center; }
.chapter-head h1 { font-size: 2rem; }
.book-spread { display: grid; gap: 14px; }
@media (min-width: 900px) { .book-spread { grid-template-columns: 1fr 1fr; } }
.chapter-nav { display: flex; align-items: center; gap: 8px; }

.poems-page > * + * { margin-top: 14px; }
.poem-card h3 { margin: 0; }
.poem-excerpt { font-family: var(--font-display); font-style: italic; color: var(--muted); margin: 8px 0; }
.poem-reader { display: flex; flex-direction: column; gap: 14px; max-width: 640px; margin: 0 auto; }
.poem-reader > .btn { align-self: flex-start; }
.poem-body { white-space: pre-wrap; font-family: var(--font-display); font-size: 1.12rem; line-height: 2rem; text-align: center; }
.poem-sign { text-align: right; font-family: var(--font-display); font-style: italic; margin-top: 20px; color: var(--muted); }
.poem-input { font-size: 1.05rem; line-height: 1.8; }

.letters-page > * + * { margin-top: 14px; }
.envelope-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .envelope-grid { grid-template-columns: repeat(3, 1fr); } }
.envelope {
    position: relative; aspect-ratio: 4 / 3; border-radius: 16px; border: 1px solid var(--line); cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px;
    font: inherit; color: var(--text); text-align: center; overflow: hidden;
    background: linear-gradient(160deg, #fff7ef, #ffe4ec);
}
@media (prefers-color-scheme: dark) { .envelope { background: linear-gradient(160deg, #3a2a30, #4a2333); } }
.envelope::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 45%;
    background: linear-gradient(to bottom right, transparent 49.5%, var(--line) 50%, transparent 51%),
                linear-gradient(to bottom left, transparent 49.5%, var(--line) 50%, transparent 51%);
    background-size: 50% 100%; background-position: left, right; background-repeat: no-repeat; opacity: .8;
}
.envelope.sealed { box-shadow: var(--shadow); }
.envelope.opened { opacity: .8; }
.envelope-emoji { font-size: 2rem; z-index: 1; }
.envelope-label { z-index: 1; font-size: .85rem; }
.letter-paper { font-size: 1.05rem; }

.certificate {
    position: relative; background: var(--paper); border-radius: 22px; padding: 28px 22px; text-align: center;
    border: 2px solid var(--line); box-shadow: var(--shadow-sm);
    outline: 1px dashed color-mix(in srgb, var(--primary) 50%, transparent); outline-offset: -10px;
}
.certificate.sealed { border-color: color-mix(in srgb, var(--primary) 60%, var(--line)); }
.certificate-emoji { font-size: 2.4rem; }
.certificate-title { font-size: 1.6rem; }
.certificate-text { font-family: var(--font-display); font-size: 1.08rem; max-width: 520px; margin: 0 auto; }
.signatures { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.signature-slot { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 90px; gap: 4px; }
.signature-slot img { max-height: 70px; width: auto; }
.signature-line { width: 100%; border-bottom: 1.5px solid var(--text); opacity: .4; }
.seal { margin-top: 16px; font-weight: 800; color: var(--primary); }

/* ── Relatie, profiel, badges ──────────────────────────────────────────────── */

.couple-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft)); }
.couple-name { margin: 6px 0 0; }
.info-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.info-card .prose { margin: 0; }
.facts { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.fact dt { font-size: .78rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.fact dd { margin: 0; display: flex; align-items: center; gap: 4px; }
.code-display { font-family: ui-monospace, Menlo, monospace; font-size: 2.2rem; font-weight: 800; letter-spacing: .12em; margin: 8px 0 14px; color: var(--primary); }
.code-input { text-transform: uppercase; letter-spacing: .15em; font-size: 1.3rem; text-align: center; font-weight: 800; }

.profile-card { display: flex; align-items: center; gap: 16px; }
.rank-card { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, var(--accent-soft), var(--primary-soft)); }
.rank-icon { width: 80px; height: 80px; border-radius: 24px; background: var(--surface); display: grid; place-items: center; flex: none; box-shadow: var(--shadow-sm); }
.rank-name { margin: 0; }
.badge-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 640px) { .badge-grid { grid-template-columns: repeat(3, 1fr); } }
.badge-tile {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px;
    border-radius: 20px; border: 2px solid var(--line); background: var(--surface); font: inherit; color: var(--text); cursor: pointer;
}
.badge-tile.locked { cursor: default; }
.badge-tile.locked .badge-icon { filter: grayscale(1); opacity: .35; }
.badge-tile.unlocked { box-shadow: var(--shadow-sm); }
.badge-tile.selected { border-color: var(--primary); background: var(--primary-soft); }
.badge-tile .progress-row { width: 100%; margin: 6px 0 0; }
.badge-icon { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); }

/* ── Chats ─────────────────────────────────────────────────────────────────── */

.chat-archive { display: flex; align-items: center; gap: 14px; }
.chat-archive h3 { margin: 0; }
.chat-platform { font-size: 2rem; }
.import-page > * + * { margin-top: 14px; }
.radio-row { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; }
.radio-row.on { border-color: var(--primary); background: var(--primary-soft); }
.mapping-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mapping-row .select { width: auto; min-width: 190px; flex: 1 1 190px; }

.chat-reader { display: flex; flex-direction: column; gap: 10px; }
.chat-toolbar {
    position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 10;
    display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
@media (min-width: 960px) { .chat-toolbar { top: 10px; } }
.chat-thread { display: flex; flex-direction: column; gap: 3px; padding: 8px 4px 20px; }
.chat-day { align-self: center; margin: 14px 0 6px; }
.chat-day span { background: var(--bg-2); color: var(--muted); font-size: .75rem; font-weight: 800; padding: 4px 12px; border-radius: 999px; text-transform: capitalize; }
.chat-system { align-self: center; text-align: center; font-size: .78rem; color: var(--muted); max-width: 80%; margin: 4px 0; }
.bubble-row { display: flex; }
.bubble-row.mine { justify-content: flex-end; }
.bubble {
    max-width: min(78%, 520px); padding: 7px 12px 5px; border-radius: 18px; background: var(--surface);
    border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}
.bubble-row.mine .bubble { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: var(--primary-ink); border-color: transparent; border-bottom-right-radius: 6px; }
.bubble-row.theirs .bubble { border-bottom-left-radius: 6px; }
.bubble.media { font-style: italic; opacity: .85; }
.bubble-name { font-size: .72rem; font-weight: 800; color: var(--accent); margin-bottom: 1px; }
.bubble-text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.bubble-time { font-size: .65rem; text-align: right; opacity: .65; margin-top: 1px; }
.bubble-row.highlight .bubble { outline: 3px solid #ffc23d; outline-offset: 2px; }
.load-more { align-self: center; margin: 8px 0; }
.chat-end { text-align: center; margin: 16px 0; }
.search-hits .list-item { flex-direction: column; align-items: flex-start; gap: 2px; }

/* ── Kleine schermen ───────────────────────────────────────────────────────── */

@media (max-width: 420px) {
    h1 { font-size: 1.5rem; }
    .big-number { font-size: 2.2rem; }
    .card { padding: 15px; }
    .action-grid { gap: 6px; }
    .action-btn { font-size: .68rem; padding: 10px 2px; }
}
