/* Biolink — Nutrition "The Daily Table" v2 (docs/nutrition-redesign.md)
   Image-centric catalog: transparent dish cutouts floating over paper, monochrome ink
   system, hairline borders, one shadow story, Fraunces display. No gradient washes.
   Class prefix: nx- */

@font-face {
  font-family: "Fraunces";
  src: url("/app/fonts/fraunces.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --nx-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --nx-ink: #1D1F24;
  --nx-ink-2: #5C616B;
  --nx-ink-3: #979CA6;
  --nx-hair: rgba(29,31,36,0.08);
  --nx-hair-2: rgba(29,31,36,0.16);
  --nx-card: #FFFFFF;
  --nx-shadow-card: 0 1px 2px rgba(28,27,24,0.04), 0 10px 28px rgba(28,27,24,0.05);
  --nx-shadow-card-hover: 0 2px 3px rgba(28,27,24,0.05), 0 16px 40px rgba(28,27,24,0.09);
  --nx-shadow-dish: drop-shadow(0 16px 16px rgba(30,28,22,0.15)) drop-shadow(0 4px 5px rgba(30,28,22,0.08));
  --nx-ease-spring: cubic-bezier(.34,1.3,.42,1);
}

.nx-screen { position: relative; }

/* ---- masthead ---- */
.nx-masthead { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px;
  margin: 4px 0 18px; flex-wrap: wrap; }
.nx-masthead .nx-kicker { font-size: 11px; font-weight: 700; letter-spacing: 2.4px;
  text-transform: uppercase; color: var(--nx-ink-3); margin-bottom: 6px; }
.nx-masthead .nx-title { font-family: var(--nx-serif); font-weight: 560;
  font-size: clamp(28px, 4vw, 38px); line-height: 1.02; letter-spacing: -0.4px;
  font-variation-settings: "opsz" 72; color: var(--nx-ink); }
.nx-masthead .nx-sub { color: var(--nx-ink-3); font-size: 12.5px; margin-top: 6px; font-weight: 550; }

/* segmented Food/Supplements — hairline pill, ink active. Centred and deliberately larger
   than a corner control: it switches the whole screen, so it has to be seen to be used. */
.nx-segrow { display: flex; justify-content: center; margin: -6px 0 20px; }
.nx-seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px;
  background: var(--nx-card); border: 1px solid var(--nx-hair-2);
  box-shadow: var(--nx-shadow-card); }
.nx-seg button { border: none; background: none; padding: 10px 30px; border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: .1px; color: var(--nx-ink-2);
  transition: color .15s, background .15s; }
