/* WishLink: "Storybook". Warm cream paper, chunky ink outlines with offset
   shadows, rounded display type and a few bright accents (tomato, sunshine,
   teal, sky, pink). Shared by every page; the landing page adds its own
   illustrated sections at the end of this file. */
@font-face { font-family: "Fredoka Variable"; font-style: normal; font-display: swap; font-weight: 300 700; src: url(/static/fonts/fredoka/fredoka-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fredoka Variable"; font-style: normal; font-display: swap; font-weight: 300 700; src: url(/static/fonts/fredoka/fredoka-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Nunito Variable"; font-style: normal; font-display: swap; font-weight: 200 1000; src: url(/static/fonts/nunito/nunito-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Nunito Variable"; font-style: normal; font-display: swap; font-weight: 200 1000; src: url(/static/fonts/nunito/nunito-latin-ext-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Brand brights (same in light and dark) */
  --tomato: #ff6b4a; --sun: #ffc93c; --teal: #2bb3a3; --sky: #bfe6ff; --pink: #ffc6d3;
  /* Surfaces and type */
  --bg: #fff8ec;
  --surface: #fffdf8;
  --soft: #f7eedc;
  --text: #2d2240;
  --muted: #5e5470;
  --line: #e6d9c2;
  --edge: #2d2240;          /* outlines and offset shadows */
  --link: #b8381b;
  --btn: #d6411f;           /* tomato deep enough for white text */
  --btn-ink: #ffffff;
  /* Soft tints for chips, placeholders and callouts */
  --peach: #ffd9c9;
  --lilac: #e6dcff;
  --aqua: #cdeef5;
  --mint: #cdf0e4;
  --butter: #ffeaa8;
  --ok: #0f6b5f;
  --ok-soft: #cdf0e4;
  --ring: #2bb3a3;
  --warn: #7a4f08;
  --warn-soft: #ffeaa8;
  --danger: #b42318;
  --scrim: rgba(45, 34, 64, .5);
  --shadow: 4px 5px 0 var(--edge);
  --shadow-sm: 3px 4px 0 var(--edge);
  --radius: 24px;
  --font: "Nunito Variable", ui-rounded, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --head: "Fredoka Variable", "Nunito Variable", ui-rounded, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1630; --surface: #2a2142; --soft: #352a52; --text: #fff4e4; --muted: #d4c8e6; --line: #4a3d6b;
    --edge: #0c0817; --link: #ffb39e; --btn: #ff7a5c; --btn-ink: #1d1630;
    --peach: #5a3328; --lilac: #3d3266; --aqua: #1d4752; --mint: #1d4a40; --butter: #4f4018;
    --ok: #8de8d6; --ok-soft: #1d4a40; --ring: #4fd1bf; --warn: #ffd37a; --warn-soft: #4f4018; --danger: #ff9b8a;
    --scrim: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--text); font: 17px/1.55 var(--font); font-weight: 500; background: var(--bg); min-height: 100vh; }
a { color: var(--link); font-weight: 700; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; margin: 0 0 .35em; text-wrap: balance; letter-spacing: -.01em; font-weight: 600; }
h1 { font-size: 2rem; }
h2, .h2 { font-size: 1.45rem; }
.h3, h3 { font-size: 1.18rem; }
[hidden] { display: none !important; }
/* Keeps a short phrase on one line; the line breaks around it instead. */
.nw { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--edge); outline-offset: 3px; }
@media (prefers-color-scheme: dark) { :focus-visible { outline-color: var(--sun); } }

