/* HAB-KER — Habsa (pink & black) + Aboubaker (navy & brown)
   Layout: one column, phone-first, max 760px wide on tablet, bottom tab bar. */
:root {
  --bg: #fff3f6;
  --surface: #ffffff;
  --surface-2: #ffe6ee;
  --ink: #1d1418;
  --ink-2: #6e5762;
  --line: #f3d2de;
  --her: #e0507f;
  --her-soft: #ffd6e3;
  --him: #1f2c5c;
  --him-soft: #dde4f8;
  --brown: #8a5a3b;
  --brown-soft: #f2e2d5;
  --on-accent: #ffffff;
  --ok: #2f8a5b;
  --no: #b5404f;
  --shadow: 0 8px 24px rgba(160, 40, 90, 0.10);
  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-hand: 'Caveat', 'Segoe Print', cursive;
  --r: 18px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110d10; --surface: #1c1519; --surface-2: #2a1d24; --ink: #fceef4; --ink-2: #c7aab8; --line: #3a2a33;
    --her: #ff7aa8; --her-soft: #4a1f31; --him: #a9bcf5; --him-soft: #1c2546; --brown: #e0aa82; --brown-soft: #3b2a1f;
    --on-accent: #1a0e13; --ok: #6fd39e; --no: #ff8a96; --shadow: 0 8px 24px rgba(0, 0, 0, 0.4); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #110d10; --surface: #1c1519; --surface-2: #2a1d24; --ink: #fceef4; --ink-2: #c7aab8; --line: #3a2a33;
  --her: #ff7aa8; --her-soft: #4a1f31; --him: #a9bcf5; --him-soft: #1c2546; --brown: #e0aa82; --brown-soft: #3b2a1f;
  --on-accent: #1a0e13; --ok: #6fd39e; --no: #ff8a96; --shadow: 0 8px 24px rgba(0, 0, 0, 0.4); color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
:focus-visible { outline: 3px solid var(--her); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: var(--her); }
.muted { color: var(--ink-2); } .small { font-size: .85rem; } .center { text-align: center; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- frame */
#app { max-width: 760px; margin: 0 auto; padding-inline: 16px; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.preview-bar { margin-inline: -16px; background: var(--ink); color: var(--bg); font-size: .78rem; text-align: center; padding: 4px 8px; letter-spacing: .02em; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; padding-block: 10px; margin-inline: -16px; padding-inline: 16px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.topbar > :last-child { justify-self: end; }
.topbar-logo { justify-self: center; font-family: var(--font-display); font-weight: 600; letter-spacing: .12em; font-size: .95rem; }
.topbar-logo span, .logo span { color: var(--her); margin-inline: .08em; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.back { font-size: 2rem; line-height: 1; color: var(--ink); padding-bottom: 4px; }
.icon-btn.sm { width: 30px; height: 30px; font-size: .85rem; flex: none; }
.view { display: flex; flex-direction: column; gap: 18px; padding-top: 4px; }

.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; gap: 2px; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); }
.bottom-nav button { position: relative; flex: 1; min-width: 0; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px; border-radius: 14px; font-size: .72rem; font-weight: 700; color: var(--ink-2); }
.nav-icon { font-size: 1.25rem; line-height: 1.2; font-family: var(--font-display); }
.bottom-nav button.on { color: var(--her); background: var(--her-soft); }
.badge { position: absolute; top: 2px; right: calc(50% - 22px); background: var(--her); color: var(--on-accent); font-style: normal; font-size: .68rem; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; }

/* ---------- people */
.who { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: .72rem; font-weight: 800; flex: none; }
.who-habsa { background: var(--her); color: var(--on-accent); }
.who-aboubaker { background: var(--him); color: var(--surface); }
.who-us { background: var(--brown); color: var(--surface); }
.topbar .who { width: 34px; height: 34px; font-size: .85rem; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 700; font-size: .95rem; transition: transform .1s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--her); color: var(--on-accent); border-color: var(--her); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--no); }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: .85rem; }
.btn:disabled { opacity: .55; }
.link { color: var(--her); font-weight: 700; font-size: .9rem; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.row-btns.center { justify-content: center; }

/* ---------- home */
.hero { text-align: center; padding-block: 14px 4px; display: grid; gap: 6px; justify-items: center; }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.logo { font-family: var(--font-display); font-size: clamp(2.6rem, 11vw, 3.6rem); letter-spacing: .06em; line-height: 1; }
.logo.big { font-size: clamp(3rem, 14vw, 4.2rem); }
.together { font-size: .95rem; color: var(--ink-2); }
.together b { color: var(--her); font-family: var(--font-display); font-size: 1.25rem; font-variant-numeric: tabular-nums; }

.alerts { display: grid; gap: 8px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r); font-size: 1.2rem; }
.alert span { font-size: .92rem; }
.alert.her { background: var(--her-soft); }
.alert.him { background: var(--him-soft); }

