/* We Gab · Only between us. — mobile-first styles */
:root {
  /* Palette taken from wegab_icon.svg: sage #819f75, rose #ce8791, cream #f9f4ee */
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F6F8F4;
  --surface-3: #E9EEE5;
  --ink: #2A3328;
  --ink-2: #5A6857;
  --muted: #8E998B;
  --line: #EDF0EA;
  --primary: #5E8053;          /* deeper sage so white text stays readable */
  --primary-strong: #4B6A42;
  --on-primary: #FFFFFF;
  --primary-soft: #EEF4EA;
  --sage: #819F75;
  --rose: #CE8791;
  --cream: #F9F4EE;
  --accent: #FBEDEE;           /* soft rose */
  --accent-ink: #A2525E;
  --danger: #B5523F;
  --danger-soft: #FCEDE9;
  --warn: #9A6B12;
  --c-birthday: #E4A36E;
  --c-anniv: #CE8791;
  --c-important: #C9A23A;
  --c-reminder: #7FA3C6;
  --c-plan: #819F75;
  --c-activity: #A8C49B;
  --shadow: 0 1px 2px rgba(42, 51, 40, .04), 0 4px 16px rgba(42, 51, 40, .05);
  --shadow-up: 0 -4px 18px rgba(42, 51, 40, .05);
  --r: 20px;
  --tab-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-padding-top: calc(var(--safe-t) + 72px); scroll-padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px); }
body {
  margin: 0; min-height: 100dvh; color: var(--ink); font: 15px/1.45 var(--font);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--font-round); letter-spacing: -.02em; }
h1 { font-size: 28px; line-height: 1.15; font-weight: 750; }
h2 { font-size: 18px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-user-select: none; user-select: none; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; border-radius: 10px; }
[hidden] { display: none !important; }
.ic { width: 22px; height: 22px; flex: none; }
.muted { color: var(--muted); }
small { font-size: 12.5px; }
.loading { padding: 40vh 0 0; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------------ shell */
.shell { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--safe-t) + 8px) var(--gutter) 8px;
  background: rgba(255, 255, 255, .88); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand img { border-radius: 10px; }
.brand div { display: flex; align-items: baseline; gap: 5px; min-width: 0; white-space: nowrap; }
.brand b { font-family: var(--font-round); font-size: 18px; letter-spacing: -.02em; color: var(--primary-strong); }
.brand span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--ink-2); flex: none;
}
.icon-btn:active { background: var(--surface-2); }

.view {
  padding: 4px var(--gutter) calc(var(--tab-h) + var(--safe-b) + 96px);
  max-width: 1100px; margin: 0 auto; outline: none;
}
.view > * + * { margin-top: 14px; }
.page-head { padding: 6px 2px 2px; }
.page-head.row-between { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); margin-bottom: 3px; }

.tabbar {
  position: fixed; z-index: 30; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(var(--n, 6), 1fr);
  padding: 6px max(6px, env(safe-area-inset-left)) calc(var(--safe-b) + 6px) max(6px, env(safe-area-inset-right));
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
  border-top: 1px solid var(--line); box-shadow: var(--shadow-up);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 50px; border-radius: 14px; color: var(--muted); font-size: 11px; font-weight: 650;
}
.tabbar button .ic { width: 24px; height: 24px; transition: transform .2s; }
.tabbar button.active { color: var(--primary-strong); }
.tabbar button.active .ic { transform: translateY(-1px); stroke-width: 2.1; }
.tabbar button.active::before { content: ""; position: absolute; width: 40px; height: 30px; margin-top: -18px; border-radius: 12px; background: var(--primary-soft); z-index: -1; }
.tabbar button { position: relative; isolation: isolate; }

.fab {
  position: fixed; z-index: 25; right: max(18px, env(safe-area-inset-right));
  bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary); box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 40%, transparent);
  transition: transform .15s;
}
.fab .ic { width: 28px; height: 28px; stroke-width: 2.2; }
.fab:active { transform: scale(.94); }

