:root {
  --paper: #f4f0e6;
  --paper-2: #faf7ef;
  --card: #fffdf8;
  --ink: #262b23;
  --ink-2: #3b4235;
  --muted: #7c8172;
  --muted-2: #999d8d;
  --line: rgba(45, 55, 39, 0.09);
  --line-strong: rgba(45, 55, 39, 0.15);
  --green: #3e5137;
  --green-deep: #33432d;
  --sage: #7e8e6d;
  --lime: #dce4c5;
  --coral: #cf6045;
  --coral-soft: #f1ded5;
  --amber: #b78235;
  --amber-soft: #f3e7d2;
  --blue: #557584;
  --blue-soft: #e0e9e9;
  --sealed: #6f7f66;
  --shadow-sm: 0 3px 12px rgba(42, 53, 34, 0.045);
  --shadow: 0 18px 46px rgba(42, 53, 34, 0.09);
  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-num: "Avenir Next", "DIN Alternate", "SF Pro Display", var(--font);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  margin: 0;
  min-width: 300px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  background: #dfe2d4;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 252, 236, 0.7), transparent 34%),
    radial-gradient(circle at 88% 80%, rgba(106, 122, 92, 0.2), transparent 34%),
    linear-gradient(145deg, #e9ebde 0%, #d7dccb 100%);
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image: radial-gradient(rgba(41, 51, 35, 0.55) 0.5px, transparent 0.5px);
  background-size: 5px 5px;
  z-index: -1;
}

body.sheet-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.icon-sm {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

.svg-sprite {
  position: absolute;
  overflow: hidden;
}

.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: var(--paper);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 30%),
    radial-gradient(circle at 90% 2%, rgba(201, 211, 181, 0.25), transparent 25%);
  box-shadow: 0 0 70px rgba(39, 50, 32, 0.14);
}

@media (min-width: 560px) {
  .app {
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
  }
}

main {
  position: relative;
  z-index: 2;
}

.page {
  display: none;
  padding-bottom: 124px;
}

.page.is-active {
  display: block;
  animation: page-in 0.34s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(13px + env(safe-area-inset-top)) 19px 9px;
  background: linear-gradient(180deg, rgba(244, 240, 230, 0.98) 0%, rgba(244, 240, 230, 0.9) 78%, rgba(244, 240, 230, 0) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--green);
}

.brand-mark svg {
  width: 29px;
  height: 29px;
}

.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.brand-name span {
  margin-left: 1px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.family-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.66);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
}

.family-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--sage);
  box-shadow: 0 0 0 3px rgba(126, 142, 109, 0.14);
}

.icon-btn {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.66);
  color: var(--ink-2);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.alert-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  display: none;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--paper);
  border-radius: 50%;
  background: var(--coral);
}

.alert-dot.is-visible {
  display: block;
}

/* ---------- greeting ---------- */

.greeting {
  padding: 18px 21px 16px;
}

.greeting-day {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.7px;
}

.greeting-day::before {
  content: "";
  width: 15px;
  height: 1px;
  background: var(--line-strong);
}

.greeting h1 {
  font-size: 24px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.7px;
}

.greeting h1 span {
  color: var(--muted);
  font-weight: 500;
}

.greeting-sub {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.1px;
}

/* ---------- hero ---------- */

#hero {
  padding: 0 17px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 19px 19px 15px;
  border-radius: 27px;
  background: var(--green-deep);
  color: #f7f2e4;
  box-shadow: 0 20px 42px rgba(45, 57, 37, 0.2);
  isolation: isolate;
}

.hero-card::before {
  content: "";
  position: absolute;
  top: -94px;
  right: -74px;
  width: 246px;
  height: 246px;
  border: 1px solid rgba(236, 242, 218, 0.11);
  border-radius: 50%;
  box-shadow:
    0 0 0 25px rgba(236, 242, 218, 0.028),
    0 0 0 57px rgba(236, 242, 218, 0.018);
  z-index: -1;
}

.hero-card::after {
  content: "";
  position: absolute;
  bottom: 30px;
  right: 36px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow:
    12px 9px 0 rgba(220, 228, 197, 0.38),
    26px -4px 0 rgba(220, 228, 197, 0.22),
    41px 14px 0 rgba(220, 228, 197, 0.3);
  z-index: -1;
}

.hero-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hero-copy {
  min-width: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(244, 239, 226, 0.62);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1.3px;
}

.hero-eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #cbd9ac;
  box-shadow: 0 0 0 4px rgba(203, 217, 172, 0.1);
  animation: breathe 2.8s ease-in-out infinite;
}

