:root {
  --bg: #0c0d0a;
  --bg-2: #14160f;
  --card: #1a1c14;
  --card-2: #22251b;
  --line: #31352a;
  --text: #f4f5ef;
  --muted: #a7ab9d;
  --mint: #8fd4ae;
  --mint-2: #d7f5e3;
  --ink: #102117;
  --gold: #f0b429;
  --gold-2: #c98412;
  --gold-dim: #6d5424;
  --danger: #ff8d7a;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --safe-b: env(safe-area-inset-bottom);
  font-family: Outfit, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(900px 420px at 50% -80px, rgba(90, 150, 110, 0.18), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100dvh;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%) translateY(20px);
  background: #f4f5ef;
  color: #172016;
  padding: 12px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 20;
  transition: 0.25s ease;
  max-width: min(90vw, 420px);
  text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.phone, .shell { width: min(460px, 100%); margin: 0 auto; min-height: 100dvh; position: relative; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 18px 8px;
}
.icon-btn, .text-btn {
  border: 0;
  background: #1c1e16;
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
}
.text-btn { width: auto; border-radius: 999px; padding: 0 14px; background: transparent; color: var(--mint); }
.stepcount { color: var(--muted); font-size: 14px; }
.dashes { display: flex; gap: 4px; padding: 6px 18px 0; }
.dashes i {
  height: 4px;
  flex: 1;
  border-radius: 99px;
  background: #2a2d24;
  display: block;
}
.dashes i.on { background: var(--mint); }
.content {
  padding: 22px 18px 140px;
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
h1 { font-size: 32px; line-height: 1.05; letter-spacing: -0.04em; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 18px; line-height: 1.45; }
.fine { color: var(--muted); font-size: 13px; line-height: 1.45; }
.kicker { color: var(--mint); letter-spacing: 0.08em; text-transform: uppercase; font-size: 12px; font-weight: 700; margin: 0 0 6px; }
.dock {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(460px, 100%);
  bottom: 0;
  padding: 28px 18px calc(16px + var(--safe-b));
  background: linear-gradient(transparent, #0c0d0a 28%);
  z-index: 5;
}
.cta {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 16px 18px;
  background: linear-gradient(#ffd15c, var(--gold) 40%, var(--gold-2));
  color: #241804;
  font-weight: 800;
  box-shadow: 0 10px 34px rgba(240, 180, 41, 0.35);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.cta:active { transform: scale(0.98); }
.cta:disabled { background: var(--gold-dim); color: #d9c398; box-shadow: none; }
.cta.quiet { background: transparent; color: var(--mint); box-shadow: none; margin-top: 8px; }

.splash { min-height: 100dvh; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px 22px calc(28px + var(--safe-b)); gap: 8px; }
.splash .brand { margin-bottom: 18vh; }
.brand { display: flex; align-items: center; gap: 12px; padding-top: 12px; }
.brand strong { font-family: Fraunces, Georgia, serif; font-size: 28px; }
.logo { width: 46px; height: 46px; border-radius: 14px; object-fit: cover; display: block; }
.hero-copy { font-size: 42px; line-height: 0.98; letter-spacing: -0.045em; margin: 0 0 12px; }
.splash .lead { font-size: 17px; }

.choice, .plate, .store, .chip, .day, .equip, .time-card {
  border: 1px solid var(--line);
  background: var(--card);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.choice {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 10px;
}
.choice, .store, .diet-card, .allergy, .equip, .sex, .day, .plate, .chip, .none-card, .snack {
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.choice:active, .store:active, .diet-card:active, .allergy:active, .equip:active, .sex:active, .day:active, .plate:active, .chip:active, .none-card:active {
  transform: scale(0.94);
}
@keyframes pick-pop {
  0% { transform: scale(0.9); }
  55% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.choice.on, .store.on, .diet-card.on, .allergy.on, .equip.on, .sex.on, .day.on, .plate.on, .chip.on, .none-card.on, .snack.on {
  animation: pick-pop .32s cubic-bezier(.2, .9, .3, 1);
}
.choice.on, .day.on, .equip.on, .time-card.on, .plate.on, .store.on, .chip.on {
  background: var(--mint);
  color: var(--ink);
  border-color: transparent;
}
.choice-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #10140e;
  flex: 0 0 auto;
}
.choice.on .choice-ico { background: rgba(16, 33, 23, 0.12); }
.choice strong, .time-card strong, .plate b { display: block; }
.choice small, .time-card small { display: block; color: var(--muted); margin-top: 2px; }
.choice.on small, .time-card.on small { color: #24513a; }
.tick {
  display: inline-block;
  margin-left: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #5c6154;
  flex: 0 0 auto;
  position: relative;
  vertical-align: middle;
}
.on .tick, .choice.on .tick { border-color: transparent; background: #123024; }
.on .tick::after, .choice.on .tick::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: solid var(--mint);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.search {
  width: 100%;
  background: #12140f;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.section-label { color: var(--muted); font-size: 12px; letter-spacing: 0.12em; margin: 8px 0 10px; }
.grid-3, .grid-2 { display: grid; gap: 10px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.store {
  border-radius: 18px;
  min-height: 118px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  text-align: left;
}
.store b { font-size: 13px; margin-top: 8px; }
.mark {
  width: 100%;
  height: 58px;
  padding: 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
}
.mark img {
  max-width: 100%;
  max-height: 42px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.mark .fallback { display: none; color: #102117; font-weight: 800; }
.mark img + .fallback { display: none; }
.mark.letter { color: white; font-weight: 800; }

.name-field {
  display: grid;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}
.name-field input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  color: var(--text);
  font-size: 22px;
}
.sex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.sex {
  border-radius: 22px;
  padding: 22px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
}
.sex.on { background: transparent; border-color: var(--mint); color: var(--mint); }
.sex span { font-size: 34px; display: block; }
.panel {
  background: var(--card);
  border-radius: 24px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}
.panel-head, .row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.units { display: flex; background: #10140e; border-radius: 999px; padding: 3px; }
.units button { border: 0; background: transparent; border-radius: 999px; padding: 6px 10px; color: var(--muted); }
.units button.on { background: var(--gold); color: #241804; font-weight: 700; }
.wheel-wrap { position: relative; margin-top: 8px; }
.wheel-window {
  position: absolute;
  left: 0; right: 0; top: 72px; height: 48px;
  background: #2c3126;
  border-radius: 14px;
  pointer-events: none;
}
.wheel {
  height: 192px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  position: relative;
  z-index: 1;
  scrollbar-width: none;
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
.wheel::-webkit-scrollbar { display: none; }
.spacer { height: 72px; }
.witem {
  height: 48px;
  display: grid;
  place-items: center;
  scroll-snap-align: center;
  color: #8d917f;
  font-weight: 650;
}
.witem.hot { color: white; font-size: 20px; }
.big {
  font-family: Fraunces, Georgia, serif;
  font-size: 64px;
  letter-spacing: -0.04em;
  margin: 8px 0;
}
.big small { font-family: Outfit, sans-serif; font-size: 18px; color: var(--mint); margin-left: 4px; }
.ruler { width: 100%; accent-color: var(--mint); }
.ticks {
  height: 18px;
  margin-top: 6px;
  background: repeating-linear-gradient(90deg, #8d917f 0 2px, transparent 2px 14px);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.targets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: center; }
.targets label { display: block; }
.big-input {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: center;
  font-family: Fraunces, Georgia, serif;
  font-size: 52px;
  color: var(--mint);
  letter-spacing: -0.04em;
}
.formula { width: 100%; text-align: left; }
.formula div, .math div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.formula b, .math b { color: var(--text); font-weight: 600; }
.checkline { color: var(--mint); font-size: 14px; }

.plate {
  position: relative;
  display: block;
  width: 100%;
  height: 132px;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 10px;
  text-align: left;
  padding: 0;
  border: 0;
}
.plate-art { position: absolute; inset: 0; }
.plate-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plate b {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 26px;
  color: white;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  z-index: 1;
}
.plate .tick { position: absolute; right: 14px; top: 14px; background: rgba(16, 20, 14, 0.72); z-index: 1; }
.plate.on .tick { background: #123024; }
.plate.off .plate-art { filter: grayscale(1) brightness(0.45); }
.plate.off b { color: #c8cbbf; }
.snack {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 8px;
}
.switch {
  width: 46px;
  height: 28px;
  border-radius: 99px;
  background: #3a3d33;
  position: relative;
}
.switch i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: 0.2s ease;
}
.snack.on .switch { background: var(--mint); }
.snack.on .switch i { left: 21px; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: #10140e; }

.wide { grid-column: 1 / -1; }
.diet-card, .allergy, .chip, .day, .equip, .time-card { border-radius: 18px; }
.diet-card, .allergy {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 16px 10px;
  text-align: center;
}
.diet-card.on, .allergy.on { background: var(--mint); color: var(--ink); }
.none-card { width: 100%; border-radius: 22px; padding: 18px; margin-bottom: 12px; text-align: center; background: #142117; border: 1px solid #24523a; }
.none-card.on { background: #173224; border-color: var(--mint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border-radius: 999px; padding: 8px 12px; }
.sun-day { grid-column: 1 / -1; width: calc(50% - 5px); justify-self: center; }
.day, .equip, .time-card { padding: 16px; text-align: left; }
.day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  min-height: 56px;
}
.day .tick { position: static; transform: none; }
.equip { padding: 0 0 10px; overflow: hidden; }
.equip .art { height: 92px; display: block; background: #111; }
.equip .art img { width: 100%; height: 92px; object-fit: cover; display: block; }
.equip-name { display: block; padding: 8px 8px 2px; font-size: 13px; line-height: 1.2; }
.kitchen-note {
  margin-top: 12px;
  background: #173224;
  border-radius: 16px;
  padding: 12px;
  color: var(--mint-2);
}

.swipe-scene { height: 460px; position: relative; margin-top: 8px; }
.swipe-card {
  position: absolute;
  inset: 0 0 70px;
  border-radius: 28px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
  touch-action: none;
  user-select: none;
}
.swipe-card.back { inset: 16px 16px 86px; filter: brightness(0.75); }
.swipe-card .stamp {
  position: absolute;
  top: 24px;
  padding: 6px 10px;
  border: 3px solid;
  border-radius: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0;
}
.stamp.yes { left: 20px; color: var(--mint); border-color: var(--mint); }
.stamp.no { right: 20px; color: var(--danger); border-color: var(--danger); }
.swipe-actions { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 18px; }
.swipe-actions button {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #16180f;
  font-size: 22px;
}
.swipe-legend {
  display: grid;
  grid-template-columns: repeat(3, 62px);
  justify-content: center;
  gap: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.swipe-card { background-size: cover; background-position: center; color: white; }
.swipe-actions .heart { color: var(--mint); border-color: #24523a; }
.summary-pill { display: flex; gap: 8px; flex-wrap: wrap; }
.summary-pill span { background: var(--card); border-radius: 999px; padding: 8px 12px; }

.budget-num {
  font-family: Fraunces, Georgia, serif;
  font-size: 76px;
  color: var(--mint);
  letter-spacing: -0.05em;
  margin: 12px 0 0;
  text-align: center;
}
.center { text-align: center; }
.slider { width: 100%; margin: 18px 0 8px; accent-color: var(--mint); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }

.auth { display: flex; flex-direction: column; gap: 10px; }
.auth input, .stack input, .stack select {
  width: 100%;
  background: #12140f;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
}
.stack select { color-scheme: light; background: #f4f5ef; color: #102117; }
.error { color: var(--danger); min-height: 1.2em; }

.gen { padding-top: 12vh; }
.gen ol { list-style: none; padding: 0; }
.gen li {
  padding: 12px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.gen li.done { color: var(--mint); }

.shell { width: min(1120px, 100%); }
.side { display: none; }
.view { min-width: 0; padding: 18px 18px 136px; }
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, calc(100% - 16px));
  bottom: calc(10px + var(--safe-b));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2px;
  background: rgba(18, 20, 15, 0.94);
  border: 1px solid #3d4332;
  border-radius: 24px;
  padding: 6px;
  z-index: 6;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}
.tabbar button {
  border: 0;
  background: transparent;
  color: #9aa18c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.03em;
  padding: 7px 1px 6px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
.tabbar button span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tabbar svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabbar button.on {
  color: var(--mint);
  background: #1a2a20;
  box-shadow: inset 0 0 0 1px rgba(143, 212, 174, 0.4);
}
.tabbar button.tab-main {
  color: #e7f6ec;
  background: #24382c;
  transform: translateY(-8px);
  padding-top: 10px;
  padding-bottom: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
.tabbar button.tab-main svg { width: 26px; height: 26px; }
.tabbar button.tab-main span { font-size: 10px; }
.tabbar button.tab-main.on {
  color: #102016;
  background: var(--mint);
}
.tabbar button.tab-dead {
  opacity: 0.42;
  pointer-events: none;
}
.tabbar button.tour-hot,
.side button.tour-hot {
  box-shadow: inset 0 0 0 2px var(--gold);
}
.tour {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100% - 20px));
  bottom: calc(84px + var(--safe-b));
  z-index: 12;
  pointer-events: none;
}
.tour-card {
  pointer-events: auto;
  background: #16180f;
  border: 1px solid #d7c27a;
  border-radius: 24px;
  padding: 16px 16px 14px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55);
}
.tour-card h2 { margin: 2px 0 8px; font-size: 28px; letter-spacing: -0.03em; }
.tour-card p { margin: 0; color: var(--text); line-height: 1.45; }
.tour-row { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.tour-dots { display: flex; gap: 5px; margin-right: auto; }
.tour-dots i { width: 6px; height: 6px; border-radius: 99px; background: #3a4030; display: block; }
.tour-dots i.on { width: 16px; background: var(--mint); }
.tour-card .text-btn { width: auto; margin: 0; padding: 0 4px; }
.tour-card .cta { width: auto; margin: 0; padding: 12px 16px; white-space: nowrap; }
@media (min-width: 980px) {
  .tour { bottom: 22px; }
}
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.stat { background: var(--card); border-radius: 18px; padding: 14px; }
.stat b { display: block; font-family: Fraunces, Georgia, serif; font-size: 28px; color: var(--mint); }
.day-card, .recipe, .shop-group, .panel { animation: rise 0.4s ease both; }
.day-card { background: var(--card); border-radius: 22px; padding: 14px; margin-bottom: 12px; }
.meal {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.meal b, .meal small { display: block; }
.band { height: 8px; background: #2a2d24; border-radius: 99px; position: relative; overflow: hidden; margin: 8px 0; }
.band i { display: block; height: 100%; background: var(--mint); border-radius: inherit; }
.band.bad i { background: #e0a15a; }
.tag { color: var(--mint); font-size: 12px; }
.warn { color: #e0a15a; font-size: 12px; }
.shop {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 0;
}
.shop b, .shop small { display: block; }
.shop small { margin-top: 2px; }
.shop.done span { text-decoration: line-through; color: var(--muted); }
.box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #5c6154;
}
.shop.done .box { background: var(--mint); border-color: var(--mint); }
.aisle { margin: 16px 0 4px; color: var(--muted); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }

.ring { width: 180px; height: 180px; display: block; margin: 8px auto; }
.ring-bg { fill: none; stroke: #2a2d24; stroke-width: 10; }
.ring-fg { fill: none; stroke: var(--mint); stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
.ring text { fill: var(--text); font-family: Fraunces, Georgia, serif; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; font-family: Outfit, sans-serif; }
.h-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.h-scroll button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 12px; white-space: nowrap; }
.h-scroll button.on { background: var(--mint); color: var(--ink); border-color: transparent; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.ghost { background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 12px 14px; }
.danger-btn { background: transparent; border: 0; color: var(--danger); }

.inspire { display: grid; gap: 10px; }
.inspire button {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-align: left;
  padding: 0;
}
.inspire img { width: 112px; height: 112px; object-fit: cover; display: block; background: #111; }
.inspire b, .inspire small { display: block; }
.inspire span { padding-right: 12px; }
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 15;
  display: grid;
  place-items: end center;
}
.sheet {
  width: min(560px, 100%);
  max-height: 86dvh;
  overflow: auto;
  background: #14160f;
  border-radius: 24px 24px 0 0;
  padding: 18px 18px calc(18px + var(--safe-b));
}
.math { font-size: 14px; }

@media (min-width: 980px) {
  .shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100dvh; }
  .side .brand { margin-bottom: 18px; }
  .side {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px 14px;
    border-right: 1px solid var(--line);
    position: sticky;
    top: 0;
    height: 100dvh;
  }
  .side button { text-align: left; border: 0; background: transparent; border-radius: 12px; padding: 10px 12px; color: var(--muted); }
  .side button.on { background: #1a2a20; color: var(--mint); }
  .tabbar { display: none; }
  .view { padding-bottom: 40px; }
  .phone { min-height: 100dvh; padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
.meal-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 6px;
  border-top: 1px solid var(--line);
}
.icon-swap.fav { color: #d7c27a; font-size: 18px; }
.icon-swap.fav.on { background: #2a2614; border-color: #d7c27a; }
.meal-line .meal { border-top: 0; }
.icon-swap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #12140f;
  color: var(--mint);
  display: grid;
  place-items: center;
}
.chart-box { position: relative; }
.weight-dot { cursor: pointer; }
.weight-tip {
  position: absolute;
  transform: translate(-50%, -130%);
  background: #f4f5ef;
  color: #102117;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.nutri { background: var(--card); border-radius: 16px; padding: 12px 14px; margin: 12px 0; }
.nutri h2 { margin: 0 0 4px; font-size: 16px; }
.nutri-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; margin-top: 10px; }
.nutri-grid b { display: block; font-size: 14px; font-weight: 650; line-height: 1.2; white-space: nowrap; }
.nutri-grid span { color: var(--muted); font-size: 11px; }
.fit-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.rhythm {
  background: linear-gradient(180deg, #1b261e, #14160f 70%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px 14px 12px;
  margin: 0 0 12px;
}
.rhythm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rhythm-top .kicker { margin: 0; }
.rhythm-top strong { display: block; font-size: 28px; line-height: 1.1; }
.rhythm-top .fine { margin: 2px 0 0; }
.rhythm-orb {
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid #3a4033;
  color: var(--muted);
  font-size: 22px;
  font-weight: 800;
  background: #10130e;
}
.rhythm-orb.on { border-color: var(--mint); color: var(--mint-2); box-shadow: 0 0 0 6px rgba(143, 212, 174, 0.12); }
.rhythm-orb.wait { border-color: var(--gold); color: #f3e7b2; }
.rhythm-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 14px 0 8px; }
.rhythm-week.weeks { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rhythm-dot { text-align: center; }
.rhythm-dot i { display: block; height: 8px; border-radius: 99px; background: #2a2d24; margin-bottom: 4px; }
.rhythm-dot.on i { background: var(--mint); }
.rhythm-dot.today i { box-shadow: 0 0 0 1px var(--gold); }
.rhythm-dot small { color: var(--muted); font-size: 10px; letter-spacing: 0.03em; text-transform: uppercase; }
.rhythm-week.weeks small { text-transform: none; letter-spacing: 0; font-size: 11px; }
.rhythm-key { margin: 0 0 6px; }
.ach-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ach-head .kicker { margin: 0; }
.ach-head b { color: var(--muted); font-size: 14px; font-weight: 650; }
.ach-won { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ach-medal {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #17241c;
  border: 1px solid #3d6b4e;
  font-size: 20px;
}
.ach-next {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: #12140f;
  border: 1px solid var(--line);
}
.ach-next span { font-size: 22px; line-height: 1; filter: grayscale(1); opacity: 0.7; }
.ach-next b { display: block; font-size: 15px; }
.ach-next small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.35; }
.ach-more { margin-top: 10px; padding: 0; }
.ach-groups { display: grid; gap: 12px; margin-top: 14px; }
.ach-label { margin: 0 0 6px; color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.ach-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.ach-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.ach-pill.on { color: var(--text); border-color: #3d6b4e; background: #17241c; }
.fit-hero .stat span { color: var(--muted); font-size: 13px; }
.fit-date { display: block; margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.ro-date-field {
  display: flex;
  align-items: center;
  gap: 2px;
  width: fit-content;
  margin: 0 0 12px;
  background: #12140f;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 10px;
}
.ro-date-field .part {
  width: 2.1em;
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  padding: 6px 0;
}
.ro-date-field .part[data-part="y"] { width: 3.2em; }
.ro-date-field span { color: var(--muted); font-size: 18px; }
.week-next {
  border: 1px solid #d7c27a;
  background: #221f12;
  color: #f3e7b2;
  border-radius: 18px;
  padding: 12px 14px;
  margin: 0 0 12px;
}
.week-next b { display: block; margin-bottom: 4px; }
.week-next .fine { color: #e6d7a4; }
.week-next .cta { margin-top: 10px; }
.week-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.week-tools h1 { margin: 0; font-size: clamp(17px, 4.2vw, 22px); }
.tool-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.fav-launch, .admin-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 36px;
  border-radius: 999px;
  padding: 0 12px;
  line-height: 1;
  font-weight: 700;
}
.fav-launch {
  border: 1px solid #d7c27a;
  background: #221f12;
  color: #f3e7b2;
}
.home-launch { display: none; }
@media (max-width: 979px) {
  .tool-actions { width: 100%; justify-content: flex-start; }
  .home-launch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 36px;
    height: 36px;
    margin: 0 0 0 auto;
    padding: 0;
    line-height: 0;
    border-radius: 999px;
    border: 1px solid #d7c27a;
    background: #221f12;
    color: #f3e7b2;
  }
  .home-launch svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}
@media (max-width: 979px) and (display-mode: standalone) {
  .home-launch { display: none; }
}
html.installed .home-launch { display: none; }
.admin-launch {
  border: 1px solid #8fd9c0;
  background: #10241e;
  color: #d7fff2;
}
.fav-modal { place-items: center; padding: 16px; }
.fav-sheet {
  border-radius: 24px;
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(86dvh, 760px);
}
.fav-search { display: block; margin: 8px 0 0; }
.fav-search input {
  width: 100%;
  background: #0e100c;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.fav-filters { display: flex; gap: 6px; overflow-x: auto; margin: 10px 0 0; }
.fav-filters button {
  border: 1px solid var(--line);
  background: #12140f;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
}
.fav-filters button.on { background: var(--mint); color: var(--ink); border-color: transparent; }
.fav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  overflow: auto;
  max-height: min(52vh, 420px);
  margin-top: 12px;
  align-content: start;
}
.fav-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 96px;
  text-align: left;
  background: #12140f;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  color: var(--text);
}
.fav-tile span { font-size: 28px; line-height: 1; }
.fav-tile b {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fav-back { border: 0; background: transparent; color: var(--mint); padding: 0; font-weight: 650; }
.fav-hero { text-align: center; padding: 6px 8px 2px; }
.fav-hero span { display: block; font-size: 52px; line-height: 1; }
.fav-hero h3 { margin: 8px 0 0; font-size: 22px; }
.fav-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 4px; }
.fav-slots button {
  border: 1px solid var(--line);
  background: #12140f;
  color: var(--text);
  border-radius: 14px;
  padding: 12px 8px;
  font-weight: 700;
}
.fav-slots button.on { background: var(--mint); color: var(--ink); border-color: transparent; }
.fav-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 14px;
}
.fav-day {
  border: 1px solid var(--line);
  background: #12140f;
  color: var(--text);
  border-radius: 14px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.fav-day small { color: var(--muted); font-size: 10px; letter-spacing: 0.03em; text-transform: uppercase; }
.fav-day b { font-size: 16px; }
.fav-day.on { background: var(--mint); color: var(--ink); border-color: transparent; }
.fav-day.on small { color: var(--ink); }
.fav-sheet .cta:disabled { opacity: 0.45; }
.fav-sheet .text-btn { margin-top: 8px; }
.store-picks { border: 0; padding: 0; margin: 0; }
.store-picks legend { padding: 0; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.store-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.profile-form label.store-mini-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 6px 10px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #12140f;
  color: var(--text);
  text-align: center;
  cursor: pointer;
}
.store-mini-card .mark { width: 100%; height: 34px; padding: 4px; border-radius: 8px; }
.store-mini-card .mark img { max-height: 24px; }
.store-mini-card b { font-size: 11px; font-weight: 650; line-height: 1.2; }
.profile-form .store-mini-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.store-mini-card:has(input:checked),
.store-mini-card.on {
  border-color: var(--mint);
  box-shadow: inset 0 0 0 1px var(--mint);
}
.fit-panel { min-width: 0; background: var(--card); border-radius: 22px; padding: 14px; margin: 0 0 12px; }
.fit-panel h2 { margin: 0 0 10px; font-size: 16px; }
.fit-label { margin: 12px 0 8px; color: var(--muted); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.fit-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 12px; }
.fit-cat {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
  text-align: left;
  background: #12140f;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  color: var(--text);
}
.fit-cat span { grid-column: 1 / -1; font-size: 18px; letter-spacing: 0.08em; line-height: 1; }
.fit-cat b { font-size: 15px; font-weight: 700; }
.fit-cat small { color: var(--muted); font-size: 13px; }
.fit-cat.on { border-color: var(--mint); background: #1a2a20; color: var(--mint-2); }
.fit-cat.on small { color: var(--mint); }
.fit-slide { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fit-arrow {
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #1a1d16;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}
.fit-arrow[hidden] { display: none; }
@media (max-width: 979px) {
  .fit-arrow { display: none; }
}
.fit-rail {
  display: flex;
  flex: 1;
  width: auto;
  min-width: 0;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 2px 2px 4px;
  cursor: grab;
}
.fit-rail::-webkit-scrollbar { display: none; }
.fit-rail.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.fit-chip {
  display: flex;
  flex: 0 0 108px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 86px;
  scroll-snap-align: start;
  background: #12140f;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  color: var(--text);
  text-align: left;
}
.fit-chip span { font-size: 22px; line-height: 1; }
.fit-chip b {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fit-chip.on { border-color: var(--mint); background: #1a2a20; color: var(--mint-2); }
.fit-picked {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 14px 0 8px;
}
.fit-picked span { font-size: 22px; }
.fit-picked b { font-size: 16px; }
.fit-picked small { color: var(--muted); }
.fit-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; align-items: center; }
.fit-add input { width: 100%; background: #12140f; border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: var(--text); }
.fit-add .cta { width: auto; margin: 0; padding: 12px 18px; }
.fit-entry {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 10px 0 0;
  border-top: 1px solid var(--line);
}
.fit-emoji { font-size: 22px; }
.fit-entry small { display: block; color: var(--muted); }
.fit-entry em { font-style: normal; font-weight: 700; color: var(--mint); }
.fit-mins { display: flex; flex-wrap: wrap; gap: 8px; }
.fit-mins button { border: 1px solid var(--line); background: #12140f; color: var(--text); border-radius: 999px; padding: 8px 12px; }
.fit-mins button.on { background: var(--mint); color: var(--ink); border-color: transparent; }
.fit-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; align-items: center; }
.fit-row input { width: 100%; background: #12140f; border: 1px solid var(--line); border-radius: 14px; padding: 12px; color: var(--text); }
.fit-row .cta { width: auto; margin: 0; padding: 12px 16px; white-space: nowrap; }
.fit-log { display: grid; grid-template-columns: 32px 1fr auto auto; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.fit-log span b, .fit-log small { display: block; }
.fit-log small { color: var(--muted); }
.salt { margin: 10px 0 0; }
.salt .band { height: 6px; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 14px; }
.macros div { background: var(--card); border-radius: 14px; padding: 10px; text-align: center; }
.macros b { display: block; font-family: Fraunces, Georgia, serif; font-size: 20px; white-space: nowrap; }
.macros span { color: var(--muted); font-size: 12px; }
.pantry, .barcode-hit {
  display: none;
  grid-template-columns: 1fr 72px 40px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.pantry.show, .barcode-hit { display: grid; }
.equip.on {
  background: var(--card);
  color: var(--text);
  border-color: var(--mint);
  box-shadow: inset 0 0 0 2px var(--mint);
}
.pantry button, .barcode-hit button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--mint);
  color: var(--ink);
  font-weight: 800;
}
.pantry small, .barcode-hit small { display: block; color: var(--muted); }
.mini, .profile-form input, .profile-form select, .barcode-row input {
  width: 100%;
  background: #12140f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  color: var(--text);
}
.profile-form select {
  color-scheme: light;
  background-color: #f4f5ef;
  color: #102117;
}
.profile-form option {
  background-color: #f4f5ef;
  color: #102117;
}
.barcode-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.profile-head { display: flex; gap: 16px; align-items: center; margin: 8px 0 18px; }
.profile-id { min-width: 0; }
.profile-id h1 { margin: 0; font-size: 32px; letter-spacing: -0.03em; line-height: 1.05; }
.profile-id .lead { margin: 6px 0 0; }
.profile-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.profile-body input {
  font-family: Fraunces, Georgia, serif;
  font-size: 26px;
  letter-spacing: -0.03em;
  padding: 12px 10px;
}
.profile-cup {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 8px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 8px 12px 8px 8px;
  border-radius: 16px;
  background: #221f12;
  border: 1px solid #d7c27a;
}
.profile-cup .cup, .profile-cup .cup-face { font-size: 20px; line-height: 1; }
.profile-cup small { display: block; color: #f3e7b2; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.profile-cup b { display: block; margin-top: 1px; font-size: 15px; }
.profile-actions .redo-btn {
  width: 100%;
  background: #8fd4ae;
  color: #102117;
  border: 0;
  border-radius: 999px;
  padding: 14px 14px;
  font-weight: 800;
}
.avatar {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  overflow: hidden;
  background: #1a2a20;
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
  flex: 0 0 auto;
  border: 2px solid var(--mint);
}
.avatar img, .avatar span { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; font-size: 32px; }
.avatar input { display: none; }
.avatar small {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  text-align: center;
  font-size: 11px;
  padding: 3px 0 5px;
}
.profile-form label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.home-card {
  padding: 28px 22px 24px;
  display: grid;
  gap: 22px;
}
.home-intro { display: grid; gap: 8px; }
.home-card h2 { margin: 0; font-size: 30px; letter-spacing: -0.03em; }
.home-card .kicker, .home-card .fine { margin: 0; }
.home-card .fine { line-height: 1.5; }
.home-people, .home-requests { display: grid; }
.home-person, .home-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.home-person .who, .home-request .who, .admin-card .who { display: grid; gap: 3px; min-width: 0; }
.home-person small, .home-request small, .admin-card small { color: var(--muted); font-size: 13px; }
.home-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.home-actions .ghost, .home-actions .text-btn { width: auto; margin: 0; padding: 8px 12px; }
.home-invite { display: grid; gap: 12px; }
.home-invite label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.home-invite input {
  width: 100%;
  box-sizing: border-box;
  background: #12140f;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--text);
}
.home-invite .ghost { width: 100%; margin: 0; }
.home-sync { display: grid; gap: 14px; }
.home-sync-row {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.home-sync-row .who { display: grid; gap: 2px; }
.home-sync-row .who small { color: var(--muted); font-size: 13px; }
.home-sync-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.home-sync-actions .ghost,
.home-sync-actions .text-btn { width: auto; margin: 0; padding: 10px 14px; }
.home-quiet { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.home-quiet .text-btn { width: auto; margin: 0; padding: 0; }
.danger-link { color: #e7a3a3; }
.admin-card { display: grid; gap: 8px; margin-top: 14px; }
.hello { margin: 0 0 10px; }
.home-actions { display: flex; gap: 8px; }
.home-actions .ghost, .home-actions .danger-btn { width: auto; margin-top: 0; }
.profile-actions { display: grid; gap: 12px; margin-top: 22px; }
.profile-actions .ghost, .profile-actions .danger-btn { width: 100%; }
.profile-actions .danger-btn { padding: 12px 8px; }
.page-end { display: block; margin: 18px 0 8px; }
.cam-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #12140f;
  color: var(--mint);
  display: grid;
  place-items: center;
}
.scanner video {
  width: 100%;
  border-radius: 16px;
  background: #000;
  min-height: 260px;
  max-height: 62vh;
  object-fit: cover;
}
.scan-status { margin: 8px 0 0; text-align: center; }
.health-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.health-top h1 { margin: 0; }
.health-switch { display: flex; padding: 4px; border-radius: 999px; background: #171910; border: 1px solid var(--line); }
.health-switch button { border: 0; background: transparent; color: inherit; border-radius: 999px; padding: 8px 14px; font: inherit; }
.health-switch button.on { background: var(--mint); color: #12140f; }
.gram-ask { margin-top: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: #14160f; }
.gram-ask label { display: grid; gap: 6px; margin: 8px 0; }
.gram-actions { display: flex; gap: 8px; }
.gram-actions .cta { flex: 1; }
.steps li { margin: 10px 0; line-height: 1.45; }
.delta.down { color: var(--mint); }
.delta.up { color: #e0a15a; }
.big.pop { animation: pop 0.55s ease; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.weight-chart .draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawline 1.1s ease forwards;
}
@keyframes drawline { to { stroke-dashoffset: 0; } }

@media print {
  .tabbar, .side, .dock, .top, .tour, .no-print { display: none !important; }
  body { background: white; color: black; }
  .shell, .view { width: auto; padding: 0; }
}

.plan-top, .shop-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 8px;
}
.plan-top h1, .built h1, .shop-head h1 { margin: 0 0 4px; font-size: clamp(26px, 7vw, 34px); line-height: 1.05; }
.hello-line { margin: 0 0 6px; color: var(--mint); font-weight: 650; }
.flame { font-size: 14px; }
.pulse { display: flex; flex-direction: column; gap: 6px; min-width: 108px; }
.pulse button, .pulse div {
  display: grid;
  grid-template-columns: 18px 1fr;
  column-gap: 6px;
  align-items: center;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0;
  line-height: 1.05;
}
.shop-head .pulse div { grid-template-columns: 1fr; text-align: right; }
.shop-head .pulse small { grid-column: 1; }
.pulse small { grid-column: 2; color: var(--muted); font-size: 11px; }
.day-pills, .slot-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 12px;
  scrollbar-width: none;
}
.day-pill, .slot-pill {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 16px;
  min-width: 52px;
  padding: 8px 8px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.slot-pill { border-radius: 999px; flex: 0 0 auto; flex-direction: row; padding: 8px 14px; white-space: nowrap; min-width: max-content; }
.day-pill small { color: var(--muted); font-size: 11px; text-transform: lowercase; }
.day-pill b { font-size: 18px; line-height: 1; }
.day-pill i { color: var(--mint); font-style: normal; font-size: 12px; height: 14px; }
.day-pill.on, .slot-pill.on { background: var(--mint); color: var(--ink); border-color: transparent; }
.day-pill.on small, .day-pill.on i { color: #24513a; }
.meals-head, .day-block h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 4px 0 8px; }
.meals-head h2, .day-block h2 { margin: 0; font-size: 18px; }
.meals-head span { color: var(--muted); font-size: 13px; }
.dish {
  background: var(--card);
  border-radius: 22px;
  padding: 12px;
  margin: 0 0 12px;
}
.dish-top { display: grid; grid-template-columns: 92px 1fr; gap: 12px; }
.dish-pic, .dish-copy {
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: inherit;
}
.dish-pic { position: relative; width: 92px; height: 92px; border-radius: 16px; overflow: hidden; }
.dish-pic img, .recipe-hero, .shop-card img, .plate-choice img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dish-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mint);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.dish-copy { width: 100%; }
.dish-copy b { display: block; margin: 4px 0; font-size: 17px; line-height: 1.2; }
.dish-kcal, .dish-pro { display: block; font-size: 13px; }
.dish-pro { color: var(--mint); }
.dish-foot { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.dish-cta {
  flex: 1;
  border: 0;
  border-radius: 999px;
  background: #245c3a;
  color: #f4fff6;
  padding: 10px 14px;
  font-weight: 650;
}
.dish-cta.done { background: #243028; color: var(--mint); }
.recipe-hero { height: 210px; border-radius: 22px; margin: 8px 0 12px; object-fit: cover; }
.shop-card {
  width: 100%;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: var(--card);
  border: 0;
  border-radius: 18px;
  padding: 8px;
  margin-bottom: 8px;
}
.shop-end { display: flex; align-items: center; gap: 8px; }
.shop-card img, .shop-ico { width: 64px; height: 64px; border-radius: 14px; }
.shop-ico {
  display: grid;
  place-items: center;
  background: #12140f;
  font-size: 28px;
}
.shop-card b, .shop-card small { display: block; }
.shop-card small { color: var(--muted); margin-top: 2px; }
.shop-card em { font-style: normal; font-weight: 700; }
.shop-card.done span { color: var(--muted); text-decoration: line-through; }
.round-tick {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #5c6154;
  display: grid;
  place-items: center;
  font-style: normal;
  color: var(--ink);
}
.shop-card.done .round-tick { background: var(--mint); border-color: var(--mint); }
.built { margin-bottom: 18px; }
.built > p { color: var(--muted); }
.built-ask, .built-days {
  background: var(--card);
  border-radius: 18px;
  padding: 14px;
  margin: 12px 0;
}
.built-ask p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.built-ask div { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.built-ask b, .built-days b { display: block; font-size: 28px; }
.built-ask small { color: var(--muted); }
.built-days > p { margin: 0 0 8px; }
.built-days div { display: grid; grid-template-columns: 22px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; }
.built-days i { color: var(--muted); font-style: normal; }
.built-days .ok i { color: var(--mint); }
.built-days em { color: var(--muted); font-style: normal; }
.plate-choice { display: grid; grid-template-columns: 56px 1fr auto; }
.plate-choice img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.cal-pills { margin-top: 8px; }

.body-calc { margin: 8px 0 16px; max-width: 100%; }
.body-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.body-card {
  background: var(--card);
  border-radius: 22px;
  padding: 14px 14px 12px;
  min-width: 0;
}
.body-num { margin: 4px 0 8px; display: flex; align-items: baseline; gap: 6px; }
.body-num b {
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(32px, 8vw, 44px);
  line-height: 0.95;
  color: var(--mint);
}
.body-num small { color: var(--muted); font-size: 13px; }
.body-tag {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 10px;
  background: #1c1e16;
  color: var(--muted);
  font-size: 13px;
}
.body-tag.ok { background: #1a2a20; color: var(--mint); }
.body-tag.warn { background: #2a2414; color: var(--gold); }
.body-tag.high { background: #2a1614; color: var(--danger); }
.bmi-scale {
  position: relative;
  height: 8px;
  border-radius: 99px;
  margin: 14px 0 6px;
  background: linear-gradient(90deg, #e0a15a 0 14%, #8fd4ae 14% 40%, #f0b429 40% 60%, #ff8d7a 60% 100%);
}
.bmi-scale i {
  position: absolute;
  top: -5px;
  width: 4px;
  height: 18px;
  border-radius: 4px;
  background: #f4f5ef;
  box-shadow: 0 0 0 3px rgba(12, 13, 10, 0.45);
}
.bmi-key {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  color: var(--muted);
  font-size: 11px;
}
.bmi-key span:nth-child(2),
.bmi-key span:nth-child(3) { text-align: center; }
.bmi-key span:last-child { text-align: right; }
.body-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.body-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}
.body-fields label[hidden] { display: none; }
.body-fields input {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--text);
}
@media (max-width: 520px) {
  .body-pair { grid-template-columns: 1fr; }
  .body-card { padding: 14px; }
  .body-tag { font-size: 12px; }
}
