/* ============================================================
   Swoon — "love letter" design system
   Romantic editorial: blush parchment, deep-wine ink, one rose
   accent, serif display type, film grain, spring motion.
   Sister app to FitCheck — same bones, softer heart.
   ============================================================ */

:root {
  color-scheme: dark; /* native inputs, scrollbars, pickers follow the night */

  /* candlelit wine bar: deep wine air, light-pink words */
  --bg: #1f1014;
  --surface: #2b161d;
  --surface-2: #3a1f28;
  --border: #4a2531;
  --text: #fbeef0;
  --text-2: #dcb3bc;
  --text-3: #a97f8a;

  /* rose is the action colour; light pink carries the words */
  --primary: #fbeef0;
  --primary-dark: #ffffff;
  --primary-soft: #3c1f28;
  --accent: #e4798f;
  --accent-2: #f0a3b3;
  --accent-soft: #40202a;

  /* semantics, brightened for dark ground */
  --good: #8cc9a0;
  --good-soft: #24392c;
  --warn: #dfa952;
  --warn-soft: #3d2f16;
  --bad: #e77b69;
  --bad-soft: #45201b;
  --info: #9db1d6;
  --info-soft: #232c3d;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -14px rgba(0, 0, 0, .5);
  --shadow-lg: 0 24px 70px -18px rgba(0, 0, 0, .65);
  --ring: 0 0 0 1px rgba(228, 121, 143, .1);

  --nav-h: 64px;
  --topbar-h: 60px;

  --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;

  --ease-out: cubic-bezier(.32, .72, 0, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-exit: cubic-bezier(.7, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  /* the night wash: rose glows breathing over deep wine */
  background:
    radial-gradient(1100px 700px at 85% -12%, rgba(193, 78, 99, .38), transparent 62%),
    radial-gradient(900px 620px at -12% 28%, rgba(240, 150, 125, .14), transparent 58%),
    radial-gradient(1000px 780px at 52% 118%, rgba(228, 121, 143, .2), transparent 62%),
    linear-gradient(180deg, #241118, #170a0e);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

/* film grain — fixed, over everything, never intercepts input */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hidden { display: none !important; }

img { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 16px; }
a { color: var(--text); text-decoration: none; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.015em;
  text-wrap: balance;
}
h1 { font-size: 27px; line-height: 1.2; }
h2 { font-size: 20px; line-height: 1.25; }
h3 { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }

.muted { color: var(--text-2); }
.small { font-size: 13.5px; }

/* ---------- App layout ---------- */

#app { min-height: 100dvh; }

#view {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 24px) 18px calc(var(--nav-h) + 36px);
}

/* ---------- Top bar ---------- */

#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  background: rgba(31, 16, 20, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(228, 121, 143, .16);
  z-index: 40;
}

.topbar-inner {
  max-width: 720px;
  margin: 0 auto;
  height: 100%;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-mark {
  width: 34px; height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff7f5;
  display: grid; place-items: center;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .3), 0 4px 12px -4px rgba(193, 78, 99, .55);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand-mark { overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.01em;
}

.topbar-right { display: flex; align-items: center; gap: 10px; }

.profile-chip {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 6px 13px;
  border-radius: 999px;
  box-shadow: var(--ring);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  display: grid; place-items: center;
  transition: background .25s var(--ease-out), transform .25s var(--ease-out);
}
.icon-btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; }

/* ---------- Bottom nav (mobile) ---------- */

#mainnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(31, 16, 20, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(228, 121, 143, .16);
  display: flex;
  z-index: 40;
}

#mainnav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .03em;
  transition: color .25s var(--ease-out);
}
#mainnav a svg { width: 22px; height: 22px; }
#mainnav a.active { color: var(--accent); }

/* Mobile bottom bar holds five: Home, Find, For them, Weekly, More.
   Ten tabs across 430px left every label wrapped and unreadable, so the
   rest move into the More sheet. The desktop sidebar below re-shows them
   and hides More, because a 236px column has room for all of them. */
#mainnav a[data-secondary] { display: none; }
#mainnav a { min-width: 0; }
#mainnav a span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The More sheet, rendered into #modal-root by app.js */
.more-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.more-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 16px 6px;
  border-radius: 16px;
  border: 1px solid rgba(228, 121, 143, .18);
  background: rgba(228, 121, 143, .07);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transition: background .2s var(--ease-out), border-color .2s var(--ease-out),
              color .2s var(--ease-out), transform .25s var(--ease-spring);
}
.more-grid a svg { width: 22px; height: 22px; }
.more-grid a:hover,
.more-grid a:focus-visible { background: rgba(228, 121, 143, .15); border-color: rgba(228, 121, 143, .38); color: var(--text); transform: translateY(-2px); }
.more-grid a.active { color: var(--accent); border-color: rgba(228, 121, 143, .5); }
/* the active icon glows like a lit candle */
#mainnav a.active svg { filter: drop-shadow(0 3px 9px rgba(193, 78, 99, .55)); }

/* ---------- Desktop layout ---------- */

@media (min-width: 960px) {
  /* sidebar + topbar are fixed, so reserve their space with padding —
     content then centers itself in what's left at any width/zoom */
  #app { padding-left: 236px; }
  #topbar { left: 236px; }
  .topbar-inner { max-width: 860px; }
  #view { max-width: 860px; padding-bottom: 56px; }

  /* the sidebar is a velvet panel — candlelight down the edge */
  #mainnav {
    top: 0; bottom: 0; left: 0; right: auto;
    width: 236px; height: auto;
    flex-direction: column;
    justify-content: flex-start;
    border-top: none;
    border-right: 1px solid rgba(228, 121, 143, .18);
    background: linear-gradient(180deg, rgba(58, 31, 40, .55), rgba(31, 16, 20, .35));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 92px 14px 16px;
    gap: 6px;
  }
  /* Sidebar has the room, so every destination comes back and the
     mobile-only More entry goes away. */
  #mainnav a[data-secondary] { display: flex; }
  #mainnav a[data-nav="more"] { display: none; }

  #mainnav a {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    font-size: 14.5px;
    letter-spacing: 0;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: color .25s var(--ease-out), background .25s var(--ease-out),
                border-color .25s var(--ease-out), transform .3s var(--ease-spring),
                box-shadow .3s var(--ease-out);
  }
  /* a little heart waits at the end of every row… */
  #mainnav a::after {
    content: '♥';
    margin-left: auto;
    font-size: 12px;
    opacity: 0;
    transform: scale(.4);
    transition: opacity .25s var(--ease-out), transform .35s var(--ease-spring), color .25s var(--ease-out);
  }
  /* …blooms on the page you're on */
  #mainnav a.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff7f5;
    box-shadow: 0 12px 26px -10px rgba(193, 78, 99, .65), inset 0 1px 0 rgba(255, 255, 255, .25);
  }
  #mainnav a.active::after { opacity: 1; transform: scale(1); color: rgba(255, 247, 245, .95); }
  /* …and peeks out when you hover anywhere else */
  #mainnav a:hover:not(.active) {
    background: rgba(228, 121, 143, .12);
    border-color: rgba(228, 121, 143, .3);
    color: var(--text);
    transform: translateX(3px);
    box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .4);
  }
  #mainnav a:hover:not(.active)::after { opacity: .7; transform: scale(1); color: var(--accent); }
}

/* ---------- Cards ---------- */