.qotd { display: grid; gap: 10px; padding: 22px; border-radius: 24px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.qotd::after { content: '?'; position: absolute; right: -6px; bottom: -40px; font-family: var(--font-display); font-size: 9rem; color: var(--her); opacity: .25; line-height: 1; }
.qotd .eyebrow { color: var(--her); }
.qotd-text { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.3; font-weight: 500; position: relative; z-index: 1; text-wrap: balance; }
:root[data-theme="dark"] .qotd { background: var(--surface-2); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .qotd { background: var(--surface-2); color: var(--ink); } }

.block { display: grid; gap: 10px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; }
.cd-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cd { display: grid; justify-items: start; gap: 0; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); }
.cd-emoji { font-size: 1.3rem; }
.cd-num { font-family: var(--font-display); font-size: 2rem; line-height: 1.1; color: var(--her); font-variant-numeric: tabular-nums; }
.cd-unit { font-size: .8rem; color: var(--ink-2); margin-top: -2px; }
.cd-title { font-weight: 700; font-size: .92rem; margin-top: 6px; line-height: 1.25; }
.cd-date { font-size: .78rem; color: var(--ink-2); }
.cd:nth-child(even) .cd-num { color: var(--him); }
.empty-cta { padding: 18px; border-radius: var(--r); border: 2px dashed var(--line); color: var(--ink-2); font-weight: 700; text-align: center; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: grid; gap: 2px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); }
.tile:nth-child(1) { background: var(--her-soft); border-color: transparent; }
.tile:nth-child(2) { background: var(--him-soft); border-color: transparent; }
.tile:nth-child(3) { background: var(--brown-soft); border-color: transparent; }
.tile-emoji { font-size: 1.6rem; }
.tile small, .list-card small, .plan-card small { color: var(--ink-2); font-size: .8rem; }

/* ---------- page head */
.page-head { display: grid; gap: 4px; padding-top: 6px; }