@keyframes breathe {

  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(203, 217, 172, 0.08);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(203, 217, 172, 0.03);
  }
}

.hero-card h2 {
  margin-top: 13px;
  color: #f6f0e0;
  font-size: 28px;
  font-weight: 650;
  line-height: 1.24;
  letter-spacing: -1.1px;
}

.hero-card h2 span {
  color: #d9e4c1;
}

.hero-card h2.is-calm {
  font-size: 26px;
}

.hero-days {
  position: relative;
  display: flex;
  flex: 0 0 86px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 86px;
  margin-top: 3px;
  border: 1px dashed rgba(239, 245, 221, 0.24);
  border-radius: 50%;
}

.hero-days strong {
  font-family: var(--font-num);
  font-size: 38px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -2px;
  color: #e3eacb;
}

.hero-days strong em {
  margin-left: 1px;
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0;
}

.hero-days small {
  margin-top: 4px;
  color: rgba(244, 239, 226, 0.52);
  font-size: 8.5px;
  letter-spacing: 0.5px;
}

.hero-sub {
  max-width: 272px;
  margin-top: 8px;
  color: rgba(246, 241, 228, 0.62);
  font-size: 11.5px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 39px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #ece6d3;
  color: #2e3828;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(20, 28, 16, 0.14);
}

.btn-hero .icon {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  height: 39px;
  padding: 0 12px;
  border: 1px solid rgba(239, 245, 221, 0.16);
  border-radius: 999px;
  background: transparent;
  color: rgba(241, 237, 221, 0.72);
  font-size: 10.5px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid rgba(240, 245, 224, 0.1);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  color: rgba(242, 238, 224, 0.5);
  font-size: 9.5px;
  white-space: nowrap;
}

.hero-meta span+span::before {
  content: "";
  width: 2px;
  height: 2px;
  margin: 0 9px;
  border-radius: 50%;
  background: rgba(242, 238, 224, 0.26);
}

.hero-meta strong {
  margin-right: 3px;
  color: rgba(245, 241, 228, 0.88);
  font-size: 11.5px;
  font-weight: 600;
}

/* ---------- ai strip ---------- */

.ai-strip {
  display: flex;
  width: calc(100% - 36px);
  align-items: center;
  gap: 10px;
  margin: 13px 18px 0;
  padding: 10px 11px;
  border: 1px solid rgba(64, 77, 53, 0.08);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.62);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.ai-orb {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 50%;
  background: #e7ead6;
  color: #4c5e3f;
}

.ai-orb .icon {
  width: 17px;
  height: 17px;
}

.ai-strip-copy {
  flex: 1;
  min-width: 0;
}

.ai-strip-copy strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.ai-strip-copy span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-strip>.icon {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

/* ---------- inventory ---------- */

.inventory {
  padding: 0 18px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 25px 3px 11px;
}

.section-kicker {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.6px;
}

.section-head h2 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.5px;
}

.sort-note {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-bottom: 3px;
  color: var(--muted-2);
  font-size: 9.5px;
  white-space: nowrap;
}

.filter-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: 0 -18px;
  padding: 1px 18px 5px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 31px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.45);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.chip .chip-count {
  color: var(--muted-2);
  font-size: 9px;
  font-family: var(--font-num);
}

.chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.chip.is-active .chip-count {
  color: rgba(244, 240, 230, 0.55);
}

.item-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-top: 6px;
}

.item-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid rgba(45, 55, 39, 0.07);
  border-radius: 21px;
  background: var(--card);
  color: inherit;
  text-align: left;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 5px 15px rgba(43, 54, 35, 0.035);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  animation: item-in 0.32s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

.item-card:nth-child(2) {
  animation-delay: 0.035s;
}

.item-card:nth-child(3) {
  animation-delay: 0.07s;
}

.item-card:nth-child(4) {
  animation-delay: 0.105s;
}

@keyframes item-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.item-card:active {
  transform: scale(0.987);
  box-shadow: 0 2px 6px rgba(43, 54, 35, 0.04);
}