.nx-seg button:hover { color: var(--nx-ink); }
.nx-seg button.active { background: var(--nx-ink); color: #fff; }
.nx-seg button.active:hover { color: #fff; }

/* ---- day strip: exactly seven days wide, the rest a scroll away ---- */
/* Bounded, not full-bleed: seven cells stretched across a 1200px desktop would put 150px
   between one date and the next. The rail holds a week at roughly the cell size the strip
   always had, and narrower screens shrink it to fit. Centred on the same axis as the
   segment above it — a bounded rail pinned left reads as an accident of width. */
.nx-strip-rail { display: flex; align-items: flex-start; gap: 2px;
  max-width: 470px; margin: 0 auto; }
.nx-strip-nav { flex: none; border: none; background: none; cursor: pointer;
  width: 26px; padding: 12px 0 0; font-size: 19px; line-height: 1; color: var(--nx-ink-3);
  transition: color .15s, opacity .15s; }
.nx-strip-nav:hover { color: var(--nx-ink); }
.nx-strip-nav.spent { opacity: .22; pointer-events: none; }
.nx-daystrip { position: relative; display: flex; gap: 4px; overflow-x: auto; padding: 2px 2px 10px;
  flex: 1 1 auto; min-width: 0; scroll-behavior: smooth;
  scrollbar-width: none; -ms-overflow-style: none; cursor: grab; user-select: none;
  -webkit-user-select: none; touch-action: pan-x; }
.nx-daystrip::-webkit-scrollbar { display: none; }
.nx-daystrip.dragging { cursor: grabbing; scroll-behavior: auto; }
/* 7 across whatever the container width: (100% - the six 4px gaps) / 7. No min-width — a
   floor here wins over the basis on a phone and silently drops the week back to five days. */
.nx-day { flex: 0 0 calc((100% - 24px) / 7);
  padding: 6px 0 7px; border-radius: 14px; text-align: center;
  border: none; background: none; color: var(--nx-ink-2); transition: background .15s; }
.nx-day .dow { font-size: 9px; font-weight: 800; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--nx-ink-3); }
.nx-day .num { width: 30px; height: 30px; margin: 3px auto 0; display: grid; place-items: center;
  font-family: var(--nx-serif); font-size: 16.5px; font-weight: 550; border-radius: 50%;
  font-variation-settings: "opsz" 40; color: var(--nx-ink);
  transition: background .18s, color .18s; }
.nx-day .kdot { width: 4px; height: 4px; border-radius: 50%; margin: 4px auto 0;
  background: transparent; }
.nx-day.haslog .kdot { background: var(--nx-ink-3); }
.nx-day:hover .num { background: rgba(29,31,36,0.06); }
.nx-day.active .num { background: var(--nx-ink); color: #fff; }
.nx-day.future { opacity: .32; pointer-events: none; }

/* ---- energy (compact single row) ---- */
.nx-energy { display: flex; align-items: center; gap: 36px; flex-wrap: wrap;
  background: var(--nx-card); border: 1px solid var(--nx-hair); border-radius: 18px;
  box-shadow: var(--nx-shadow-card); padding: 18px 24px 17px; margin: 6px 0 0; }
.nx-energy .e-main { min-width: 200px; }
.nx-energy .nx-kcal-label { font-size: 10px; font-weight: 800; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--nx-ink-3); }
.nx-energy .nx-kcal-num { font-family: var(--nx-serif); font-weight: 480; font-size: 34px;
  line-height: 1.05; letter-spacing: -0.5px; font-variation-settings: "opsz" 60;
  font-variant-numeric: tabular-nums; color: var(--nx-ink); margin-top: 2px; }
.nx-energy .nx-kcal-num small { font-family: var(--font); font-size: 12px; font-weight: 650;
  color: var(--nx-ink-3); letter-spacing: 0; margin-left: 5px; }
.nx-energy .e-bar { position: relative; width: 100%; max-width: 210px; height: 3px;
  border-radius: 999px; background: rgba(29,31,36,0.08); margin-top: 10px; }
.nx-energy .e-bar .fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px;
  background: var(--nx-ink); }
.nx-energy .e-bar .fill.over { background: var(--warning); }
.nx-energy .e-sub { font-size: 11.5px; color: var(--nx-ink-3); margin-top: 9px; font-weight: 550; }
.nx-energy .e-sub b { color: var(--nx-ink-2); font-weight: 700; }
.nx-energy .e-sub button { border: none; background: none; padding: 0; font-size: 11.5px;
  font-weight: 700; color: var(--nx-ink-2); text-decoration: underline;
  text-decoration-color: var(--nx-hair-2); text-underline-offset: 3px; }
.nx-energy .e-sub button:hover { color: var(--nx-ink); }
.nx-energy .e-macros { display: flex; gap: 26px; flex-wrap: wrap; margin-left: auto; }
.nx-energy .m { min-width: 62px; }
.nx-energy .m .m-l { font-size: 9.5px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--nx-ink-3); }
.nx-energy .m .m-v { font-family: var(--mono); font-size: 14px; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--nx-ink); margin-top: 3px; }
.nx-energy .m .m-v small { font-size: 10px; color: var(--nx-ink-3); font-weight: 600; }
.nx-energy .m .m-bar { position: relative; width: 100%; height: 3px; border-radius: 999px;
  background: rgba(29,31,36,0.08); margin-top: 7px; }
