:root {
  --pine: #1E4A3C;
  --deep: #163B30;
  --bg-top: #1F4B3C;
  --bg-mid: #1A4235;
  --bg-bottom: #15392E;
  --surface: rgba(255, 255, 255, .06);
  --surface-line: rgba(255, 255, 255, .12);
  --muted-card: rgba(255, 255, 255, .06);
  --glass: rgba(19, 50, 40, .78);
  --gold-text: #E8CD8C;
  --cream: #F3EBDD;
  --cream-2: #E6DAC4;
  --input: #FBF7F0;
  --gold: #D4B36A;
  --gold-light: #E8CD8C;
  --burgundy: #8C2635;
  --burgundy-dark: #6E1C29;
  --ink: #0F2620;
  --ink-2: #4E5B54;
  --on-dark: #F3EBDD;
  --on-dark-2: rgba(243, 235, 221, .86);
  --on-dark-3: rgba(243, 235, 221, .80);
  --line-dark: rgba(243, 235, 221, .14);
  --line-cream: rgba(15, 38, 32, .12);
  --display: 'Unbounded', system-ui, sans-serif;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --tabbar-h: 76px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html { background: var(--bg-mid); }
body { margin: 0; color: var(--on-dark); background: transparent; }
/* Soft, fixed gradient backdrop (a pseudo-element so it also stays fixed on iOS). */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(110% 55% at 90% -5%, rgba(232, 205, 140, .08), transparent 62%),
    radial-gradient(90% 55% at -10% 105%, rgba(140, 190, 160, .10), transparent 60%),
    linear-gradient(170deg, var(--bg-top) 0%, var(--bg-mid) 50%, var(--bg-bottom) 100%);
}
body { font-family: var(--ui); font-size: 15px; line-height: 1.45; min-height: 100dvh; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .55; }
a { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.cream :focus-visible, .sheet :focus-visible { outline-color: var(--burgundy); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.he { font-family: 'Heebo', sans-serif; text-transform: none; letter-spacing: 0; }
svg { flex: none; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ boot */
.boot { min-height: 100dvh; display: grid; place-items: center; color: var(--on-dark-3); font-family: var(--display); font-size: 14px; }
.boot-err { text-align: center; padding: 24px; max-width: 360px; display: grid; gap: 16px; justify-items: center; font-family: var(--ui); }

/* ------------------------------------------------------------------ shared controls */
.lang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid rgba(243,235,221,.22); }
.lang button { height: 36px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--on-dark-2); font: 600 12px var(--ui); letter-spacing: .04em; }
.lang button[aria-pressed="true"] { background: var(--cream); color: var(--ink); }

.btn { height: 50px; padding: 0 22px; border: 0; border-radius: 16px; font: 600 15px var(--ui); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: transparent; border: 1px solid rgba(15,38,32,.25); color: var(--ink); font-weight: 500; }
.btn-outline-dark { background: transparent; border: 1px solid var(--line-dark); color: var(--on-dark); font-weight: 500; }
.btn-ghost { background: transparent; color: var(--ink); font-weight: 500; }
.btn-danger { background: transparent; border: 1px solid rgba(140,38,53,.4); color: var(--burgundy); font-weight: 500; }
.btn-block { width: 100%; }
.btn-lg { height: 54px; font-size: 16px; }
.btn-sm { height: 44px; padding: 0 16px; font-size: 14px; border-radius: 14px; }
.link-btn { min-height: 44px; border: 0; background: transparent; padding: 0 8px; font: 500 14px var(--ui); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(243,235,221,.18); background: transparent; color: var(--on-dark); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.cream .icon-btn, .sheet .icon-btn { border-color: transparent; background: rgba(15,38,32,.07); color: var(--ink); }

.avatar { width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font: 400 17px var(--display); flex: none; text-transform: uppercase; }
.avatar.sm { width: 34px; height: 34px; font: 600 13px var(--ui); border: 2px solid var(--cream); }
.avatar.xs { width: 30px; height: 30px; font: 600 12px var(--ui); }
.av-0 { background: var(--burgundy); color: var(--cream); }
.av-1 { background: var(--gold); color: var(--ink); }
.av-2 { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(243,235,221,.55); }
.av-3 { background: #2C4A3F; color: var(--cream); }
.avatar.sm.av-2 { background: var(--cream-2); color: var(--ink); box-shadow: none; }

.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-2); }
.brandline { font-family: var(--display); font-size: 14px; color: var(--gold-text); white-space: nowrap; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ join */
.join { position: relative; max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: 24px 24px calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 20px; overflow: hidden; }
.join .flake { position: absolute; pointer-events: none; }
.join-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; z-index: 1; }
.hero { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; position: relative; }
.hero .ny { font-family: var(--display); font-weight: 300; font-size: 20px; color: var(--gold-text); }
.hero .ny small { color: var(--on-dark-2); font-size: 14px; margin-left: 6px; }
.hero .year { font-family: var(--display); font-weight: 400; font-size: clamp(76px, 24vw, 104px); line-height: .92; letter-spacing: -.04em; margin: 0; }
.hero p { font-size: 16px; line-height: 1.45; color: var(--on-dark-2); margin: 8px 0 0; }
.skyline { width: 100%; height: auto; max-height: 170px; }
.join-card { margin-top: auto; background: var(--surface); border: 1px solid var(--surface-line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(5,20,15,.18); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.join-card h2, .join-card legend { padding: 0; margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.join-card fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.name-btn { min-height: 48px; border-radius: 14px; border: 1px solid rgba(243,235,221,.18); background: transparent; color: var(--on-dark); font: 500 15px var(--ui); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 10px; overflow-wrap: anywhere; }
.name-btn[aria-pressed="true"] { border: 1.5px solid var(--gold); background: rgba(212,179,106,.14); }
.add-me { color: var(--gold-light); }
.hint { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--on-dark-3); text-align: center; }
.field-dark { height: 52px; width: 100%; border-radius: 14px; border: 1px solid rgba(243,235,221,.22); background: rgba(243,235,221,.06); padding: 0 16px; font-size: 16px; color: var(--on-dark); }
.field-dark::placeholder { color: rgba(243,235,221,.62); }
.err { color: #F2A7B1; font-size: 13.5px; text-align: center; margin: 0; }
.pin-input { height: 64px; width: 100%; text-align: center; font: 400 30px var(--display); letter-spacing: .5em; padding-left: .5em; border-radius: 16px; border: 1px solid rgba(243,235,221,.22); background: rgba(243,235,221,.06); color: var(--on-dark); }
.pin-screen { gap: 24px; justify-content: center; }
.pin-screen h1 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 0; letter-spacing: -.02em; }
.pin-screen p { margin: 0; color: var(--on-dark-2); }

/* ------------------------------------------------------------------ app shell */
.shell { min-height: 100dvh; }
.main { max-width: 560px; margin: 0 auto; padding: 20px 16px calc(var(--tabbar-h) + 32px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
.side { display: none; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); border-top: 1px solid var(--surface-line); padding-bottom: var(--safe-b); }
.tabbar nav { max-width: 560px; margin: 0 auto; display: flex; }
.tabbar a { flex: 1; height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--on-dark-3); text-decoration: none; font-size: 12.5px; font-weight: 500; }
.tabbar a[aria-current="page"] { color: var(--gold-text); }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; min-height: 48px; }
.topbar .right { display: flex; align-items: center; gap: 10px; }
.topbar .count { color: var(--on-dark-2); font-size: 14px; }
.me-btn { width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0; background: var(--gold); color: var(--ink); font: 400 17px var(--display); text-transform: uppercase; }
.page-head { padding: 4px 8px 6px; display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 28px; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.page-head h1.big { font-size: clamp(36px, 11vw, 46px); line-height: 1.05; }
.page-head h1.big span { display: block; }
.page-head p { margin: 0; font-size: 14px; color: var(--on-dark-2); }

.summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--surface-line); text-decoration: none; color: var(--on-dark); }
.summary .eyebrow { font-size: 11.5px; }
.summary b { display: block; font-size: 17px; font-weight: 500; margin-top: 4px; }
.summary .go { color: var(--gold-text); display: flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }

.people { list-style: none; margin: 0; padding: 0 4px; }
.people li + li { border-top: 1px solid rgba(243,235,221,.1); }
.person { display: flex; align-items: center; gap: 16px; padding: 14px 0; text-decoration: none; color: var(--on-dark); min-height: 72px; }
.person .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.person .nm { font-size: 17px; font-weight: 500; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tag { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); }
.tag.lc { text-transform: lowercase; letter-spacing: .02em; font-size: 14px; font-weight: 500; }
.person .sub { font-size: 14px; color: var(--on-dark-3); }
.chev { color: var(--on-dark-3); }

.banner { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 20px; background: var(--surface); border: 1px solid rgba(232,205,140,.3); font-size: 14px; line-height: 1.5; color: var(--on-dark-2); }
.foot-note { margin: 6px 0 0; text-align: center; font-size: 12.5px; color: var(--on-dark-3); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; }
.section-hint { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-3); padding: 6px 8px 0; margin: 0; }