/* ---------- pills & tags */
.pill { display: inline-block; justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.qotd .pill { background: var(--her); color: var(--on-accent); }
.st-waiting { background: var(--surface-2); }
.st-yourturn { background: var(--him); color: var(--surface); }
.st-revealed { background: var(--her-soft); color: var(--her); }
.pill.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.pill.no { background: color-mix(in srgb, var(--no) 16%, transparent); color: var(--no); }
.tag { font-size: .7rem; font-weight: 800; padding: 2px 8px; border-radius: 6px; background: var(--brown-soft); color: var(--brown); white-space: nowrap; }

/* ---------- questions */
.score-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.score { padding: 12px 14px; border-radius: var(--r); display: grid; }
.score.her { background: var(--her-soft); } .score.him { background: var(--him-soft); }
.score small { font-size: .76rem; font-weight: 700; color: var(--ink-2); }
.score b { font-family: var(--font-display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.cat { display: grid; gap: 4px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); align-content: start; }
.cat-emoji { font-size: 1.6rem; }
.cat small { color: var(--ink-2); font-size: .82rem; }
.cat .count { font-size: .74rem; }
.cat-know { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.cat-know small { color: var(--her-soft); }
.cat-spicy { border-color: var(--her); }
.cat-future { background: var(--brown-soft); border-color: transparent; }
.progress { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.progress i { display: block; height: 100%; background: var(--her); border-radius: 3px; }
.cat-know .progress { background: color-mix(in srgb, var(--bg) 20%, transparent); }

.q-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.q-item { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); }
.q-item > span:first-child { flex: 1 1 220px; min-width: 0; }

.q-detail { display: grid; gap: 16px; }
.q-text { font-size: 1.6rem; font-weight: 500; }
.answer-form { display: grid; gap: 14px; }
.hint { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; }
.hint.him { background: var(--him-soft); }
.waiting { display: grid; gap: 10px; justify-items: center; text-align: center; padding: 20px 0; }
.seal { font-size: 3rem; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-6deg); } }
.waiting .answer-card { text-align: left; width: 100%; }
.reveal { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.answer-card { padding: 16px; border-radius: var(--r); display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.answer-card small { color: var(--ink-2); font-weight: 700; font-size: .78rem; }
.answer-card.habsa { background: var(--her-soft); }
.answer-card.aboubaker { background: var(--him-soft); }
.answer-card p { font-size: 1.05rem; }
.ac-head { display: flex; align-items: center; gap: 8px; }
.flip { animation: flipin .6s cubic-bezier(.2, .8, .3, 1.2) both; }
.flip:nth-child(2) { animation-delay: .15s; }
@keyframes flipin { from { transform: perspective(600px) rotateY(80deg); opacity: 0; } }
.sub { margin-top: 6px; }
.guesses { display: grid; gap: 10px; }
.guess { padding: 14px 16px; border-radius: var(--r); border: 1.5px dashed var(--line); display: grid; gap: 6px; }
.guess.habsa { border-color: var(--her); } .guess.aboubaker { border-color: var(--him); }
.guess small { color: var(--ink-2); font-weight: 700; font-size: .78rem; }
.judge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; }
.hist { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); }
.hist small { color: var(--ink-2); }
.hist-ans { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: .85rem; }
.hist-ans span { padding: 8px 10px; border-radius: 10px; min-width: 0; overflow-wrap: anywhere; }
.her-t { background: var(--her-soft); } .him-t { background: var(--him-soft); }

/* ---------- letters */
.letter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.letter { position: relative; display: grid; gap: 6px; align-content: start; padding: 18px; min-height: 150px; border-radius: 6px 22px 6px 22px; box-shadow: var(--shadow); }
.letter small { font-size: .74rem; font-weight: 700; opacity: .75; }
.letter b { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.letter-peek { font-family: var(--font-hand); font-size: 1.25rem; line-height: 1.2; opacity: .85; overflow-wrap: anywhere; }
.letter.unread::before { content: 'new'; position: absolute; top: -8px; left: 14px; background: var(--her); color: var(--on-accent); font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.pin { position: absolute; top: 8px; right: 10px; }
.paper-rose { background: var(--her-soft); color: var(--ink); }
.paper-navy { background: var(--him); color: #f5f1ea; }
.paper-cream { background: var(--brown-soft); color: var(--ink); }
.paper-noir { background: #1b1418; color: #ffd6e3; }
.letter-full { padding: 26px 22px; border-radius: 8px 28px 8px 28px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.letter-full small { font-size: .78rem; font-weight: 700; opacity: .75; }
.letter-full .eyebrow { color: inherit; opacity: .8; }
.letter-body { font-family: var(--font-hand); font-size: 1.55rem; line-height: 1.35; overflow-wrap: anywhere; }
.memory-full .letter-body { font-family: var(--font-body); font-size: 1.05rem; line-height: 1.6; }
.signature { font-family: var(--font-hand); font-size: 1.6rem; text-align: right; }
.envelope-wrap { display: grid; justify-items: center; text-align: center; gap: 12px; padding-top: 30px; }
.envelope { width: 160px; height: 110px; border-radius: 12px; display: grid; place-items: center; font-size: 3rem; box-shadow: var(--shadow); animation: bob 2.4s ease-in-out infinite; }
.paper-pick, .coupon-pick, .emoji-pick, .seg { display: flex; flex-wrap: wrap; gap: 8px; }
.paper-pick input, .coupon-pick input, .emoji-pick input, .seg input, .who-pick input { position: absolute; opacity: 0; pointer-events: none; }
.paper-pick span { display: inline-block; padding: 10px 16px; border-radius: 10px; font-weight: 700; border: 2px solid transparent; }
.paper-pick input:checked + span, .seg input:checked + span { border-color: var(--her); box-shadow: 0 0 0 2px var(--her-soft); }
.handwritten { font-family: var(--font-hand); font-size: 1.35rem !important; line-height: 1.3; }

/* ---------- forms */
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-weight: 800; font-size: .85rem; }
.field small { color: var(--ink-2); font-size: .78rem; }
.field.grow { flex: 1; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-size: 1rem; min-height: 46px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--her); box-shadow: 0 0 0 3px var(--her-soft); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-add { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.inline-add input:not(.num) { flex: 1 1 180px; width: auto; }
.inline-add .num { flex: 0 1 120px; width: auto; }
.inline-add select { flex: 0 1 160px; width: auto; }
.private-toggle { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.private-toggle input { width: 20px; height: 20px; accent-color: var(--her); }
.emoji-pick span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-size: 1.4rem; background: var(--surface-2); border: 2px solid transparent; }
.emoji-pick input:checked + span { border-color: var(--her); background: var(--her-soft); }
.seg span { display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: .88rem; border: 2px solid transparent; }
.coupon-pick span { display: inline-block; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; font-weight: 600; border: 2px solid transparent; }
.coupon-pick input:checked + span { border-color: var(--her); background: var(--her-soft); }

/* ---------- checklists */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); }
.checklist li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.checklist li.done > span, .checklist li.done .li-main span { text-decoration: line-through; color: var(--ink-2); }
.check { width: 28px; height: 28px; flex: none; border-radius: 9px; border: 2px solid var(--her); display: grid; place-items: center; font-weight: 900; color: var(--on-accent); font-size: .9rem; }
.done .check, .paid .check { background: var(--her); }
.li-main { flex: 1; min-width: 0; display: grid; overflow-wrap: anywhere; }
.li-main small { color: var(--ink-2); font-size: .8rem; }

/* ---------- tabs & chips */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); overflow-x: auto; }
.tabs button { flex: 1; padding: 9px 12px; border-radius: 999px; font-weight: 800; font-size: .86rem; color: var(--ink-2); white-space: nowrap; }
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.tab-body { display: grid; gap: 12px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-size: .84rem; font-weight: 700; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- wedding & home */
.money-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.money-row > div { padding: 12px 14px; border-radius: 14px; background: var(--her-soft); display: grid; }
.money-row.brown > div { background: var(--brown-soft); }
.money-row small { font-size: .74rem; font-weight: 800; color: var(--ink-2); }
.money-row b { font-family: var(--font-display); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.plan-card { display: grid; gap: 3px; align-content: start; padding: 10px 10px 14px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); }
.plan-cover, .item-img, .memory-img { aspect-ratio: 4 / 3; max-width: 100%; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: 2.4rem; margin-bottom: 6px; position: relative; }
.plan-card.room .plan-cover { background: var(--brown-soft); }
.plan-cover img, .item-img img, .memory-img img, .board-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
img.ready { opacity: 1 !important; }
.budget { width: 100%; border-collapse: collapse; }
.budget td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.budget td:first-child { width: 38px; } .budget td:last-child { width: 36px; }
.budget .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.budget tr.paid td:nth-child(2) { color: var(--ink-2); }
.details { display: grid; gap: 10px; }
.notes-box { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); overflow-wrap: anywhere; }
.upload { display: grid; justify-items: center; gap: 2px; padding: 20px; border-radius: var(--r); border: 2px dashed var(--her); background: var(--her-soft); text-align: center; cursor: pointer; font-weight: 800; color: var(--her); }
.upload small { color: var(--ink-2); font-weight: 600; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload.compact { padding: 12px; }
.board { columns: 2 160px; column-gap: 10px; }
.board-item { break-inside: avoid; margin: 0 0 10px; position: relative; }
.board-img { display: block; width: 100%; border-radius: 14px; overflow: hidden; background: var(--surface-2); min-height: 80px; }
.board-img img { height: auto; display: block; }
.board-item figcaption { font-size: .82rem; color: var(--ink-2); padding: 4px 2px; }
.loved { position: absolute; top: 8px; right: 8px; background: var(--her); color: var(--on-accent); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; }
.big-photo { width: 100%; border-radius: 14px; max-height: 60vh; object-fit: contain; background: var(--surface-2); }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.item-card { display: grid; gap: 3px; align-content: start; padding: 10px 10px 12px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); }
.item-card small { color: var(--ink-2); font-size: .8rem; }
.status-dream { background: var(--surface-2); }
.status-decided { background: var(--him-soft); color: var(--him); }
.status-bought { background: var(--brown-soft); color: var(--brown); }

/* ---------- more & lists */
.more-list { display: grid; gap: 8px; }
.more-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); }
.more-item > span:nth-child(2) { flex: 1; display: grid; }
.more-item small { color: var(--ink-2); font-size: .82rem; }
.chev { font-size: 1.6rem; color: var(--ink-2); }
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.list-card { display: grid; gap: 2px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); }
.list-card:nth-child(4n+1) { background: var(--her-soft); border-color: transparent; }
.list-card:nth-child(4n+2) { background: var(--him-soft); border-color: transparent; }

