:root {
  --ink: #07140f;
  --panel: #0d1f17;
  --line: rgba(232, 242, 234, 0.14);
  --mist: #e8f2ea;
  --fog: rgba(232, 242, 234, 0.7);
  --leaf: #c6f26d;
  --warn: #ffb454;
  --danger: #ff6b5a;
  --deep: #04100b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Sora", sans-serif;
  background:
    radial-gradient(ellipse 70% 50% at 10% -10%, rgba(198, 242, 109, 0.12), transparent 50%),
    linear-gradient(160deg, #04100b, #0a1a12 40%, #07140f);
  color: var(--mist);
  min-height: 100svh;
}

.shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100svh;
}

.rail {
  border-right: 1px solid var(--line);
  padding: 1.5rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background: rgba(4, 16, 11, 0.55);
  backdrop-filter: blur(8px);
}

.mark {
  font-family: "Fraunces", serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--mist);
  text-decoration: none;
  line-height: 1;
}

.mark span { color: var(--leaf); }

nav { display: grid; gap: 0.35rem; }

.nav-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--fog);
  text-align: left;
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.nav-btn:hover { color: var(--mist); background: rgba(198, 242, 109, 0.06); }
.nav-btn.active { color: var(--deep); background: var(--leaf); font-weight: 600; }
.nav-btn.soon { opacity: 0.35; cursor: not-allowed; }

.rail-note {
  margin-top: auto;
  font-size: 0.75rem;
  color: rgba(232, 242, 234, 0.45);
}

main { padding: 1.25rem clamp(1.25rem, 3vw, 2.75rem) 3rem; }

.dash-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 31, 23, 0.55);
  backdrop-filter: blur(10px);
  max-width: none;
}

.pref-cluster {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
}

.pref-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  padding: 0.2rem 0.35rem 0.2rem 0.2rem;
  border-radius: 999px;
  transition: background 0.2s;
}

.pref-toggle:hover {
  background: rgba(198, 242, 109, 0.06);
}

.pref-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pref-toggle .switch {
  width: 2.2rem;
  height: 1.2rem;
  border-radius: 999px;
  background: rgba(232, 242, 234, 0.12);
  border: 1px solid var(--line);
  position: relative;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.pref-toggle .switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: rgba(232, 242, 234, 0.75);
  transition: transform 0.2s, background 0.2s;
}

.pref-toggle input:checked + .switch {
  background: color-mix(in srgb, var(--leaf) 35%, transparent);
  border-color: color-mix(in srgb, var(--leaf) 55%, transparent);
}

.pref-toggle input:checked + .switch::after {
  transform: translateX(0.95rem);
  background: var(--leaf);
}

.pref-toggle input:focus-visible + .switch {
  outline: 2px solid color-mix(in srgb, var(--leaf) 60%, transparent);
  outline-offset: 2px;
}

.pref-toggle.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.pref-copy {
  display: grid;
  gap: 0.05rem;
  line-height: 1.15;
}
.pref-label {
  color: var(--mist);
  font-size: 0.84rem;
  font-weight: 560;
  letter-spacing: 0.01em;
}
.pref-sub {
  font-size: 0.68rem;
  color: rgba(232, 242, 234, 0.45);
}

.dash-right {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin-left: auto;
}

.ext-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(232, 242, 234, 0.04);
  color: var(--mist);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ext-pill:hover { background: rgba(198, 242, 109, 0.08); }
.ext-pill.open {
  border-color: color-mix(in srgb, var(--leaf) 40%, transparent);
  background: rgba(198, 242, 109, 0.1);
}
.ext-pill i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #8a8578;
}
.ext-pill.ok i { background: var(--leaf); }
.ext-pill.warn i { background: var(--warn); }
.ext-pill b { font-weight: 600; }
.ext-pill em {
  font-style: normal;
  color: var(--fog);
  max-width: 5.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ext-drawer {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 31, 23, 0.55);
}
.ext-drawer.hidden { display: none; }
.ext-drawer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem 1.25rem;
}
.ext-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.ext-block-head strong {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
}
.helper-steps.compact {
  font-size: 0.82rem;
  padding-left: 1.1rem;
  margin-bottom: 0.5rem;
}
.hint.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  word-break: break-all;
  color: rgba(232, 242, 234, 0.55);
}

