/* =============================================================================
   Baby Registry – public page

   Three colour themes, switched with data-theme on <html>:
     neutral – very deep black with a gold accent (welcome screen, and the
               guess screen until Boy or Girl is tapped)
     boy     – baby blue, with a deeper blue for buttons and a warm yellow accent
     girl    – baby pink, with a deeper rose for buttons and a soft plum accent
   The page follows the guest's guess; once the gender is revealed and the
   balloon popped, it follows the real answer. Change the colours below.
   ========================================================================== */

:root {
    --boy: #5b9bd5;
    --girl: #e0699a;
    --radius: 18px;
    --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
    --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ease-out: cubic-bezier(.2, .8, .2, 1);
}

:root, [data-theme="neutral"] {
    color-scheme: dark;
    --bg: #0a0909;          --bg-raised: #151313;   --bg-sheet: #1a1817;
    --text: #f4efe9;        --muted: #9b938a;       --line: #2a2624;
    --accent: #d9b779;      --accent-soft: rgba(217, 183, 121, .14);  --on-accent: #0a0909;
    --accent-2: #d9b779;    --on-accent-2: #0a0909;
    --cta-bg: #f4efe9;      --cta-fg: #0a0909;
    --ink: #f4efe9;         --balloon-hi: #34302c;  --balloon-lo: #141211;
    --danger: #ff9b8a;      --nav-bg: rgba(10, 9, 9, .9);
    --shadow: rgba(0, 0, 0, .55);
}

[data-theme="girl"] {
    color-scheme: light;
    --bg: #f8d7e3;          --bg-raised: #fde9f0;   --bg-sheet: #fff4f8;
    --text: #3a1726;        --muted: #8c5468;       --line: #efbccd;
    --accent: #c93d76;      --accent-soft: rgba(201, 61, 118, .13);   --on-accent: #ffffff;
    --accent-2: #8e4a9e;    --on-accent-2: #ffffff;
    --cta-bg: #c93d76;      --cta-fg: #ffffff;
    --ink: #ffffff;         --balloon-hi: #fbbdd4;  --balloon-lo: #e0699a;
    --danger: #b3261e;      --nav-bg: rgba(248, 215, 227, .92);
    --shadow: rgba(122, 33, 70, .22);
}

