:root {
  --ink: #182f29;
  --muted: #718078;
  --green: #173e35;
  --lime: #cce8ac;
  --pale: #edf4e8;
  --bg: #f8faf7;
  --line: #e9eee7;
  --orange: #ab6e31;
  --serif: inherit;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
.menu-reset {
  min-height: 44px;
  margin-top: 8px;
  font-size: 12px;
}
.menu-day-card {
  padding: 22px;
  margin: 22px 0 18px;
  border: 1px solid #d6e2ce;
  border-radius: 20px;
  background: #fff;
}
.menu-day-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.menu-day-heading .eyebrow {
  font-size: 9px;
  letter-spacing: 1px;
}
.menu-day-heading h3 {
  margin-top: 8px;
  font-size: 19px;
  line-height: 1.35;
}
.menu-day-heading .badge {
  flex-shrink: 0;
  font-size: 10px;
}
.menu-day-energy {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 9px;
  margin: 20px 0;
}
.menu-day-energy strong {
  font-size: 38px;
  letter-spacing: -1.2px;
  font-variant-numeric: tabular-nums;
}
.menu-day-energy span {
  font-size: 12px;
  color: #617467;
}
.menu-day-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.menu-day-breakdown > div {
  padding: 13px 12px;
  border-radius: 12px;
  background: #f4f7ef;
}
.menu-day-breakdown span,
.menu-day-breakdown b {
  display: block;
}
.menu-day-breakdown span {
  font-size: 10px;
  line-height: 1.5;
  margin-bottom: 6px;
  color: #5d7061;
}
.menu-day-breakdown b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.menu-day-reference {
  border-left: 3px solid #9bb58a;
  padding-left: 12px;
  margin: 18px 0 8px;
}
.menu-day-reference p {
  font-size: 12px;
  line-height: 1.7;
}
.menu-day-reference p + p {
  font-size: 11px;
  color: #617467;
  margin-top: 5px;
}
#menu-day-detail {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}
#menu-day-detail summary {
  min-height: 44px;
  padding: 14px 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.menu-day-table-wrap {
  overflow-x: auto;
}
.menu-day-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.menu-day-table caption {
  text-align: left;
  color: #617467;
  font-size: 11px;
  padding: 5px 0 13px;
}
.menu-day-table th,
.menu-day-table td {
  padding: 11px 6px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}
.menu-day-table th:first-child {
  text-align: left;
}
.menu-day-table tbody th {
  font-weight: 500;
}
.menu-day-table thead th {
  font-size: 10px;
  line-height: 1.5;
}
.menu-projection-empty {
  margin: 18px 0 12px;
  font-size: 12px;
  color: #805d32;
}
@media (max-width: 480px) {
  .menu-day-card {
    padding: 17px 14px;
  }
  .menu-day-heading {
    flex-wrap: wrap;
  }
  .menu-day-heading h3 {
    font-size: 18px;
  }
  .menu-day-breakdown {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }
  .menu-day-breakdown > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
  }
  .menu-day-breakdown span {
    margin: 0;
    font-size: 11px;
  }
  .menu-day-breakdown b {
    font-size: 13px;
    white-space: nowrap;
  }
  .menu-day-table th,
  .menu-day-table td {
    padding: 10px 3px;
    font-size: 11px;
  }
}
.menu-discovery {
  background: #f6f2e8;
  border-color: #e8dfca;
}
.menu-jump {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 18px;
  margin: 18px 0;
  color: white;
  background: var(--green);
  border-radius: 16px;
  position: sticky;
  top: 12px;
  z-index: 5;
  box-shadow: 0 5px 18px #173e3514;
}
.menu-jump > span {
  flex: 1;
  text-align: left;
}
.menu-jump b {
  font-size: 13px;
  padding: 5px 10px;
  background: #ffffff18;
  border-radius: 20px;
}
.menu-goals {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin: 22px 0;
}
.menu-goal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 8px;
  padding: 17px 13px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.menu-goal > span {
  font-size: 24px;
}
.menu-goal b {
  font-size: 14px;
}
.menu-goal small {
  font-size: 10px;
  color: #64766b;
}
.menu-goal.active {
  background: #eaf3e2;
  border-color: #8eaf80;
  box-shadow: inset 0 0 0 1px #8eaf80;
}
.menu-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: end;
  gap: 16px;
}
.menu-filter-bar .searchbox,
.menu-filter-bar .field {
  margin: 0;
}
.menu-method-note {
  font-size: 12px;
  color: #5d6f63;
  line-height: 1.7;
  margin: 14px 0 28px;
  max-width: 760px;
}
.menu-page .section-title small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
}
.menu-ideas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.menu-idea-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: white;
}
.menu-idea-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
}
.menu-idea-top > span:first-child {
  display: grid;
  place-items: center;
  width: 51px;
  height: 51px;
  background: #f1f5ec;
  border-radius: 16px;
  font-size: 28px;
}
.menu-idea-top > span:last-child {
  font-size: 11px;
  color: #64766b;
}
.menu-idea-card h3 {
  font-size: 18px;
  line-height: 1.35;
}
.menu-idea-card > p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 7px;
}
.menu-card-nutrients {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  padding: 18px 0;
  margin-top: auto;
  font-size: 11px;
}
.menu-card-nutrients > b {
  flex-basis: 100%;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.6px;
}
.menu-card-nutrients small {
  font-size: 11px;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 500;
}
.menu-card-nutrients > span {
  color: #5b6e62;
}
.menu-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.menu-card-actions .btn {
  flex: 1;
  min-height: 44px;
  font-size: 11px;
  padding: 11px 10px;
  white-space: nowrap;
}
.menu-card-actions .icon {
  width: 16px;
  height: 16px;
}
.menu-card-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 12px 0 0;
  padding: 10px;
  color: #923b30;
  background: #fff1ec;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.5;
}
.menu-card-warning .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.menu-plan {
  margin-top: 36px;
  padding: 27px;
  background: #eff4e9;
  border: 1px solid #dce6d5;
  border-radius: 24px;
  scroll-margin-top: 80px;
}
.menu-plan-list {
  display: grid;
  gap: 12px;
}
.menu-plan-item {
  padding: 20px;
  border-radius: 17px;
  background: white;
}
.menu-plan-item-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.menu-plan-item-title h3 {
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.menu-plan-item-title span {
  display: block;
  font-size: 11px;
  color: #617467;
  margin-top: 4px;
}
.menu-plan-item-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 16px;
}
.menu-plan-item-controls .field {
  margin: 0;
  font-size: 11px;
}
.menu-plan-item-controls .text-link {
  min-height: 44px;
  font-size: 12px;
}
.menu-plan input[aria-invalid="true"] {
  border-color: #b54934;
}
.menu-empty {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
}
.menu-empty > span {
  font-size: 40px;
}
.menu-empty p {
  font-size: 13px;
  color: #617467;
}
.menu-total-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 15px;
}
.menu-total-top > span {
  font-size: 12px;
  color: #617467;
}
.menu-total-top b {
  font-size: 30px;
  letter-spacing: -1px;
}
.menu-total-top small {
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 500;
}
.menu-total-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 0;
  border-block: 1px solid #d8e2d1;
}
.menu-total-grid b,
.menu-total-grid small {
  display: block;
}
.menu-total-grid small {
  font-size: 11px;
  color: #617467;
  margin-bottom: 6px;
}
.menu-total-grid b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.menu-plan-actions {
  display: flex;
  align-items: end;
  gap: 14px;
  margin: 22px 0 12px;
}
.menu-plan-actions .field {
  margin: 0;
}
.menu-plan-actions .btn {
  flex: 1;
  min-height: 47px;
}
.menu-error {
  margin-top: 12px;
  color: #9e3b28;
  font-size: 12px;
  line-height: 1.7;
}
.recipe-scan-wide,
.recipe-to-menu {
  width: 100%;
  background: #edf4e8;
  border: 1px solid #ccdcc4;
  margin: 9px 0;
  min-height: 47px;
}
.recipe-to-menu {
  margin: 18px 0 8px;
}
.scanned-ingredient {
  margin-top: 20px;
  padding: 21px;
  border: 1px solid #ccdcc4;
  background: #f2f7ed;
  border-radius: 20px;
}
.scanned-ingredient h3 {
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.scanned-ingredient > p {
  margin-bottom: 10px;
  font-size: 12px;
}
.scanned-ingredient .btn {
  width: 100%;
  margin-top: 8px;
}
#scan-recipe-back {
  margin-bottom: 17px;
  min-height: 44px;
}
.recipe-origin {
  margin: 19px 0 25px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fbfcf9;
}
.recipe-origin > .eyebrow {
  font-size: 9px;
  letter-spacing: 1px;
}
.recipe-origin > small {
  display: block;
  font-size: 10px;
  line-height: 1.7;
  color: #617467;
  margin-top: 9px;
}
.recipe-goal-state {
  display: grid;
  gap: 5px;
  padding-left: 10px;
  border-left: 3px solid #83a071;
  margin-top: 12px;
}
.recipe-goal-state.changed {
  border-color: #c7913c;
}
.recipe-goal-state b {
  font-size: 12px;
}
.recipe-goal-state span {
  font-size: 11px;
}
.recipe-preparation {
  margin-top: 17px;
}
.recipe-preparation summary,
.recipe-precise summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  min-height: 44px;
  padding-block: 12px;
}
.recipe-preparation ol {
  padding-left: 21px;
  margin: 5px 0 17px;
}
.recipe-preparation li {
  padding-left: 4px;
  margin: 13px 0;
  font-size: 12px;
  line-height: 1.75;
}
.recipe-preparation p,
.recipe-preparation a,
.recipe-precise p {
  font-size: 11px;
  line-height: 1.7;
}
.recipe-preparation p + p {
  margin-top: 10px;
}
.recipe-preparation a {
  display: inline-block;
  margin-top: 10px;
  text-underline-offset: 3px;
}
.recipe-precise {
  margin: 18px 0;
  border-top: 1px solid var(--line);
}
.recipe-precise td {
  font-variant-numeric: tabular-nums;
}
.recipe-precise th {
  text-align: left;
}
@media (max-width: 1150px) {
  .menu-ideas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .menu-page .page-head {
    display: block;
  }
  .menu-page .page-head > button {
    margin-top: 17px;
  }
  .menu-goals {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 3px 2px 10px;
  }
  .menu-goal {
    flex: 0 0 132px;
    scroll-snap-align: start;
  }
  .menu-filter-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .menu-filter-bar .field {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .menu-filter-bar select {
    flex: 1;
    width: auto;
  }
  .menu-ideas-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .menu-idea-card {
    padding: 20px;
  }
  .menu-card-nutrients {
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .menu-card-nutrients > b {
    flex-basis: auto;
  }
  .menu-card-nutrients > span b {
    display: block;
  }
  .menu-card-actions .btn {
    font-size: 12px;
  }
  .menu-plan {
    padding: 18px;
  }
  .menu-plan-item {
    padding: 16px;
  }
  .menu-plan-item-controls {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .menu-plan-item-controls > button {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .menu-total-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .menu-plan-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .menu-plan .section-title {
    align-items: flex-start;
  }
  .menu-plan .section-title h2 {
    font-size: 21px;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button {
  touch-action: manipulation;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #76a77d;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
}
a {
  color: var(--green);
}
button svg {
  flex-shrink: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 34px;
  line-height: 1.13;
  letter-spacing: -1.3px;
  font-weight: 650;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.6px;
  font-weight: 650;
}
h3 {
  font-size: 18px;
  letter-spacing: -0.3px;
}
p {
  line-height: 1.65;
}
.muted {
  color: var(--muted);
}
.icon {
  vertical-align: middle;
  flex-shrink: 0;
}
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.btn {
  min-height: 48px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 12px 18px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
}
.btn.primary {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.btn.soft {
  background: var(--pale);
  border-color: var(--pale);
}
.btn.danger {
  color: #a33d3d;
}
.icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
}
.text-link {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 44px;
}
.text-link .icon {
  width: 16px;
  height: 16px;
}
.button-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.shell {
  max-width: 1440px;
  margin: auto;
}
.workspace {
  margin-left: 230px;
}
.rail {
  width: 230px;
  position: fixed;
  top: 0;
  bottom: 0;
  padding: 38px 25px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
  letter-spacing: -1.7px;
  font-weight: 700;
  text-decoration: none;
}
.brand img {
  height: 34px;
  width: 34px;
}
.rail .brand {
  padding: 0 10px;
}
.rail-nav {
  display: grid;
  gap: 8px;
  margin-top: 56px;
}
.rail-nav button {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  border-radius: 16px;
  padding: 15px 17px;
  font-size: 14px;
  font-weight: 550;
  color: var(--muted);
}
.rail-nav button.active {
  background: var(--pale);
  color: var(--green);
}
.rail-nav .scan-nav {
  margin-top: 12px;
  background: var(--green);
  color: #fff;
}
.rail-bottom {
  margin-top: auto;
  padding: 18px 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}
.rail-bottom img {
  width: 32px;
  display: block;
  margin-bottom: 12px;
}
.topbar {
  height: 90px;
  padding: 0 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand {
  display: none;
}
.context-label {
  font-size: 13px;
  color: var(--muted);
}
.context-label b {
  color: var(--ink);
  font-weight: 550;
}
.top-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}
.status-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #71976b;
}
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e7eedd;
  display: grid;
  place-items: center;
}
.avatar .icon {
  width: 20px;
}
.main {
  max-width: 1160px;
  margin: auto;
  padding: 12px 38px 45px;
  animation: arrive 0.23s ease;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 25px;
}
.page-head .eyebrow {
  margin-bottom: 10px;
}
.page-head p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
}
.date-control {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 12px;
}
.date-control .icon {
  width: 17px;
}
.date-control input {
  border: 0;
  background: none;
  color: var(--ink);
  font-size: 12px;
  min-width: 111px;
  width: 111px;
  min-height: 42px;
  padding: 0;
}
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}
.home-primary,
.home-secondary {
  display: grid;
  gap: 20px;
}
.balance-card {
  background: var(--pale);
  border-radius: 28px;
  padding: 24px;
  overflow: hidden;
  position: relative;
}
.balance-card .card-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
}
.balance-card .card-label button {
  color: #63795f;
  width: 32px;
  height: 32px;
}
.balance-body {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 18px 0;
}
.ring {
  --pct: 0%;
  height: 138px;
  width: 138px;
  border-radius: 50%;
  padding: 9px;
  background: conic-gradient(var(--green) var(--pct), #d8e6cd 0);
  flex-shrink: 0;
  transform: rotate(-90deg);
}
.ring-center {
  background: var(--pale);
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transform: rotate(90deg);
}
.ring-number {
  font-size: 47px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}
.ring-center small {
  font-size: 10px;
  color: #71806c;
  margin-top: 4px;
  letter-spacing: 1px;
}
.balance-copy h2 {
  font-size: 25px;
  line-height: 1.15;
  max-width: 210px;
  letter-spacing: -0.7px;
  margin-bottom: 9px;
}
.balance-copy p {
  font-size: 12px;
  color: #62725d;
  max-width: 240px;
  line-height: 1.55;
}
.balance-footer {
  border-top: 1px solid #d8e4ce;
  padding-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #61745c;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff9;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 10px;
  color: var(--green);
  font-weight: 600;
}
.badge .icon {
  width: 12px;
  height: 12px;
}
.scan-cta {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--green);
  color: white;
  width: 100%;
  text-align: left;
  padding: 19px 21px;
  border-radius: 22px;
  min-height: 84px;
}
.scan-cta > .icon:first-child {
  width: 30px;
  height: 30px;
}
.scan-cta strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.scan-cta small {
  display: block;
  color: #c3d4cb;
  font-size: 12px;
  margin-top: 5px;
}
.scan-cta > .icon:last-child {
  margin-left: auto;
  width: 19px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.stat {
  padding: 18px 19px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
}
.stat-title {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-title .icon {
  width: 16px;
  height: 16px;
  color: #8c9b7d;
}
.stat-value {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.6px;
  margin-top: 9px;
  font-variant-numeric: tabular-nums;
}
.stat-value small {
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
  font-weight: 400;
}
.stat-note {
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 14px;
}
.section-title h2 {
  font-size: 19px;
}
.section-title > span {
  font-size: 11px;
  color: var(--muted);
}
.section-title .text-link {
  font-size: 12px;
  min-height: 32px;
}
.surface {
  background: #fff;
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 24px;
}
.suggestion {
  border-radius: 22px;
  background: #f1eee4;
  position: relative;
  padding: 21px;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 15px;
  text-align: left;
  width: 100%;
}
.suggestion h3 {
  font-size: 17px;
  margin-bottom: 5px;
}
.suggestion p {
  font-size: 12px;
  color: #7c7a68;
  line-height: 1.5;
}
.suggestion .emoji {
  font-size: 48px;
  transform: rotate(-14deg);
}
.suggestion .text-link {
  padding: 10px 0 0;
  min-height: 30px;
  font-size: 12px;
}
.food-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  text-align: left;
  min-width: 0;
}
.food-row + .food-row {
  border-top: 1px solid var(--line);
}
.food-art,
.entry-icon {
  width: 49px;
  height: 49px;
  border-radius: 15px;
  background: #f3f5ee;
  display: grid;
  place-items: center;
  font-size: 26px;
  flex-shrink: 0;
}
.food-row .food-info {
  flex: 1;
  min-width: 0;
}
.food-row b {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.food-row small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.food-row > .icon {
  width: 18px;
  color: #9aa394;
}
.food-row .icon-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  background: var(--pale);
  border: 0;
}
.food-row .icon-btn .icon {
  width: 16px;
}
.empty {
  text-align: center;
  padding: 28px 18px;
}
.empty .empty-art {
  width: 70px;
  height: 70px;
  background: var(--pale);
  border-radius: 23px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  color: #779569;
}
.empty .empty-art .icon {
  width: 32px;
  height: 32px;
}
.empty h3 {
  font-size: 18px;
}
.empty p {
  font-size: 13px;
  color: var(--muted);
  max-width: 320px;
  margin: 8px auto 16px;
}
.hint,
.footer-note {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.65;
  margin-top: 15px;
}
.footer-note {
  text-align: center;
  margin-top: 30px;
}
.profile-nudge {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 20px;
}
.profile-nudge .icon {
  color: #7d9972;
}
.profile-nudge strong {
  display: block;
  font-size: 13px;
}
.profile-nudge small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.profile-nudge > .icon:last-child {
  margin-left: auto;
  width: 18px;
}
.meal {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  margin-bottom: 14px;
  overflow: hidden;
}
.meal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
}
.meal-symbol {
  display: grid;
  place-items: center;
  background: #f8f3e8;
  color: #a48f58;
  border-radius: 13px;
  width: 42px;
  height: 42px;
}
.meal:nth-child(3) .meal-symbol {
  background: #edf2e7;
  color: #799064;
}
.meal:nth-child(4) .meal-symbol {
  background: #eeeef8;
  color: #8b86a9;
}
.meal-name {
  flex: 1;
}
.meal-name strong {
  font-size: 14px;
  font-weight: 600;
}
.meal-name small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.add-small {
  width: 38px;
  height: 38px;
  background: var(--pale);
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.add-small .icon {
  width: 18px;
}
.meal-empty {
  padding: 0 20px 19px;
  font-size: 12px;
  color: var(--muted);
}
.entry {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
}
.entry-main {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
  min-width: 0;
  padding: 0;
  text-align: left;
  min-height: 50px;
}
.entry-info {
  flex: 1;
  min-width: 0;
}
.entry-info b {
  font-size: 13px;
  font-weight: 550;
  display: block;
}
.entry-info small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.entry-metrics {
  font-size: 12px;
  white-space: nowrap;
}
.entry .delete {
  color: #acb3a7;
  width: 35px;
  height: 40px;
}
.entry .delete .icon {
  width: 17px;
}
.confirm-entry {
  font-size: 11px;
  color: var(--green);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 36px;
  padding: 0 10px;
}
.pill {
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 5px;
  display: inline-block;
  background: #f7ecd6;
  color: #9e7b36;
}
.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 22px;
}
.week button {
  border-radius: 16px;
  padding: 12px 4px;
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 7px;
  min-height: 76px;
  font-size: 10px;
  color: var(--muted);
}
.week button b {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.week button.active {
  background: var(--green);
  border-color: var(--green);
  color: #b8c8bd;
}
.week button.active b {
  color: white;
}
.week-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
}
.week-dot.empty-dot {
  background: transparent;
}
.diary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}
.diary-total {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 18px;
}
.diary-total b {
  display: block;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.7px;
}
.diary-total small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 5px;
}
.complete {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
input[type="checkbox"] {
  accent-color: var(--green);
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  margin: 0;
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.summary-grid small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-bottom: 5px;
}
.summary-grid b {
  font-size: 17px;
  font-weight: 550;
}
.summary-grid b small {
  display: inline;
  font-size: 11px;
  font-weight: 400;
}
.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 17px;
  padding: 0 14px;
  margin-bottom: 16px;
}
.searchbox .icon {
  width: 21px;
  color: #869181;
}
.searchbox input {
  min-width: 0;
  flex: 1;
  background: none;
  border: 0;
  outline: none;
  min-height: 55px;
  font-size: 15px;
  color: var(--ink);
}
.searchbox input::placeholder {
  color: #a1a99d;
}
.searchbox:focus-within {
  border-color: #93ad85;
  box-shadow: 0 0 0 3px #b9d5a629;
}
.searchbox .icon-btn {
  border: 0;
  width: 30px;
  height: 35px;
}
.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 0 15px;
  margin-bottom: 10px;
}
.filter {
  white-space: nowrap;
  padding: 9px 15px;
  min-height: 38px;
  border-radius: 12px;
  font-size: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}