/* ------------------------------------------------------------------ cards & bits */
.card { background: var(--surface); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); border: 1px solid var(--line); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; min-height: 32px; }
.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 14px; align-content: start; }
.row-gap { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.empty { color: var(--muted); padding: 10px 2px; }
.fine { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 12px; }
.fine.top { margin: 0 0 10px; }
.fine.center { text-align: center; padding: 0 12px; }
.fine .ic, .hint .ic, .fx .ic { width: 15px; height: 15px; vertical-align: -3px; margin-right: 2px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.both { background: var(--primary-soft); color: var(--primary-strong); }
.tag.me { background: var(--accent); color: var(--accent-ink); }
.tag.late { background: var(--danger-soft); color: var(--danger); }
.tag.soon { background: var(--accent); color: var(--accent-ink); }
.tag.who { background: var(--primary-soft); color: var(--primary-strong); }
.tagline { text-align: center; color: var(--muted); font-size: 12.5px; margin-top: 22px; letter-spacing: .01em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 650; font-size: 15px;
  transition: transform .1s, filter .15s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.ghost { background: var(--surface-2); color: var(--ink-2); }
.btn.ghost.danger { color: var(--danger); background: var(--danger-soft); }
.btn.danger-solid { background: var(--danger); color: #fff; }
.btn.block { width: 100%; }
.btn.round { width: 46px; padding: 0; border-radius: 50%; flex: none; }
.btn .ic { width: 19px; height: 19px; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 13px; border-radius: 99px;
  background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; font-weight: 650; white-space: nowrap;
}
.pill-btn .ic { width: 16px; height: 16px; }
.pill-btn.on { background: var(--primary-soft); color: var(--primary-strong); }
.pill-btn.danger { color: var(--danger); background: transparent; }

/* segmented controls (buttons or radio labels) */
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg > button, .seg > label { flex: 1; min-height: 38px; display: grid; place-items: center; border-radius: 11px; font-size: 14px; font-weight: 650; color: var(--ink-2); white-space: nowrap; padding: 0 10px; position: relative; }
.seg > label input { position: absolute; opacity: 0; pointer-events: none; }
.seg > button[aria-selected="true"], .seg > label:has(input:checked) { background: var(--surface); color: var(--primary-strong); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.seg > label:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); }
.seg.big > button { min-height: 42px; font-size: 15px; }
.seg.mini { padding: 3px; }
.seg.mini > button { min-height: 30px; font-size: 12.5px; padding: 0 9px; }

/* forms */
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: 13px; font-weight: 650; color: var(--ink-2); padding: 0; }
.field em { font-style: normal; font-weight: 500; color: var(--muted); }
.field > legend { margin-bottom: 6px; }
input:not([type=radio]):not([type=checkbox]), select, textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 16px; /* prevents iOS zoom */ -webkit-appearance: none; appearance: none;
}
input[type=date], input[type=time], input[type=month] { min-width: 0; display: block; }
input::-webkit-date-and-time-value { text-align: left; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
textarea { resize: vertical; min-height: 48px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
input:disabled { color: var(--muted); background: var(--surface-2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.notice { min-height: 20px; font-size: 14px; color: var(--muted); }
.error { color: var(--danger); }
.error.small { font-size: 13px; overflow-wrap: anywhere; }
.ok { color: var(--primary); }
.notice.error { color: var(--danger); }
.notice.ok { color: var(--primary); }

.choice-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 13px; border-radius: 99px; background: var(--surface-2); font-size: 14px; font-weight: 600; color: var(--ink-2); border: 1.5px solid transparent; }
.choice input:checked + span { background: color-mix(in srgb, var(--cc) 18%, var(--surface)); border-color: var(--cc); color: var(--ink); }
.choice input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); }

/* ------------------------------------------------------------------ auth */
.auth { min-height: 100dvh; display: grid; place-content: center; padding: calc(var(--safe-t) + 24px) var(--gutter) calc(var(--safe-b) + 24px); }
.auth-card { width: min(420px, calc(100vw - 32px)); background: var(--surface); border-radius: 26px; padding: 28px 22px; box-shadow: var(--shadow); border: 1px solid var(--line); display: grid; gap: 14px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.auth-brand img { border-radius: 16px; }
.auth-brand b { display: block; font-family: var(--font-round); font-size: 24px; color: var(--primary-strong); letter-spacing: -.02em; }
.auth-brand span { color: var(--muted); font-size: 14px; }
.sub { color: var(--ink-2); line-height: 1.55; }

/* ------------------------------------------------------------------ home */
.strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 14px calc(-1 * var(--gutter)) 0; padding: 2px var(--gutter) 6px; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.strip-item {
  scroll-snap-align: start; flex: none; display: flex; align-items: center; gap: 10px; text-align: left;
  min-height: 60px; max-width: 250px; padding: 10px 14px 10px 10px; border-radius: 18px;
  background: color-mix(in srgb, var(--cc, var(--primary)) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--cc, var(--primary)) 28%, transparent);
}
.strip-item.empty { border-style: dashed; background: var(--surface); }
.strip-item b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.strip-item small { color: var(--ink-2); white-space: nowrap; }
.emo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); font-size: 20px; flex: none; }
.emo-sm { font-size: 18px; flex: none; }

.home-grid { display: grid; gap: 14px; }
.cal-card { padding: 12px 10px 12px; }
.cal-head { display: flex; align-items: center; gap: 2px; padding: 0 2px 6px; }
.cal-head h2 { flex: 1; text-align: center; font-size: 17px; }
.cal-head .pill-btn { position: absolute; }
.cal-card { position: relative; }
.cal-head .pill-btn { right: 58px; top: 16px; min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-grid .day { min-width: 0; overflow: hidden; }
.wd { text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 4px 0 6px; }
.day {
  height: 46px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 15px; font-weight: 600; color: var(--ink); position: relative;
}
.day .num { line-height: 1; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; }
.day .dots { display: flex; gap: 3px; height: 5px; }
.day .dots i { width: 5px; height: 5px; border-radius: 50%; }
.day.out { color: var(--muted); opacity: .55; }
.day.today .num { background: var(--primary); color: var(--on-primary); }
.day.sel { background: var(--primary-soft); }
.day.imp:not(.today) .num { box-shadow: inset 0 0 0 1.5px var(--c-important); }
.day:active { background: var(--surface-2); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 10px 6px 0; font-size: 11.5px; color: var(--muted); }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }

