/* What's Missing? – "Boutique deli": cream wrapping paper, burgundy-eggplant ink, black for
   text and thin frames, mustard gold for small states (bought, on the way, counts).
   Solid paper surfaces (no glass), slightly rounded corners, a price-tag logo,
   the grocery icon pattern on the home and sign-in pages only. */
:root {
  --bg: #F4ECDF;             /* cream */
  --bg-2: #F4ECDF;
  --paper: #FBF7F0;          /* raised surfaces: cards, fields, sheets */
  --ink: #16110F;            /* black: text, thin frames, secondary buttons */
  --wine: #6E1730;           /* burgundy-eggplant: brand, main buttons, section titles */
  --wine-deep: #4E0F22;
  --muted: #6B5A58;          /* 5.6:1 on --bg */
  --accent: #B08423;         /* mustard gold: marks and fills only, never small text on cream */
  --accent-soft: #F1E2BD;
  --accent-ink: #6E1730;     /* links and section titles */
  --glass: var(--paper);
  --glass-line: var(--line);
  --card: var(--paper);
  --card-line: var(--line);
  --field: var(--paper);
  --line: rgba(22, 17, 15, .16);
  --chip: #F1E2BD;
  --chip-ink: #5E430B;
  --soft: #EFE3D6;
  --soft-ink: #6E1730;
  --on-ink: #FBF7F0;
  --danger: #B42318;
  --ok: #4F6B2E;
  --line-art: #6E1730;
  --a1: #F1E2BD; --a2: #EBD5D9; --a3: #E2E4CF; --a4: #E6D8C8;
  --pattern: url("/img/pattern.svg");

  --font-head: "Frank Ruhl Libre", Georgia, serif;
  --font-body: "Heebo", "Segoe UI", Arial, sans-serif;
  --font-mono: var(--font-body);
  --radius: 12px;            /* cards */
  --radius-s: 8px;
  --pill: 8px;               /* buttons, fields, tabs */
  --chip-r: 6px;             /* small tags and counts */
  --shadow: none;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.55 var(--font-body);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 500; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: 34px; }
h2 { font-size: 22px; }
a { color: var(--accent-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 540px; margin: 0 auto; padding-block: 8px 48px; position: relative; z-index: 1; }

/* the grocery icon pattern (home and sign-in pages only) */
.pattern-band { width: 100vw; margin-inline-start: calc(50% - 50vw); background: var(--bg) var(--pattern) 0 0 / 480px 480px; border-block: 1.5px solid var(--ink); padding: 34px 16px; display: grid; place-items: center; }
body.patterned { background: var(--bg) var(--pattern) 0 0 / 480px 480px; }
body.patterned main.wrap { background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 24px 20px; margin-top: 18px; margin-bottom: 40px; }
body.patterned main.wrap .card { background: none; border: 0; padding: 0; }

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 540px; margin: 0 auto; padding-top: max(14px, env(safe-area-inset-top, 0px)); padding-bottom: 6px; position: relative; z-index: 2; }
/* logo: a burgundy price tag with a punched hole, slightly tilted */
.logo { position: relative; font-family: var(--font-head); font-weight: 500; font-size: 21px; line-height: 1; color: var(--paper); background: var(--wine); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 16px 6px 34px; border-radius: 0 6px 6px 0;
  clip-path: polygon(18px 0, 100% 0, 100% 100%, 18px 100%, 0 50%); transform: rotate(-3deg); }
.logo::before { content: ""; position: absolute; left: 12px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--bg); }
.logo:hover { background: var(--wine-deep); }
.tag-big { font-size: clamp(40px, 11vw, 56px); min-height: 0; padding: 14px 30px 14px 56px; clip-path: polygon(30px 0, 100% 0, 100% 100%, 30px 100%, 0 50%); border-radius: 0 10px 10px 0; }
.tag-big::before { left: 20px; width: 12px; height: 12px; margin-top: -6px; }
.icon-btn { width: 44px; height: 44px; border-radius: var(--pill); border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0; font: inherit; }
.icon-btn svg { width: 21px; height: 21px; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 15px; }

/* section title like a deli price card: name, then a dotted leader */
.crate { display: flex; align-items: baseline; gap: 10px; color: var(--wine); }
.crate::after { content: ""; flex: 1; border-bottom: 2px dotted currentColor; opacity: .45; transform: translateY(-4px); }