.item-art-wrap {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  overflow: hidden;
  border-radius: 17px;
  background: var(--art-bg, #eee8db);
  color: var(--art-ink, #5b5747);
}

.item-art-wrap::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -14px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 50%;
}

.item-art-wrap svg {
  position: relative;
  width: 40px;
  height: 40px;
  z-index: 1;
}

.item-body {
  display: block;
  flex: 1;
  min-width: 0;
}

.item-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.item-line strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.25px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-tag {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: 5px;
  background: #ece8dd;
  color: var(--muted);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.status-urgent .status-tag {
  background: var(--coral-soft);
  color: #b44d34;
}

.status-soon .status-tag {
  background: var(--amber-soft);
  color: #9f6e2d;
}

.status-watch .status-tag {
  background: #e9ecdf;
  color: #6d7e56;
}

.status-sealed .status-tag {
  background: #e5ebe2;
  color: #5f7257;
}

.item-meta {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9.5px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
}

.track {
  position: relative;
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #eeebe1;
}

.track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--sage);
  transition: width 0.45s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.status-urgent .track i {
  background: var(--coral);
}

.status-soon .track i {
  background: #c79342;
}

.status-sealed .track i {
  background: #8a9a7d;
}

.pct {
  width: 31px;
  flex: 0 0 31px;
  color: var(--muted-2);
  font-family: var(--font-num);
  font-size: 9px;
  text-align: right;
}

.item-days {
  display: flex;
  width: 52px;
  min-height: 46px;
  flex: 0 0 52px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--line);
  color: var(--muted);
  line-height: 1;
}

.item-days strong {
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -1px;
}

.status-urgent .item-days strong {
  color: var(--coral);
}

.status-soon .item-days strong {
  color: #a9752b;
}

.item-days b {
  margin-top: 2px;
  font-size: 8.5px;
  font-weight: 500;
}

.item-days small {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 8px;
  white-space: nowrap;
}

.item-days.is-sealed strong {
  font-family: var(--font);
  font-size: 12px;
  letter-spacing: 0;
  color: var(--sealed);
}

.empty-state {
  padding: 32px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 21px;
  background: rgba(255, 253, 248, 0.4);
  text-align: center;
}

.empty-orb {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  margin: 0 auto 11px;
  border-radius: 50%;
  background: #e7ead9;
  color: var(--sage);
}

.empty-state h3 {
  font-size: 14px;
  font-weight: 600;
}

.empty-state p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
}

.empty-state button {
  margin-top: 13px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 10.5px;
  font-weight: 600;
}

.home-foot {
  margin: 24px 0 0;
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.3px;
  text-align: center;
}

/* ---------- generic page head ---------- */

.page-head {
  padding: 22px 22px 17px;
}

.page-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 1px;
}

.page-kicker::before {
  content: "";
  width: 15px;
  height: 1px;
  background: var(--line-strong);
}

.page-head h1 {
  font-size: 26px;
  font-weight: 650;
  line-height: 1.32;
  letter-spacing: -0.8px;
}

.page-head h1 span {
  color: var(--muted);
  font-weight: 500;
}

.page-head .page-sub {
  max-width: 320px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

/* ---------- reminders ---------- */

.reminder-summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  overflow: hidden;
  margin: 0 18px 22px;
  padding: 16px;
  border-radius: 24px;
  background: #e9e4d3;
}

.reminder-summary::after {
  content: "";
  position: absolute;
  top: -45px;
  right: -30px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(62, 81, 55, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(62, 81, 55, 0.035);
}

.summary-orb {
  display: flex;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green);
  color: #f5f0df;
  line-height: 1;
}

.summary-orb strong {
  font-family: var(--font-num);
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -1px;
}

.summary-orb span {
  margin-top: 2px;
  color: rgba(245, 240, 223, 0.65);
  font-size: 8px;
}

.summary-copy {
  flex: 1;
  min-width: 0;
}

.summary-copy h2 {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.3px;
}

.summary-copy p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.summary-settings {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(62, 81, 55, 0.1);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.5);
  color: var(--ink-2);
  z-index: 1;
}

.summary-settings .icon {
  width: 16px;
  height: 16px;
}

.rem-group {
  margin: 0 18px 21px;
}

.rem-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 3px 9px;
}

.rem-group-head h3 {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1px;
}

.rem-group-head span {
  color: var(--muted-2);
  font-size: 9px;
}

.reminder-card {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 8px;
  padding: 11px;
  border: 1px solid rgba(45, 55, 39, 0.07);
  border-radius: 19px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.reminder-card .item-art-wrap {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border-radius: 15px;
}

.reminder-card .item-art-wrap svg {
  width: 33px;
  height: 33px;
}

.reminder-info {
  flex: 1;
  min-width: 0;
}

.reminder-info h3 {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 650;
}

.reminder-info p {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reminder-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.mini-btn {
  height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.mini-btn.primary {
  border-color: var(--green);
  background: var(--green);
  color: #f6f1e2;
  font-weight: 600;
}

.mini-btn.soft {
  border-color: transparent;
  background: #eeeadf;
  color: var(--ink-2);
}

.reminder-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 4px 4px 0;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.6;
}

.reminder-note .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
}

.cart-card {
  position: relative;
  overflow: hidden;
  margin: 0 18px 18px;
  padding: 17px;
  border-radius: 24px;
  background: var(--green-deep);
  color: #f4efdf;
}

.cart-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(219, 228, 197, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 20px rgba(219, 228, 197, 0.025);
}

.cart-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  z-index: 1;
}