.card {
  background: linear-gradient(180deg, var(--surface), #26131a);
  border: 1px solid rgba(228, 121, 143, .18);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .05);
  padding: 22px;
  margin-bottom: 18px;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-label {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 10px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
  padding: 11px 22px;
  text-decoration: none;
  transition: background .3s var(--ease-out), color .3s var(--ease-out),
              border-color .3s var(--ease-out), box-shadow .3s var(--ease-out),
              transform .3s var(--ease-spring);
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, #b64358, var(--accent-2));
  color: #fff7f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 24px -10px rgba(182, 67, 88, .6);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #a83c50, #cf5f7b);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 16px 32px -12px rgba(182, 67, 88, .65);
}
.btn-primary:active { transform: scale(.97); }

.btn-accent {
  background: var(--accent);
  color: #fff7f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 24px -10px rgba(193, 78, 99, .6);
}
.btn-accent:hover { background: #ad4257; transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: rgba(193, 78, 99, .28);
}
.btn-secondary:hover { background: var(--accent-soft); border-color: var(--accent); }

.btn-danger { background: var(--bad-soft); color: var(--bad); }
.btn-danger:hover { background: #562a22; }

.btn-ghost { background: transparent; color: var(--text); padding: 8px 14px; }
.btn-ghost:hover { background: var(--primary-soft); }

.btn-block { width: 100%; }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-sm { padding: 7px 15px; font-size: 13.5px; }
.btn svg { width: 18px; height: 18px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Forms ---------- */

.field { margin-bottom: 15px; }

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.field .hint { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.req { color: var(--bad); }

.input, select.input, textarea.input {
  width: 100%;
  padding: 11px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(228, 121, 143, .2);
}
textarea.input { resize: vertical; min-height: 76px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
}

/* ---------- Chips (selectable pills) ---------- */

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  border-radius: 999px;
  padding: 8px 17px;
  font-size: 14px;
  font-weight: 600;
  transition: background .25s var(--ease-out), color .25s var(--ease-out),
              border-color .25s var(--ease-out), transform .25s var(--ease-spring),
              box-shadow .25s var(--ease-out);
}
.chip:hover { border-color: var(--text-3); color: var(--text); transform: translateY(-1px); }
.chip.selected {
  border-color: var(--accent);
  background: linear-gradient(135deg, #c14e63, var(--accent));
  color: #fff7f5;
  box-shadow: 0 8px 18px -8px rgba(228, 121, 143, .55);
}
@keyframes chipPop { 50% { transform: scale(1.06); } }
.chip.selected { animation: chipPop .28s var(--ease-spring); }

/* ---------- Home hero ---------- */

.hero-cta {
  position: relative;
  overflow: hidden;
  color: #fbeef0;
  border: 1px solid rgba(228, 121, 143, .3);
  border-radius: 24px;
  padding: 30px 26px;
  margin-bottom: 18px;
  background:
    radial-gradient(560px 300px at 88% -20%, rgba(193, 78, 99, .55), transparent 62%),
    radial-gradient(420px 260px at -8% 118%, rgba(193, 78, 99, .25), transparent 58%),
    #23131a;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.hero-cta h2 {
  color: #fdf3f2;
  font-size: 26px;
  margin-bottom: 8px;
  text-wrap: balance;
}
.hero-cta p { color: rgba(251, 238, 240, .72); font-size: 15px; margin-bottom: 20px; max-width: 46ch; }
.hero-cta .btn { background: #fbeef0; color: #2b1a1e; border: none; box-shadow: 0 10px 26px -10px rgba(0, 0, 0, .55); }
.hero-cta .btn:hover { background: #fff; transform: translateY(-1px); }

/* slow rose glow drifting in the hero */
.hero-cta::before {
  content: '';
  position: absolute;
  width: 260px; height: 260px;
  top: -110px; right: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 121 ,143, .38), transparent 68%);
  pointer-events: none;
  animation: drift 9s ease-in-out infinite;
}
.hero-cta::after {
  content: '';
  position: absolute;
  width: 150px; height: 150px;
  bottom: -70px; right: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 121, 143, .2), transparent 70%);
  pointer-events: none;
  animation: drift 12s ease-in-out infinite reverse;
}
@keyframes drift { 50% { transform: translate(-16px, 12px) scale(1.12); } }
.hero-cta > * { position: relative; z-index: 1; }

/* faint floating hearts in the hero */
.hero-hearts { position: absolute; inset: 0; pointer-events: none; }
.hero-hearts span {
  position: absolute;
  font-size: 14px;
  opacity: 0;
  animation: heartFloat 7s ease-in infinite;
}
.hero-hearts span:nth-child(1) { left: 12%; bottom: -8px; animation-delay: 0s; }
.hero-hearts span:nth-child(2) { left: 46%; bottom: -8px; animation-delay: 2.4s; font-size: 11px; }
.hero-hearts span:nth-child(3) { left: 76%; bottom: -8px; animation-delay: 4.6s; font-size: 17px; }
@keyframes heartFloat {
  0%   { transform: translateY(0) rotate(-6deg); opacity: 0; }
  12%  { opacity: .5; }
  60%  { opacity: .25; }
  100% { transform: translateY(-150px) rotate(10deg); opacity: 0; }
}

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  display: block;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid rgba(228, 121, 143, .18);
  border-radius: var(--radius);
  box-shadow: var(--ring), inset 0 1px 0 rgba(255, 255, 255, .05);
  padding: 16px 14px;
  text-align: center;
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out);
}
.stat:hover { transform: translateY(-3px); border-color: rgba(193, 78, 99, .35); box-shadow: var(--shadow); }
.stat .num { color: var(--accent); }
.stat .num {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat .lbl { font-size: 11.5px; color: var(--text-3); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- List rows ---------- */

.row-list { display: flex; flex-direction: column; gap: 10px; }

.list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid rgba(228, 121, 143, .13);
  border-radius: var(--radius);
  padding: 13px 16px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out),
              border-color .3s var(--ease-out), background .3s var(--ease-out);
}
.list-row:hover { border-color: rgba(193, 78, 99, .35); }
.list-row[role="button"]:hover, a.list-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(150, 62, 85, .22);
}

.row-thumb {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--surface-2);
  overflow: hidden;
  flex-shrink: 0;
  display: grid; place-items: center;
  color: var(--text-3);
  font-size: 22px;
  box-shadow: inset 0 0 0 1px rgba(228, 121, 143, .12);
}
.row-thumb svg { width: 24px; height: 24px; }

.row-main { flex: 1; min-width: 0; }
/* display:block matters. These are <span>s, and overflow/text-overflow
   are ignored on non-replaced inline elements -- so the ellipsis these
   rules promise never actually happened and long titles ran straight
   out of the card on narrow screens. */
