:root {
  --bg: #fbf6ef;
  --surface: #ffffff;
  --surface-2: #f3ece3;
  --text: #221c29;
  --muted: #6f6779;
  --line: rgba(34, 28, 41, 0.09);
  --primary: #221c29;
  --on-primary: #ffffff;
  --shadow: var(--shadow-1);
  --radius: var(--r-lg);

  --blue: #3b82f6;
  --amber: #f59e0b;
  --green: #22c55e;
  --orange: #f97316;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --teal: #14b8a6;
  --sky: #0ea5e9;
  --lime: #65a30d;
  --rose: #f43f5e;
  --indigo: #6366f1;

  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-book: 'Fraunces', Georgia, 'Times New Roman', serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15121b;
    --surface: #201b28;
    --surface-2: #2b2534;
    --text: #f5f1f8;
    --muted: #a99fb4;
    --line: rgba(255, 255, 255, 0.09);
    --primary: #f5f1f8;
    --on-primary: #15121b;
  }
}

/* Colour families: set --c, get a soft background and a readable ink. */
.c-orange { --c: var(--orange); }
.c-violet { --c: var(--violet); }
.c-pink { --c: var(--pink); }
.c-teal { --c: var(--teal); }
.c-sky { --c: var(--sky); }
.c-lime { --c: var(--lime); }
.c-rose { --c: var(--rose); }
.c-indigo { --c: var(--indigo); }
.s-sealed { --c: var(--blue); }
.s-opened { --c: var(--amber); }
.s-container { --c: var(--green); }
.s-loose { --c: var(--teal); }
.c-orange, .c-violet, .c-pink, .c-teal, .c-sky, .c-lime, .c-rose, .c-indigo,
.s-sealed, .s-opened, .s-container, .s-loose {
  --soft: color-mix(in srgb, var(--c) 15%, var(--surface));
  --ink: color-mix(in srgb, var(--c) 72%, var(--text));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; }
h1 { font-size: var(--t-title); font-weight: 800; }
h2 { font-size: var(--t-h2); font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 18px) 16px calc(104px + env(safe-area-inset-bottom));
}
body.bare #app { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }

.view { display: flex; flex-direction: column; gap: var(--s3); }
.view-enter { animation: view-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }

.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.muted { color: var(--muted); }
.small { font-size: var(--t-small); }
.eyebrow { font-size: var(--t-caption); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.section-title { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-body); font-weight: 800; margin: var(--s2) 2px -2px; }
.section-title .i { color: var(--muted); }
.empty { text-align: center; padding: var(--s4); }

.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--s4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 46px;
  padding: 0 var(--s4);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.btn-big { min-height: 56px; width: 100%; font-size: var(--t-body); border-radius: var(--r-md); }
