/* Тарелка — Google Stitch / Bright Material. Синий остаток жира, красный сверх. */
:root {
  --paper: #F8F9FA;
  --paper-2: #E8EAED;
  --card: #FFFFFF;
  --ink: #202124;
  --ink-2: #5F6368;
  --ink-3: #80868B;
  --lime: #34A853;
  --lime-d: #1E8E3E;
  --lime-s: #E6F4EA;
  --coral: #EA4335;
  --olive: #4285F4;
  --olive-d: #1A73E8;
  --olive-s: #E8F0FE;
  --terra: #EA4335;
  --terra-d: #C5221F;
  --terra-ink: #A50E0E;
  --terra-s: #FCE8E6;
  --line: #DADCE0;
  --ok: #34A853;
  --mint: #FBBC04;
  --shadow: 0 1px 2px rgba(60,64,67,.3), 0 2px 6px rgba(60,64,67,.15);
  --yellow-s: #FEF7E0;
  --yellow-ink: #B06000;
  --sans: "DM Sans", "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --t: 160ms;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--paper); color: var(--ink); }
html { height: 100%; }
body {
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: -0.011em;
}
button, input, select { font: inherit; }
img { max-width: 100%; display: block; }
button { color: inherit; cursor: pointer; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  padding-bottom: calc(108px + var(--safe-b));
}

.top {
  padding: calc(16px + var(--safe-t)) 20px 4px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.brand { min-width: 0; }
.brand h1 {
  font-weight: 600;
  font-size: 22px;
  line-height: 1.1;
  margin: 0 0 2px;
  letter-spacing: -0.03em;
}
.date-line {
  margin: 0;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 500;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--ink-2);
  transition: background var(--t) var(--ease);
}
.icon-btn:active { background: var(--paper-2); }
.icon-btn svg { width: 22px; height: 22px; }

.wrap { padding: 4px 20px 0; }

.meters,
.meters3 {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.meter.fat {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 10px 0 2px;
}
.meter.fat .k {
  font-size: 15px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  margin-bottom: 2px;
}
.meter.fat .big {
  font-size: 48px;
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.05em;
}
.meter.fat .big small {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: -0.02em;
  margin-left: 2px;
}
.meter.fat .sub {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-3);
  font-weight: 500;
}
.meter.fat .bar {
  height: 8px;
  margin-top: 12px;
}
.meter.fat:has(.bar.warn) .big { color: var(--terra); }
.meter.fat:has(.bar.full) .big { color: var(--coral); }

.slim-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.slim-stack .meter {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "k big"
    "bar bar"
    "sub sub";
  column-gap: 12px;
  row-gap: 6px;
  align-items: baseline;
}
.slim-stack .meter .k {
  grid-area: k;
  font-size: 13px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-3);
  margin: 0;
}
.slim-stack .meter .big {
  grid-area: big;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}
.slim-stack .meter .big small {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 3px;
}
.slim-stack .meter .sub {
  grid-area: sub;
  margin: 0;
  font-size: 12px;
  color: var(--ink-3);
}
.slim-stack .meter .bar {
  grid-area: bar;
  height: 5px;
  margin: 0;
}

.bar {
  height: 7px;
  background: var(--paper-2);
  border-radius: 99px;
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--olive);
  border-radius: inherit;
  transition: width var(--t) var(--ease);
}
.bar.warn > i { background: var(--terra); }
.bar.full > i { background: var(--coral); }

.sat-row {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--paper-2);
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.note {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
}
.note strong { color: var(--ink); font-weight: 650; }