.row-main .title { display: block; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-main .sub { display: block; font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 6px;
  padding: 3px 9px;
  background: var(--accent-soft);
  color: var(--accent);
}

.price-pill {
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
  flex-shrink: 0;
  background: var(--primary-soft);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* gift rows on results / boutique */
.rec-row { color: var(--text); }
.rec-row .badge { flex-shrink: 0; }
.rec-arrow {
  color: var(--text-3);
  font-size: 15px;
  flex-shrink: 0;
  transition: transform .3s var(--ease-spring), color .3s var(--ease-out);
}
.rec-row:hover .rec-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* heart save toggle on a gift row */
.heart-btn {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  border-radius: 999px;
  display: grid; place-items: center;
  color: var(--text-3);
  transition: color .25s var(--ease-out), background .25s var(--ease-out), transform .25s var(--ease-spring);
}
.heart-btn:hover { background: var(--accent-soft); color: var(--accent); }
.heart-btn svg { width: 19px; height: 19px; }
.heart-btn.saved { color: var(--accent); }
@keyframes heartPop { 40% { transform: scale(1.35); } }
.heart-btn.saved svg { animation: heartPop .35s var(--ease-spring); }

/* "why this matches" — the personal line under a recommended gift */
.row-main .why {
  display: block;
  font-size: 12px;
  font-style: italic;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* "I gave this" toggle on a gift row */
.give-btn {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border: none;
  background: transparent;
  border-radius: 999px;
  display: grid; place-items: center;
  color: var(--text-3);
  transition: color .25s var(--ease-out), background .25s var(--ease-out), transform .25s var(--ease-spring);
}
.give-btn:hover { background: var(--good-soft); color: var(--good); }
.give-btn svg { width: 19px; height: 19px; }
.give-btn.given { color: var(--good); }
.give-btn.given svg { animation: heartPop .35s var(--ease-spring); }

.given-pill { background: var(--good-soft); color: var(--good); }

.disclosure {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  margin: 4px 0 22px;
}

/* small legal / meta links row */
.legal-line {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
  margin: 6px 0 20px;
}
.legal-line a { color: var(--accent); font-weight: 500; }

/* ---------- click stats (device-local) ---------- */

.stat-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.stat-bar-row .sb-name {
  flex: 0 0 46%;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-bar-row .sb-name .sb-brand { display: block; font-size: 11px; font-weight: 500; color: var(--text-3); }
.stat-bar-row .bar-track { flex: 1; }
.stat-bar-row .sb-n {
  flex: 0 0 34px;
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}

/* ---------- "let them answer" ---------- */

.ask-hero {
  text-align: center;
  padding: 10px 6px 4px;
}
.ask-hero .ask-emoji { font-size: 44px; margin-bottom: 10px; }
.ask-hero h2 { margin-bottom: 8px; }
.ask-hero p { color: var(--text-2); max-width: 46ch; margin: 0 auto 6px; }

.partner-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(120deg, var(--accent-soft), #351a22);
  border: 1px solid rgba(228, 121, 143, .25);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #f2c3cd;
}
.partner-banner button {
  border: none; background: transparent;
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

/* ---------- Quiz ---------- */

.quiz-progress {
  height: 5px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 22px;
}
.quiz-progress .fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #e07a90);
  transition: width .5s var(--ease-out);
}

.q-count {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--accent);
  margin-bottom: 8px;
}
.q-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.25;
  text-wrap: balance;
  margin-bottom: 6px;
}
.q-sub { color: var(--text-2); font-size: 14.5px; margin-bottom: 20px; }

.opt-list { display: flex; flex-direction: column; gap: 10px; }

.opt-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 550;
  color: var(--text);
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out),
              transform .25s var(--ease-spring), box-shadow .25s var(--ease-out);
}
.opt-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -12px rgba(193, 78, 99, .35);
}
.opt-card .opt-emoji {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 13px;
  background: var(--surface-2);
  display: grid; place-items: center;
  font-size: 20px;
}
.opt-card .opt-label { flex: 1; }
.opt-card .opt-note { display: block; font-size: 12.5px; font-weight: 450; color: var(--text-3); margin-top: 1px; }
.opt-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 12px 26px -12px rgba(193, 78, 99, .4);
}
.opt-card.selected .opt-emoji { background: var(--accent); }
@keyframes optPop { 50% { transform: scale(1.02); } }
.opt-card.selected { animation: optPop .3s var(--ease-spring); }

.opt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt-grid-2 .opt-card { flex-direction: column; text-align: center; gap: 8px; padding: 20px 14px; }
@media (max-width: 440px) { .opt-grid-2 { grid-template-columns: 1fr; } }

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

/* ---------- The reveal ceremony ---------- */

.ceremony {
  position: fixed;
  inset: 0;
  z-index: 500;
  background:
    radial-gradient(700px 420px at 76% 16%, rgba(193, 78, 99, .22), transparent 60%),
    rgba(26, 13, 18, .97);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .3s var(--ease-out);
  transition: opacity .5s var(--ease-out);
}
.ceremony.leaving { opacity: 0; pointer-events: none; }

.ceremony-inner { text-align: center; color: #fbeef0; }

.ceremony-heart {
  width: 74px; height: 74px;
  margin: 0 auto 24px;
  color: #e4798f;
  animation: heartbeat 1.15s ease-in-out infinite;
}
.ceremony-heart svg { width: 100%; height: 100%; filter: drop-shadow(0 0 22px rgba(228, 121, 143, .55)); }
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.14); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  56% { transform: scale(1); }
}

.ceremony-phrase {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  font-style: italic;
  color: rgba(251, 238, 240, .85);
}
.ceremony-phrase.swap { animation: phraseIn .45s var(--ease-out); }
@keyframes phraseIn { from { opacity: 0; transform: translateY(9px); } }

/* ---------- Result ---------- */

.result-card { position: relative; }

.stamp {
  position: absolute;
  top: 20px; right: 20px;
  z-index: 1;
  padding: 8px 14px;
  border: 2px solid var(--accent);
  border-radius: 9px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .2em;
  white-space: nowrap;
  transform: rotate(-8deg);
  opacity: .95;
  box-shadow: inset 0 0 0 1px rgba(228, 121, 143, .3), 0 0 18px rgba(228, 121, 143, .25);
  animation: stampIn .45s var(--ease-exit) 1.1s backwards;
  pointer-events: none;
}
@keyframes stampIn {
  from { transform: rotate(-8deg) scale(2.4); opacity: 0; }
  70%  { transform: rotate(-8deg) scale(.94); opacity: 1; }
}
@media (max-width: 520px) {
  .stamp { top: 12px; right: 12px; padding: 6px 10px; font-size: 9.5px; }
}

.persona-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.persona-emblem {
  width: 74px; height: 74px;
  flex-shrink: 0;
  border-radius: 24px;
  background:
    radial-gradient(120px 90px at 70% 0%, rgba(228, 121, 143, .55), transparent 70%),
    #3a1f28;
  border: 1px solid rgba(228, 121, 143, .35);
  color: var(--accent-soft);
  display: grid; place-items: center;
  font-size: 33px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 26px rgba(228, 121, 143, .25);
}

.persona-name {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-wrap: balance;
  line-height: 1.2;
}
.persona-line { color: var(--text-2); font-size: 14.5px; margin-top: 4px; max-width: 48ch; }

.match-bars { display: flex; flex-direction: column; gap: 12px; }
.match-bar .mb-head {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 5px;
}
.match-bar .mb-head .pct { color: var(--text-3); font-variant-numeric: tabular-nums; }
.bar-track {
  height: 7px;
  background: var(--surface-2);
  border-radius: 5px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--accent), #e07a90);
  animation: barGrow 1.1s var(--ease-out) both;
}
@keyframes barGrow { from { width: 0; } }