.wa-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--fog);
}
.wa-pill i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #8a8578;
}
.wa-pill.ok i { background: var(--leaf); }
.wa-pill.warn i { background: #c45c26; }
.wa-pill.qr i { background: #7ec8e3; }

.wa-login {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: center;
  margin: 0 0 1.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 31, 23, 0.55);
  max-width: 42rem;
}
.wa-login.hidden { display: none; }
.wa-login-copy {
  flex: 1 1 12rem;
  display: grid;
  gap: 0.35rem;
}
.wa-login-copy strong {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
}
.wa-login-copy p {
  color: var(--fog);
  font-size: 0.88rem;
  line-height: 1.45;
}
.wa-qr {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  background: #fff;
  padding: 0.5rem;
  object-fit: contain;
}

.pref-label { color: var(--mist); letter-spacing: 0.01em; }

.panel { display: none; animation: rise 0.45s ease both; }
.panel.active { display: block; }

.panel-head { margin-bottom: 1.75rem; max-width: 40rem; }
.panel-head.nutrition-head {
  margin-bottom: 0.75rem;
  max-width: none;
}
.panel-head h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin-bottom: 0.45rem;
}
.panel-head p { color: var(--fog); line-height: 1.55; }

.nav-nutrition {
  display: grid !important;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.45rem;
  row-gap: 0.25rem;
}
.nav-nutrition .nav-label { grid-column: 1; grid-row: 1; }
.nav-nutrition .nav-hunger-pct {
  grid-column: 2;
  grid-row: 1;
  font-style: normal;
  font-size: 0.72rem;
  color: rgba(7, 20, 15, 0.7);
  font-weight: 600;
}
.nav-btn:not(.active) .nav-hunger-pct { color: rgba(232, 242, 234, 0.55); }
.nav-nutrition .nav-hunger {
  grid-column: 1 / -1;
  grid-row: 2;
  height: 3px;
  border-radius: 999px;
  background: rgba(232, 242, 234, 0.12);
  overflow: hidden;
}
.nav-hunger-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #ff6b5a;
  transition: width 0.35s ease, background 0.2s;
}
.nav-btn.active .nav-hunger { background: rgba(7, 20, 15, 0.18); }

.home-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  max-width: none;
}
.home-hunger {
  min-width: 10rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 31, 23, 0.55);
  display: grid;
  gap: 0.2rem;
}
.home-meters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: stretch;
}
.home-mood[data-band="rising"] strong,
.home-mood[data-band="high"] strong { color: #c47aff; }
.home-mood[data-band="mild"] strong { color: #ffb454; }
.meter-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}
.mood-panel { min-width: 11rem; }
.mood-panel[data-band="rising"] .hunger-pct,
.mood-panel[data-band="high"] .hunger-pct { color: #c47aff; }
.mood-panel[data-band="mild"] .hunger-pct { color: #ffb454; }
.mood-panel[data-band="ok"] .hunger-pct,
.mood-panel[data-band="full"] .hunger-pct { color: #7dcf6a; }
.home-hunger-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(232, 242, 234, 0.5);
}
.home-hunger strong {
  font-family: "Fraunces", serif;
  font-size: 1.75rem;
  line-height: 1;
}
.home-hunger-track {
  margin-top: 0.35rem;
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(232, 242, 234, 0.1);
  overflow: hidden;
}
.home-hunger-track > span {
  display: block;
  height: 100%;
  width: 0%;
  background: #ff6b5a;
  transition: width 0.35s ease;
}

.home-snapshot {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.65rem;
  margin: 0 0 1.25rem;
}
.snap-card {
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 31, 23, 0.45);
  display: grid;
  gap: 0.25rem;
  min-height: 5.5rem;
}
.snap-card.snap-wide { grid-column: span 2; }
@media (max-width: 720px) {
  .snap-card.snap-wide { grid-column: span 1; }
}
.snap-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(232, 242, 234, 0.48);
}
.snap-card strong {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.2;
}
.snap-meta {
  font-size: 0.78rem;
  color: var(--fog);
  line-height: 1.35;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.85rem;
}

.nutrition-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  max-width: none;
  margin-bottom: 0.85rem;
}
.nutrition-title {
  flex: 1 1 14rem;
  min-width: 0;
}
.nutrition-title h1 {
  margin-bottom: 0.25rem;
}
.nutrition-lede {
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--fog);
  max-width: 36rem;
  margin: 0;
}
.nutrition-head .meter-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  flex: 1 1 22rem;
  min-width: min(100%, 20rem);
  max-width: 28rem;
}
.hunger-panel.compact {
  min-width: 0;
  margin: 0;
  padding: 0.65rem 0.75rem;
}
.hunger-panel.compact .hunger-head {
  margin-bottom: 0.35rem;
}
.hunger-panel.compact .meter-note,
.hunger-panel.compact #hunger-note,
.hunger-panel.compact #mood-note {
  margin-top: 0.3rem;
  font-size: 0.68rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.nut-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}
