/* The Gift List — warm, calm, mobile-first. No external fonts or assets. */

:root {
  --bg: #FCF7F2;
  --surface: #FFFFFF;
  --surface-2: #F4E8E1;
  --line: #EBDDD5;
  --ink: #351D32;
  --ink-2: #705C65;
  --ink-3: #89757D;
  --sage: #89516D;
  --sage-ink: #5B263F;
  --sage-soft: #F1E3EB;
  --blue: #AA8DA6;
  --blue-ink: #694767;
  --blue-soft: #F0E7F0;
  --rose: #CF8B79;
  --rose-ink: #99472F;
  --rose-soft: #FBE5DC;
  --sand: #E8BAA0;
  --sand-ink: #805038;
  --sand-soft: #F8EBE2;
  --gold: #E69A70;
  --gold-ink: #88502E;
  --gold-soft: #FBE9DC;
  --plum: #A77894;
  --plum-ink: #67354F;
  --plum-soft: #F2E4EC;
  --danger: #A9433A;
  --danger-soft: #F7E4E1;
  --primary: var(--sage-ink);
  --on-primary: #FFFFFF;
  --focus: #694767;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(70, 52, 30, .05), 0 6px 18px rgba(70, 52, 30, .06);
  --shadow-lg: 0 10px 40px rgba(50, 38, 20, .18);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #21191F;
    --surface: #2D222A;
    --surface-2: #3A2B34;
    --line: #4C3945;
    --ink: #FAF0EB;
    --ink-2: #DDC8D2;
    --ink-3: #B9A2AD;
    --sage-ink: #E6B5CE;
    --sage-soft: #4B2D3E;
    --blue-ink: #D9B9DA;
    --blue-soft: #3D2D40;
    --rose-ink: #F1B7A4;
    --rose-soft: #4B302D;
    --sand-ink: #E8C0AB;
    --sand-soft: #48352D;
    --gold-ink: #F0B693;
    --gold-soft: #493326;
    --plum-ink: #E5BBD4;
    --plum-soft: #472D3D;
    --danger: #E38B82;
    --danger-soft: #3F2724;
    --primary: #E4B2CD;
    --on-primary: #301C29;
    --focus: #D9B9DA;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.sheet-open, html.sheet-open body { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-ink); text-underline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { flex: none; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.center { text-align: center; }
.pad { padding: 4px 4px; }
.warn-text { color: var(--danger); font-size: 15px; margin: 6px 0 0; display: flex; align-items: center; gap: 4px; }

/* ---------- Boot ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--ink-2); font-family: var(--serif); font-size: 22px; }
.boot-mark { width: 56px; height: 56px; border-radius: 16px; background: var(--sage); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; transform: scale(.94); } }
.boot-error { padding: 32px 20px; max-width: 520px; margin: 0 auto; }

/* ---------- Shell ---------- */
#view {
  max-width: 680px;
  margin: 0 auto;
  padding: calc(var(--safe-t) + 8px) 16px calc(var(--nav-h) + var(--safe-b) + 104px);
  outline: none;
}
body.bare #view { padding-bottom: calc(var(--safe-b) + 32px); }
body.bare .tabbar, body.bare .fab { display: none; }
body.has-select-bar .fab { display: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 4px max(4px, env(safe-area-inset-left)) var(--safe-b) max(4px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  border-top: 1px solid var(--line);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 0; background: none; color: var(--ink-2); font-size: 11.5px; font-weight: 500; padding: 4px 0; min-height: 48px;
}
.tab.active { color: var(--sage-ink); }
.tab.active .icon { stroke-width: 2.1; }
.tab-label { white-space: nowrap; letter-spacing: -.01em; }
.tab-badge {
  position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--rose-ink); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
@media (prefers-color-scheme: dark) { .tab-badge { color: #21191F; } }

.fab {
  position: fixed; z-index: 31;
  right: max(18px, calc((100vw - 680px) / 2 + 18px));
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  width: 60px; height: 60px; border-radius: 50%; border: 0;
  background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(60, 80, 60, .35);
  transition: transform .15s ease;
}
.fab:active { transform: scale(.94); }

/* ---------- Headers ---------- */
.page-header { padding: 10px 0 12px; }
.page-header.large { padding-top: 18px; }
.page-header-row { display: flex; align-items: flex-start; gap: 6px; min-height: 48px; }
.page-header-text { flex: 1; min-width: 0; padding-top: 4px; }
.page-title { margin: 0; font: 600 22px/1.2 var(--serif); letter-spacing: -.01em; overflow-wrap: anywhere; }
.page-header.large .page-title { font-size: 30px; }
.page-subtitle { margin: 4px 0 0; color: var(--ink-2); font-size: 15px; }
.eyebrow { margin: 0 0 4px; color: var(--ink-2); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.page-actions { display: flex; gap: 2px; margin-right: -6px; }
.back-btn { margin-left: -10px; }

/* ---------- Buttons ---------- */
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: none; color: var(--ink); position: relative; flex: none;
}
.icon-btn:active { background: var(--surface-2); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none; line-height: 1.15; text-align: center;
  transition: transform .1s ease, background .15s ease;
}
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost { background: transparent; color: var(--sage-ink); }
.btn-danger { background: var(--danger); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-danger { color: #21191F; } }
.btn-sm { min-height: 40px; padding: 0 12px; font-size: 14.5px; border-radius: 12px; gap: 6px; }
.btn-lg { min-height: 54px; font-size: 17px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }
.btn-row.wrap { flex-wrap: wrap; }
.btn-row.wrap > .btn { flex: 0 1 auto; }
.link-btn {
  display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 10px 4px; min-height: 44px;
  color: var(--sage-ink); font-weight: 600; font-size: 15px;
}
.center-row { display: flex; justify-content: center; margin: 20px 0; }

/* ---------- Cards & lists ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 12px; }
.card-soft { background: var(--surface-2); box-shadow: none; border-color: transparent; }
.empty-inline { padding: 16px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.empty-inline p { margin: 0; color: var(--ink-2); }
.caught-up { padding: 16px; display: flex; gap: 10px; align-items: center; color: var(--sage-ink); font-weight: 500; }
.list { overflow: hidden; }
.list > * + *, .list > .swipe-row + .swipe-row { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 24px 2px 8px; min-height: 32px; }
.section-title { margin: 0; font: 600 19px/1.25 var(--serif); display: flex; align-items: center; gap: 8px; }
.count { font: 600 13px var(--font); color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 2px 8px; }
.list-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 6px; min-height: 40px; }

.row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; min-height: 64px; width: 100%; text-align: left;
  background: var(--surface); border: 0; color: inherit; cursor: pointer;
}
.row.compact { padding: 10px 14px; }
.row.selected { background: var(--sage-soft); }
.row:active { background: var(--surface-2); }
.row-body { min-width: 0; flex: 1; }
.row-title { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 16.5px; line-height: 1.3; }
.row-title-text { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.row-meta { color: var(--ink-2); font-size: 14px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-assign { color: var(--blue-ink); font-size: 14px; margin-top: 2px; display: flex; gap: 4px; align-items: center; }
.row-assign.dup, .gcard-assign.dup { color: var(--danger); }
.row-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.row-trailing { flex: none; display: flex; align-items: center; gap: 6px; }
.chev { color: var(--ink-3); }

.select-box {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink-3); display: grid; place-items: center;
  flex: none; background: var(--surface);
}
.selected .select-box { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.select-box.on-media { position: absolute; top: 8px; left: 8px; }

/* Thumbs & avatars */
.thumb {
  position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 14px; flex: none;
  background: var(--tone-soft); color: var(--tone-ink);
}
.thumb-img, .avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-fill { width: 100%; aspect-ratio: 1 / 1; border-radius: 0; }
.thumb-hero { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); }
.thumb-hero .thumb-icon { width: 56px; height: 56px; }
.avatar {
  position: relative; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none;
  background: var(--tone-soft); color: var(--tone-ink); font-weight: 650; letter-spacing: .02em;
}
.avatar-add, .avatar-none { width: 36px; height: 36px; }
.avatar-none { background: var(--surface-2); color: var(--ink-2); }
.tone-sage { --tone-soft: var(--sage-soft); --tone-ink: var(--sage-ink); }
.tone-blue { --tone-soft: var(--blue-soft); --tone-ink: var(--blue-ink); }
.tone-rose { --tone-soft: var(--rose-soft); --tone-ink: var(--rose-ink); }
.tone-sand { --tone-soft: var(--sand-soft); --tone-ink: var(--sand-ink); }
.tone-gold { --tone-soft: var(--gold-soft); --tone-ink: var(--gold-ink); }
.tone-plum { --tone-soft: var(--plum-soft); --tone-ink: var(--plum-ink); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 12px;
  font-size: 12.5px; font-weight: 650; letter-spacing: .01em; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2);
}
.badge-soft { background: var(--surface-2); color: var(--ink-2); font-weight: 550; }
.badge-sample { background: var(--plum-soft); color: var(--plum-ink); border: 1px dashed var(--plum); }
.gcard-media .badge-sample { position: absolute; bottom: 8px; left: 8px; }
.st-available, .st-idea { background: var(--sand-soft); color: var(--sand-ink); }
.st-suggested { background: var(--blue-soft); color: var(--blue-ink); }
.st-committed, .st-planned { background: var(--sage-soft); color: var(--sage-ink); }
.st-purchased { background: var(--blue-soft); color: var(--blue-ink); border: 1px solid var(--blue); }
.st-arrived { background: var(--gold-soft); color: var(--gold-ink); }
.st-wrapped { background: var(--rose-soft); color: var(--rose-ink); }
.st-given, .st-received { background: var(--sage-ink); color: var(--bg); }
.st-archived { background: var(--surface-2); color: var(--ink-2); }
.ty-not_started { background: var(--rose-soft); color: var(--rose-ink); }
.ty-drafted, .ty-written { background: var(--gold-soft); color: var(--gold-ink); }
.ty-sent, .ty-complete { background: var(--sage-soft); color: var(--sage-ink); }
.prio { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; }
.prio-love { color: var(--rose-ink); }
.prio-like { color: var(--sage-ink); }
.prio-maybe { color: var(--ink-2); }

/* Gift cards grid */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column; cursor: pointer; text-align: left;
}
.gcard.selected { outline: 3px solid var(--primary); outline-offset: -1px; }
.gcard-media { position: relative; }
.gcard-love { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--rose-ink); display: grid; place-items: center; }
.gcard-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gcard-title { font-weight: 600; font-size: 15.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.gcard-meta { color: var(--ink-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard-assign { color: var(--blue-ink); font-size: 13px; line-height: 1.3; }

/* ---------- Chips & segments ---------- */
.chip-row { display: flex; gap: 8px; margin: 8px 0 12px; }
.chip-row.wrap { flex-wrap: wrap; }
.chip-row.scroll { overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 2px 16px; scroll-padding: 16px; }
.chip-row.scroll::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 15px; font-weight: 500; white-space: nowrap;
}
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-count { font-size: 12.5px; font-weight: 700; opacity: .75; }
.seg {
  display: flex; background: var(--surface-2); border-radius: 14px; padding: 3px; margin: 4px 0 12px; gap: 2px;
  overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg-btn {
  flex: 1 0 auto; border: 0; background: none; border-radius: 11px; min-height: 40px; padding: 0 10px;
  font-size: 14.5px; font-weight: 600; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
}
.seg-btn.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg-count { font-size: 12px; background: var(--line); border-radius: 9px; padding: 1px 6px; color: var(--ink-2); }
.mini-seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 2px; }
.mini-seg button { border: 0; background: none; padding: 0 10px; min-height: 34px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.mini-seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 6px; margin: 4px 0 6px; }
.search-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--ink-2);
}
.search-field.big { height: 50px; }
.search-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; height: 100%; font-size: 16px; color: var(--ink); }
.search-field:focus-within { border-color: var(--focus); }
.tool { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.tool.on { background: var(--sage-soft); color: var(--sage-ink); border-color: var(--sage); }
.dot-count { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--primary); color: var(--on-primary); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.sort-btn { position: relative; overflow: hidden; cursor: pointer; }
.sort-btn select { position: absolute; inset: 0; opacity: 0; font-size: 16px; cursor: pointer; }

/* ---------- Home ---------- */
.banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 12px;
  background: var(--surface-2); color: var(--ink);
}
.banner-text { flex: 1; font-size: 14.5px; line-height: 1.35; }
.banner-sample { background: var(--plum-soft); color: var(--plum-ink); }
.banner-sample .banner-text { color: var(--ink); }
.banner-backup { background: var(--blue-soft); }
.banner-backup > .icon { color: var(--blue-ink); }
.quick-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 6px 0 4px; }
.quick {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 2px 10px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); min-height: 96px;
}
.quick:active { transform: scale(.97); }
.quick-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage-ink); }
.quick:nth-child(2) .quick-icon { background: var(--blue-soft); color: var(--blue-ink); }
.quick:nth-child(3) .quick-icon { background: var(--gold-soft); color: var(--gold-ink); }
.quick:nth-child(4) .quick-icon { background: var(--sand-soft); color: var(--sand-ink); }
.quick:nth-child(5) .quick-icon { background: var(--rose-soft); color: var(--rose-ink); }
.quick-label { font-size: 12px; font-weight: 600; line-height: 1.2; text-align: center; overflow-wrap: anywhere; hyphens: auto; }
@media (max-width: 380px) {
  .quick-actions { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .quick { grid-column: span 2; min-height: 88px; }
  .quick:nth-child(4) { grid-column: 2 / span 2; }
}
.hscroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 8px; scroll-snap-type: x mandatory; }
.hscroll::-webkit-scrollbar { display: none; }
.occ-card {
  flex: 0 0 auto; width: 168px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  text-align: left; padding: 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}