/* "their own words" note — a torn-paper quote */
.note-quote {
  position: relative;
  background: linear-gradient(120deg, var(--accent-soft), #33181f);
  border: 1px solid rgba(228, 121, 143, .22);
  border-radius: var(--radius-sm);
  padding: 15px 18px 15px 44px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15.5px;
  color: #f2c3cd;
}
.note-quote::before {
  content: '\201C';
  position: absolute;
  left: 15px; top: 8px;
  font-size: 34px;
  line-height: 1;
  color: var(--accent);
  font-style: normal;
}
.note-quote .note-src {
  display: block;
  margin-top: 5px;
  font-family: var(--font);
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
}

.reco-banner {
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 14.5px;
  font-weight: 500;
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.reco-banner.rose { background: var(--accent-soft); color: #f2c3cd; border: 1px solid rgba(228, 121, 143, .2); }
.reco-banner.good { background: var(--good-soft); color: #b6dcc2; border: 1px solid rgba(140, 201, 160, .2); }
.reco-banner svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 2px; }

/* ---------- Occasions ---------- */

.count-pill {
  flex-shrink: 0;
  text-align: center;
  min-width: 62px;
  border-radius: 14px;
  padding: 7px 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.count-pill .cp-num {
  display: block;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.count-pill .cp-lbl { display: block; font-size: 10px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.count-pill.today { background: var(--accent); color: #fff7f5; }

/* ---------- Empty states ---------- */

.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-2);
}
.empty svg { width: 46px; height: 46px; color: var(--text-3); margin: 0 auto 14px; }
.empty .empty-emoji { font-size: 40px; margin-bottom: 10px; }
.empty .empty-art {
  width: min(266px, 74%);
  height: auto;
  margin: 0 auto 20px;
  border-radius: 10px;
  filter: drop-shadow(0 20px 38px rgba(0, 0, 0, .5));
  animation: keepsakeIn .7s var(--ease-out) both;
}
.empty h3 { margin-bottom: 6px; color: var(--text); }
.empty p { font-size: 14px; margin-bottom: 18px; }

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 4, 6, .62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: fadeIn .25s var(--ease-out);
}
.modal {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(228, 121, 143, .25);
  border-radius: 22px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .06);
  width: 100%;
  max-width: 430px;
  padding: 26px;
  animation: modalIn .4s var(--ease-spring);
}
.modal h3 { margin-bottom: 8px; font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.modal p { color: var(--text-2); font-size: 14.5px; margin-bottom: 20px; }
.modal .btn-row { justify-content: flex-end; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Toast ---------- */

#toast-root {
  position: fixed;
  bottom: calc(var(--nav-h) + 18px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
@media (min-width: 960px) { #toast-root { bottom: 28px; } }

.toast {
  background: #fbeef0;
  color: #2b1a1e;
  font-size: 14px;
  font-weight: 550;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(228, 121, 143, .3);
  max-width: 90vw;
  animation: slideUp .35s var(--ease-spring);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
}
.toast.err { background: #b23b2e; color: #fff5f2; }
.toast.ok  { background: #4a7c59; color: #f0f7f1; }
.toast.leaving { opacity: 0; transform: translateY(8px); }

/* ---------- Promo / teaser cards ---------- */

.promo-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(120deg, var(--primary-soft), var(--accent-soft));
  border: 1px solid rgba(228, 121, 143, .2);
  border-radius: var(--radius);
  box-shadow: var(--ring);
  padding: 17px 19px;
  margin-bottom: 18px;
}
.promo-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #c14e63, var(--accent));
  color: #fff7f5;
  display: grid; place-items: center;
  font-size: 19px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .25), 0 8px 16px -6px rgba(0, 0, 0, .5);
}
.promo-icon svg { width: 20px; height: 20px; }
.promo-body { flex: 1; min-width: 140px; }
.promo-title { font-weight: 650; font-size: 14.5px; }
.promo-text { font-size: 13px; color: var(--text-2); margin-top: 2px; }
.soon-tag {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--surface);
  color: var(--accent);
  border-radius: 999px;
  padding: 5px 11px;
  box-shadow: var(--ring);
}
@media (max-width: 480px) {
  .promo-card { flex-wrap: wrap; }
  .promo-card .btn { width: 100%; }
}

/* ---------- Help page ---------- */

.help-row {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.help-row:last-child { margin-bottom: 0; }

.num-dot {
  width: 27px; height: 27px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--text);
  color: var(--accent-soft);
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.num-dot svg { width: 14px; height: 14px; }

.faq details {
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  box-shadow: var(--ring);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq summary {
  padding: 13px 17px;
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  font-size: 19px;
  color: var(--accent);
  font-weight: 500;
  transition: transform .3s var(--ease-spring);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 17px 15px; font-size: 14px; color: var(--text-2); }

/* ---------- Memories (photo album) ---------- */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.memory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 540px) { .memory-grid { grid-template-columns: 1fr; } }

.memory-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  border: 1px solid rgba(228, 121, 143, .18);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), #26131a);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out);
}
.memory-card:hover {
  transform: translateY(-3px);
  border-color: rgba(228, 121, 143, .4);
  box-shadow: var(--shadow-lg);
}

.mc-photo {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: #1a0d12;
  overflow: hidden;
}
.mc-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.memory-card:hover .mc-photo img { transform: scale(1.04); }

.mc-anniv {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #fff7f5;
  background: linear-gradient(135deg, #c14e63, var(--accent));
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .6);
}

.mc-body { padding: 13px 15px 15px; }
.mc-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16.5px;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.mc-date {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-2);
  margin-top: 3px;
}
.mc-msg {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.5;
}

/* the photo picker inside the editor modal */
.photo-drop {
  display: block;
  cursor: pointer;
  border: 1.5px dashed rgba(228, 121, 143, .4);
  border-radius: var(--radius-sm);
  background: rgba(228, 121, 143, .06);
  overflow: hidden;
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out);
}
.photo-drop:hover { border-color: var(--accent); background: rgba(228, 121, 143, .1); }
.pd-inner {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-3);
  padding: 18px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 500;
}
.pd-inner svg { width: 34px; height: 34px; color: var(--accent-2); }
.pd-inner img { width: 100%; max-height: 300px; object-fit: cover; border-radius: 8px; }

/* the memory viewer modal */
.memory-modal { max-width: 500px; padding: 0; overflow: hidden; }
.memory-view { display: flex; flex-direction: column; }
.mv-photo { background: #17090d; }
.mv-photo img { width: 100%; max-height: 62vh; object-fit: contain; display: block; }
.mv-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 18px 20px 0;
}
.mv-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  margin: 6px 20px 0;
}
.mv-msg {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 12px 20px 0;
  white-space: pre-wrap;
}
.memory-view .btn-row { margin: 18px 20px 20px; }
.memory-view .btn-block { margin-left: 20px; margin-right: 20px; width: calc(100% - 40px); }

/* "On this day" card on Home */
.onthisday {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 12px 15px;
  margin-bottom: 18px;
  border: 1px solid rgba(228, 121, 143, .35);
  border-radius: var(--radius);
  background:
    radial-gradient(360px 140px at 100% 0%, rgba(228, 121, 143, .2), transparent 70%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out);
}
.onthisday:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.otd-photo {
  width: 60px; height: 60px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .6);
}
.otd-photo img { width: 100%; height: 100%; object-fit: cover; }
.otd-body { flex: 1; min-width: 0; }
.otd-kicker {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}
.otd-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.otd-sub {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Nostalgia — the "keepsake" layer
   A warmer, amber-lit pocket inside the wine. Old photographs,
   a line you half-remember, the ache that makes a gift mean
   something. Sits on Home; themes over both palettes.
   ============================================================ */

.keepsake {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 26px;
  margin-bottom: 18px;
  border: 1px solid rgba(224, 150, 100, .28);
  background:
    radial-gradient(520px 300px at 12% -10%, rgba(240, 176, 111, .22), transparent 60%),
    radial-gradient(480px 320px at 108% 120%, rgba(193, 78, 99, .28), transparent 62%),
    linear-gradient(170deg, #2a141a, #1d0f14);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 236, 214, .07);
}
/* a warm dust settling over the whole keepsake */
.keepsake::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(700px 200px at 50% 0%, rgba(255, 214, 160, .10), transparent 70%);
}

.keepsake-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}
@media (min-width: 620px) {
  .keepsake-grid { grid-template-columns: 200px minmax(0, 1fr); gap: 26px; }
}