.btn-small { min-height: 38px; padding: 0 var(--s3); font-size: var(--t-small); border-radius: var(--r-sm); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
/* Removing something looks different from carrying on, so it is never tapped by accident. */
.btn-danger { color: color-mix(in srgb, var(--job-hot) 80%, var(--text)); background: color-mix(in srgb, var(--job-hot) 10%, var(--surface)); border-color: color-mix(in srgb, var(--job-hot) 30%, transparent); }
.btn-ghost.btn-danger { background: transparent; border-color: transparent; }
.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.back {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: none;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.back:active { transform: scale(0.94); }

/* Header */
.top { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; margin-bottom: 4px; }
.top .eyebrow { grid-column: 1; grid-row: 1; }
.top h1 { grid-column: 1 / -1; grid-row: 2; }
.top-stats { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 6px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 0 12px;
  border-radius: 99px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.pill-coin { background: color-mix(in srgb, var(--amber) 22%, var(--surface)); color: color-mix(in srgb, var(--amber) 60%, var(--text)); }
.pill-level { background: color-mix(in srgb, var(--violet) 18%, var(--surface)); color: color-mix(in srgb, var(--violet) 70%, var(--text)); }

/* Quote screen */
.quote-screen {
  min-height: calc(100dvh - 42px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 6px 0;
}
.blob { position: fixed; border-radius: 50%; filter: blur(50px); opacity: 0.45; z-index: -1; pointer-events: none; }
.blob-1 { width: 240px; height: 240px; background: var(--pink); top: -40px; right: -60px; }
.blob-2 { width: 200px; height: 200px; background: var(--amber); bottom: 120px; left: -70px; }
.blob-3 { width: 160px; height: 160px; background: var(--teal); bottom: -20px; right: -10px; opacity: 0.3; }
.quote-greet { font-weight: 700; color: var(--muted); }
.quote-body { display: flex; flex-direction: column; gap: 18px; animation: view-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.quote-mark { font-family: var(--font-book); font-size: 90px; line-height: 0.6; color: var(--pink); height: 36px; }
.quote-text { margin: 0; font-family: var(--font-book); font-size: clamp(26px, 7.5vw, 34px); line-height: 1.28; letter-spacing: -0.01em; }
.quote-source { color: var(--muted); line-height: 1.5; }
.quote-source strong { color: var(--text); }

/* Quote card on home */
.quote-line {
  display: block;
  margin: -4px 2px 0;
  font-family: var(--font-book);
  font-size: 15px;
  line-height: 1.35;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.goal-slim { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--s4); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.goal-slim-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); }
.bar-slim { height: 6px; }

/* Setup: mapping places */
.setup { display: flex; flex-direction: column; gap: var(--s3); }
.bar-setup { height: 10px; }
.place-card.is-unmapped { background: transparent; border: 2px dashed color-mix(in srgb, var(--c) 45%, transparent); }
.place-card.is-unmapped .place-level { background: color-mix(in srgb, var(--c) 18%, var(--surface)); color: var(--ink); }
.eyebrow.on-color { color: rgba(255, 255, 255, 0.85); margin-top: var(--s2); }
.staples { display: flex; flex-wrap: wrap; gap: var(--s2); }
.staple {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 42px;
  padding: 0 var(--s3);
  border-radius: 99px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-weight: 700;
  font-size: var(--t-small);
  cursor: pointer;
  transition: transform 0.12s;
}
.staple:active { transform: scale(0.95); }
.staple.is-here { background: color-mix(in srgb, var(--job-calm) 16%, var(--surface)); border-color: color-mix(in srgb, var(--job-calm) 45%, transparent); }
.staple.is-here .i { color: color-mix(in srgb, var(--job-calm) 80%, var(--text)); }
.staple.is-here b { font-weight: 800; color: color-mix(in srgb, var(--job-calm) 80%, var(--text)); }
/*
 * The bar you leave by. It used to be two transparent buttons floating over the chips, so "Undo the last
 * one" was printed across whatever was behind it and the way out did not read as a way out at all (Srija,
 * 19 Sept 2026: "no way to stop this entry from this window"). It now sits on its own ground.
 */
.map-footer {
  position: sticky;
  bottom: calc(92px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  padding: var(--s4) 0 var(--s2);
  margin-top: var(--s3);
  z-index: 5;
  background: linear-gradient(to bottom, transparent, var(--bg) 40%);
}
.map-footer .btn { box-shadow: var(--shadow-2); }
.map-footer .btn-ghost { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }

/* "What's in here": the spot she is filling, and the paste-a-shelf box */
.fill-spots { display: flex; flex-direction: column; gap: var(--s2); padding: 0 2px; }
.fill-spots > .small { padding-left: 2px; }
/* Aligned with everything else on the page: no full-bleed scroller, the spots simply wrap. */
.fill-spots .spot-chips { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; }
.fill-spots .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fill-paste textarea {
  width: 100%;
  padding: var(--s3);
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  background: var(--surface);
  resize: vertical;
}
.fill-paste .btn { margin-top: var(--s2); }
.fill-details { padding: 0 2px; font-size: var(--t-small); color: var(--muted); }

/* Duplicates */
.did-you-mean { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.did-you-mean .btn { background: var(--surface); }
.duplicate-alert {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.duplicate-alert strong { font-size: 15px; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.choice-list { display: flex; flex-direction: column; gap: 6px; }
.choice-list .choice > span { justify-content: space-between; }

/* Place picker: places, then spots inside */
.place-picker { display: flex; flex-direction: column; gap: var(--s2); }
.place-btn, .spot-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  font-weight: 700;
  font-size: var(--t-small);
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s;
}
.place-btn { background: var(--soft); }
.place-btn.is-on { border-color: var(--c); background: color-mix(in srgb, var(--c) 24%, var(--surface)); }
.spot-list { display: flex; flex-direction: column; gap: 5px; }
.spot-btn { background: var(--surface-2); margin-left: calc(var(--depth, 0) * 18px); min-height: 40px; }
.spot-btn.is-on { border-color: var(--text); background: color-mix(in srgb, var(--text) 10%, var(--surface)); }
.place-btn:active, .spot-btn:active { transform: scale(0.97); }
.breadcrumb { font-size: var(--t-small); opacity: 0.9; }
.breadcrumb a { color: inherit; }

/* Stock details */
.lot-path { font-size: var(--t-caption); font-weight: 700; color: var(--muted); letter-spacing: 0.01em; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--surface-2);
  font-size: var(--t-caption);
  font-weight: 700;
  white-space: nowrap;
}
.tag .i { color: var(--muted); }
.tag-first { background: color-mix(in srgb, var(--job-warm) 22%, var(--surface)); color: color-mix(in srgb, var(--job-warm) 60%, var(--text)); }
.level { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 5px; max-width: 160px; }
.level > span { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--job-calm)); }
.level-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.level-card { display: flex; flex-direction: column; gap: 6px; padding: var(--s3); border-radius: var(--r-md); background: var(--surface-2); }
.level-card .level { max-width: none; background: var(--surface); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--job-calm); }
details.more { border-radius: var(--r-sm); background: var(--surface-2); padding: 10px var(--s3); }
details.more summary { cursor: pointer; font-weight: 700; font-size: var(--t-small); color: var(--muted); }
details.more[open] summary { margin-bottom: 10px; }
.field-row > .field-price { flex: 0 0 110px; }

/* Item overview */
.overview { display: flex; flex-direction: column; gap: 2px; padding: var(--s2) var(--s4); }
.ov-row { display: grid; grid-template-columns: 24px 92px 1fr; align-items: center; gap: var(--s2); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--t-small); }
.ov-row:last-child { border-bottom: none; }
.ov-icon { display: grid; place-items: center; color: var(--muted); }
.ov-label { font-weight: 700; color: var(--muted); font-size: var(--t-small); }
.ov-value { font-weight: 600; min-width: 0; }
.ov-home select { width: 100%; height: 40px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--surface-2); padding: 0 var(--s2); }
.journey { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.journey .arrow { display: grid; color: var(--muted); }
.timeline .row { align-items: flex-start; font-size: var(--t-small); }
.tl-icon { display: grid; place-items: center; width: 24px; height: 22px; color: var(--muted); }

/* Eat me first */
.soon-list { display: flex; flex-direction: column; gap: 10px; }
.card.soon-list { padding: var(--s3) var(--s4); }
.soon-row { display: flex; align-items: center; gap: 10px; }
.soon-row a { text-decoration: none; display: flex; flex-direction: column; gap: 3px; }
.soon-top { display: flex; justify-content: space-between; gap: var(--s2); }
.soon-days { font-size: var(--t-caption); font-weight: 800; white-space: nowrap; }
.soon-days.is-hot { color: var(--job-hot); }
.soon-days.is-warm { color: color-mix(in srgb, var(--job-warm) 70%, var(--text)); }
.soon-days.is-ok { color: color-mix(in srgb, var(--job-calm) 75%, var(--text)); }
.countdown { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.countdown > span { display: block; height: 100%; border-radius: inherit; }
.countdown.is-hot > span { background: var(--job-hot); }
.countdown.is-warm > span { background: var(--job-warm); }
.countdown.is-ok > span { background: var(--job-calm); }
.month { display: flex; flex-direction: column; gap: var(--s3); }
.month-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: var(--s3); }
.month-grid > div { display: flex; flex-direction: column; }
.month-num { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.month-num .i { color: color-mix(in srgb, var(--tone, var(--muted)) 80%, var(--text)); }
.recipe { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--s4); }
.recipe .btn { align-self: flex-start; }
.recipe-head { display: flex; align-items: center; gap: var(--s3); }
.recipe-emoji { font-size: 30px; }
.ask-claude { display: flex; flex-direction: column; gap: var(--s3); }
.claude-question { width: 100%; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--surface-2); padding: var(--s3); font: inherit; font-size: var(--t-small); resize: vertical; }
.cooked-row { font-weight: 600; }
.ask-option { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); border-radius: var(--r-md); background: color-mix(in srgb, var(--job-new) 10%, var(--surface)); }
.ask-option strong { display: flex; align-items: center; gap: 6px; }
.ask-option strong .i { color: var(--job-new); }
details.more .btn { margin-top: var(--s2); width: 100%; }