.cart-kicker {
  color: rgba(244, 239, 223, 0.5);
  font-size: 8.5px;
  letter-spacing: 0.9px;
}

.cart-head h3 {
  margin-top: 3px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.3px;
}

.cart-total {
  color: #d8e1c4;
  font-family: var(--font-num);
  font-size: 19px;
  font-weight: 650;
}

.cart-items {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 14px;
  z-index: 1;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(244, 239, 223, 0.72);
  font-size: 10px;
}

.cart-item .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #afc18f;
}

.cart-item span:nth-child(2) {
  flex: 1;
}

.cart-item strong {
  color: rgba(244, 239, 223, 0.94);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 500;
}

.cart-action {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 15px;
  padding: 11px 14px;
  border: 0;
  border-radius: 13px;
  background: #ece6d3;
  color: #2e3828;
  font-size: 11px;
  font-weight: 650;
  z-index: 1;
}

.cart-action .icon {
  width: 15px;
  height: 15px;
}

.eco-note {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  color: rgba(244, 239, 223, 0.36);
  font-size: 8px;
  z-index: 1;
}

.eco-note .icon {
  width: 10px;
  height: 10px;
}

.settings-entry {
  display: flex;
  width: calc(100% - 36px);
  align-items: center;
  gap: 10px;
  margin: 0 18px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.52);
  text-align: left;
}

.settings-entry>.icon:first-child {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.settings-entry div {
  flex: 1;
}

.settings-entry strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
}

.settings-entry span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.settings-entry>.icon:last-child {
  width: 13px;
  height: 13px;
  color: var(--muted-2);
}

/* ---------- family ---------- */

.family-card {
  position: relative;
  overflow: hidden;
  margin: 0 18px 13px;
  padding: 17px;
  border: 1px solid rgba(45, 55, 39, 0.07);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.family-top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.family-mark {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  place-items: center;
  border-radius: 15px;
  background: #e7ead9;
  color: var(--green);
}

.family-mark .icon {
  width: 23px;
  height: 23px;
}

.family-name {
  flex: 1;
  min-width: 0;
}

.family-name strong {
  display: block;
  font-size: 14px;
  font-weight: 650;
}

.family-name span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.edit-btn {
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
}

.household-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: 15px;
  border-radius: 15px;
  background: var(--line);
}

.household-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 67px;
  background: #faf7ee;
}

.household-cell strong {
  font-family: var(--font-num);
  font-size: 21px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -0.5px;
}

.household-cell span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8.5px;
}

.family-observation {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #f3f0e4;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.family-observation .icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin-top: 1px;
  color: var(--sage);
}

.pet-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 0 18px 13px;
}

.pet-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(45, 55, 39, 0.07);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.66);
}

.pet-orb {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 50%;
  background: #ede3d2;
  color: #7d674a;
}

.pet-orb .icon {
  width: 21px;
  height: 21px;
}

.pet-copy {
  min-width: 0;
}

.pet-copy strong {
  display: block;
  font-size: 11px;
  font-weight: 650;
}

.pet-copy span {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted);
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-card {
  margin: 0 18px 17px;
  padding: 17px;
  border-radius: 23px;
  background: #e8ead9;
}

.model-card h3 {
  font-size: 13.5px;
  font-weight: 650;
}

.model-card>p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.model-steps {
  display: flex;
  gap: 6px;
  margin-top: 13px;
}

.model-step {
  position: relative;
  flex: 1;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.55);
}

.model-step i {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  margin-bottom: 7px;
  border-radius: 50%;
  background: var(--green);
  color: #f6f1e1;
  font-family: var(--font-num);
  font-size: 8px;
  font-style: normal;
}

.model-step strong {
  display: block;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.4;
}

.model-step span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7.5px;
  line-height: 1.4;
}

.settings-card {
  overflow: hidden;
  margin: 0 18px;
  border: 1px solid rgba(45, 55, 39, 0.07);
  border-radius: 22px;
  background: var(--card);
}

.settings-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 0;
  background: transparent;
  text-align: left;
}

.settings-row+.settings-row {
  border-top: 1px solid var(--line);
}

