/* SecretGift design system */
:root {
  --pine-900: #0B2E22; --pine: #0F3D2E; --pine-700: #164A39; --pine-500: #2C6B54; --pine-100: #E3EEE8; --pine-50: #F1F7F3;
  --cran: #C8364B; --cran-700: #A82A3D; --cran-100: #F8E1E4; --cran-50: #FCF0F1;
  --gold: #E0A83A; --gold-700: #9A6A10; --gold-100: #FBEFD5;
  --cream: #FBF6EE; --paper: #FFFFFF; --sand: #F3ECE0; --line: #E8DFD0; --line-strong: #D8CCB8;
  --ink: #1D2421; --ink-2: #3B4641; --muted: #66706B; --muted-2: #8A928E;
  --ok: #1F7A4D; --ok-bg: #E4F3EA; --warn: #8A5A00; --warn-bg: #FFF4DB; --err: #B3261E; --err-bg: #FCE8E6;
  --accent: var(--cran); --accent-700: var(--cran-700); --accent-100: var(--cran-100);
  --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-xl: 32px;
  --sh-1: 0 1px 2px rgba(29,36,33,.06), 0 1px 1px rgba(29,36,33,.04);
  --sh-2: 0 2px 6px rgba(29,36,33,.06), 0 10px 28px -10px rgba(29,36,33,.18);
  --sh-3: 0 24px 60px -20px rgba(11,46,34,.35);
  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --w: 1160px;
  color-scheme: light;
}
.theme-hanukkah { --accent: #2D5DA8; --accent-700: #22487F; --accent-100: #E2EAF6; }
.theme-spring { --accent: #B84E7A; --accent-700: #963C62; --accent-100: #F7E3EC; }
.theme-birthday { --accent: #C2502A; --accent-700: #9E3F1F; --accent-100: #FBE6DC; }
.theme-office { --accent: #2C6B54; --accent-700: #1F5240; --accent-100: #E3EEE8; }
.theme-winter { --accent: #2F6F86; --accent-700: #23566A; --accent-100: #E0EEF3; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--pine-700); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; color: var(--pine); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; font-optical-sizing: auto; }
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-family: var(--f-body); font-weight: 650; letter-spacing: 0; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.eyebrow { font: 600 .78rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 .9rem; display: inline-flex; gap: .5rem; align-items: center; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 38rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--pine); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { width: min(100% - 32px, var(--w)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 32px, 760px); margin-inline: auto; }
.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 1.25rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(251,246,238,.86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--pine); font: 600 1.35rem/1 var(--f-display); letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; image-rendering: pixelated; }
.brand:hover { color: var(--pine); }
.nav { display: flex; align-items: center; gap: .35rem; }
.nav a.navlink { text-decoration: none; color: var(--ink-2); font-weight: 500; padding: .5rem .8rem; border-radius: 999px; font-size: .95rem; }
.nav a.navlink:hover, .nav a.navlink[aria-current] { background: var(--sand); color: var(--pine); }
.nav form { margin: 0; }
@media (max-width: 720px) { .nav .hide-sm { display: none; } .site-header .wrap { height: 60px; } }

/* Buttons */
.btn { --bg: var(--paper); --fg: var(--pine); --bd: var(--line-strong); display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .65rem 1.2rem; border-radius: 999px; border: 1px solid var(--bd); background: var(--bg); color: var(--fg); font: 600 .97rem/1.1 var(--f-body); text-decoration: none; cursor: pointer; transition: transform .12s ease, box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { color: var(--fg); border-color: var(--pine-500); box-shadow: var(--sh-1); }
.btn:active { transform: translateY(1px); }
.btn-primary { --bg: var(--accent); --fg: #fff; --bd: var(--accent); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn-primary:hover { --bg: var(--accent-700); --bd: var(--accent-700); color: #fff; }
.btn-dark { --bg: var(--pine); --fg: #fff; --bd: var(--pine); }
.btn-dark:hover { --bg: var(--pine-900); color: #fff; }
.btn-ghost { --bg: transparent; --bd: transparent; }
.btn-ghost:hover { --bg: var(--sand); border-color: transparent; box-shadow: none; }
.btn-danger { --fg: var(--err); --bd: #EBC2BE; }
.btn-danger:hover { --bg: var(--err-bg); border-color: var(--err); }
.btn-lg { min-height: 54px; padding: .9rem 1.6rem; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: .4rem .85rem; font-size: .88rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--pine-700); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--sh-1); }
.card-tight { padding: 1.1rem 1.25rem; border-radius: var(--r); }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.card-sub { color: var(--muted); margin: .25rem 0 0; font-size: .95rem; }
.panel-accent { background: linear-gradient(160deg, var(--pine) 0%, var(--pine-700) 100%); color: #EAF2ED; border: 0; }
.panel-accent h2, .panel-accent h3 { color: #fff; }
.panel-accent .muted { color: #B9CEC3; }

/* Forms */
.field { display: grid; gap: .4rem; margin-bottom: 1.1rem; }
.field > label, .label { font-weight: 600; font-size: .95rem; color: var(--ink); }
.field .opt { font-weight: 400; color: var(--muted-2); font-size: .85rem; margin-left: .35rem; }
.hint { font-size: .86rem; color: var(--muted); margin: 0; }
.err-msg { font-size: .88rem; color: var(--err); margin: 0; font-weight: 500; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: .7rem .9rem; font: 400 1rem/1.4 var(--f-body); color: var(--ink); background: var(--paper); border: 1px solid var(--line-strong); border-radius: 12px; transition: border-color .15s, box-shadow .15s; appearance: none; -webkit-appearance: none; }
textarea { min-height: 110px; resize: vertical; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%2366706B' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 2.4rem; }
input:hover, select:hover, textarea:hover { border-color: var(--muted-2); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pine-500); box-shadow: 0 0 0 4px rgba(44,107,84,.16); }
.invalid input, .invalid select, .invalid textarea, input.invalid { border-color: var(--err); box-shadow: 0 0 0 3px rgba(179,38,30,.1); }
.input-group { display: flex; align-items: stretch; }
.input-group > :first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; width: 6.5rem; flex: none; }
.input-group > :last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -1px; }
.check { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; font-size: .95rem; line-height: 1.45; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pine-700); flex: none; }
.fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
.fieldset legend { font-weight: 600; margin-bottom: .6rem; padding: 0; }
.form-actions { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-top: 1.5rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }

/* Segmented choice */
.seg { display: inline-flex; background: var(--sand); padding: 4px; border-radius: 999px; gap: 2px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: .5rem 1rem; border-radius: 999px; font-weight: 600; font-size: .92rem; color: var(--ink-2); cursor: pointer; }
.seg input:checked + span { background: var(--paper); color: var(--pine); box-shadow: var(--sh-1); }
.seg input:focus-visible + span { outline: 3px solid var(--gold); }

/* Theme picker */
.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
@media (max-width: 640px) { .themes { grid-template-columns: 1fr 1fr; } }
.theme-opt { position: relative; cursor: pointer; }
.theme-opt input { position: absolute; opacity: 0; }
.theme-opt .tcard { display: block; border-radius: var(--r); overflow: hidden; border: 2px solid var(--line); background: var(--paper); transition: border-color .15s, transform .15s, box-shadow .15s; }
.theme-opt img { width: 100%; aspect-ratio: 16/7; object-fit: cover; object-position: 75% center; }
.theme-opt .tname { display: block; padding: .55rem .75rem .65rem; font-weight: 650; font-size: .93rem; }
.theme-opt .tname small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.theme-opt:hover .tcard { transform: translateY(-2px); box-shadow: var(--sh-2); }
.theme-opt input:checked + .tcard { border-color: var(--pine-700); box-shadow: 0 0 0 4px rgba(22,74,57,.14); }
.theme-opt input:focus-visible + .tcard { outline: 3px solid var(--gold); outline-offset: 2px; }
.theme-opt input:checked + .tcard::after { content: "✓"; position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--pine-700); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }

/* Avatars */
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--sand); display: inline-grid; place-items: center; overflow: hidden; flex: none; border: 2px solid var(--paper); box-shadow: 0 0 0 1px var(--line); }
.avatar img { width: 80%; height: 80%; image-rendering: pixelated; }
.avatar.sm { width: 32px; height: 32px; }
.avatar.lg { width: 72px; height: 72px; }
.avatar.xl { width: 112px; height: 112px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -10px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatars-pick { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; }
@media (max-width: 420px) { .avatars-pick { grid-template-columns: repeat(4, 1fr); } }
.avatars-pick label { cursor: pointer; position: relative; }
.avatars-pick input { position: absolute; opacity: 0; }
.avatars-pick span { display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; background: var(--sand); border: 2px solid transparent; transition: .15s; }
.avatars-pick img { width: 72%; image-rendering: pixelated; }
.avatars-pick label:hover span { background: var(--gold-100); }
.avatars-pick input:checked + span { border-color: var(--pine-700); background: var(--pine-50); }
.avatars-pick input:focus-visible + span { outline: 3px solid var(--gold); }

/* Badges & chips */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 650; background: var(--sand); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge.plain::before { display: none; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-err { background: var(--err-bg); color: var(--err); }
.b-info { background: var(--pine-100); color: var(--pine-700); }
.b-gold { background: var(--gold-100); color: var(--gold-700); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 999px; background: rgba(255,255,255,.72); border: 1px solid var(--line); font-size: .9rem; font-weight: 500; color: var(--ink-2); }
.chip svg { width: 16px; height: 16px; color: var(--accent); }

/* Flash */
.flash-zone { position: fixed; z-index: 60; left: 50%; top: 80px; transform: translateX(-50%); width: min(100% - 32px, 560px); pointer-events: none; }
.flash { pointer-events: auto; display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem .9rem 1.1rem; border-radius: 14px; background: var(--pine); color: #fff; box-shadow: var(--sh-3); font-weight: 500; animation: flashIn .35s cubic-bezier(.2,.9,.3,1.2); }
.flash.error { background: var(--err); }
.flash button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .8; cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 .2rem; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.alert { padding: .9rem 1.1rem; border-radius: 14px; background: var(--warn-bg); color: #5E3E00; border: 1px solid #F1DDB0; font-size: .95rem; }
.alert.err { background: var(--err-bg); color: #7E1A14; border-color: #F2C7C3; }
.alert.ok { background: var(--ok-bg); color: #155C39; border-color: #BFE3CD; }
.alert.info { background: var(--pine-50); color: var(--pine-700); border-color: var(--pine-100); }

/* Landing */
.hero { position: relative; overflow: hidden; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: min(64%, 1100px); background: url(/static/img/hero.webp) right center / cover no-repeat; }
.hero-art::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--cream) 0%, rgba(251,246,238,0) 30%); }
.hero .wrap { position: relative; padding: clamp(3rem, 8vw, 7rem) 0 clamp(3rem, 7vw, 6rem); }
.hero-copy { max-width: 36rem; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); margin-bottom: 1.25rem; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.hero .cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }
.trust { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 2rem; color: var(--muted); font-size: .92rem; }
.trust span { display: inline-flex; gap: .45rem; align-items: center; }
.trust svg { width: 18px; height: 18px; color: var(--pine-500); }
@media (max-width: 860px) {
  .hero-art { position: relative; width: 100%; height: 260px; background-position: 70% center; }
  .hero-art::before { background: linear-gradient(0deg, var(--cream) 0%, rgba(251,246,238,0) 40%); }
  .hero .wrap { padding-top: 0; }
}
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--paper); border-block: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.center { text-align: center; margin-inline: auto; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 1.75rem 1.5rem 1.5rem; border-radius: var(--r-lg); background: var(--cream); border: 1px solid var(--line); }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--pine); color: var(--gold); font: 600 1.1rem var(--f-display); margin-bottom: 1rem; }
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--ink-2); margin: 0; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--paper); padding: 1.6rem 1.5rem; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--cran-50); color: var(--cran); display: grid; place-items: center; margin-bottom: .9rem; }
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-family: var(--f-body); font-size: 1.02rem; font-weight: 650; color: var(--ink); margin-bottom: .3rem; letter-spacing: 0; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .75rem; }
.ticks li { display: flex; gap: .7rem; align-items: flex-start; }
.ticks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--pine-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23164A39' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/13px no-repeat; }
.mock { background: var(--paper); border-radius: var(--r-xl); border: 1px solid var(--line); box-shadow: var(--sh-3); padding: 1.25rem; transform: rotate(-1.2deg); }
.mock-inner { border-radius: var(--r-lg); background: var(--cream); padding: 1.5rem; text-align: center; }
.faq { max-width: 760px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; color: var(--pine); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.5rem/1 var(--f-body); color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .75rem 0 0; color: var(--ink-2); }
.cta-band { background: var(--pine); color: #DDE9E2; border-radius: var(--r-xl); padding: clamp(2rem, 5vw, 3.5rem); display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; margin: 0 0 .35rem; }
.cta-band p { margin: 0; }
.cta-band::after { content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(224,168,58,.35), transparent 65%); }
@media (max-width: 720px) { .cta-band { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.site-footer a { color: var(--muted); }

/* Exchange banner */
.xbanner { position: relative; background: var(--paper); border-bottom: 1px solid var(--line); overflow: hidden; }
.xbanner-art { position: absolute; inset: 0; background-size: cover; background-position: right center; }
.xbanner-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--cream) 30%, rgba(251,246,238,.55) 60%, rgba(251,246,238,0) 85%); }
.xbanner .wrap { position: relative; padding: clamp(1.75rem, 4vw, 3rem) 0 0; }
.xbanner h1 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); margin-bottom: .75rem; max-width: 34rem; }
.xbanner .chips { margin-bottom: 1.5rem; max-width: 40rem; }
@media (max-width: 720px) { .xbanner-art::after { background: linear-gradient(90deg, var(--cream) 45%, rgba(251,246,238,.7) 100%); } }
.tabs { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: .45rem; padding: .85rem 1rem; text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .95rem; white-space: nowrap; border-radius: 12px 12px 0 0; }
.tabs a:hover { color: var(--pine); background: rgba(255,255,255,.6); }
.tabs a[aria-current="page"] { color: var(--pine); background: var(--cream); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--accent); }
.tabs .dot { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .72rem; display: inline-grid; place-items: center; }
.tabs .sep { flex: 1; }
.page { padding: clamp(1.5rem, 4vw, 2.5rem) 0 2rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
@media (max-width: 960px) { .layout { grid-template-columns: 1fr; } }
.side { display: grid; gap: 1.25rem; position: sticky; top: 88px; }
@media (max-width: 960px) { .side { position: static; } }
.acting-bar { background: var(--gold-100); border-bottom: 1px solid #EED9A8; color: #5E3E00; font-size: .92rem; }
.acting-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .6rem 0; flex-wrap: wrap; }
.acting-bar form { margin: 0; }

/* Stat tiles */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; }
.stat b { display: block; font: 600 1.9rem/1.1 var(--f-display); color: var(--pine); }
.stat span { color: var(--muted); font-size: .88rem; }

/* Checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.checklist li { display: grid; grid-template-columns: 34px 1fr auto; gap: .9rem; align-items: center; padding: .9rem .75rem; border-radius: 14px; }
.checklist li.current { background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); }
.checklist .tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; color: transparent; font-weight: 800; font-size: .85rem; background: var(--paper); }
.checklist li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist li.current .tick { border-color: var(--accent); color: var(--accent); }
.checklist b { display: block; font-weight: 650; }
.checklist small { color: var(--muted); display: block; line-height: 1.4; }
@media (max-width: 560px) { .checklist li { grid-template-columns: 30px 1fr; } .checklist li > :last-child { grid-column: 2; justify-self: start; } }

/* Share box */
.share { display: grid; grid-template-columns: 1fr auto; gap: 1.25rem; align-items: center; }
.share-qr { width: 132px; height: 132px; border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 6px; }
@media (max-width: 560px) { .share { grid-template-columns: 1fr; } .share-qr { display: none; } }
.copy { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; background: var(--cream); }
.copy input { border: 0; background: transparent; min-height: 48px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9rem; color: var(--ink-2); border-radius: 0; }
.copy input:focus { box-shadow: none; }
.copy button { border: 0; border-left: 1px solid var(--line-strong); background: var(--paper); padding: 0 1rem; font: 600 .9rem var(--f-body); color: var(--pine); cursor: pointer; white-space: nowrap; display: inline-flex; gap: .4rem; align-items: center; }
.copy button:hover { background: var(--pine-50); }
.copy button.copied { color: var(--ok); }
.code-pill { display: inline-block; font: 600 1.25rem/1 ui-monospace, Menlo, monospace; letter-spacing: .08em; background: var(--cream); border: 1px dashed var(--line-strong); padding: .55rem .9rem; border-radius: 10px; color: var(--pine); }