.nx-energy .m .m-bar .fill { position: absolute; inset: 0 auto 0 0; width: 0;
  border-radius: 999px; background: var(--nx-ink-2); }

/* ---- meal card grid (image-centric) ---- */
.nx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 64px 18px; margin-top: 74px; align-items: start; }
.nx-card { position: relative; background: var(--nx-card); border: 1px solid var(--nx-hair);
  border-radius: 20px; padding: 128px 20px 12px; box-shadow: var(--nx-shadow-card);
  text-align: center; transition: box-shadow .25s ease, transform .25s ease; }
.nx-card:hover { box-shadow: var(--nx-shadow-card-hover); transform: translateY(-2px); }

/* floating dish cutout — breaks out of the card top */
.nx-dish { position: absolute; top: -52px; left: 50%; width: 168px; height: 168px;
  transform: translateX(-50%); pointer-events: none; }
.nx-dish img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; filter: var(--nx-shadow-dish);
  transition: transform .45s var(--nx-ease-spring); }
.nx-dish img.fx-revealed { opacity: 1; }
.nx-dish img.fx-reveal-css { transition: opacity .6s ease, transform .45s var(--nx-ease-spring); }
.nx-dish img.fx-reveal-css.fx-revealed { opacity: 1; }
.nx-card:hover .nx-dish img { transform: translateY(-5px) scale(1.025); }
.fx-reveal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2;
  pointer-events: none; filter: var(--nx-shadow-dish); }

/* placeholder while the portrait is being generated — quiet ceramic plate */
.nx-plating { position: absolute; inset: 0; display: grid; place-items: center; }
.nx-plating .plate { width: 108px; height: 108px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #FFFFFF, #F1EFE9 68%, #E7E4DC);
  box-shadow: 0 14px 22px rgba(30,28,22,0.12), inset 0 1px 0 #fff;
  animation: nx-breathe 2.8s ease-in-out infinite; }
@keyframes nx-breathe { 50% { transform: scale(1.04); } }
.nx-plating .cap { position: absolute; bottom: 2px; font-size: 9px; font-weight: 800;
  letter-spacing: 1.8px; text-transform: uppercase; color: var(--nx-ink-3); }
/* fallback (blocked/failed/disabled): plate with a serif monogram */
.nx-plating.fallback .plate { animation: none; display: grid; place-items: center;
  font-family: var(--nx-serif); font-size: 34px; font-weight: 500; color: var(--nx-ink-3); }

/* card text */
.nx-card .c-eyebrow { font-size: 10px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--nx-ink-3); }
.nx-card .c-title { font-family: var(--nx-serif); font-weight: 545; font-size: 18.5px;
  line-height: 1.18; letter-spacing: -0.1px; font-variation-settings: "opsz" 34;
  color: var(--nx-ink); margin: 7px auto 0; max-width: 30ch; text-wrap: balance; }
.nx-card .c-stats { font-family: var(--mono); font-size: 11.5px; font-weight: 650;
  font-variant-numeric: tabular-nums; color: var(--nx-ink-2); margin-top: 9px;
  letter-spacing: 0.2px; }
.nx-card .c-stats .sep { color: var(--nx-ink-3); opacity: .6; padding: 0 3px; }

/* the card is the tap target for the whole meal — the chevron points INTO the editor */
.nx-card.tappable { cursor: pointer; }
.nx-card.tappable:focus-visible { outline: 2px solid var(--nx-ink); outline-offset: 3px; }
.nx-card .c-open { margin: 12px auto 0; display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  color: var(--nx-ink-3); transition: background .15s, color .15s; }
.nx-card.tappable:hover .c-open { background: rgba(29,31,36,0.05); color: var(--nx-ink); }
.nx-card .c-open .ico { width: 13px; height: 13px; }
.nx-card .c-open .chev { display: inline-flex; transition: transform .2s var(--nx-ease-spring); }
.nx-card.tappable:hover .c-open .chev { transform: translateX(2px); }