/* cards and forms */
.card { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.strong { border-color: var(--ink); }
.stack { display: flex; flex-direction: column; gap: 14px; }
label { font-size: 14px; font-weight: 500; display: block; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=password] {
  width: 100%; min-height: 50px; padding: 10px 20px; font: inherit; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--ink); border-radius: var(--pill);
}
input::placeholder { color: #8A7774; }
input:focus-visible, button:focus-visible, a:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hint { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.error { color: var(--danger); font-size: 14px; margin: 0; }
.error:empty { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 10px 22px;
  font: inherit; font-weight: 500; border-radius: var(--pill); cursor: pointer; text-decoration: none;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.btn:hover { background: var(--ink); color: var(--bg); }
/* main action: solid burgundy */
.btn.cta, .btn.primary { background: var(--wine); color: var(--on-ink); border-color: var(--wine); font-weight: 600; }
.btn.cta:hover, .btn.primary:hover { background: var(--wine-deep); border-color: var(--wine-deep); color: var(--on-ink); }
.btn.soft { background: var(--soft); color: var(--soft-ink); border-color: transparent; }
.btn.soft:hover { background: #E6D5C6; color: var(--soft-ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--wine); text-decoration: underline; text-underline-offset: 4px; }
.btn.ghost:hover { background: transparent; color: var(--wine-deep); }
.btn.danger { color: var(--danger); border-color: rgba(180, 35, 24, .45); background: transparent; }
.btn.danger:hover { background: var(--danger); color: var(--paper); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .btn { flex: 1 1 140px; }

/* avatars */
.avatars { display: flex; }
.av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 500;
  border: 2px solid var(--paper); background: var(--a1); color: var(--ink); margin-inline-start: -8px; flex: none; }
.avatars .av:first-child { margin-inline-start: 0; }
.av.c1 { background: var(--a1); } .av.c2 { background: var(--a2); } .av.c3 { background: var(--a3); } .av.c4 { background: var(--a4); }

/* group list */
.group-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--ink); min-height: 72px; }
.group-link:hover { border-color: var(--ink); }
.group-link .name { font-family: var(--font-head); font-size: 21px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--muted); }
[dir=rtl] .chev { transform: scaleX(-1); }

.member { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.member:last-child { border-bottom: 0; }
.member .who { flex: 1; min-width: 0; }
.tag { font-size: 12.5px; padding: 3px 10px; border-radius: var(--chip-r); background: var(--chip); color: var(--chip-ink); }

.linkbox { display: flex; gap: 8px; align-items: center; background: var(--field); border: 1.5px solid var(--line); border-radius: var(--pill); padding: 12px 18px; }
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; font: 13px "IBM Plex Mono", ui-monospace, monospace; color: var(--muted); }

.empty { text-align: center; padding: 30px 20px; }
.empty .big { font-size: 40px; line-height: 1; }

/* ---------- landing ---------- */
html, body { overflow-x: clip; }
.eyebrow { font-size: 14px; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cta-row { display: flex; gap: 10px; align-items: center; }
.cta-row .btn { flex: 1; }
.lead { font-size: 17px; color: var(--muted); margin: 0; }
.steps { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }

.lp { position: relative; z-index: 1; }
.lp-hero { width: 100vw; margin-inline-start: calc(50% - 50vw); background: var(--bg) var(--pattern) 0 0 / 480px 480px; border-block: 1.5px solid var(--ink); margin-top: 8px; }
.lp-inner { max-width: 1080px; margin: 0 auto; padding: 24px max(16px, env(safe-area-inset-right, 0px)) 36px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: 24px; align-items: center; }
.lp-copy { background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 24px 20px; display: grid; gap: 16px; min-width: 0; }
.lp-copy h1 { font-size: clamp(34px, 8.5vw, 54px); line-height: 1.06; }
.lp-demo { margin: 0; display: grid; justify-items: center; gap: 16px; min-width: 0; }
@media (min-width: 900px) {
  .lp-inner { grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; padding-block: 56px 64px; }
  .lp-copy { padding: 36px 34px; }
}

/* the phone */
.ph { position: relative; width: 300px; max-width: 100%; height: 600px; border: 10px solid var(--ink); border-radius: 42px; background: var(--bg); overflow: hidden; display: flex; flex-direction: column; font-size: 14px; isolation: isolate; }
.ph-status { position: relative; height: 26px; flex: none; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; font-size: 11px; font-weight: 600; direction: ltr; }
.ph-notch { position: absolute; top: 0; left: 50%; width: 92px; height: 20px; margin-left: -46px; background: var(--ink); border-radius: 0 0 14px 14px; }
.ph-bar { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px 10px; flex: none; }
.ph-title { font-family: var(--font-head); font-weight: 500; font-size: 24px; }
.ph-av { display: flex; }
.ph-av i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; border: 2px solid var(--bg); margin-inline-start: -7px; background: var(--a1); }
.ph-av i:nth-child(2) { background: var(--a2); } .ph-av i:nth-child(3) { background: var(--a3); }
.ph-body { flex: 1; min-height: 0; padding: 0 12px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.ph-input { height: 42px; flex: none; border: 1.5px solid var(--ink); border-radius: var(--radius-s); background: var(--paper); display: flex; align-items: center; gap: 6px; padding-inline: 12px 5px; }
.ph-type { display: inline-block; overflow: hidden; white-space: nowrap; max-width: 0; animation: lp-type 16s steps(8) infinite; }
.ph-caret { width: 1.5px; height: 17px; background: var(--accent); animation: blink 1s steps(1) infinite; }
.ph-go { margin-inline-start: auto; width: 30px; height: 30px; border-radius: 6px; background: var(--wine); color: var(--on-ink); display: grid; place-items: center; font-size: 18px; }
.ph-trip { position: absolute; top: 0; inset-inline: 12px; height: 42px; border-radius: var(--radius); background: var(--wine); color: var(--on-ink); display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 13px; font-weight: 600; opacity: 0; z-index: 2; animation: lp-trip 16s cubic-bezier(.2, .8, .2, 1) infinite; }
.ph-trip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; animation: ring 1.4s infinite; }
.ph-now { margin-inline-start: auto; font-size: 11px; font-weight: 400; opacity: .8; }
.ph-sort { display: flex; gap: 6px; flex: none; }
.ph-sort span { font-size: 12px; padding: 4px 10px; border-radius: var(--chip-r); border: 1.5px solid var(--line); }
.ph-sort .s-new { animation: lp-snew 16s infinite; }
.ph-sort .s-cat { animation: lp-scat 16s infinite; }
.ph-lists { position: relative; flex: 1; min-height: 0; }
.ph-a, .ph-b { position: absolute; inset: 0; }
.ph-a { animation: lp-a 16s infinite; }
.ph-b { opacity: 0; animation: lp-b 16s cubic-bezier(.2, .8, .2, 1) infinite; }
.ph-h { display: flex; align-items: baseline; gap: 6px; font-family: var(--font-head); font-weight: 500; font-size: 15px; color: var(--wine); margin-top: 6px; }
.ph-h::after { content: ""; flex: 1; border-bottom: 2px dotted currentColor; opacity: .45; }
.ph-it { display: flex; align-items: center; gap: 8px; height: 44px; border-bottom: 1px solid var(--line); }
.ph-it svg { width: 30px; height: 30px; flex: none; fill: none; stroke: var(--line-art); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 120; }
.ph-it .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(var(--accent), var(--accent)) no-repeat 100% 55% / 0 2px; }
[dir=ltr] .ph-it .nm { background-position: 0 55%; }
.ph-it .who { font-size: 11px; color: var(--muted); display: grid; text-align: end; }
.ph-it .who > span { grid-area: 1 / 1; }
.ph-it .w2 { opacity: 0; color: var(--chip-ink); font-weight: 500; }
.ph-it .ck { width: 22px; height: 22px; flex: none; border-radius: var(--chip-r); border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 13px; color: transparent; }
.ph-it .ck::after { content: "✓"; }
/* items arriving in the "order added" view: one after another, the drawing sketches itself */
.ph-a .ph-it { opacity: 0; animation: lp-in 16s cubic-bezier(.2, .8, .2, 1) infinite; }
.ph-a .ph-it svg { animation: lp-draw 16s ease infinite; }
.ph-a .a2, .ph-a .a2 svg { animation-delay: .96s; }
.ph-a .a3, .ph-a .a3 svg { animation-delay: 1.76s; }
.ph-a .a4, .ph-a .a4 svg { animation-delay: 2.56s; }
/* checking off in the sorted view */
.ph-b .b1 .ck, .ph-b .b2 .ck, .ph-b .b3 .ck { animation: lp-ck 16s infinite; }
.ph-b .b1 .nm, .ph-b .b2 .nm, .ph-b .b3 .nm { animation: lp-strike 16s infinite; }
.ph-b .w1 { animation: lp-w1 16s infinite; }
.ph-b .w2 { animation: lp-w2 16s infinite; }
.ph-b .b2 .ck, .ph-b .b2 .nm, .ph-b .b2 .w1, .ph-b .b2 .w2 { animation-delay: .64s; }
.ph-b .b3 .ck, .ph-b .b3 .nm, .ph-b .b3 .w1, .ph-b .b3 .w2 { animation-delay: 1.28s; }
.ph-cta { margin: 8px 12px 14px; height: 44px; flex: none; border-radius: var(--radius-s); background: var(--wine); color: var(--on-ink); display: grid; place-items: center; font-weight: 600; animation: lp-press 16s infinite; }
.ph-tap { position: absolute; bottom: 26px; left: 50%; width: 36px; height: 36px; margin-left: -18px; border-radius: 50%; background: rgba(22, 17, 15, .28); opacity: 0; pointer-events: none; animation: lp-tap 16s infinite; }
.ph-notif { position: absolute; top: 30px; inset-inline: 8px; z-index: 3; background: var(--ink); color: var(--on-ink); border-radius: 14px; padding: 9px 10px; display: flex; gap: 10px; align-items: center; transform: translateY(-140%); animation: lp-notif 16s cubic-bezier(.2, .8, .2, 1) infinite; }
.ph-notif-txt { display: grid; font-size: 11.5px; line-height: 1.35; min-width: 0; }
.ph-notif-txt b { font-weight: 600; }
.logo.ph-mini { font-size: 11px; min-height: 22px; padding: 3px 8px 3px 17px; clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); flex: none; }
.logo.ph-mini::before { left: 7px; width: 4px; height: 4px; margin-top: -2px; background: var(--ink); }