.section-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 22px 0 10px;
}
.section-h h2 {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}
.section-h span { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.picks-h { margin: 18px 16px 8px; }

.empty {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
  color: var(--ink-3);
  font-size: 15px;
  background: var(--card);
}

.plate-list { display: flex; flex-direction: column; gap: 8px; }
.plate {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 0;
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 8px 8px 8px 8px;
  min-height: 80px;
}
.plate .th {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--paper-2);
  flex-shrink: 0;
}
.plate .th.ph {
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-size: 20px;
  font-weight: 600;
}
.plate .meta { min-width: 0; flex: 1; }
.plate .meta b {
  display: block;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plate .meta em {
  font-style: normal;
  color: var(--ink-3);
  font-size: 13px;
  display: block;
  margin-top: 2px;
}
.plate .pcts {
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.plate .pcts span {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.plate .pcts span:last-child { color: var(--ink-2); font-size: 13px; }
.plate .pcts .hot { color: var(--terra-d); font-weight: 700; }
.del {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  border-radius: 12px;
  flex-shrink: 0;
  font-size: 22px;
  line-height: 1;
  transition: background var(--t) var(--ease);
}
.del:active { background: var(--paper-2); }

/* Dock — Cal AI shutter */
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 480px;
  margin: 0 auto;
  padding: 8px 28px calc(10px + var(--safe-b));
  background: linear-gradient(to top, var(--paper) 62%, rgba(248,249,250,0));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  justify-items: center;
  gap: 8px;
  z-index: 20;
}
.dock-side {
  width: 56px;
  height: 56px;
  border: 0;
  background: transparent;
  border-radius: 16px;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  transition: background var(--t) var(--ease);
}
.dock-side:active { background: var(--paper-2); }
.dock-side svg { width: 26px; height: 26px; }
.dock-shutter {
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  background: var(--coral);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: var(--shadow), 0 0 0 4px #fff;
  transform: translateY(-10px);
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.dock-shutter:active { background: var(--terra-d); transform: translateY(-8px); }
.dock-shutter svg { width: 26px; height: 26px; }
.dock-shutter span {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.btn {
  border: 0;
  border-radius: 16px;
  min-height: 54px;
  padding: 0 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: background var(--t) var(--ease), transform var(--t) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-ghost {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-olive {
  background: var(--olive);
  color: #fff;
}
.btn-olive:active { background: var(--olive-d); }
.btn-olive:disabled { opacity: 0.45; }
.btn-terra { background: var(--terra); color: #fff; }
.btn-wide { width: 100%; }

.screen { display: none; }
.screen.on { display: block; }

.sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + var(--safe-t)) 16px 8px;
}
.sheet-head h2 {
  font-size: 20px;
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.03em;
  flex: 1;
}
.back {
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 18px;
  transition: background var(--t) var(--ease);
}
.back:active { background: var(--paper-2); }

/* Capture — full-bleed */
.capture-screen.on {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 30;
  max-width: 480px;
  margin: 0 auto;
  background: #11140f;
}
.capture-screen .cam-box {
  margin: 0;
  border-radius: 0;
  aspect-ratio: auto;
  height: 100%;
  min-height: 100dvh;
  background: #11140f;
}
.cam-box {
  margin: 8px 16px;
  background: #141812;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 3/4;
  position: relative;
}
.cam-box video, .cam-box img, .cam-box canvas {
  width: 100%; height: 100%; object-fit: cover;
}
.cam-back {
  position: absolute;
  top: calc(10px + var(--safe-t));
  left: 12px;
  z-index: 2;
  background: rgba(26,34,24,.45);
  border-color: transparent;
  color: #f3ede3;
  backdrop-filter: blur(8px);
}
.cam-hint {
  position: absolute;
  left: 16px; right: 16px;
  top: calc(64px + var(--safe-t));
  color: #f3ede3;
  font-size: 12px;
  font-weight: 500;
  background: rgba(26,34,24,.42);
  padding: 6px 10px;
  border-radius: 999px;
  text-align: center;
  pointer-events: none;
}
.capture-screen .cam-actions {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px 24px calc(22px + var(--safe-b));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 8px;
  background: linear-gradient(to top, rgba(10,12,8,.55), transparent);
}
.shutter-slot {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
}
.shutter-slot > * { grid-area: 1 / 1; }
.shutter {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--olive);
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px rgba(66,133,244,.28), var(--shadow);
  padding: 0;
  min-height: 0;
  transition: transform var(--t) var(--ease);
}
.shutter:active { transform: scale(0.94); }
.cam-link {
  border: 0;
  background: transparent;
  color: #f3ede3;
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
  padding: 0 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
  justify-self: start;
}
.cam-link-ghost { visibility: hidden; text-decoration: none; }

.photo-rec {
  margin: 4px 16px 12px;
  border-radius: 22px;
  overflow: hidden;
  background: var(--paper-2);
  max-height: 280px;
}
.photo-rec img { width: 100%; height: 260px; object-fit: cover; }

.honest {
  margin: 0 16px 10px;
  font-size: 12px;
  color: var(--ink-3);
  background: transparent;
  border-radius: 0;
  padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-result {
  margin: 0 16px 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 4px 0 2px;
  box-shadow: none;
}
.hero-result .lead {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  margin: 0 0 6px;
  color: var(--ink-3);
}
.hero-result .lead b { color: var(--olive-d); }
.hero-result .lead b.hot { color: var(--terra-d); }
.hero-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: baseline;
  font-size: 15px;
  color: var(--ink-2);
}
.hero-nums .hn {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.hero-nums .hn b {
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
}
.hero-nums .hn.hot b { color: var(--terra); }
.hero-nums .hot { color: var(--terra-d); }
.warn {
  margin: 0 16px 12px;
  background: var(--terra-s);
  color: var(--terra-ink);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
}
.warn b { display: block; margin-bottom: 4px; }

.search {
  margin: 0 16px 10px;
  display: flex;
  gap: 8px;
}
.search input {
  flex: 1;
  min-height: 48px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 0 14px;
  font-size: 16px;
}
.search button {
  min-width: 48px;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  font-weight: 650;
}

.cats {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 16px 10px;
  scrollbar-width: none;
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 40px;
  font-size: 14px;
  font-weight: 600;
}
.cat.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 16px 8px;
}
.chip {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 42px;
  font-size: 14px;
  max-width: 100%;
}
.chip.on { background: var(--olive); color: #fff; border-color: var(--olive); }
.chip.trap { border-color: var(--coral); }
.chip.trap.on { background: var(--terra-d); border-color: var(--terra-d); }
.chip small { opacity: .75; margin-left: 4px; }

.picks { padding: 4px 16px 0; display: flex; flex-direction: column; gap: 8px; }
.pick {
  background: var(--card);
  border: 0;
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 14px;
}
.pick .row1 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}
.pick .nm { font-weight: 650; letter-spacing: -0.02em; }
.pick .src { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.pick .vals { font-size: 13px; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.slide {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.slide input[type=range] {
  flex: 1;
  accent-color: var(--olive);
  height: 32px;
}
.step {
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 22px;
  line-height: 1;
}
.grams {
  min-width: 58px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--ink-2);
  margin-left: 4px;
}
.badge.f { background: var(--yellow-s); color: var(--yellow-ink); }
.badge.t { background: var(--terra-s); color: var(--terra-ink); }

.off-box { padding: 0 16px 8px; }
.off-item {
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 6px;
}
.off-item b { display: block; }
.off-item span { font-size: 13px; color: var(--ink-2); }

.field { margin: 0 0 12px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.field input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 14px;
  padding: 0 14px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.about {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 18px;
}
.about p { margin: 0 0 10px; }
.gap-10 { height: 10px; }

.hidden-file { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }

.toast {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(96px + var(--safe-b));
  max-width: 448px;
  margin: 0 auto;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 40;
  display: none;
}
.toast.on { display: block; }

@media (min-width: 720px) {
  body { background: #E8EAED; }
  .app {
    margin: 16px auto;
    min-height: calc(100dvh - 32px);
    background: var(--paper);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(26,34,24,.12);
    overflow: hidden;
  }
  .dock { border-radius: 0 0 24px 24px; }
  .capture-screen.on {
    top: 16px; bottom: 16px;
    height: auto;
    border-radius: 24px;
    overflow: hidden;
  }
}

.save-dock {
  position: sticky;
  bottom: 0;
  z-index: 12;
  margin-top: 16px;
  padding: 12px 16px calc(16px + var(--safe-b));
  background: linear-gradient(to top, var(--paper) 70%, rgba(248,249,250,0));
}
.save-dock[hidden] { display: none; }

.meals-row {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}
.meals-row b { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.dots { display: flex; gap: 6px; margin-top: 6px; }
.dots i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--paper-2);
  display: block;
}
.dots i.on { background: var(--olive); }
.dots i.over { background: var(--terra); }
.flare-pill {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 11px;
  min-height: 44px;
  font-size: 12px;
  font-weight: 650;
  flex-shrink: 0;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.flare-pill.on {
  background: var(--terra-s);
  border-color: var(--terra);
  color: var(--terra-ink);
}

.cap-line {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
}
.cap-line b { color: var(--olive-d); }
.cap-line b.hot { color: var(--terra-d); }

.warn.strong { background: var(--coral); color: #fff; }
.warn.zero { background: var(--olive-s); color: var(--olive-d); }

.chip.ok { border-color: var(--lime); }
.chip.limit { border-color: var(--mint); }
.chip.avoid { border-color: var(--coral); }
.badge.ok { background: var(--olive-s); color: var(--olive-d); }
.badge.lim { background: var(--yellow-s); color: var(--yellow-ink); }
.badge.no { background: var(--terra-s); color: var(--terra-ink); }

.switch {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 16px;
  font-size: 15px;
  color: var(--ink-2);
}
.switch input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: var(--olive); }

.food-more {
  margin: 16px 0 8px;
}
.food-more summary {
  margin: 0 16px;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.food-more summary::-webkit-details-marker { display: none; }
.food-more summary::after {
  content: "+";
  margin-left: 8px;
  color: var(--ink-3);
  font-size: 18px;
}
.food-more[open] summary::after { content: "–"; }
.food-more summary:active { color: var(--ink); }

.ai-wait {
  margin: 0 16px 12px;
  background: var(--olive-s);
  color: var(--olive-d);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 650;
  text-align: center;
}
.ai-wait[hidden] { display: none; }
.badge.est { background: var(--olive-s); color: var(--olive-d); }

.ai-hits {
  margin: 0 16px 12px;
  background: var(--olive-s);
  color: var(--olive-d);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.ai-hits.fail {
  background: var(--terra-s);
  color: var(--terra-ink);
}
.ai-hits[hidden] { display: none; }

.slices {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.slice-lab { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.slice-lab b { color: var(--olive-d); }
.slice-row { margin-top: 0; }
.slice-step {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  padding: 0;
}
.slice-step:active { background: var(--paper-2); }
.slice-row .grams { min-width: 40px; }
.slice-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.slice-btn {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-weight: 650;
  font-size: 14px;
}
.slice-btn.on { background: var(--olive); color: #fff; border-color: var(--olive); }

.drink-box {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.drink-lab { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.drink-lab b { color: var(--olive-d); }
.drink-row { margin-top: 0; }
.drink-note {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 8px;
  line-height: 1.35;
}

.ai-bg {
  margin: 0 16px 12px;
  background: var(--paper-2);
  color: var(--ink-2);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}
.ai-bg[hidden] { display: none; }
.ai-bg-chip {
  display: inline;
  border: 1px dashed var(--olive);
  background: var(--card);
  color: var(--olive-d);
  border-radius: 999px;
  padding: 4px 11px;
  margin: 0 2px;
  min-height: 32px;
  font-size: 14px;
  font-weight: 650;
}

.glass-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  margin: 8px 0 4px;
}
.glass-btn {
  flex: 1 1 64px;
  min-width: 58px;
  max-width: 88px;
  min-height: 72px;
  padding: 6px 4px 4px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  color: var(--ink);
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}
.glass-btn.on {
  background: var(--olive-s);
  border-color: var(--olive);
  color: var(--olive-d);
}
.glass-btn.glass-more {
  flex: 0 0 40px;
  min-width: 40px;
  max-width: 40px;
  font-size: 22px;
  font-weight: 650;
  justify-content: center;
}
.glass-draw {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1px;
  height: 36px;
  width: 100%;
  overflow: hidden;
}
.glass-ico {
  width: 14px;
  height: 22px;
  display: block;
  flex: 0 0 auto;
}
.glass-ico.shot { height: 20px; }
.glass-btn.on .glass-ico { color: var(--olive-d); }
.glass-n {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.estimate-screen.on { padding-bottom: 8px; }

.pick .nm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pick .name-edit {
  display: block;
  flex: 1 1 140px;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: inherit;
  padding: 0 0 3px;
  border-bottom: 1px dashed var(--line);
  border-radius: 0;
}
.pick .name-edit:focus {
  outline: none;
  border-bottom-color: var(--olive);
}
.pick .name-edit::placeholder { color: var(--ink-3); font-weight: 500; }
.drink-lab.ask-vol { color: var(--terra-d); font-weight: 650; }
.drink-lab.ask-vol b { color: var(--terra-d); }
.vol-ask .slice-presets .slice-btn { border-color: var(--terra); font-weight: 700; }

/* Date + streak */
.date-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.streak-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--olive-s);
  color: var(--lime-d);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.streak-pill[hidden] { display: none; }

/* Week strip — Yazio/Lose It days */
.week {
  display: flex;
  gap: 4px;
  margin: 8px 0 4px;
  justify-content: space-between;
}
.week-day {
  flex: 1 1 0;
  min-width: 0;
  min-height: 56px;
  padding: 6px 0 8px;
  border: 0;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--ink);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.week-day:active { transform: scale(0.96); }
.week-day .wd {
  font-size: 10px;
  font-weight: 650;
  color: var(--ink-3);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  line-height: 1;
}
.week-day .wn {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.week-day .wdot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--paper-2);
  margin-top: 2px;
}
.week-day.ok .wdot { background: var(--lime); }
.week-day.over .wdot { background: var(--coral); }
.week-day.on {
  box-shadow: 0 0 0 2px var(--ink);
}
.week-day.on.ok { box-shadow: 0 0 0 2px var(--lime-d); }
.week-day.on.over { box-shadow: 0 0 0 2px var(--coral); }

/* Fat remaining ring */
.fat-ring-box {
  position: relative;
  width: 168px;
  height: 168px;
  margin: 4px auto 6px;
}
.fat-ring { width: 100%; height: 100%; display: block; }
.ring-track { stroke: var(--paper-2); }
.ring-arc {
  stroke: var(--lime);
  stroke-linecap: round;
  transition: stroke-dashoffset var(--t) var(--ease), stroke var(--t) var(--ease);
}
.ring-arc.warn, .ring-arc.full { stroke: var(--coral); }
.fat-ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  padding: 18px;
}
.meter.fat .fat-ring-num .k {
  font-size: 12px;
  margin-bottom: 2px;
  color: var(--ink-3);
}
.meter.fat .sub { text-align: center; }
.meter.fat .bar { max-width: 220px; margin-left: auto; margin-right: auto; }

.repeat-btn {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.repeat-btn:active { color: var(--ink); }
.repeat-btn[hidden] { display: none; }

.recent {
  margin: 8px 16px 4px;
}
.recent[hidden] { display: none; }
.recent-lab {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.recent-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.recent-chip {
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 999px;
  padding: 8px 12px;
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  max-width: 100%;
}
.recent-chip:active { background: var(--olive-s); }

.toast.ok { background: var(--lime); color: #fff; }
.toast.hot { background: var(--coral); color: #fff; }

.plate .meta .slot {
  display: inline-block;
  font-style: normal;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  margin-right: 4px;
}

.dock {
  background: linear-gradient(to top, var(--paper) 62%, rgba(248,249,250,0));
}
.save-dock {
  background: linear-gradient(to top, var(--paper) 70%, rgba(248,249,250,0));
}


/* v15 extras */
.meter.fat .fat-ring-num .big {
  font-size: 64px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.meter.fat .bar { background: var(--olive-s); }
.meter.fat .bar > i { background: var(--coral); }
.ring-track { stroke: var(--olive-s); }
.cap-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.remain-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--yellow-s);
  color: var(--yellow-ink);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.remain-chip.hot { background: var(--terra-s); color: var(--terra-ink); }
.oil-row {
  margin: 0 16px 12px;
  padding: 12px 14px;
  background: var(--card);
  box-shadow: var(--shadow);
  border-radius: 20px;
}
.oil-lab { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.oil-btns { display: flex; gap: 8px; }
.oil-btn {
  flex: 1;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
  font-weight: 650;
  font-size: 14px;
  color: var(--ink);
}
.oil-btn.on { background: var(--yellow-s); border-color: var(--mint); color: var(--yellow-ink); }
.slot-block { margin-bottom: 12px; }
.slot-h {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  margin: 0 0 6px;
}
.slot-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  border: 1.5px dashed var(--line);
  border-radius: 20px;
  background: var(--card);
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 650;
}
.slot-empty[data-capture]:active { background: var(--olive-s); color: var(--olive-d); }
.slot-empty.idle { pointer-events: none; }

/* v16 — Google Stitch visual transfer */
.meters,
.meters3 {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 16px 16px 18px;
  gap: 16px;
}
.fat-ring-box {
  width: 176px;
  height: 176px;
}
.meter.fat .fat-ring-num .big {
  font-size: 68px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}
.ring-track {
  stroke: var(--olive-s);
  stroke-width: 13;
}
.ring-arc {
  stroke: var(--olive);
  stroke-width: 13;
}
.ring-arc.warn { stroke: var(--mint); }
.ring-arc.full { stroke: var(--coral); }
.bar > i { background: var(--lime); }
.bar.warn > i { background: var(--mint); }
.bar.full > i { background: var(--coral); }
.meter.fat .bar { background: var(--olive-s); }
.meter.fat .bar > i { background: var(--olive); }
.meter.fat .bar.warn > i { background: var(--mint); }
.meter.fat .bar.full > i { background: var(--coral); }
.slim-stack .meter .big { color: var(--lime); }
.slim-stack .meter:has(.bar.warn) .big,
.slim-stack .meter:has(.bar.full) .big { color: var(--terra); }
.week {
  gap: 2px;
  margin: 6px 0 12px;
}
.week-day {
  background: transparent;
  box-shadow: none;
  border-radius: 999px;
  min-height: 52px;
  padding: 6px 0;
}
.week-day .wd { color: var(--ink-3); }
.week-day.ok .wdot { background: var(--lime); }
.week-day.over .wdot { background: var(--coral); }
.week-day.on {
  background: var(--mint);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.week-day.on .wd { color: var(--ink-2); }
.week-day.on.ok,
.week-day.on.over { box-shadow: var(--shadow); }
.remain-chip {
  background: var(--yellow-s);
  color: var(--yellow-ink);
}
.remain-chip.hot { background: var(--terra-s); color: var(--terra-ink); }
.oil-row { border-radius: 24px; }
.oil-btn { border-radius: 999px; background: var(--card); }
.oil-btn.on {
  background: var(--yellow-s);
  border-color: var(--mint);
  color: var(--yellow-ink);
}
.dock-shutter {
  width: 72px;
  height: 72px;
  background: var(--coral);
  box-shadow: var(--shadow), 0 0 0 4px #fff;
}
.dock-shutter:active { background: var(--terra-d); }
.shutter {
  width: 72px;
  height: 72px;
  background: var(--olive);
  border: 4px solid #fff;
  box-shadow: 0 0 0 3px rgba(66,133,244,.28), var(--shadow);
}
.btn { border-radius: 20px; }
.btn-olive {
  background: var(--olive);
  color: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.btn-olive:active { background: var(--olive-d); }
.save-dock .btn-olive { min-height: 56px; font-size: 17px; }
.repeat-btn { color: var(--olive); }
.streak-pill { background: var(--lime-s); color: var(--lime-d); }
.dots i.on { background: var(--lime); }
.plate, .pick, .empty { border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.photo-rec { border-radius: 24px; box-shadow: var(--shadow); background: var(--card); }
.hero-result .lead b { color: var(--olive-d); }
.cap-line b { color: var(--olive-d); }
.badge.ok { background: var(--lime-s); color: var(--lime-d); }
.badge.est { background: var(--lime-s); color: var(--lime-d); }
.warn.zero { background: var(--lime-s); color: var(--lime-d); }
.ai-wait, .ai-hits { background: var(--olive-s); color: var(--olive-d); }
.glass-btn.on { background: var(--olive-s); border-color: var(--olive); color: var(--olive-d); }
.chip.on { color: #fff; }
.plate .pcts .hot { color: var(--terra); }
@media (max-width: 390px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .top { padding-left: 16px; padding-right: 16px; }
  .meter.fat .fat-ring-num .big { font-size: 64px; }
  .fat-ring-box { width: 168px; height: 168px; }
}