.occ-date { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 50px; border-radius: 12px; background: var(--rose-soft); color: var(--rose-ink); margin-bottom: 6px; flex: none; }
.occ-date.small { width: 44px; height: 46px; margin: 0; }
.occ-mon { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.occ-day { font: 600 20px/1 var(--serif); }
.occ-name { font-weight: 650; font-size: 16px; line-height: 1.25; }
.occ-when { color: var(--ink-2); font-size: 14px; }
.occ-progress { width: 100%; display: flex; flex-direction: column; gap: 4px; margin-top: 6px; font-size: 12.5px; color: var(--ink-2); }
.progress { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; width: 100%; }
.progress-fill { height: 100%; border-radius: 4px; background: var(--sage); transition: width .3s ease; }
.action-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 10px 14px; border: 0; background: var(--surface); text-align: left; color: inherit;
}
.action-row:active { background: var(--surface-2); }
.action-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone-ink); flex: none; }
.action-text { flex: 1; font-weight: 500; }
.action-count { font: 600 18px var(--serif); color: var(--ink); }
.spend-card { padding: 16px; }
.spend-occ { margin: 0 0 6px; font-weight: 600; }
.spend-big { font: 600 32px/1.1 var(--serif); margin: 6px 0 8px; }
.spend-of { font: 400 16px var(--font); color: var(--ink-2); }
.spend-sub { color: var(--ink-2); font-size: 14px; margin: 8px 0 4px; }
.spend-people { display: grid; gap: 4px; margin: 10px 0 2px; }
.spend-person { display: flex; justify-content: space-between; font-size: 15px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.ideas-line { display: flex; flex-wrap: wrap; gap: 0 14px; justify-content: center; margin: 18px 0 0; }
.link-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; color: inherit; cursor: pointer; }
.link-card-text { flex: 1; display: flex; flex-direction: column; font-size: 15px; min-width: 0; }