/* captions: the step on screen is highlighted */
.lp-caps { width: 100%; max-width: 360px; display: flex; gap: 10px; align-items: flex-start; }
.lp-steps { flex: 1; min-width: 0; list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 6px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); }
.lp-steps li { display: flex; gap: 10px; align-items: center; font-size: 14px; line-height: 1.35; opacity: .42; }
.lp-steps svg { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--line-art); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lp-steps .c1 { animation: lp-c1 16s infinite; } .lp-steps .c2 { animation: lp-c2 16s infinite; }
.lp-steps .c3 { animation: lp-c3 16s infinite; } .lp-steps .c4 { animation: lp-c4 16s infinite; }
.demo-pause { flex: none; width: 44px; height: 44px; border-radius: var(--pill); border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); cursor: pointer; display: grid; place-items: center; font-size: 13px; }
.lp-demo.paused *, .lp-demo.paused *::before, .lp-demo.paused *::after { animation-play-state: paused !important; }
/* still frame that tells the whole story (reduced motion starts here) */
.lp-demo.still *, .lp-demo.still *::before, .lp-demo.still *::after { animation-delay: -12.6s !important; }

@keyframes lp-type { 0%, 3% { max-width: 0 } 11%, 13% { max-width: 9em } 14%, 100% { max-width: 0 } }
@keyframes lp-in { 0%, 13% { opacity: 0; transform: translateY(-10px) } 16%, 40% { opacity: 1; transform: none } 44%, 100% { opacity: 0 } }
@keyframes lp-draw { 0%, 14% { stroke-dashoffset: 120 } 24%, 44% { stroke-dashoffset: 0 } 46%, 100% { stroke-dashoffset: 120 } }
@keyframes lp-a { 0%, 35% { opacity: 1 } 39%, 99% { opacity: 0 } 100% { opacity: 1 } }
@keyframes lp-b { 0%, 36% { opacity: 0; transform: translateY(8px) } 40%, 95% { opacity: 1; transform: none } 98%, 100% { opacity: 0 } }
@keyframes lp-snew { 0%, 35% { background: var(--ink); color: var(--on-ink); border-color: var(--ink) } 37%, 97% { background: transparent; color: var(--ink); border-color: var(--line) } 99%, 100% { background: var(--ink); color: var(--on-ink); border-color: var(--ink) } }
@keyframes lp-scat { 0%, 35% { background: transparent; color: var(--ink); border-color: var(--line) } 37%, 97% { background: var(--ink); color: var(--on-ink); border-color: var(--ink) } 99%, 100% { background: transparent; color: var(--ink); border-color: var(--line) } }
@keyframes lp-press { 0%, 46% { transform: none; background: var(--wine) } 48% { transform: scale(.94); background: var(--wine-deep) } 51%, 100% { transform: none; background: var(--wine) } }
@keyframes lp-tap { 0%, 44% { opacity: 0; transform: scale(1.5) } 47% { opacity: 1; transform: scale(1) } 51%, 100% { opacity: 0; transform: scale(.8) } }
@keyframes lp-notif { 0%, 50% { transform: translateY(-140%) } 53%, 61% { transform: none } 64%, 100% { transform: translateY(-140%) } }
@keyframes lp-trip { 0%, 50% { opacity: 0; transform: translateY(-8px) } 53%, 95% { opacity: 1; transform: none } 98%, 100% { opacity: 0 } }
@keyframes lp-ck { 0%, 65% { background: transparent; border-color: var(--ink); color: transparent } 67%, 97% { background: var(--accent); border-color: var(--accent); color: var(--on-ink) } 99%, 100% { background: transparent; border-color: var(--ink); color: transparent } }
@keyframes lp-strike { 0%, 66% { background-size: 0 2px; color: var(--ink) } 70%, 97% { background-size: 100% 2px; color: var(--muted) } 99%, 100% { background-size: 0 2px; color: var(--ink) } }
@keyframes lp-w1 { 0%, 66% { opacity: 1 } 68%, 97% { opacity: 0 } 99%, 100% { opacity: 1 } }
@keyframes lp-w2 { 0%, 66% { opacity: 0 } 68%, 97% { opacity: 1 } 99%, 100% { opacity: 0 } }
@keyframes lp-c1 { 0%, 32% { opacity: 1 } 34%, 98% { opacity: .42 } 100% { opacity: 1 } }
@keyframes lp-c2 { 0%, 33% { opacity: .42 } 35%, 47% { opacity: 1 } 49%, 100% { opacity: .42 } }
@keyframes lp-c3 { 0%, 48% { opacity: .42 } 50%, 63% { opacity: 1 } 65%, 100% { opacity: .42 } }
@keyframes lp-c4 { 0%, 64% { opacity: .42 } 66%, 96% { opacity: 1 } 98%, 100% { opacity: .42 } }
@keyframes blink { 50% { opacity: .25 } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(176, 132, 35, .6) } 100% { box-shadow: 0 0 0 10px rgba(176, 132, 35, 0) } }