.entries { display: grid; gap: 8px; }
.entry, .up, .exp {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 56px;
  padding: 9px 10px; border-radius: 16px; background: var(--surface-2);
}
.entry { border-left: 4px solid var(--cc, var(--primary)); }
.entry.static { cursor: default; }
.entry:active, .up:active, .exp:active { filter: brightness(.97); }
.entry-ic { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); font-size: 18px; flex: none; }
.entry-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.entry-body b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-body small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.upcoming { display: grid; gap: 8px; }
.up { background: transparent; padding: 6px 4px; min-height: 52px; }
.datebox { width: 44px; height: 46px; border-radius: 14px; display: grid; place-content: center; text-align: center; background: color-mix(in srgb, var(--cc, var(--primary)) 16%, var(--surface)); flex: none; line-height: 1.05; }
.datebox b { font-size: 17px; font-family: var(--font-round); }
.datebox small { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.datebox.drop { --cc: var(--c-anniv); }

/* ------------------------------------------------------------------ money */
.period-bar { display: flex; align-items: center; gap: 4px; }
.period-label { flex: 1; min-height: 44px; font-family: var(--font-round); font-size: 17px; font-weight: 700; text-align: center; border-radius: 14px; }
.period-label:active { background: var(--surface-2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 8px 0 12px; border-radius: 99px; background: var(--primary-soft); color: var(--primary-strong); font-size: 13px; font-weight: 650; }
.chip .ic { width: 15px; height: 15px; }
.money-grid { display: grid; gap: 14px; }
.big-total { font-family: var(--font-round); font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.big-total .plus { color: var(--muted); font-weight: 500; font-size: 22px; }
.conv { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.conv.warn, .fx.warn { color: var(--warn); }
.fx { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 12px; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; }
.people { display: grid; gap: 12px; margin-top: 14px; }
.person { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-strong); font-weight: 750; font-family: var(--font-round); flex: none; }
.avatar.lg { width: 54px; height: 54px; font-size: 22px; }
.person-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.person-main small { color: var(--muted); }
.pct { font-size: 13px; font-weight: 700; color: var(--ink-2); min-width: 38px; text-align: right; }
.bar { display: block; height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--primary); }
.balance { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.balance li { padding: 12px 14px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font-size: 15px; }
.even { padding: 12px 14px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-strong); font-weight: 650; }
.money-panel .seg { margin-bottom: 10px; }
.exp-list { display: grid; gap: 6px; }
.date-h { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 10px 4px 2px; }
.date-h:first-child { margin-top: 2px; }
.exp { background: transparent; padding: 8px 4px; }
.cat-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; background: color-mix(in srgb, var(--cc) 20%, var(--surface)); flex: none; }
.amt { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; font-family: var(--font-round); }
.cats { display: grid; gap: 12px; }
.cat-row { display: flex; align-items: center; gap: 12px; }
.cat-main { flex: 1; min-width: 0; }
.cat-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.cat-top span { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.sub-h { font-size: 13px; color: var(--muted); margin: 14px 0 8px; }
.sub-h:first-child { margin-top: 0; }
.amount-row { display: flex; gap: 10px; align-items: end; }
.amount-row .grow { flex: 1; }
.amount-row input[name=amount] { font-size: 22px; font-weight: 700; font-family: var(--font-round); }
.amount-row .seg > label { min-height: 40px; }

/* ------------------------------------------------------------------ lists */
.quick { display: flex; gap: 8px; margin-bottom: 6px; }
.quick input { flex: 1; min-width: 0; }
.quick .qty-in { flex: 0 0 76px; }
.quick .btn { width: 48px; padding: 0; flex: none; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 12px 2px 2px; }
.list-head h2 { font-size: 15px; color: var(--ink-2); }
.item { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.item:last-of-type { border-bottom: 0; }
.check { width: 44px; height: 48px; display: grid; place-items: center; flex: none; }
.check .ic { width: 26px; height: 26px; padding: 4px; border-radius: 9px; border: 2px solid var(--muted); stroke: transparent; stroke-width: 3; transition: all .15s; }
.check[aria-checked="true"] .ic { background: var(--primary); border-color: var(--primary); stroke: var(--on-primary); }
.item-main { flex: 1; min-width: 0; text-align: left; padding: 10px 4px; min-height: 48px; display: grid; gap: 4px; align-content: center; }
.item-main .t { font-weight: 600; overflow-wrap: anywhere; }
.item-main .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.item-main .note { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.item.done .t { text-decoration: line-through; color: var(--muted); }
.qty { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--primary-strong); background: var(--primary-soft); border-radius: 8px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.section-toggle { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 650; color: var(--ink-2); font-size: 14px; }
.section-toggle .ic { width: 16px; height: 16px; transition: transform .2s; }
.section-toggle[aria-expanded="true"] .ic.rot { transform: rotate(90deg); }

/* ------------------------------------------------------------------ messages */
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--muted); padding: 5px 10px; border-radius: 99px; background: var(--surface-2); white-space: nowrap; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.live.is-live { color: var(--primary-strong); background: var(--primary-soft); }
.live.is-live i { background: var(--primary); box-shadow: 0 0 0 0 var(--primary); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 50%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.thread { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; }
.day-sep { text-align: center; margin: 14px 0 6px; }
.day-sep span { font-size: 12px; font-weight: 650; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 99px; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; margin-top: 8px; }
.msg.cont { margin-top: 2px; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg .who { font-size: 12px; font-weight: 700; color: var(--ink-2); margin: 0 10px 3px; }
.bubble { padding: 10px 14px; border-radius: 20px 20px 20px 6px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow-wrap: anywhere; line-height: 1.45; font-size: 15.5px; }
.msg.mine .bubble { background: var(--primary); color: var(--on-primary); border-color: transparent; border-radius: 20px 20px 6px 20px; }
.when { display: flex; align-items: center; gap: 2px; font-size: 11.5px; color: var(--muted); margin: 1px 6px 0; }
.del { width: 32px; height: 32px; display: grid; place-items: center; color: var(--muted); border-radius: 10px; }
.del .ic { width: 15px; height: 15px; }
.del:active { background: var(--danger-soft); color: var(--danger); }
.empty-state { text-align: center; padding: 40px 0; color: var(--muted); }
.empty-state span { font-size: 40px; display: block; margin-bottom: 8px; }
.composer {
  position: sticky; bottom: calc(var(--tab-h) + var(--safe-b) + 8px); z-index: 5;
  display: flex; align-items: flex-end; gap: 8px; padding: 8px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.composer textarea { border: 0; min-height: 46px; max-height: 160px; resize: none; padding: 12px 10px; background: transparent; box-shadow: none !important; }
.view[data-view="messages"] { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 16px); }

/* ------------------------------------------------------------------ period */
.privacy { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 16px; background: var(--primary-soft); color: var(--primary-strong); }
.privacy.shared { background: var(--accent); color: var(--accent-ink); }
.privacy span { display: grid; gap: 1px; }
.privacy small { opacity: .85; }
.now-card { display: grid; gap: 4px; justify-items: start; }
.now-card h2 { font-size: 26px; }
.est p + p { margin-top: 6px; }

/* ------------------------------------------------------------------ account */
.account-grid { display: grid; gap: 14px; }
.me-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.me-head b { display: block; font-size: 18px; font-family: var(--font-round); }
.me-head small { color: var(--muted); overflow-wrap: anywhere; }
.settings { display: grid; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.setting:first-child { border-top: 0; }
.setting span { display: grid; gap: 2px; min-width: 0; }
.setting small { color: var(--muted); line-height: 1.4; }
.switch { position: relative; width: 52px; height: 32px; border-radius: 99px; background: var(--surface-3); flex: none; transition: background .2s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"] i { transform: translateX(20px); }
.switch::after { content: ""; position: absolute; inset: -8px; }

/* ------------------------------------------------------------------ sheets */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px; max-height: calc(100dvh - var(--safe-t) - 24px);
  border-radius: 26px 26px 0 0; background: var(--surface); color: var(--ink); box-shadow: 0 -10px 40px rgba(0, 0, 0, .18);
  overflow: hidden;
}
.sheet[open] { display: flex; animation: up .25s cubic-bezier(.2, .8, .2, 1); }
.sheet::backdrop { background: rgba(42, 51, 40, .32); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet-inner { display: flex; flex-direction: column; width: 100%; max-height: inherit; }
.sheet-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 18px 10px 6px 20px; }
.grab { position: absolute; top: 7px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 99px; background: var(--surface-3); }
.sheet-body { overflow-y: auto; padding: 8px 20px 12px; display: grid; gap: 16px; overscroll-behavior: contain; }
.sheet-error { color: var(--danger); font-size: 14px; padding: 0 20px; }
.sheet-error:empty { display: none; }
.sheet-foot { display: flex; gap: 10px; padding: 10px 20px calc(var(--safe-b) + 14px); border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
.sheet-foot .btn.primary { flex: 2; }
.confirm { max-width: 420px; }
.confirm .sheet-body { padding-top: 24px; gap: 8px; }

.toast {
  position: fixed; z-index: 100; left: 50%; bottom: calc(var(--tab-h) + var(--safe-b) + 20px); transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px); padding: 11px 18px; border-radius: 14px; background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: all .25s; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }

/* ------------------------------------------------------------------ small phones */
@media (max-width: 360px) {
  h1 { font-size: 25px; }
  .tabbar button { font-size: 10px; }
  .brand span { display: none; }
  .big-total { font-size: 26px; }
  .two { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ tablet / desktop */
@media (min-width: 760px) {
  .view { padding-top: 12px; }
  .home-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .money-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
  .money-grid > .money-panel { grid-column: 2; grid-row: 1 / span 3; }
  .money-grid > .card:not(.money-panel) { grid-column: 1; }
  .account-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .day { height: 54px; }
  .sheet { margin: auto; border-radius: 26px; max-height: calc(100dvh - 48px); }
  .sheet-foot { padding-bottom: 16px; }
  .grab { display: none; }
  .card { padding: 20px; }
  .strip { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; overflow: visible; }
}
@media (min-width: 1000px) {
  .shell { padding-left: 96px; }
  .tabbar {
    top: 0; right: auto; width: 96px; grid-template-columns: 1fr; grid-auto-rows: 72px; align-content: center;
    border-top: 0; border-right: 1px solid var(--line); box-shadow: none; padding: 16px 10px;
  }
  .tabbar button { font-size: 12px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  .view { padding: 12px 24px 120px; }
  .fab { bottom: 28px; right: 28px; }
  .toast { bottom: 28px; }
  .composer { bottom: 16px; }
  .view[data-view="messages"] { padding-bottom: 24px; max-width: 820px; }
  .view[data-view="lists"] { max-width: 820px; }
  .view[data-view="period"] { max-width: 820px; }
}
@media (hover: hover) {
  .entry:hover, .exp:hover, .up:hover, .item-main:hover, .strip-item:hover { filter: brightness(.98); }
  .btn:hover { filter: brightness(1.05); }
  .icon-btn:hover, .pill-btn:hover { background: var(--surface-3); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ------------------------------------------------------------------ v2.1: trash, toast action, light look */
.card { box-shadow: var(--shadow); border-color: var(--line); }
.strip-item { background: color-mix(in srgb, var(--cc, var(--primary)) 9%, #fff); }
.toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 18px; }
.toast button { min-height: 36px; padding: 0 14px; border-radius: 10px; background: rgba(255, 255, 255, .16); color: inherit; font-weight: 750; }
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 40px; margin: 0 0 2px -8px; padding: 0 8px; border-radius: 12px; color: var(--primary-strong); font-weight: 650; }
.back .ic { width: 20px; height: 20px; }
.setting-link { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 48px; color: var(--ink); }
.setting-link > span { flex: 1; display: grid; gap: 2px; }
.setting-link small { color: var(--muted); }
.setting-link > .ic:first-child { color: var(--ink-2); }
.setting-link > .ic:last-child { color: var(--muted); width: 18px; }
.trash-list { display: grid; }
.trash-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.trash-item:first-child { border-top: 0; }
.trash-item .entry-ic { background: var(--surface-2); }
.trash-item .entry-body b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.trash-acts { display: flex; align-items: center; gap: 2px; flex: none; }
.icon-btn.danger { color: var(--danger); }
.icon-btn.danger:active { background: var(--danger-soft); }
.brand img, .auth-brand img { box-shadow: 0 0 0 1px var(--line); }

/* ------------------------------------------------------------------ v2.2: balance, months, categories, profile, period calendar */
.avatar { object-fit: cover; overflow: hidden; }
img.avatar { display: block; background: var(--surface-2); }
.avatar.xs { width: 22px; height: 22px; font-size: 11px; }
.balance-card .balance li { display: block; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.duo-p { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: var(--surface-2); min-width: 0; }
.duo-p span { display: grid; min-width: 0; }
.duo-p small { color: var(--muted); overflow-wrap: anywhere; }
.duo-bar { height: 10px; border-radius: 99px; background: var(--rose); overflow: hidden; margin-top: 12px; }
.duo-bar i { display: block; height: 100%; background: var(--sage); border-radius: 99px 0 0 99px; }
.duo-pct { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-2); margin-top: 4px; font-weight: 600; }
.months { display: grid; gap: 8px; }
.month-row { display: grid; gap: 6px; width: 100%; text-align: left; padding: 12px; border-radius: 16px; background: var(--surface-2); }
.month-row:active { filter: brightness(.97); }
.mr-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.mr-head > span { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; text-align: right; }
.mr-people { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; }
.mr-people > span { display: inline-flex; align-items: center; gap: 6px; }
.mr-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; }
.mr-run { font-size: 12.5px; color: var(--muted); }
.mr-run b { color: var(--ink-2); font-weight: 650; }
.choice-add { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 13px; border-radius: 99px; border: 1.5px dashed var(--surface-3); color: var(--primary-strong); font-size: 14px; font-weight: 650; }
.choice-add .ic { width: 16px; height: 16px; }
.newcat { display: grid; gap: 8px; margin-top: 10px; }
.newcat-row { display: flex; gap: 8px; }
.newcat-row input:not(.emoji-in) { flex: 1; min-width: 0; }
.newcat-row .btn { flex: none; }
.emoji-in { flex: 0 0 56px; width: 56px !important; text-align: center; font-size: 20px !important; padding: 0 !important; }
.emoji-picks { display: flex; flex-wrap: nowrap; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; }
.emoji-picks::-webkit-scrollbar { display: none; }
.emoji-pick { flex: none; }
.emoji-pick { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; display: grid; place-items: center; }
.emoji-pick:active { background: var(--surface-2); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border-radius: 99px; background: var(--surface-2); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.cat-chip.custom { background: var(--primary-soft); color: var(--primary-strong); padding-right: 2px; }
.cat-chip button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.cat-chip button .ic { width: 14px; height: 14px; }
.avatar-edit { position: relative; cursor: pointer; flex: none; }
.avatar-edit .cam { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--ink-2); }
.avatar-edit .cam .ic { width: 14px; height: 14px; }
.row-gap.tight { margin-top: 8px; gap: 6px; }
.row-gap.tight .pill-btn { min-height: 32px; font-size: 12.5px; cursor: pointer; }
.couple { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding: 12px; border-radius: 16px; background: var(--cream); }
.couple .heart { color: var(--rose); font-size: 14px; }
.couple > span:last-child { display: grid; margin-left: 6px; min-width: 0; }
.couple small { color: var(--muted); }
.msg .who { display: inline-flex; align-items: center; gap: 6px; }
.linkbox { display: flex; gap: 8px; align-items: center; }
.linkbox input { flex: 1; min-width: 0; font-size: 13px !important; min-height: 40px !important; color: var(--ink-2); }
.steps { margin: 12px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.mt { margin-top: 10px; }
.small { font-size: 13px; }
.row-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* period calendar */
.pday .num { width: 34px; height: 34px; }
.pday.pd .num { background: var(--rose); color: #fff; }
.pday.pd-start .num { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--rose); }
.pday.pe .num { border: 2px dashed var(--rose); color: var(--accent-ink); }
.pday.today:not(.pd) .num { background: var(--primary); color: #fff; }
.legend .lg-pd, .legend .lg-hp { background: var(--rose); }
.legend .lg-pe, .legend .lg-hpe { background: transparent; border: 1.5px dashed var(--rose); width: 8px; height: 8px; }
/* period days on the Home calendar (only for the person who chose it) */
.day.hp::after, .day.hpe::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: 3px; height: 3px; border-radius: 3px; background: var(--rose); }
.day.hpe::after { background: transparent; border-top: 2px dashed var(--rose); height: 0; }
@media (min-width: 760px) {
  .money-grid > .stack-lg { grid-column: 1; }
  .money-grid > .money-panel { grid-row: 1; }
}
a.btn { text-decoration: none; }

/* ------------------------------------------------------------------ v2.3: overall money, compact balance, period setup, import */
.big-total .approx { color: var(--muted); font-weight: 600; margin-right: 4px; }
.cur-split { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cur-split span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); padding: 3px 9px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.person-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.person-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-small { font-size: 11.5px; color: var(--muted); line-height: 1.45; margin-top: 12px; }
.fx-small.warn, .owe-line .warn { color: var(--warn); }
.owe-card { padding: 14px 16px; }
.owe-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.owe-head h2 { font-size: 15px; }
.owe-line { margin-top: 6px; font-size: 15px; }
.owe-card .duo-bar { height: 6px; margin-top: 10px; }
.owe-card .duo-pct { font-size: 11.5px; }
.owe-card .fine { margin-top: 8px; font-size: 11.5px; }
.pday.pe-start .num { border-style: solid; border-color: var(--rose); }
.cycle-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.cycle-form .use-avg { grid-column: 1 / -1; justify-self: start; }
.setup-card { display: grid; gap: 10px; border: 1.5px solid var(--accent); }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); min-height: 40px; }
.check-row input { width: 20px; height: 20px; accent-color: var(--primary); }
.import-preview { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13.5px; }
.file-btn { cursor: pointer; }
@media (max-width: 400px) { .cycle-form { grid-template-columns: 1fr 1fr; } .cycle-form .btn { grid-column: 1 / -1; } }
@media (min-width: 760px) {
  .money-grid > .money-main { grid-column: 1; grid-row: 1; }
  .money-grid > .money-panel { grid-column: 2; grid-row: 1 / span 2; }
  .money-grid > .owe-card { grid-column: 1; grid-row: 2; align-self: start; }
}

/* sign-in: show/hide password */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 76px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 650; color: var(--primary-strong); }
.pw-toggle:active { background: var(--surface-2); }

.me-cycle { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.setting-title { margin-bottom: 8px; }
.pill-btn.inline { min-height: 30px; padding: 0 10px; font-size: 12.5px; vertical-align: middle; margin-left: 2px; }

/* ------------------------------------------------------------------ v2.4: titles in calendar days, unread badge, soon strip */
.cal-card:not(.period-cal) .day { height: auto; min-height: 62px; justify-content: flex-start; padding: 4px 1px 3px; gap: 2px; border-radius: 12px; }
.cal-card:not(.period-cal) .day .num { width: 26px; height: 26px; font-size: 14px; flex: none; }
.cell-items { display: flex; flex-direction: column; gap: 2px; width: 100%; min-width: 0; }
.ci { display: block; font-style: normal; font-size: 9.5px; line-height: 13px; font-weight: 650; text-align: left;
  padding: 0 3px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: clip;
  color: color-mix(in srgb, var(--cc) 70%, #1f2b1e); background: color-mix(in srgb, var(--cc) 18%, #fff); border-left: 2px solid var(--cc); }
.ci.more { background: transparent; border: 0; color: var(--muted); text-align: center; }
.day.out .ci { opacity: .7; }
@media (min-width: 760px) {
  .cal-card:not(.period-cal) .day { min-height: 78px; }
  .ci { font-size: 11px; line-height: 15px; padding: 0 4px; }
}
.tabbar .nbadge { position: absolute; top: 3px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--rose); color: #fff; font-size: 11px; font-weight: 750; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.tabbar .nbadge[hidden] { display: none; }
.soon { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.soon-item { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 0 12px; border-radius: 99px; font-size: 13px;
  background: color-mix(in srgb, var(--cc) 14%, #fff); border: 1px solid color-mix(in srgb, var(--cc) 35%, transparent); color: var(--ink); max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.soon-item b { font-weight: 700; }
.soon-more { font-size: 12.5px; color: var(--muted); align-self: center; }
@media (min-width: 1000px) { .tabbar .nbadge { top: 8px; } }

.seg > button.on, .seg > button[aria-pressed="true"] { background: var(--surface); color: var(--primary-strong); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
fieldset.field .hint { margin-top: 4px; }

/* profile photo: adjust before saving */
.crop-wrap { display: grid; place-items: center; }
.crop-stage { position: relative; width: min(280px, 100%); aspect-ratio: 1 / 1; overflow: hidden; border-radius: 18px; background: #1d241c; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-stage img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; pointer-events: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(20, 26, 19, .55); outline: 2px solid rgba(255, 255, 255, .9); outline-offset: -2px; pointer-events: none; }
.zoom-row { display: flex; align-items: center; gap: 6px; }
.zoom-row input[type=range] { flex: 1; min-height: 32px; padding: 0; border: 0; accent-color: var(--primary); background: transparent; }
.zoom-row .icon-btn { font-size: 22px; font-weight: 600; color: var(--primary-strong); }
.zoom-row input[type=range] { -webkit-appearance: auto; appearance: auto; box-shadow: none !important; height: 32px; }

/* latest message on Home */
.last-msg { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-top: 12px; padding: 12px 10px 12px 12px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); }
.last-msg.unread { border-color: color-mix(in srgb, var(--rose) 55%, transparent); background: color-mix(in srgb, var(--rose) 6%, #fff); }
.last-msg > .ic { color: var(--muted); width: 18px; flex: none; }
.last-msg-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.last-msg-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.last-msg-top small { color: var(--muted); white-space: nowrap; }
.last-msg-body { font-size: 14.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tag.new { background: var(--rose); color: #fff; margin-left: auto; }
/* message pop-up */
.msgpop { position: fixed; z-index: 90; left: 50%; top: calc(var(--safe-t) + 10px); width: min(440px, calc(100vw - 24px));
  transform: translate(-50%, -140%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); background: var(--surface);
  border-radius: 22px; box-shadow: 0 12px 40px rgba(30, 40, 28, .22); border: 1px solid var(--line); padding: 12px 12px 12px 14px; }
.msgpop.show { transform: translate(-50%, 0); }
.msgpop-head { display: flex; align-items: center; gap: 10px; }
.msgpop-head > span:not(.avatar) { flex: 1; display: grid; min-width: 0; }
.msgpop-head > .avatar, .last-msg > .avatar { flex: none; }
.msgpop-head small { color: var(--muted); }
.msgpop-body { margin: 10px 2px 12px; font-size: 15.5px; line-height: 1.45; max-height: 9.5em; overflow-y: auto; overflow-wrap: anywhere; }
.msgpop-actions { display: flex; justify-content: flex-end; }
.msgpop-actions .btn { min-height: 40px; }
@media (prefers-reduced-motion: reduce) { .msgpop { transition: none; } }

/* scan a handwritten list */
.scan-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 4px 0 2px; border-radius: 14px;
  border: 1.5px dashed color-mix(in srgb, var(--primary) 45%, transparent); color: var(--primary-strong); font-weight: 650; font-size: 14.5px; cursor: pointer; }
.scan-btn small { font-weight: 500; color: var(--muted); }
.scan-btn:active { background: var(--primary-soft); }
.scan-items { display: grid; gap: 6px; max-height: 46vh; overflow-y: auto; }
.scan-row { display: grid; grid-template-columns: auto 1fr 76px; gap: 8px; align-items: center; }
.scan-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--primary); }
.scan-row input:not([type=checkbox]) { min-height: 42px !important; padding: 8px 10px !important; }
.scan-row.dup input:not([type=checkbox]) { color: var(--muted); }
.scan-note { grid-column: 2 / -1; margin-top: -4px; color: var(--muted); font-size: 12px; }

/* receipts + groceries summary */
.rc-edit { display: grid; gap: 6px; max-height: 40vh; overflow-y: auto; }
.rc-row { display: grid; grid-template-columns: 1fr 74px 40px; grid-template-rows: auto auto; gap: 4px 6px; align-items: center; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.rc-row select { grid-column: 1 / 3; min-height: 38px !important; padding: 4px 30px 4px 10px !important; font-size: 14px !important; background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px; }
.rc-row input { min-height: 40px !important; padding: 6px 10px !important; }
.rc-row .rc-p { text-align: right; font-variant-numeric: tabular-nums; }
.rc-row .icon-btn { grid-row: 1; grid-column: 3; width: 40px; height: 40px; }
.rc-lines { display: grid; gap: 4px; max-height: 30vh; overflow-y: auto; }
.rc-line { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; font-size: 14px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.rc-line small, .gro-name small { color: var(--muted); }
.rc-price { font-variant-numeric: tabular-nums; }
.gro-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 4px; }
.gro-stats > div { padding: 12px; border-radius: 14px; background: var(--surface-2); display: grid; }
.gro-stats b { font-family: var(--font-round); font-size: 19px; }
.gro-stats small { color: var(--muted); }
.gro-items { display: grid; gap: 2px; }
.gro-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.gro-name { display: grid; min-width: 0; overflow-wrap: anywhere; }
.gro-item b { font-variant-numeric: tabular-nums; }
.fine.warn, .hint .warn { color: var(--warn); }
.money-panel .seg > button { padding: 0 8px; }
.money-panel .seg > button { font-size: 12.5px; padding: 0 5px; min-height: 36px; }
@media (min-width: 420px) { .money-panel .seg > button { font-size: 13.5px; padding: 0 8px; } }

/* language switch */
.top-actions { display: flex; align-items: center; gap: 4px; }
.lang { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.lang button { min-width: 36px; min-height: 32px; border-radius: 9px; font-size: 12.5px; font-weight: 750; color: var(--muted); letter-spacing: .03em; }
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--primary-strong); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.auth-top { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.strip-item.empty b, .strip-item.empty small { white-space: normal; max-width: 210px; }

/* photo scans + connected calendars */
.scan-today { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.scan-today b { font-family: var(--font-round); font-size: 30px; }
.scan-today span { color: var(--muted); }
.scan-chart { display: flex; align-items: flex-end; gap: 2px; height: 46px; margin: 12px 0 2px; }
.scan-chart i { flex: 1; background: var(--primary-soft); border-radius: 3px 3px 0 0; min-height: 2px; }
.scan-chart i:last-child { background: var(--primary); }
.limit-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; margin-top: 10px; }
.src-list { display: grid; }
.src-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.src-ic { font-size: 20px; width: 28px; text-align: center; }
.src-main { flex: 1; display: grid; min-width: 0; }
.src-main small { color: var(--muted); overflow-wrap: anywhere; }
.howto { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }
.howto summary { cursor: pointer; font-weight: 650; color: var(--primary-strong); min-height: 36px; display: flex; align-items: center; }
.howto p { margin: 6px 0; line-height: 1.5; }
.imported-note { white-space: normal; color: var(--ink-2); }

/* ------------------------------------------------------------------ v3: love note, spaces, personal calendars */
/* latest message on Home — a little love note */
.last-msg.love-note { position: relative; display: grid; gap: 10px; align-items: stretch; overflow: hidden; isolation: isolate;
  padding: 14px 14px 12px; border-radius: 24px; border: 1px solid color-mix(in srgb, var(--rose) 28%, transparent);
  background: radial-gradient(120% 90% at 0% 0%, #FFF6F3 0%, transparent 60%), linear-gradient(135deg, #FDF1F1 0%, #FBF6EF 55%, #F2F6EE 100%);
  box-shadow: 0 1px 2px rgba(162, 82, 94, .06), 0 8px 24px rgba(206, 135, 145, .14); }
.last-msg.love-note.mine { border-color: color-mix(in srgb, var(--sage) 30%, transparent);
  background: radial-gradient(120% 90% at 100% 0%, #F7FBF3 0%, transparent 60%), linear-gradient(135deg, #F3F7EF 0%, #FBF8F2 60%, #FBF1F1 100%);
  box-shadow: 0 1px 2px rgba(75, 106, 66, .06), 0 8px 24px rgba(129, 159, 117, .14); }
.last-msg.love-note.unread { border-color: color-mix(in srgb, var(--rose) 60%, transparent); background-color: transparent; }
.ln-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ln-deco i { position: absolute; font-style: normal; color: var(--rose); opacity: .16; animation: ln-float 6s ease-in-out infinite; }
.ln-deco i:nth-child(1) { right: 18px; top: 8px; font-size: 26px; }
.ln-deco i:nth-child(2) { right: 54px; top: 30px; font-size: 13px; animation-delay: -2s; opacity: .22; }
.ln-deco i:nth-child(3) { right: 12px; bottom: 34px; font-size: 16px; animation-delay: -4s; }
.mine .ln-deco i { color: var(--sage); }
@keyframes ln-float { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-5px) rotate(6deg); } }
.ln-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ln-top small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.ln-ribbon { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700;
  color: var(--accent-ink); background: rgba(255, 255, 255, .75); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rose) 22%, transparent); }
.mine .ln-ribbon { color: var(--primary-strong); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sage) 25%, transparent); }
.unread .ln-ribbon { color: #fff; background: var(--rose); box-shadow: none; }
.ln-row { display: flex; align-items: flex-end; gap: 10px; min-width: 0; }
.ln-avatar { position: relative; flex: none; }
.ln-avatar .avatar { width: 44px; height: 44px; box-shadow: 0 0 0 3px #fff; }
.ln-avatar i { position: absolute; right: -4px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  font-style: normal; font-size: 10px; color: #fff; background: var(--rose); box-shadow: 0 0 0 2px #fff; }
.mine .ln-avatar i { background: var(--sage); }
.unread .ln-avatar i { animation: ln-beat 1.6s ease-in-out infinite; }
@keyframes ln-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }
.ln-bubble { position: relative; flex: 1; min-width: 0; display: grid; gap: 4px; padding: 10px 13px 9px; background: #fff;
  border-radius: 18px 18px 18px 6px; box-shadow: 0 1px 2px rgba(42, 51, 40, .05), 0 3px 10px rgba(42, 51, 40, .05); }
.ln-bubble::before { content: ''; position: absolute; left: -6px; bottom: 0; width: 12px; height: 12px; background: #fff;
  clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.ln-bubble .last-msg-body { font-size: 15.5px; line-height: 1.42; color: var(--ink); -webkit-line-clamp: 3; }
.ln-from { justify-self: end; font-size: 12.5px; font-style: italic; color: var(--muted); font-family: var(--font-round); }
.ln-reply { justify-self: end; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.mine .ln-reply { color: var(--primary-strong); }
.ln-reply .ic { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .ln-deco i, .unread .ln-avatar i { animation: none; } }

/* whose calendar */
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.who-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin: 3px 0 1px; padding: 2px 9px 2px 2px; border-radius: 99px;
  font-size: 12px; font-weight: 600; color: color-mix(in srgb, var(--pc) 65%, #26301f); background: color-mix(in srgb, var(--pc) 14%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--pc) 35%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-self: start; }
.who-chip .avatar { width: 20px; height: 20px; font-size: 10px; }
.who-chip b { font-weight: 750; }
.who-chip.shared { padding-left: 9px; --pc: var(--sage); }
.ci.personal { border-left-color: var(--pc); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--pc) 16%, #fff) 0 4px, color-mix(in srgb, var(--pc) 9%, #fff) 4px 8px);
  color: color-mix(in srgb, var(--pc) 70%, #1f2b1e); }
.legend .lg-person i { background: var(--pc); border-radius: 2px; }
.src-ic .avatar { margin: 0 auto; }
.src-whose { display: flex; align-items: center; gap: 4px; }
.choice-grid.two-up { display: grid; grid-template-columns: 1fr 1fr; }
.choice-grid.two-up .choice span { width: 100%; justify-content: center; --cc: var(--primary); }
.choice.wide { display: block; }
.choice.wide span { display: grid; gap: 1px; width: 100%; padding: 10px 14px; border-radius: 16px; min-height: 0; }
.choice.wide small { color: var(--muted); font-weight: 500; }
.choice.wide input:checked + span { --cc: var(--primary); }
.choice-list { display: grid; gap: 8px; margin-top: 10px; }

/* spaces */
.space-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 132px; min-height: 32px; padding: 0 6px 0 11px; border-radius: 99px;
  background: var(--primary-soft); color: var(--primary-strong); font-size: 13px; font-weight: 700; }
.space-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.space-chip .ic { width: 15px; height: 15px; transform: rotate(90deg); }
.members { display: grid; gap: 2px; margin-top: 10px; }
.member { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.member:last-child { border-bottom: 0; }
.member-main { flex: 1; display: grid; min-width: 0; }
.member-main small { color: var(--muted); font-weight: 500; }
.member-main b small { color: var(--muted); }
.member-acts { display: flex; align-items: center; gap: 6px; }
.member-acts .pill-btn { min-height: 32px; font-size: 12.5px; }
.invite-box { display: grid; gap: 8px; margin-top: 12px; padding: 12px; border-radius: 16px; background: var(--cream);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rose) 20%, transparent); }
.inv-list { margin-top: 12px; display: grid; gap: 4px; }
.inv-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.inv-row > span { flex: 1; display: grid; min-width: 0; }
.inv-row small { color: var(--muted); }
.inv-row .pill-btn { min-height: 32px; font-size: 12.5px; }
.adm-list { display: grid; gap: 2px; margin-top: 10px; }
.adm-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.adm-main { flex: 1; min-width: 0; }
.adm-main small { display: block; color: var(--muted); }
.adm-limit { display: flex; align-items: center; gap: 6px; flex: none; }
.adm-limit input { width: 64px; min-height: 36px !important; text-align: center; }
.adm-new { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--surface-3); display: grid; gap: 8px; }
.eyebrow + h1 { margin-top: 2px; }
.adm-new .setting-title { margin: 0; }
.adm-new .setting-title small { display: block; font-weight: 500; }
.full-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: var(--primary-soft); color: var(--primary-strong); font-size: 13.5px; }
.full-note .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.adm-limit label { display: grid; gap: 2px; justify-items: center; }
.adm-limit label small { font-size: 11px; color: var(--muted); }
.adm-limit input[name=max] { width: 52px; }
.adm-row { align-items: flex-end; flex-wrap: wrap; }
.adm-main { min-width: 160px; }
.danger-box { padding: 12px 14px; border-radius: 16px; background: var(--danger-soft); color: var(--ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 30%, transparent); display: grid; gap: 6px; font-size: 14.5px; }
.danger-box ul { margin: 0; padding-left: 20px; color: var(--ink-2); }
.lg-toggle { display: inline-flex; align-items: center; gap: 0; font: inherit; color: var(--ink-2); padding: 3px 9px 3px 7px; margin: -3px 0; border-radius: 99px;
  background: var(--surface-2); min-height: 26px; }
.lg-toggle i { background: var(--pc); border-radius: 2px; }
.lg-toggle.off { color: var(--muted); text-decoration: line-through; opacity: .7; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.lg-toggle.off i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--pc); }
.src-row .switch { flex: none; }
.older-btn { display: flex; margin: 4px auto 10px; }
.push-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--surface-2); }
.push-ic { font-size: 24px; width: 32px; text-align: center; flex: none; }
.push-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.push-main small { color: var(--muted); }
.push-row .btn { flex: none; }
/* "AI is working" */
.working { border: 0; border-radius: 24px; padding: 0; width: min(340px, calc(100vw - 48px)); box-shadow: 0 18px 50px rgba(30, 40, 28, .25); background: var(--surface); color: var(--ink); }
.working::backdrop { background: rgba(30, 40, 28, .28); backdrop-filter: blur(2px); }
.working-in { display: grid; justify-items: center; gap: 10px; padding: 24px 20px 20px; text-align: center; }
.working-in > b { font-family: var(--font-round); font-size: 18px; }
.spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--primary-soft); border-top-color: var(--primary); animation: wg-spin .9s linear infinite; }
@keyframes wg-spin { to { transform: rotate(360deg); } }
.working-steps { list-style: none; margin: 2px 0; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--muted); text-align: left; }
.working-steps li::before { content: '○'; display: inline-block; width: 20px; color: var(--muted); }
.working-steps li.now { color: var(--ink); font-weight: 650; }
.working-steps li.now::before { content: '●'; color: var(--primary); animation: wg-pulse 1.2s ease-in-out infinite; }
.working-steps li.done { color: var(--ink-2); }
.working-steps li.done::before { content: '✓'; color: var(--primary); }
@keyframes wg-pulse { 50% { opacity: .35; } }
.working-time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 650; }
.working-hint { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s; } .working-steps li.now::before { animation: none; } }
/* admins list, sub-setting */
.admins { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.admin-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 2px; border-radius: 99px; background: var(--surface-2); font-size: 13px; }
.admin-chip small { color: var(--muted); }
.setting.sub-setting { padding-left: 18px; }
/* ------------------------------------------------------------------ Kitchen */
.search { width: 100%; min-height: 44px; margin-bottom: 10px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 34px; padding: 0 12px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); font-size: 13.5px; font-weight: 650; }
.chip.on { background: var(--primary); color: var(--on-primary); }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.recipe-card { display: grid; grid-template-rows: auto 1fr; text-align: left; border-radius: 18px; overflow: hidden; background: var(--surface-2); min-width: 0; }
.recipe-card img, .recipe-emo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: grid; place-items: center; font-size: 44px; background: linear-gradient(135deg, var(--cream), var(--primary-soft)); }
.recipe-info { display: grid; gap: 2px; padding: 9px 11px 11px; min-width: 0; }
.recipe-info b { font-size: 14.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.recipe-info small { color: var(--muted); font-size: 12px; }
.recipe-photo { width: 100%; max-height: 240px; object-fit: cover; border-radius: 16px; margin-bottom: 8px; }
.lang-seg { margin: 10px 0 4px; }
.rc-h { font-family: var(--font-round); font-size: 16px; margin: 16px 0 8px; }
.ing-list { display: grid; gap: 2px; margin-bottom: 10px; }
.ing { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.ing input { width: 20px; height: 20px; accent-color: var(--primary); flex: none; }
.ing > span:first-of-type { flex: 1; min-width: 0; display: grid; overflow-wrap: anywhere; }
.ing small { color: var(--muted); font-size: 12px; }
.rc-steps { margin: 0; padding-left: 22px; display: grid; gap: 8px; line-height: 1.5; }
.rc-notes { color: var(--ink-2); }
.rc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.rc-actions .btn { flex: 1 1 auto; }
.photo-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.photo-pick img { width: 84px; height: 64px; object-fit: cover; border-radius: 12px; display: block; }
.menu-head { margin-bottom: 4px; }
.center-btn { display: flex; margin: 0 auto 8px; }
.menu-days { display: grid; gap: 8px; margin-top: 6px; }
.menu-day { border-radius: 16px; background: var(--surface-2); padding: 8px 10px; }
.menu-day.today { box-shadow: inset 0 0 0 2px var(--primary); background: var(--primary-soft); }
.menu-day.past { opacity: .6; }
.menu-day-head { display: flex; align-items: center; gap: 8px; }
.menu-day-head b { flex: 1; }
.menu-day-head .pill-btn { min-height: 32px; padding: 0 10px; }
.menu-meal { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 4px 4px; }
.menu-meal > span:nth-child(2) { flex: 1; display: grid; min-width: 0; }
.menu-meal small { color: var(--muted); font-size: 12px; }
.menu-meal .ic { width: 16px; color: var(--muted); }
.mm-ic { font-size: 20px; }
.day-meals { display: grid; gap: 4px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--surface-3); }
.day-meal { display: flex; align-items: baseline; gap: 6px; text-align: left; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.day-meal span { color: var(--muted); font-size: 12.5px; }
.tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar.many { padding-left: max(2px, env(safe-area-inset-left)); padding-right: max(2px, env(safe-area-inset-right)); }
.tabbar.many button { font-size: 10px; }
@media (max-width: 380px) { .tabbar.many button { font-size: 9px; letter-spacing: -.01em; } .tabbar.many button .ic { width: 22px; height: 22px; } }
.scan-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scan-row .scan-btn { margin: 0; }
.ai-note { padding: 10px 12px; border-radius: 14px; background: var(--cream); color: var(--ink-2); font-size: 14px; margin-bottom: 10px; }
.share-opt { display: flex; gap: 12px; width: 100%; text-align: left; padding: 14px; border-radius: 16px; background: var(--surface-2); margin-bottom: 10px; }
.share-opt > span:first-child { font-size: 26px; }
.share-opt > span:last-child { display: grid; gap: 3px; }
.share-opt small { color: var(--muted); }
.rc-ing { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.seg > button[aria-pressed="true"] { background: var(--surface); color: var(--primary-strong); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.ing > span:first-of-type { display: block; }
.ing > span:first-of-type small { display: block; }