/* Header and footer */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px max(16px, env(safe-area-inset-left, 0px)) 10px; max-width: 1100px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--head); font-weight: 700; font-size: 1.45rem; text-decoration: none; color: var(--text); }
.brand svg { transform: rotate(-8deg); flex: none; }
.top nav { display: flex; gap: 18px; align-items: center; font-size: 1rem; font-weight: 700; white-space: nowrap; }
.top nav a, .top nav button.link { color: var(--text); text-decoration: none; }
.top nav a:hover, .top nav button.link:hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--tomato); text-underline-offset: 6px; }
main { max-width: 620px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 18px; align-content: start; }
main.wide { max-width: 1100px; }
main > * { margin: 0; min-width: 0; }
/* The gift-tag footer (PRD-10): a sand band with a scalloped edge, like wrapping paper. */
.ft { --ft-bg: var(--soft); --ft-ink: var(--text); --ft-muted: var(--muted); --ft-rule: var(--line); margin-top: 24px; color: var(--ft-ink); font-weight: 600; }
.ft-edge { display: block; margin-bottom: -1px; }
.ft-fill { fill: var(--ft-bg); }
.ft-line { fill: none; stroke: var(--edge); stroke-width: 3; }
.ft-in { background: var(--ft-bg); padding: 30px max(20px, env(safe-area-inset-right, 0px)) calc(28px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); }
.ft-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 28px 40px; align-items: start; }
.ft p { margin: 0; }
.ft-brand { display: grid; gap: 12px; justify-items: start; }
.ft-motto { font-family: var(--head); font-size: 1.15rem; font-weight: 600; }
.ft-logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 1.6rem; color: var(--ft-ink); text-decoration: none; }
.ft-logo svg { transform: rotate(-8deg); flex: none; }
.ft .ft-h { font-family: var(--head); font-size: 1.1rem; font-weight: 600; line-height: 1.2; margin: 0 0 6px; color: var(--ft-ink); }
.ft-col ul { list-style: none; margin: 0; padding: 0; }
.ft-col a, .ft-row a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ft-ink); text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 3px; text-underline-offset: 5px; }
.ft-col a:hover, .ft-row a:hover { text-decoration-color: var(--tomato); }
.ft-social { display: grid; gap: 10px; justify-items: start; }
.ft-social > p { color: var(--ft-muted); font-size: .92rem; }
.ft-ig { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 18px 0 8px; background: var(--surface); color: var(--text); border: 2.5px solid var(--edge); border-radius: 999px; box-shadow: var(--shadow-sm); font-family: var(--head); font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.ft-ig:hover { transform: translate(-1px, -1px); box-shadow: 4px 5px 0 var(--edge); }
.ft-igicon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 2px solid #2d2240; background: linear-gradient(135deg, var(--sun), var(--tomato) 55%, var(--pink)); }
.ft-on { font-family: var(--font); font-size: .8rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.ft-tag { position: relative; display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 0 4px !important; padding: 7px 16px 7px 28px; background: var(--surface); color: var(--text); border: 2.5px solid var(--edge); border-radius: 8px 14px 14px 8px; box-shadow: var(--shadow-sm); font-family: var(--head); font-weight: 600; white-space: nowrap; transform: rotate(-3deg); }
.ft-tag::before { content: ""; position: absolute; left: 9px; top: 50%; width: 9px; height: 9px; margin-top: -6px; border-radius: 50%; border: 2.5px solid var(--edge); background: var(--ft-bg); }
.ft-base { max-width: 1100px; margin: 26px auto 0; padding-top: 14px; border-top: 2.5px dashed var(--ft-rule); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: var(--ft-muted); font-size: .9rem; font-weight: 700; }
.ft-made { display: inline-flex; align-items: center; gap: 6px; }
.gmark { display: inline-block; flex: none; vertical-align: -.25em; transform: rotate(-8deg); }
/* Privacy and terms pages (PRD-10). */
.legal { display: grid; gap: 18px; }
.legal-head h1 { margin: 4px 0 0; }
.legal-short { background: var(--warn-soft); display: grid; gap: 12px; }
.legal-short h2 { font-size: 1.2rem; margin: 0; }
.legal-short ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-weight: 700; }
.legal-short li { display: flex; gap: 12px; align-items: flex-start; }
.legal-ico { flex: none; width: 26px; font-size: 1.3rem; line-height: 1.2; text-align: center; }
.legal-body { display: grid; gap: 16px; }
.legal-sec + .legal-sec { padding-top: 16px; border-top: 1.5px dashed var(--line); }
.legal-sec h2 { font-size: 1.15rem; margin: 0 0 6px; }
.legal-sec p, .legal-sec ul { margin: 0; }
.legal-sec ul { padding-left: 20px; display: grid; gap: 4px; }
.legal-foot { text-align: center; margin: 0; }
/* Quieter footer on the gift-giver, family, manage and kid links. */
.ft-quiet .ft-in { display: grid; justify-items: center; gap: 12px; text-align: center; }
.ft-say { font-weight: 700; }
.ft-say .gmark { margin-right: 6px; }
.ft-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 6px; font-weight: 700; }
.ft-row a { padding: 0 4px; }
/* The landing page: the same footer on a deep tomato band (white text needs the deeper tomato). */
.ft-home { --ft-bg: #d6411f; --ft-ink: #fff; --ft-muted: #fff1ea; --ft-rule: rgba(255, 255, 255, .5); margin-top: 0; }
.ft-home .ft-edge { background: #ff6b4a; } /* the tomato of the section above, so the scallops blend in */
.ft-home .ft-line { stroke: none; }
.ft-home .ft-tag { background: var(--sun); color: #2d2240; border-color: #2d2240; box-shadow: 3px 4px 0 #2d2240; }
.ft-home .ft-tag::before { border-color: #2d2240; }
.ft-home .ft-ig { background: #fffdf8; color: #2d2240; border-color: #2d2240; box-shadow: 3px 4px 0 #2d2240; }
.ft-home .ft-on { color: #5e5470; }
.ft-home .ft-col a { text-decoration-color: var(--sun); }
.ft-home :focus-visible { outline-color: #fff; }
@media (max-width: 900px) { .ft-grid { grid-template-columns: 1fr 1fr; } .ft-brand, .ft-social { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .ft-ig:hover { transform: none; } }

.hero { padding: 12px 0 4px; }
.hero.big { padding: 32px 0 12px; }
.hero.big h1 { font-size: clamp(2.2rem, 6.5vw, 3.3rem); line-height: 1.05; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38em; }
.kicker { display: inline-block; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--muted); font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.pre { white-space: pre-line; }

/* Kid header + counters (giver page) */
.kidhead { display: flex; align-items: center; gap: 14px; padding-top: 10px; }
.kidhead h1 { margin: 2px 0; }
.kidrow { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.kidrow h2 { margin: 0; }
.avatar { width: 60px; height: 60px; border-radius: 50%; flex: none; display: grid; place-items: center; font-family: var(--head); font-size: 1.7rem; font-weight: 700; color: #2d2240; border: 3px solid var(--edge); box-shadow: var(--shadow-sm); }
.kidrow .avatar { width: 46px; height: 46px; font-size: 1.3rem; border-width: 2.5px; box-shadow: 2px 3px 0 var(--edge); }
.av0 { background: var(--sun); }
.av1 { background: var(--sky); }
.av2 { background: var(--pink); }
.av3 { background: var(--teal); }
.av4 { background: var(--tomato); }
.note { background: var(--butter); border: 2.5px solid var(--edge); border-radius: 20px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.note b { display: block; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }

/* Surfaces */
.card { background: var(--surface); border: 3px solid var(--edge); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card.soft { background: var(--soft); border-width: 2.5px; box-shadow: none; }
.card.narrow { max-width: 460px; width: 100%; margin: 28px auto; }
.card.callout { background: var(--butter); }
.banner { background: var(--warn-soft); color: var(--text); border: 2.5px solid var(--edge); border-radius: 18px; padding: 12px 16px; font-weight: 700; }
.flash { border: 2.5px solid var(--edge); border-radius: 16px; padding: 12px 16px; background: var(--ok-soft); color: var(--text); font-weight: 700; box-shadow: var(--shadow-sm); }
.flash.error { background: var(--peach); }
.empty { text-align: center; color: var(--muted); font-weight: 700; padding: 28px 16px; border: 3px dashed var(--line); border-radius: var(--radius); }

.cols { display: grid; gap: 22px; }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1fr) 350px; align-items: start; } }
.cols > div, .cols > aside { display: grid; gap: 20px; align-content: start; min-width: 0; }
.grid3 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid3 .card p { margin: 0; color: var(--muted); }
.two { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stack { display: grid; gap: 14px; margin-top: 10px; }
form.inline { display: inline; }
hr { border: 0; border-top: 3px dashed var(--line); margin: 18px 0; }

/* Forms */
label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 6px; font-weight: 800; font-size: .95rem; }
label > input, label > textarea, label > select { flex: 1 1 100%; }
label .muted { font-weight: 600; }
input, textarea, select { font: inherit; font-size: 1.05rem; font-weight: 600; color: var(--text); background: var(--surface); border: 2.5px solid var(--edge); border-radius: 14px; padding: 11px 14px; width: 100%; min-height: 50px; }
@media (prefers-color-scheme: dark) { input, textarea, select { border-color: var(--line); } }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--edge); box-shadow: 0 0 0 4px var(--sun); }
input[type=radio], input[type=checkbox] { width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--btn); flex: none; box-shadow: none; }
label.check { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; font-weight: 700; }
.checks { display: grid; gap: 10px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 800; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.types { display: flex; flex-wrap: wrap; gap: 8px; }
.typechip, .seg label { display: inline-flex; position: relative; }
.typechip input, .seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.typechip span { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 2.5px solid var(--edge); font-weight: 700; font-size: .95rem; }
.typechip input:checked + span { background: var(--sun); color: #2d2240; box-shadow: 2px 3px 0 var(--edge); }
.typechip input:focus-visible + span, .seg input:focus-visible + span { outline: 3px solid var(--edge); outline-offset: 2px; }
.segrow { display: flex; gap: 4px; background: var(--soft); border: 2.5px solid var(--edge); border-radius: 16px; padding: 4px; }
.seg label { flex: 1; }
.seg span { flex: 1; text-align: center; padding: 10px 6px; border-radius: 11px; font-weight: 800; color: var(--muted); }
.seg input:checked + span { background: var(--sun); color: #2d2240; }
.urlrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }

/* Buttons: outlined, with an offset shadow that presses in */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 9px 18px; border-radius: 14px; border: 2.5px solid var(--edge); background: var(--surface); color: var(--text); font-family: var(--head); font-size: 1.05rem; font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .08s, box-shadow .08s, background .15s; }
.btn:hover { transform: translate(1px, 1px); box-shadow: 2px 3px 0 var(--edge); }
.btn:active { transform: translate(3px, 4px); box-shadow: 0 0 0 var(--edge); }
.btn.primary { background: var(--btn); color: var(--btn-ink); }
.btn.big { width: 100%; min-height: 56px; font-size: 1.15rem; border-radius: 16px; box-shadow: var(--shadow); }
.btn.big:hover { box-shadow: 3px 4px 0 var(--edge); }
.btn.ghost { background: transparent; box-shadow: none; border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); transform: none; }
.btn.small { min-height: 38px; padding: 5px 14px; font-size: .95rem; border-radius: 12px; box-shadow: 2px 3px 0 var(--edge); }
.btn.block { display: flex; width: 100%; justify-content: space-between; }
.btn.danger, .danger { color: var(--danger); }
.btn:disabled { opacity: .6; cursor: progress; }
button.link { background: none; border: 0; color: var(--link); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary.btn:not(.big) { margin-bottom: 6px; }
details.menu[open] { flex-basis: 100%; }

/* Gift cards: one per row */
.items { display: grid; gap: 16px; }
.item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: center; background: var(--surface); border: 3px solid var(--edge); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.item.dim { opacity: .65; box-shadow: none; border-style: dashed; }
.thumb { width: 88px; height: 88px; border-radius: 18px; object-fit: cover; background: var(--soft); border: 2.5px solid var(--edge); }
.thumb.ph { display: grid; place-items: center; font-size: 2.6rem; }
.ph-item { background: var(--peach); } .ph-vague { background: var(--lilac); } .ph-experience { background: var(--aqua); }
.ph-membership { background: var(--butter); } .ph-activity { background: var(--mint); } .ph-fund { background: var(--pink); }
.ibody { display: grid; gap: 3px; min-width: 0; }
.ibody h3 { margin: 2px 0 0; font-size: 1.2rem; line-height: 1.22; }
.ibody h3 a { color: var(--text); text-decoration-color: var(--line); text-decoration-thickness: 2px; }
.price { font-weight: 900; font-size: 1.05rem; }
.note-text, .ibody .note { color: var(--muted); background: none; box-shadow: none; padding: 0; border: 0; border-radius: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .78rem; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--text); border: 2px solid var(--edge); font-weight: 800; }
.tag.star { background: var(--sun); color: #2d2240; }
.tag.group { background: var(--teal); color: #fff; }
@media (prefers-color-scheme: dark) { .tag { border-color: var(--line); } .tag.group { color: #12302b; } }
.iactions { grid-column: 1 / -1; display: grid; gap: 10px; }
.iactions:empty { display: none; }
.chip { justify-self: start; font-size: .88rem; font-weight: 800; padding: 3px 12px; border-radius: 999px; background: var(--soft); border: 2px solid var(--edge); }
.chip.ok { background: var(--mint); color: var(--ok); }
.chip.warn { background: var(--butter); color: var(--warn); }
.chip.done { background: var(--soft); color: var(--muted); }
@media (prefers-color-scheme: dark) { .chip { border-color: var(--line); } }
@media (min-width: 560px) {
  .item { grid-template-columns: 112px minmax(0, 1fr); }
  .thumb { width: 112px; height: 112px; }
}

/* Claim form as a bottom sheet (pure CSS via <details>; JS adds Cancel/Escape) */
.claim > summary { width: 100%; }
/* A transform on the summary would trap its fixed-position scrim, so the press effect is off while open. */
.claim[open] > summary, .claim[open] > summary:hover, .claim[open] > summary:active { transform: none; }
.claim[open] > summary::before { content: ""; position: fixed; inset: 0; background: var(--scrim); z-index: 40; cursor: default; animation: fade .2s ease-out; }
.sheet { background: var(--surface); color: var(--text); }
.claim[open] > .sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; margin: 0 auto; max-width: 560px; max-height: 92vh; overflow-y: auto;
  border: 3px solid var(--edge); border-bottom: 0; border-radius: 28px 28px 0 0;
  padding: 12px max(18px, env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  animation: slideup .32s cubic-bezier(.2, .9, .25, 1.05);
}
.sheet .grab { width: 48px; height: 6px; border-radius: 9px; background: var(--edge); margin: 0 auto; }
@media (prefers-color-scheme: dark) { .sheet .grab { background: var(--line); } }
.sheet h2 { margin: 0; }
@keyframes slideup { from { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.just-claimed { animation: pop .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes pop { 40% { transform: scale(1.02) rotate(-.5deg); } }

ul.plain { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.claims li { padding: 8px 12px; background: var(--soft); border-radius: 12px; }
.lists .listlink > .small { display: block; }
.lists .listlink { display: block; padding: 12px 14px; border-radius: 16px; background: var(--soft); border: 2.5px solid var(--edge); text-decoration: none; color: var(--text); font-weight: 600; transition: transform .08s, box-shadow .08s; }
.lists .listlink:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-sm); background: var(--surface); }
.lists .listlink.archived { opacity: .6; border-style: dashed; }
.hh { padding: 8px 0; border-bottom: 2px dashed var(--line); }
.hh:last-of-type { border-bottom: 0; }
.howto { margin-top: 6px; padding: 10px 12px; background: var(--mint); border-radius: 12px; }

.share { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; align-items: start; }
.qr { width: 116px; height: 116px; background: #fff; border: 2.5px solid var(--edge); border-radius: 14px; padding: 6px; }
.sharebody { display: grid; gap: 6px; min-width: 0; }
.copyrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.copyrow input { min-height: 38px; padding: 6px 10px; font-size: .85rem; }

.thank li { align-items: center; padding: 4px 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .btn:hover, .btn:active, .lists .listlink:hover { transform: none; } }
@media print {
  .top, .foot, .noprint, .thank form { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .item { box-shadow: none; break-inside: avoid; }
}

/* ---------- Landing page: "Storybook" ----------
   Chunky ink outlines, offset shadows and warm brights. The landing page keeps
   its own fixed light palette, since the illustrations are drawn for a light
   page. Fonts and the shared palette are defined at the top of the file. */

main.bare { max-width: none; padding: 0; display: block; }
body:has(main.bare) { background: #fff8ec; }
.sb {
  --sb-cream: #fff8ec; --sb-paper: #fffdf8; --sb-ink: #2d2240; --sb-muted: #5e5470;
  --sb-tomato: #ff6b4a; --sb-sun: #ffc93c; --sb-teal: #2bb3a3; --sb-sky: #bfe6ff; --sb-pink: #ffc6d3;
  --sb-head: "Fredoka Variable", "Nunito Variable", ui-rounded, system-ui, sans-serif;
  color-scheme: light; background: var(--sb-cream); color: var(--sb-ink);
  font-family: "Nunito Variable", ui-rounded, system-ui, sans-serif; font-size: 1.125rem; line-height: 1.55;
  overflow-x: clip;
}
.sb h1, .sb h2, .sb h3 { font-family: var(--sb-head); font-weight: 600; letter-spacing: -.01em; line-height: 1.08; margin: 0; color: var(--sb-ink); }
.sb p { margin: 0; }
.sb a { color: inherit; }
.sb :focus-visible { outline: 3px solid var(--sb-ink); outline-offset: 3px; border-radius: 8px; }
.sb-wrap { max-width: 1180px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }

.sb-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 28px; border-radius: 18px; border: 3px solid var(--sb-ink); background: #d6411f; color: #fff !important; font-family: var(--sb-head); font-weight: 600; font-size: 1.2rem; text-decoration: none; box-shadow: 4px 5px 0 var(--sb-ink); transition: transform .12s, box-shadow .12s; }
.sb-btn:hover { transform: translate(2px, 2px); box-shadow: 2px 3px 0 var(--sb-ink); }
.sb-btn:active { transform: translate(4px, 5px); box-shadow: 0 0 0 var(--sb-ink); }
.sb-btn.ghost { background: var(--sb-paper); color: var(--sb-ink) !important; }
.sb-btn.sun { background: var(--sb-sun); color: var(--sb-ink) !important; }
.sb-btn.sm { min-height: 44px; padding: 0 18px; font-size: 1.05rem; border-radius: 14px; box-shadow: 3px 4px 0 var(--sb-ink); }

.sb-top { position: sticky; top: 0; z-index: 30; background: var(--sb-cream); border-bottom: 3px solid transparent; transition: border-color .2s, box-shadow .2s; }
.sb-top.stuck { border-bottom-color: var(--sb-ink); box-shadow: 0 4px 0 rgba(45, 34, 64, .08); }
.sb [id] { scroll-margin-top: 96px; }
.sb-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.sb-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--sb-head); font-weight: 700; font-size: 1.65rem; }
.sb-logo svg { transform: rotate(-8deg); }
.sb-nav nav { display: flex; align-items: center; gap: 22px; font-weight: 700; white-space: nowrap; }
.sb-nav nav a:not(.sb-btn) { text-decoration: none; }
.sb-nav nav a:not(.sb-btn):hover { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--sb-tomato); text-underline-offset: 6px; }

.sb-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; padding-top: 28px; padding-bottom: 40px; }
.sb-hero-copy { display: grid; gap: 22px; justify-items: start; }
.sb-sticker { display: inline-block; padding: 8px 16px; border: 2.5px solid var(--sb-ink); border-radius: 999px; background: var(--sb-sun); font-weight: 800; font-size: .95rem; transform: rotate(-2deg); box-shadow: 2px 3px 0 var(--sb-ink); }
.sb-hero h1 { font-size: clamp(2.7rem, 6.4vw, 4.25rem); }
.sb-mark { position: relative; white-space: nowrap; }
.sb-squiggle { position: absolute; left: -4px; bottom: -.18em; width: calc(100% + 8px); height: .3em; }
.sb-lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--sb-muted); max-width: 32em; }
.sb-ctas { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.sb-fine { font-weight: 700; color: var(--sb-muted); font-size: 1rem; }

.sb-scene { position: relative; }
.sb-scene-art { display: block; width: 100%; height: auto; }

.sb-wave { display: block; width: 100%; height: 60px; }
.sb-wave.w-sky { fill: var(--sb-sky); }
.sb-wave.w-tomato { fill: var(--sb-tomato); margin-top: -1px; }
.sb-wave.flip { transform: scaleY(-1); }
.sb-how { background: var(--sb-sky); padding: 48px 0 72px; margin: -1px 0; }
.sb-how h2, .sb-fam h2 { font-size: clamp(2.1rem, 4.6vw, 3rem); text-align: center; }
.sb-sub { text-align: center; color: var(--sb-muted); font-size: 1.2rem; margin: 12px auto 48px !important; max-width: 38em; }
.sb-how .sb-sub { color: #2f4a5c; }
.sb-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.sb-step { position: relative; padding: 26px; background: var(--sb-paper); border: 3px solid var(--sb-ink); border-radius: 26px; box-shadow: 5px 6px 0 var(--sb-ink); }
.sb-step:nth-child(1) { transform: rotate(-1.2deg); }
.sb-step:nth-child(3) { transform: rotate(1.2deg); }
.sb-step svg { display: block; margin: 14px auto 10px; }
.sb-step h3 { font-size: 1.55rem; margin-bottom: 8px; }
.sb-step p { color: var(--sb-muted); }
.sb-num { position: absolute; top: -22px; left: 22px; width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--sb-ink); display: grid; place-items: center; font-family: var(--sb-head); font-weight: 700; font-size: 1.35rem; }

.sb-fam { padding-top: 72px; padding-bottom: 40px; }

.sb .sun { background: var(--sb-sun); }
.sb .tomato { background: var(--sb-tomato); color: #fff; }
.sb .teal { background: var(--sb-teal); color: #fff; }
.sb .sky { background: var(--sb-sky); }
.sb .pink { background: var(--sb-pink); }
.sb .cream { background: var(--sb-cream); }

.sb-gran { padding-top: 56px; padding-bottom: 80px; }
.sb-gran-card { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: clamp(28px, 5vw, 48px); background: var(--sb-pink); border: 3px solid var(--sb-ink); border-radius: 36px; box-shadow: 7px 8px 0 var(--sb-ink); }
.sb-gran-card h2 { font-size: clamp(2rem, 4.2vw, 2.75rem); margin-bottom: 14px; }
.sb-gran-card p { font-size: 1.2rem; color: #5a3442; margin-bottom: 18px; }
.sb-ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-weight: 800; }
.sb-ticks li { display: flex; align-items: center; gap: 10px; }
.sb-tick { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2.5px solid var(--sb-ink); background: var(--sb-teal); color: #fff; display: grid; place-items: center; }
/* A feature that's planned but not built yet: a small dashed sun pill after the tick's text. */
.sb-soon { display: inline-block; margin-left: 4px; padding: 1px 9px; border: 2px dashed var(--sb-ink); border-radius: 999px; background: var(--sb-sun); color: var(--sb-ink); font-size: .78rem; font-weight: 800; white-space: nowrap; vertical-align: 2px; }
.sb-phone { justify-self: center; width: min(290px, 100%); padding: 18px 16px 24px; background: var(--sb-paper); border: 3px solid var(--sb-ink); border-radius: 38px; box-shadow: 6px 7px 0 var(--sb-ink); }
.sb-phone-bar { width: 80px; height: 8px; margin: 0 auto 16px; border-radius: 9px; background: var(--sb-ink); }
.sb-bub { margin-bottom: 10px; padding: 12px 14px; border-radius: 18px 18px 18px 6px; background: #efe8f7; font-size: .95rem; font-weight: 600; }
.sb-bub.me { margin-left: 40px; border-radius: 18px 18px 6px 18px; background: var(--sb-teal); color: #fff; }
.sb-mini { margin-bottom: 10px; border: 2.5px solid var(--sb-ink); border-radius: 16px; overflow: hidden; }
.sb-mini-top { height: 70px; background: var(--sb-sun); display: grid; place-items: center; }
.sb-mini-bot { padding: 8px 12px; font-size: .9rem; font-weight: 800; }
.sb-mini-bot small { display: block; font-weight: 600; color: var(--sb-muted); }

.sb-cta { background: var(--sb-tomato); color: #fff; padding: 20px 0 88px; }
.sb-cta .sb-wrap { display: grid; justify-items: center; text-align: center; gap: 18px; }
.sb-cta h2 { color: #fff; font-size: clamp(2.3rem, 5.4vw, 3.5rem); max-width: 16em; text-wrap: balance; line-height: 1.35; }
@media (max-width: 700px) {
  /* The longest occasion, "Secret Santa", has to stay on the first line. */
  .sb-cta h2 { font-size: min(2.3rem, 6.6vw); }
}
/* One occasion at a time, on a sunshine sticker. The track is as wide as the longest
   word, so the sticker never resizes and the rest of the line stays put while words scroll. */
.sb-cta .sb-slot { display: inline-block; vertical-align: -.2em; overflow: hidden; height: 1.3em; padding: 0 .3em; margin: 0 .08em; border: 3px solid var(--sb-ink); border-radius: .4em; background: var(--sb-sun); color: var(--sb-ink); box-shadow: 3px 4px 0 var(--sb-ink); transform: rotate(-2deg); line-height: 1.3; }
.sb-slot-track { display: inline-block; vertical-align: top; transition: transform .55s cubic-bezier(.22, 1, .36, 1); }
.sb-slot-word { display: block; height: 1.3em; white-space: nowrap; text-align: center; }
.sb-cta p { font-size: 1.25rem; max-width: 32em; color: #fff1ea; }
.sb-cta .sb-small { font-size: 1rem; }
.sb-cta .sb-small a { font-weight: 800; color: #fff; }

@media (max-width: 900px) {
  .sb-hero, .sb-gran-card { grid-template-columns: 1fr; }
  .sb-steps { grid-template-columns: 1fr; gap: 40px; }
  .sb-step:nth-child(n) { transform: none; }
  .sb-scene { max-width: 520px; margin: 0 auto; width: 100%; }
}
@media (max-width: 640px) {
  .sb-nav nav a[href^="#"] { display: none; }
  .sb-nav { flex-wrap: nowrap; }
  .sb-nav nav { gap: 14px; }
  .sb-logo { font-size: 1.35rem; gap: 8px; }
  .sb-logo svg { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .sb-btn:hover, .sb-btn:active { transform: none; }
  .sb-slot-track { transition: none; }
}

/* Rotating hero headline. The first phrase is server-rendered; app.js cycles the rest. */
.sb-rotor { display: block; min-height: 3.3em; }
.sb-rotor-lead, .sb-mark { display: inline-block; transition: opacity .35s ease, transform .35s cubic-bezier(.3, 1.3, .5, 1); }
.sb-mark { transition-delay: .06s; }
.sb-rotor.out .sb-rotor-lead, .sb-rotor.out .sb-mark { opacity: 0; transform: translateY(-.35em) rotate(-2deg); }
.sb-rotor.pre .sb-rotor-lead, .sb-rotor.pre .sb-mark { opacity: 0; transform: translateY(.45em) rotate(2deg); transition: none; }
.sb-mark { white-space: normal; }
.sb-squiggle path { stroke-dasharray: 320; stroke-dashoffset: 0; }
.sb-rotor.draw .sb-squiggle path { animation: sb-draw .7s .25s ease-out both; }
@keyframes sb-draw { from { stroke-dashoffset: 320; } }

/* Demo list card over the hero art */
.sb-scene { position: relative; }
.sb-demo { position: absolute; left: 7%; right: 9%; top: 24%; padding: 16px; background: var(--sb-paper); border: 3px solid var(--sb-ink); border-radius: 24px; box-shadow: 6px 7px 0 var(--sb-ink); transform: rotate(-2deg); display: grid; gap: 10px; }
.sb-demo-head { display: flex; align-items: center; gap: 10px; }
.sb-demo-head b { display: block; font-family: var(--sb-head); font-weight: 600; font-size: 1.15rem; line-height: 1.15; }
.sb-demo-head small, .sb-demo-row small { display: block; color: var(--sb-muted); font-size: .82rem; font-weight: 600; line-height: 1.3; }
.sb-av { width: 38px; height: 38px; flex: none; border-radius: 50%; border: 2.5px solid var(--sb-ink); display: grid; place-items: center; font-family: var(--sb-head); font-weight: 700; }
.sb-demo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sb-demo-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border: 2.5px solid var(--sb-ink); border-radius: 16px; background: #fff; font-size: .95rem; line-height: 1.25; transition: background .25s; }
.sb-demo-row b { display: block; font-weight: 800; }
.sb-demo-row.is-taken { background: #f3ece0; border-style: dashed; }
.sb-demo-row.is-taken b { color: var(--sb-muted); }
.sb-demo-row.is-claimed { background: #d7f3ee; }
.sb-demo-thumb { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--sb-ink); display: grid; place-items: center; color: var(--sb-ink); }
.sb-demo-chip { padding: 3px 10px; border: 2px solid var(--sb-ink); border-radius: 999px; background: #e8dfd0; font-size: .8rem; font-weight: 800; }
.sb-demo-btn { position: relative; padding: 7px 12px; border: 2.5px solid var(--sb-ink); border-radius: 12px; background: #d6411f; color: #fff; font: 600 .92rem var(--sb-head); text-decoration: none; white-space: nowrap; box-shadow: 2px 3px 0 var(--sb-ink); cursor: pointer; transition: transform .1s, box-shadow .1s, background .2s; }
.sb-demo-btn:hover { transform: translate(1px, 1px); box-shadow: 1px 2px 0 var(--sb-ink); }
.sb-demo-btn:active { transform: translate(2px, 3px); box-shadow: 0 0 0 var(--sb-ink); }
.sb-demo-btn[aria-pressed="true"] { background: var(--sb-teal); color: var(--sb-ink); }
.sb-demo-bar { display: block; height: 8px; margin-top: 5px; border: 2px solid var(--sb-ink); border-radius: 999px; background: #fff; overflow: hidden; }
.sb-demo-bar > span { display: block; width: 40%; height: 100%; background: var(--sb-teal); }
.sb-demo-toast { position: absolute; left: 50%; bottom: -22px; translate: -50% 0; padding: 8px 14px; border: 2.5px solid var(--sb-ink); border-radius: 14px; background: var(--sb-sun); font-weight: 800; font-size: .9rem; white-space: nowrap; box-shadow: 3px 4px 0 var(--sb-ink); opacity: 0; transform: translateY(8px) scale(.9); pointer-events: none; transition: opacity .25s, transform .3s cubic-bezier(.3, 1.5, .5, 1); }
.sb-demo-toast.show { opacity: 1; transform: none; }
.sb-demo-toast:empty { visibility: hidden; }
.sb .sb-demo-cap { display: none; margin: 10px 0 0; text-align: center; font-weight: 800; color: var(--sb-muted); font-size: .95rem; }
.js .sb .sb-demo-cap { display: block; }
.sb-confetti { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; border: 2px solid var(--sb-ink); border-radius: 3px; pointer-events: none; animation: sb-pop .8s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes sb-pop { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--r)) scale(1); opacity: 0; } }

/* "Who it's for" tabs. Without JS every panel shows, stacked. */
.sb-aud { display: grid; gap: 18px; }
.sb-tablist { display: none; flex-wrap: wrap; justify-content: center; gap: 10px; }
.js .sb-tablist { display: flex; }
.sb-tab { min-height: 48px; padding: 0 20px; border: 3px solid var(--sb-ink); border-radius: 999px; background: var(--sb-paper); color: var(--sb-ink); font: 600 1.1rem var(--sb-head); cursor: pointer; transition: transform .1s, box-shadow .1s, background .2s; }
.sb-tab:hover { transform: translateY(-2px); }
.sb .sb-tab[aria-selected="false"] { background: var(--sb-paper); color: var(--sb-ink); }
.sb-tab[aria-selected="true"] { box-shadow: 3px 4px 0 var(--sb-ink); transform: translateY(-2px); }
.sb .sb-tab.tomato[aria-selected="true"], .sb .sb-tab.teal[aria-selected="true"] { color: var(--sb-ink); }
.sb-panel { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 32px; align-items: center; padding: clamp(22px, 4vw, 40px); background: var(--sb-paper); border: 3px solid var(--sb-ink); border-radius: 30px; box-shadow: 6px 7px 0 var(--sb-ink); }
.sb-panel:focus-visible { outline-offset: 4px; }
.js .sb-panel { animation: sb-in .35s cubic-bezier(.3, 1.3, .5, 1); }
@keyframes sb-in { from { opacity: 0; transform: translateY(10px); } }
.sb-panel-art { width: 150px; height: 150px; border-radius: 50%; border: 3px solid var(--sb-ink); display: grid; place-items: center; color: var(--sb-ink); box-shadow: 4px 5px 0 var(--sb-ink); }
.sb .sb-panel-art.teal { color: var(--sb-ink); }
.sb-panel-art svg { width: 64px; height: 64px; }
.sb-panel-for { display: inline-block; margin-bottom: 6px; font-size: .8rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--sb-muted); }
.js .sb-panel-for { display: none; }
.sb-panel h3 { font-size: clamp(1.6rem, 3.4vw, 2.1rem); margin-bottom: 10px; }
.sb-panel p { color: var(--sb-muted); font-size: 1.1rem; margin-bottom: 16px; max-width: 38em; }

/* Scroll-in. Only hidden once app.js has marked the page, so nothing is lost without JS. */
.js .sb [data-reveal] { opacity: 0; translate: 0 18px; transition: opacity .5s ease var(--d, 0s), translate .6s cubic-bezier(.3, 1.2, .5, 1) var(--d, 0s); }
.js .sb [data-reveal].in { opacity: 1; translate: 0 0; }

@media (max-width: 900px) {
  .sb-panel { grid-template-columns: 1fr; gap: 18px; justify-items: start; }
  .sb-panel-art { width: 96px; height: 96px; }
  .sb-panel-art svg { width: 44px; height: 44px; }
}
@media (max-width: 640px) {
  .sb .sb-demo-cap { margin-top: 34px; }
  .sb-demo { position: relative; left: auto; right: auto; top: auto; margin: -62% 4% 0; }
  .sb-demo-row { grid-template-columns: 32px minmax(0, 1fr); }
  .sb-demo-row > :last-child:not(div) { grid-column: 2; justify-self: start; }
  .sb-demo-thumb { width: 32px; height: 32px; }
  .sb-tab { padding: 0 14px; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .js .sb [data-reveal] { opacity: 1; translate: none; transition: none; }
  .sb-confetti { display: none; }
}

/* Family invite (src/features/family-invite) */
.invite { display: grid; gap: 14px; }
.invite > h1, .invite > p, .invite > form { margin: 0; }
.invite-banner { background: var(--aqua); margin-bottom: 14px; }
.heads-up { background: var(--butter); font-weight: 600; }
ul.checks { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.card.welcome { background: var(--mint); }
.linkbtn { background: none; border: 0; padding: 8px 2px; min-height: 44px; font: inherit; font-weight: 700; color: var(--link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Dashboard (PRD-02, option E1): a calmer look scoped to the dashboard. One header card with
   the share button and kid chips, one kid's lists at a time, settings tucked in a <details>.
   Cards sit between the storybook look and flat: a 2px ink outline with a soft offset shadow.
   Secondary buttons drop their shadow; primary buttons keep the chunky one. */
.dash { display: grid; gap: 18px; width: 100%; max-width: 960px; margin: 0 auto; align-content: start; }
.dash > * { margin: 0; min-width: 0; }
.dash .card { border: 2px solid var(--edge); border-radius: 22px; box-shadow: 3px 4px 0 rgba(45, 34, 64, .22); }
@media (prefers-color-scheme: dark) { .dash .card { border-color: var(--line); box-shadow: 3px 4px 0 var(--edge); } }
.dash h1 { font-size: 1.9rem; margin: 0; }
.dash .btn:not(.primary):not(.sharebtn) { border-width: 1.5px; box-shadow: none; }
.dash .btn:not(.primary):not(.sharebtn):hover { transform: none; background: var(--soft); }
.dashtop { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 24px; }
.dashtop p { margin: 4px 0 0; }
/* Share button: deep teal, white text 5.2:1. */
.btn.sharebtn { background: #177a6f; border: 1.5px solid #177a6f; color: #ffffff; box-shadow: 0 2px 0 rgba(45, 34, 64, .15); }
.btn.sharebtn:hover { background: #126a60; transform: none; box-shadow: 0 2px 0 rgba(45, 34, 64, .15); }
.sharesheet > summary, .addsheet > summary { width: auto; }
.kidchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.kidchip { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 6px 16px 6px 6px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.2; }
.kidchip:hover { background: var(--soft); }
.kidchip[aria-current] { border: 2.5px solid var(--text); padding: 5px 15px 5px 5px; }
.kidchip .avatar { width: 36px; height: 36px; font-size: 1rem; border-width: 2px; box-shadow: none; }
.kidchip strong, .kidchip .meta { display: block; }
.kidchip .meta { font-size: .82rem; color: var(--muted); font-weight: 700; }
summary.kidchip.add .widetext { white-space: pre; }
summary.kidchip.add { gap: 0; padding: 6px 16px; border-style: dashed; border-color: var(--muted); font-family: var(--head); font-size: 1rem; cursor: pointer; }
.dash .kid h2 { font-size: 1.4rem; margin: 0; }
.dash .lists { margin: 14px 0 12px; }
.dash .lists .listlink { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; border: 1.5px solid var(--line); background: var(--bg); }
.dash .lists .listlink:hover { transform: none; box-shadow: none; background: var(--soft); }
.lname { font-size: 1.05rem; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1; }
.go { grid-column: 2; grid-row: 1 / span 2; font-size: 1.5rem; font-weight: 800; color: var(--link); }
.pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 800; }
.pill.when { background: var(--butter); color: var(--warn); }
.pill.count { background: var(--soft); color: var(--text); }
.pill.claimed { background: var(--mint); color: var(--ok); }
.pill.surprise { background: var(--lilac); color: var(--text); }
.pill.done { background: var(--soft); color: var(--muted); }
.setgrid { display: grid; gap: 24px; margin-top: 18px; padding-top: 18px; border-top: 2px dashed var(--line); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.setgrid h2 { margin-bottom: 4px; }
/* Family details (PRD-04): values with an Edit link, no Save until you edit. */
.setgrid { border-top: 0; padding-top: 0; gap: 16px; align-items: start; }
.setcard { border: 1.5px solid var(--edge); border-radius: 16px; padding: 10px 16px 14px; background: var(--surface); display: grid; gap: 6px; font-weight: 400; }
@media (prefers-color-scheme: dark) { .setcard { border-color: var(--line); } }
.setcard p { margin: 0; }
.sethead { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.sethead h2 { margin: 0; font-weight: 500; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.seticon { display: flex; color: var(--link); flex: none; }
.setval strong { font-weight: 600; }
.editlink { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 4px; background: none; border: 0; font: inherit; font-weight: 600; color: var(--link); cursor: pointer; list-style: none; }
.editlink::-webkit-details-marker { display: none; }
.editlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.setcard { position: relative; }
.setcard:has(.setedit) .sethead { padding-right: 72px; }
.setedit { display: grid; }
/* Edit sits top right, beside the name, like the mock-up. */
.setedit > summary { position: absolute; top: 10px; right: 12px; }
/* With JavaScript, Cancel closes the form; without it, Edit stays visible to close it. */
.js .setedit[open] > summary { display: none; }
.setedit [data-close-edit] { display: none; }
.js .setedit [data-close-edit] { display: inline-flex; }
.setedit form { margin-top: 6px; }
.invitebtn { margin: 0; flex: none; }
.managers { margin: 0; gap: 4px; }
.managers li { display: flex; align-items: center; gap: 10px; }
.managers .avatar { width: 32px; height: 32px; font-size: .95rem; border-width: 1.5px; box-shadow: none; }
.copyrow.multi { align-items: start; }
.copytext { min-height: 44px; box-sizing: border-box; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font-size: .85rem; line-height: 1.45; overflow-wrap: anywhere; user-select: all; }
@media (max-width: 599px) {
  .dash { font-size: 16px; gap: 14px; }
  .dash h1 { font-size: 1.65rem; }
  .dash .card { padding: 16px; }
  .dashtop { flex-direction: column; align-items: stretch; }
  .sharesheet > summary { width: 100%; }
  .kidchip .meta, .widetext { display: none; }
  .kidchip { padding-right: 14px; }
  /* Lighter type on phones: the storybook weights read heavy on a small screen. */
  .dash { font-weight: 400; }
  .dash h1, .dash h2, .dash .h3, .dash .btn, .dash summary.kidchip.add { font-weight: 500; }
  .dash strong, .dash b, .dash a, .dash .kidchip strong { font-weight: 600; }
  .dash label { font-weight: 600; }
  .dash .kicker, .dash .pill, .dash .kidchip .meta { font-weight: 700; }
}

/* Share family link (PRD-03): bottom sheet on phones, centred pop-up from 600px up.
   Same <details> as other sheets: the summary's ::before is the dimmed page, so tapping it closes. */
.sharebox { display: grid; gap: 16px; font-weight: 400; }
.sharebox h2 { font-weight: 500; }
.sharebox strong, .sharebox label { font-weight: 600; }
.sharebox .btn { font-weight: 500; }
.sharebox p { margin: 2px 0 0; }
.sharehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sharex { flex: none; }
.sharebox .wideonly { display: none; }
.btn.copied, .btn.sharebtn.copied, .btn.sharebtn.copied:hover { background: var(--mint); color: var(--ok); border-color: #177a6f; box-shadow: none; }
.claim.sharesheet[open] > .sheet { border-width: 2px; }
@media (prefers-color-scheme: dark) { .claim.sharesheet[open] > .sheet { border-color: var(--line); } }
@media (min-width: 600px) {
  .claim.sharesheet[open] > .sheet {
    top: 50%; bottom: auto; left: 50%; right: auto; width: min(480px, calc(100vw - 48px)); max-height: calc(100vh - 48px);
    transform: translate(-50%, -50%); border: 2px solid var(--edge); border-radius: 22px; padding: 22px 24px 24px;
    box-shadow: 3px 4px 0 rgba(45, 34, 64, .35); animation: fade .15s ease-out;
  }
  .sharebox .grab, .sharebox .phoneonly { display: none; }
  .sharebox .wideonly { display: inline-flex; }
  .sharex { width: 44px; min-height: 44px; padding: 0; }
}
@media (min-width: 600px) and (prefers-color-scheme: dark) { .claim.sharesheet[open] > .sheet { border-color: var(--line); box-shadow: 3px 4px 0 var(--edge); } }

/* Kid details and the Family details button (PRD-05). Family details opens the same pop-up /
   bottom sheet as Share. On phones it sits beside the greeting and Share gets its own row. */
.dashact { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.famsheet > summary { width: auto; }
.famsheet .sharebox { gap: 14px; }
.kidhead { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; align-items: center; }
.kidhead > .avatar { width: 52px; height: 52px; font-size: 1.35rem; border-width: 2px; box-shadow: none; }
.kidinfo { display: grid; gap: 8px; min-width: 0; }
.kidinfo h2 { overflow-wrap: anywhere; padding-right: 72px; }
.kidfacts { display: flex; flex-wrap: wrap; gap: 8px; }
.pill.fact, .pill.addfact { gap: 6px; min-height: 36px; padding: 0 12px; font-size: .88rem; font-weight: 600; }
.pill.fact { background: var(--soft); color: var(--text); overflow-wrap: anywhere; }
.pill.addfact { background: none; border: 1.5px dashed var(--muted); color: var(--link); text-decoration: none; }
.pill.addfact:hover { background: var(--soft); }
.kidhead > .kidedit { grid-column: 1 / -1; }
.kidedit > summary { top: 0; right: 0; }
.kidedit > form { margin-top: 10px; }
.kidedit .stack > p { margin: -4px 0 0; }
.kidremove { margin-top: 14px; padding-top: 6px; border-top: 1.5px dashed var(--line); }
.removelink { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--danger); cursor: pointer; list-style: none; }
.removelink::-webkit-details-marker { display: none; }
.removelink::after { content: " ▾"; white-space: pre; }
.kidremove[open] > .removelink::after { content: " ▴"; }
.removebox { display: grid; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--danger); border-radius: 14px; }
.removebox p, .removebox form { margin: 0; }
.kidremove [data-close-sheet] { display: none; }
.js .kidremove [data-close-sheet] { display: inline-flex; }
@media (max-width: 599px) {
  .dashtop { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 10px; }
  .dashact { display: contents; }
  .dashact > .sharesheet:not(.famsheet) { grid-column: 1 / -1; }
  .famsheet > summary { width: auto; padding: 0 12px; font-size: .95rem; }
  .kidhead > .avatar { width: 44px; height: 44px; font-size: 1.15rem; }
}

/* The parent's list page (PRD-06): header with list details, a summary bar, and wishes grouped by
   status as cards that show the link, status and who has it. Shares the dashboard's calmer look. */
.listpage { --g-open: var(--tomato); --g-part: #5aa9e6; --g-reserved: var(--sun); --g-bought: var(--teal); --g-hidden: var(--line); }
.lback { display: block; width: fit-content; margin-bottom: 6px; }
.ltitle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.thanksbtn { text-decoration: none; align-self: start; }
.lfacts { display: grid; gap: 6px; margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: var(--soft); font-weight: 400; }
.lfactrow { display: flex; align-items: center; gap: 8px; min-height: 32px; min-width: 0; }
.lnoteline { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lfactrow .addfact { min-height: 32px; }
.lfactrow .listsettings { margin-left: auto; flex: none; }
.listsettings > summary.editlink { min-height: 32px; }
.lfactpills { display: flex; flex-wrap: wrap; gap: 6px; }
.lfactpills .pill.fact { background: var(--surface); min-height: 30px; }
.lnote { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: var(--lilac); }
.lnote p { margin: 0; }
.lsummary { display: grid; gap: 10px; }
.lsumhead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.lsumhead h2 { margin: 0; font-size: 1.3rem; font-weight: 500; }
.loff { font-family: var(--font); font-size: .9rem; font-weight: 600; color: #4a3577; }
@media (prefers-color-scheme: dark) { .loff { color: #cbbcff; } }
.lbar { display: block; width: 100%; height: 12px; border-radius: 99px; overflow: hidden; }
.lbar.thin { height: 6px; }
.lbar .track, .lbar .seg-gap { fill: var(--soft); }
.lbar .seg-open { fill: var(--g-open); } .lbar .seg-part { fill: var(--g-part); }
.lbar .seg-reserved { fill: var(--g-reserved); } .lbar .seg-bought, .lbar .seg-fund { fill: var(--g-bought); }
.llegend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; padding: 0; list-style: none; font-size: .85rem; font-weight: 600; }
.llegend li { display: inline-flex; align-items: center; gap: 6px; }
.ldot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--g-open); }
.g-part .ldot { background: var(--g-part); } .g-reserved .ldot { background: var(--g-reserved); }
.g-bought .ldot { background: var(--g-bought); } .g-hidden .ldot { background: var(--g-hidden); }
.lgroups { display: grid; gap: 22px; }
.lgroup { display: grid; gap: 10px; }
.lgrouphead { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
.lgrouphead h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: 1.05rem; font-weight: 500; }
.lgroup > p { margin: 0; }
.addwish > summary { width: auto; }
.lgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.lcard { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); font-weight: 400; min-width: 0; }
.lcard.dim { opacity: .7; border-style: dashed; }
.lcard.offcard { border-style: dashed; border-color: var(--muted); background: var(--bg); }
.lcardtop { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.lcardtop .editlink { min-height: 32px; padding: 0 2px; }
.lthumb { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--soft); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.lcardname { min-width: 0; }
.lcardname h3 { margin: 0; font-size: 1rem; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.lprice { font-size: .88rem; font-weight: 600; }
.lpick { font-size: .78rem; color: var(--warn); }
.lstore { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.lstore a { font-weight: 600; }
.lstatus { display: grid; gap: 6px; padding: 8px 10px; border-radius: 12px; border: 1.5px solid var(--line); font-size: .9rem; }
.lstatus.open { border-style: dashed; border-color: var(--g-open); color: var(--link); font-weight: 600; }
.lstatus.part { background: color-mix(in srgb, var(--g-part) 14%, var(--surface)); border-color: color-mix(in srgb, var(--g-part) 45%, var(--surface)); }
.lstatus.reserved { background: color-mix(in srgb, var(--g-reserved) 16%, var(--surface)); border-color: color-mix(in srgb, var(--g-reserved) 55%, var(--surface)); }
.lstatus.bought { background: color-mix(in srgb, var(--g-bought) 14%, var(--surface)); border-color: color-mix(in srgb, var(--g-bought) 45%, var(--surface)); }
.lstatus.open .lfund, .lstatus.open .lbar { color: var(--text); font-weight: 400; }
.lfund { display: flex; justify-content: space-between; gap: 8px; }
.lfund strong { font-weight: 700; }
.lclaims { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.lclaims li { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lclaims li > span:first-child { min-width: 0; }
.lclaims strong { font-weight: 700; }
.lsub { display: block; font-size: .8rem; color: var(--muted); }
.lbadge { flex: none; display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.lbadge.bought { background: var(--g-bought); color: #0f3f39; }
.lbadge.reserved { background: var(--g-reserved); color: #2d2240; }
.lbadge.off { background: var(--lilac); color: var(--text); margin-top: 4px; }
.addwish .sharebox, .listsettings .sharebox { font-weight: 400; }
.lmore { display: grid; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1.5px dashed var(--line); }
.lmore > form { margin: 0; }
.lmore .removelink.lroll { color: var(--link); }
@media (min-width: 600px) {
  .claim.addwish[open] > .sheet, .claim.listsettings[open] > .sheet { width: min(560px, calc(100vw - 48px)); }
}
@media (max-width: 599px) {
  .lfacts { padding: 10px 12px; font-size: .95rem; }
  .lgrid { grid-template-columns: 1fr; }
  .thanksbtn { padding: 0 12px; font-size: .95rem; }
  .listpage .dashact > .addwish > summary { width: auto; }
}

/* The gift-giver page (PRD-09): the list page's colours for relatives, with no names. Wishes sit in
   two groups (still open, already taken); a giver's own gifts are marked on their cards. */
.giver .ghead { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px 16px; align-items: center; }
.giver .ghead .avatar { width: 64px; height: 64px; border-width: 2px; box-shadow: none; font-size: 1.8rem; }
.giver .lfacts .lfactrow.gtop-row { align-items: flex-start; }
.giver .lfacts .pre { flex: 1; min-width: 0; line-height: 1.55; }
.ghow { margin: 12px 0 0; font-size: .92rem; color: var(--muted); font-weight: 600; }
.gminepill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 12px; padding: 4px 16px; border-radius: 999px; background: var(--mint); border: 1.5px solid color-mix(in srgb, var(--g-bought) 45%, var(--surface)); color: var(--ok); font-weight: 700; text-decoration: none; }
.gminepill:hover { text-decoration: underline; }
.gaddr { margin: 6px 0 0; }
.giver .lsumhead h2 { overflow-wrap: anywhere; }
.giver .lbar .seg-mine { fill: var(--ok); }
.giver .lgroups { gap: 26px; }
.giver .lgrouphead { border-bottom: 1.5px dashed var(--line); padding-bottom: 6px; }
.giver .lgroup > p { font-weight: 600; }
.gcard { position: relative; gap: 12px; scroll-margin-top: 24px; }
.giver .lcardtop { grid-template-columns: auto minmax(0, 1fr); gap: 12px; }
.giver .lthumb { width: 64px; height: 64px; border-radius: 16px; font-size: 2rem; }
.giver .lcardname h3 { font-size: 1.08rem; }
.gpick { display: inline-flex; margin-top: 4px; padding: 1px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--butter); color: var(--warn); }
.gwhy { margin: 0; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.gfoot { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; padding: 8px 8px 8px 12px; font-weight: 600; }
.gfoot.part { font-weight: 400; }
.gfoot.bought { color: var(--ok); }
.gpart { flex: 1; display: grid; gap: 6px; min-width: 0; font-size: .85rem; }
.gclaim { flex: none; }
.gclaim > summary { width: auto; min-height: 44px; }
.gcard.taken { background: var(--bg); }
.gcard.taken .lthumb { filter: saturate(.5); }
.gcard.taken h3 { color: var(--muted); }
.gcard.yours { border: 2px solid var(--g-bought); }
.gyours { position: absolute; top: -11px; right: 14px; padding: 2px 10px; border-radius: 999px; border: 1.5px solid var(--surface); background: var(--g-bought); color: #0f3f39; font-size: .78rem; font-weight: 700; }
.gmine { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 12px; background: var(--mint); font-size: .92rem; }
.gmine > div:first-child { min-width: 0; }
.gmine .row { display: flex; flex-wrap: wrap; gap: 6px; }
.gmine form { margin: 0; }
.goff > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; list-style: none; cursor: pointer; }
.goff > summary::-webkit-details-marker { display: none; }
.goff > summary strong { display: block; font-family: var(--head); font-weight: 500; font-size: 1.1rem; }
.goff > summary .small { display: block; }
.goff[open] > summary .btn { display: none; }
.goff form { margin-top: 14px; font-weight: 400; }
@media (min-width: 700px) { .giver .lgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .giver .ghead .avatar { width: 52px; height: 52px; font-size: 1.5rem; }
  .giver h1 { font-size: 1.6rem; }
  .gfoot { flex-wrap: wrap; }
}

/* The family link (PRD-11): a playful hero, a "Shh" line, then one card per kid with a chunky
   tile per open list. Counts only, never who took what. */
.famlink { display: grid; gap: 26px; }
.fhero { position: relative; overflow: hidden; background: var(--butter); padding: 22px 20px 20px; display: grid; gap: 24px; align-items: center; }
.fherotext { position: relative; display: grid; gap: 12px; justify-items: start; }
.fhero h1 { font-size: clamp(2rem, 6vw, 3.3rem); line-height: 1.04; margin: 0; max-width: 14ch; }
.fhero .kicker { margin: 0; color: var(--text); }
.flead { margin: 0; font-weight: 600; max-width: 34ch; }
.fdeco { position: absolute; display: block; pointer-events: none; }
.fdeco.s1 { top: 18px; right: 22px; }
.fdeco.s2 { top: 58px; right: 62px; }
.fdeco.dot1 { bottom: -18px; right: -14px; width: 70px; height: 70px; border-radius: 50%; background: var(--pink); border: 3px solid var(--edge); }
.fdeco.dot2 { top: 96px; right: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--sky); border: 2px solid var(--edge); }
.fstack { display: flex; }
.fstack .avatar { width: 48px; height: 48px; font-size: 1.3rem; border-width: 2.5px; box-shadow: 2px 3px 0 var(--edge); }
.fstack .avatar + .avatar { margin-left: -10px; }
.fmore { background: var(--surface); font-size: 1rem !important; }
ul.fchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 0; }
.fchips li { padding: 4px 12px; border-radius: 999px; border: 2px solid var(--edge); background: var(--surface); font-size: .9rem; font-weight: 800; }
.fchips li.hot { background: var(--tomato); color: #2d2240; }
.fcrew { display: none; }
.fshh { display: flex; gap: 10px; align-items: center; margin: -12px 4px 0; color: var(--muted); font-size: .92rem; font-weight: 700; }
.fshh svg { flex: none; color: var(--text); }
.fkids { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; }
.fkid { display: grid; gap: 14px; padding: 18px; }
.fkidhead { display: flex; align-items: center; gap: 12px; }
.fkidhead .avatar { width: 54px; height: 54px; font-size: 1.5rem; border-width: 2.5px; box-shadow: 2px 3px 0 var(--edge); }
.fkidhead h2 { margin: 0; font-size: 1.5rem; line-height: 1.1; overflow-wrap: anywhere; }
.fwhen { display: block; margin: 0; color: var(--muted); font-size: .88rem; font-weight: 700; }
ul.ftiles { margin: 0; gap: 18px; }
.ftile { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--soft); border: 2.5px solid var(--edge); box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none; font-weight: 600; transition: transform .08s, box-shadow .08s; }
.ftile:hover { transform: translate(1px, 1px); box-shadow: 2px 3px 0 var(--edge); }
.ftile:active { transform: translate(3px, 4px); box-shadow: none; }
.ftile.next { margin-top: 8px; }
.fnext { position: absolute; top: -14px; right: 14px; padding: 1px 12px; border-radius: 8px; background: var(--sun); color: #2d2240; border: 2.5px solid var(--edge); font-family: var(--head); font-size: .82rem; font-weight: 600; transform: rotate(-3deg); }
.fico { width: 50px; height: 50px; flex: none; display: grid; place-items: center; border-radius: 14px; border: 2px solid var(--edge); background: var(--lilac); }
.fico.cake { background: var(--peach); }
.fico.tree { background: var(--mint); }
.fbody { flex: 1; min-width: 0; display: grid; gap: 5px; }
.fname { font-family: var(--head); font-size: 1.15rem; line-height: 1.2; overflow-wrap: anywhere; }
.fbar { display: block; width: 100%; height: 10px; border-radius: 99px; border: 2px solid var(--edge); box-sizing: content-box; overflow: hidden; }
.fbar .track { fill: var(--surface); }
.fbar .fill { fill: var(--tomato); }
.fopen { font-size: .88rem; font-weight: 800; text-wrap: pretty; }
.fgo { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--btn); color: var(--btn-ink); border: 2.5px solid var(--edge); }
.fempty { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px; border-radius: 18px; border: 2.5px dashed var(--line); background: var(--bg); font-weight: 700; }
.fempty .gmark { flex: none; transform: rotate(-8deg); opacity: .75; }
.fhow { background: var(--soft); border: 2.5px solid var(--edge); border-radius: var(--radius); padding: 18px; display: grid; gap: 12px; }
.fhow h2 { margin: 0; font-size: 1.3rem; }
.fhow ol { margin: 0; gap: 12px; }
.fhow li { display: flex; align-items: center; gap: 12px; font-weight: 700; text-wrap: pretty; }
.fstep { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--edge); color: #2d2240; font-family: var(--head); font-weight: 700; }
.fstep.s1 { background: var(--sun); } .fstep.s2 { background: var(--sky); } .fstep.s3 { background: var(--pink); }
@media (min-width: 760px) {
  .fhero { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); padding: 40px 44px; }
  .fdeco.s1 { top: 26px; right: auto; left: 46%; }
  .fdeco.s2 { top: auto; bottom: 34px; right: auto; left: 52%; }
  .fdeco.dot1 { top: -30px; bottom: auto; right: -30px; width: 120px; height: 120px; }
  .fdeco.dot2 { top: auto; bottom: -40px; right: 180px; width: 90px; height: 90px; border-width: 3px; }
  .fstack { display: none; }
  .flead { font-size: 1.12rem; }
  .fcrew { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 18px 26px; position: relative; }
  .fpal { display: grid; justify-items: center; gap: 12px; }
  .fpal .avatar { width: 112px; height: 112px; font-size: 3rem; box-shadow: var(--shadow); }
  .fpal:nth-child(1) { transform: rotate(-6deg); }
  .fpal:nth-child(2) { transform: rotate(5deg); margin-top: -10px; }
  .fpal:nth-child(3) { transform: rotate(-3deg); margin-top: 24px; }
  .fcrew.n1 .fpal .avatar { width: 150px; height: 150px; font-size: 4rem; }
  .ftag { position: relative; padding: 4px 14px 4px 24px; background: var(--surface); border: 2.5px solid var(--edge); border-radius: 7px 13px 13px 7px; box-shadow: var(--shadow-sm); font-family: var(--head); font-weight: 600; white-space: nowrap; }
  .ftag::before { content: ""; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -5px; border-radius: 50%; border: 2.5px solid var(--edge); background: var(--butter); }
  .fhow { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 36px; padding: 22px 28px; }
  .fhow ol { display: flex; flex-wrap: wrap; gap: 14px 36px; }
}
@media (prefers-reduced-motion: reduce) { .ftile:hover, .ftile:active { transform: none; } }

/* Add a wish (PRD-07): one box first, then only the chosen kind's fields. CSS :has() shows the
   fields for the checked kind, so it works without JS; app.js adds .fresh for the first screen. */
.wishform { display: grid; gap: 16px; margin-top: 4px; font-weight: 400; }
.wishform label { font-weight: 600; font-size: .95rem; }
.wishform input:not([type=radio]):not([type=checkbox]) { border-width: 2px; font-weight: 400; min-height: 48px; }
.wishform legend { font-weight: 600; font-size: .95rem; margin-bottom: 8px; }
.wishform .btn { font-weight: 500; }
.wishform .wsubmit { min-height: 56px; font-size: 1.15rem; width: 100%; }
.wishform:has(input[name=kind][value=item]:checked) [data-kind]:not([data-kind~="item"]),
.wishform:has(input[name=kind][value=vague]:checked) [data-kind]:not([data-kind~="vague"]),
.wishform:has(input[name=kind][value=fund]:checked) [data-kind]:not([data-kind~="fund"]) { display: none; }
.wfields { display: grid; gap: 14px; }

/* Kind switch: Exact one · An idea · Chip in money */
.wkinds { display: flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: 14px; }
.wkind { flex: 1; position: relative; display: flex; }
.wkind input, .wchip input, .wgoal input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.wkind span { flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 40px; padding: 6px 4px; border-radius: 10px; border: 2px solid transparent; font-weight: 700; font-size: .9rem; line-height: 1.2; }
.wkind input:checked + span { background: var(--surface); border-color: var(--edge); }
.wkind input:focus-visible + span, .wchip input:focus-visible + span, .wgoal input:focus-visible + span { outline: 3px solid var(--ring); outline-offset: 2px; }

.wq { display: grid; gap: 6px; }
.wq p { margin: 0; }
.wstatus:empty { display: none; }
.wstatus { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--muted); }
.wstatus.ok { color: var(--ok); }
.wstatus.warn { color: var(--warn); }
.wfreshonly { display: none; }
.wishform.fresh .wfreshonly { display: block; }

/* Exact one: the product card */
.wcard { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 14px; border: 2px solid var(--edge); border-radius: 18px; background: var(--surface); box-shadow: 3px 4px 0 rgba(45, 34, 64, .22); }
@media (prefers-color-scheme: dark) { .wcard { border-color: var(--line); box-shadow: 3px 4px 0 var(--edge); } }
.wphoto { width: 96px; height: 96px; border-radius: 12px; border: 1.5px solid var(--edge); background: var(--sky); display: flex; align-items: center; justify-content: center; overflow: hidden; color: #2d2240; }
.wimg { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.wimg[hidden], .wph[hidden] { display: none; }
.wcardf { display: grid; gap: 10px; min-width: 0; }
.wshort { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin: -6px 0 0; font-size: .8rem; line-height: 1.35; }
.wshort[hidden] { display: none; }
.wshort .linkbtn { min-height: 32px; padding: 2px; font-size: .8rem; }
.wprice input { max-width: 140px; }
.wtogether { align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; font-weight: 400; }
.wtogether input { margin-top: 2px; }
.wtogether b { font-weight: 700; }
.wtogether .small { display: block; }

/* An idea */
.wnote { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 14px; background: var(--butter); color: var(--text); }
.wchips { display: flex; flex-wrap: wrap; gap: 8px; }
.wchips legend { width: 100%; }
.wchip { position: relative; display: inline-flex; }
.wchip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; }
.wchip input:checked + span { border: 2px solid var(--edge); background: var(--butter); }
[data-kind="fund"] .wchip input:checked + span { background: var(--mint); }
.wother { display: none; }
.wishform:has(input[name=range][value=other]:checked) .wother { display: grid; }

/* Chip in money */
.wgoalgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.wgoal { position: relative; display: flex; }
.wgoal span { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 58px; padding: 6px 10px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); line-height: 1.2; }
.wgoal b { font-weight: 700; }
.wgoal small { font-size: .78rem; color: var(--muted); font-weight: 400; }
.wgoal input:checked + span { border: 2px solid var(--edge); background: var(--mint); }
.wnamegoal { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; align-items: end; }
.wextras { display: grid; gap: 12px; padding-top: 12px; border-top: 1.5px dashed var(--line); }

/* First screen (JS only): one box, Add to list, and two tiles. */
.wtiles { display: none; gap: 10px; }
.wishform.fresh .wtiles { display: grid; }
.wishform.fresh .wkinds, .wishform.fresh .wfields, .wishform.fresh .wextras { display: none; }
.wtiles p { margin: 0; font-weight: 600; }
.wtilegrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wtile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px; border: 2px solid var(--edge); border-radius: 16px; color: var(--text); box-shadow: 3px 4px 0 rgba(45, 34, 64, .22); cursor: pointer; font-weight: 400; transition: transform .08s, box-shadow .08s; }
.wtile:hover { transform: translate(1px, 1px); box-shadow: 2px 3px 0 rgba(45, 34, 64, .22); }
.wtile.idea { background: var(--butter); }
.wtile.fund { background: var(--mint); }
@media (prefers-color-scheme: dark) { .wtile { border-color: var(--line); box-shadow: 3px 4px 0 var(--edge); } }
.wtileicon { width: 40px; height: 40px; margin-bottom: 6px; border-radius: 12px; border: 1.5px solid #2d2240; display: flex; align-items: center; justify-content: center; color: #2d2240; }
.wtile.idea .wtileicon { background: var(--sun); }
.wtile.fund .wtileicon { background: var(--teal); }
.wtile b { font-family: var(--head); font-weight: 500; font-size: 1.05rem; line-height: 1.2; }
.wtile span:not(.wtileicon) { font-size: .9rem; font-weight: 600; }
.wtile small { font-size: .82rem; color: var(--muted); line-height: 1.3; }
.weditcard .wishform { margin-top: 12px; }
@media (max-width: 380px) {
  .wgoalgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wcard { grid-template-columns: 72px minmax(0, 1fr); }
  .wphoto { width: 72px; height: 72px; }
}

/* Share a list (PRD-08): one share pop-up for a list and the family link. Copy link to share
   first, then the party-invite QR code, then (lists only) the kid-safe link folded away. */
.shsheet .sharebox { gap: 18px; }
.shmain { display: grid; gap: 8px; }
.shcopy { display: grid; grid-template-columns: 1fr; gap: 8px; }
.shcopy .shbig { width: 100%; min-height: 56px; font-size: 1.12rem; border: 2.5px solid var(--edge); box-shadow: 3px 4px 0 var(--edge); }
.shcopy .shbig:hover { background: #126a60; box-shadow: 2px 3px 0 var(--edge); }
.shcopy .btn.copied, .shcopy .btn.copied:hover { background: var(--mint); color: var(--ok); }
.shcopy .shsmall { width: 100%; min-height: 48px; border-width: 2px; border-color: var(--edge); }
.js .shcopy .copytext { display: none; }
.js .shcopy.showtext .copytext { display: block; }
.shcopy .copytext { white-space: pre-line; font-size: .9rem; }
.shlink { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; min-width: 0; }
.shurl { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; color: var(--muted); }
.shlink a { flex: none; font-weight: 600; font-size: .95rem; padding: 6px 0; }
.shnote { margin: 0; font-size: .85rem; }
.shqr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: var(--soft); }
.shqr .qr { width: 96px; height: 96px; padding: 6px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; }
.shqrtext { display: grid; gap: 6px; justify-items: start; }
.shqrtext strong { font-family: var(--head); font-weight: 500; font-size: 1.05rem; line-height: 1.2; }
.shqrtext p { margin: 0; }
.shqrtext .btn { min-height: 40px; }
.shkid { border: 1.5px solid var(--line); border-radius: 14px; }
.shkid > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; cursor: pointer; list-style: none; }
.shkid > summary::-webkit-details-marker { display: none; }
.shkid > summary strong { font-weight: 700; }
.shkid > summary svg { flex: none; transition: transform .15s; }
.shkid[open] > summary svg { transform: rotate(180deg); }
.shkidbody { display: grid; gap: 10px; padding: 0 14px 14px; }
.shkidbody p { margin: 0; }
@media (min-width: 600px) {
  .shqr .qr { width: 120px; height: 120px; }
  .shsheet[open] > .sheet { max-height: calc(100vh - 32px); }
}
@media (prefers-reduced-motion: reduce) { .shkid > summary svg { transition: none; } }

/* Forgot your password? (PRD-13) */
.rs-pw { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 5px 10px; }
.rs-pw > input { flex: 1 1 100%; }
.rs-pw > a { font-weight: 700; }
.rs-big { font-size: 2.75rem; line-height: 1; margin-bottom: 8px; }
.rs-tip { margin: 14px 0 2px; background: var(--soft); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; font-size: .95rem; }
.rs-tip strong { font-family: var(--head); font-weight: 600; }
.rs-hint { flex: 1 1 100%; font-size: .9rem; font-weight: 600; color: var(--muted); }
.rs-links { display: flex; flex-direction: column; gap: 6px; }
.rs-full { width: 100%; }

/* AI assistants (PRD-15): the "Let Claude add wishes?" page. */
.ai-can { background: var(--soft); border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 4px 0 16px; }
.ai-can h2 { font-size: 1.05rem; margin: 6px 0 2px; }
.ai-can ul { margin: 0 0 8px; padding-left: 1.2em; }
.ai-can li { margin: 2px 0; }
.ai-allow form .btn { width: 100%; }
.ai-page > h2 { margin-top: 18px; }
.ai-steps li, .ai-says li { margin: 4px 0; }