[data-theme="boy"] {
    color-scheme: light;
    --bg: #cfe5fa;          --bg-raised: #e4f1fd;   --bg-sheet: #f3f9ff;
    --text: #102a43;        --muted: #4a6784;       --line: #b0cfee;
    --accent: #2563a8;      --accent-soft: rgba(37, 99, 168, .13);    --on-accent: #ffffff;
    --accent-2: #f2b134;    --on-accent-2: #102a43;
    --cta-bg: #2563a8;      --cta-fg: #ffffff;
    --ink: #ffffff;         --balloon-hi: #bfdefc;  --balloon-lo: #5b9bd5;
    --danger: #b3261e;      --nav-bg: rgba(207, 229, 250, .92);
    --shadow: rgba(16, 42, 67, .22);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: var(--font-sans); font-size: 16px; line-height: 1.55;
    -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
    transition: background-color .6s;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 400; line-height: 1.15; margin: 0; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.container { width: min(760px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(640px, 100% - 40px); }
.center { text-align: center; }
.kicker {
    text-transform: uppercase; letter-spacing: .32em; font-size: .78rem; font-weight: 500;
    color: var(--muted); margin: 0 0 14px;
}

/* ---- Buttons --------------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 0; border-radius: 999px; padding: 14px 28px; cursor: pointer; text-decoration: none;
    font: 500 1rem var(--font-sans); transition: transform .15s, background .3s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-light { background: var(--cta-bg); color: var(--cta-fg); }
.btn-light:hover { filter: brightness(1.06); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); }
.btn-lg { padding: 18px 40px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn.is-loading { opacity: .6; pointer-events: none; }

.pill {
    flex: none; border: 1.5px solid var(--accent); background: transparent; color: var(--accent);
    border-radius: 999px; padding: 10px 20px; font: 500 .95rem var(--font-sans); cursor: pointer;
    transition: background .2s, color .2s, transform .15s, border-color .6s;
    white-space: nowrap;
}
.pill:hover:not([disabled]) { background: var(--accent); color: var(--on-accent); }
.pill:active:not([disabled]) { transform: scale(.95); }
.pill[disabled] { border-color: var(--line); color: var(--muted); cursor: default; }
.pill-sm { padding: 6px 14px; font-size: .85rem; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 8px; }

/* ---- Screens --------------------------------------------------------------- */

.screen { position: relative; animation: screen-in .45s var(--ease-out); }
@keyframes screen-in { from { opacity: 0; transform: translateY(12px); } }
.screen-center {
    min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 48px 20px 56px; overflow: hidden;
}
#guess { padding: 28px 20px 64px; }
.glow {
    position: absolute; inset: -20%; pointer-events: none;
    background: radial-gradient(circle at 50% 45%, var(--accent-soft), transparent 55%);
    transition: background .8s;
}
.stage { position: relative; z-index: 1; width: min(520px, 100%); margin: 0 auto; }
.stage-form { width: min(560px, 100%); }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 40px; margin-bottom: 18px; }
.back { color: var(--muted); text-decoration: none; font-size: 1.05rem; padding: 6px 10px 6px 0; }
.back:hover { color: var(--text); }
.step { color: var(--muted); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; }

.family { font-size: clamp(2.8rem, 12vw, 4.6rem); }
.welcome-to { display: block; font-size: .42em; font-style: italic; color: var(--muted); margin-bottom: 4px; }
.tagline { font-family: var(--font-serif); font-style: italic; color: var(--muted); font-size: 1.35rem; margin: 8px 0 0; }
.welcome-q { font-family: var(--font-serif); font-size: 1.5rem; margin: 4px 0 18px; }
.screen-title { font-size: clamp(2.2rem, 9vw, 3rem); text-align: center; }
.screen-sub { color: var(--muted); text-align: center; margin: 8px 0 22px; font-size: 1.05rem; }
.skip { display: inline-block; margin-top: 22px; color: var(--muted); font-size: .9rem; }
.skip:hover { color: var(--text); }

.btn-huge {
    font-size: 1.25rem; font-weight: 600; padding: 20px 44px; min-width: min(320px, 100%);
    box-shadow: 0 10px 40px var(--accent-soft), 0 0 0 6px var(--accent-soft);
    animation: breathe 2.6s ease-in-out infinite;
}
.btn-huge.btn-block { animation: none; }
@keyframes breathe { 50% { box-shadow: 0 10px 50px var(--accent-soft), 0 0 0 12px transparent; } }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Boy / girl cards */
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 6px; }
.pick-card {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 10px;
    border-radius: 22px; border: 2px solid var(--line); background: var(--bg-raised); cursor: pointer;
    transition: transform .2s var(--ease-out), border-color .2s, background .2s, box-shadow .2s;
}
.pick-card:hover { transform: translateY(-3px); }
.pick-emoji { font-size: 3rem; line-height: 1; transition: transform .3s var(--ease-out); }
.pick-label { font-family: var(--font-serif); font-size: 1.6rem; }
.pick-card[data-guess="boy"][aria-checked="true"]  { border-color: var(--boy);  background: rgba(106, 166, 232, .14); box-shadow: 0 0 0 4px rgba(106, 166, 232, .15); }
.pick-card[data-guess="girl"][aria-checked="true"] { border-color: var(--girl); background: rgba(224, 105, 154, .14); box-shadow: 0 0 0 4px rgba(224, 105, 154, .15); }
.pick-card[aria-checked="true"] .pick-emoji { transform: scale(1.18); }
.pick.is-shaking { animation: shake .4s; }
@keyframes shake { 25% { translate: -8px 0; } 50% { translate: 8px 0; } 75% { translate: -4px 0; } }

.notify { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 2px; margin: 6px 0 18px; }
.notify legend { padding: 0 6px; font-weight: 500; }
.notify .hint { margin: 0 0 12px; }
.center { text-align: center; }