/* Shopping */
.chevron { display: grid; place-items: center; flex: none; color: var(--muted); }
.need { display: flex; flex-direction: column; gap: var(--s3); }
.need .search { box-shadow: none; background: var(--surface-2); }
.verdict { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); border-radius: var(--r-md); }
.verdict .btn { align-self: flex-start; }
.verdict .button-row .btn { align-self: stretch; }
.v-ok { background: color-mix(in srgb, var(--job-calm) 12%, var(--surface)); }
.v-low { background: color-mix(in srgb, var(--job-warm) 14%, var(--surface)); }
.v-out { background: color-mix(in srgb, var(--job-hot) 11%, var(--surface)); }
.v-unknown { background: var(--surface-2); }
.list-add { display: flex; gap: var(--s2); }
.list-add input {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 var(--s3);
  border-radius: var(--r-md);
  border: 1.5px solid var(--line);
  background: var(--surface);
  outline: none;
}
.list-add input:focus { border-color: var(--job-new); }
/* The other person's last change while both have the list open (house C160): a quiet line, a live dot. */
.live-line { display: flex; align-items: center; gap: var(--s2); margin: 0; color: var(--job-new); font-weight: 700; }
.live-line::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 99px; background: currentColor; }
.store-section { display: flex; flex-direction: column; gap: var(--s2); }
.store-head { display: flex; align-items: center; gap: 10px; padding: 10px var(--s3); border-radius: var(--r-md); background: var(--soft); margin-top: 6px; }
.store-head .small { color: var(--ink); }
.store-icon { font-size: 24px; }
.store-count { min-width: 28px; height: 28px; padding: 0 var(--s2); border-radius: 99px; background: var(--c); color: #fff; font-weight: 800; font-variant-numeric: tabular-nums; display: grid; place-items: center; }
.shop-row { display: flex; align-items: center; gap: 10px; padding: 10px var(--s3); border-bottom: 1px solid var(--line); }
.shop-row:last-child { border-bottom: none; }
.shop-row.is-checked strong { text-decoration: line-through; color: var(--muted); }
.tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.shop-row.is-checked .tick { background: var(--job-calm); border-color: var(--job-calm); }
/* Small round buttons are still thumb-sized (40px), and anything that really removes something says so in rose. */
.mini-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: none; background: var(--surface-2); color: var(--text); cursor: pointer; font-size: 15px; text-decoration: none; }
.mini-btn:active { transform: scale(0.92); }
.mini-btn.is-danger { background: color-mix(in srgb, var(--job-hot) 12%, var(--surface)); color: color-mix(in srgb, var(--job-hot) 75%, var(--text)); }
.unpack-card { display: flex; flex-direction: column; gap: var(--s3); }