/* settings sheet */
.sheet-back { position: fixed; inset: 0; background: rgba(22, 17, 15, .4); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.sheet { width: 100%; max-width: 540px; background: var(--paper); border-radius: var(--radius) var(--radius) 0 0; border-top: 1.5px solid var(--ink);
  padding: 22px max(20px, env(safe-area-inset-right, 0px)) max(24px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 16px; max-height: 90vh; overflow-y: auto; }
.sheet header { display: flex; justify-content: space-between; align-items: center; }
.seg { display: flex; border: 1.5px solid var(--line); border-radius: var(--pill); overflow: hidden; padding: 4px; gap: 4px; background: var(--field); }
.seg button { flex: 1; min-height: 44px; font: inherit; border: 0; border-radius: var(--pill); background: transparent; color: var(--ink); cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--on-ink); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.switch { width: 56px; height: 32px; border-radius: 20px; border: 1.5px solid var(--ink); background: var(--soft); position: relative; cursor: pointer; flex: none; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: inset-inline-start .15s; }
.switch[aria-checked=true] { background: var(--ink); border-color: var(--ink); }
.switch[aria-checked=true]::after { inset-inline-start: 27px; background: var(--accent); }

.toast { position: fixed; bottom: max(20px, env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--on-ink);
  padding: 12px 20px; border-radius: var(--pill); font-size: 15px; z-index: 60; max-width: calc(100% - 32px); }

/* ---------- list screen ---------- */
.ghead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ghead h1 { font-size: 32px; min-width: 0; overflow-wrap: anywhere; }
.people-btn { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px; padding-inline-start: 12px; border-radius: var(--pill); border: 1.5px solid var(--ink); background: var(--paper); text-decoration: none; color: var(--ink); flex: none; }
.people-btn .plus { width: 30px; height: 30px; border-radius: var(--chip-r); background: var(--wine); color: var(--on-ink); display: grid; place-items: center; font-size: 17px; line-height: 1; }

.ltabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin-inline: -2px; scrollbar-width: none; }
.ltabs::-webkit-scrollbar { display: none; }
.ltab { flex: none; min-height: 42px; padding: 6px 16px; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.ltab .n { font: 12px var(--font-mono); min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--chip-r); background: var(--chip); color: var(--chip-ink); display: inline-grid; place-items: center; }
.ltab[aria-selected=true] { background: var(--wine); border-color: var(--wine); color: var(--on-ink); }
.ltab[aria-selected=true] .n { background: var(--accent-soft); color: var(--chip-ink); }
.ltab.add { border-style: dashed; color: var(--muted); background: transparent; }

.addbox { display: flex; flex-direction: column; gap: 6px; }
.addrow { display: flex; gap: 8px; align-items: center; background: var(--field); border: 1.5px solid var(--ink); border-radius: var(--pill); padding: 5px; padding-inline-start: 8px; }
.addrow input { border: 0; background: transparent; min-height: 44px; padding: 8px 12px; flex: 1; min-width: 0; }
.addrow input:focus-visible { outline: none; }
.addrow:focus-within { box-shadow: 0 0 0 3px var(--accent); }
.addrow .go { width: 44px; height: 44px; border-radius: var(--radius-s); border: 0; background: var(--wine); color: var(--on-ink); font-size: 24px; line-height: 1; cursor: pointer; flex: none; }
.more-toggle { align-self: flex-start; background: none; border: 0; color: var(--accent-ink); font: inherit; font-size: 14px; min-height: 40px; padding: 0 8px; cursor: pointer; }
.more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 8px; }
.more input { min-height: 46px; }