.balloon-wrap { position: relative; width: 210px; height: 300px; margin: 18px auto 6px; }
.balloon-small { width: 150px; height: 214px; margin: 14px auto 6px; animation: float 4.5s ease-in-out infinite; }
.balloon-small svg { width: 100%; height: 100%; overflow: visible; }
.balloon {
    position: absolute; inset: 0; border: 0; background: none; padding: 0; cursor: pointer;
    transform-origin: 50% 70%; animation: float 4.5s ease-in-out infinite, pulse 1.4s ease-in-out infinite;
}
.balloon .b-mark { fill: var(--ink); fill-opacity: .6; }
.balloon svg { width: 100%; height: 100%; overflow: visible; }
.b-body { stroke: var(--ink); stroke-width: 3.5; transition: stroke .6s; }
.b-shine { fill: none; stroke: var(--ink); stroke-opacity: .45; stroke-width: 4; stroke-linecap: round; }
.b-knot { fill: var(--ink); }
.b-mark { font-family: var(--font-serif); font-size: 84px; fill: var(--ink); fill-opacity: .22; }
.b-string { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; transform-origin: 100px 212px; animation: sway 3s ease-in-out infinite; }
.balloon:focus-visible { outline: 2px dashed var(--accent); outline-offset: 8px; border-radius: 40%; }

.balloon.is-popping { animation: inflate .28s ease-in forwards; }
.balloon.is-gone { visibility: hidden; animation: none; }

@keyframes float  { 0%, 100% { translate: 0 0; rotate: -2deg; } 50% { translate: 0 -14px; rotate: 2deg; } }
@keyframes sway   { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes pulse  { 0%, 100% { scale: 1; } 50% { scale: 1.04; } }
@keyframes wiggle { 20% { rotate: -9deg; } 40% { rotate: 8deg; } 60% { rotate: -6deg; } 80% { rotate: 4deg; } }
@keyframes inflate { 70% { scale: 1.18; opacity: 1; } 100% { scale: 1.3; opacity: 0; } }

.shards { position: absolute; left: 50%; top: 35%; pointer-events: none; }
.shard {
    position: absolute; width: 14px; height: 22px; border-radius: 40% 60% 50% 50%;
    background: var(--accent); opacity: 1;
    transition: transform .9s var(--ease-out), opacity .9s ease-in;
}

.balloon-hint { color: var(--text); font-weight: 500; margin: 10px 0 0; font-size: 1.1rem; }

.guess-error, .field-error.center { text-align: center; }
.field input, .field textarea {
    width: 100%; padding: 13px 15px; border-radius: 12px; border: 1.5px solid var(--line);
    background: var(--bg-raised); color: var(--text); font: 1rem var(--font-sans); resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .8; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.tally-mini { color: var(--muted); font-size: .9rem; margin: 14px 0 0; }

.result-title { font-size: clamp(3.2rem, 15vw, 5.6rem); color: var(--accent); margin: 4px 0 10px; }
.result-title.is-secret { font-size: clamp(2.4rem, 10vw, 3.6rem); color: var(--text); }
.result-sub { font-family: var(--font-serif); font-style: italic; font-size: 1.35rem; color: var(--muted); margin: 0 0 18px; }
.result-you { font-size: 1.05rem; margin: 0 0 22px; }
.result-countdown { color: var(--muted); margin: 0 0 26px; }
.result-notify { color: var(--text); background: var(--accent-soft); border-radius: 14px; padding: 12px 16px; margin: 0 0 22px; }
.result-notify:empty { display: none; }
#result .btn-huge { margin-bottom: 10px; }

.tally { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 12px; margin: 0 auto 22px; text-align: left; }
.tally-row { display: grid; grid-template-columns: 72px 1fr 48px; align-items: center; gap: 12px; margin-bottom: 10px; }
.tally-row strong { text-align: right; font-weight: 600; }
.tally-bar { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; }
.tally-bar span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1.2s var(--ease-out); }
[data-bar="boy"] { background: var(--boy); }
[data-bar="girl"] { background: var(--girl); }
.tally-total { color: var(--muted); font-size: .85rem; text-align: center; margin: 4px 0 0; }


#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* ---- Registry -------------------------------------------------------------- */

.registry { padding: 20px 0 24px; }
.due { text-align: center; color: var(--muted); margin: -12px 0 8px; }
.page-title { font-size: clamp(2.2rem, 8vw, 3.2rem); text-align: center; }
.page-intro { font-family: var(--font-serif); font-style: italic; font-size: 1.3rem; color: var(--muted); text-align: center; margin: 12px auto 28px; max-width: 560px; }


.cat-nav { position: sticky; top: 0; z-index: 20; background: var(--nav-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); margin-top: 20px; }
.cat-nav-inner { display: flex; gap: 8px; overflow-x: auto; padding: 12px 20px; scrollbar-width: none; max-width: 800px; margin: 0 auto; align-items: center; }
.cat-nav-inner::-webkit-scrollbar { display: none; }
.cat-nav a {
    flex: none; text-decoration: none; color: var(--muted); font-size: .85rem; font-weight: 500;
    padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); transition: all .2s;
}
.cat-nav a.is-active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.hide-taken { flex: none; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; padding-left: 6px; cursor: pointer; }