/* Big goal */
.goal { display: flex; flex-direction: column; gap: var(--s3); }
.goal-head { display: flex; align-items: center; gap: var(--s3); }
.goal-emoji { font-size: 34px; }
.goal-pct { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--tone, var(--job-calm));
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bar-big { height: 16px; }
.bar-mini { height: 6px; background: color-mix(in srgb, var(--c, var(--text)) 14%, transparent); }
.bar-mini > span { background: var(--c); }
.bar-on-color { background: rgba(255, 255, 255, 0.35); height: 12px; }
.bar-on-color > span { background: #fff; }

.next-quest, .quest {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  border-radius: var(--r-md);
  padding: var(--s3) var(--s4);
  font: inherit;
  color: var(--text);
  transition: transform 0.12s;
}
.next-quest { background: var(--soft); color: var(--text); margin-top: 4px; }
.next-quest .eyebrow { color: var(--ink); }
.next-icon, .quest-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--soft);
  color: var(--ink);
}
.quest { background: var(--surface); box-shadow: var(--shadow); }
.quest .eyebrow { color: var(--ink); }
.quest:active, .next-quest:active { transform: scale(0.98); }
.reward {
  flex: none;
  font-weight: 800;
  font-size: var(--t-small);
  padding: 6px 10px;
  border-radius: 99px;
  text-align: center;
  background: color-mix(in srgb, var(--job-warm) 20%, var(--surface));
  color: color-mix(in srgb, var(--job-warm) 60%, var(--text));
}
.all-done { font-weight: 700; color: var(--job-calm); }