.listmeta { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--muted); min-height: 28px; flex-wrap: wrap; gap: 6px; }
.listmeta button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; min-height: 36px; padding: 0 4px; }

.items { display: flex; flex-direction: column; gap: 8px; }
.item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius); background: var(--paper); border: 1.5px solid var(--line); }
.item.new { animation: pop .6s ease-out; }
@keyframes pop { from { background: var(--accent-soft); transform: translateY(-6px); } to { background: var(--card); transform: none; } }
.item .ill { width: 46px; height: 46px; border-radius: var(--radius-s); background: var(--bg); border: 1px solid var(--line); color: var(--accent-ink); display: grid; place-items: center; font-size: 22px; flex: none; overflow: hidden; }
.item .ill img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item .ill.pending { animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.item .body { flex: 1; min-width: 0; background: none; border: 0; padding: 4px 0; text-align: start; font: inherit; color: inherit; cursor: pointer; min-height: 44px; display: flex; flex-direction: column; justify-content: center; }
.item .nm { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.item .qty { display: inline-block; margin-inline-start: 6px; font-size: 12px; font-weight: 500; padding: 1px 8px; border-radius: var(--chip-r); background: var(--chip); color: var(--chip-ink); vertical-align: 1px; }
.item .sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .by { font-size: 12px; padding: 3px 10px; border-radius: var(--chip-r); background: var(--chip); color: var(--chip-ink); flex: none; max-width: 32%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chk { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; padding: 0; cursor: pointer; flex: none; display: grid; place-items: center; }
.chk span { width: 30px; height: 30px; border-radius: var(--chip-r); border: 1.5px solid var(--ink); display: grid; place-items: center; color: var(--on-ink); font-size: 15px; line-height: 1; transition: background .15s; }
.chk:hover span { background: rgba(22, 17, 15, .06); }
.chk[aria-pressed=true] span { background: var(--accent); border-color: var(--accent); }
.item.bought { opacity: .7; background: transparent; }
.item.bought .nm { text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 2px; color: var(--muted); }

.bought-head { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }
.bought-head h2 { font-size: 19px; flex: 1; }
.empty-list { text-align: center; padding: 26px 14px; color: var(--muted); }
.empty-list .big { font-size: 38px; line-height: 1; margin-bottom: 8px; }
.cat-head { font-size: 19px; margin: 12px 0 0; }
.items > .cat-head:first-child { margin-top: 0; }

.live { display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.live.off::before { background: var(--accent); animation: blink 1s infinite; }

.sortseg { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--pill); overflow: hidden; padding: 3px; gap: 3px; background: var(--field); flex: none; }
.sortseg button { background: transparent; border: 0; border-radius: var(--pill); color: var(--muted); font: inherit; font-size: 13px; min-height: 34px; padding: 0 12px; cursor: pointer; }
.sortseg button[aria-pressed=true] { background: var(--ink); color: var(--on-ink); }
.select { width: 100%; min-height: 50px; padding: 8px 18px; font: inherit; color: var(--ink); background: var(--field); border: 1.5px solid var(--ink); border-radius: var(--pill); }

/* shopping trips */
.trips { display: flex; flex-direction: column; gap: 8px; }
.trip { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 6px 8px; padding-inline-start: 18px; border-radius: var(--radius); background: var(--paper); border: 1.5px solid var(--line); color: var(--ink); font-size: 15px; }
.trip.mine { background: var(--wine); color: var(--on-ink); border-color: var(--wine); }
.trip.mine .when { color: var(--on-ink); opacity: .8; }
.trip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; animation: ring 1.4s infinite; }
.trip .txt { flex: 1; min-width: 0; }
.trip .txt b { font-weight: 500; }
.trip .when { font-size: 12.5px; color: var(--muted); flex: none; padding-inline-end: 10px; }
.trip button { flex: none; min-height: 44px; padding: 4px 16px; border-radius: var(--pill); border: 0; background: var(--accent); color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }

.bottom-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(to bottom, rgba(244, 236, 223, 0), var(--bg) 45%); }
.bottom-cta .btn { width: 100%; max-width: 540px; margin: 0 auto; display: flex; }
.has-bottom-cta { padding-bottom: 120px !important; }
body:has(.bottom-cta:not([hidden])) .toast { bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .item.new, .item .ill.pending, .live.off::before, .trip .dot { animation: none !important; }
}

/* "redraw the picture" row in the item sheet */
.redraw { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius); background: var(--field); border: 1.5px solid var(--line); font-size: 15px; }
.redraw img { width: 56px; height: 56px; border-radius: var(--radius-s); flex: none; }
.redraw .btn { min-height: 44px; padding: 8px 16px; flex: none; }