.row-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 10px;
  background: #f1eee3;
  color: var(--muted);
}

.row-icon .icon {
  width: 16px;
  height: 16px;
}

.settings-row-label {
  flex: 1;
  min-width: 0;
}

.settings-row-label strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
}

.settings-row-label span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.settings-row-value {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 9.5px;
}

.settings-row-value .icon {
  width: 12px;
  height: 12px;
  color: var(--muted-2);
}

.settings-row.danger .row-icon {
  background: #f4e5df;
  color: var(--coral);
}

.settings-row.danger .settings-row-label strong {
  color: #a9533e;
}

/* ---------- tab bar ---------- */

.tabbar {
  position: fixed;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  z-index: 40;
  display: flex;
  width: min(448px, calc(100% - 24px));
  align-items: center;
  gap: 2px;
  padding: 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.88);
  box-shadow:
    0 14px 38px rgba(38, 49, 31, 0.17),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.nav-item {
  position: relative;
  display: flex;
  height: 48px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: var(--muted-2);
  transition: color 0.2s, background 0.2s;
}

.nav-item .icon {
  width: 20px;
  height: 20px;
}

.nav-item span {
  font-size: 7.5px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.nav-item.is-active {
  background: #f0ede1;
  color: var(--ink);
}

.nav-item.is-active .icon {
  stroke-width: 2;
}

.nav-badge {
  position: absolute;
  top: 9px;
  right: calc(50% - 14px);
  display: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
}

.nav-badge.is-visible {
  display: block;
}

.tab-add {
  display: flex;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--green);
  color: #f5f0df;
  box-shadow: 0 5px 12px rgba(49, 64, 41, 0.27);
  transition: transform 0.16s ease;
}

.tab-add:active {
  transform: scale(0.95);
}

.tab-add .icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.2;
}

.tab-add span {
  margin-top: -1px;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: rgba(245, 240, 223, 0.68);
}

/* ---------- sheet ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(29, 36, 24, 0.36);
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.32s ease;
}

.overlay.is-shown {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 110;
  display: flex;
  width: min(480px, 100%);
  max-height: 93vh;
  max-height: 93dvh;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px 28px 0 0;
  background: var(--paper-2);
  box-shadow: 0 -24px 60px rgba(31, 42, 24, 0.24);
  transform: translate(-50%, 102%);
  transition: transform 0.4s cubic-bezier(0.22, 0.82, 0.26, 1);
  visibility: hidden;
}

.sheet.is-open {
  visibility: visible;
  transform: translate(-50%, 0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  flex: 0 0 4px;
  margin: 9px auto 0;
  border-radius: 999px;
  background: rgba(45, 55, 39, 0.15);
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 20px 8px;
}

.sheet-head h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.4px;
}

.sheet-close {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.sheet-close .icon {
  width: 16px;
  height: 16px;
}

.sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3px 20px calc(24px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.sheet-body::-webkit-scrollbar {
  display: none;
}

.toast {
  position: fixed;
  bottom: calc(100px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 200;
  max-width: min(82vw, 360px);
  padding: 10px 14px;
  border-radius: 13px;
  background: rgba(38, 43, 35, 0.92);
  color: #f7f3e7;
  font-size: 10.5px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
  backdrop-filter: blur(8px);
}

.toast.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- add flow ---------- */

.capture-lead {
  margin: 2px 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.capture-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.capture-card {
  display: flex;
  min-height: 126px;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.capture-card:active {
  transform: scale(0.985);
}

.capture-card.is-accent {
  border-color: rgba(62, 81, 55, 0.14);
  background: #e8ead9;
}

.capture-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: #f1eee3;
  color: var(--green);
}

.capture-card.is-accent .capture-icon {
  background: rgba(255, 253, 248, 0.62);
}

.capture-icon .icon {
  width: 18px;
  height: 18px;
}

.capture-card strong {
  display: block;
  margin-top: 13px;
  font-size: 12px;
  font-weight: 650;
}

.capture-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.manual-entry {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 11px;
  padding: 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 9.5px;
}

.manual-entry .icon {
  width: 12px;
  height: 12px;
}

.tip-box {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 13px;
  background: #f1eee3;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.tip-box .icon {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  margin-top: 1px;
  color: var(--sage);
}

.scan-box {
  position: relative;
  height: 190px;
  overflow: hidden;
  border-radius: 20px;
  background: #e4dfd1;
  color: #78715d;
}

.scan-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-art {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.scan-art svg {
  width: 96px;
  height: 96px;
  opacity: 0.8;
}

.scan-line {
  position: absolute;
  right: 12px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #8fa874, transparent);
  box-shadow: 0 0 14px rgba(143, 168, 116, 0.8);
  animation: scan 1.5s ease-in-out infinite;
}

@keyframes scan {
  0% {
    top: 12%;
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    top: 88%;
    opacity: 0;
  }
}

.scan-corners::before,
.scan-corners::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(238, 245, 223, 0.82);
  border-style: solid;
}

.scan-corners::before {
  top: 14px;
  left: 14px;
  border-width: 1.5px 0 0 1.5px;
  border-radius: 6px 0 0;
}

.scan-corners::after {
  right: 14px;
  bottom: 14px;
  border-width: 0 1.5px 1.5px 0;
  border-radius: 0 0 6px;
}

.scan-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10.5px;
}

