/* Matana. The idea: every person is wrapped in their own paper, and one gold ribbon ties the app together.
   Midnight ink + gold ribbon on warm paper. Serif (Frank Ruhl Libre) for names and numbers, Assistant for reading.
   Mobile first. Logical properties everywhere, so Hebrew (RTL) and English (LTR) share one stylesheet. */
:root {
  --ink: #1b1840;
  --ink-2: #4a4670;
  --ink-3: #85819f;
  --paper: #f7f4ec;
  --card: #ffffff;
  --line: #ece7da;
  --field: #ddd7c8;
  --gold: #ffb627;
  --gold-deep: #e79a00;
  --gold-soft: #fff1cf;
  --gold-ink: #7a5200;
  --rose: #d43d4b;
  --rose-soft: #fce7e9;
  --mint: #12694a;
  --mint-soft: #dbf4e8;
  --lilac: #eceafb;
  --link: #4a43c7;
  --shadow: 0 1px 2px rgba(27, 24, 64, 0.05), 0 10px 24px -14px rgba(27, 24, 64, 0.22);
  --shadow-lg: 0 2px 4px rgba(27, 24, 64, 0.06), 0 22px 40px -20px rgba(27, 24, 64, 0.4);
  --serif: 'Frank Ruhl Libre', 'David Libre', 'Times New Roman', serif;
  --sans: 'Assistant', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.45;
  padding-bottom: calc(112px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased;
}
body[data-screen='auth'] { padding-bottom: 28px; }
[hidden] { display: none !important; }
main { max-width: 560px; margin: 0 auto; padding: 6px 16px 24px; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 8px; }

/* ---------- type ---------- */
h1 { font-family: var(--serif); font-weight: 900; font-size: 33px; line-height: 1.12; margin: 2px 0 0; letter-spacing: -0.01em; }
h2 { font-family: var(--serif); font-weight: 700; font-size: 21px; line-height: 1.2; margin: 0; }
.eyebrow { margin: 0; font-size: 12.5px; font-weight: 800; letter-spacing: 0.05em; color: var(--ink-3); text-transform: uppercase; }
.lede { margin: -4px 0 14px; color: var(--ink-2); }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.center { text-align: center; justify-content: center; }
.grow { flex: 1; min-width: 0; }
.hint { display: flex; gap: 6px; align-items: flex-start; margin: 9px 4px 0; color: var(--ink-3); font-size: 13.5px; }
.hint .ic { margin-top: 2px; }

/* ---------- icons ---------- */
.ic { width: 22px; height: 22px; flex: none; }
.ic.sm { width: 16px; height: 16px; }
.ic.xl { width: 40px; height: 40px; }
.ic.muted { color: var(--ink-3); }
[dir='rtl'] .ic.dir { transform: scaleX(-1); }
.logo { display: block; border-radius: 24%; }

/* ---------- top bar + bottom dock ---------- */
#top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px;
  max-width: 560px; margin: 0 auto; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: rgba(247, 244, 236, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
body[data-screen='auth'] #top, body[data-screen='auth'] #tabs { display: none; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 900; font-size: 25px; line-height: 1; }
.lang-btn { min-width: 42px; height: 34px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--field); background: #fff; color: var(--ink); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
#tabs {
  position: fixed; z-index: 30; bottom: calc(12px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 24px), 440px); display: flex; gap: 2px; padding: 6px;
  background: var(--ink); border-radius: 26px; box-shadow: 0 16px 32px -12px rgba(27, 24, 64, 0.6);
}
#tabs:empty { display: none; }
#tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 20px; color: rgba(255, 255, 255, 0.66); text-decoration: none; font-size: 12px; font-weight: 700; transition: background 0.18s, color 0.18s; }
#tabs a.on { background: var(--gold); color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 50px; padding: 0 24px;
  border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-size: 16.5px; font-weight: 700;
  text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform 0.08s, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; }