/* Use soon */
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -16px; padding-left: 16px; scrollbar-width: none; }
.chips-scroll::-webkit-scrollbar { display: none; }
.soon-chip {
  flex: none;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--amber) 18%, var(--surface));
  font-size: 14px;
  font-weight: 600;
}
.soon-chip b { color: color-mix(in srgb, var(--amber) 65%, var(--text)); }
.soon-chip.is-hot { background: color-mix(in srgb, var(--rose) 18%, var(--surface)); }
.soon-chip.is-hot b { color: var(--rose); }

/* Places */
.places { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.place-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--soft);
  text-decoration: none;
  transition: transform 0.12s;
}
.place-card:active { transform: scale(0.97); }
.place-top { display: flex; justify-content: space-between; align-items: flex-start; }
.place-icon { font-size: 32px; line-height: 1; }
.place-level { font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 99px; background: var(--c); color: #fff; }
.place-name { font-weight: 800; margin-top: 6px; }
.place-meta { font-size: 13px; color: var(--ink); margin-bottom: 4px; }
.place-add {
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px dashed var(--line);
  color: var(--muted);
  font-size: 26px;
  font-weight: 700;
}
.place-add span { font-size: 14px; }

.place-hero {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--s4) var(--s4) var(--s4);
  border-radius: var(--radius);
  background: var(--c);
  color: #fff;
}
.place-hero .back { background: rgba(255, 255, 255, 0.25); box-shadow: none; color: #fff; }
.place-hero-icon { font-size: 46px; margin-top: 4px; }

/* Lists and rows */
.list { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: none; }
a.row:active, button.row:active { background: var(--surface-2); }
.row-amount { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.stage {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--soft);
  color: var(--ink);
  font-size: var(--t-caption);
  font-weight: 700;
  white-space: nowrap;
}
.stage::before, .dot { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.dots { display: flex; gap: 3px; }
.flag {
  display: inline-block;
  font-size: var(--t-caption);
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--job-new) 16%, var(--surface));
  color: color-mix(in srgb, var(--job-new) 80%, var(--text));
  vertical-align: 2px;
}
.search {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s3);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.search input { flex: 1; min-width: 0; border: none; background: transparent; height: 50px; outline: none; }

