/* Secret Santa — a quiet-luxury look: deep green, antique gold, ivory paper, fine serif type. */
:root {
  --ivory: #f5f0e6;
  --paper: #fffdf8;
  --ink: #1c2420;
  --muted: #736d60;
  --green: #0e3a2d;
  --green-2: #17503f;
  --green-3: #0a2b21;
  --gold: #a98a4e;      /* gold for text on light */
  --gold-l: #d6bd86;    /* gold for text on green */
  --hair: #e2d5b7;      /* hairline borders */
  --hair-2: #efe6d2;
  --wine: #6d1f2c;
  --display: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  --sans: 'Jost', 'Futura', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body::before { /* faint paper grain */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: radial-gradient(rgba(169, 138, 78, .07) 1px, transparent 1px);
  background-size: 4px 4px;
}
.wrap {
  position: relative; z-index: 1; max-width: 560px; margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 18px calc(48px + env(safe-area-inset-bottom));
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.1; margin: 0; letter-spacing: .005em; }
h1 { font-size: 2.6rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.2rem; margin: 22px 0 10px; }
p { margin: 0; }
a { color: var(--green); }
b { font-weight: 500; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow, .grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

.eyebrow {
  display: inline-block; font: 500 .68rem/1.4 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--gold);
}
/* ornament rule:  ——— ✦ ——— */
.orn { display: flex; align-items: center; gap: 14px; color: var(--gold); font-size: .7rem; margin: 18px auto; max-width: 220px; }
.orn::before, .orn::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .55; }

/* ---------- twinkling sparkles (like fairy lights, without the bulbs) ---------- */
.snow { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
/* the same sparkles inside the green panels (hero, group header, opened gift) */
.sparkles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; border-radius: inherit; }
.hero > :not(.sparkles), .ghead > :not(.sparkles) { position: relative; z-index: 1; }
.snow i, .sparkles i {
  --c: 214, 189, 134;               /* glow colour (rgb), set per sparkle */
  --core: 255, 250, 235;            /* star colour */
  position: absolute; width: var(--s, 14px); height: var(--s, 14px);
  transform: translate(-50%, -50%) scale(0); opacity: 0;
  animation: twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
}
/* soft glow */
.snow i::before, .sparkles i::before {
  content: ''; position: absolute; inset: -60%; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--c), .55) 0%, rgba(var(--c), .18) 30%, transparent 65%);
}
/* four-point star glint */
.snow i::after, .sparkles i::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, transparent 0 46%, rgba(var(--core), .95) 50%, transparent 54% 100%),
    linear-gradient(0deg, transparent 0 46%, rgba(var(--core), .95) 50%, transparent 54% 100%);
  -webkit-mask: radial-gradient(circle, #000 0 18%, rgba(0,0,0,.6) 32%, transparent 70%);
          mask: radial-gradient(circle, #000 0 18%, rgba(0,0,0,.6) 32%, transparent 70%);
  filter: drop-shadow(0 0 2px rgba(var(--c), .9));
}
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(0deg); }
  12%      { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(20deg); }
  22%      { opacity: .35; transform: translate(-50%, -50%) scale(.6) rotate(30deg); }
  32%      { opacity: .9; transform: translate(-50%, -50%) scale(.9) rotate(40deg); }
  50%      { opacity: 0; transform: translate(-50%, -50%) scale(.2) rotate(55deg); }
}
.snow i { --core: var(--c); }
.snow i::before { background: radial-gradient(circle, rgba(var(--c), .35) 0%, rgba(var(--c), .12) 30%, transparent 65%); }
@media (prefers-reduced-motion: reduce) { .snow, .sparkles { display: none; } }

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; height: 48px; margin-bottom: 10px; border-bottom: 1px solid var(--hair); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--green); text-decoration: none; font: 500 .72rem var(--sans); letter-spacing: .3em; text-transform: uppercase; }
.brand img { width: 26px; height: 26px; border-radius: 4px; }
.iconbtn { background: none; border: 0; padding: 8px; margin: -8px; color: var(--muted); font: 500 .7rem var(--sans); letter-spacing: .18em; text-transform: uppercase; cursor: pointer; }

