/* Family Wishlist prototype styles */

:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --surface-2: #f6f5f2;
  --tile: #f0efec;
  --ink: #0f1111;
  --ink-2: #565959;
  --ink-3: #8a8f94;
  --line: #e6e3dc;
  --line-2: #d6d2c9;
  --header: #131921;
  --header-2: #232f3e;
  --search-btn: #febd69;
  --brand: #0e6b4f;
  --brand-hover: #0b5a42;
  --brand-soft: #e2f1ea;
  --notice-ink: #0b4f3b;
  --claim: #ffd814;
  --claim-hover: #f7ca00;
  --claim-border: #fcd200;
  --claim-ink: #0f1111;
  --choice-on: #fffbea;
  --choice-border: #d9a400;
  --link: #007185;
  --ok: #067d62;
  --ok-soft: #e1f3ec;
  --warn: #9a5200;
  --warn-soft: #fdf0dc;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --taken: #6b7280;
  --taken-soft: #eceef1;
  --heart: #e11d48;
  --toast: #1f2937;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 17, 17, .06), 0 4px 16px rgba(15, 17, 17, .06);
  --shadow-hover: 0 2px 4px rgba(15, 17, 17, .06), 0 14px 30px rgba(15, 17, 17, .12);
  --shadow-lg: 0 12px 48px rgba(15, 17, 17, .22);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1115;
    --surface: #171b21;
    --surface-2: #1e232a;
    --tile: #e9e7e2;
    --ink: #eef0f2;
    --ink-2: #a9b2bc;
    --ink-3: #7c8691;
    --line: #2a3038;
    --line-2: #3a424c;
    --header: #0a0d11;
    --header-2: #161d27;
    --brand: #1f9d74;
    --brand-hover: #23b384;
    --brand-soft: #133a2d;
    --notice-ink: #a7f3d0;
    --choice-on: #2e2709;
    --choice-border: #e0b100;
    --link: #5cc8d8;
    --ok: #4ade9b;
    --ok-soft: #12352a;
    --warn: #fbbf5a;
    --warn-soft: #3a2a10;
    --danger: #f87171;
    --danger-soft: #3b1515;
    --taken: #a0a9b3;
    --taken-soft: #262c33;
    --toast: #2b3440;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .4), 0 14px 30px rgba(0, 0, 0, .4);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

h1, h2, h3 { line-height: 1.2; }

a { color: var(--link); }

:focus-visible { outline: 3px solid #4c9ffe; outline-offset: 2px; }

.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.ok { color: var(--ok); font-weight: 600; }

/* ---------- Header ---------- */

.demo-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 12px;
  background: #fff4d6;
  color: #6b4e00;
  font-size: 12.5px;
  text-align: center;
}