/* ---------- jar */
.jar-stage { display: grid; justify-items: center; gap: 14px; padding-block: 8px; }
.jar { position: relative; width: 170px; height: 210px; display: grid; justify-items: center; }
.jar-lid { width: 110px; height: 22px; border-radius: 8px 8px 4px 4px; background: var(--brown); z-index: 2; }
.jar-body { position: relative; width: 170px; height: 186px; margin-top: -2px; border-radius: 30px 30px 44px 44px; border: 4px solid color-mix(in srgb, var(--him) 55%, transparent); background: color-mix(in srgb, var(--him-soft) 60%, transparent); overflow: hidden; }
.jar-body i { position: absolute; left: var(--x); top: calc(30% + var(--y) * .6); width: 46px; height: 20px; border-radius: 4px; background: var(--her-soft); border: 1.5px solid var(--her); transform: rotate(var(--r)); }
.jar-body i:nth-child(3n) { background: var(--surface); }
.jar-body i:nth-child(4n) { background: var(--brown-soft); border-color: var(--brown); }
.jar-label { position: absolute; top: 70px; background: var(--ink); color: var(--bg); font-family: var(--font-display); font-weight: 600; font-size: .85rem; padding: 4px 12px; border-radius: 999px; transform: rotate(-4deg); z-index: 2; }
.jar.shaking { animation: shake .9s ease-in-out; }
@keyframes shake { 10%, 50%, 90% { transform: rotate(-12deg) translateY(-4px); } 30%, 70% { transform: rotate(12deg) translateY(-8px); } }
.jar-pick { width: 100%; display: grid; gap: 8px; text-align: center; padding: 20px; border-radius: 24px; background: var(--ink); color: var(--bg); animation: pop .4s cubic-bezier(.2, .8, .3, 1.3); }
.jar-pick small { color: var(--her-soft); font-weight: 800; }
.jar-pick b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; }
.jar-pick .btn:not(.primary) { background: transparent; color: inherit; border-color: color-mix(in srgb, var(--bg) 30%, transparent); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.idea-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.idea-list li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); }
.idea-list li > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .95rem; }
.idea-list li.done span { color: var(--ink-2); }
.idea-list small { color: var(--ink-2); font-size: .76rem; white-space: nowrap; }
.done-box summary { cursor: pointer; font-weight: 800; padding: 8px 0; }