.scan-dots {
  display: flex;
  gap: 3px;
}

.scan-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sage);
  animation: dot 1s ease-in-out infinite;
}

.scan-dots i:nth-child(2) {
  animation-delay: 0.16s;
}

.scan-dots i:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes dot {

  0%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

.wave {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
  padding: 0 18px;
  border-radius: 17px;
  background: #e8ead9;
}

.wave i {
  width: 3px;
  height: 12px;
  border-radius: 999px;
  background: var(--sage);
  animation: wave 0.9s ease-in-out infinite;
}

.wave i:nth-child(2n) {
  animation-delay: 0.12s;
}

.wave i:nth-child(3n) {
  animation-delay: 0.26s;
}

.wave i:nth-child(4n) {
  height: 22px;
  animation-delay: 0.36s;
}

.wave i:nth-child(5n) {
  height: 30px;
  animation-delay: 0.18s;
}

@keyframes wave {

  0%,
  100% {
    transform: scaleY(0.45);
    opacity: 0.5;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.voice-result {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 15px;
  background: var(--card);
  border: 1px solid var(--line);
}

.voice-result span {
  display: block;
  color: var(--muted-2);
  font-size: 8.5px;
  letter-spacing: 0.4px;
}

.voice-result strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

.voice-result strong em {
  color: var(--sage);
  font-style: normal;
}

/* ---------- form ---------- */

.form-preview {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.form-preview .item-art-wrap {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
  border-radius: 14px;
}

.form-preview .item-art-wrap svg {
  width: 34px;
  height: 34px;
}

.form-preview-copy {
  flex: 1;
  min-width: 0;
}

.form-preview-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.form-preview-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.form-preview-badge {
  padding: 4px 7px;
  border-radius: 6px;
  background: #e7ead9;
  color: var(--green);
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.field {
  display: block;
  margin-top: 13px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
}

.field-label output {
  color: var(--ink-2);
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
}

.field input:not([type="range"]),
.field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--card);
  color: var(--ink);
  font-size: 12.5px;
  outline: 0;
  -webkit-appearance: none;
  appearance: none;
}

.field select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 19px,
    calc(100% - 11px) 19px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.field input:focus,
.field select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(126, 142, 109, 0.1);
}

.field input::placeholder {
  color: #b2b5a6;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.range-wrap {
  padding: 11px 12px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--card);
}

input[type="range"] {
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: #e8e4d8;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  accent-color: var(--sage);
}

input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 1px 5px rgba(42, 53, 34, 0.24);
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--green);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 8px;
}

.estimate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #e8ead9;
}

.estimate-label strong {
  display: block;
  color: var(--green);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.estimate-label span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.estimate-value {
  color: var(--green);
  font-family: var(--font-num);
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -1px;
  white-space: nowrap;
}

.estimate-value small {
  margin-left: 2px;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.btn {
  display: flex;
  width: 100%;
  height: 49px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  border: 0;
  border-radius: 15px;
  font-size: 12.5px;
  font-weight: 650;
  transition: transform 0.15s ease;
}

.btn:active {
  transform: scale(0.988);
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--green);
  color: #f7f2e2;
  box-shadow: 0 6px 16px rgba(53, 68, 44, 0.18);
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-2);
}

.btn-soft {
  background: #e9e5d9;
  color: var(--ink-2);
}

.btn-coral {
  background: var(--coral);
  color: #fff7ef;
}

.form-submit {
  margin-top: 17px;
}

.form-fineprint {
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.55;
  text-align: center;
}

/* ---------- detail ---------- */

.detail-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0 15px;
}

.detail-top .item-art-wrap {
  width: 68px;
  height: 68px;
  flex-basis: 68px;
  border-radius: 20px;
}

.detail-top .item-art-wrap svg {
  width: 48px;
  height: 48px;
}