.nut-section-head h2 {
  margin-bottom: 0.2rem;
}
.nut-section-head .hint {
  margin: 0;
}
.tank-filters,
.chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.nut-tanks-step {
  margin-bottom: 1.35rem;
}

.level-tanks {
  display: grid;
  gap: 1.15rem;
}

.tank-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  margin-bottom: 0.55rem;
}
.tank-group-head h3 {
  font-family: "Fraunces", serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.tank-group-head p {
  font-size: 0.78rem;
  color: rgba(232, 242, 234, 0.5);
}

.tank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.65rem;
}

.tank {
  border: 1px solid var(--line);
  background:
    linear-gradient(165deg, rgba(26, 58, 42, 0.35), rgba(4, 16, 11, 0.65));
  padding: 0.7rem 0.75rem 0.65rem;
  display: grid;
  gap: 0.35rem;
  min-height: 6.4rem;
}
.tank-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.tank strong {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fog);
  font-weight: 500;
}
.tank-tone {
  font-style: normal;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.12rem 0.35rem;
  border: 1px solid var(--line);
  color: var(--fog);
}
.tank-val {
  font-family: "Fraunces", serif;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
}
.tank-val span {
  font-size: 0.72rem;
  margin-left: 0.1rem;
  color: var(--fog);
  font-family: "Sora", sans-serif;
}
.tank-bar {
  height: 5px;
  background: rgba(232, 242, 234, 0.1);
  overflow: hidden;
}
.tank-bar > span {
  display: block;
  height: 100%;
  background: var(--leaf);
  width: 0%;
  transition: width 0.45s ease;
}
.tank-bar.over > span {
  background: linear-gradient(90deg, var(--leaf), #e8f2a8);
}
.tank-sub {
  font-size: 0.68rem;
  color: rgba(232, 242, 234, 0.48);
  line-height: 1.3;
}

.tank.tone-low {
  border-color: rgba(255, 180, 84, 0.35);
}
.tank.tone-low .tank-bar > span { background: var(--warn); }
.tank.tone-low .tank-tone {
  color: var(--warn);
  border-color: rgba(255, 180, 84, 0.4);
}
.tank.tone-mid {
  border-color: rgba(198, 242, 109, 0.22);
}
.tank.tone-mid .tank-bar > span {
  background: linear-gradient(90deg, #9bcf6a, var(--leaf));
}
.tank.tone-mid .tank-tone {
  color: rgba(198, 242, 109, 0.85);
  border-color: rgba(198, 242, 109, 0.28);
}
.tank.tone-high {
  border-color: rgba(255, 107, 90, 0.4);
}
.tank.tone-high .tank-bar > span { background: var(--danger); }
.tank.tone-high .tank-tone {
  color: var(--danger);
  border-color: rgba(255, 107, 90, 0.45);
}
.tank.tone-quiet .tank-bar > span {
  background: rgba(232, 242, 234, 0.28);
}
.tank.tone-quiet .tank-tone {
  color: rgba(232, 242, 234, 0.55);
}
.tank.tone-ok .tank-tone {
  color: var(--leaf);
  border-color: rgba(198, 242, 109, 0.35);
}
.tank.kind-load.tone-ok .tank-bar > span {
  background: rgba(126, 200, 227, 0.75);
}

.chart-frame {
  position: relative;
  border: 1px solid var(--line);
  background: rgba(4, 16, 11, 0.45);
  padding: 0.35rem 0.25rem 0.15rem;
}
.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  background: rgba(4, 16, 11, 0.55);
}
.chart-empty.hidden { display: none; }

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.9rem;
  margin-top: 0.65rem;
}
.chart-legend .lg {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--fog);
}
.chart-legend .lg::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 1px;
  background: currentColor;
}
.chart-legend .fuel::before { background: #c6f26d; }
.chart-legend .hunger::before { background: #ff6b5a; }
.chart-legend .kcal::before { background: #7ec8e3; }
.chart-legend .protein::before { background: #9be564; }
.chart-legend .fiber::before { background: #ffb454; }
.chart-legend .vitc::before { background: #f2c14e; }
.chart-legend .vitd::before { background: #7ec8e3; }
.chart-legend .iron::before { background: #e07a5f; }
.chart-legend .calcium::before { background: #9b8cff; }
.chart-legend .meal::before { background: transparent; content: none; }

@media (max-width: 720px) {
  .tank-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .nutrition-head .meter-stack {
    flex-basis: 100%;
    max-width: none;
  }
}

.order-card.band-nonfood {
  opacity: 0.72;
  border-style: dashed;
}
.score-badge.nonfood {
  background: rgba(232, 242, 234, 0.08);
  color: var(--fog);
}
.score-badge.nonfood .score-num { font-size: 0.85rem; }
.match-tag.nonfood { color: var(--warn); }
.match-tag.caf { color: #c47aff; }

.launch {
  appearance: none;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(26, 58, 42, 0.55), rgba(7, 20, 15, 0.8));
  color: inherit;
  text-align: left;
  padding: 1.35rem 1.25rem;
  display: grid;
  gap: 0.35rem;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  font: inherit;
}
.launch:hover:not(.muted) {
  border-color: rgba(198, 242, 109, 0.45);
  transform: translateY(-2px);
}
.launch.muted { opacity: 0.55; cursor: default; }
.launch-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--leaf);
}
.launch strong {
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
  font-weight: 500;
}
.launch-meta { color: var(--fog); font-size: 0.88rem; }

.status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1.05rem;
  border: 1px solid var(--line);
  background: rgba(13, 31, 23, 0.7);
  margin-bottom: 0.85rem;
}
.status-bar .dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(255, 180, 84, 0.15);
}
.status-bar.ok .dot {
  background: var(--leaf);
  box-shadow: 0 0 0 4px rgba(198, 242, 109, 0.15);
}
.status-actions { margin-left: auto; display: flex; gap: 0.5rem; }

.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(232, 242, 234, 0.06);
  color: var(--mist);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:hover { border-color: rgba(198, 242, 109, 0.4); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--leaf); color: var(--deep); border-color: transparent; }
.btn.danger { background: var(--danger); color: #1a0503; border-color: transparent; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.auth-box, .step {
  border: 1px solid var(--line);
  background: rgba(13, 31, 23, 0.45);
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  display: grid;
  gap: 0.85rem;
}
.eat-next-panel.is-quiet {
  gap: 0.55rem;
}
.history-panel {
  gap: 0.65rem;
}
.history-head h2,
.eat-next-head h2 {
  margin: 0;
}
.auth-box ol { padding-left: 1.2rem; color: var(--fog); display: grid; gap: 0.35rem; }
.auth-box code, .hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  color: var(--leaf);
}

.step h2 {
  font-family: "Fraunces", serif;
  font-size: 1.2rem;
  font-weight: 500;
}

.field { display: grid; gap: 0.4rem; }
.field span { font-size: 0.8rem; color: var(--fog); }

.input, .select, textarea {
  width: 100%;
  background: rgba(4, 16, 11, 0.7);
  border: 1px solid var(--line);
  color: var(--mist);
  font: inherit;
  padding: 0.7rem 0.8rem;
}
textarea { resize: vertical; }

.row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.row .input { flex: 1; min-width: 160px; }

.list { display: grid; gap: 0.5rem; }
.list-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  background: rgba(4, 16, 11, 0.35);
  cursor: pointer;
  transition: border-color 0.2s;
  text-align: left;
  color: inherit;
  font: inherit;
  width: 100%;
}
.list-item:hover { border-color: rgba(198, 242, 109, 0.35); }
.list-item strong { display: block; font-weight: 600; }
.list-item small { color: var(--fog); }
.list-item .meta { color: var(--leaf); font-size: 0.85rem; white-space: nowrap; }

.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  color: var(--fog);
  font-size: 0.9rem;
}
.check input { margin-top: 0.2rem; }

.code-block {
  background: rgba(4, 16, 11, 0.85);
  border: 1px solid var(--line);
  padding: 0.85rem 1rem;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(232, 242, 234, 0.85);
  max-height: 280px;
  white-space: pre-wrap;
  word-break: break-word;
}
.code-block.log { max-height: 160px; opacity: 0.85; }

.hint { color: var(--fog); font-size: 0.88rem; }
.hidden { display: none !important; }

.section-order-title {
  font-family: "Fraunces", serif;
  font-size: 1.6rem;
  font-weight: 500;
  margin: 1.5rem 0 0.75rem;
  letter-spacing: -0.02em;
}

.brain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.session-grid .field {
  margin: 0.5rem 0;
}

.helper-steps {
  margin: 0.6rem 0 0.8rem;
  padding-left: 1.15rem;
  color: var(--fog);
  font-size: 0.9rem;
  line-height: 1.55;
  display: grid;
  gap: 0.45rem;
}

.bookmarklet {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border: 1px dashed var(--leaf);
  color: var(--leaf);
  text-decoration: none;
  font-weight: 600;
  cursor: grab;
}

.bookmarklet:active { cursor: grabbing; }

.manual-food-form {
  margin: 0.65rem 0 1rem;
  padding: 0.9rem 1rem 1rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line, #3a3630) 85%, transparent);
  background: color-mix(in srgb, var(--panel, #1c1a16) 92%, #2a4030);
}
.manual-food-form.hidden,
.manual-food-form[hidden] {
  display: none !important;
}
.history-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0;
}
.history-head h2 {
  margin: 0 0 0.2rem;
}
.history-head .hint {
  margin: 0;
}
.eat-next-head {
  margin: 0;
}
.eat-next-head h2 {
  margin: 0;
}
.eat-next-panel.is-quiet {
  align-self: start;
  gap: 0.55rem;
}
.eat-next-panel.is-quiet #eat-next-hint,
.eat-next-panel.is-quiet #mcp-status,
.eat-next-panel.is-quiet #eat-next-status {
  display: none !important;
}
.eat-quiet-card {
  border: 1px solid var(--line);
  background: rgba(4, 16, 11, 0.4);
  padding: 0.9rem 1rem;
  color: var(--fog);
  font-size: 0.9rem;
  line-height: 1.45;
}
.eat-quiet-card strong {
  display: block;
  color: var(--mist);
  font-family: "Fraunces", serif;
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.manual-food-title {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}
.manual-food-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.65rem 0;
}
@media (max-width: 720px) {
  .manual-food-grid { grid-template-columns: 1fr; }
}
.manual-food-form .field { margin: 0 0 0.65rem; }
.manual-food-form .field span em {
  font-style: normal;
  opacity: 0.55;
  font-weight: 400;
}
.manual-food-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.order-card.manual .order-card-meta strong::after {
  content: " · logged";
  color: var(--leaf, #c6f26d);
  font-weight: 500;
  font-size: 0.78em;
}

.portion-block {
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line, #3a3630) 80%, transparent);
}
.portion-hint {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  line-height: 1.35;
}
.portion-order,
.portion-item {
  display: grid;
  grid-template-columns: auto 1fr 2.4rem;
  align-items: center;
  gap: 0.45rem 0.55rem;
  margin: 0.35rem 0;
  font-size: 0.8rem;
}
.portion-order {
  grid-template-columns: 5.5rem 1fr 2.4rem;
  margin-bottom: 0.55rem;
}
.portion-item {
  grid-template-columns: auto 1fr minmax(5rem, 1fr) 2.4rem;
}
.portion-item.skipped {
  opacity: 0.55;
}
.portion-item.skipped .portion-name {
  text-decoration: line-through;
}
.portion-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.portion-order input[type="range"],
.portion-item input[type="range"] {
  width: 100%;
  accent-color: var(--leaf, #c6f26d);
}
.portion-order em,
.portion-item em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--fog);
  font-size: 0.75rem;
}
.portion-units {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.55rem;
}
.rate-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
}
.rate-overall { opacity: 0.65; font-size: 0.8rem; }
.rate-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  align-items: center;
  gap: 0.35rem;
  margin: 0.2rem 0;
  font-size: 0.78rem;
}
.rate-stars { display: flex; gap: 0.15rem; }
.rate-star {
  appearance: none;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--ink, #e8f2ea) 28%, transparent);
  font-size: 1.05rem;
  line-height: 1;
  padding: 0.05rem 0.12rem;
  cursor: pointer;
}
.rate-star.on { color: #c6f26d; }
.rate-star:hover { color: #e2f7a8; }
.rate-note {
  display: grid;
  gap: 0.25rem;
  margin: 0.55rem 0 0.45rem;
  font-size: 0.78rem;
}
.rate-note .input { font-size: 0.85rem; padding: 0.4rem 0.55rem; }
.rate-save { margin-top: 0.15rem; }
.rate-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.rate-actions .hint { margin: 0; font-size: 0.78rem; }

.manual-session {
  margin-top: 0.5rem;
  color: var(--fog);
  font-size: 0.85rem;
}

.helper-steps .muted {
  opacity: 0.75;
  font-size: 0.82rem;
}

.chart-step canvas {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
}

.hunger-panel {
  border: 1px solid var(--line);
  background: rgba(4, 16, 11, 0.55);
  padding: 0.9rem 1rem 0.85rem;
  margin-bottom: 0.9rem;
}

.hunger-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.hunger-head strong {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fog);
  font-weight: 500;
}

.hunger-head span {
  display: block;
  margin-top: 0.2rem;
  font-family: "Fraunces", serif;
  font-size: 1.25rem;
  color: var(--mist);
}

.hunger-pct {
  font-family: "Fraunces", serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.hunger-track {
  height: 14px;
  background: rgba(232, 242, 234, 0.1);
  overflow: hidden;
  position: relative;
}

.hunger-track > span {
  display: block;
  height: 100%;
  width: 0%;
  transition: width 0.55s ease, background 0.35s ease;
  background: linear-gradient(90deg, #7dcf6a, #ffb454, #ff6b5a);
}

.hunger-panel[data-band="full"] .hunger-pct,
.hunger-panel[data-band="ok"] .hunger-pct { color: #7dcf6a; }
.hunger-panel[data-band="mild"] .hunger-pct { color: #ffb454; }
.hunger-panel[data-band="rising"] .hunger-pct,
.hunger-panel[data-band="high"] .hunger-pct { color: #ff6b5a; }

.hunger-panel[data-band="full"] .hunger-track > span,
.hunger-panel[data-band="ok"] .hunger-track > span {
  background: linear-gradient(90deg, #5bbf7a, #c6f26d);
}
.hunger-panel[data-band="mild"] .hunger-track > span {
  background: linear-gradient(90deg, #c6f26d, #ffb454);
}
.hunger-panel[data-band="rising"] .hunger-track > span,
.hunger-panel[data-band="high"] .hunger-track > span {
  background: linear-gradient(90deg, #ffb454, #ff6b5a);
}
.hunger-panel.inbound {
  border-color: color-mix(in srgb, #7ec8e3 55%, transparent);
}
.hunger-panel.inbound .hunger-pct { color: #7ec8e3; }
.hunger-panel.inbound .hunger-track > span {
  background: linear-gradient(90deg, #9ed7e8, #7ec8e3);
}


.chip-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(232, 242, 234, 0.06);
  color: var(--fog);
  padding: 0.35rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.chip-btn.on {
  color: var(--deep);
  background: var(--leaf);
  border-color: var(--leaf);
  font-weight: 600;
}

.channel-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.75rem;
}

#channel-hint { margin-bottom: 0.85rem; }

.mcp-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.55rem 0 0.75rem;
}
.mcp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel, #1c1a16) 88%, #888);
  border: 1px solid color-mix(in srgb, var(--line, #3a3630) 80%, transparent);
  font-size: 0.78rem;
}
.mcp-pill i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #8a8578;
}
.mcp-pill.ok i { background: var(--leaf, #7cb518); }
.mcp-pill.down i { background: #c45c26; }
.mcp-pill b { font-weight: 600; }
.mcp-pill em { font-style: normal; opacity: 0.75; }
.mcp-pill.ok em { color: var(--leaf, #7cb518); }
.mcp-pill.down em { color: #c45c26; }
.suggest-item .meta { color: var(--leaf); }
.suggest-item.busy { opacity: 0.55; pointer-events: none; }
.eat-next-status { margin: 0.35rem 0 0.6rem; }
.eat-next-status[data-kind="busy"] { color: var(--ink-muted, #8a8578); }
.eat-next-status[data-kind="ok"] { color: var(--leaf); }
.eat-next-status[data-kind="warn"] { color: #c45c26; }
.eat-next-panel .suggest-item .meta { white-space: nowrap; }

.incoming-banner {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--leaf, #7cb518) 45%, transparent);
  background:
    linear-gradient(135deg, rgba(198, 242, 109, 0.14), rgba(126, 200, 227, 0.08));
  color: var(--ink, #e8f2ea);
  font-size: 0.92rem;
  line-height: 1.45;
}
.incoming-banner strong { color: var(--leaf, #c6f26d); font-weight: 650; }
.incoming-banner .eta { opacity: 0.85; }


.sug-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.sug-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.18rem 0.4rem;
  color: #04100b;
}

.sug-badge.eta { background: #7ec8e3; }
.sug-badge.refuel { background: #c6f26d; }
.sug-badge.need { background: #f0d9a8; }
.sug-badge.complete { background: #9be7a2; }
.sug-badge.combo { background: #b8d4ff; }
.sug-badge.incomplete { background: #f0b4a0; }

.match-tag {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.05rem 0.3rem;
  margin-left: 0.15rem;
  background: rgba(198, 242, 109, 0.2);
  color: var(--leaf);
  vertical-align: 1px;
}

.match-tag.nonfood {
  background: rgba(255, 107, 90, 0.2);
  color: #ff8f82;
}

canvas {
  width: 100% !important;
  height: auto !important;
  display: block;
  background: rgba(4, 16, 11, 0.55);
  border: 1px solid var(--line);
}

.loc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
  gap: 1rem;
  align-items: start;
}

.map-frame {
  width: 100%;
  min-height: min(62vh, 560px);
  height: 62vh;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(198, 242, 109, 0.08), transparent 50%),
    #0a1610;
}

.loc-side {
  display: grid;
  gap: 0.75rem;
}

.loc-side h2 {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 500;
}

.loc-logs {
  border: 1px solid var(--line);
  background: rgba(4, 16, 11, 0.7);
  max-height: 640px;
  overflow: auto;
  display: grid;
}

.loc-log-row {
  display: grid;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--fog);
}

.loc-log-row strong {
  color: var(--mist);
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
}

.loc-log-row:last-child { border-bottom: 0; }

.money-pass-list {
  display: grid;
  gap: 0.85rem;
}
.money-pass-row {
  display: grid;
  gap: 0.35rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.money-pass-row:last-child { border-bottom: 0; padding-bottom: 0; }
.money-pass-row .money-pass-meta {
  font-size: 0.8rem;
  color: var(--fog);
}
.money-pass-row input.input { max-width: 22rem; }
.money-pass-ok { color: var(--leaf); }
.money-pass-bad { color: var(--warn); }

.money-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.money-total {
  border: 1px solid var(--line);
  background: rgba(13, 31, 23, 0.45);
  padding: 0.7rem 0.85rem;
  display: grid;
  gap: 0.15rem;
}
.money-total span { font-size: 0.75rem; color: var(--fog); }
.money-total strong {
  font-family: "Fraunces", serif;
  font-size: 1.15rem;
  font-weight: 500;
}
.money-accounts {
  display: grid;
  gap: 1.05rem;
  margin-bottom: 1rem;
}
.money-acc-group h2 {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fog);
}
.money-acc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14.5rem, 1fr));
  gap: 0.65rem;
}
.money-account {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(4, 16, 11, 0.55);
  color: inherit;
  font: inherit;
  padding: 0.8rem 0.9rem;
  display: grid;
  gap: 0.2rem;
  cursor: pointer;
}
.money-account:hover { border-color: color-mix(in srgb, var(--leaf) 45%, transparent); }
.money-account.on {
  border-color: color-mix(in srgb, var(--leaf) 55%, transparent);
  background: rgba(198, 242, 109, 0.1);
}
.money-account .money-bank { font-size: 0.75rem; color: var(--fog); }
.money-account strong { font-size: 0.95rem; }
.money-account .money-bal {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.05rem;
  color: var(--leaf);
}
.money-account .money-meta { font-size: 0.75rem; color: var(--fog); }
.money-journal {
  border: 1px solid var(--line);
  background: rgba(4, 16, 11, 0.7);
  max-height: min(70vh, 720px);
  overflow: auto;
}
.money-jday {
  padding: 0.45rem 0.85rem 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--leaf);
  background: rgba(198, 242, 109, 0.06);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
}
.money-jrow {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr) 7.2rem;
  gap: 0.55rem 0.85rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  align-items: start;
}
.money-jrow:last-child { border-bottom: 0; }
.money-jrow .when { color: var(--fog); font-variant-numeric: tabular-nums; }
.money-jrow .desc { color: var(--mist); min-width: 0; }
.money-jrow .desc em { display: block; color: var(--fog); font-style: normal; font-size: 0.75rem; }
.money-jrow .amt { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.money-jrow .amt.in { color: var(--leaf); }
.money-jrow .amt.out { color: #ff8a7a; }
@media (max-width: 640px) {
  .money-jrow { grid-template-columns: 1fr auto; }
  .money-jrow .when { grid-column: 1 / -1; }
}

.order-card {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid rgba(232, 242, 234, 0.2);
}

.order-card.band-good { border-left-color: #7dcf6a; background: linear-gradient(90deg, rgba(125, 207, 106, 0.08), transparent 55%); }
.order-card.band-mid { border-left-color: #ffb454; background: linear-gradient(90deg, rgba(255, 180, 84, 0.07), transparent 55%); }
.order-card.band-poor { border-left-color: #ff6b5a; background: linear-gradient(90deg, rgba(255, 107, 90, 0.09), transparent 55%); }

.order-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.order-card-meta {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.order-card-meta strong {
  color: var(--mist);
  font-size: 0.84rem;
  font-weight: 600;
}

.order-card-meta span {
  color: var(--fog);
  font-size: 0.78rem;
}

.order-items {
  color: rgba(232, 242, 234, 0.78);
  font-size: 0.8rem;
  line-height: 1.35;
}

.score-badge {
  flex: 0 0 auto;
  min-width: 3.4rem;
  padding: 0.35rem 0.45rem 0.4rem;
  text-align: center;
  border: 1px solid transparent;
  line-height: 1;
}

.score-badge .score-num {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
  font-weight: 600;
}

.score-badge .score-lbl {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.score-badge.good {
  color: #04100b;
  background: #7dcf6a;
  border-color: #9be08c;
}

.score-badge.mid {
  color: #1a1004;
  background: #ffb454;
  border-color: #ffc878;
}

.score-badge.poor {
  color: #1a0604;
  background: #ff6b5a;
  border-color: #ff8f82;
}

.nut-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nut-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.22rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
  color: #04100b;
}

.nut-chip em {
  font-style: normal;
  font-weight: 500;
  opacity: 0.8;
}

.nut-chip.good { background: #7dcf6a; border-color: #9be08c; }
.nut-chip.ok { background: #9ad4e8; border-color: #b7e2f0; }
.nut-chip.warn { background: #ffb454; border-color: #ffc878; }
.nut-chip.bad { background: #ff6b5a; border-color: #ff8f82; color: #1a0604; }
.nut-chip.mute {
  background: rgba(232, 242, 234, 0.12);
  border-color: rgba(232, 242, 234, 0.18);
  color: rgba(232, 242, 234, 0.75);
}

.mapboxgl-popup-content {
  background: #0d1f17 !important;
  color: #e8f2ea !important;
  border: 1px solid rgba(232, 242, 234, 0.18);
  box-shadow: none !important;
  font-family: "Sora", sans-serif;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .loc-layout { grid-template-columns: 1fr; }
  .map-frame { height: 42vh; min-height: 280px; }
}

@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
  }
  nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; }
  .rail-note { display: none; }
}