/* People list */
.people { list-style: none; margin: 0; padding: 0; }
.people > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .9rem; align-items: center; padding: .85rem 0; border-top: 1px solid var(--line); }
.people > li:first-child { border-top: 0; }
.people .who b { display: block; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .who small { color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people .acts { display: flex; gap: .35rem; }
@media (max-width: 640px) { .people > li { grid-template-columns: auto minmax(0, 1fr) auto; } .people .status { grid-column: 2; justify-self: start; } .people .acts { grid-column: 3; grid-row: 1; } }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: var(--muted); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--sand); color: var(--ink); }
.menu-pop { position: absolute; right: 0; top: 42px; z-index: 20; min-width: 230px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-3); padding: .4rem; }
.menu-pop form { margin: 0; }
.menu-pop button, .menu-pop a { display: flex; width: 100%; text-align: left; gap: .6rem; align-items: center; padding: .6rem .75rem; border: 0; background: none; border-radius: 10px; font: 500 .93rem var(--f-body); color: var(--ink); text-decoration: none; cursor: pointer; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--cream); color: var(--ink); }
.menu-pop .danger { color: var(--err); }
.menu-pop hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; }

/* Wishlist */
.wish { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.wish > li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; }
.wish .prio { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.05rem; }
.prio-1 { background: var(--cran-50); color: var(--cran); }
.prio-2 { background: var(--gold-100); color: var(--gold-700); }
.prio-3 { background: var(--pine-50); color: var(--pine-500); }
.wish h4 { margin: 0 0 .2rem; font-size: 1.02rem; word-break: break-word; }
.wish .meta { display: flex; gap: .6rem; flex-wrap: wrap; color: var(--muted); font-size: .88rem; align-items: center; }
.wish .notes { margin: .4rem 0 0; color: var(--ink-2); font-size: .94rem; }
.wish .claimed { border-color: var(--ok); background: linear-gradient(0deg, var(--ok-bg), var(--ok-bg)) padding-box; }
.wish-edit { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 1rem; margin-top: .25rem; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--sand); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.empty { text-align: center; padding: 2rem 1rem; }
.empty img { width: 160px; margin: 0 auto .75rem; mix-blend-mode: multiply; }
.empty h3 { margin-bottom: .3rem; }
.empty p { color: var(--muted); max-width: 26rem; margin: 0 auto 1rem; }