/* ---------- coupons */
.coupon-list { display: grid; gap: 12px; }
.coupon { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; background: var(--surface); border: 2px dashed var(--her); position: relative; }
.coupon.aboubaker { border-color: var(--him); }
.coupon::before, .coupon::after { content: ''; position: absolute; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--bg); }
.coupon::before { left: -10px; } .coupon::after { right: -10px; }
.coupon-emoji { font-size: 2.2rem; }
.coupon-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.coupon-main small { color: var(--ink-2); font-size: .76rem; font-weight: 700; }
.coupon-main b { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; }
.coupon-main p { font-size: .88rem; color: var(--ink-2); }
.coupon.status-used { opacity: .55; }
.coupon.status-redeemed { background: var(--her-soft); }

/* ---------- memories */
.year { font-size: 1.6rem; color: var(--her); }
.timeline { display: grid; gap: 12px; border-left: 3px solid var(--her-soft); padding-left: 14px; }
.memory { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); }
.memory-img { margin: 0; aspect-ratio: 1; }
.count-badge { position: absolute; bottom: 6px; right: 6px; background: var(--ink); color: var(--bg); font-size: .72rem; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.memory-text { display: grid; gap: 2px; min-width: 0; }
.memory-text small { color: var(--ink-2); font-size: .78rem; }
.memory-text span { font-size: .86rem; color: var(--ink-2); overflow-wrap: anywhere; }
.memory-full { display: grid; gap: 12px; }
.memory-full > small { color: var(--ink-2); font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.gallery .board-img { aspect-ratio: 1; }
.gallery .board-img img { height: 100%; }

/* ---------- countdowns */
.cd-list { display: grid; gap: 8px; }
.cd-line { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); }
.cd-line .cd-emoji { font-size: 1.8rem; }
.cd-info { flex: 1; display: grid; min-width: 0; }
.cd-info small { color: var(--ink-2); font-size: .8rem; }
.cd-big { font-family: var(--font-display); font-size: 1.6rem; color: var(--her); text-align: right; display: grid; line-height: 1; font-variant-numeric: tabular-nums; }
.cd-big small { font-size: .72rem; color: var(--ink-2); font-family: var(--font-body); }
.cd-line.past { opacity: .6; } .cd-line.past .cd-big { font-size: 1rem; color: var(--ink-2); }

/* ---------- settings */
.set-block { display: grid; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line); }
.me-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- empty */
.empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 30px 20px; font-size: 2.4rem; color: var(--ink-2); }
.empty p { font-size: .95rem; max-width: 34ch; }
.empty.small { padding: 18px; font-size: 1.8rem; }