.filter.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.food-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.food-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  text-align: left;
  position: relative;
}
.food-card > .food-open {
  display: block;
  text-align: left;
  width: 100%;
  padding: 16px;
}
.food-card .art {
  height: 85px;
  display: grid;
  place-items: center;
  font-size: 47px;
  background: #f3f5ed;
  border-radius: 14px;
  margin-bottom: 13px;
}
.food-card:nth-child(4n + 2) .art {
  background: #f8f0e7;
}
.food-card:nth-child(4n + 3) .art {
  background: #eef1f8;
}
.food-card:nth-child(4n + 4) .art {
  background: #f7f1e9;
}
.food-card .eyebrow {
  font-size: 8px;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}
.food-card h3 {
  font-size: 14px;
  line-height: 1.3;
  min-height: 36px;
  letter-spacing: 0;
  font-weight: 600;
}
.food-card p {
  font-size: 10px;
  color: var(--muted);
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.food-card footer {
  font-size: 11px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.food-card footer .icon {
  height: 17px;
  width: 17px;
}
.favorite {
  position: absolute;
  top: 21px;
  right: 21px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ffffffc9;
  display: grid;
  place-items: center;
  color: #93a08d;
}
.favorite .icon {
  width: 16px;
  height: 16px;
}
.favorite.selected {
  color: var(--green);
}
.favorite.selected .icon {
  fill: #d6e7c7;
}
.online-call {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 15px 17px;
  background: #edf3e9;
  border-radius: 17px;
  margin-bottom: 20px;
}
.online-call strong {
  font-size: 12px;
  display: block;
}
.online-call small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.online-call .btn {
  font-size: 12px;
  min-height: 40px;
  padding: 9px 13px;
  white-space: nowrap;
  border: 0;
}
.search-status {
  font-size: 13px;
  color: var(--muted);
  padding: 15px 0;
  line-height: 1.6;
}
.search-status .text-link {
  font-size: 12px;
}
.spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  border: 2px solid #ffffff50;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.profile-panel {
  max-width: 660px;
  margin: auto;
}
.profile-hero {
  text-align: center;
  margin: 10px 0 27px;
}
.profile-avatar {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 28px;
  background: var(--pale);
  margin: 0 auto 15px;
}
.profile-avatar .icon {
  width: 34px;
  height: 34px;
}
.profile-hero h2 {
  font-size: 25px;
}
.profile-hero p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}
.settings-list {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  overflow: hidden;
  margin: 20px 0;
}
.settings-row {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  width: 100%;
  text-align: left;
}
.settings-row + .settings-row {
  border-top: 1px solid var(--line);
}
.settings-row > .icon:first-child {
  color: #849779;
  width: 20px;
}
.settings-row div {
  flex: 1;
}
.settings-row b {
  font-size: 13px;
  font-weight: 550;
  display: block;
}
.settings-row small {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.settings-row > .icon:last-child {
  width: 16px;
  color: #9ba696;
}
.bottom-nav {
  display: none;
}
.offline-banner {
  background: #f8edda;
  color: #876b35;
  text-align: center;
  font-size: 12px;
  padding: 10px;
}
.notice {
  font-size: 12px;
  line-height: 1.6;
  padding: 14px 16px;
  background: #f8f2e7;
  border-radius: 14px;
  color: #816d47;
  margin: 16px 0;
}
.actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.actions > * {
  flex: 1;
}
dialog {
  padding: 0;
  border: 0;
  border-radius: 28px;
  width: min(540px, calc(100vw - 40px));
  max-height: 90dvh;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 30px 100px #0b241b28;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #142b244f;
  backdrop-filter: blur(5px);
}
dialog[open] {
  animation: sheet-in 0.24s ease-out;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 24px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid var(--line);
}
.dialog-head .eyebrow {
  font-size: 10px;
}
.close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f4f6f0;
  display: grid;
  place-items: center;
}
.close .icon {
  width: 18px;
  height: 18px;
}
.dialog-body {
  padding: 24px;
}
.dialog-body > h2 {
  font-size: 26px;
  letter-spacing: -0.7px;
  margin-bottom: 10px;
}
.dialog-body > p {
  font-size: 13px;
  margin-bottom: 20px;
}
.dialog-body .hint {
  font-size: 11px;
}
.dialog-body details {
  margin-top: 25px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.dialog-body summary {
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
  min-height: 40px;
}
.dialog-body details p {
  font-size: 11px;
  color: var(--muted);
  margin: 10px 0;
  line-height: 1.7;
}
.dialog-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin: 15px 0;
}
.dialog-body td,
.dialog-body th {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.dialog-body td:last-child,
.dialog-body th:last-child {
  text-align: right;
}
.source-link {
  font-size: 12px;
}
.product-title {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
}
.big-emoji {
  display: grid;
  place-items: center;
  font-size: 40px;
  background: #f1f5e9;
  border-radius: 23px;
  height: 80px;
  width: 80px;
  flex-shrink: 0;
}
.product-title h2 {
  font-size: 23px;
  line-height: 1.15;
  margin-bottom: 7px;
  letter-spacing: -0.5px;
}
.product-title small {
  font-size: 11px;
  color: var(--muted);
}
.segmented {
  display: flex;
  padding: 4px;
  background: #f3f5f0;
  border-radius: 13px;
  gap: 3px;
  margin: 16px 0;
}
.segmented button {
  flex: 1;
  font-size: 11px;
  min-height: 39px;
  border-radius: 10px;
  padding: 7px 8px;
  color: var(--muted);
  font-weight: 550;
}
.segmented button.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 2px 4px #1e372409;
}
.quantity-box {
  border: 1px solid var(--line);
  padding: 20px;
  border-radius: 22px;
  margin: 18px 0;
}
.quantity-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.quantity-top label {
  font-size: 12px;
  font-weight: 550;
}
.quantity-input {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quantity-input input {
  font-size: 26px;
  font-weight: 600;
  max-width: 90px;
  width: 85px;
  text-align: center;
  min-height: 47px;
  border: 0;
  background: #f5f7f1;
  border-radius: 12px;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}
.quantity-input select {
  font-size: 12px;
  max-width: 120px;
  border: 0;
  background: none;
  color: var(--muted);
  min-height: 44px;
}
.quick-portions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}
.quick-portions button {
  flex: 1;
  min-height: 38px;
  border-radius: 10px;
  background: #f4f6f0;
  border: 1px solid transparent;
  font-size: 13px;
}
.quick-portions button.selected {
  border-color: #8aa778;
  background: var(--pale);
}
.portion-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.6;
}
.piece-setting {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.piece-setting input {
  width: 70px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
  text-align: center;
}
.impact {
  background: var(--pale);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
}
.impact h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.impact p {
  font-size: 12px;
  color: #64775e;
  line-height: 1.65;
}
.impact b {
  color: var(--green);
  font-weight: 600;
}
.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 19px 0 22px;
}
.mini-stats > div {
  min-width: 0;
}
.mini-stats b {
  font-size: 19px;
  font-weight: 600;
  display: block;
  letter-spacing: -0.4px;
}
.mini-stats b small {
  font-size: 11px;
  font-weight: 400;
  display: inline;
}
.mini-stats small {
  font-size: 10px;
  display: block;
  color: var(--muted);
  margin-top: 5px;
  letter-spacing: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11px;
  font-weight: 550;
}
.field.full {
  grid-column: 1/-1;
}
.field input,
.field select {
  border: 1px solid var(--line);
  background: #f9faf7;
  min-height: 48px;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 16px;
  width: 100%;
  min-width: 0;
  color: var(--ink);
  font-weight: 400;
}
.conditions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.conditions label {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 43px;
  font-weight: 400;
}
.conditions label:has(input:checked) {
  background: var(--pale);
  border-color: #b9d1aa;
}
.conditions input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--green);
}
.sticky-actions {
  position: sticky;
  bottom: -24px;
  background: #fff;
  padding: 16px 0 6px;
  margin: 0 -1px;
  z-index: 3;
  border-top: 1px solid var(--line);
}
.sticky-actions .actions {
  margin-top: 0;
}
.camera-stage {
  height: 245px;
  border-radius: 22px;
  overflow: hidden;
  background: #182d25;
  position: relative;
  display: grid;
  place-items: center;
  margin: 20px 0;
  color: white;
}
.camera-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.viewfinder {
  position: absolute;
  width: 75%;
  height: 105px;
  border: 2px solid #cde9b1;
  border-radius: 18px;
  box-shadow: 0 0 0 120px #061a174f;
  z-index: 1;
  pointer-events: none;
}
.viewfinder:after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 50%;
  height: 1px;
  background: #cde9b1;
  box-shadow: 0 0 7px #cde9b1;
  animation: scan 2s ease-in-out infinite;
}
.camera-stage .camera-placeholder {
  z-index: 2;
  text-align: center;
  max-width: 200px;
  font-size: 12px;
  line-height: 1.6;
}
.camera-placeholder .icon {
  width: 45px;
  height: 45px;
  margin-bottom: 12px;
}
.camera-stage:has(video) .camera-placeholder {
  display: none;
}
.onboard {
  text-align: center;
  padding: 10px 0;
}
.onboard-art {
  height: 145px;
  display: grid;
  place-items: center;
  margin: 0 auto 28px;
  position: relative;
}
.onboard-art img {
  width: 90px;
  height: 90px;
}
.onboard-art:before {
  content: "";
  position: absolute;
  width: 142px;
  height: 142px;
  border-radius: 50%;
  background: #eff5e8;
  z-index: -1;
}
.onboard h2 {
  font-size: 31px;
  letter-spacing: -1px;
  line-height: 1.15;
  max-width: 300px;
  margin: 0 auto 15px;
}
.onboard p {
  font-size: 14px;
  color: var(--muted);
  max-width: 330px;
  margin: auto;
}
.onboard-features {
  display: grid;
  gap: 16px;
  text-align: left;
  margin: 25px 0;
}
.onboard-features > div {
  display: flex;
  gap: 14px;
  align-items: center;
  font-size: 12px;
}
.onboard-features .icon {
  width: 22px;
  color: #779468;
}
.onboard .btn {
  width: 100%;
  margin-top: 14px;
}
.onboard .text-link {
  margin: 9px auto 0;
}
.step-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}
.step-dots {
  display: flex;
  gap: 5px;
  margin-bottom: 20px;
}
.step-dots span {
  height: 4px;
  width: 28px;
  background: var(--line);
  border-radius: 3px;
}
.step-dots span.active {
  background: #99b782;
}
.form-step[hidden] {
  display: none;
}
.inline-error {
  font-size: 12px;
  color: #9b5142;
  margin-top: 12px;
}
.noscript {
  padding: 50px;
  text-align: center;
}
#toast {
  position: fixed;
  left: calc(50% + 90px);
  transform: translate(-50%, 20px);
  bottom: 30px;
  z-index: 1200;
  max-width: min(450px, calc(100vw - 32px));
  background: var(--green);
  color: #fff;
  padding: 14px 18px;
  border-radius: 15px;
  box-shadow: 0 10px 30px #173e352b;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 20px;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}