.btn .ic { width: 18px; height: 18px; }
.btn.sm { min-height: 38px; padding: 0 15px; font-size: 14.5px; }
.btn.soft { background: var(--lilac); color: var(--ink); }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.mint { background: var(--mint-soft); color: var(--mint); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px #cdc8e2; }
.btn.danger { background: transparent; color: var(--rose); box-shadow: inset 0 0 0 1.5px #f1c3c8; }
.btn.wide { width: 100%; margin-top: 10px; }
.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: none; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; font: inherit; }
.icon-btn.quiet { color: #b3afc6; }
.icon-btn.solid { background: #fff; box-shadow: var(--shadow); }
.icon-btn.armed { width: auto; padding: 0 13px; border-radius: 999px; background: var(--rose-soft); color: var(--rose); font-size: 13.5px; font-weight: 800; }
.text-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 6px; border: 0; background: none; color: var(--link); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.text-btn.quiet { color: var(--ink-3); font-weight: 600; }
.text-btn.danger { color: var(--rose); }

/* ---------- chips, prices ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; background: #f1ede3; color: var(--ink-2); font-size: 13px; font-weight: 700; white-space: nowrap; text-decoration: none; }
.chip.hot { background: var(--rose-soft); color: var(--rose); }
.chip.gold { background: var(--gold-soft); color: var(--gold-ink); }
.chip.lilac { background: var(--lilac); color: var(--ink); }
.chip.gone { background: #ecebe8; color: #8d8a99; }
.chip.link { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--field); }
.price { font-weight: 800; font-size: 15.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- avatar: a photo, or their paper with an initial on a sticker ---------- */
.av { display: inline-grid; place-items: center; flex: none; width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px #fff, 0 6px 14px -6px rgba(27, 24, 64, 0.35); }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av b { display: grid; place-items: center; width: 60%; height: 60%; border-radius: 50%; background: #fff; color: var(--ink); font-family: var(--serif); font-weight: 900; font-size: calc(var(--s) * 0.34); line-height: 1; }

/* ---------- panels and rows ---------- */
.sec { margin-top: 28px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; min-height: 38px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 14px; }
.page-head h1 { margin: 0; }
.panel { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.panel.pad { padding: 16px 18px; margin-bottom: 12px; }
.panel h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; margin-bottom: 4px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.row:last-child { border-bottom: 0; }
.row b { display: block; font-weight: 700; overflow-wrap: anywhere; }
.row b a { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: underline; text-decoration-color: #cdc8e2; text-underline-offset: 3px; }
.row small { display: block; margin-top: 1px; color: var(--ink-3); font-size: 13.5px; }
.row .icon-btn { margin-inline-end: -8px; }
.dim { opacity: 0.55; }
.empty-row { margin: 0; padding: 18px 16px; color: var(--ink-3); font-size: 15.5px; }
.datebox { display: grid; place-content: center; flex: none; width: 48px; height: 52px; border-radius: 13px; background: var(--lilac); text-align: center; line-height: 1; }
.datebox b { font-family: var(--serif); font-weight: 900; font-size: 22px; }
.datebox small { margin-top: 4px; color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.year + .year { border-top: 1px solid var(--line); }
.year-tag { display: block; padding: 12px 16px 0; color: var(--ink-3); font-size: 12.5px; font-weight: 800; letter-spacing: 0.05em; }
.notes { margin: 12px 0 0; white-space: pre-wrap; line-height: 1.6; }
.nudge { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; border-radius: 20px; background: var(--lilac); color: var(--ink); text-decoration: none; }
.nudge b { display: block; font-weight: 800; }
.nudge small { display: block; color: var(--ink-2); font-size: 14px; }
.empty-state { text-align: center; padding: 44px 20px; color: var(--ink-2); }
.empty-state .ic.xl { box-sizing: content-box; padding: 18px; border-radius: 50%; background: var(--lilac); color: var(--ink); }
.empty-state h2 { margin: 16px 0 6px; font-size: 24px; color: var(--ink); }
.empty-state p { margin: 0 auto 16px; max-width: 34ch; }

/* ---------- the wrapped gift (home hero) ---------- */
.hello { margin: 6px 0 16px; }
.gift-hero { position: relative; display: block; min-height: 240px; border-radius: 30px; overflow: hidden; color: var(--ink); text-decoration: none; box-shadow: var(--shadow-lg); isolation: isolate; }
.gift-hero::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(155deg, rgba(255, 255, 255, 0.4), transparent 42%, rgba(27, 24, 64, 0.12)); }
.ribbon-v, .ribbon-h { position: absolute; z-index: 2; }
.ribbon-v { inset-block: 0; inset-inline-end: 86px; width: 22px; background: linear-gradient(90deg, #ffd466, var(--gold) 42%, var(--gold-deep)); }
.ribbon-h { inset-inline: 0; top: 46px; height: 22px; background: linear-gradient(180deg, #ffd466, var(--gold) 42%, var(--gold-deep)); }
.bow { position: absolute; z-index: 3; top: 42px; inset-inline-end: 82px; width: 30px; height: 30px; border-radius: 9px; background: var(--gold-deep); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 3px 6px rgba(27, 24, 64, 0.2); }
.bow::before, .bow::after { content: ''; position: absolute; bottom: 12px; width: 48px; height: 36px; border: 10px solid var(--gold); border-radius: 55% 55% 45% 45%; }
.bow::before { right: 20px; transform: rotate(-22deg); transform-origin: 100% 100%; }
.bow::after { left: 20px; transform: rotate(22deg); transform-origin: 0 100%; }
.tag { position: absolute; z-index: 4; inset-inline-start: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 2px; min-width: 190px; max-width: calc(100% - 56px); padding: 14px 18px 12px; border-radius: 18px; background: #fff; box-shadow: 0 14px 26px -10px rgba(27, 24, 64, 0.45); transform: rotate(-2deg); }
[dir='rtl'] .tag { transform: rotate(2deg); }
.tag-hole { position: absolute; top: 12px; inset-inline-end: 12px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 1px 2px rgba(27, 24, 64, 0.4); }
.tag-name { font-family: var(--serif); font-weight: 900; font-size: 31px; line-height: 1.1; padding-inline-end: 18px; overflow-wrap: anywhere; }
.tag-name.sm { font-size: 23px; }
.tag-meta { color: var(--ink-2); font-size: 14.5px; }
.tag-count { display: flex; align-items: baseline; gap: 7px; margin-top: 6px; color: var(--ink-2); font-weight: 700; }
.tag-count b { font-family: var(--serif); font-weight: 900; font-size: 42px; line-height: 1; color: var(--ink); }
.tag-count b.now { font-size: 32px; color: var(--rose); }
.gift-hero.empty { padding: 92px 18px 18px; }
.gift-hero.empty .tag { position: relative; inset: auto; max-width: none; gap: 6px; }
.gift-hero.empty .btn { align-self: flex-start; margin-top: 8px; }

/* ---------- people ---------- */
.search { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 0 16px; border: 1.5px solid var(--field); border-radius: 999px; background: #fff; color: var(--ink-3); }
.search input { min-height: 46px; margin: 0; padding: 0; border: 0; background: transparent; }
.search input:focus { box-shadow: none; }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold); }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pcard { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 10px 14px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); color: var(--ink); text-align: center; text-decoration: none; overflow: hidden; transition: transform 0.1s; }
.pcard:active { transform: scale(0.98); }
.pcard-paper { position: relative; align-self: stretch; height: 64px; margin: 0 -10px; }
.pcard-paper .ribbon-v { inset-inline-end: 24px; width: 10px; }
.pcard .av { position: relative; z-index: 3; margin-top: -32px; }
.pcard > b { margin-top: 9px; font-family: var(--serif); font-weight: 700; font-size: 19.5px; line-height: 1.2; overflow-wrap: anywhere; }
.pcard > small { color: var(--ink-3); font-size: 13.5px; }
.pcard-foot { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 4px 11px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); font-size: 13px; font-weight: 700; }
.pcard-foot.hot { background: var(--rose-soft); color: var(--rose); }
.pcard-foot.none { background: transparent; color: #b3afc6; font-weight: 600; }
.phero { position: relative; display: flex; justify-content: space-between; align-items: flex-start; height: 128px; margin: 0 -16px; padding: 12px 14px; border-radius: 0 0 30px 30px; overflow: hidden; }
.phero .ribbon-h { top: auto; bottom: 30px; height: 14px; }
.phero .icon-btn { position: relative; z-index: 3; }
.phead { position: relative; z-index: 4; margin-top: -58px; text-align: center; }
.phead .av { box-shadow: 0 0 0 5px var(--paper), 0 10px 20px -8px rgba(27, 24, 64, 0.4); }
.phead h1 { margin-top: 10px; }
.phead p { margin: 2px 0 0; }
.phead .chips { margin-top: 12px; }
.photo-pick { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.photo-pick label { margin: 0; cursor: pointer; }
.join { margin-top: 24px; text-align: center; }
.join h1 { margin: 16px 0 8px; font-size: 28px; }
.join p { margin: 0 0 12px; }

/* ---------- coupons ---------- */
.total { position: relative; margin: 0 0 16px; padding: 22px 22px 20px; border-radius: 26px; background: var(--ink); color: #fff; overflow: hidden; }
.total::after { content: ''; position: absolute; top: 20px; inset-inline-end: -44px; width: 160px; height: 18px; background: linear-gradient(180deg, #ffd466, var(--gold) 42%, var(--gold-deep)); transform: rotate(45deg); }
[dir='rtl'] .total::after { transform: rotate(-45deg); }
.total small { opacity: 0.72; font-size: 14.5px; }
.total b { display: block; font-family: var(--serif); font-weight: 900; font-size: 48px; line-height: 1.1; color: var(--gold); }
[dir='rtl'] .total b { text-align: right; }
.total span { font-size: 14.5px; opacity: 0.9; }
.total em { font-style: normal; color: #ffd466; }
.tickets { display: grid; gap: 10px; }
.ticket { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; padding-inline-start: 0; border: 0; border-radius: 18px; background: #fff; box-shadow: var(--shadow); color: inherit; font: inherit; text-align: start; overflow: hidden; }
button.ticket { cursor: pointer; }
.ticket::before, .ticket::after { content: ''; position: absolute; inset-inline-start: 50px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); }
.ticket::before { top: -8px; }
.ticket::after { bottom: -8px; }
.stub { display: grid; place-items: center; align-self: stretch; flex: none; width: 58px; margin-block: -14px; background: var(--k); color: #fff; }
.ticket .grow b { display: block; font-weight: 800; }
.ticket .grow small { display: block; color: var(--ink-3); font-size: 13.5px; }
.ticket .chip { margin-top: 7px; }
.amount { font-family: var(--serif); font-weight: 900; font-size: 23px; white-space: nowrap; }

/* ---------- wishlist: the invite is a gift tag ---------- */
.invite { position: relative; margin-bottom: 12px; padding: 18px; border: 1.5px dashed #e3be5d; border-radius: 22px; background: var(--gold-soft); }
.invite > b { font-family: var(--serif); font-weight: 700; font-size: 20px; }
.invite p { margin: 4px 0 12px; padding-inline-end: 20px; color: var(--ink-2); font-size: 15px; }
.invite-row { display: flex; gap: 8px; }
.invite-row input { flex: 1; min-width: 0; min-height: 38px; margin: 0; padding: 0 12px; border-radius: 999px; font-size: 13px; }

/* ---------- forms ---------- */
.form label { display: block; margin: 13px 0; color: var(--ink-2); font-size: 14px; font-weight: 800; }
.form label small, fieldset small { display: block; margin-top: 5px; color: var(--ink-3); font-size: 13px; font-weight: 400; }
input, select, textarea {
  display: block; width: 100%; min-height: 50px; margin-top: 6px; padding: 12px 14px;
  border: 1.5px solid var(--field); border-radius: 14px; background: #fff; color: var(--ink);
  font: inherit; font-size: 16.5px; font-weight: 400; appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1.500 7 7.500l6-6' fill='none' stroke='%231b1840' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; padding-inline-end: 34px; }
[dir='ltr'] select { background-position: right 14px center; }
textarea { min-height: 0; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--ink); box-shadow: 0 0 0 3px var(--gold); }
::placeholder { color: #b3afc6; opacity: 1; }
fieldset { min-width: 0; margin: 13px 0; padding: 0; border: 0; }
legend { padding: 0; color: var(--ink-2); font-size: 14px; font-weight: 800; }
.range { display: flex; align-items: center; gap: 8px; }
.range input { flex: 1; min-width: 0; }
.range span { margin-top: 6px; color: var(--ink-3); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.three { display: grid; grid-template-columns: 0.8fr 1.5fr 1.1fr; gap: 8px; }
.two label, .three label { margin: 8px 0; }
.err { margin: 8px 0 0; color: var(--rose); font-weight: 700; }
.err:empty { display: none; }
.note { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); font-size: 14.5px; }
.seg { display: flex; gap: 8px; margin-top: 10px; }
.seg button { flex: 1; min-height: 46px; border: 1.5px solid var(--field); border-radius: 14px; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.seg button.on { border-color: var(--ink); background: var(--ink); color: #fff; }

/* ---------- bottom sheet ---------- */
dialog.sheet { width: 100%; max-width: 560px; max-height: 92dvh; margin: auto auto 0; padding: 0; border: 0; border-radius: 30px 30px 0 0; background: var(--paper); color: var(--ink); overflow: auto; box-shadow: 0 -12px 44px rgba(27, 24, 64, 0.35); }
dialog.sheet::backdrop { background: rgba(27, 24, 64, 0.5); }
dialog.sheet[open] { animation: sheet-up 0.24s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sheet-in { padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); }
.sheet-in::before { content: ''; display: block; width: 44px; height: 5px; margin: 0 auto 8px; border-radius: 9px; background: #d6d0c1; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-head h2 { font-size: 24px; font-weight: 900; outline: 0; }
.sheet-head .icon-btn { margin-inline-end: -8px; }
.sheet-foot { margin-top: 6px; }

/* ---------- sign in ---------- */
.auth { max-width: 440px; margin: -6px auto 0; text-align: center; }
.auth-top { position: relative; margin: 0 -16px; padding: 60px 16px 70px; border-radius: 0 0 38px 38px; background: var(--ink); color: #fff; overflow: hidden; }
.auth-papers i { position: absolute; width: 92px; height: 92px; border-radius: 20px; box-shadow: 0 12px 22px -8px rgba(0, 0, 0, 0.55); }
.auth-papers .p0 { top: -22px; left: -18px; transform: rotate(-14deg); }
.auth-papers .p1 { top: 30px; right: -34px; transform: rotate(13deg); }
.auth-papers .p2 { bottom: -38px; left: 12%; transform: rotate(9deg); }
.auth-papers .p3 { bottom: -30px; right: 10%; transform: rotate(-11deg); }
.auth-papers .p4 { top: 44%; left: -50px; transform: rotate(24deg); }
.auth-papers .p5 { top: -46px; right: 26%; transform: rotate(-7deg); }
.auth-brand { position: relative; z-index: 2; }
.auth-brand .logo { margin: 0 auto; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.14), 0 16px 30px -10px #000; }
.auth-brand h1 { margin: 16px 0 4px; color: #fff; font-size: 46px; }
.auth-brand p { margin: 0; color: #d7d4f0; font-size: 17.5px; }
.auth-form { position: relative; z-index: 3; margin: -36px 2px 0; padding: 20px 20px 22px; text-align: start; }
.auth-form h2 { font-size: 25px; font-weight: 900; }
.auth-switch { margin: 18px 0 0; color: var(--ink-2); }

/* ---------- toast, loading, motion ---------- */
#toast { position: fixed; z-index: 60; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom)); max-width: 88vw; padding: 11px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; text-align: center; opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: opacity 0.22s, transform 0.22s; box-shadow: var(--shadow-lg); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.skel { height: 78px; margin: 12px 0; border-radius: 22px; background: linear-gradient(100deg, #efeadf 40%, #f8f5ee 50%, #efeadf 60%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skel.tall { height: 240px; border-radius: 30px; }
#view.enter > * { animation: rise 0.34s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
#view.enter > :nth-child(2) { animation-delay: 0.04s; }
#view.enter > :nth-child(3) { animation-delay: 0.08s; }
#view.enter > :nth-child(4) { animation-delay: 0.12s; }
#view.enter > :nth-child(n + 5) { animation-delay: 0.16s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes sheet-up { from { opacity: 0; transform: translateY(48px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 620px) {
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- AI ideas ---------- */
h3 { font-family: var(--serif); font-weight: 700; font-size: 20.5px; line-height: 1.25; margin: 10px 0 4px; }
.cta { margin-top: 14px; min-height: 46px; box-shadow: 0 12px 22px -12px rgba(231, 154, 0, 0.9); }
.phead.flat { margin-top: 16px; }
.shots { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 4px; }
.shot { position: relative; width: 72px; height: 72px; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot button { position: absolute; top: 3px; inset-inline-end: 3px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%; background: rgba(27, 24, 64, 0.78); color: #fff; cursor: pointer; }
.form label.shot.add { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1; width: auto; min-width: 180px; margin: 0; border: 1.5px dashed #cdc8e2; background: transparent; box-shadow: none; color: var(--link); font-size: 14.5px; cursor: pointer; }
.thinking { padding: 36px 16px; text-align: center; color: var(--ink-2); font-weight: 700; }
.thinking-box { display: inline-block; transform-origin: 50% 90%; animation: rock 1.1s ease-in-out infinite; }
.thinking-box .logo { border-radius: 14px; box-shadow: var(--shadow-lg); }
.thinking p { margin: 14px 0 0; }
@keyframes rock { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg) translateY(-4px); } }
#ideasOut { margin-top: 18px; scroll-margin-top: 70px; }
.ideas { display: grid; gap: 12px; }
.idea { padding: 16px 18px; border-radius: 22px; border-inline-start: 6px solid var(--gold); background: #fff; box-shadow: var(--shadow); }
.idea header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.idea p { margin: 0 0 8px; color: var(--ink-2); }
.idea .based { display: flex; align-items: flex-start; gap: 6px; padding: 8px 10px; border-radius: 12px; background: var(--gold-soft); color: var(--gold-ink); font-size: 14px; }
.idea .based .ic { margin-top: 2px; }
.idea footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.learned { margin: 18px 0 0; padding: 16px 18px; border-radius: 22px; background: var(--gold-soft); }
.learned > b { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 19px; }
.learned ul { margin: 8px 0 12px; padding-inline-start: 20px; color: var(--ink-2); }

/* ---------- where to buy ---------- */
.shop-q { margin: 2px 0 12px; color: var(--ink-2); font-weight: 700; }
.row.offer .chip { margin-top: 6px; margin-inline-end: 4px; }
.amount.sm { font-size: 20px; }
.chip.mint { background: var(--mint-soft); color: var(--mint); }
.shop-out .chips { margin-top: 12px; }
.gsearch { width: 100%; height: 64px; margin-top: 12px; border: 0; border-radius: 12px; }

/* ---------- group gifts ---------- */
.glist { display: grid; gap: 12px; }
.gcard { display: flex; border-radius: 22px; background: #fff; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; overflow: hidden; }
.gcard-paper { position: relative; flex: none; width: 64px; }
.gcard-paper .ribbon-v { inset-inline-end: 27px; width: 10px; }
.gcard-in { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; padding: 14px 16px; }
.gcard-in > b { font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1.2; }
.gcard-in > small { color: var(--ink-3); font-size: 13.5px; }
.gcard-foot { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 13.5px; font-weight: 700; }
.gcard .chips { margin-top: 6px; }
.gcard .chips:empty { display: none; }
.bar { display: block; height: 8px; margin: 8px 0 5px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #ffd466, var(--gold-deep)); }
.pot { margin-top: 18px; }
.pot b span { color: #fff; font-size: 22px; font-weight: 700; opacity: 0.8; }
.pot .bar { margin: 12px 0 10px; background: rgba(255, 255, 255, 0.18); }
.pay-me { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.pay .hint { margin-inline: 0; }
.vote { display: grid; place-items: center; gap: 1px; flex: none; width: 46px; height: 52px; padding: 0; border: 1.5px solid var(--field); border-radius: 14px; background: #fff; color: var(--ink-2); font: inherit; cursor: pointer; }
.vote b { font-size: 13.5px; line-height: 1; }
.vote .ic { width: 18px; height: 18px; }
.vote.on { border-color: var(--rose); background: var(--rose-soft); color: var(--rose); }
.vote.on .ic { fill: currentColor; }
.row.chosen { background: #fffaf0; }
.two > fieldset { margin: 8px 0; }
.two > fieldset .range input { margin-top: 6px; }

/* ---------- password peek (the field is always left-to-right, so the eye sits at its right end) ---------- */
.pw { position: relative; display: block; }
.pw input { padding-right: 52px; }
.pw .peek { position: absolute; right: 4px; bottom: 4px; color: var(--ink-3); }
.pw .peek[aria-pressed='true'] { color: var(--ink); }