.detail-name {
  flex: 1;
  min-width: 0;
}

.detail-name .status-tag {
  display: inline-block;
  margin-bottom: 5px;
  font-size: 8.5px;
}

.detail-name h3 {
  font-size: 21px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.5px;
}

.detail-name p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.detail-meter {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 17px;
  border: 1px solid rgba(45, 55, 39, 0.07);
  border-radius: 23px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.detail-ring {
  position: relative;
  display: grid;
  width: 112px;
  height: 112px;
  flex: 0 0 112px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--p) * 1%), #e9e6db 0);
  transform: rotate(-18deg);
}

.detail-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--card);
}

.detail-ring-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  transform: rotate(18deg);
}

.detail-ring-inner strong {
  display: block;
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -1.5px;
  color: var(--ink);
}

.detail-ring-inner span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0.4px;
}

.detail-forecast {
  flex: 1;
  min-width: 0;
}

.forecast-kicker {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.5px;
}

.forecast-days {
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 30px;
  font-weight: 650;
  line-height: 1;
  letter-spacing: -1.5px;
}

.forecast-days small {
  margin-left: 3px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.forecast-date {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.forecast-date strong {
  color: var(--ink-2);
  font-weight: 600;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 8px;
  margin-top: 11px;
}

.detail-actions .btn {
  height: 45px;
  font-size: 11.5px;
}

.detail-block {
  margin-top: 12px;
  padding: 15px;
  border: 1px solid rgba(45, 55, 39, 0.07);
  border-radius: 20px;
  background: var(--card);
}

.detail-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.detail-block-head h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
}

.detail-block-head h3 .icon {
  width: 14px;
  height: 14px;
  color: var(--sage);
}

.detail-block-head span {
  color: var(--muted-2);
  font-size: 8px;
}

.ai-explain {
  background: #e8ead9;
  border-color: transparent;
}

.ai-explain .ai-copy {
  margin-top: 9px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.factor-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 11px;
}

.factor {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 11px;
  background: rgba(255, 253, 248, 0.55);
}

.factor-icon {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 8px;
  background: rgba(62, 81, 55, 0.08);
  color: var(--green);
}

.factor-icon .icon {
  width: 13px;
  height: 13px;
}

.factor-copy {
  flex: 1;
  min-width: 0;
}

.factor-copy strong {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
}

.factor-copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8px;
}

.factor-value {
  color: var(--green);
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.factor-value.is-base {
  color: var(--muted);
  font-family: var(--font);
  font-size: 8.5px;
  font-weight: 500;
}

.model-foot {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid rgba(62, 81, 55, 0.1);
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.6;
}

.chart-wrap {
  margin-top: 9px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 92px;
  overflow: visible;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 7.5px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 7px;
}

.history-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 0;
}

.history-item+.history-item {
  border-top: 1px solid var(--line);
}

.history-dot {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--sage);
}

.history-item.is-ai .history-dot {
  background: #b09b66;
}

.history-copy {
  flex: 1;
  min-width: 0;
}

.history-copy strong {
  display: block;
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.45;
}

.history-copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8px;
}

.history-delta {
  color: var(--coral);
  font-family: var(--font-num);
  font-size: 9px;
  font-weight: 600;
}

.correction-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 8.5px;
}

.correction-toggle .icon {
  width: 11px;
  height: 11px;
}

.correction-panel {
  margin-top: 9px;
  padding: 11px;
  border-radius: 13px;
  background: #f3f0e5;
}

.correction-panel .range-wrap {
  padding: 0;
  border: 0;
  background: transparent;
}

.correction-panel .btn {
  height: 36px;
  margin-top: 9px;
  font-size: 10px;
}

/* ---------- purchase ---------- */

.purchase-product {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.purchase-product .item-art-wrap {
  width: 55px;
  height: 55px;
  flex-basis: 55px;
  border-radius: 15px;
}

.purchase-product .item-art-wrap svg {
  width: 37px;
  height: 37px;
}

.purchase-copy {
  flex: 1;
  min-width: 0;
}

.purchase-copy strong {
  display: block;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.purchase-price {
  text-align: right;
}

.purchase-price strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.5px;
}

.purchase-price span {
  display: block;
  color: var(--muted-2);
  font-size: 7.5px;
}

.purchase-lead {
  margin: 15px 0 9px;
  color: var(--muted);
  font-size: 9px;
}

.purchase-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.purchase-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: var(--card);
  text-align: left;
}

.purchase-option.is-selected {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(62, 81, 55, 0.08);
}