/* ---------- Wishlists ---------- */
.person-card { padding: 0; overflow: hidden; }
.person-card-head { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; }
.person-card-text { flex: 1; min-width: 0; }
.person-name { margin: 0; font: 600 19px/1.25 var(--serif); display: flex; align-items: center; gap: 8px; }
.person-card-text p { margin: 2px 0 0; font-size: 14px; }
.list-rows { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 8px 14px; background: none; border: 0; text-align: left; color: inherit; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row > .icon:first-child { color: var(--sage-ink); }
.list-row-name { flex: 1; font-weight: 550; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row-count { color: var(--ink-2); font-size: 13.5px; white-space: nowrap; }
.person-card-foot { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 4px 8px 8px; border-top: 1px solid var(--line); }
.person-card-foot .small { margin-left: auto; padding-right: 6px; }
.giver-group { margin-bottom: 14px; }
.giver-head { display: flex; align-items: center; gap: 10px; margin: 14px 2px 8px; }
.giver-head .muted { font-size: 14px; }
.giver-head .link-btn { margin-left: auto; }
.select-bar {
  position: fixed; z-index: 32; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 10px);
  max-width: 656px; margin: 0 auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 18px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
}
.select-count { font-weight: 600; font-size: 15px; flex: 1; min-width: 110px; }
.select-actions { display: flex; gap: 8px; }
.select-bar .btn-secondary { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.select-bar .btn-primary { background: var(--bg); color: var(--ink); }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-icon { width: 64px; height: 64px; border-radius: 20px; background: var(--sage-soft); color: var(--sage-ink); display: grid; place-items: center; margin-bottom: 4px; }
.empty-title { margin: 0; font: 600 20px var(--serif); }
.empty-text { margin: 0 0 8px; color: var(--ink-2); max-width: 360px; }

/* ---------- Gift detail ---------- */
.gift-page .page-header { padding-bottom: 0; }
.gift-hero { display: grid; gap: 14px; margin-bottom: 14px; }
@media (min-width: 560px) { .gift-hero { grid-template-columns: 240px 1fr; align-items: start; } }
.gift-title { margin: 0; font: 600 26px/1.2 var(--serif); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.gift-meta { margin: 4px 0 6px; color: var(--ink-2); font-size: 16px; }
.gift-for { margin: 10px 0 0; font-size: 15px; color: var(--ink-2); }
.link-box { margin: 0 0 12px; }
.link-box .field-hint { display: flex; align-items: center; justify-content: center; margin-top: 6px; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 4px 0 10px; }
.action-grid > :first-child:nth-last-child(3) { grid-column: 1 / -1; }
.ty-card { display: flex; align-items: center; gap: 12px; padding: 14px; }
.ty-card-text { flex: 1; font-size: 15px; }
.warn-box {
  display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 14.5px; margin: 8px 0;
}
.warn-box strong { display: flex; align-items: center; gap: 4px; }
.warn-box ul { margin: 0; padding-left: 20px; color: var(--ink); }
div.warn-box:not(:has(ul)) { flex-direction: row; align-items: center; }
.info-box { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--blue-soft); color: var(--blue-ink); font-size: 14.5px; margin: 0; }
.assign-card { padding: 14px; }
.assign-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.assign-who { display: flex; flex-direction: column; min-width: 0; }
.assign-name { font-weight: 650; color: var(--ink); text-decoration: none; }
.stage-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 12px; }
.stage-btn { border: 0; background: none; min-height: 40px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.stage-btn.active { background: var(--surface); color: var(--sage-ink); box-shadow: var(--shadow); }
.stage-btn:disabled { cursor: default; }
.assign-actions { margin-top: 6px; gap: 4px; }
.past { margin: 4px 2px 12px; color: var(--ink-2); font-size: 14.5px; }
.past summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; }
.past-list { margin: 4px 0; padding-left: 18px; }

.stepper-card { padding: 14px 10px 12px; }
.stepper { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.stepper.stepper-5 { grid-template-columns: repeat(5, 1fr); margin-bottom: 4px; }
.stepper li { position: relative; display: flex; justify-content: center; }
.stepper li::before { content: ""; position: absolute; top: 18px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: var(--sage); }
.step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 0 2px; min-height: 60px; color: var(--ink-2); }
.step-dot { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); color: var(--ink-3); }
.done .step-dot { background: var(--sage-soft); border-color: var(--sage); color: var(--sage-ink); }
.current .step-dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.step-label { font-size: 11.5px; font-weight: 600; line-height: 1.15; text-align: center; }
.current .step-label { color: var(--ink); }