/* ------------------------------------------------------------------ gift cards */
.cards { display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--cream); color: var(--ink); border-radius: 24px; padding: 20px; box-shadow: 0 10px 30px rgba(5,20,15,.16); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.is-mine { outline: 2px solid var(--gold); outline-offset: -2px; }
.card .row1 { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 26px; }
.card .prio { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--burgundy); display: inline-flex; align-items: center; gap: 6px; }
.card .prio.soft { color: var(--ink-2); }
.pill { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pill.dark { background: var(--ink); color: var(--gold-light); }
.pill.gold { background: var(--gold); color: var(--ink); }
.dom { font-size: 13px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; color: var(--burgundy); min-height: 32px; margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.dom:hover { color: var(--burgundy-dark); }
.card h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; }
.card .desc { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere; white-space: pre-line; }
.card .photo { margin: -8px -8px 0; border-radius: 18px; overflow: hidden; background: #fff; aspect-ratio: 4 / 3; }
.card .photo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.price { font-family: var(--display); font-size: 22px; }
.price small { font-family: var(--ui); font-size: 13px; color: var(--ink-2); margin-left: 6px; }
.card .suggest { height: 48px; border: 0; background: transparent; color: var(--ink); font: 500 14px var(--ui); display: flex; align-items: center; justify-content: center; gap: 8px; border-top: 1px solid var(--line-cream); margin: 0 -20px -8px; padding-top: 4px; border-radius: 0 0 24px 24px; }
.btn-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
.btn-pair .btn { padding: 0 10px; font-size: 14.5px; }
.burg-link { height: 40px; border: 0; background: transparent; color: var(--burgundy); font: 500 13.5px var(--ui); }
.progress { height: 8px; border-radius: 4px; background: rgba(15,38,32,.12); overflow: hidden; }
.progress > div { height: 100%; background: var(--gold); border-radius: 4px; }
.prog-lbl { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.stack { display: flex; }
.stack .avatar + .avatar { margin-left: -10px; }
.bought-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }

.card-taken { background: var(--muted-card); color: var(--on-dark); border-radius: 22px; padding: 16px 18px; display: flex; gap: 14px; align-items: center; border: 1px solid var(--surface-line); }
.card-taken .t { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card-taken .t b { font-size: 15.5px; font-weight: 500; color: var(--on-dark-2); overflow-wrap: anywhere; }
.card-taken .t span { font-size: 13px; color: var(--on-dark-3); }
.card-taken .badge { flex: none; font-size: 12px; font-weight: 500; padding: 7px 11px; border-radius: 999px; background: rgba(243,235,221,.1); color: rgba(243,235,221,.82); }

/* ------------------------------------------------------------------ my list */
.mine-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.mine-item { background: var(--cream); box-shadow: 0 8px 24px rgba(5,20,15,.14); color: var(--ink); border-radius: 26px; padding: 14px 10px 14px 6px; display: flex; align-items: center; gap: 10px; touch-action: pan-y; position: relative; }
.mine-item.dragging { z-index: 5; box-shadow: 0 16px 40px rgba(0,0,0,.45); transition: none; }
.mine-item.settling { transition: transform .18s ease; }
.handle { width: 40px; height: 56px; border: 0; background: transparent; color: rgba(15,38,32,.45); display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab; border-radius: 12px; flex: none; }
.handle:active { cursor: grabbing; }
.thumb { width: 60px; height: 60px; border-radius: 16px; background: var(--cream-2); display: flex; align-items: center; justify-content: center; font: 400 22px var(--display); color: var(--burgundy); flex: none; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.mine-item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; border: 0; background: transparent; text-align: left; padding: 4px 0; color: var(--ink); }
.mine-item .body b { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.mine-item .body span { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.mine-item .edit { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.empty { text-align: center; padding: 36px 24px; border-radius: 24px; border: 1px dashed rgba(243,235,221,.2); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; }
.empty p { margin: 0; color: var(--on-dark-3); font-size: 14px; max-width: 320px; }

/* ------------------------------------------------------------------ picks */
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 8px 0; }
.group-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.group-head span { font-size: 13px; color: var(--on-dark-3); }

/* ------------------------------------------------------------------ organiser */
.org-badge { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-text); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { border-radius: 20px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--surface-line); }
.stat span { font-size: 14px; color: var(--on-dark-2); }
.stat b { display: block; font: 400 30px var(--display); margin-top: 6px; }
.spend { background: var(--gold); color: var(--ink); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.spend .top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.spend .top span { font-weight: 500; }
.spend .top b { font: 400 clamp(22px, 7vw, 30px) var(--display); }
.spend .cur { display: flex; flex-direction: column; gap: 6px; }
.spend .cur-lbl { display: flex; justify-content: space-between; font-size: 12.5px; }
.bar { height: 10px; border-radius: 5px; overflow: hidden; display: flex; background: rgba(15,38,32,.18); }
.bar .b1 { background: var(--ink); }
.bar .b2 { background: rgba(15,38,32,.55); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.org-group { background: var(--cream); box-shadow: 0 10px 30px rgba(5,20,15,.16); color: var(--ink); border-radius: 24px; padding: 18px 20px 8px; }
.org-group > header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-cream); }
.org-group > header h2 { margin: 0; font-size: 17px; font-weight: 600; }
.org-group > header span { font-size: 13px; color: var(--ink-2); }
.org-row { border-bottom: 1px solid var(--line-cream); }
.org-row:last-child { border-bottom: 0; }
.org-row summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; min-height: 56px; }
.org-row summary::-webkit-details-marker { display: none; }
.org-row .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.org-row .t b { font-size: 15.5px; font-weight: 500; overflow-wrap: anywhere; }
.org-row .t span { font-size: 13px; color: var(--ink-2); }
.org-row .acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 0 14px; }
.st { flex: none; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.st-bought { background: var(--ink); color: var(--cream); }
.st-group { background: var(--ink); color: var(--gold-light); }
.st-picked { background: var(--gold); color: var(--ink); }
.st-free { border: 1.5px solid var(--burgundy); color: var(--burgundy); }
.org-hidden { border: 1.5px dashed rgba(243,235,221,.3); border-radius: 22px; padding: 18px 20px; display: flex; justify-content: space-between; gap: 12px; color: var(--on-dark-2); background: var(--surface); }
.org-hidden b { color: var(--on-dark); font-weight: 500; }
.mgr { display: flex; flex-direction: column; gap: 10px; }
.mgr-row { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 18px; background: var(--surface); flex-wrap: wrap; }
.mgr-row .who { flex: 1; min-width: 140px; display: flex; flex-direction: column; }
.mgr-row .who span { font-size: 13px; color: var(--on-dark-3); }
.mgr-row .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.mgr-row .btn { height: 44px; font-size: 13.5px; padding: 0 14px; }

/* ------------------------------------------------------------------ sheet / dialogs */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(6, 16, 13, .62); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.sheet { background: var(--cream); color: var(--ink); width: 100%; max-width: 560px; max-height: 94dvh; border-radius: 28px 28px 0 0; display: flex; flex-direction: column; animation: up .22s ease; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: rgba(15,38,32,.18); margin: 10px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 6px; }
.sheet-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; letter-spacing: -.02em; line-height: 1.2; }
.sheet-body { padding: 10px 20px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; overscroll-behavior: contain; }
.sheet-foot { padding: 12px 20px calc(16px + var(--safe-b)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; border-top: 1px solid var(--line-cream); }
.sheet-foot.one { grid-template-columns: 1fr; }
.sheet p.lead { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.linkbox { background: var(--pine); color: var(--on-dark); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.linkbox .lbl { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.linkbox .in { display: flex; gap: 10px; }
.linkbox input { flex: 1; min-width: 0; height: 52px; border-radius: 14px; border: 0; background: var(--cream); color: var(--ink); padding: 0 16px; font-size: 16px; }
.linkbox .btn { height: 52px; border-radius: 14px; padding: 0 18px; }
.linkbox small { font-size: 13px; color: var(--on-dark-2); line-height: 1.45; }
.linkbox small.ok { color: var(--gold-light); }
.fld { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fld > label, .fld > .lab { font-size: 14px; font-weight: 500; color: var(--ink); }
.fld > label small, .fld > .lab small { color: var(--ink-2); font-weight: 400; font-size: 13.5px; }
.inp { height: 52px; width: 100%; border-radius: 14px; border: 1px solid rgba(15,38,32,.15); background: var(--input); padding: 0 16px; font-size: 16px; color: var(--ink); }
textarea.inp { height: auto; min-height: 76px; padding: 14px 16px; resize: vertical; line-height: 1.4; }
.inp::placeholder { color: rgba(15,38,32,.45); }
.inp[aria-invalid="true"] { border-color: var(--burgundy); }
.fld .err-c { color: var(--burgundy); font-size: 13px; }
.price-fld { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; }
.seg { display: flex; background: var(--cream-2); border-radius: 14px; padding: 4px; gap: 2px; }
.seg button { flex: 1; min-width: 0; height: 44px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); font: 600 16px var(--ui); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.prio-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.prio-pick button { height: 48px; border-radius: 14px; border: 1px solid rgba(15,38,32,.2); background: transparent; color: var(--ink); font: 500 14.5px var(--ui); padding: 0 6px; }
.prio-pick button[aria-pressed="true"] { border: 1.5px solid var(--burgundy); background: rgba(140,38,53,.1); color: var(--burgundy); font-weight: 600; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stepper { height: 52px; border-radius: 14px; border: 1px solid rgba(15,38,32,.15); background: var(--input); display: flex; align-items: center; justify-content: space-between; }
.stepper button { width: 52px; height: 50px; border: 0; background: transparent; color: var(--ink); font-size: 22px; display: flex; align-items: center; justify-content: center; }
.stepper output { font-size: 17px; font-weight: 500; }
.upload { height: 52px; border-radius: 14px; border: 1.5px dashed rgba(15,38,32,.3); background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 500; position: relative; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.photo-prev { display: flex; align-items: center; gap: 10px; }
.photo-prev img { width: 52px; height: 52px; object-fit: cover; border-radius: 12px; background: #fff; }
.photo-prev button { border: 0; background: transparent; color: var(--burgundy); font: 500 13.5px var(--ui); min-height: 44px; padding: 0 4px; }

.dialog { background: var(--cream); color: var(--ink); width: calc(100% - 32px); max-width: 420px; border-radius: 24px; padding: 22px; margin: auto auto calc(16px + var(--safe-b)); display: flex; flex-direction: column; gap: 16px; animation: up .2s ease; }
.dialog h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; line-height: 1.3; }
.dialog p { margin: 0; color: var(--ink-2); }
.dialog .acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px + var(--safe-b)); transform: translateX(-50%); z-index: 80; background: var(--cream); color: var(--ink); padding: 12px 18px; border-radius: 14px; font-weight: 500; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0,0,0,.35); max-width: calc(100% - 32px); width: max-content; text-align: center; animation: fade .2s ease; }
.toast.bad { background: var(--burgundy); color: var(--cream); }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 90; background: var(--burgundy); color: var(--cream); text-align: center; font-size: 13.5px; padding: 8px 12px calc(8px); }

.settings-list { display: flex; flex-direction: column; gap: 10px; }
.settings-list .btn { justify-content: flex-start; }

/* ------------------------------------------------------------------ desktop */
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 340px minmax(0, 1fr); }
  .tabbar { display: none; }
  .side { display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh; overflow-y: auto; background: rgba(10, 32, 25, .28); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border-right: 1px solid var(--surface-line); padding: 30px 26px 24px; gap: 8px; }
  .side .brand { padding: 0 6px 22px; }
  .side .brand .ny { font-family: var(--display); font-weight: 300; font-size: 18px; color: var(--gold-text); }
  .side .brand .yr { font-family: var(--display); font-size: 52px; line-height: 1; letter-spacing: -.04em; margin: 4px 0 10px; }
  .side .brand .eyebrow { font-size: 11.5px; }
  .side nav { display: flex; flex-direction: column; gap: 4px; }
  .side nav a { display: flex; align-items: center; gap: 14px; height: 52px; padding: 0 18px; border-radius: 14px; color: var(--on-dark-2); text-decoration: none; font-weight: 500; font-size: 15.5px; }
  .side nav a:hover { background: rgba(243,235,221,.05); color: var(--on-dark); }
  .side nav a[aria-current="page"] { background: rgba(212,179,106,.14); color: var(--on-dark); }
  .side nav a .n { margin-left: auto; font-size: 13px; color: var(--on-dark-3); }
  .side .plist-h { margin: 22px 0 8px; padding: 0 18px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-3); }
  .side .plist a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 18px; border-radius: 14px; color: var(--on-dark); text-decoration: none; font-size: 15.5px; }
  .side .plist a:hover { background: rgba(243,235,221,.05); }
  .side .plist a[aria-current="page"] { background: var(--surface); }
  .side .plist a .tag { margin-left: auto; font-size: 11px; letter-spacing: .02em; text-transform: none; font-weight: 500; }
  .side .bottom { margin-top: auto; padding: 24px 18px 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
  .side .whoami { display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: var(--on-dark-2); padding: 0; min-height: 44px; font-size: 15px; text-align: left; }
  .main { max-width: none; margin: 0; padding: 48px 56px 64px; gap: 18px; }
  .main.narrow { max-width: 760px; }
  .topbar.mobile-only { display: none; }
  .page-head { padding: 0 0 8px; flex-direction: row; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; column-gap: 24px; }
  .page-head .stack-v { display: flex; flex-direction: column; gap: 8px; }
  .page-head h1 { font-size: 44px; }
  .page-head h1.big span { display: inline; }
  .page-head .note-r { font-size: 13.5px; color: var(--on-dark-3); }
  .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); align-items: start; gap: 22px; }
  .foot-note.desk-hide { display: none; }
  .toast { bottom: 28px; }
  .overlay { align-items: center; }
  .sheet { border-radius: 28px; max-height: 90dvh; }
  .sheet .grab { display: none; }
  .dialog { margin: auto; }
  .people-grid .people { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); column-gap: 32px; }
  .people-grid .people li + li { border-top: 0; }
  .people-grid .people li { border-bottom: 1px solid rgba(243,235,221,.1); }
  .summary { max-width: 520px; }
  .org-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 18px; align-items: start; }
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 899px) { .desk-only { display: none !important; } }
@media (max-width: 360px) {
  .names { grid-template-columns: 1fr; }
  .btn-pair { grid-template-columns: 1fr; }
  .prio-pick button { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