#toast button {
  color: var(--lime);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  min-height: 24px;
}
.install-tip {
  padding: 15px;
  font-size: 12px;
  line-height: 1.7;
}
.hidden {
  display: none !important;
}
@keyframes arrive {
  from {
    opacity: 0.25;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes sheet-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes scan {
  50% {
    transform: translateY(28px);
  }
}
@media (min-width: 1440px) {
  .rail {
    left: calc((100vw - 1440px) / 2);
  }
}
@media (max-width: 1100px) {
  .rail {
    width: 190px;
    padding: 35px 18px;
  }
  .workspace {
    margin-left: 190px;
  }
  .topbar {
    padding: 0 25px;
  }
  .main {
    padding: 12px 25px 40px;
  }
  .dashboard {
    grid-template-columns: 1fr 300px;
    gap: 18px;
  }
  .balance-body {
    gap: 15px;
  }
  .ring {
    width: 115px;
    height: 115px;
  }
  .balance-copy h2 {
    font-size: 23px;
  }
  .balance-card {
    padding: 20px;
  }
  .diary-layout {
    grid-template-columns: 1fr 270px;
    gap: 18px;
  }
}
@media (max-width: 900px) {
  .rail {
    display: none;
  }
  .workspace {
    margin-left: 0;
  }
  .topbar {
    height: 80px;
    padding: 0 25px;
  }
  .topbar .brand {
    display: flex;
    font-size: 28px;
  }
  .topbar .brand img {
    width: 28px;
    height: 28px;
  }
  .context-label {
    display: none;
  }
  .top-actions .desktop-add {
    display: none;
  }
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: #fffffff5;
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--line);
    padding: 8px max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    min-height: 73px;
  }
  .bottom-nav button {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 550;
    color: #92a08e;
    min-height: 53px;
  }
  .bottom-nav button.active {
    color: var(--green);
  }
  .bottom-nav button.active > .icon {
    stroke-width: 2.1;
  }
  .bottom-nav button.scan-nav {
    position: relative;
    transform: translateY(-17px);
    margin-bottom: -17px;
    color: var(--green);
  }
  .scan-bubble {
    width: 53px;
    height: 53px;
    display: grid;
    place-items: center;
    background: var(--green);
    color: #fff;
    border-radius: 19px;
    box-shadow: 0 6px 15px #173e3525;
    border: 5px solid var(--bg);
    box-sizing: content-box;
  }
  .scan-bubble .icon {
    width: 25px;
    height: 25px;
  }
  .main {
    padding-bottom: 115px;
  }
  .topbar {
    padding-top: env(safe-area-inset-top);
  }
  #toast {
    left: 50%;
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
  .home-secondary {
    gap: 20px;
  }
  .top-actions .status-pill {
    font-size: 11px;
  }
  .desktop-only {
    display: none;
  }
}
@media (max-width: 700px) {
  .main {
    padding: 8px 20px 110px;
  }
  .topbar {
    padding-left: 22px;
    padding-right: 22px;
    height: calc(77px + env(safe-area-inset-top));
  }
  .page-head {
    margin-bottom: 20px;
    align-items: center;
  }
  .page-head h1 {
    font-size: 29px;
    letter-spacing: -1.1px;
  }
  .page-head p {
    font-size: 12px;
    max-width: 240px;
  }
  .page-head .eyebrow {
    font-size: 10px;
    margin-bottom: 9px;
    letter-spacing: 1.1px;
  }
  .page-head .date-control {
    display: none;
  }
  .dashboard,
  .diary-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .balance-card {
    padding: 20px 21px;
    border-radius: 25px;
  }
  .balance-body {
    gap: 23px;
    margin: 15px 0;
  }
  .ring {
    height: 125px;
    width: 125px;
    padding: 8px;
  }
  .balance-copy h2 {
    font-size: 25px;
  }
  .balance-copy p {
    font-size: 11px;
    line-height: 1.55;
  }
  .balance-footer {
    font-size: 10px;
  }
  .balance-card .card-label {
    font-size: 12px;
  }
  .scan-cta {
    padding: 17px 20px;
    min-height: 79px;
    border-radius: 20px;
  }
  .scan-cta strong {
    font-size: 15px;
  }
  .scan-cta small {
    font-size: 11px;
  }
  .home-primary {
    gap: 14px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 16px 17px;
    border-radius: 18px;
  }
  .stat-value {
    font-size: 25px;
  }
  .stat-note {
    font-size: 9px;
  }
  .home-secondary {
    gap: 20px;
  }
  .suggestion {
    padding: 20px;
  }
  .surface {
    padding: 18px;
  }
  .section-title h2 {
    font-size: 18px;
  }
  .profile-nudge {
    border-radius: 18px;
  }
  .food-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
  }
  .food-card > .food-open {
    padding: 13px;
  }
  .food-card .art {
    height: 90px;
    font-size: 43px;
  }
  .food-card h3 {
    font-size: 13px;
  }
  .food-card .favorite {
    right: 17px;
    top: 17px;
  }
  .searchbox {
    margin-bottom: 13px;
  }
  .searchbox input {
    font-size: 16px;
  }
  .filters {
    margin-right: -20px;
    padding-right: 20px;
  }
  .filter {
    font-size: 11px;
    padding: 8px 13px;
  }
  .online-call {
    padding: 14px;
  }
  .online-call .btn {
    font-size: 11px;
    padding: 10px;
  }
  .online-call small {
    max-width: 180px;
    font-size: 10px;
  }
  .week {
    gap: 5px;
  }
  .week button {
    min-height: 70px;
    padding: 10px 2px;
    border-radius: 14px;
  }
  .diary-page .page-head .date-control {
    display: flex;
  }
  .diary-page .page-head {
    align-items: flex-end;
  }
  .diary-page h1 {
    font-size: 28px;
  }
  .diary-page .page-head .eyebrow {
    display: none;
  }
  .date-control {
    padding: 0 8px;
  }
  .meal-head {
    padding: 16px;
  }
  .meal-empty {
    padding: 0 16px 16px;
    font-size: 11px;
  }
  .entry {
    padding: 12px;
  }
  .entry-icon {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    font-size: 23px;
  }
  .entry-info b {
    font-size: 12px;
  }
  .entry-info small {
    font-size: 10px;
  }
  .entry-metrics {
    font-size: 11px;
  }
  .entry-main {
    gap: 9px;
  }
  .entry .delete {
    width: 30px;
  }
  .confirm-entry {
    padding: 0 7px;
    font-size: 10px;
  }
  .diary-summary {
    order: 2;
  }
  .profile-panel {
    max-width: 100%;
  }
  .profile-hero {
    margin-top: 15px;
  }
  dialog {
    width: 100%;
    max-width: 100%;
    max-height: 94dvh;
    margin: auto 0 0;
    border-radius: 27px 27px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .dialog-head {
    padding: 14px 21px;
  }
  .dialog-body {
    padding: 21px 21px 27px;
  }
  .dialog-body > h2 {
    font-size: 25px;
  }
  .quantity-box {
    padding: 17px;
  }
  .quantity-input input {
    font-size: 26px;
    width: 74px;
  }
  .quantity-input select {
    max-width: 112px;
    font-size: 13px;
  }
  .field input,
  .field select {
    font-size: 16px;
  }
  .sticky-actions {
    bottom: calc(-27px - env(safe-area-inset-bottom));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    margin: 5px -21px -27px;
    padding-left: 21px;
    padding-right: 21px;
  }
  .sticky-actions .btn {
    font-size: 12px;
    min-height: 51px;
  }
  .camera-stage {
    height: 230px;
  }
  .footer-note {
    font-size: 10px;
  }
  .mini-stats {
    gap: 8px;
  }
  .mini-stats b {
    font-size: 18px;
  }
  .onboard {
    padding-top: 8px;
  }
  .onboard-art {
    height: 120px;
    margin-bottom: 22px;
  }
  .onboard h2 {
    font-size: 30px;
  }
  .onboard p {
    font-size: 13px;
  }
  .topbar .status-pill {
    display: none;
  }
}
@media (max-width: 360px) {
  .main {
    padding-left: 15px;
    padding-right: 15px;
  }
  .balance-body {
    gap: 14px;
  }
  .ring {
    width: 112px;
    height: 112px;
  }
  .balance-copy h2 {
    font-size: 22px;
  }
  .balance-copy p {
    font-size: 10px;
  }
  .balance-card {
    padding: 18px;
  }
  .ring-number {
    font-size: 41px;
  }
  .product-title h2 {
    font-size: 20px;
  }
  .big-emoji {
    width: 66px;
    height: 66px;
  }
  .quantity-top {
    align-items: flex-start;
    flex-direction: column;
  }
  .quantity-input {
    width: 100%;
    justify-content: space-between;
  }
}