.details { margin: 0; padding: 4px 14px; }
.detail-row { display: grid; grid-template-columns: minmax(84px, 30%) 1fr; gap: 10px; padding: 10px 0; }
.detail-row + .detail-row { border-top: 1px solid var(--line); }
.detail-row dt { color: var(--ink-2); font-size: 14.5px; }
.detail-row dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-row.warn dd { color: var(--danger); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 8px 14px; }
.timeline li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: baseline; padding: 7px 0; font-size: 14.5px; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); align-self: center; }
.tl-time { color: var(--ink-2); font-size: 13px; white-space: nowrap; }

/* ---------- Giving ---------- */
.scope-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; width: 100%; text-align: left; color: inherit; }
.scope-top, .scope-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14.5px; }
.scope-top strong { font: 600 18px var(--serif); }
.group { margin-bottom: 14px; }
.group-head { display: flex; align-items: center; gap: 10px; margin: 16px 2px 8px; }
.group-title { font-weight: 650; color: var(--ink); text-decoration: none; flex: 1; min-width: 0; }
.group-head .btn { margin-left: auto; }
.swipe-row { position: relative; overflow: hidden; }
.swipe-actions { position: absolute; inset: 0 0 0 auto; display: flex; }
.swipe-act { width: 84px; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: #fff; }
.swipe-act.sage { background: var(--sage-ink); }
.swipe-act.danger { background: var(--danger); }
.swipe-act.neutral { background: var(--ink-2); }
@media (prefers-color-scheme: dark) { .swipe-act { color: #21191F; } }
.swipe-front { position: relative; background: var(--surface); will-change: transform; }
.advance-btn { padding: 0 10px; white-space: nowrap; }
.year-switch { display: flex; align-items: center; justify-content: center; gap: 12px; margin: -4px 0 8px; }
.year-label { font: 600 18px var(--serif); min-width: 60px; text-align: center; }
.plan-summary { padding: 16px; }
.plan-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.plan-stat { display: flex; flex-direction: column; align-items: center; text-align: center; }
.plan-num { font: 600 24px/1.1 var(--serif); }
.plan-lbl { color: var(--ink-2); font-size: 13px; }
.recipient-card { padding: 0; overflow: hidden; }
.recipient-head { display: flex; align-items: center; gap: 10px; padding: 12px 8px 12px 14px; }
.recipient-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.recipient-name { font-weight: 650; color: var(--ink); text-decoration: none; }
.recipient-card .list { border-top: 1px solid var(--line); }
.recipient-card .warn-text { padding: 0 14px 10px; margin: 0; }

/* ---------- Thank-yous ---------- */
.ty-hero { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.ty-hero .gift-title { font-size: 23px; }
.draft-card { padding: 14px; }
.draft-text { white-space: pre-wrap; margin: 0 0 8px; font-family: var(--serif); font-size: 17px; line-height: 1.55; }

/* ---------- Contacts ---------- */
.profile-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; margin: -8px 0 14px; }
.profile-name { margin: 8px 0 0; font: 600 26px/1.2 var(--serif); display: flex; align-items: center; gap: 8px; }
.profile-hero p { margin: 0; display: flex; align-items: center; gap: 4px; }

/* ---------- Settings ---------- */
.set-group { overflow: hidden; }
.set-row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px;
  background: none; border: 0; text-align: left; color: inherit;
}
.set-group > * + * { border-top: 1px solid var(--line); }
button.set-row:active, summary.set-row:active { background: var(--surface-2); }
.set-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--sage-ink); flex: none; }
.set-icon.tone-sage { background: var(--sage-soft); }
.set-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.set-label { font-weight: 550; }
.set-sub { color: var(--ink-2); font-size: 14px; line-height: 1.35; }
.set-row.tone-danger { color: var(--danger); }
.set-row.tone-danger .set-icon { background: var(--danger-soft); color: var(--danger); }
.set-more summary { list-style: none; cursor: pointer; }
.set-more summary::-webkit-details-marker { display: none; }
.set-more > .set-row { padding-left: 60px; border-top: 1px solid var(--line); }
.backup-note { display: flex; gap: 10px; padding: 14px; background: var(--blue-soft); color: var(--ink); font-size: 14.5px; }
.backup-note > .icon { color: var(--blue-ink); margin-top: 2px; }
.backup-note p { margin: 0; }
.inline-select { width: auto !important; min-height: 40px !important; padding: 0 30px 0 10px !important; font-size: 15px !important; }
.prose { padding: 14px 16px; font-size: 15px; color: var(--ink-2); }
.prose p { margin: 0 0 8px; }
.prose p:last-child { margin: 0; }