/* ---------- login */
.login-mode { padding-bottom: 0 !important; }
.login { min-height: 92vh; display: grid; align-content: center; justify-items: stretch; gap: 16px; max-width: 380px; margin: 0 auto; text-align: center; }
.login .field { text-align: left; }
.who-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.who-btn { display: grid; justify-items: center; gap: 6px; padding: 26px 10px; border-radius: 24px; font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.who-btn span { font-size: 2.4rem; }
.who-btn.her { background: var(--her-soft); color: var(--her); }
.who-btn.him { background: var(--him-soft); color: var(--him); }
.err { color: var(--no); font-weight: 700; font-size: .9rem; min-height: 1.2em; }

/* ---------- sheet */
#sheet { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
#sheet.open { pointer-events: auto; }
.sheet-back { position: absolute; inset: 0; background: rgba(20, 8, 14, .45); opacity: 0; transition: opacity .25s; }
#sheet.open .sheet-back { opacity: 1; }
.sheet-card { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; background: var(--bg); border-radius: 26px 26px 0 0; transform: translateY(100%); transition: transform .3s cubic-bezier(.2, .8, .3, 1); padding-bottom: env(safe-area-inset-bottom, 0px); }
.sheet-card.wide { max-width: 720px; }
#sheet.open .sheet-card { transform: none; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; }
.sheet-body { padding: 6px 18px 12px; overflow-y: auto; display: grid; gap: 14px; }
.sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 10px 18px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sheet-foot:empty { display: none; }
.sheet-foot .btn.primary { flex: 1 1 160px; }

/* ---------- toast */
.toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: .9rem; opacity: 0; transition: .25s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (min-width: 700px) { h1 { font-size: 2rem; } .q-text { font-size: 1.9rem; } }
.logo small { display: block; font-size: .32em; letter-spacing: .6em; margin-top: .25em; padding-left: .6em; color: var(--ink-2); font-weight: 600; }
.nudges { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
.nudges::-webkit-scrollbar { display: none; }
.nudge { flex: none; padding: 10px 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 700; font-size: .9rem; white-space: nowrap; transition: transform .15s, background .2s; }
.nudge:active { transform: scale(.95); }
.nudge.sent { background: var(--her); color: var(--on-accent); border-color: var(--her); }
.nudge-in { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r); background: var(--him-soft); animation: pop .4s ease-out; }
.nudge-in.habsa { background: var(--her-soft); }
.nudge-in span { display: grid; }
.nudge-in small { color: var(--ink-2); font-size: .78rem; }
.bottom-nav button > span:last-child { white-space: nowrap; }
@media (max-width: 400px) { .bottom-nav { gap: 0; padding-inline: 4px; } .bottom-nav button { font-size: .66rem; } }
.plan-grid, .item-grid, .list-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