/* Recipes: one batch, one clearly selected portion. */
.recipe-discovery {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 17px 18px;
  border: 1px solid #dce6d5;
  border-radius: 20px;
  background: #f0f5e9;
  text-align: left;
  margin: 12px 0 22px;
}
.recipe-discovery-art {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}
.recipe-discovery-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recipe-discovery > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.recipe-discovery strong,
.recipe-discovery small {
  display: block;
}
.recipe-discovery strong {
  font-size: 15px;
}
.recipe-discovery small {
  margin-top: 4px;
  color: #53665b;
  font-size: 12px;
  line-height: 1.5;
}
.recipe-page .page-head {
  align-items: center;
}
.recipe-page-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.recipe-intro {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--green);
  color: #fff;
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 25px;
}
.recipe-intro > span {
  font-size: 55px;
}
.recipe-intro p {
  color: #dbe7d6;
  font-size: 14px;
  margin-top: 10px;
  max-width: 650px;
}
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.recipe-card {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px 15px;
  min-width: 0;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.recipe-card:hover {
  border-color: #9bb091;
  transform: translateY(-2px);
}
.recipe-art {
  background: var(--pale);
  border-radius: 16px;
  width: 58px;
  height: 66px;
  display: grid;
  place-items: center;
  font-size: 30px;
  flex-shrink: 0;
}
.recipe-card-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
  flex: 1;
}
.recipe-card-copy > small {
  color: var(--muted);
  font-size: 10px;
}
.recipe-card-copy > strong {
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.recipe-card-copy > span {
  color: var(--muted);
  font-size: 10px;
}
.recipe-card-copy > b {
  font-size: 13px;
  font-weight: 600;
}
.recipe-card-copy > b > small {
  font-weight: 400;
  font-size: 10px;
}
.recipe-card > .icon {
  width: 16px;
}
.recipe-method {
  margin: 28px 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-size: 13px;
}
.recipe-method summary {
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
}
.recipe-method p {
  color: #53665b;
  margin: 12px 0;
}
.recipe-method a {
  display: block;
  line-height: 2.5;
}
.recipe-editor-heading {
  display: flex;
  gap: 15px;
  margin-bottom: 24px;
}
.recipe-editor-heading > span {
  font-size: 42px;
}
.recipe-editor-heading p {
  font-size: 12px;
  color: #53665b;
  margin-top: 8px;
}
.recipe-batch-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 18px;
  padding: 18px;
  margin-top: 18px;
  background: var(--pale);
  border-radius: 16px;
}
.recipe-batch-controls p {
  font-size: 12px;
  color: #435a4c;
}
.dialog-body .recipe-resize {
  margin: 12px 0 25px;
  padding-top: 12px;
}
.recipe-resize-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 14px;
}
.recipe-ingredients-title {
  margin-top: 25px;
}
.recipe-ingredients-title small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  font-size: 11px;
}
.recipe-ingredient {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin: 12px 0;
}
.recipe-ingredient-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.recipe-ingredient-head > div {
  min-width: 0;
}
.recipe-ingredient-head b {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.recipe-ingredient-head small {
  display: block;
  font-size: 10px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 5px;
}
.recipe-ingredient-head .icon-btn {
  flex-shrink: 0;
  border: 0;
  background: #f7f8f5;
}
.recipe-ingredient-head .icon {
  width: 18px;
}
.recipe-ingredient-controls {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
}
.recipe-ingredient-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.recipe-ingredient-footer > small {
  font-size: 11px;
  color: #53665b;
}
.recipe-piece-weight {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  margin: 12px 0 0;
}
.recipe-piece-weight input {
  width: 72px;
  min-height: 44px;
  padding: 8px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #f8faf7;
}
.recipe-piece-weight small {
  grid-column: 1/-1;
  color: var(--muted);
  font-size: 10px;
}
.dialog-body .recipe-ingredient-source {
  margin-top: 0;
  padding-top: 6px;
}
.recipe-ingredient-source summary {
  font-size: 11px;
  min-height: 38px;
  padding-top: 8px;
  color: #53665b;
}
.recipe-add-wide {
  width: 100%;
  border-style: dashed;
  border-color: #b5c4ac;
  background: #f8faf4;
}
.recipe-data-note {
  margin: 15px 0 28px;
}
.recipe-no-ingredients {
  text-align: center;
  border: 1px dashed #c6d3bd;
  border-radius: 18px;
  padding: 24px 14px;
  margin: 15px 0;
}
.recipe-no-ingredients > span {
  font-size: 35px;
}
.recipe-no-ingredients p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.recipe-yield small {
  font-weight: 400;
  font-size: 11px;
  line-height: 1.6;
  color: #53665b;
}
.recipe-status {
  color: #42634b;
  font-size: 12px;
  line-height: 1.6;
  margin: 10px 0;
}
.recipe-portion-box {
  border: 1px solid #d8e3ce;
  background: #f6f9f1;
  padding: 20px;
  border-radius: 20px;
  margin: 25px 0;
}
.recipe-portion-box h3 {
  margin-bottom: 18px;
}
.recipe-portion-box .hint {
  margin-top: 12px;
}
.recipe-live-summary {
  border-radius: 20px;
  padding: 23px;
  background: var(--green);
  color: #fff;
}
.recipe-live-summary .eyebrow {
  color: #bfd5b3;
  font-size: 9px;
}
.recipe-live-summary h3 {
  margin-top: 10px;
  font-size: 16px;
}
.recipe-energy {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 12px 0 18px;
  flex-wrap: wrap;
}
.recipe-energy strong {
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -1.5px;
}
.recipe-energy > span {
  font-size: 12px;
  color: #d1e0cc;
}
.recipe-macros {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid #ffffff26;
  padding: 17px 0;
  gap: 8px;
}
.recipe-macros b,
.recipe-macros span {
  display: block;
}
.recipe-macros b {
  font-size: 16px;
  font-weight: 550;
}
.recipe-macros span {
  font-size: 10px;
  margin-top: 5px;
  color: #d1e0cc;
}
.recipe-live-summary p {
  margin-top: 15px;
  font-size: 11px;
  line-height: 1.7;
  color: #e0e9dd;
}
.recipe-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 22px 0 12px;
}
.recipe-nutrients {
  table-layout: fixed;
}
.recipe-nutrients caption {
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  padding-bottom: 12px;
}
.dialog-body .recipe-nutrients th,
.dialog-body .recipe-nutrients td {
  text-align: right;
  font-size: 11px;
  padding: 12px 4px;
  overflow-wrap: anywhere;
}
.dialog-body .recipe-nutrients th:first-child {
  width: 34%;
  text-align: left;
}
.recipe-nutrients th small {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.recipe-score-prompt {
  font-size: 11px;
  line-height: 1.7;
  color: #53665b;
  border: 1px dashed #c8d1c8;
  border-radius: 12px;
  padding: 15px;
  margin: 20px 0;
}
.recipe-state {
  margin: 25px 0 18px;
}
.recipe-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
}
.recipe-actions .btn {
  padding-inline: 10px;
  font-size: 12px;
}
.recipe-delete {
  display: flex;
  margin: 10px auto;
  color: #a44335;
}
.recipe-picker-actions {
  display: flex;
  gap: 10px;
}
.recipe-picker-actions > button {
  flex: 1;
  padding: 12px 10px;
  font-size: 13px;
}
.recipe-picker-result {
  display: flex;
  gap: 16px;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.recipe-picker-result > span {
  flex: 1;
  min-width: 0;
}
.recipe-picker-result b {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.recipe-picker-result small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}
#recipe-picker .searchbox {
  margin-top: 20px;
}
#recipe-manual {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f8faf6;
  padding: 18px;
  margin: 22px 0;
}
#recipe-manual .field,
#recipe-manual .hint,
#recipe-manual .form-grid {
  margin-bottom: 15px;
}
#recipe-manual .form-grid .field {
  margin-bottom: 0;
}
#recipe-manual textarea {
  font: inherit;
  font-size: 14px;
  border: 1px solid #dae2d5;
  border-radius: 12px;
  padding: 12px;
  resize: vertical;
  width: 100%;
}
#recipe-manual-error {
  color: #a44335;
  font-size: 12px;
  margin-bottom: 12px;
}
@media (max-width: 1100px) {
  .recipe-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .recipe-page .page-head {
    align-items: stretch;
  }
  .recipe-page .page-head > .btn {
    align-self: flex-start;
  }
  .recipe-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .recipe-card {
    padding: 15px;
  }
  .recipe-card-copy > strong {
    font-size: 15px;
  }
  .recipe-intro {
    padding: 22px 18px;
    gap: 16px;
  }
  .recipe-intro > span {
    font-size: 37px;
  }
  .recipe-intro h2 {
    font-size: 21px;
  }
  .recipe-intro p {
    font-size: 12px;
  }
  .recipe-batch-controls {
    padding: 15px;
    gap: 12px;
  }
  .recipe-batch-controls p {
    font-size: 11px;
  }
  .recipe-portion-box {
    padding: 18px 14px;
  }
  .recipe-live-summary {
    padding: 20px 16px;
  }
  .recipe-macros b {
    font-size: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

[hidden] {
  display: none !important;
}

#splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #fff;
  display: grid;
  place-items: center;
  transition: opacity 0.3s ease;
}
#splash.leaving {
  opacity: 0;
  pointer-events: none;
}
.splash-brand {
  text-align: center;
  color: #173e35;
}
.splash-brand img {
  width: 82px;
  height: 82px;
}
.splash-brand b {
  display: block;
  margin-top: 18px;
  font:
    650 38px -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  letter-spacing: -2px;
}