/* ---------- Welcome ---------- */
.welcome #view, body.bare #view { max-width: 560px; }
.welcome-step { padding: 28px 4px 0; display: flex; flex-direction: column; gap: 14px; }
.welcome-logo { width: 76px; height: 76px; border-radius: 22px; background: var(--sage); color: #FCF7F2; display: grid; place-items: center; margin-top: 12px; box-shadow: var(--shadow); }
.welcome-title { margin: 4px 0 0; font: 600 38px/1.1 var(--serif); }
.welcome-title.sm { font-size: 28px; }
.welcome-lead { margin: 0; font-size: 19px; color: var(--ink-2); font-family: var(--serif); }
.welcome-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 14px; }
.welcome-list li { display: flex; gap: 14px; align-items: flex-start; }
.welcome-list li > span:last-child { display: flex; flex-direction: column; font-size: 15.5px; }
.welcome-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage-ink); flex: none; }
.welcome-privacy { display: flex; gap: 10px; padding: 14px; border-radius: var(--radius-sm); background: var(--blue-soft); font-size: 14.5px; }
.welcome-privacy > .icon { color: var(--blue-ink); margin-top: 2px; }
.welcome-privacy p { margin: 0; }
.welcome-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.member-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.member-list li { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.member-add { border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 14px 14px; margin: 0; display: grid; gap: 10px; }
.member-add-row { display: grid; grid-template-columns: 1fr 140px; gap: 8px; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-error { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-weight: 550; font-size: 15px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.field-label { font-size: 14px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0; }
.req { color: var(--danger); }
.field-hint { font-size: 13.5px; color: var(--ink-2); line-height: 1.35; margin: 0; }
.input {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
.input:focus { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.input::placeholder { color: var(--ink-3); }
.textarea { resize: vertical; min-height: 80px; line-height: 1.45; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C8379' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px;
}
input[type=date].input { min-height: 48px; display: block; }
input[type=date].input::-webkit-date-and-time-value { text-align: left; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 359px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.occasion-row { display: grid; grid-template-columns: 1fr 96px; gap: 8px; }
.radio-seg { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.radio-seg-row { display: flex; flex-wrap: wrap; gap: 6px; }
.radio-seg-opt { flex: 1 0 auto; position: relative; }
.radio-seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.radio-seg-opt span {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-size: 15px; font-weight: 550; white-space: nowrap;
}
.radio-seg-opt input:checked + span { background: var(--sage-soft); border-color: var(--sage); color: var(--sage-ink); font-weight: 650; }
.radio-seg-opt input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; min-height: 44px; padding-top: 8px; position: relative; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--ink-3); display: grid; place-items: center; color: transparent; flex: none; margin-top: -2px; background: var(--surface); }
.check input:checked + .check-box { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.check input:focus-visible + .check-box { outline: 3px solid var(--focus); outline-offset: 2px; }
.check-text { display: flex; flex-direction: column; }
.more { border-top: 1px solid var(--line); padding-top: 4px; }
.more > summary {
  list-style: none; display: flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; color: var(--sage-ink); font-weight: 600; font-size: 15.5px;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary .icon { transition: transform .2s ease; }
.more[open] > summary .icon { transform: rotate(180deg); }
.more-body { display: flex; flex-direction: column; gap: 14px; padding: 6px 0 4px; }
.subgroup { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.subgroup .input { background: var(--surface); }
.budget-set { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.budget-set .field-label { font-size: 13px; }
.paste-btn { min-height: 30px; padding: 0 8px; font-size: 13.5px; }
.photo-row { display: flex; align-items: center; gap: 12px; }
.photo-preview { width: 72px; height: 72px; border-radius: 14px; background: var(--surface-2); color: var(--ink-3); display: grid; place-items: center; overflow: hidden; flex: none; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.picker-btn { display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; padding: 6px 10px; }
.picker-btn-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker-btn-text.placeholder { color: var(--ink-3); }
.picker-btn-chev { color: var(--ink-3); }
.assign-gifts { display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow: auto; }
.assign-gift { display: flex; align-items: center; gap: 10px; }
.assign-gift-title { flex: 1; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.message-text { font-size: 16px; min-height: 200px; }
.year-input { text-align: center; }
.auto-hint { margin-top: -6px; }

/* ---------- Sheets ---------- */
.sheet-layer { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(30, 24, 18, .38); opacity: 0; transition: opacity .2s ease; }
.sheet {
  position: relative; width: 100%; max-width: 640px; max-height: calc(100dvh - var(--safe-t) - 24px); display: flex; flex-direction: column;
  background: var(--bg); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); outline: none;
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.sheet-layer.open .sheet-backdrop { opacity: 1; }
.sheet-layer.open .sheet { transform: none; }
.sheet-layer.closing .sheet-backdrop { opacity: 0; }
.sheet-layer.closing .sheet { transform: translateY(100%); transition-duration: .18s; }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-backdrop { transition: none !important; } }
@media (min-width: 700px) {
  .sheet-layer { align-items: center; }
  .sheet { border-radius: 22px; max-height: 88vh; }
}
.sheet-header { display: flex; align-items: center; gap: 8px; padding: 14px 8px 8px 20px; position: relative; flex: none; }
.sheet-grabber { position: absolute; top: 6px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--line); }
.sheet-title { flex: 1; margin: 0; font: 600 20px/1.25 var(--serif); padding-top: 6px; }
.sheet-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 20px 20px; overscroll-behavior: contain; }
.sheet-footer { flex: none; padding: 10px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--bg); }
.sheet-footer .btn-row.wrap { justify-content: flex-start; }
.dialog-body { display: flex; flex-direction: column; gap: 10px; }
.dialog-message { margin: 0; color: var(--ink-2); }
.dialog-details { margin: 0; padding-left: 20px; color: var(--ink); }
.dialog-details li { margin: 2px 0; }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px; width: 100%; text-align: left;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink);
}
.choice > .icon { color: var(--sage-ink); }
.choice:active { background: var(--surface-2); }
.choice-text { display: flex; flex-direction: column; }
.choice-label { font-weight: 600; }
.choice-desc { color: var(--ink-2); font-size: 14px; }
.choice-danger, .choice-danger > .icon { color: var(--danger); }

/* Pickers */
.picker { display: flex; flex-direction: column; gap: 8px; }
.picker-hint { margin: 4px 0 0; color: var(--ink-2); font-size: 14.5px; }
.picker-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); position: sticky; top: 0; z-index: 1; }
.picker-search .input { border: 0; padding-left: 0; box-shadow: none !important; background: transparent; }
.picker-list { display: flex; flex-direction: column; }
.picker-row {
  display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "av name chk" "av sub chk"; column-gap: 12px; align-items: center;
  padding: 8px 4px; min-height: 56px; border: 0; background: none; text-align: left; width: 100%; color: inherit; border-bottom: 1px solid var(--line);
}
.picker-row > :first-child { grid-area: av; }
.picker-name { grid-area: name; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.picker-sub { grid-area: sub; color: var(--ink-2); font-size: 13.5px; }
.picker-name:last-child, .picker-row > .picker-name:nth-last-child(1) { grid-row: 1 / 3; }
.picker-check { grid-area: chk; color: var(--sage-ink); }
.picker-row.selected { background: var(--sage-soft); border-radius: 10px; }
.picker-new .picker-name { color: var(--sage-ink); }
.picker-empty { color: var(--ink-2); text-align: center; padding: 20px 0; margin: 0; }

/* Toasts */
#toasts { position: fixed; z-index: 60; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 88px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.sheet-open #toasts { bottom: calc(var(--safe-b) + 90px); }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 520px; width: max-content; max-width: 100%;
  padding: 12px 14px 12px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg);
  font-size: 15px; opacity: 0; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast-error { background: var(--danger); color: #fff; }
.toast-msg { flex: 1; }
.toast-action { border: 0; background: none; color: var(--sage); font-weight: 700; padding: 6px 4px; min-height: 36px; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .toast-action { color: #5B263F; } }

@media (max-width: 340px) {
  #view { padding-left: 12px; padding-right: 12px; }
  .page-header.large .page-title { font-size: 26px; }
  .chip-row.scroll, .hscroll { margin-left: -12px; margin-right: -12px; padding-left: 12px; padding-right: 12px; }
  .row { column-gap: 10px; padding-left: 12px; padding-right: 12px; }
  .tab-label { font-size: 10.5px; }
}

/* Refinements */
.thumb-hero:not(:has(img)) { aspect-ratio: 3 / 1; }
.assign-actions { flex-wrap: nowrap !important; }
.assign-actions > .btn { flex: 1 1 0 !important; padding: 0 6px; }
.seg-btn { padding: 0 8px; font-size: 14px; }

/* Modern Keepsake: an editorial stationery system. */
.brand-wordmark { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 0 14px; border-bottom: 1px solid var(--line); color: var(--primary); font: 500 29px/1.2 var(--serif); letter-spacing: -.04em; }
.brand-wordmark .icon { color: var(--rose-ink); }
.page-title, .section-title, .person-name { font-weight: 500; }
.btn-primary { box-shadow: 0 2px 4px rgba(65, 24, 48, .08); }
.fab { box-shadow: 0 6px 20px rgba(65, 24, 48, .22); }
.occ-card { background: var(--rose-soft); box-shadow: none; }
.occ-date { background: var(--surface); }
.occ-name { font: 500 21px/1.2 var(--serif); }
.home .spend-card .progress-fill { background: var(--gold); }
.quick, .card { box-shadow: 0 1px 3px rgba(65, 24, 48, .035); }
.welcome-logo { background: var(--primary); color: var(--on-primary); }
.tab.active { color: var(--primary); }