/* ---------- cards ---------- */
.card {
  background: var(--paper); border: 1px solid var(--hair); border-radius: 3px;
  padding: 24px 22px; margin-top: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 12px 30px -22px rgba(40, 30, 10, .35);
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card-head .small { font-size: .78rem; letter-spacing: .08em; }
/* double gold frame */
.card.tint-green, .card.framed, .card.reveal.boxed { outline: 1px solid var(--hair); outline-offset: -8px; padding: 30px 26px; }

/* ---------- home hero ---------- */
.hero {
  position: relative; text-align: center; margin-top: 8px; padding: 52px 28px 34px;
  background: radial-gradient(120% 80% at 50% 0%, var(--green-2), var(--green) 60%, var(--green-3));
  color: var(--ivory); border-radius: 3px; overflow: hidden;
  box-shadow: 0 24px 50px -30px rgba(10, 43, 33, .8);
}
.hero::before { content: ''; position: absolute; inset: 9px; border: 1px solid rgba(214, 189, 134, .45); pointer-events: none; }
.hero::after { content: ''; position: absolute; inset: 13px; border: 1px solid rgba(214, 189, 134, .18); pointer-events: none; }
.hero .crest { width: 74px; height: 74px; margin: 0 auto 18px; border-radius: 50%; border: 1px solid var(--gold-l); display: grid; place-items: center; }
.hero .crest svg { width: 30px; height: 30px; color: var(--gold-l); stroke-width: 1.2; }
.hero .eyebrow { color: var(--gold-l); }
.hero h1 { font-size: 3.4rem; font-weight: 400; margin-top: 8px; color: #fbf6ea; }
.hero h1 em { font-style: italic; color: var(--gold-l); }
.hero .orn { color: var(--gold-l); }
.hero p.lede { margin: 0 auto 28px; max-width: 30ch; color: rgba(245, 240, 230, .78); font-family: var(--display); font-size: 1.28rem; font-style: italic; line-height: 1.4; }
.hero .btn { position: relative; z-index: 1; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--hair-2); }
.steps li:first-child { border-top: 0; }
.steps li::before {
  content: counter(s, upper-roman); flex: none; width: 34px; padding-top: 1px;
  font: italic 500 1.25rem/1.2 var(--display); color: var(--gold);
}
.steps b { display: block; font-family: var(--display); font-size: 1.2rem; font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: 1px solid var(--green); background: transparent; color: var(--green);
  font: 500 .76rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  padding: 16px 22px; border-radius: 2px; cursor: pointer; min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; transition: background .25s var(--ease), color .25s var(--ease), border-color .25s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary, .btn.green { background: var(--green); color: #f7f1e3; border-color: var(--green); }
.btn.primary:hover, .btn.green:hover { background: var(--green-2); }
.btn.gold { background: linear-gradient(180deg, #dfc792, #c4a467); color: var(--green-3); border-color: #c4a467; }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.danger { color: var(--wine); border-color: #d9b9bd; }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; padding: 10px 16px; font-size: .7rem; }
.btn svg { width: 16px; height: 16px; }

/* ---------- forms ---------- */
label { display: block; font: 500 .68rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field { margin-top: 20px; }
.hint { font-weight: 400; letter-spacing: .04em; text-transform: none; color: #a39c8d; font-size: .8rem; }
input, select, textarea {
  width: 100%; font: 400 16px var(--sans); color: var(--ink);
  background: #fffefb; border: 1px solid #ddd0b1; border-radius: 2px;
  padding: 13px 14px; min-height: 50px; outline: none; transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 116px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #b4ad9e; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(169, 138, 78, .15); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.money { display: grid; grid-template-columns: 1fr 108px; gap: 8px; }
.check { display: flex; gap: 12px; align-items: flex-start; font: 400 .95rem var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; accent-color: var(--green); flex: none; }
.divider { height: 1px; background: var(--hair); margin: 24px 0; }

/* ---------- group masthead ---------- */
.ghead {
  position: relative; text-align: center; padding: 34px 24px 28px; margin-top: 6px;
  background: radial-gradient(120% 90% at 50% 0%, var(--green-2), var(--green) 55%, var(--green-3));
  color: #f7f1e3; border-radius: 3px; box-shadow: 0 20px 40px -28px rgba(10, 43, 33, .8);
}
.ghead::before { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(214, 189, 134, .4); pointer-events: none; }
.ghead .eyebrow { color: var(--gold-l); }
.ghead h1 { font-weight: 400; font-size: 2.5rem; color: #fbf6ea; margin-top: 6px !important; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; position: relative; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 2px;
  border: 1px solid var(--hair); color: var(--ink); font: 500 .68rem var(--sans); letter-spacing: .14em; text-transform: uppercase;
}
.ghead .chip { border-color: rgba(214, 189, 134, .45); color: #efe5cc; }
.chip svg { width: 13px; height: 13px; color: var(--gold-l); }
.note { margin: 18px auto 0; max-width: 34ch; font-family: var(--display); font-style: italic; font-size: 1.15rem; line-height: 1.4; white-space: pre-wrap; color: rgba(245, 240, 230, .82); position: relative; }

/* ---------- reveal ---------- */
.reveal { position: relative; text-align: center; }
.card.reveal.boxed { padding: 34px 26px; }
.card.reveal.boxed .eyebrow { margin-bottom: 4px; }
.gift-btn { background: none; border: 0; padding: 0; cursor: pointer; display: block; margin: 6px auto 4px; }
.gift { width: 156px; height: 156px; display: block; overflow: visible; filter: drop-shadow(0 14px 14px rgba(10, 43, 33, .22)); }
.gift .lid { transform-origin: 60px 50px; transform-box: view-box; }
.gift-btn:not(.opening) .gift { animation: wiggle 3.6s ease-in-out infinite; }
.gift-btn.opening .lid { animation: lidoff .7s var(--ease) forwards; }
.gift-btn.opening .gift { animation: shake .35s ease-in-out; }
@keyframes wiggle { 0%, 82%, 100% { transform: rotate(0); } 86% { transform: rotate(-4deg); } 90% { transform: rotate(3deg); } 94% { transform: rotate(-2deg); } }
@keyframes shake { 25% { transform: translateX(-3px) rotate(-2deg); } 75% { transform: translateX(3px) rotate(2deg); } }
@keyframes lidoff { to { transform: translate(-26px, -64px) rotate(-24deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gift-btn .gift, .gift-btn.opening .lid { animation: none !important; } }

/* opened: the inside of the box — deep green, gold lettering */
.card.reveal.opened {
  background: radial-gradient(120% 70% at 50% 0%, var(--green-2), var(--green) 60%, var(--green-3));
  color: #f1ead9; border-color: var(--green); padding: 32px 22px 24px;
}
.card.reveal.opened::before { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(214, 189, 134, .4); pointer-events: none; }
.card.reveal.opened > * { position: relative; }
.card.reveal.opened .eyebrow { color: var(--gold-l); }
.card.reveal.opened .muted { color: rgba(241, 234, 217, .7); }
.card.reveal.opened .muted b { color: #fbf6ea !important; }
.match-name { font: italic 400 3.3rem/1.05 var(--display); color: var(--gold-l); margin: 10px 0 8px; animation: pop .8s var(--ease); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; letter-spacing: .08em; } }
.card.reveal.opened .btn { border-color: rgba(214, 189, 134, .6); color: #f1ead9; background: transparent; }
.card.reveal.opened .btn.green { background: linear-gradient(180deg, #dfc792, #c4a467); color: var(--green-3); border-color: #c4a467; }
.wish {
  text-align: left; background: var(--paper); color: var(--ink); border: 1px solid var(--hair); border-radius: 2px;
  padding: 18px; margin-top: 18px; overflow-wrap: anywhere;
}
.wish .eyebrow { color: var(--gold) !important; }
.wish .muted { color: var(--muted) !important; }
.waiting-icon { width: 56px; height: 56px; margin: 0 auto 14px; display: block; }
.wrap-up {
  display: inline-flex; align-items: center; gap: 6px; margin: -14px -8px 14px auto; float: right; padding: 6px 10px;
  background: transparent; border: 1px solid rgba(214, 189, 134, .45); border-radius: 2px;
  font: 500 .6rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-l); cursor: pointer;
}
.wrap-up + .eyebrow { clear: both; display: block; }
.wrap-up svg { width: 12px; height: 12px; }

/* ---------- people ---------- */
.people { list-style: none; margin: 8px 0 0; padding: 0; }
.person { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--hair-2); }
.person:first-child { border-top: 0; }
.avatar {
  flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ivory); border: 1px solid var(--hair); color: var(--green);
  font: 600 1rem var(--display); letter-spacing: .04em;
}
.person .meta { flex: 1; min-width: 0; }
.person .name { font: 600 1.18rem/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person .sub { font-size: .78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .02em; }
.status { display: flex; align-items: center; gap: 6px; }
.dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #d3cab6; display: inline-block; }
.dot.on { background: var(--green-2); box-shadow: 0 0 0 2px rgba(23, 80, 63, .15); }
.dot.mid { background: var(--gold); }
.actions { display: flex; gap: 6px; flex: none; }
.act {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--hair); background: var(--paper);
  display: grid; place-items: center; color: var(--green); cursor: pointer; text-decoration: none; padding: 0; transition: background .2s;
}
.act svg { width: 16px; height: 16px; }
.act.text { background: var(--green); border-color: var(--green); color: var(--gold-l); }
.act.rm { color: #a39c8d; border-color: transparent; background: transparent; }
.badge { font: 500 .58rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--hair); padding: 2px 6px; border-radius: 2px; margin-left: 8px; vertical-align: 3px; }

.excl { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: var(--ivory); border: 1px solid var(--hair-2); border-radius: 2px; margin-top: 8px; font-family: var(--display); font-size: 1.1rem; }
details > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font: 500 1.35rem var(--display); }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: '+'; color: var(--gold); font: 300 1.5rem var(--sans); line-height: 1; transition: transform .3s var(--ease); }
details[open] > summary::after { transform: rotate(45deg); }

.progress { height: 2px; background: var(--hair-2); overflow: hidden; margin: 14px 0 10px; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-l)); transition: width .6s var(--ease); }

/* ---------- sheet & toast ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(10, 30, 22, .45); backdrop-filter: blur(2px); z-index: 20; animation: fade .25s; display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 560px; background: var(--paper); border-radius: 6px 6px 0 0; border-top: 2px solid var(--gold);
  padding: 30px 24px calc(26px + env(safe-area-inset-bottom)); animation: up .35s var(--ease);
}
.sheet h2 { font-size: 1.8rem; }
.sheet .app-icon { width: 64px; height: 64px; border-radius: 14px; display: block; margin: 0 auto 16px; box-shadow: 0 10px 24px -12px rgba(10, 43, 33, .6); }
.sheet ol { padding-left: 0; list-style: none; counter-reset: s; margin: 20px 0; }
.sheet ol li { counter-increment: s; display: flex; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--hair-2); }
.sheet ol li:first-child { border-top: 0; }
.sheet ol li::before { content: counter(s, upper-roman); flex: none; width: 24px; font: italic 500 1.2rem var(--display); color: var(--gold); }
.sheet ol svg { width: 18px; height: 18px; vertical-align: -3px; color: #0a84ff; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 16px);
  background: var(--green); color: #f1ead9; border: 1px solid rgba(214, 189, 134, .5); padding: 12px 20px; border-radius: 2px;
  font: 500 .8rem var(--sans); letter-spacing: .06em;
  opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 30; max-width: calc(100% - 32px); text-align: center;
  box-shadow: 0 16px 30px -16px rgba(10, 43, 33, .7);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.error { background: var(--wine); border-color: var(--wine); }

.spinner { width: 26px; height: 26px; border: 1px solid var(--hair); border-top-color: var(--gold); border-radius: 50%; animation: spin .9s linear infinite; margin: 90px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.footer { text-align: center; margin-top: 30px; }
.footer .btn { letter-spacing: .18em; }

/* ---------- extras ---------- */
.switch-row { display: flex; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--hair-2); margin: 0; cursor: pointer; font: 400 1rem var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); }
.switch-row:first-child { border-top: 0; }
.switch-row b { font: 600 1.15rem var(--display); }
.switch { position: relative; flex: none; width: 46px; height: 26px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; min-height: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--hair-2); border: 1px solid var(--hair); border-radius: 99px; transition: background .25s; }
.switch span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper); border: 1px solid var(--hair); box-shadow: 0 1px 3px rgba(0,0,0,.12); transition: transform .25s var(--ease); }
.switch input:checked + span { background: var(--green); border-color: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); border-color: var(--gold-l); background: #fbf3dd; }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px rgba(169, 138, 78, .3); }

.chat summary .count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px; border-radius: 99px; background: var(--green); color: var(--gold-l); font: 500 .68rem var(--sans); vertical-align: 3px; }
.thread { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; max-height: 320px; overflow-y: auto; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 2px 14px 14px 14px; background: var(--ivory); border: 1px solid var(--hair-2); white-space: pre-wrap; overflow-wrap: anywhere; font-size: .95rem; align-self: flex-start; }
.bubble.me { align-self: flex-end; background: var(--green); border-color: var(--green); color: #f1ead9; border-radius: 14px 2px 14px 14px; }
.bubble time { display: block; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; opacity: .6; margin-top: 4px; }

.ideas ul { margin: 10px 0 0; padding: 0; list-style: none; }
.ideas li { padding: 8px 0 8px 22px; border-top: 1px solid var(--hair-2); position: relative; font-family: var(--display); font-size: 1.12rem; }
.ideas li:first-child { border-top: 0; }
.ideas li::before { content: '✦'; position: absolute; left: 0; top: 10px; font-size: .62rem; color: var(--gold); }
.ideas .iconbtn { color: var(--gold); font-size: .62rem; }
.featured {
  display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 2px;
  border: 1px solid var(--hair); background: var(--ivory); color: var(--ink); text-decoration: none; font-size: .9rem; transition: border-color .2s;
}
.featured svg { width: 18px; height: 18px; color: var(--gold); flex: none; }
.featured span:nth-child(2) { flex: 1; }
.featured span:last-child { color: var(--gold); font-size: 1.2rem; line-height: 1; }
.featured.strong { border-color: var(--gold); background: #fbf3dd; font-weight: 500; }

.banner { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-left: 2px solid var(--gold); }
.banner-icon { flex: none; width: 34px; height: 34px; color: var(--gold); }
.banner b { font: 600 1.2rem var(--display); }
.wish-text { margin-top: 8px; white-space: pre-wrap; font-family: var(--display); font-size: 1.15rem; line-height: 1.45; }
.wish-text .muted { font-family: var(--sans); font-size: .9rem; }
.ideas .card-head { align-items: center; }
.card.reveal.opened > .sparkles { position: absolute; inset: 0; }
.card.reveal.opened > :not(.sparkles) { z-index: 1; }

/* ---------- adding people ---------- */
.add-form { display: grid; gap: 8px; }
.add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 380px) { .add-row { grid-template-columns: 1fr; } }
.tip { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 4px; background: var(--ivory); border: 1px solid var(--hair-2); border-left: 2px solid var(--gold); border-radius: 2px; font-size: .86rem; line-height: 1.45; }
.tip svg { width: 18px; height: 18px; flex: none; color: var(--gold); margin-top: 1px; }
.bulk { margin-top: 16px; border-top: 1px solid var(--hair-2); padding-top: 14px; }
.bulk > summary { font-size: 1.15rem; }
.bulk textarea { margin-top: 12px; min-height: 120px; }
.bulk .btn { margin-top: 10px; }
.bulk .eg { display: inline-block; margin-top: 6px; padding: 8px 12px; background: var(--ivory); border-radius: 2px; font-family: var(--display); font-size: 1rem; color: var(--ink); }
.bulk-list { list-style: none; margin: 10px 0 0; padding: 0; border: 1px solid var(--hair-2); border-radius: 2px; max-height: 220px; overflow-y: auto; }
.bulk-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; border-top: 1px solid var(--hair-2); font-size: .9rem; }
.bulk-list li:first-child { border-top: 0; }
.bulk-list li b { font: 600 1.05rem var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bulk-list li span { color: var(--muted); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-list li.bad { opacity: .55; }

/* ---------- my groups dashboard ---------- */
.top-actions { display: flex; gap: 18px; align-items: center; }
a.iconbtn { text-decoration: none; }
.dash-head h1 { margin-top: 6px !important; }
.group-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.group-card { position: relative; background: var(--paper); border: 1px solid var(--hair); border-radius: 3px; box-shadow: 0 12px 30px -22px rgba(40, 30, 10, .35); }
.group-link { display: flex; align-items: center; gap: 14px; padding: 18px 52px 18px 18px; color: inherit; text-decoration: none; }
.group-link .name { font: 600 1.3rem/1.2 var(--display); }
.group-link .sub { font-size: .8rem; color: var(--muted); }
.group-link .meta { flex: 1; min-width: 0; }
.group-link .chev { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 1.6rem; line-height: 1; }
.group-card .act.rm { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; }
.group-card .act.rm svg { width: 13px; height: 13px; }
.group-status { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pill { display: inline-block; padding: 3px 9px; border: 1px solid var(--hair); border-radius: 2px; font: 500 .66rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.pill.gold { border-color: var(--gold); color: var(--green); background: #fbf3dd; }
.pill.warn { color: var(--wine); border-color: #e2c3c7; }
.dash-actions { margin-top: 18px; }
.join > summary { font-size: 1.25rem; }
.share-card h2 { font-size: 1.5rem; }

/* ---------- owner dashboard ---------- */
.wrap.wide { max-width: 1100px; }
.owner-login { max-width: 420px; margin: 40px auto 0; }
.owner-error { margin-top: 12px; color: var(--wine); font-size: .9rem; }
.owner-head .chip { background: transparent; cursor: pointer; font: 500 .68rem var(--sans); letter-spacing: .14em; text-transform: uppercase; }
.owner-head .chip.on { background: var(--gold-l); color: var(--green-3); border-color: var(--gold-l); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.tile { background: var(--paper); border: 1px solid var(--hair); border-radius: 3px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 4px; }
.tile-label { font: 500 .64rem var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.tile-value { font: 500 2.4rem/1.05 var(--display); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.tile-sub { font-size: .8rem; color: var(--muted); }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 22px 28px; margin-top: 18px; }
.chart { margin: 0; }
.chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.chart figcaption b { font: 600 1.15rem var(--display); }
.chart figcaption span { font-size: .78rem; color: var(--muted); }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--hair-2); stroke-width: 1; }
.chart .axis { stroke: var(--hair); stroke-width: 1; }
.chart .tick { font: 10px var(--sans); fill: var(--muted); }
.chart .fill { fill: var(--green-2); }
.chart .hit { fill: transparent; }
.chart .bar:hover .fill { fill: var(--gold); }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 28px 40px; }
.hbars h3 { margin: 0 0 10px; font-size: 1.35rem; }
.hbar { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 12px; align-items: center; padding: 7px 0; font-size: .88rem; border-top: 1px solid var(--hair-2); }
.hbar:first-of-type { border-top: 0; }
.hb-track { height: 8px; background: var(--hair-2); border-radius: 99px; overflow: hidden; }
.hb-track i { display: block; height: 100%; background: var(--green-2); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbar:hover .hb-track i { background: var(--gold); }
.hb-val { font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; font-weight: 500; }
.hb-val small { color: var(--muted); font-weight: 400; margin-left: 6px; }
.owner-search { margin-top: 14px; }
.table-wrap { overflow-x: auto; margin-top: 12px; -webkit-overflow-scrolling: touch; }
.owner-table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 760px; }
.owner-table th { text-align: left; border-bottom: 1px solid var(--hair); padding: 0; }
.owner-table th button { all: unset; cursor: pointer; display: block; padding: 10px 10px; font: 500 .62rem var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.owner-table th button.on { color: var(--green); }
.owner-table td { padding: 10px; border-bottom: 1px solid var(--hair-2); white-space: nowrap; }
.owner-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.owner-table td.g-name { font: 600 1.05rem var(--display); white-space: normal; min-width: 160px; }
.owner-table tbody tr:hover { background: var(--ivory); }
.tip-float { position: fixed; z-index: 40; transform: translate(-50%, -100%); background: var(--green); color: #f1ead9; padding: 6px 10px; border-radius: 2px; font: 500 .78rem var(--sans); pointer-events: none; white-space: nowrap; box-shadow: 0 8px 18px -10px rgba(10,43,33,.7); }