/* ---- meal editor sheet ---- */
.ms-totals { font-family: var(--mono); font-variant-numeric: tabular-nums; margin: 2px 2px 4px;
  display: flex; align-items: baseline; gap: 4px; }
.ms-totals .t-kcal { font-family: var(--nx-serif); font-size: 27px; font-weight: 560;
  font-variation-settings: "opsz" 40; color: var(--nx-ink); letter-spacing: -0.5px; }
.ms-totals .t-unit { font-size: 10.5px; font-weight: 700; color: var(--nx-ink-3); margin-right: 4px; }
.ms-totals .t-macro { font-size: 11.5px; font-weight: 650; color: var(--nx-ink-2); }
.ms-totals .sep { color: var(--nx-ink-3); opacity: .6; }
.ms-list { margin-top: 6px; border-top: 1px solid var(--nx-hair); }
.ms-empty { padding: 22px 2px; text-align: center; font-size: 12.5px; color: var(--nx-ink-3); }
.ms-row { overflow: hidden; padding: 11px 2px; border-bottom: 1px solid var(--nx-hair);
  transition: opacity .18s; }
.ms-row.saving { opacity: .55; }
.ms-row .r-top { display: flex; align-items: baseline; gap: 10px; }
.ms-row .r-name { font-weight: 650; font-size: 13px; color: var(--nx-ink); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-row .r-kcal { margin-left: auto; flex: none; font-family: var(--mono); font-size: 12px;
  font-weight: 700; font-variant-numeric: tabular-nums; color: var(--nx-ink-2); }
.ms-row .r-kcal small { font-size: 9px; color: var(--nx-ink-3); }
.ms-row .r-tools { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.ms-row .r-fixed { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--nx-ink-3); }
.ms-row .rm { width: 30px; height: 30px; border-radius: 9px; border: none; margin-left: auto;
  flex: none; display: grid; place-items: center; background: none; color: var(--nx-ink-3);
  transition: .15s; }
.ms-row .rm:hover { color: var(--danger); background: var(--danger-soft); }
.ms-row .rm .ico { width: 15px; height: 15px; }
.nx-mealsel { width: auto; padding: 6px 26px 6px 10px; font-size: 12px; font-weight: 650;
  border-radius: 10px; border: 1px solid var(--nx-hair-2); background: var(--nx-card);
  color: var(--nx-ink-2); font-family: inherit; }
.nx-mealsel:focus { outline: none; border-color: var(--nx-ink-3); }

.nx-stepper { display: inline-flex; align-items: center; border: 1px solid var(--nx-hair-2);
  border-radius: 10px; overflow: hidden; background: var(--nx-card); }
.nx-stepper button { width: 30px; height: 30px; border: none; background: none; color: var(--nx-ink);
  font-size: 15px; font-weight: 700; display: grid; place-items: center; }
.nx-stepper button:hover { background: rgba(29,31,36,0.05); }
.nx-stepper input { width: 52px; height: 30px; border: none; text-align: center;
  font-family: var(--mono); font-size: 12px; font-weight: 700; background: none; color: var(--nx-ink); }
.nx-stepper input:focus { outline: none; }
.nx-stepper .unit { padding-right: 8px; font-size: 10px; color: var(--nx-ink-3); font-weight: 700; }
.nx-ghostbtn { border: 1px solid var(--nx-hair-2); background: var(--nx-card); color: var(--nx-ink-2);
  border-radius: 10px; padding: 6px 11px; font-size: 11.5px; font-weight: 700; transition: .15s; }
.nx-ghostbtn:hover { color: var(--nx-ink); border-color: var(--nx-ink-3); }
.nx-ghostbtn.danger:hover { color: var(--danger); border-color: var(--danger); }

/* ---- empty day ---- */
.nx-empty { text-align: center; padding: 84px 20px 60px; }
.nx-empty .plate { width: 118px; height: 118px; margin: 0 auto 22px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #FFFFFF, #F1EFE9 66%, #E7E4DC);
  box-shadow: 0 20px 34px rgba(30,28,22,0.12), inset 0 1px 0 #fff; }
.nx-empty h3 { font-family: var(--nx-serif); font-weight: 545; font-size: 24px; margin: 0 0 7px;
  font-variation-settings: "opsz" 50; color: var(--nx-ink); }
.nx-empty p { color: var(--nx-ink-2); font-size: 13px; margin: 0 0 20px; }

/* ---- ink buttons ---- */
.nx-primary { display: inline-flex; justify-content: center; align-items: center; gap: 7px;
  padding: 12px 22px; border: none; border-radius: 999px; font-size: 13.5px; font-weight: 750;
  color: #fff; background: var(--nx-ink); box-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: background .15s, transform .1s; }
.nx-primary:hover { background: #2B2E35; }
.nx-primary:disabled { opacity: .5; }
.nx-primary.block { display: flex; width: 100%; margin-top: 16px; padding: 13px; }
.nx-primary .ico { width: 15px; height: 15px; }

/* floating add button */
.nx-fab { position: fixed; right: 30px; bottom: 30px; z-index: 60; width: 56px; height: 56px;
  border-radius: 50%; border: none; display: grid; place-items: center; color: #fff;
  background: var(--nx-ink);
  box-shadow: 0 2px 4px rgba(0,0,0,0.16), 0 12px 28px rgba(28,27,24,0.24);
  transition: box-shadow .2s, background .15s; }
.nx-fab:hover { background: #2B2E35; box-shadow: 0 3px 6px rgba(0,0,0,0.18), 0 16px 36px rgba(28,27,24,0.30); }
.nx-fab .ico { width: 24px; height: 24px; }

/* ---- add sheet ---- */
.nx-sheet-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(24,25,29,0.34);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 720px) { .nx-sheet-overlay { align-items: center; padding: 24px; } }
.nx-sheet { width: 100%; max-width: 600px; max-height: 86vh; overflow-y: auto;
  border-radius: 26px 26px 0 0; padding: 8px 22px 24px; background: #FEFDFB;
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 -18px 60px rgba(20,21,24,0.30); touch-action: pan-y; }
@media (min-width: 720px) { .nx-sheet { border-radius: 26px; box-shadow: 0 36px 90px rgba(20,21,24,0.35); } }
.nx-sheet .grab { width: 38px; height: 4px; border-radius: 999px; background: rgba(29,31,36,0.14);
  margin: 6px auto 14px; }
.nx-sheet h3 { font-family: var(--nx-serif); font-weight: 550; font-size: 22px; margin: 2px 2px 3px;
  font-variation-settings: "opsz" 50; color: var(--nx-ink); }
.nx-sheet .sub { color: var(--nx-ink-3); font-size: 12px; margin: 0 2px 15px; }
.nx-searchbox { position: relative; }
.nx-searchbox input { width: 100%; padding: 14px 44px 14px 17px; font-size: 14.5px;
  border-radius: 15px; border: 1px solid var(--nx-hair-2); background: var(--nx-card);
  transition: border-color .15s, box-shadow .15s; font-family: inherit; color: var(--nx-ink); }
.nx-searchbox input:focus { outline: none; border-color: var(--nx-ink-3);
  box-shadow: 0 0 0 4px rgba(29,31,36,0.06); }
.nx-searchbox .sicon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--nx-ink-3); display: grid; place-items: center; }
.nx-meal-pick { display: flex; gap: 6px; margin: 13px 0 4px; flex-wrap: wrap; }
.nx-meal-pick .mp { padding: 6px 13px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--nx-hair-2); background: var(--nx-card); color: var(--nx-ink-2); transition: .15s; }
.nx-meal-pick .mp.active { background: var(--nx-ink); color: #fff; border-color: var(--nx-ink); }
.nx-results { margin-top: 10px; }
.nx-result { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 14px;
  cursor: pointer; transition: background .13s; }
.nx-result:hover { background: rgba(29,31,36,0.035); }
.nx-result .r-name { font-weight: 650; font-size: 13px; color: var(--nx-ink); }
.nx-result .r-sub { font-size: 11px; color: var(--nx-ink-3); }
.nx-result .r-add { width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: rgba(29,31,36,0.06); color: var(--nx-ink);
  border: none; transition: .15s; }
.nx-result:hover .r-add { background: var(--nx-ink); color: #fff; }
/* favorite star — pins a food to the top of the add sheet (filled ink when on) */
.nx-result .r-fav { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; border: none; background: none; color: var(--nx-ink-3);
  transition: color .15s, background .15s; }
.nx-result .r-fav:hover { background: rgba(29,31,36,0.06); color: var(--nx-ink); }
.nx-result .r-fav:focus-visible { outline: 2px solid var(--nx-ink); outline-offset: 2px; }
.nx-result .r-fav .ico { width: 15px; height: 15px; }
.nx-result .r-fav.on { color: var(--nx-ink); }
.nx-result .r-fav.on .ico path { fill: currentColor; }
.nx-result .r-fav + .r-add { margin-left: 4px; }
.nx-favlabel { font-size: 10px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--nx-ink-3); margin: 12px 2px 2px; }
.nx-thumb { width: 38px; height: 38px; border-radius: 12px; flex: none; overflow: hidden;
  position: relative; background: #F3F1EC; box-shadow: inset 0 0 0 1px var(--nx-hair);
  display: grid; place-items: center; }
.nx-thumb .lt { font-family: var(--nx-serif); font-size: 15px; color: var(--nx-ink-3); }
.nx-ai-cta { display: flex; align-items: center; gap: 11px; width: 100%; margin-top: 11px;
  padding: 12px 15px; border-radius: 15px; border: 1px dashed var(--nx-hair-2);
  background: none; color: var(--nx-ink); font-weight: 700; font-size: 13px; transition: .15s;
  text-align: left; }
.nx-ai-cta:hover { border-style: solid; border-color: var(--nx-ink-3); background: rgba(29,31,36,0.025); }
.nx-ai-cta .ico { width: 17px; height: 17px; flex: none; color: var(--nx-ink-2); }
.nx-ai-cta .hint { display: block; font-size: 10.5px; color: var(--nx-ink-3); font-weight: 600; margin-top: 1px; }
.nx-chiprow { display: flex; gap: 8px; margin-top: 11px; }

/* AI thinking shimmer text */
.nx-thinking { display: inline-block; font-weight: 700; font-size: 12.5px;
  background: linear-gradient(90deg, var(--nx-ink-3) 25%, var(--nx-ink) 50%, var(--nx-ink-3) 75%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: nx-shimmer-text 1.4s linear infinite; }
@keyframes nx-shimmer-text { to { background-position: -200% 0; } }

/* review cards */
/* ---- the plate: items staged for one meal, before they are logged ----
   Reads as a held-back list, not a result list — inset panel, hairline top rule on each
   row, the running total in the eyebrow so the cost of the meal is visible while building. */
.nx-tray:not(:empty) { margin-top: 13px; padding: 11px 13px 13px; border-radius: 16px;
  background: rgba(29,31,36,0.030); border: 1px solid var(--nx-hair); }
.nx-tray .t-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 2px; }
.nx-tray .t-label { font-size: 10px; font-weight: 800; letter-spacing: 1.8px;
  text-transform: uppercase; color: var(--nx-ink-3); }
.nx-tray .t-total { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--nx-ink-2); }
.nx-tray .t-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.nx-tray .t-row + .t-row { border-top: 1px solid var(--nx-hair); }
.nx-tray .t-row .r-name { font-weight: 650; font-size: 13px; color: var(--nx-ink); }
.nx-tray .t-row .r-sub { font-size: 11px; color: var(--nx-ink-3); font-family: var(--mono); }
.nx-tray .rm { width: 28px; height: 28px; border-radius: 9px; border: none; margin-left: auto;
  flex: none; display: grid; place-items: center; background: none; color: var(--nx-ink-3); }
.nx-tray .rm:hover { color: var(--danger); background: var(--danger-soft); }
.nx-tray .nx-primary.block { margin-top: 12px; }
/* "Add another item" sits under the commit button — same width, clearly secondary. */
.nx-ghostbtn.block { display: flex; width: 100%; justify-content: center;
  padding: 11px; margin-top: 9px; font-size: 12.5px; }

.nx-review { margin-top: 12px; }
.nx-review .rv-note { font-size: 11.5px; color: var(--nx-ink-2); line-height: 1.5; margin: 4px 2px 8px; }
.nx-review .nx-result { cursor: default; }
.nx-review .rm { width: 28px; height: 28px; border-radius: 9px; border: none; margin-left: 4px;
  flex: none; display: grid; place-items: center; background: none; color: var(--nx-ink-3); }
.nx-review .rm:hover { color: var(--danger); background: var(--danger-soft); }
.nx-grams-inline { width: 68px; padding: 6px 8px; border: 1px solid var(--nx-hair-2);
  border-radius: 9px; font-family: var(--mono); font-size: 12px; font-weight: 700;
  text-align: center; background: var(--nx-card); color: var(--nx-ink); }
.nx-grams-inline:focus { outline: none; border-color: var(--nx-ink-3); }

/* consent card */
.nx-consent { display: flex; gap: 15px; align-items: center; border-radius: 16px; padding: 15px 18px;
  margin: 14px 0 0; background: var(--nx-card); border: 1px solid var(--nx-hair);
  box-shadow: var(--nx-shadow-card); text-align: left; }
.nx-consent .ic { width: 40px; height: 40px; border-radius: 13px; flex: none; display: grid;
  place-items: center; background: rgba(29,31,36,0.06); color: var(--nx-ink); }
.nx-consent .t { font-weight: 750; font-size: 13px; color: var(--nx-ink); }
.nx-consent .s { font-size: 11.5px; color: var(--nx-ink-2); margin-top: 2px; line-height: 1.5; }
.nx-consent .go { margin-left: auto; flex: none; }

/* supplements (Stack) */
.nx-stack-day { font-family: var(--nx-serif); font-size: 18px; font-weight: 550; margin: 6px 2px 12px;
  color: var(--nx-ink); }

/* day-swipe container */
.nx-dayview { position: relative; touch-action: pan-y; }

/* ---- responsive ---- */
@media (max-width: 880px) {
  .nx-energy { gap: 18px; padding: 16px 18px; }
  /* 2x2 macro grid — no orphaned fourth macro on narrow screens */
  .nx-energy .e-macros { margin-left: 0; width: 100%; display: grid;
    grid-template-columns: repeat(2, 1fr); gap: 14px 22px; }
  .nx-fab { right: 18px; bottom: 18px; }
}
@media (max-width: 560px) {
  .nx-grid { grid-template-columns: 1fr; gap: 58px 0; margin-top: 66px; }
  .nx-masthead .nx-title { font-size: 29px; }
  /* The chevrons exist for a desktop pointer, which has no other way to scroll the strip.
     On a phone they cost 52px of the seven cells and the gesture is already swipe. */
  .nx-strip-nav { display: none; }
  .nx-seg button { padding: 10px 22px; }
  .nx-dish { width: 150px; height: 150px; top: -46px; }
  .nx-card { padding-top: 112px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .nx-plating .plate, .nx-thinking { animation: none !important; }
  .nx-card, .nx-dish img, .nx-card .c-open .chev { transition: none !important; }
}