.demo-pill {
  padding: 1px 7px;
  border-radius: 999px;
  background: #6b4e00;
  color: #fff4d6;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.topbar { position: sticky; top: 0; z-index: 30; }

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 20px;
  background: var(--header);
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 20px;
  letter-spacing: -.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark { font-size: 22px; }
.brand-text { font-weight: 500; }
.brand-text b { font-weight: 800; color: var(--claim); }

.search {
  display: flex;
  flex: 1;
  max-width: 760px;
  height: 42px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.search:focus-within { box-shadow: 0 0 0 3px var(--search-btn); }

.search input {
  flex: 1;
  min-width: 0;
  padding: 0 14px;
  border: 0;
  outline: none;
  background: #fff;
  color: #0f1111;
  font: inherit;
  font-size: 15px;
}

.search button {
  display: grid;
  place-items: center;
  width: 50px;
  border: 0;
  background: var(--search-btn);
  color: #0f1111;
  cursor: pointer;
}

.search button:hover { background: #f3a847; }

.topnav { display: flex; gap: 2px; }

.topnav a {
  display: flex;
  flex-direction: column;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #fff;
  line-height: 1.15;
  text-decoration: none;
}

.topnav a:hover, .topnav a.is-active { border-color: rgba(255, 255, 255, .35); }
.topnav small { color: #c8ccd0; font-size: 12px; }
.topnav b { font-size: 14px; }

.bell {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.bell:hover { border-color: rgba(255, 255, 255, .35); }

.bell-count {
  position: absolute;
  top: 3px;
  right: 2px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid var(--header);
  border-radius: 999px;
  background: var(--claim);
  color: var(--claim-ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 15px;
}

.account { position: relative; }

.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.account-btn:hover { border-color: rgba(255, 255, 255, .35); }

.account-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.account-text small { color: #c8ccd0; font-size: 12px; }
.account-text b { font-size: 14px; }

.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 250px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
}

.menu-label {
  padding: 6px 10px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.menu-item:hover { background: var(--surface-2); }
a.menu-item { text-decoration: none; }
.menu-item > svg { color: var(--ink-2); }
.menu-item .tag { margin-left: 2px; }
.menu-item.is-current { font-weight: 700; }
.menu-check { margin-left: auto; color: var(--ok); display: inline-flex; }
.menu-sep { height: 1px; margin: 6px 0; background: var(--line); }

.subbar { background: var(--header-2); }

.subbar-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.subbar-inner::-webkit-scrollbar { display: none; }

.subbar-label {
  margin-right: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.chip-person {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 7px;
  padding: 3px 12px 3px 3px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.chip-person:hover { border-color: rgba(255, 255, 255, .45); }
.chip-person.is-active { background: #fff; color: #0f1111; }
.chip-person--me { padding-left: 10px; }
.chip-person svg { width: 16px; height: 16px; }

.subbar-sep { flex: none; width: 1px; height: 20px; margin: 0 6px; background: rgba(255, 255, 255, .25); }

/* ---------- Layout ---------- */

.main { max-width: 1280px; margin: 0 auto; padding: 20px 24px 40px; }

.page-title h1, .list-head h1 {
  margin: 8px 0 4px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.page-title p { margin: 0 0 8px; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  margin: 34px 0 14px;
}

.section-head h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.section-head .muted { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }

.footer { padding: 24px 16px 32px; color: var(--ink-3); font-size: 12px; text-align: center; }

/* ---------- Avatars ---------- */

.avatar {
  display: inline-grid;
  flex: none;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.avatar--xs { width: 24px; height: 24px; font-size: 11px; }
.avatar--sm { width: 32px; height: 32px; font-size: 14px; }
.avatar--md { width: 42px; height: 42px; font-size: 17px; }
.avatar--lg { width: 68px; height: 68px; font-size: 28px; box-shadow: 0 0 0 4px var(--surface), var(--shadow); }
.avatar--xl { width: 104px; height: 104px; font-size: 42px; transition: transform .15s, box-shadow .15s; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}

.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; }

.btn-claim {
  border-color: var(--claim-border);
  background: var(--claim);
  color: var(--claim-ink);
  box-shadow: 0 2px 5px rgba(213, 217, 217, .45);
}

.btn-claim:hover { background: var(--claim-hover); }

.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }

.btn-soft { border-color: var(--line-2); background: var(--surface); color: var(--ink); }
.btn-soft:hover { background: var(--surface-2); }

.btn-text { padding: 0 10px; background: transparent; color: var(--ink-2); }
.btn-text:hover { background: var(--surface-2); color: var(--ink); }

.btn-danger { background: var(--danger); color: #fff; }

.btn-ghost { border-color: rgba(255, 255, 255, .6); background: transparent; color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }

.btn:disabled, .btn-taken {
  border-color: transparent;
  background: var(--taken-soft);
  color: var(--ink-3);
  box-shadow: none;
  cursor: not-allowed;
}

.icon-btn {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}

.icon-btn:hover { background: var(--line); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 44px;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .22) 1.5px, transparent 2.5px) 0 0 / 34px 34px,
    radial-gradient(circle, rgba(255, 255, 255, .12) 1px, transparent 2px) 17px 17px / 34px 34px,
    linear-gradient(135deg, #0e6b4f 0%, #0a4a37 55%, #6d1a28 130%);
}

.hero--dinner {
  background:
    radial-gradient(circle, rgba(255, 255, 255, .2) 1.5px, transparent 2.5px) 0 0 / 34px 34px,
    radial-gradient(circle, rgba(255, 255, 255, .1) 1px, transparent 2px) 17px 17px / 34px 34px,
    linear-gradient(135deg, #8f1d2c 0%, #5c1320 60%, #0e6b4f 150%);
}

.hero-text { max-width: 620px; }

.eyebrow {
  color: var(--claim);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero h1 { margin: 8px 0 10px; font-family: var(--display); font-size: 44px; font-weight: 700; letter-spacing: -.015em; }
.hero p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 16.5px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.hero-count {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  padding: 18px 26px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 20px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(4px);
}

.hero-days { font-family: var(--display); font-size: 76px; font-weight: 700; line-height: 1; }
.hero-label { margin-top: 6px; color: rgba(255, 255, 255, .85); font-size: 14px; font-weight: 600; }

.event-facts { margin: 16px 0 0; padding: 0; list-style: none; }
.event-facts li { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 15.5px; }
.event-facts a { color: #fff; }

/* ---------- Home ---------- */

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }

.person-card {
  display: block;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}

.person-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.person-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.person-thumb { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--tile); }

.person-info { display: flex; align-items: center; gap: 10px; margin: 12px 4px 10px; }
.person-info b { font-size: 16px; }
.person-info small { display: block; color: var(--ink-2); font-size: 13px; }

.managed { display: block; margin: 8px 4px 0; color: var(--ink-2); font-size: 12px; }

.meter { height: 8px; border-radius: 999px; overflow: hidden; background: var(--line); }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #3fb68b); transition: width .4s ease; }
.meter--thin { height: 5px; margin: 0 4px; }

.home-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }

.panel {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.panel-link { display: block; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.panel-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.panel-link .meter { margin: 12px 0 10px; }
.panel-link p { margin: 6px 0 0; }

/* Family events list */
.page-title--row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.event-list { display: grid; gap: 16px; }

.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; }
.panel-head p { margin: 4px 0 0; }
.panel-go { color: var(--brand); font-size: 14px; font-weight: 700; white-space: nowrap; }

.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats b { display: block; font-size: 24px; }
.mini-stats small { color: var(--ink-2); }

.strip { display: flex; gap: 12px; padding-bottom: 6px; overflow-x: auto; }

.strip-add, .strip-item {
  flex: none;
  width: 124px;
  height: 124px;
  border-radius: var(--radius);
  overflow: hidden;
}

.strip-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px dashed var(--line-2);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.strip-add:hover { border-color: var(--brand); color: var(--brand); }
.strip-item { display: block; background: var(--tile); }

/* ---------- Images ---------- */

.fit-cover, .fit-contain { display: block; width: 100%; height: 100%; }
.fit-cover { object-fit: cover; }
.fit-contain { padding: 8%; object-fit: contain; mix-blend-mode: multiply; }

.img-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #fdf0e6, #efeafd);
}

.img-fallback span { font-size: 46px; }
.person-thumb .img-fallback span, .gift-thumb .img-fallback span { font-size: 26px; }

/* ---------- Wishlist page ---------- */

.list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin: 8px 0 18px; }
.list-head-text p { margin: 0; }
.list-head-add { margin-left: auto; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--notice-ink);
  font-size: 14px;
}

.notice svg { flex: none; margin-top: 1px; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.tab small { color: var(--ink-2); font-weight: 500; }
.tab.is-on { border-color: var(--ink); background: var(--ink); color: var(--surface); }
.tab.is-on small { color: var(--line-2); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.toolbar-right { display: flex; flex-wrap: wrap; gap: 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover { border-color: var(--ink-3); }
.chip.is-on { border-color: var(--ink); background: var(--ink); color: var(--surface); }

.select { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; font-weight: 600; }

.select select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 18px; }

/* ---------- Product card ---------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, background .2s;
}

.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.card-media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: var(--tile); }
.card-media img { transition: transform .35s ease, filter .3s, opacity .3s; }
.card:hover .card-media img.fit-cover { transform: scale(1.04); }

.badge-wanted {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #fff;
  color: var(--heart);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .16);
}

.stamp { position: absolute; inset: 0; display: grid; place-items: center; animation: stamp-in .35s cubic-bezier(.2, 1.4, .4, 1); }

.stamp svg {
  width: 30px;
  height: 30px;
  padding: 14px;
  border-radius: 50%;
  background: #fff;
  color: var(--taken);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  box-sizing: content-box;
}

.card.is-mine .stamp svg { background: #067d62; color: #fff; }

.card-edit { position: absolute; top: 10px; right: 10px; background: #fff; color: #0f1111; box-shadow: 0 1px 4px rgba(0, 0, 0, .16); }

.card-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }

.card-for {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.store { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }

.store-dot {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.card-title {
  display: -webkit-box;
  min-height: 2.7em;
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-price { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.price { display: inline-flex; align-items: flex-start; font-size: 24px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
.price-sym, .price-cents { margin-top: .18em; font-size: .52em; }
.price-cents { margin-left: 1px; }
.price--none { color: var(--ink-3); font-size: 13px; font-weight: 500; }
.price--lg { font-size: 30px; }

.wants {
  position: relative;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}

.card-note {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 13px;
  font-style: italic;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 6px; }

.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.card-actions > .btn-claim:not(.btn-sm), .card-actions > .btn-taken { width: 100%; }
.card-actions--row { gap: 4px; }

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  color: var(--link);
  font-size: 13px;
  text-decoration: none;
}

.card-link:hover { text-decoration: underline; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}

.status--taken { background: var(--taken-soft); color: var(--taken); }
.status--mine { background: var(--ok-soft); color: var(--ok); }
.status--partial { background: var(--warn-soft); color: var(--warn); }
.status--warn { margin-top: 6px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-weight: 500; }

/* The "crossed off" look: faded photo, struck-through name, card stays in place. */
.card.is-crossed { background: var(--surface-2); box-shadow: none; border-color: var(--line); }
.card.is-crossed .card-media img, .card.is-crossed .card-media .img-fallback { filter: grayscale(1); opacity: .42; }
.card.is-crossed .card-title { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--ink-2); text-decoration-thickness: 2px; }
.card.is-crossed .price { color: var(--ink-3); }
.card.is-crossed .badge-wanted { opacity: .6; }
.card.is-mine { border-color: var(--ok); background: var(--surface); }

.card--add {
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 320px;
  padding: 24px;
  border: 2px dashed var(--line-2);
  background: transparent;
  box-shadow: none;
  color: var(--ink-2);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.card--add:hover { border-color: var(--brand); color: var(--brand); box-shadow: none; }
.card--add b { color: var(--ink); font-size: 16px; }
.card--add small { max-width: 180px; }

.add-circle { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 4px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }

.empty { padding: 48px 16px; text-align: center; }
.empty span { display: block; font-size: 44px; }
.empty p { color: var(--ink-2); }

.extras { margin-top: 34px; }
.extras-list { margin: 0; padding: 0; list-style: none; }
.extras-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.extras-list b { flex: 1; }
.extras-who { color: var(--ink-2); }

/* ---------- Your gifts ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 18px 0 24px; }

.stat { padding: 16px 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.stat > small { display: block; margin-bottom: 4px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.stat > b { font-size: 28px; letter-spacing: -.01em; }
.stat .of { color: var(--ink-2); font-size: 15px; font-weight: 500; }
.stat .meter { margin-top: 10px; }

.gift-group { margin-bottom: 16px; }
.gift-group-name { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.gift-group-name h2 { margin: 0; font-size: 18px; }

.gift-rows { margin: 0; padding: 0; list-style: none; }

.gift-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.gift-thumb { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--tile); }
.gift-title { font-size: 15px; }
.gift-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; color: var(--ink-2); font-size: 13px; }
.gift-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.gift-row.is-bought .gift-title { color: var(--ink-2); text-decoration: line-through; }
.gift-row.is-bought .gift-thumb { filter: grayscale(.7); opacity: .6; }

.tag { padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; font-weight: 700; }

/* ---------- Dinner ---------- */

.stats--dinner { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat--wide { grid-column: span 2; }

.my-dishes { margin: 0; padding: 0; list-style: none; }
.my-dishes li { margin: 2px 0; font-size: 15px; font-weight: 700; }
.nudge { margin: 0; color: var(--warn); font-weight: 700; }

.diet-summary, .diet-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.diet-summary { margin-top: 4px; }
.diet-picker { margin: 4px 0 2px; }

.diet-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 13px;
  font-weight: 600;
}

.diet-chip--sm { padding: 2px 8px; font-size: 12px; }
.diet-chip--warn { background: var(--warn-soft); color: var(--warn); }
.diet-chip--zero { background: var(--surface-2); color: var(--ink-3); }

.diet-chip--btn { border-color: var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.diet-chip--btn.is-on { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.diet-chip--btn.diet-chip--warn.is-on { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }

.dinner-cat { margin: 30px 0; }
.dinner-cat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; }
.dinner-cat-head h2 { margin: 0; font-family: var(--display); font-size: 25px; }
.dinner-cat-head .btn { margin-left: auto; }

.servings {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 12.5px;
  font-weight: 700;
}

.servings--ok { background: var(--ok-soft); color: var(--ok); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }

.slot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.slot.is-full { border-color: var(--line); background: var(--surface-2); box-shadow: none; }
.slot.is-mine { border-color: var(--ok); background: var(--surface); }

/* Swipe a card left to reveal Delete (phones); computers get a Remove button too */
.swipe { position: relative; border-radius: 14px; overflow: hidden; }
.swipe > .swipe-row > .slot { height: 100%; }
.swipe-row { position: relative; z-index: 1; height: 100%; touch-action: pan-y; transition: transform .2s ease; }
.swipe-row.is-dragging { transition: none; user-select: none; }
.swipe-delete {
  position: absolute; inset: 0 0 0 auto; width: 96px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; background: var(--danger); color: #fff; font: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
}
.slot-remove { margin-left: auto; color: var(--danger); }
@media (hover: none) { .slot-remove { display: none; } }

.slot-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.slot-top h3 { margin: 0; font-size: 16px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pill--ok { background: var(--ok-soft); color: var(--ok); }

.signups { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.signups li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.signups .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.signup-note { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; font-style: italic; }
.slot-empty { margin: 0; color: var(--ink-3); font-size: 14px; }
.slot-actions { display: flex; align-items: center; gap: 6px; margin-top: auto; }

.notes { margin-top: 34px; }

.notes textarea {
  width: 100%;
  min-height: 150px;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  resize: vertical;
}

.notes textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.notes-foot { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ---------- Modal sheet and forms ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 17, 17, .5);
  backdrop-filter: blur(2px);
  animation: fade-in .15s ease;
}

.sheet {
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  animation: pop-in .2s cubic-bezier(.2, 1.2, .4, 1);
}

.sheet--wide { max-width: 780px; }

.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.sheet-head h2 { margin: 0; font-size: 19px; }
.sheet-body { padding: 8px 20px 18px; }
.sheet-body > p:first-child { margin-top: 4px; }

.sheet-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.label { display: block; margin: 14px 0 6px; color: var(--ink); font-size: 13px; font-weight: 700; }

:is(.sheet, .settings-panel, .form-card, .signin-box) :is(input[type="text"], input[type="number"], input[type="date"], input[type="time"], input[type="password"], input[type="email"], select) {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

:is(.sheet, .settings-panel, .form-card, .signin-box) :is(input, select):focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0 4px; font-size: 14px; }

.hint { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }
.hint--ok { color: var(--ok); font-weight: 600; }
.hint--warn { padding: 8px 10px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); }
.hint--error { padding: 8px 10px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); }

.privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
}

.privacy svg { flex: none; margin-top: 1px; }

.stepper { display: inline-flex; flex: none; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.stepper button { width: 36px; height: 36px; border: 0; background: var(--surface-2); color: var(--ink); font-size: 18px; cursor: pointer; }
.stepper button:disabled { opacity: .4; cursor: not-allowed; }
.stepper span { min-width: 38px; font-weight: 800; text-align: center; }

.toggle { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 14px; cursor: pointer; }
.toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { position: relative; flex: none; width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); transition: background .15s; }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.toggle input:checked + .toggle-track { background: var(--heart); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(18px); }
.toggle input:focus-visible + .toggle-track { outline: 3px solid #4c9ffe; outline-offset: 2px; }
.toggle svg { color: var(--heart); vertical-align: -1px; }

.claim-item { display: flex; align-items: center; gap: 14px; }
.claim-item h3 { margin: 4px 0; font-size: 15px; font-weight: 600; }
.claim-thumb { flex: none; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: var(--tile); }

.choices { margin: 18px 0 0; padding: 0; border: 0; }
.choices legend { margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 700; }

.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice.is-on { border-color: var(--choice-border); background: var(--choice-on); }
.choice:has(input:focus-visible) { outline: 3px solid #4c9ffe; outline-offset: 2px; }
.choice-emoji { font-size: 26px; }
.choice-text b { display: block; font-size: 15px; }
.choice-text small { color: var(--ink-2); font-size: 13px; }

.editor-link { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.editor-link .label { margin-top: 0; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; }
.link-row .btn { height: 44px; }

.editor-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; margin-top: 16px; }
.editor-photo { display: flex; flex-direction: column; gap: 8px; }
.photo-preview { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--tile); }
.photo-upload { position: relative; overflow: hidden; }
.photo-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.editor-fields > .label:first-child { margin-top: 0; }

/* ---------- Toasts and confetti ---------- */

.toasts {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--toast);
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: toast-in .25s cubic-bezier(.2, 1.2, .4, 1);
}

.toast-action { padding: 0; border: 0; background: transparent; color: var(--claim); font: inherit; font-weight: 800; cursor: pointer; }

.confetti {
  position: fixed;
  z-index: 70;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti 1s cubic-bezier(.15, .7, .4, 1) forwards;
}

@keyframes confetti {
  0% { transform: translate(-50%, -50%) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 90px)) rotate(var(--rot)); opacity: 0; }
}

@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes stamp-in { from { opacity: 0; transform: scale(.6); } }
@keyframes slide-up { from { transform: translateY(40px); opacity: .5; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Sign-in picker ---------- */

.picker {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 16px;
  color: #fff;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .16) 1.5px, transparent 2.5px) 0 0 / 38px 38px,
    radial-gradient(circle, rgba(255, 255, 255, .08) 1px, transparent 2px) 19px 19px / 38px 38px,
    linear-gradient(160deg, #131921 0%, #10302a 60%, #3d1219 120%);
}

.picker-inner { max-width: 780px; text-align: center; }
.brand--lg { justify-content: center; margin-bottom: 28px; font-size: 28px; }
.picker h1 { margin: 0 0 10px; font-family: var(--display); font-size: 46px; }
.picker-sub { max-width: 560px; margin: 0 auto 36px; color: #c9d1d9; line-height: 1.55; }
.picker-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 28px; }

.picker-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: #d5dbe1;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.picker-person:hover { color: #fff; }
.picker-person:hover .avatar { box-shadow: 0 0 0 4px #fff; transform: scale(1.05); }
.picker-tip { margin: 40px auto 0; max-width: 520px; color: #9aa4af; font-size: 14px; }

.picker-grid.has-choice .picker-person:not(.is-chosen) { opacity: .45; }
.picker-person.is-chosen { color: #fff; }
.picker-person.is-chosen .avatar { box-shadow: 0 0 0 4px var(--claim); }

.signin-box {
  max-width: 400px;
  margin: 30px auto 0;
  padding: 18px 20px 14px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  text-align: left;
  animation: pop-in .2s ease;
}

.signin-box .label { margin-top: 0; color: #fff; }
.signin-row { display: flex; gap: 8px; }
.signin-row input { flex: 1; min-width: 0; }
.signin-row .btn { height: 44px; }
.signin-help { margin: 10px 0 0; color: #c9d1d9; font-size: 13px; }

.signin-skip {
  margin-top: 6px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #f4d58d;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.splash-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

.form-card {
  max-width: 460px;
  margin: 0 auto;
  padding: 24px 24px 22px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow-lg);
}

.form-card > .label:first-child { margin-top: 0; }
.form-card-submit { width: 100%; margin-top: 20px; }
.pass-row { display: flex; gap: 6px; align-items: center; }
.pass-row input { flex: 1; min-width: 0; }
.notify-toggles .toggle { margin-top: 12px; }
.notify-toggles .toggle input:checked + .toggle-track { background: var(--brand); }

/* ---------- What's new ---------- */

.activity { margin: 0 0 4px; padding: 0; list-style: none; }

.activity-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.activity-row:hover { background: var(--surface-2); }
.activity-row.is-new { background: var(--choice-on); }
.activity-thumb { width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: var(--tile); }
.activity-thumb .img-fallback span { font-size: 24px; }
.activity-text { line-height: 1.4; }
.activity-text small { display: block; margin-top: 2px; color: var(--ink-3); font-size: 12px; }
.activity-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--heart); }

/* ---------- Account and family settings ---------- */

.page--narrow { max-width: 760px; margin: 0 auto; }
.settings-panel { margin-bottom: 16px; }
.settings-panel > .label:first-of-type { margin-top: 0; }
.settings-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.settings-signout { display: flex; justify-content: center; margin: 24px 0 8px; }

.profile-row { display: flex; align-items: flex-start; gap: 20px; }
.profile-fields { flex: 1; min-width: 0; }
.profile-fields > .label:first-child { margin-top: 0; }

.swatches { display: flex; flex-wrap: wrap; gap: 8px; }

.swatch {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: transform .12s;
}

.swatch:hover { transform: scale(1.1); }
.swatch.is-on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--ink); }

.invite-row { display: flex; gap: 8px; }
.invite-row input { flex: 1; min-width: 0; color: var(--ink-2); font-size: 14px !important; }
.invite-row .btn { height: 44px; }
.invite-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }

.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; min-width: 0; }
.inline-form .btn { height: 44px; }

.rows { margin: 0; padding: 0; list-style: none; }

.row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.row:first-child { border-top: 0; padding-top: 4px; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 3px; color: var(--ink-2); font-size: 13px; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }

.tag--admin { border-color: transparent; background: var(--brand-soft); color: var(--brand); }
.btn-text--danger { color: var(--danger); }
.btn-text--danger:hover { background: var(--danger-soft); color: var(--danger); }
.chip--person { display: inline-flex; align-items: center; gap: 7px; padding-left: 4px; }

.temp-pass {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px dashed var(--line-2);
  border-radius: 12px;
  background: var(--surface-2);
}

.temp-pass code { font-size: 20px; font-weight: 800; letter-spacing: .02em; }

.email { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.email-head { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); font-size: 13px; }
.email-head div { padding: 2px 0; }
.email-head span { display: inline-block; width: 64px; color: var(--ink-3); font-weight: 700; }
.email-body { padding: 4px 18px 8px; font-size: 14px; line-height: 1.55; }
.email-body ul { padding-left: 20px; }
.email-body li { margin: 6px 0; }

.empty-family { display: flex; align-items: center; gap: 14px; }
.empty-family span { font-size: 32px; }
.empty-family p { margin: 0; }

/* ---------- Bottom navigation (phones) ---------- */

.bottomnav { display: none; }

@media (max-width: 860px) {
  .topnav { display: none; }
  .stats--dinner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px; }
  .brand { font-size: 18px; }
  .search { order: 3; flex-basis: 100%; max-width: none; height: 40px; }
  .bell { margin-left: auto; width: 40px; height: 40px; }
  .account-text { display: none; }
  .account-btn { padding: 2px; }
  .subbar-inner { padding: 6px 16px; }

  .main { padding: 16px 16px 96px; }

  .hero { flex-direction: column; align-items: stretch; padding: 26px 22px; border-radius: 20px; }
  .hero h1 { font-size: 31px; }
  .hero p { font-size: 15px; }
  .hero-count { flex-direction: row; align-items: baseline; justify-content: center; gap: 10px; padding: 12px 16px; }
  .hero-days { font-size: 44px; }
  .hero-actions .btn { flex: 1; }

  .home-panels { grid-template-columns: 1fr; }
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }

  .page-title h1, .list-head h1 { font-size: 27px; }
  .tab { padding: 7px 11px; font-size: 13px; }
  .list-head-add { width: 100%; margin-left: 0; }
  .toolbar-right { width: 100%; }
  .select { flex: 1; }
  .select select { flex: 1; min-width: 0; }

  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card-body { padding: 10px 10px 12px; }
  .card-title { font-size: 14px; }
  .price { font-size: 20px; }
  .card--add { min-height: 0; padding: 18px 10px; }
  .card--add small { display: none; }
  .badge-wanted { top: 8px; left: 8px; padding: 3px 7px; font-size: 11px; }
  .stamp svg { width: 24px; height: 24px; padding: 11px; }

  .stats--dinner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat--wide { grid-column: 1 / -1; }
  .stat > b { font-size: 24px; }

  .gift-row { grid-template-columns: 56px minmax(0, 1fr); }
  .gift-thumb { width: 56px; height: 56px; }
  .gift-actions { grid-column: 1 / -1; justify-content: flex-start; }

  .dinner-cat-head h2 { font-size: 22px; }

  .overlay { align-items: flex-end; padding: 0; }
  .sheet { max-height: 92vh; border-radius: 20px 20px 0 0; animation: slide-up .25s ease; }
  .sheet-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-photo { display: grid; grid-template-columns: 96px 1fr; align-items: center; }
  .editor-photo .photo-preview { grid-row: span 2; }

  .toasts { bottom: 84px; }

  .bottomnav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: var(--surface);
  }

  .bottomnav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 0 7px;
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
  }

  .bottomnav a.is-active { color: var(--brand); }

  .picker h1 { font-size: 34px; }
  .avatar--xl { width: 84px; height: 84px; font-size: 34px; }
  .form-card { padding: 20px 18px; }

  .row { grid-template-columns: auto minmax(0, 1fr); }
  .row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .invite-row { flex-wrap: wrap; }
  .invite-row input { flex-basis: 100%; }
  .invite-row .btn { flex: 1; }
  .profile-row { flex-direction: column; align-items: center; }
  .profile-fields { width: 100%; }
  .settings-panel .two-col { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-color-scheme: dark) {
  .demo-strip { background: #2b2412; color: #f4d58d; }
  .demo-pill { background: #f4d58d; color: #2b2412; }
  .stamp svg { background: #20262e; }
  .btn-claim { box-shadow: none; }
}