/* Product analysis: factual signals remain separate from personal portions. */
.food-analysis-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin: 22px 0;
  background: #edf1ed;
  border-radius: 17px;
}
.food-analysis-tabs button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 10px;
  min-height: 48px;
  border-radius: 12px;
  font-weight: 650;
  color: #63756c;
}
.food-analysis-tabs button[aria-selected="true"] {
  background: #fff;
  color: #173e35;
  box-shadow: 0 2px 8px #173e350b;
}
.food-analysis-tabs .icon {
  width: 19px;
  height: 19px;
}
.analysis-score-card {
  background: #f1f6ee;
  padding: 22px;
  border-radius: 22px;
  margin-bottom: 15px;
}
.analysis-score-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}
.analysis-score-top h3 {
  margin: 8px 0;
  font-size: 21px;
  letter-spacing: -0.5px;
}
.analysis-tag {
  font-size: 11px;
  letter-spacing: 0.15px;
  color: #51695a;
}
.product-score {
  display: flex;
  flex: 0 0 90px;
  width: 90px;
  height: 90px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 50%;
  background: #dcebd9;
  color: #18503b;
  border: 5px solid #bfd4b6;
}
.product-score strong {
  font-size: 37px;
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -2px;
}
.product-score span {
  font-size: 11px;
  margin-top: 3px;
}
.analysis-score-card.amber {
  background: #fff8e8;
}
.analysis-score-card.amber .product-score {
  background: #fff0c4;
  color: #80520c;
  border-color: #f1db9a;
}
.analysis-score-card.red {
  background: #fff1ec;
}
.analysis-score-card.red .product-score {
  background: #ffded3;
  color: #98392d;
  border-color: #edbaa8;
}
.analysis-score-card.unknown {
  background: #eff1f0;
}
.analysis-score-card.unknown .product-score {
  background: #e3e7e4;
  color: #5d6861;
  border-color: #d3dbd5;
}
.analysis-score-card > p {
  font-size: 14px;
  line-height: 1.65;
}
.analysis-disclaimer {
  margin-top: 12px;
  font-size: 11px !important;
  color: #68756c;
}
.coverage-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 16px 0;
}
.coverage-strip span {
  padding: 6px 9px;
  background: #f2f4f1;
  border-radius: 7px;
  font-size: 11px;
  color: #607267;
}
.analysis-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 30px 0 14px;
}
.analysis-section-head h3 {
  margin-top: 7px;
  font-size: 19px;
}
.analysis-section-head > small {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
}
.analysis-section-head .eyebrow {
  font-size: 9px;
  letter-spacing: 1.4px;
}
.traffic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: start;
}
.traffic-card {
  padding: 16px !important;
  border: 1px solid #dfe7df;
  border-radius: 16px;
  margin: 0 !important;
  background: #fff;
}
.traffic-card.red {
  border-color: #efcbc0;
  background: #fff8f5;
}
.traffic-card.amber {
  border-color: #eadbb4;
  background: #fffdf5;
}
.traffic-card.green {
  border-color: #cddfd3;
  background: #f8fcf8;
}
.traffic-card summary {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 9px;
  list-style: none;
}
.traffic-label {
  font-size: 13px;
  font-weight: 550;
}
.traffic-card summary strong {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -1px;
}
.traffic-card summary strong small {
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 500;
}
.signal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 650;
  background: #edf0ed;
  color: #55645a;
}
.signal > span {
  flex: 0 0 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.signal.red {
  background: #fce5df;
  color: #9e3a2c;
}
.signal.amber {
  background: #fff0c5;
  color: #805314;
}
.signal.green {
  background: #dceee0;
  color: #246144;
}
.signal.info {
  background: #e8eff4;
  color: #3d5a70;
}
.traffic-expand {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
  font-size: 10px;
  color: #728177;
}
.traffic-expand .icon {
  width: 12px;
  height: 12px;
}
.traffic-card p {
  margin-top: 12px;
  font-size: 12px;
}
.thresholds {
  color: #66766c;
}
.analysis-source {
  display: block;
  font-size: 11px;
  line-height: 1.6;
  margin-top: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.traffic-grid + .hint {
  margin-top: 14px;
}
.analysis-context {
  margin-top: 12px;
  border-left: 3px solid #a9c6ad;
  padding: 3px 0 3px 12px;
  font-size: 12px;
  color: #5a6d60;
}
.analysis-warning {
  margin: 14px 0;
  border-radius: 13px;
  border: 1px solid #dfe6df;
  background: #f5f7f4;
  padding: 15px;
}
.analysis-warning > b {
  display: block;
  font-size: 13px;
  line-height: 1.5;
}
.analysis-warning p {
  margin-top: 6px;
  font-size: 12px;
}
.analysis-warning.red {
  color: #8c342b;
  border-color: #efc6bd;
  background: #fff1ec;
}
.analysis-warning.amber {
  color: #78521b;
  border-color: #eedbb1;
  background: #fff9ea;
}
.analysis-warning.info {
  color: #34556c;
  border-color: #cedde7;
  background: #f1f7fa;
}
.analysis-warning.neutral {
  color: #617167;
}
.analysis-empty {
  border: 1px dashed #d4ded4;
  border-radius: 14px;
  padding: 18px;
  color: #65766b;
  font-size: 13px;
  line-height: 1.7;
}
.label-original {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 0 17px;
  margin-bottom: 5px;
}
.label-original summary {
  font-size: 12px;
  color: #63786a;
}
.label-original p {
  font-size: 12px;
  margin-top: 12px;
}
.label-original small {
  display: block;
  color: #7b887e;
  font-size: 10px;
  margin-top: 8px;
  line-height: 1.6;
}
.ingredient-row {
  margin: 0 !important;
  padding: 14px 0 !important;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.ingredient-row summary {
  display: flex;
  align-items: center;
  gap: 11px;
  list-style: none;
}
.ingredient-number {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  background: #eef3eb;
  color: #73816c;
  font-size: 10px;
  border-radius: 8px;
}
.ingredient-row summary > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.ingredient-row summary b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.ingredient-row summary small {
  display: block;
  font-size: 10px;
  line-height: 1.6;
  color: #7a867d;
  margin-top: 3px;
}
.ingredient-row summary > .icon {
  width: 15px;
  height: 15px;
  color: #91a08e;
  flex-shrink: 0;
}
.ingredient-row.subingredient {
  margin-left: 25px !important;
}
.ingredient-detail {
  margin-top: 14px;
  font-size: 12px;
  padding-left: 1px;
}
.ingredient-detail > div + div {
  margin-top: 13px;
}
.ingredient-detail p {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.7;
}
.additive-card {
  border: 1px solid #dfe5df;
  border-radius: 15px;
  padding: 15px !important;
  margin: 10px 0 !important;
}
.additive-card.red {
  border-color: #eac0b6;
}
.additive-card.amber {
  border-color: #ead8ac;
}
.additive-card summary {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
}
.additive-code {
  border-radius: 9px;
  padding: 9px 7px;
  min-width: 48px;
  background: #eff3ee;
  color: #44634d;
  font-size: 12px;
  text-align: center;
}
.additive-card.red .additive-code {
  background: #fde5de;
  color: #9e3a2c;
}
.additive-card.amber .additive-code {
  background: #fff0cc;
  color: #805314;
}
.additive-card summary > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.additive-card b {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.additive-card small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  color: #79867b;
  line-height: 1.6;
}
.additive-penalty {
  font-size: 11px;
  font-weight: 650;
  color: #7b6440;
  white-space: nowrap;
}
.score-method {
  border: 1px solid var(--line);
  border-radius: 15px;
  margin: 20px 0;
  padding: 16px;
}
.score-method summary {
  font-size: 13px;
  font-weight: 650;
}
.score-method summary .icon {
  width: 17px;
  height: 17px;
  vertical-align: middle;
  margin-right: 7px;
}
.score-method p {
  margin-top: 13px;
  font-size: 12px;
}
.score-method table {
  margin-top: 15px;
  font-size: 12px;
  width: 100%;
}
.score-method td small {
  display: block;
  font-size: 10px;
  color: #7d877f;
  font-weight: 400;
  line-height: 1.7;
  margin-top: 4px;
}
.score-method td:last-child {
  white-space: nowrap;
}
.score-method .loss {
  color: #a14430;
}
.score-method .gain {
  color: #2f7450;
}
.food-card .art {
  position: relative;
}
.food-score-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 9px;
  background: #dceee0;
  color: #245b3d;
  box-shadow: 0 1px 5px #173e3508;
}
.food-score-badge b {
  font-size: 19px;
  line-height: 1;
  letter-spacing: -0.6px;
}
.food-score-badge small {
  font-size: 9px;
}
.food-score-badge.red {
  background: #ffe4d9;
  color: #923927;
}
.food-score-badge.amber {
  background: #fff0c3;
  color: #7c530e;
}
.food-score-badge.provisional,
.food-score-badge.unknown {
  background: #fff;
  color: #546454;
  border: 1px solid #e3e9df;
}
.personal-intro {
  padding: 20px;
  border-radius: 18px;
  background: #edf5e8;
  margin: 20px 0 14px;
}
.personal-intro h3 {
  margin: 9px 0;
  font-size: 20px;
  line-height: 1.4;
}
.personal-intro p {
  color: #607660;
  font-size: 12px;
}
.personal-intro .btn {
  margin-top: 14px;
  width: 100%;
  background: #fff;
}
.personal-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.personal-metric {
  background: #fff;
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 14px;
}
.personal-metric > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.personal-metric b {
  font-size: 12px;
  font-weight: 550;
}
.personal-metric strong {
  font-size: 24px;
  letter-spacing: -0.8px;
}
.personal-metric strong small {
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 500;
}
.personal-metric > span {
  display: block;
  font-size: 11px;
  color: #6d7c71;
  margin: 7px 0;
  line-height: 1.6;
}
.personal-metric > small {
  display: block;
  font-size: 10px;
  color: #788579;
  line-height: 1.7;
}
.metric-track {
  height: 4px;
  border-radius: 3px;
  background: #e9eee7;
  overflow: hidden;
  margin: 12px 0;
}
.metric-track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: #79a67e;
}
.personal-metric.red {
  border-color: #eecac0;
}
.personal-metric.red .metric-track i {
  background: #bf6c50;
}
.personal-metric.amber .metric-track i {
  background: #d7ac50;
}
.personal-metrics + .hint {
  margin: 14px 0;
}
.personal-advice {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.personal-advice b {
  font-size: 14px;
}
.personal-advice p {
  margin-top: 8px;
  font-size: 13px;
  color: #647568;
}
.portion-comparison {
  padding: 18px;
  border-radius: 15px;
  background: #f7f4ec;
  margin: 20px 0;
}
.portion-comparison > b {
  font-size: 13px;
}
.portion-comparison p {
  margin-top: 7px;
  font-size: 12px;
}
.portion-comparison small {
  display: block;
  color: #8a8373;
  font-size: 10px;
  line-height: 1.6;
}
.portion-comparison .text-link {
  margin: 11px 0;
}
.weekly-context {
  display: flex;
  align-items: start;
  gap: 12px;
  padding: 15px 0;
  margin-bottom: 15px;
}
.weekly-context > .icon {
  flex: 0 0 20px;
  width: 20px;
  color: #809777;
}
.weekly-context b {
  font-size: 12px;
}
.weekly-context p {
  color: #7c887d;
  font-size: 11px;
  margin-top: 5px;
}
@media (max-width: 360px) {
  .analysis-score-card {
    padding: 17px;
  }
  .analysis-score-top {
    gap: 12px;
  }
  .analysis-score-top h3 {
    font-size: 18px;
  }
  .product-score {
    flex-basis: 76px;
    height: 76px;
  }
  .product-score strong {
    font-size: 32px;
  }
  .traffic-card {
    padding: 12px !important;
  }
  .additive-card summary {
    gap: 8px;
  }
}

/* Same-quantity product comparison, usable inside the mobile sheet. */
.comparison-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
  margin: -6px 0 20px;
}
.comparison-entry > span {
  color: var(--muted);
  font-size: 11px;
}
.comparison-entry .text-link {
  min-height: 44px;
  font-size: 12px;
}
.comparison-back {
  min-height: 44px;
  margin-bottom: 20px;
  text-align: left;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#compare-picker > h2,
#compare-heading {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.6px;
  margin: 10px 0;
  overflow-wrap: anywhere;
}
.comparison-picker-intro {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 14px 0 22px;
}
.comparison-search-btn {
  width: 100%;
  margin: 12px 0;
}
#compare-status {
  margin: 10px 0;
  line-height: 1.6;
}
.comparison-list-title {
  font-size: 15px;
  margin: 22px 0 12px;
}
.comparison-choice-list {
  display: grid;
  gap: 9px;
}
.comparison-choice {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: left;
  background: #fff;
}
.comparison-choice:hover {
  border-color: #94b89c;
  background: #f7faf5;
}
.comparison-choice > span:first-child {
  min-width: 0;
}
.comparison-choice b {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.comparison-choice small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.6;
}
.comparison-choice .food-score-badge,
.comparison-product .food-score-badge {
  position: static;
  flex: 0 0 45px;
  width: 45px;
  height: 45px;
}
.comparison-choice .food-score-badge b {
  font-size: 19px;
}
.comparison-choice .food-score-badge small {
  margin: 0;
  line-height: 1;
  font-size: 8px;
  color: inherit;
}
.comparison-controls {
  padding: 18px;
  border-radius: 18px;
  background: #f4f6f0;
  margin: 20px 0;
}
.comparison-controls .field {
  font-size: 12px;
}
.comparison-controls .segmented {
  margin: 16px 0 0;
}
.comparison-controls .segmented button {
  font-size: 12px;
  min-height: 44px;
}
.comparison-headline {
  padding: 21px;
  border-radius: 19px;
  background: #edf4eb;
  margin-bottom: 15px;
}
.comparison-headline h3 {
  font-size: 21px;
  margin: 10px 0;
  letter-spacing: -0.4px;
  line-height: 1.3;
}
.comparison-headline p {
  font-size: 12px;
  line-height: 1.65;
  color: #5b6d5e;
}
.comparison-products {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin: 18px 0;
}
.comparison-product {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
}
.comparison-letter {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  background: #ecf1e8;
  color: #3b5b3e;
  font-size: 11px;
  font-weight: 700;
}
.comparison-product h4 {
  font-size: 14px;
  margin: 12px 0 5px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.comparison-product > p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.comparison-product-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
}
.comparison-product-score > span:last-child {
  font-size: 10px;
  line-height: 1.5;
  color: #617564;
}
.comparison-product-score small {
  display: block;
  font-size: 9px;
}
.comparison-personal h3,
.comparison-observations h3 {
  font-size: 16px;
  margin: 23px 0 12px;
}
.comparison-personal h4 {
  margin: 15px 0 8px;
  font-size: 12px;
}
.comparison-warning {
  border-left: 3px solid #a8b9c5;
  padding: 12px 14px;
  background: #f3f6f7;
  border-radius: 0 10px 10px 0;
  margin: 8px 0;
}
.comparison-warning.red {
  border-color: #b95240;
  background: #fff4ef;
}
.comparison-warning.amber {
  border-color: #c89938;
  background: #fff9ed;
}
.comparison-warning b {
  font-size: 12px;
}
.comparison-warning p,
.comparison-warning a {
  font-size: 11px;
  line-height: 1.6;
  margin-top: 7px;
}
.comparison-warning a {
  display: inline-block;
  text-decoration: underline;
}
.comparison-caveat {
  padding: 13px;
  border: 1px dashed #c8d1c8;
  border-radius: 10px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.comparison-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 18px 0;
}
.comparison-table {
  table-layout: fixed;
}
.comparison-table caption {
  caption-side: top;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  padding-bottom: 12px;
}
.comparison-table th:first-child {
  width: 34%;
}
.dialog-body .comparison-table th,
.dialog-body .comparison-table td {
  padding: 12px 4px;
  font-size: 12px;
  overflow-wrap: anywhere;
  text-align: right;
}
.dialog-body .comparison-table th:first-child {
  text-align: left;
  font-weight: 500;
}
.comparison-table small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 3px;
}
.comparison-observations {
  padding: 0 0 8px;
}
.comparison-observations > p {
  font-size: 12px;
  line-height: 1.65;
  margin-bottom: 9px;
}
#compare-content .score-method li {
  font-size: 12px;
  line-height: 1.7;
  margin: 5px 0 5px 18px;
}
@media (max-width: 360px) {
  .comparison-product {
    padding: 12px;
  }
  .comparison-headline {
    padding: 16px;
  }
  .comparison-headline h3 {
    font-size: 19px;
  }
  .dialog-body .comparison-table th,
  .dialog-body .comparison-table td {
    font-size: 11px;
  }
}
/* App gestures: permit scrolling without pinch or double-tap zoom. */
.food-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.catalog-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}
.menu-idea-top .catalog-photo,
.recipe-editor-heading > .catalog-photo {
  width: 72px;
  height: 72px;
  border-radius: 14px;
}
.menu-plan-photo {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 12px;
}
.menu-plan-item-title > div {
  flex: 1;
  min-width: 0;
}
.history-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.history-fav {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
  min-height: 44px;
  font-size: 14px;
}
.history-fav input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.history-row .entry-info {
  flex: 1;
  min-width: 0;
}
.history-row .entry-info b,
.history-row .entry-info small {
  display: block;
  overflow-wrap: anywhere;
}
.photo-block {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.photo-frame {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--pale);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-copy {
  flex: 1;
  min-width: 160px;
}
.photo-copy b,
.photo-copy small {
  display: block;
  margin-bottom: 8px;
}
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.inline-error {
  color: #9d3529;
}
#app,
#modal,
#splash {
  touch-action: pan-x pan-y;
}
@media (hover: none) and (pointer: coarse) {
  #app input,
  #app select,
  #app textarea,
  #modal input,
  #modal select,
  #modal textarea {
    font-size: 16px !important;
  }
}



/* Account card: sign-in and sync status in Profile */
.account-card .account-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.account-card .account-actions .btn {
  width: 100%;
}
.account-card .account-email {
  font-weight: 600;
  word-break: break-all;
}

/* Sign-in gate: required before the app opens */
.signin-gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom));
}
.signin-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.signin-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  display: block;
}
.signin-card h1 {
  margin-bottom: 12px;
}
.signin-card > p {
  color: var(--muted, #6b6b6b);
  line-height: 1.5;
}
.signin-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 22px 0 16px;
}
.signin-actions .btn {
  width: 100%;
}
.signin-note {
  font-size: 13px;
}