/* the photograph — a real Polaroid, taped to the page, tilted */
.polaroid {
  position: relative;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 210px;
  background: #fbf3ea;
  padding: 11px 11px 32px;
  border-radius: 4px;
  transform: rotate(-3.2deg);
  box-shadow: 0 24px 52px -20px rgba(0, 0, 0, .75), 0 2px 6px rgba(0, 0, 0, .35);
  transition: transform .5s var(--ease-spring);
}
.keepsake:hover .polaroid { transform: rotate(-1.4deg) translateY(-3px); }
.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 560;
  object-fit: cover;
  border-radius: 2px;
  filter: contrast(1.03) saturate(1.06);
}
/* a strip of tape at the top */
.polaroid::before {
  content: '';
  position: absolute;
  top: -12px; left: 50%;
  width: 84px; height: 24px;
  transform: translateX(-50%) rotate(-4deg);
  background: rgba(230, 205, 150, .35);
  border: 1px solid rgba(255, 240, 200, .25);
  box-shadow: inset 0 0 8px rgba(255, 255, 255, .2);
}
.polaroid .cap {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  text-align: center;
  color: #8a5a34;
  font-size: 15px;
  margin-top: 9px;
}

.keepsake-copy { position: relative; min-width: 0; }
.keepsake-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #f0b06f;
  margin-bottom: 11px;
}
.keepsake-kicker::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #f0b06f;
  box-shadow: 0 0 10px rgba(240, 176, 111, .8);
}
.keepsake-copy h2 {
  color: #fdf1e6;
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 12px;
  text-wrap: balance;
}
.keepsake-copy h2 em { color: #f2b07a; font-style: italic; }

/* the line you half-remember — fades between memories */
.keepsake-line {
  position: relative;
  min-height: 3.2em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  color: rgba(251, 232, 214, .82);
  padding-left: 15px;
  border-left: 2px solid rgba(240, 176, 111, .5);
  margin-bottom: 18px;
}
.keepsake-line.swap { animation: keepsakeIn .6s var(--ease-out); }
@keyframes keepsakeIn {
  from { opacity: 0; transform: translateY(8px); filter: blur(3px); }
  to   { opacity: 1; transform: translateY(0);  filter: blur(0); }
}

.keepsake-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, #e0966a, #c14e63);
  color: #fff6ee;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: .01em;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 12px 26px -12px rgba(193, 78, 99, .6);
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out);
}
.keepsake-cta:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 18px 34px -12px rgba(193, 78, 99, .65); }
.keepsake-cta:active { transform: scale(.97); }
.keepsake-cta svg { width: 16px; height: 16px; transition: transform .3s var(--ease-spring); }
.keepsake-cta:hover svg { transform: translateX(3px); }

@media (max-width: 430px) {
  .keepsake { padding: 22px 20px; }
  .keepsake-copy h2 { font-size: 21px; }
  .keepsake-line { font-size: 15px; }
}

/* light-mode warmth for the keepsake */
:root[data-theme="light"] .keepsake {
  border-color: rgba(199, 122, 74, .3);
  background:
    radial-gradient(520px 300px at 12% -10%, rgba(240, 176, 111, .3), transparent 60%),
    radial-gradient(480px 320px at 108% 120%, rgba(228, 121, 143, .22), transparent 62%),
    linear-gradient(170deg, #fff3e9, #fce7dd);
}
:root[data-theme="light"] .keepsake-copy h2 { color: #5a2a20; }
:root[data-theme="light"] .keepsake-copy h2 em { color: #c56a3a; }
:root[data-theme="light"] .keepsake-kicker { color: #bf6b34; }
:root[data-theme="light"] .keepsake-kicker::before { background: #bf6b34; }
:root[data-theme="light"] .keepsake-line { color: #7a4a38; border-left-color: rgba(199, 122, 74, .55); }

/* ---------- Utility ---------- */

.divider { height: 1px; background: var(--border); margin: 18px 0; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }

/* ============================================================
   Motion
   ============================================================ */

/* views + cards drift up out of a light blur, staggered */
@keyframes viewIn {
  from { opacity: 0; transform: translateY(16px); filter: blur(5px); }
  to   { opacity: 1; transform: translateY(0);   filter: blur(0); }
}
#view > * { animation: viewIn .65s var(--ease-out) backwards; }
#view > *:nth-child(2) { animation-delay: .07s; }
#view > *:nth-child(3) { animation-delay: .14s; }
#view > *:nth-child(4) { animation-delay: .21s; }
#view > *:nth-child(5) { animation-delay: .28s; }
#view > *:nth-child(n+6) { animation-delay: .35s; }

/* nav icons nudge when active */
#mainnav a svg { transition: transform .3s var(--ease-spring); }
#mainnav a.active svg { transform: translateY(-1px) scale(1.1); }

/* ============================================================
   Entry splash — the love-letter curtain
   ============================================================ */

#splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  background:
    radial-gradient(900px 520px at 78% 12%, rgba(193, 78, 99, .26), transparent 60%),
    radial-gradient(640px 420px at 10% 96%, rgba(193, 78, 99, .12), transparent 55%),
    #1a0d12;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: inset(0 0 0 0);
  /* Was a 3.6s hold plus a 0.9s release — 4.5 seconds staring at a
     static logo before the app was usable, which reads as a hang.
     Build-in lands ~0.7s, brief hold, gone by ~1.6s. */
  animation: splashOut .55s cubic-bezier(.65, 0, .35, 1) 1.05s forwards;
}

.splash-inner {
  text-align: center;
  color: #fbeef0;
  animation: splashInnerOut .5s cubic-bezier(.65, 0, .35, 1) 1.0s forwards;
}

/* the double-bezel monogram: shell + core */
.splash-mark {
  position: relative;
  width: 92px; height: 92px;
  margin: 0 auto 26px;
  border-radius: 30px;
  background: rgba(251, 238, 240, .07);
  box-shadow: inset 0 0 0 1px rgba(251, 238, 240, .12);
  display: grid; place-items: center;
  animation: splashPop .5s var(--ease-spring) both;
}
.splash-mark svg {
  width: 66px; height: 66px;
  padding: 15px;
  border-radius: 22px;
  background: #fbeef0;
  color: #c14e63;
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .8);
}
.splash-mark img {
  width: 66px; height: 66px;
  border-radius: 20px;
  display: block;
  box-shadow: 0 18px 44px -12px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .5);
}

/* one slow rose halo breathing outward — a heartbeat */
.splash-mark::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 30px;
  border: 1px solid rgba(228, 121, 143, .65);
  animation: ringOut 1.9s var(--ease-out) .5s infinite;
}
@keyframes ringOut {
  to { transform: scale(1.75); opacity: 0; }
}

/* wordmark — serif letters rise from a mask, one by one */
.splash-name {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.15;
  overflow: hidden;
}
.splash-name .l {
  display: inline-block;
  transform: translateY(110%);
  animation: letterRise .7s var(--ease-out) forwards;
  animation-delay: calc(.3s + var(--i) * .06s);
}
@keyframes letterRise { to { transform: translateY(0); } }

/* a rose ribbon drawing across */
.splash-line {
  width: 148px;
  height: 1px;
  margin: 18px auto 14px;
  background: linear-gradient(90deg, transparent, #e4798f 22%, #e4798f 78%, transparent);
  transform: scaleX(0);
  animation: lineDraw .9s var(--ease-out) .85s forwards;
}
@keyframes lineDraw { to { transform: scaleX(1); } }

.splash-tag {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(251, 238, 240, .55);
  opacity: 0;
  animation: splashRise .45s var(--ease-out) .3s forwards;
}

@keyframes splashPop { from { transform: scale(.5) rotate(-8deg); opacity: 0; } }
@keyframes splashRise { from { transform: translateY(12px); opacity: 0; } to { opacity: 1; } }

/* exit: the curtain lifts, content drifts up just ahead of it */
@keyframes splashOut { to { clip-path: inset(0 0 100% 0); } }
@keyframes splashInnerOut { to { transform: translateY(-56px); opacity: 0; } }

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

  /* splash: no motion, but still hold composed for ~2s, then a simple fade —
     reduced motion means less movement, not a shorter welcome */
  #splash {
    animation: splashFadeOnly .3s ease .6s forwards !important;
    animation-duration: .45s !important;
  }
  #splash .splash-inner,
  #splash .splash-mark,
  #splash .splash-name .l,
  #splash .splash-line,
  #splash .splash-tag {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  #splash .splash-mark::after { animation: none !important; opacity: 0 !important; }
}
@keyframes splashFadeOnly { to { opacity: 0; visibility: hidden; } }

/* ============================================================
   Monetisation layer — credits pill, ad slots, paywall,
   rewarded overlay, Pro card. Themes itself from the app's
   CSS variables (works on both the dark and light palettes).
   Buttons are self-contained here so they never depend on an
   app-specific .btn variant.
   ============================================================ */

.credit-pill { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600;
  padding:5px 11px; border-radius:999px; background:var(--accent-soft); color:var(--accent);
  border:1px solid color-mix(in srgb, var(--accent) 35%, transparent); letter-spacing:.01em; }
.credit-pill.empty { background:transparent; color:var(--text-3); border-color:var(--border); }
.credit-pill.pro { background:var(--accent); color:#fff; border-color:transparent; }

/* ---- ad slots (free users only) ---- */
.ad-wrap { position:relative; margin:18px 0; border-radius:16px; overflow:hidden; }
.ad-tag { position:absolute; top:8px; left:8px; z-index:2; font-size:9.5px; font-weight:700; letter-spacing:.14em;
  text-transform:uppercase; color:var(--text-3); background:var(--bg); padding:2px 6px; border-radius:5px; opacity:.85; }
.ad-ph { display:flex; min-height:96px; border:1px dashed var(--border); background:
  repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--text-3) 6%, transparent) 14px 15px), var(--surface); cursor:pointer; }