/* Profile view */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; }
.fact { background: var(--cream); border-radius: 12px; padding: .7rem .85rem; }
.fact dt { font-size: .76rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fact dd { margin: .15rem 0 0; font-weight: 600; color: var(--ink); word-break: break-word; }
.prose-list { display: grid; gap: 1rem; }
.prose-list h4 { margin: 0 0 .2rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.prose-list p { margin: 0; white-space: pre-line; }
.meter { height: 10px; border-radius: 99px; background: var(--sand); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--accent)); transition: width .6s; }
.accordion details { border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); margin-bottom: .75rem; }
.accordion summary { padding: 1rem 1.2rem; cursor: pointer; font-weight: 650; display: flex; justify-content: space-between; gap: 1rem; list-style: none; align-items: center; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.accordion details[open] summary::after { transform: rotate(-135deg); }
.accordion .body { padding: 0 1.2rem 1.2rem; }

/* Reveal */
.reveal-stage { text-align: center; padding: clamp(1.5rem, 5vw, 3rem) 1rem; border-radius: var(--r-xl); background: radial-gradient(ellipse at 50% 40%, #fff 0%, var(--cream) 70%); border: 1px solid var(--line); position: relative; overflow: hidden; }
.giftbox { width: 192px; height: 192px; margin: 0 auto; background: url(/static/img/giftbox-sheet.png) 0 0 / 2112px 192px no-repeat; image-rendering: pixelated; cursor: pointer; border: 0; display: block; transition: transform .2s; }
.giftbox:hover { transform: scale(1.04) rotate(-2deg); }
.giftbox.idle { animation: wiggle 2.4s ease-in-out infinite; }
.giftbox.open { animation: boxopen 1.1s steps(11) forwards; }
@keyframes boxopen { to { background-position: -2112px 0; } }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-5deg); } 90% { transform: rotate(5deg); } 95% { transform: rotate(-3deg); } }
.reveal-name { opacity: 0; transform: translateY(14px) scale(.96); transition: all .7s cubic-bezier(.2,.9,.3,1.2); }
.revealed .reveal-name { opacity: 1; transform: none; }
.reveal-name h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: .25rem 0 .5rem; }
.reveal-hidden { display: none; }
.revealed .reveal-hidden { display: block; animation: fadeUp .6s .4s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }
.confetti { position: absolute; inset: 0; pointer-events: none; }
.status-steps { display: flex; gap: .5rem; flex-wrap: wrap; }
.status-steps label { flex: 1 1 110px; position: relative; cursor: pointer; }
.status-steps input { position: absolute; opacity: 0; }
.status-steps span { display: flex; flex-direction: column; gap: .2rem; align-items: center; text-align: center; padding: .8rem .5rem; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; font-size: .9rem; color: var(--ink-2); transition: .15s; }
.status-steps span em { font-style: normal; font-size: 1.3rem; }
.status-steps input:checked + span { border-color: var(--pine-700); background: var(--pine-50); color: var(--pine); box-shadow: 0 0 0 3px rgba(22,74,57,.12); }
.status-steps input:focus-visible + span { outline: 3px solid var(--gold); }