.option-radio {
  display: grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
}

.purchase-option.is-selected .option-radio {
  border-color: var(--green);
  background: var(--green);
}

.option-radio::after {
  content: "";
  display: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f6f1e1;
}

.purchase-option.is-selected .option-radio::after {
  display: block;
}

.option-copy {
  flex: 1;
  min-width: 0;
}

.option-copy strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
}

.option-copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.45;
}

.option-tag {
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--coral-soft);
  color: #b24c33;
  font-size: 7px;
  font-weight: 600;
  white-space: nowrap;
}

.purchase-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.purchase-summary span {
  color: var(--muted);
  font-size: 9px;
}

.purchase-summary strong {
  font-family: var(--font-num);
  font-size: 20px;
  font-weight: 650;
}

.ecosystem-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 11px;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.55;
}

.ecosystem-note .icon {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  margin-top: 1px;
}

.purchase-success {
  padding: 22px 0 12px;
  text-align: center;
}

.success-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e4e9d3;
  color: var(--green);
  animation: pop 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.75);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-mark .icon {
  width: 30px;
  height: 30px;
  stroke-width: 2;
}

.purchase-success h3 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.4px;
}

.purchase-success p {
  max-width: 280px;
  margin: 7px auto 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.success-recap {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 17px 0;
  padding: 13px;
  border-radius: 15px;
  background: #f1eee3;
}

.success-recap div {
  text-align: center;
}

.success-recap strong {
  display: block;
  font-family: var(--font-num);
  font-size: 17px;
  font-weight: 650;
}

.success-recap span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

/* ---------- settings sheet ---------- */

.sheet-intro {
  margin: 3px 0 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.setting-line {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.setting-line:last-of-type {
  border-bottom: 0;
}

.setting-copy {
  flex: 1;
  min-width: 0;
}

.setting-copy strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
}

.setting-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.5;
}

.switch {
  position: relative;
  display: inline-block;
  width: 41px;
  height: 25px;
  flex: 0 0 41px;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #e4e0d3;
  transition: background 0.2s;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fffdf8;
  box-shadow: 0 1px 4px rgba(37, 46, 29, 0.18);
  transition: transform 0.2s ease;
}

.switch input:checked+.switch-track {
  background: var(--green);
}

.switch input:checked+.switch-track::after {
  transform: translateX(16px);
}

.setting-choice {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.setting-choice button {
  flex: 1;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--muted);
  font-family: var(--font-num);
  font-size: 10px;
}

.setting-choice button.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #f5f0df;
}

.setting-time {
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-num);
  font-size: 10px;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

.sheet-actions .btn {
  height: 44px;
  font-size: 11px;
}

/* ---------- family edit ---------- */

.edit-group {
  margin-top: 17px;
}

.edit-group:first-of-type {
  margin-top: 4px;
}

.edit-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.edit-label strong {
  font-size: 11px;
  font-weight: 600;
}

.edit-label span {
  color: var(--muted-2);
  font-size: 8px;
}

.stepper-row {
  display: flex;
  gap: 8px;
}

.stepper-card {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
}

.stepper-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stepper-copy .icon {
  width: 19px;
  height: 19px;
  color: var(--muted);
}

.stepper-copy strong {
  display: block;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.stepper-copy span {
  display: block;
  color: var(--muted-2);
  font-size: 7.5px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.stepper button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1;
}

.stepper output {
  min-width: 12px;
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.cooking-choice {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.cooking-choice button {
  height: 37px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  color: var(--muted);
  font-size: 8.5px;
  white-space: nowrap;
}

.cooking-choice button.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #f5f0df;
}

.edit-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.55;
}

.edit-note .icon {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  margin-top: 1px;
}

/* ---------- misc ---------- */

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

::selection {
  background: #dce4c5;
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 355px) {
  .hero-card h2 {
    font-size: 25px;
  }

  .hero-days {
    flex-basis: 76px;
    min-height: 76px;
  }

  .hero-days strong {
    font-size: 33px;
  }

  .family-chip {
    max-width: 122px;
    overflow: hidden;
  }

  .family-chip span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .reminder-actions .mini-btn:first-child {
    display: none;
  }

  .cooking-choice {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- 删除物品 ---------- */

.del-item {
  width: 100%;
  margin: 4px 0 6px;
  padding: 11px;
  border: 1px dashed rgba(207, 96, 69, 0.42);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--coral);
  font-size: 11px;
  font-weight: 500;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.del-item.is-armed {
  border-style: solid;
  border-color: var(--coral);
  background: var(--coral);
  color: #fff7f0;
}