/* suggestions while typing + "often bought" chips */
.addbox { position: relative; }
.sugs { list-style: none; margin: 0; padding: 6px; border-radius: var(--radius); background: var(--paper); border: 1.5px solid var(--ink); box-shadow: 0 10px 0 -4px rgba(22, 17, 15, .08); display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 15; }
.sugs .opt { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 6px; padding-inline-start: 8px; border-radius: var(--radius-s); cursor: pointer; }
.sugs .opt:hover, .sugs .opt[aria-selected=true] { background: var(--soft); }
.sugs .ill, .freq .ill { width: 36px; height: 36px; border-radius: var(--chip-r); background: var(--bg); color: var(--accent-ink); display: grid; place-items: center; font-size: 15px; flex: none; overflow: hidden; }
.sugs .ill img, .freq .ill img { width: 100%; height: 100%; display: block; }
.sugs .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sugs .txt small { font-size: 12px; color: var(--muted); }
.sugs .forget { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; flex: none; }
.sugs .forget:hover { background: rgba(22, 17, 15, .07); color: var(--ink); }
.freq { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; align-items: center; scrollbar-width: none; }
.freq::-webkit-scrollbar { display: none; }
.freq .lbl { font-size: 13px; color: var(--muted); flex: none; }
.freq .chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px; padding-inline-start: 4px; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.freq .chip .ill { width: 34px; height: 34px; }
.freq .chip:hover { border-color: var(--ink); }

/* "Someone is on the way to the store" banner, under the top bar on every page */
.trip-banner { max-width: 540px; margin: 4px auto 10px; display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 2; }
.trip-banner[hidden] { display: none; }
.tb { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 18px; padding-inline: 18px 8px; border-radius: var(--radius);
  background: var(--wine); color: var(--on-ink); animation: tb-in .45s cubic-bezier(.2, .8, .2, 1); }