/* Messages */
.thread { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; background: var(--cream); border-radius: var(--r); min-height: 140px; max-height: 460px; overflow-y: auto; margin-bottom: 1rem; }
.bubble { max-width: 80%; padding: .65rem .95rem; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; }
.bubble.me { align-self: flex-end; background: var(--pine-700); color: #fff; border-color: var(--pine-700); border-bottom-right-radius: 6px; }
.bubble.them { border-bottom-left-radius: 6px; }
.bubble time { display: block; font-size: .74rem; opacity: .7; margin-top: .2rem; }
.thread .none { margin: auto; color: var(--muted); text-align: center; font-size: .95rem; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: .6rem; align-items: end; }
.composer textarea { min-height: 52px; height: 52px; }

/* Wizard */
.wizard { max-width: 760px; margin: 0 auto; }
.progress { display: flex; gap: .5rem; margin-bottom: 1.75rem; list-style: none; padding: 0; }
.progress li { flex: 1; }
.progress li span { display: block; font-size: .82rem; font-weight: 600; color: var(--muted); margin-top: .5rem; }
.progress li::before { content: ""; display: block; height: 5px; border-radius: 5px; background: var(--line); transition: background .3s; }
.progress li.on::before { background: var(--accent); }
.progress li.on span { color: var(--pine); }
.wstep[hidden] { display: none; }
.wstep h2 { margin-bottom: .25rem; }
.wstep > .muted { margin-bottom: 1.5rem; }
.suggest { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.suggest button { border: 1px dashed var(--line-strong); background: var(--paper); border-radius: 999px; padding: .3rem .75rem; font: 500 .85rem var(--f-body); color: var(--ink-2); cursor: pointer; }
.suggest button:hover { border-style: solid; border-color: var(--pine-500); color: var(--pine); }

/* Tables (log) */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; }
.t th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; padding: .8rem 1rem; border-bottom: 1px solid var(--line); background: var(--cream); white-space: nowrap; }
.t td { padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }

/* Exchange cards (dashboard) */
.xcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.25rem; }
.xcard { display: block; text-decoration: none; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: transform .15s, box-shadow .2s; }
.xcard:hover { transform: translateY(-3px); box-shadow: var(--sh-2); color: inherit; }
.xcard .art { aspect-ratio: 16/6; background-size: cover; background-position: right center; border-bottom: 1px solid var(--line); }
.xcard .body { padding: 1.1rem 1.25rem 1.25rem; }
.xcard h3 { margin: 0 0 .4rem; font-size: 1.2rem; }

.divider { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
.kbd { font-family: ui-monospace, Menlo, monospace; background: var(--sand); padding: .1rem .4rem; border-radius: 6px; font-size: .88em; }
.auth { max-width: 460px; margin: clamp(2rem, 6vw, 4rem) auto; }
.or { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; margin: 1.25rem 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
dialog { border: 0; border-radius: var(--r-lg); padding: 0; box-shadow: var(--sh-3); max-width: min(560px, calc(100% - 32px)); width: 100%; }
dialog::backdrop { background: rgba(11,46,34,.45); backdrop-filter: blur(3px); }
dialog .dbody { padding: 1.75rem; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print { .site-header, .site-footer, .tabs, .btn { display: none !important; } }
.matchcta { display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .2s; }
.matchcta:hover { color: inherit; transform: translateY(-2px); box-shadow: var(--sh-2); }
.matchcta img { width: 96px; image-rendering: pixelated; }
@media (max-width: 560px) { .matchcta { grid-template-columns: 1fr; text-align: center; } .matchcta img { margin: 0 auto; } }
/* --- fixes round 1 --- */
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.18em; }
.eyebrow .i { width: 15px; height: 15px; }
h2 .i, h3 .i { width: .85em; height: .85em; color: var(--accent); }
.tabs .i { width: 17px; height: 17px; }
.hero-art { width: 54%; }
.hero-art::before { background: linear-gradient(90deg, var(--cream) 0%, rgba(251,246,238,.6) 14%, rgba(251,246,238,0) 34%); }
@media (max-width: 1100px) { .hero-art { width: 50%; } .hero-copy { max-width: 31rem; } }
.xbanner-art { bottom: 50px; }
.tabbar { position: relative; background: var(--paper); border-top: 1px solid var(--line); }
.tabbar .wrap { padding: 0 !important; }
.tabbar .tabs a { border-radius: 0; }
.tabbar .tabs a[aria-current="page"] { background: transparent; }
.xbanner { background: var(--cream); }
.pre-reveal .giftbox { margin-top: .5rem; }
.reveal-stage:not(.revealed) .reveal-name { height: 0; overflow: hidden; }