.cat { padding-top: 40px; }
.cat-title { font-family: var(--font-sans); font-size: .82rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; transition: color .6s; }
.rows { list-style: none; margin: 0; padding: 0; }
.row {
    display: flex; align-items: center; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line);
    transition: opacity .5s, transform .5s var(--ease-out);
}
.screen-registry .row { animation: rise .5s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
.row-img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; flex: none; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-name { font-family: var(--font-serif); font-size: 1.35rem; line-height: 1.25; }
.row-sub { color: var(--muted); font-size: .92rem; }
.row-taken { display: none; color: var(--accent); font-size: .88rem; }
.row.is-done .row-name { color: var(--muted); opacity: .6; }
.row.is-done .row-sub { opacity: .5; }
.row.is-done .row-taken { display: block; }
.row.is-done .row-img { filter: grayscale(1); opacity: .4; }
.row.is-flash { animation: flash 1.2s; }
@keyframes flash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
.registry.hide-done .row.is-done { display: none; }
.notice { text-align: center; color: var(--muted); }

/* ---- Wishes wall ----------------------------------------------------------- */

.section { padding: 72px 0; border-top: 1px solid var(--line); }
.section-title { font-size: clamp(2rem, 7vw, 2.8rem); text-align: center; margin-bottom: 28px; }
.wall { columns: 2 260px; column-gap: 14px; }
.wish {
    break-inside: avoid; margin: 0 0 14px; padding: 18px 18px 14px; border-radius: var(--radius);
    background: var(--bg-raised); border: 1px solid var(--line); animation: rise .5s var(--ease-out);
}
.wish blockquote { margin: 0 0 10px; font-family: var(--font-serif); font-size: 1.15rem; line-height: 1.45; }
.wish figcaption { color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; font-size: .75rem; }
.wall-empty { text-align: center; color: var(--muted); }

/* ---- Steps & bank ---------------------------------------------------------- */

.steps { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 18px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.steps li > span {
    flex: none; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--accent);
    color: var(--accent); display: grid; place-items: center; font-family: var(--font-serif); font-size: 1.2rem;
}
.steps strong { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 400; }
.steps p { margin: 2px 0 0; color: var(--muted); }

.bank { text-align: center; }
.bank-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 12px; }
.bank-card p { margin: 0; }
.bank-name { color: var(--muted); text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; }
.bank-number { font-family: var(--font-serif); font-size: 2.1rem; letter-spacing: .04em; margin: 6px 0 2px !important; }
.bank-holder { color: var(--muted); margin-bottom: 14px !important; }

.footer { text-align: center; padding: 40px 20px 56px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); }
.footer p { margin: 0 0 6px; }

/* ---- Bottom sheet (pledge form) -------------------------------------------- */

.sheet {
    border: 0; padding: 0; background: transparent; color: var(--text);
    width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh;
    margin: auto auto 0; overflow: visible;
}
@media (min-width: 640px) { .sheet { margin: auto; } }
.sheet::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
.sheet[open] { animation: sheet-up .35s var(--ease-out); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } }
.sheet-card {
    position: relative; background: var(--bg-sheet); border: 1px solid var(--line);
    border-radius: 24px 24px 0 0; padding: 18px 22px calc(22px + env(safe-area-inset-bottom));
    max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
}
@media (min-width: 640px) { .sheet-card { border-radius: 24px; } }
.sheet-grip { display: block; width: 42px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.sheet-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-raised); font-size: 1.4rem; line-height: 1; cursor: pointer; }