.tb .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); flex: none; animation: ring 1.4s infinite; }
.tb .txt { flex: 1; min-width: 0; line-height: 1.35; }
.tb .txt b { font-weight: 600; }
.tb .sub { display: block; font-size: 13.5px; opacity: .85; }
.tb .go { flex: none; min-height: 44px; display: inline-flex; align-items: center; padding: 6px 16px; border-radius: var(--pill); background: var(--paper); color: var(--wine); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.tb .x { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--on-ink); font: inherit; font-size: 18px; cursor: pointer; opacity: .8; }
@keyframes tb-in { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }
@media (max-width: 420px) { .tb { flex-wrap: wrap; } .tb .txt { flex-basis: calc(100% - 80px); } .tb .go { margin-inline-start: 24px; } }
@media (prefers-reduced-motion: reduce) { .tb, .tb .dot { animation: none !important; } }

/* ---------- new list: what the AI understood ---------- */
.understood { border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--soft); padding: 14px 16px; }
.understood:empty { display: none; }
.understood .lead { font-family: var(--font-head); font-size: 18px; margin: 0 0 8px; color: var(--wine); }
.understood ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.understood li { display: flex; gap: 8px; align-items: baseline; font-size: 15px; }
.understood li span[aria-hidden] { flex: 0 0 auto; width: 1.2em; text-align: center; }
textarea.field { width: 100%; min-height: 76px; padding: 12px 16px; font: inherit; color: var(--ink); background: var(--field); border: 1.5px solid var(--ink); border-radius: var(--pill); resize: vertical; }
textarea.field:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* "thinking" dots inside a busy button */
.think { display: inline-flex; gap: 4px; margin-inline-end: 8px; vertical-align: middle; }
.think i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: think 1s infinite ease-in-out; }
.think i:nth-child(2) { animation-delay: .15s; } .think i:nth-child(3) { animation-delay: .3s; }
@keyframes think { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .think i { animation: none; opacity: .7; } }
/* who's in charge of an open item */
.item .by.charge { background: var(--soft); color: var(--wine); border: 1px solid var(--line); }
.item .by.charge.me { background: var(--wine); color: var(--on-ink); border-color: var(--wine); }

/* phone notifications */
.push-box .switch[disabled] { opacity: .45; cursor: default; }
.ios-steps { margin: 0; padding-inline-start: 22px; display: grid; gap: 4px; }
.push-invite .icon-btn { flex: none; }
/* landing: other lists, a bonus under the hero */
.lp-more { padding: 8px 16px 48px; }
.lp-more-inner { display: block; max-width: 760px; margin: 0 auto; }
.lp-more h2 { font-family: var(--font-head); font-weight: 500; font-size: 26px; color: var(--accent-ink); margin: 0 0 8px; }
.lp-more p { margin: 0 0 14px; color: var(--ink); line-height: 1.55; }
.lp-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lp-chips li { padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--chip-r); background: var(--paper); font-size: 15px; }