/* Item page */
.item-head { display: flex; flex-direction: column; gap: var(--s2); }
.item-head h1 { margin-top: 6px; }
.item-total { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.item-total .muted { font-size: 15px; font-weight: 600; }
.stage-bar { display: flex; gap: 3px; height: 14px; border-radius: 99px; overflow: hidden; }
.stage-bar span { background: var(--c); }

.lot {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--s3) var(--s4);
  border-left: 5px solid var(--c);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lot-head { display: flex; align-items: center; gap: var(--s3); }
.lot-place {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--soft);
  font-size: 20px;
}
.lot-amt { font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lot-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.expiry { display: flex; align-items: center; gap: 5px; font-size: var(--t-small); font-weight: 700; color: var(--muted); }
.expiry.is-warm { color: color-mix(in srgb, var(--job-warm) 70%, var(--text)); }
.expiry.is-hot { color: var(--job-hot); }

/* Forms */
.form { display: flex; flex-direction: column; gap: var(--s4); }
.form-inline { padding: var(--s3) var(--s4); }
.stack { display: flex; flex-direction: column; gap: var(--s3); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > span, .field-label { font-size: var(--t-small); font-weight: 700; }
.field input, .field select, .field textarea {
  height: 50px;
  padding: 0 var(--s3);
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  outline: none;
  width: 100%;
}
.field textarea { height: auto; padding: var(--s3); resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--job-new); }
.field-row { display: flex; gap: 10px; align-items: flex-end; }
.field-row > .field { flex: 1; }
.field-row > .field-unit { flex: 0 0 90px; }
.field-row > .field-count { flex: 0 0 100px; }
.field-row > .field-emoji { flex: 0 0 76px; }
.field-emoji input { text-align: center; font-size: 22px; }
.date-pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.date-pick input { height: 42px; padding: 0 10px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--surface-2); }
.form-error { color: var(--job-hot); font-weight: 700; font-size: var(--t-small); }
.smart-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: var(--t-small);
  font-weight: 600;
  padding: 10px var(--s3);
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--job-new) 12%, var(--surface));
  color: color-mix(in srgb, var(--job-new) 70%, var(--text));
}
.smart-hint > .i { margin-top: 2px; }
.smart-hint > span { flex: 1; min-width: 0; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.choice-grid.three { grid-template-columns: repeat(3, 1fr); }
.choice-row { display: flex; flex-wrap: wrap; gap: 7px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  height: 100%;
  padding: var(--s2) var(--s3);
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  background: var(--soft, var(--surface-2));
  font-size: var(--t-small);
  font-weight: 700;
  transition: transform 0.12s, border-color 0.15s;
}
.choice-row .choice > span { min-height: 40px; padding: 6px 12px; }
.choice input:checked + span {
  border-color: var(--c, var(--text));
  background: color-mix(in srgb, var(--c, var(--text)) 22%, var(--surface));
}
.choice input:focus-visible + span { outline: 2px solid var(--c, var(--violet)); outline-offset: 2px; }
.choice:active > span { transform: scale(0.96); }
.swatch > span { width: 40px; min-height: 40px; padding: 0; border-radius: 50%; background: var(--c); }
.swatch input:checked + span { border-color: var(--text); background: var(--c); box-shadow: inset 0 0 0 3px var(--surface); }

.hero-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s3); padding: var(--s6) var(--s4); }
.hero-emoji { font-size: 56px; color: var(--job-new); display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: color-mix(in srgb, var(--job-new) 12%, var(--surface)); }
.search-icon { display: grid; place-items: center; color: var(--muted); }

/* Tab bar */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 496px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(34, 28, 41, 0.14), 0 0 0 1px var(--line);
  z-index: 10;
}
.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 7px 0 6px;
  border-radius: 18px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.tab-icon { font-size: 22px; line-height: 1.1; filter: grayscale(0.6); opacity: 0.75; }
.tab.is-active { background: var(--surface-2); color: var(--text); }
.tab.is-active .tab-icon { filter: none; opacity: 1; }
/* Bottom sheet */
.sheet {
  border: none;
  padding: 0;
  margin: auto auto 0;
  width: 100%;
  max-width: 520px;
  max-height: 92dvh;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-2);
}
.sheet::backdrop { background: rgba(20, 14, 30, 0.45); }
.sheet[open] { animation: sheet-up 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet-body {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s2) var(--s4) calc(var(--s5) + env(safe-area-inset-bottom));
  max-height: 92dvh;
  overflow-y: auto;
}
.sheet-handle { align-self: center; width: 40px; height: 4px; border-radius: 99px; background: var(--line); margin-bottom: var(--s2); }
.sheet-head { display: flex; align-items: center; gap: var(--s3); }
.sheet-head .eyebrow { color: var(--ink); }
.sheet-actions { display: flex; flex-direction: column; gap: var(--s2); margin-top: 6px; }
.plain-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }


/* Pop-ups on her phone (features/settings/push.js) */
.push-card h2 { display: flex; align-items: center; gap: var(--s2); }
.push-card .inline-ic { color: color-mix(in srgb, var(--job-calm) 70%, var(--text)); }

/*
 * A staple chip must never change width when it is tapped, or the grid reflows and the chip she just picked
 * slides back under her finger (Srija, 19 Sept 2026). The tick and the count hold their space always.
 */
.staple-tick { display: inline-flex; width: 14px; flex: none; visibility: hidden; }
.staple.is-here .staple-tick { visibility: visible; }
.staple-n { display: inline-block; min-width: 1.7em; text-align: right; font-weight: 800; }