.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; gap: 0; } }
.field > label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 6px; }
.optional { color: var(--muted); font-weight: 400; }
.field-label { display: block; font-weight: 500; font-size: .9rem; margin: 0 0 6px; }

/* Payment day: four equal buttons (two rows on narrow phones). */
.date-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .date-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.date-options .chip { width: 100%; min-height: 44px; padding: 10px 8px; font-size: .9rem; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-pick { position: relative; display: flex; align-items: center; justify-content: center; }
.chip-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.field .chip-pick input[type="date"] {
    position: absolute; inset: 0; width: 100%; height: 100%; min-width: 0; margin: 0; padding: 0;
    opacity: 0; border: 0; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.chip-pick input[type="date"]::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; margin: 4px 0 0; }
.field-error:empty { display: none; }
.hint { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.chips:empty { display: none; }
.chip { border: 1px solid var(--line); background: var(--bg-raised); color: var(--text); border-radius: 999px; padding: 7px 13px; font-size: .85rem; cursor: pointer; }
.chip.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; margin: 2px 0 16px; cursor: pointer; font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.check-sm { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }
.form-error { color: var(--danger); font-weight: 500; text-align: center; margin: 0 0 12px; }
.form-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.done { text-align: center; padding: 6px 0 4px; }
.done-icon { font-size: 3rem; animation: pop-in .5s var(--ease-out); }
@keyframes pop-in { from { transform: scale(.3); opacity: 0; } }
.done h2 { font-size: 2.2rem; margin-bottom: 8px; }
.summary { text-align: left; background: var(--bg-raised); border-radius: 14px; padding: 14px 18px; margin: 18px 0 8px; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.summary dt { color: var(--muted); font-size: .9rem; }
.summary dd { margin: 0; font-weight: 600; }
.done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 500; z-index: 100; animation: rise .3s; }

@media (max-width: 420px) {
    .row-name { font-size: 1.2rem; }
    .pill { padding: 9px 15px; font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    html { scroll-behavior: auto; }
}

/* ---- Choosing several gifts --------------------------------------------------- */

.row.is-chosen .row-name { color: var(--accent); }
.row .pill[aria-pressed="true"] { background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent-2); }
.screen-registry { padding-bottom: 96px; }

.gift-bar {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 0 max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    pointer-events: none; animation: sheet-up .35s var(--ease-out);
}
.gift-bar-inner {
    pointer-events: auto; max-width: 620px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
    background: var(--bg-sheet); border: 1px solid var(--accent); border-radius: 20px; padding: 12px 12px 12px 18px;
    box-shadow: 0 12px 40px var(--shadow);
}
.gift-bar.is-bump .gift-bar-inner { animation: bump .35s var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.03); } }
.gift-bar-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gift-bar-text strong { font-weight: 600; }
.gift-bar-text span { color: var(--muted); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gift-bar .btn { padding: 12px 22px; flex: none; }

.fly-heart {
    position: fixed; z-index: 80; pointer-events: none; font-size: 1.4rem; translate: -50% -50%;
    transition: transform .7s cubic-bezier(.5, -0.3, .7, 1), opacity .7s ease-in;
}

.sheet-title { font-size: 1.6rem; margin: 0 0 14px; padding-right: 40px; }
.chosen-list { list-style: none; margin: 0 0 6px; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.chosen-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 8px 11px 14px; border-bottom: 1px solid var(--line); font-family: var(--font-serif); font-size: 1.1rem; }
.chosen-list li:last-child { border-bottom: 0; }
.chosen-remove { border: 0; background: transparent; color: var(--muted); font-size: 1.4rem; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; flex: none; }
.chosen-remove:hover { background: var(--bg-raised); color: var(--text); }
.add-more { display: block; margin: 0 0 18px; padding-left: 2px; color: var(--accent); }
.summary dd { white-space: pre-line; }

/* Smoothly fade every surface when the colour theme changes. */
body, .pick-card, .field input, .field textarea, .chip, .pill, .btn, .tally, .wish, .bank-card, .sheet-card,
.gift-bar-inner, .cat-nav, .cat-nav a, .row, .chosen-list, .notify {
    transition: background-color .6s ease, color .6s ease, border-color .6s ease, box-shadow .3s, transform .15s, opacity .2s;
}