.ad-ph-inner { margin:auto; text-align:center; color:var(--text-3); font-size:13px; line-height:1.5; }
.ad-ph-inner span { display:block; }
.ad-ph-sub { font-size:11px; opacity:.75; margin-top:3px; }

/* ---- shared modal scrim ---- */
.paywall-scrim, .rewarded-scrim { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center;
  padding:18px; background:color-mix(in srgb, var(--bg) 78%, #000 40%); backdrop-filter:blur(6px);
  animation:pw-in .22s ease; }
.paywall-scrim.leaving, .rewarded-scrim.leaving { animation:pw-out .2s ease forwards; }
@keyframes pw-in { from{opacity:0} to{opacity:1} }
@keyframes pw-out { to{opacity:0} }
body.modal-open { overflow:hidden; }

/* ---- paywall ---- */
.paywall { position:relative; width:100%; max-width:390px; max-height:92vh; overflow:auto; border-radius:22px;
  background:var(--surface); border:1px solid var(--border); box-shadow:0 24px 70px rgba(0,0,0,.5);
  padding:26px 22px 18px; animation:pw-rise .28s cubic-bezier(.2,.8,.2,1); }
@keyframes pw-rise { from{transform:translateY(14px) scale(.98); opacity:0} to{transform:none; opacity:1} }
.paywall-x { position:absolute; top:12px; right:14px; width:32px; height:32px; border:none; border-radius:50%;
  background:var(--surface-2); color:var(--text-2); font-size:20px; line-height:1; cursor:pointer; }
.paywall-top { text-align:center; margin-bottom:16px; }
.paywall-emoji { font-size:34px; margin-bottom:6px; }
.paywall-top h3 { margin:0 0 6px; font-size:19px; }
.paywall .muted { color:var(--text-2); font-size:13.5px; line-height:1.55; }

.paywall-or { display:flex; align-items:center; gap:12px; color:var(--text-3); font-size:12px; margin:16px 2px; }
.paywall-or::before, .paywall-or::after { content:''; height:1px; flex:1; background:var(--border); }

.paywall-pro { border:1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); border-radius:16px; padding:15px 15px 16px;
  background:color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.pro-head { display:flex; align-items:baseline; justify-content:space-between; margin-bottom:10px; }
.pro-head strong, .pro-card .pro-head h3 { font-size:16px; }
.pro-price { font-size:22px; font-weight:700; color:var(--accent); }
.pro-price span { font-size:12px; font-weight:500; color:var(--text-2); }
.pro-perks { list-style:none; margin:0 0 14px; padding:0; }
.pro-perks li { position:relative; padding:5px 0 5px 24px; font-size:13.5px; color:var(--text); }
.pro-perks li::before { content:'✓'; position:absolute; left:2px; color:var(--accent); font-weight:800; }
.paywall-fine { text-align:center; color:var(--text-3); font-size:11.5px; margin:12px 0 2px; }
.paywall-fine code { font-size:11px; }

/* self-contained buttons for the monetisation UI */
.paywall .btn, .pro-card .btn, .paywall-watch { font-family:inherit; }
.btn.btn-accent, .paywall .btn-accent, .pro-card .btn-accent { background:var(--accent); color:#fff; border:none; }
.btn.btn-ghost, .paywall .btn-ghost, .pro-card .btn-ghost { background:transparent; color:var(--text-2); border:1px solid var(--border); }
.paywall-watch { width:100%; display:flex; align-items:center; justify-content:center; gap:9px;
  background:var(--surface-2); color:var(--text); border:1px solid var(--border); }
.paywall-watch .pw-play { display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px;
  border-radius:50%; background:var(--accent); color:#fff; font-size:10px; }
.paywall .btn, .pro-card .btn { width:100%; margin-top:8px; padding:13px 18px; border-radius:13px; font-weight:600; font-size:15px; cursor:pointer; }

/* ---- rewarded overlay ---- */
.rewarded { width:100%; max-width:340px; border-radius:20px; background:var(--surface); border:1px solid var(--border);
  padding:26px 22px; text-align:center; position:relative; }
.rw-badge { position:absolute; top:12px; left:14px; font-size:9.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
  color:var(--text-3); border:1px solid var(--border); padding:2px 6px; border-radius:5px; }
.rw-spin { width:38px; height:38px; margin:6px auto 14px; border-radius:50%; border:3px solid var(--border);
  border-top-color:var(--accent); animation:rw-spin 0.9s linear infinite; }
@keyframes rw-spin { to{transform:rotate(360deg)} }
.rw-title { font-size:15px; font-weight:600; }
.rw-count { font-size:30px; font-weight:800; color:var(--accent); margin:8px 0 4px; font-variant-numeric:tabular-nums; }
.rw-hint { font-size:11.5px; color:var(--text-3); line-height:1.5; }
.rw-skip { margin-top:16px; width:100%; padding:12px; border-radius:12px; border:1px solid var(--border);
  background:var(--surface-2); color:var(--text-3); font-weight:600; font-size:14px; cursor:not-allowed; }
.rw-skip.ready { background:var(--accent); color:#fff; border-color:transparent; cursor:pointer; }

/* ---- settings Pro card ---- */
.pro-card { }
.pro-card.is-pro { border-color:color-mix(in srgb, var(--accent) 50%, var(--border)); }
.pro-badge { display:inline-block; font-size:12px; font-weight:700; color:#fff; background:var(--accent);
  padding:4px 10px; border-radius:999px; margin-bottom:8px; }

/* ===== LIGHT MODE (default is dark) ===== */
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body { transition: background .3s ease, color .3s ease; }
:root[data-theme="light"] {
  --bg:#fff5f6; --surface:#ffffff; --surface-2:#fbe7ec; --border:#f1d4dc;
  --text:#2a1218; --text-2:#7d5560; --text-3:#a98793;
  --primary:#2a1218; --primary-dark:#000000; --primary-soft:#fbe1e6;
  --accent:#c14e63; --accent-2:#e0879a; --accent-soft:#fbe1e6;
  --good:#4a7c59; --good-soft:#e9f0e7; --warn:#b7791f; --warn-soft:#f7eedc;
  --bad:#c0392b; --bad-soft:#f8e2de; --info:#5b6b8c; --info-soft:#e9edf4;
  --shadow:0 1px 2px rgba(120,50,70,.05),0 12px 32px -14px rgba(120,50,70,.18);
  --shadow-lg:0 24px 70px -18px rgba(120,50,70,.3);
  --ring:0 0 0 1px rgba(193,78,99,.08);
}
html[data-theme="light"] #topbar { background: rgba(255,245,246,.8); }
html[data-theme="light"] #mainnav { background: rgba(255,245,246,.9); }
html[data-theme="light"] .toast { background:#2a1218; color:#fff5f6; }
html[data-theme="light"] #splash { background: radial-gradient(900px 540px at 78% 12%, rgba(228,121,143,.18), transparent 60%), #fff5f6; }

.theme-seg { display:inline-flex; gap:4px; background:var(--surface-2); padding:4px; border-radius:999px; }
.theme-seg button { font:inherit; font-size:13px; font-weight:600; border:none; background:transparent; color:var(--text-2,var(--muted)); padding:7px 16px; border-radius:999px; cursor:pointer; }
.theme-seg button.on { background:var(--surface); color:var(--text); box-shadow:0 1px 3px rgba(0,0,0,.22); }
html[data-theme="light"] body {
  background:
    radial-gradient(1100px 700px at 85% -12%, rgba(228,121,143,.12), transparent 62%),
    radial-gradient(1000px 780px at 52% 118%, rgba(228,121,143,.10), transparent 62%),
    linear-gradient(180deg, #fff5f6, #fdecef);
  background-attachment: fixed;
}

/* ============================================================
   The daily layer — today card, weekly card, on-this-day, hints.
   Added when home was reordered by frequency (js/together.js,
   js/wishlist.js). Uses rgba + the rose accent so it works
   against either theme, matching weekly.js's approach.
   ============================================================ */

/* ---- today ---- */
.today-card {
  background: linear-gradient(160deg, rgba(224,96,127,.10), rgba(224,96,127,.03));
  border: 1px solid rgba(224,96,127,.22);
  border-radius: 20px; padding: 16px 18px; margin-bottom: 14px;
}
.today-card.is-done { background: rgba(127,127,127,.06); border-color: rgba(127,127,127,.18); }
.today-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.today-kicker { font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; opacity: .6; font-weight: 600; }
.today-streaks { display: flex; gap: 6px; }
.mini-streak {
  font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: rgba(224,96,127,.15); color: #e0607f;
}
.today-body { display: flex; gap: 12px; align-items: flex-start; }
.today-emoji { font-size: 1.5rem; line-height: 1.2; flex: none; }
.today-text { margin: 0; line-height: 1.45; font-weight: 500; }
.today-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.today-note { margin-top: 10px; }
.today-note .btn { margin-top: 8px; }
.today-done { margin-top: 10px; font-weight: 600; color: #3fae7a; }

/* ---- the weekly card ---- */
.weekly-card {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px; margin-bottom: 14px;
  border-radius: 20px; text-decoration: none; color: inherit;
  background: rgba(127,127,127,.07);
  border: 1px solid rgba(127,127,127,.16);
  transition: border-color .18s ease, transform .12s ease;
}
.weekly-card:hover { border-color: rgba(224,96,127,.45); }
.weekly-card:active { transform: scale(.995); }
.weekly-card.answered { border-color: rgba(63,174,122,.4); background: rgba(63,174,122,.07); }
.wc-left { flex: none; }
.wc-emoji {
  display: grid; place-items: center; width: 46px; height: 46px;
  font-size: 1.4rem; border-radius: 14px; background: rgba(224,96,127,.14);
}
.wc-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.wc-kicker { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; opacity: .6; font-weight: 600; }
.wc-theme { font-size: 1.05rem; line-height: 1.2; }
.wc-sub { font-size: .84rem; opacity: .72; line-height: 1.35; }
.wc-risk { margin-top: 5px; font-size: .78rem; font-weight: 600; color: #e0607f; }

/* ---- on this day ---- */
.otd-card {
  display: flex; align-items: center; gap: 13px;
  padding: 12px 14px; margin-bottom: 14px;
  border-radius: 18px; text-decoration: none; color: inherit;
  background: rgba(127,127,127,.07); border: 1px solid rgba(127,127,127,.16);
}
.otd-card:hover { border-color: rgba(224,96,127,.4); }
.otd-photo { flex: none; width: 56px; height: 56px; border-radius: 13px; object-fit: cover; }
.otd-photo.ph { display: grid; place-items: center; font-size: 1.4rem; background: rgba(224,96,127,.13); }
.otd-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.otd-kicker { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #e0607f; font-weight: 700; }
.otd-msg { font-size: .84rem; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the gift pitch is still here, just no longer shouting first */
.hero-cta.hero-compact { padding-top: 22px; padding-bottom: 22px; }

/* ---- segmented toggle ---- */
.seg-toggle {
  display: flex; gap: 4px; padding: 4px; border-radius: 14px;
  background: rgba(127,127,127,.1);
}
.seg-toggle button {
  flex: 1; padding: 9px 10px; border: 0; border-radius: 11px; cursor: pointer;
  font: inherit; font-size: .85rem; font-weight: 600; color: inherit;
  background: transparent; transition: background .18s ease;
}
.seg-toggle button.active { background: rgba(224,96,127,.9); color: #fff; }

/* ---- hints ---- */
.hint-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid rgba(127,127,127,.14);
}
.hint-row:last-child { border-bottom: 0; }
.hint-row.got { opacity: .5; }
.hint-row.got .hint-main strong { text-decoration: line-through; }
.hint-tick {
  flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 8px; cursor: pointer;
  border: 1.5px solid rgba(127,127,127,.35); background: transparent;
  color: #3fae7a; font-weight: 700; line-height: 1;
}
.hint-tick.static { display: grid; place-items: center; color: #e0607f; border-color: rgba(224,96,127,.4); cursor: default; }
.hint-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hint-note { font-size: .84rem; opacity: .7; }
.hint-meta { display: flex; gap: 10px; align-items: center; font-size: .78rem; opacity: .8; flex-wrap: wrap; }
.hint-price { font-weight: 700; color: #e0607f; }
.hint-src {
  font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; background: rgba(224,96,127,.14); color: #e0607f;
}
/* Already-given gifts, when revealed, are visibly de-emphasised so
   they can never be mistaken for a fresh suggestion. */
.given-list { opacity: .62; }
.given-list .row-main .title::after { content: ' · already given'; font-weight: 600; opacity: .7; font-size: 12px; }

/* ============================================================
   MOBILE PASS
   Everything below exists because the app is used on a phone
   far more than on a desktop, and several things only break
   at phone widths. Kept at the end of the file so it wins on
   specificity ties without touching the rules above.
   ============================================================ */

/* ---------- gift rows: stop the text column collapsing ----------
   .rec-row is a single flex line holding thumb + text + brand badge
   + price pill + up to two icon buttons + an arrow. Every one of
   those except the text is flex-shrink:0, and together they need
   ~310px before the text gets a pixel. On a 390px phone the text
   column computed to width:0 and its nowrap children spilled across
   the card and under the badges.

   Below 560px the row becomes two lines: thumb + text on the first,
   brand + price + actions on the second. Nothing is dropped, nothing
   overlaps, and the description finally gets to wrap. */
@media (max-width: 560px) {
  .rec-row {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 10px;
    column-gap: 12px;
    padding: 14px 14px;
  }
  .rec-row .row-thumb  { order: 1; width: 46px; height: 46px; font-size: 20px; }
  .rec-row .row-main   { order: 2; flex: 1 1 calc(100% - 58px); min-width: 0; }
  .rec-row .badge      { order: 3; }
  /* eats the leftover space on line two, pushing the buttons right */
  .rec-row .price-pill { order: 4; margin-right: auto; }
  .rec-row .give-btn   { order: 5; }
  .rec-row .heart-btn  { order: 6; }
  .rec-row .rec-arrow  { order: 7; align-self: center; }

  /* the whole point: let the copy breathe over multiple lines, but
     cap it so one wordy note can't push a row to half a screen */
  .rec-row .row-main .title,
  .rec-row .row-main .sub,
  .rec-row .row-main .why {
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
  }
  .rec-row .row-main .title { -webkit-line-clamp: 2; line-height: 1.3; }
  .rec-row .row-main .sub   { -webkit-line-clamp: 2; line-height: 1.4; margin-top: 2px; }
  .rec-row .row-main .why   { -webkit-line-clamp: 2; line-height: 1.35; margin-top: 4px; }

  /* icon buttons need a real touch target, not a 36px visual */
  .rec-row .give-btn,
  .rec-row .heart-btn { width: 40px; height: 40px; }
}

/* ---------- iOS: never zoom the page when a field is focused ----------
   Mobile Safari zooms into any input whose font-size is under 16px.
   Body copy is 15.5px, so every text field in the app triggered it —
   the page jumped and stayed zoomed after the keyboard closed. */
@media (max-width: 900px) {
  .input,
  select.input,
  textarea.input { font-size: 16px; }
}

/* ---------- touch behaviour ----------
   A tap on a phone leaves the hover state stuck on, so cards stayed
   lifted and highlighted after being pressed. Hover effects are now
   scoped to devices that actually have a pointer; touch gets a quick
   press state instead. */
@media (hover: none) {
  .list-row:hover,
  .list-row[role="button"]:hover,
  a.list-row:hover { transform: none; box-shadow: none; border-color: rgba(228, 121, 143, .13); }
  .opt-card:hover  { border-color: var(--border); }
  .chip:hover      { transform: none; border-color: var(--border); color: var(--text-2); }
  .heart-btn:hover,
  .give-btn:hover  { background: transparent; color: var(--text-3); }
  .heart-btn.saved:hover { color: var(--accent); }
  .give-btn.given:hover  { color: var(--good); }

  .list-row:active { transform: scale(.985); }
  .opt-card:active { transform: scale(.985); border-color: var(--accent); }
  .btn:active      { transform: scale(.97); }
}

/* Remove the grey flash Android/iOS paint over tapped elements —
   the :active states above are the intended feedback. */
a, button, .list-row, .opt-card, .chip, .heart-btn, .give-btn {
  -webkit-tap-highlight-color: transparent;
}

/* ---------- no sideways scroll, ever ----------
   A single overflowing child used to make the whole page pannable
   horizontally, which feels broken on a phone even when it is only
   a few pixels. */
html, body { overflow-x: hidden; max-width: 100%; }

/* Line two of a mobile gift row is brand + price + actions. A long
   brand ("YANKEE CANDLE") used to push the arrow onto a third line,
   leaving a dead gap under the row. The arrow is decorative — the
   whole row is already a link, and on touch there is no hover state
   for it to hint at — so it goes, and the badge is capped so no
   brand name can blow the line out again. */
@media (max-width: 560px) {
  .rec-row .rec-arrow { display: none; }
  .rec-row .badge {
    max-width: 45%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ---------- touch targets ----------
   Apple and Android both put the comfortable minimum around 44px.
   Several controls were well under it -- small buttons at 35px tall,
   theme toggles at 30px, and the privacy/terms links at 16px, which
   is a genuinely hard thing to hit with a thumb on a moving train.

   Height is raised via min-height rather than padding so nothing
   re-flows; the extra area is centred on the existing visual. */
@media (max-width: 900px) {
  .btn,
  .chip,
  .theme-seg button { min-height: 44px; }

  .btn-sm { min-height: 40px; padding: 9px 16px; }

  /* Legal links sit in a line of running text, so they get vertical
     padding and a negative margin: bigger hit area, same layout. */
  .legal-line { margin: 6px 0 16px; }
  .legal-line a {
    display: inline-block;
    padding: 12px 6px;
    margin: -12px 0;
  }

  /* Icon-only controls should be square and thumb-sized. */
  .heart-btn,
  .give-btn { min-width: 44px; min-height: 44px; }
}

/* The hints side-toggle sits outside .btn, so the rule above missed it. */
@media (max-width: 900px) {
  .seg-toggle button { min-height: 44px; }
}

/* .btn carries shape and typography but no colour — every colour lives
   on a variant (.btn-primary, .btn-accent, …). A button that forgets
   its variant therefore fell through to the browser's default control
   colour, which in dark mode is a muddy grey nothing like this palette;
   two on the home screen did exactly that. This is the safety net: a
   variant-less button now looks like a quiet secondary button rather
   than a bug. */
/* :where() keeps the whole selector at .btn's specificity (0,1,0).
   Written as a plain :not() chain it scored (0,6,0) and outranked
   scoped rules like `.hero-cta .btn`, repainting the hero button. */
.btn:not(:where([class*="btn-primary"], [class*="btn-accent"], [class*="btn-secondary"], [class*="btn-danger"], [class*="btn-ghost"])) {
  background: var(--surface);
  color: var(--text);
  border-color: rgba(193, 78, 99, .28);
}

/* ---------- the home shop window ----------
   A horizontally-scrolled shelf of real gifts, so a first-time
   visitor sees something they could actually buy before being asked
   to answer nineteen questions. Scroll-snap makes it feel native
   under a thumb rather than like a stray overflowing div. */
.gift-strip-card { padding-bottom: 14px; }

.gs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.gs-sub { margin: 2px 0 0; }
.gs-all {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--accent);
  white-space: nowrap;
  /* padded to a thumb-sized target, pulled back with a negative margin
     so the extra area does not push the heading around */
  padding: 12px 4px;
  margin: -12px -4px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.gift-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* bleed to the card edges so the shelf reads as continuing off-screen,
     which is what tells a thumb it can be swiped */
  margin: 0 -16px;
  padding: 2px 16px 6px;
}
.gift-strip::-webkit-scrollbar { display: none; }

.gs-card {
  flex: 0 0 138px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(228, 121, 143, .14);
  background: var(--surface-2);
  color: var(--text);
  transition: transform .25s var(--ease-spring), border-color .25s var(--ease-out);
}
.gs-thumb {
  width: 100%;
  /* a fixed, shallower band rather than a square: the square held a
     30px emoji in 148px of nothing and pushed the shelf off-screen */
  height: 76px;
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 34px;
  box-shadow: inset 0 0 0 1px rgba(228, 121, 143, .1);
}
.gs-name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.64em;      /* two lines, so the meta row stays aligned */
}
.gs-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}
.gs-brand {
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-price {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-3);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) {
  .gs-card:hover { transform: translateY(-3px); border-color: rgba(193, 78, 99, .4); }
}
@media (hover: none) {
  .gs-card:active { transform: scale(.97); }
}