/* ---------- side panels, line icons, starter ideas (two columns on wide screens) ---------- */
.la { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--line-art); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.la.big { width: 64px; height: 64px; stroke-width: 1.3; margin: 0 auto 6px; display: block; }
.col-main, .col-side { display: contents; }
.side-only { display: none; }
.side-card { display: flex; flex-direction: column; gap: 12px; }
.side-card h2 { font-size: 20px; }
.page-group .back { order: 1; } .page-group .ghead { order: 2; } .page-group #tabs { order: 3; }
.page-group .side-trip { order: 4; } .page-group #add { order: 5; } .page-group .listmeta { order: 6; }
.page-group #open { order: 7; } .page-group #bought-wrap { order: 8; }
.page-group .side-members { order: 9; margin-top: 18px; }
.page-group .side-members, .page-groups .side-card { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; }
.page-group .side-trip:has(#trips:empty) { display: none; }
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mrow { display: flex; align-items: center; gap: 10px; }
.mrow .av { margin: 0; }
.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.howto li { display: flex; gap: 12px; align-items: center; }
.howto .ic, .tip .ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-s); background: var(--bg); border: 1px solid var(--line); flex: none; }
.side-card.tip { flex-direction: row; align-items: center; background: var(--accent-soft); border-color: transparent; }
.side-card.tip p { margin: 0; font-size: 14.5px; color: var(--chip-ink); }
.page-groups .col-side { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.empty-list { display: grid; justify-items: center; gap: 6px; }
.starter-lbl { margin: 14px 0 2px; font-size: 14px; font-weight: 600; color: var(--wine); }
.starter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.starter-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 12px 4px 8px; padding-inline: 8px 12px; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.starter-chip:hover { border-color: var(--ink); }

@media (min-width: 980px) {
  body.wide .wrap, body.wide .bar, body.wide .trip-banner, body.landing .bar, body.landing .trip-banner { max-width: 1080px; }
  .page-group, .page-groups { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px 40px !important; align-items: start; }
  .col-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .page-groups .col-main { gap: 14px; }
  .col-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; margin-top: 0 !important; }
  .side-only { display: revert; }
  .btn.side-only { display: flex; }
  .page-group .side-trip, .page-group .side-trip:has(#trips:empty) { display: flex; background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 18px; }
  .page-group .side-members { margin-top: 0; }
  .page-group.has-bottom-cta { padding-bottom: 48px !important; }
  body:has(.page-group) .bottom-cta { display: none !important; }
  .page-groups #list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .page-groups #list > .empty, .page-groups #list > :only-child { grid-column: 1 / -1; }
}

/* ---------- toolbar at the bottom (phone and computer) ---------- */
:root { --tabbar-h: 64px; }
.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--paper); border-top: 1.5px solid var(--ink); padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
.tab { min-height: var(--tabbar-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 500; text-decoration: none; background: none; border: 0; cursor: pointer; padding: 6px 2px; -webkit-tap-highlight-color: transparent; }
.tab .ic { position: relative; display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; transition: background .15s; }
.tab .ic svg { width: 23px; height: 23px; }
.tab:hover { color: var(--ink); }
.tab[aria-current=page] { color: var(--wine); }
.tab[aria-current=page] .ic { background: rgba(110, 23, 48, .11); }
.tab:focus-visible { outline: 2px solid var(--wine); outline-offset: -4px; border-radius: 10px; }
.tab.dot .ic::after { content: ""; position: absolute; top: 3px; inset-inline-end: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
body.with-tabbar main.wrap { padding-bottom: calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom, 0px)); }
body.with-tabbar .has-bottom-cta { padding-bottom: calc(var(--tabbar-h) + 120px) !important; }
body.with-tabbar .bottom-cta { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: 12px; }
body.with-tabbar .toast { bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px)); }
body.with-tabbar:has(.bottom-cta:not([hidden])) .toast { bottom: calc(var(--tabbar-h) + 90px + env(safe-area-inset-bottom, 0px)); }
.guide-steps { margin: 0; padding-inline-start: 24px; display: grid; gap: 8px; line-height: 1.45; }
.guide-steps li::marker { color: var(--wine); font-weight: 600; }
.hint.note { background: var(--accent-soft, #F3E6C4); border-radius: var(--radius-s); padding: 10px 12px; color: var(--ink); }

/* computer: the same toolbar, floating at the bottom centre */
@media (min-width: 700px) {
  .tabbar { left: 50%; right: auto; bottom: 18px; transform: translateX(-50%); width: min(520px, calc(100% - 32px));
    border: 1.5px solid var(--ink); border-radius: 16px; padding: 4px; box-shadow: 0 10px 28px rgba(22, 17, 15, .14); }
  .tab { flex-direction: row; gap: 8px; min-height: 52px; font-size: 14.5px; border-radius: 12px; }
  .tab .ic { width: 34px; }
  .tab[aria-current=page] { background: rgba(110, 23, 48, .09); }
  .tab[aria-current=page] .ic { background: none; }
  .tab.dot .ic::after { inset-inline-end: 2px; }
  body.with-tabbar main.wrap { padding-bottom: 120px; }
  body.with-tabbar .bottom-cta { bottom: 86px; background: none; }
  body.with-tabbar .toast { bottom: 96px; }
}
@media (min-width: 980px) {
  body.with-tabbar .page-group.has-bottom-cta { padding-bottom: 120px !important; }
}

/* CloudGrid's floating "Live on the grid" badge: on pages with the toolbar its host becomes a
   zero-height frame, and keepBadgesClear() in app.js sets how high above the bottom it sits. */
body.with-tabbar #cloudgrid-badge-host {
  position: fixed !important; left: 0 !important; right: 0 !important; top: auto !important; width: auto !important; height: 0 !important;
  transform: translateZ(0) !important; z-index: 29 !important;
}

/* ---------- computer: use the whole screen ---------- */
@media (min-width: 980px) {
  body.wide .wrap, body.wide .bar, body.wide .trip-banner { max-width: min(1440px, calc(100vw - 64px)); }
  .page-group, .page-groups { grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 420px); gap: 20px clamp(32px, 4vw, 64px) !important; }
  /* people page: invite on one side, members and leaving on the other */
  .page-people #content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px clamp(24px, 3vw, 48px); align-items: start; }
  .page-people #content > :first-child { grid-column: 1 / -1; }
  .page-people #content > section.card.strong { grid-column: 1; grid-row: 2 / span 6; }
  .page-people #content > :not(:first-child):not(section.card.strong) { grid-column: 2; }
}
@media (min-width: 1280px) {
  .page-groups #list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* "Already on the list" notice under the add field (group page) */
.dup { margin-top: 10px; padding: 12px 14px; background: var(--paper); border: 1px solid var(--ink); border-inline-start: 4px solid var(--accent); border-radius: 8px; }
.dup-txt { margin: 0 0 8px; font-size: 15px; overflow-wrap: anywhere; }
.dup-txt .hint { margin: 0; }
.dup .row { gap: 8px; flex-wrap: wrap; }
.dup .btn { min-height: 44px; padding: 8px 16px; }

/* "Have an invite link?" on the groups page */
.join-link form { display: flex; gap: 8px; flex-wrap: wrap; }
.join-link input { flex: 1 1 220px; min-width: 0; }
.join-link .btn { min-height: 48px; }
