/* Stack, in the style of Apple Health: grouped cards on a system background, big rounded numbers,
   one colour per kind of compound, light and dark like the phone. */
:root {
  color-scheme: light dark;
  --bg: #f2f2f7; --card: #fff; --fill: #e9e9ee; --fill2: #f2f2f7; --sep: rgba(60, 60, 67, .18);
  --text: #000; --muted: rgba(60, 60, 67, .62); --faint: rgba(60, 60, 67, .4);
  --tint: #007aff; --ok: #34c759; --warn: #ff9500; --bad: #ff3b30;
  --red: #ff3b30; --orange: #ff9500; --yellow: #ffcc00; --green: #34c759; --mint: #00c7be; --teal: #30b0c7; --cyan: #32ade6;
  --blue: #007aff; --indigo: #5856d6; --purple: #af52de; --pink: #ff2d55; --brown: #a2845e; --gray: #8e8e93;
  --radius: 14px; --pad: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  --rounded: ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  --glass: rgba(249, 249, 249, .78);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000; --card: #1c1c1e; --fill: #2c2c2e; --fill2: #1c1c1e; --sep: rgba(84, 84, 88, .6);
    --text: #fff; --muted: rgba(235, 235, 245, .6); --faint: rgba(235, 235, 245, .3);
    --tint: #0a84ff; --ok: #30d158; --warn: #ff9f0a; --bad: #ff453a;
    --red: #ff453a; --orange: #ff9f0a; --yellow: #ffd60a; --green: #30d158; --mint: #63e6e2; --teal: #40c8e0; --cyan: #64d2ff;
    --blue: #0a84ff; --indigo: #5e5ce6; --purple: #bf5af2; --pink: #ff375f; --brown: #ac8e68; --gray: #98989d;
    --glass: rgba(30, 30, 30, .72);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }   /* the nav, sheet and toast set display themselves */
html, body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.3 var(--font); -webkit-text-size-adjust: 100%; }
body { padding: env(safe-area-inset-top) 0 calc(96px + env(safe-area-inset-bottom)); }
main { max-width: 680px; margin: 0 auto; padding: 8px var(--pad) 28px; }
a { color: var(--tint); text-decoration: none; }
p { margin: 6px 0; }
button { font: inherit; cursor: pointer; }
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -.125em; flex: none; }

/* ---- titles ---- */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 10px 0 2px; }
h1 { font-size: 34px; line-height: 41px; letter-spacing: .3px; font-weight: 700; margin: 0; }
.date { color: var(--muted); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; margin: 14px 0 0; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: .35px; margin: 26px 0 10px; display: flex; align-items: baseline; justify-content: space-between; }
h2 small { font-size: 15px; font-weight: 400; color: var(--muted); }
.caps { font-size: 13px; text-transform: uppercase; letter-spacing: .2px; color: var(--muted); margin: 22px 16px 7px; font-weight: 400; }
h3 { font-size: 17px; margin: 0; font-weight: 600; }
h4 { font-size: 15px; margin: 14px 0 6px; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .center { text-align: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fill); color: var(--muted); display: grid; place-items: center; font-size: 20px; margin-bottom: 4px; }
.back { display: inline-flex; align-items: center; gap: 2px; font-size: 17px; color: var(--tint); background: none; border: 0; padding: 8px 0 0; margin-left: -6px; }
.back .ic { font-size: 22px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; border-radius: 999px; padding: 4px 10px; background: var(--fill); color: var(--muted); }
.pill.ok { color: var(--ok); } .pill.warn { color: var(--warn); }

/* ---- cards and tiles ---- */
.card { background: var(--card); border-radius: var(--radius); padding: 14px 16px; }
.card + .card { margin-top: 10px; }
.value { font-family: var(--rounded); font-size: 28px; font-weight: 700; line-height: 1.05; letter-spacing: .2px; font-variant-numeric: tabular-nums; }
.value small { font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.label { font-size: 13px; color: var(--muted); margin-top: 3px; }
.c-red { --c: var(--red); } .c-orange { --c: var(--orange); } .c-yellow { --c: var(--yellow); } .c-green { --c: var(--green); } .c-mint { --c: var(--mint); }
.c-teal { --c: var(--teal); } .c-cyan { --c: var(--cyan); } .c-blue { --c: var(--blue); } .c-indigo { --c: var(--indigo); } .c-purple { --c: var(--purple); }
.c-pink { --c: var(--pink); } .c-brown { --c: var(--brown); } .c-gray { --c: var(--gray); }
.badge { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--c, var(--gray)); font-size: 17px; flex: none; }
.badge.round { border-radius: 50%; }

/* ---- his stacks (and sets taken together lately): one tap to log them ---- */
.row.set { gap: 10px; }
.row.set .t { font-weight: 600; }
.row.set .names { font-size: 16px; line-height: 1.25; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row.set .names.s { font-size: 13px; }
.row.set .s.done { color: var(--ok); }
.row.set .act { color: var(--muted); }
.row.set .go { flex: none; border: 0; background: var(--tint); color: #fff; font-size: 15px; font-weight: 600; border-radius: 999px; padding: 6px 14px; }
.row.hint { color: var(--muted); font-size: 15px; line-height: 1.35; }
.link { border: 0; background: none; color: var(--tint); font-size: 15px; font-weight: 400; padding: 0; }
.link.under { display: block; margin: 10px 16px 0; }
.btn.danger { color: var(--bad); }

/* ---- the Summary: widgets that open the day's places ---- */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .grid2 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.widgets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.widgets.pair { margin-top: 22px; }
.widget { position: relative; display: flex; flex-direction: column; min-height: 118px; min-width: 0; background: var(--card); border-radius: var(--radius); padding: 12px 14px 14px; }
.widget .cover { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.widget .cover:active { background: color-mix(in srgb, var(--text) 8%, transparent); }
.w-head { display: flex; align-items: center; gap: 7px; min-height: 30px; font-size: 15px; font-weight: 600; color: var(--c, var(--tint)); min-width: 0; }
.w-head span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-act { position: relative; z-index: 1; flex: none; width: 30px; height: 30px; margin: -4px -6px -4px 0; border: 0; border-radius: 50%; background: var(--fill); color: var(--c, var(--tint)); display: grid; place-items: center; font-size: 17px; }
.w-val { font-size: 26px; margin: 8px 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-sub { font-size: 13px; line-height: 1.3; color: var(--muted); text-wrap: balance; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meter { height: 5px; border-radius: 3px; background: var(--fill); overflow: hidden; margin-top: auto; }
.widget .meter { margin-top: 10px; }
.meter > i { display: block; height: 100%; border-radius: 3px; background: var(--c, var(--tint)); }
.label.met { color: var(--c, var(--tint)); }
.dot.ring { width: 12px; height: 3px; border-radius: 2px; }   /* a dotted line in the legend: an active metabolite */

/* ---- grouped inset lists ---- */
.group { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; min-height: 48px; color: inherit; position: relative; background: var(--card); width: 100%; border: 0; text-align: left; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 58px; right: 0; border-top: .5px solid var(--sep); }
.row.plain + .row.plain::before { left: 16px; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .s { font-size: 13px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .chev { color: var(--faint); font-size: 18px; }
.row .end { color: var(--muted); font-size: 15px; white-space: nowrap; }
.actions { display: flex; gap: 2px; }
.act { width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; color: var(--tint); display: grid; place-items: center; font-size: 19px; }
.act.del { color: var(--bad); }
.act:active, .row:active { background: var(--fill); }

/* ---- alerts ---- */
.alert { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: var(--radius); padding: 12px 14px; font-size: 15px; line-height: 1.35; }
.alert + .alert { margin-top: 8px; }
.alert > .ic { font-size: 20px; color: var(--warn); margin-top: 1px; }
.alert.bad > .ic { color: var(--bad); }
.alert.info > .ic { color: var(--tint); }
.alert b { font-weight: 600; }

/* ---- controls ---- */
.seg { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; border-radius: 7px; padding: 6px 4px; font-size: 13px; font-weight: 600; color: var(--text); }
.seg button.on { background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
@media (prefers-color-scheme: dark) { .seg button.on { background: #636366; } }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 0; background: var(--card); color: var(--text); border-radius: 999px; padding: 9px 14px; font-size: 15px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chip .ic { color: var(--c, var(--tint)); }
.chip.on { background: var(--tint); color: #fff; }
.chip.on .ic { color: #fff; }
.btn { border: 0; border-radius: 12px; padding: 14px 18px; font-weight: 600; font-size: 17px; background: var(--tint); color: #fff; width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.ghost { background: var(--card); color: var(--tint); }
.btn.small { width: auto; padding: 8px 14px; font-size: 15px; border-radius: 999px; }
.btn:disabled { opacity: .5; }
.twobtn { display: flex; gap: 10px; margin-top: 12px; }
.search { display: flex; align-items: center; gap: 6px; background: var(--fill); border-radius: 10px; padding: 0 10px; color: var(--muted); margin: 10px 0 4px; }
.search input { border: 0; background: none; padding: 9px 0; font-size: 17px; flex: 1; color: var(--text); outline: none; }
input, select, textarea { font: inherit; font-size: 17px; color: var(--text); background: none; border: 0; outline: none; min-width: 0; }
.field { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-height: 46px; position: relative; }
.field + .field::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.field > span { color: var(--text); width: 88px; flex: none; }
.field input, .field select { flex: 1; text-align: right; padding: 12px 0; }
.field input.left { text-align: left; }
.field select { direction: rtl; }
.field select option { direction: ltr; }

/* ---- charts ---- */
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chart text { fill: var(--muted); font: 10px var(--font); }
.chart .grid { stroke: var(--sep); stroke-width: 1; }
.chart .now { stroke: var(--muted); stroke-dasharray: 3 3; }
.chart .ref { stroke: var(--faint); stroke-dasharray: 2 4; }
.chartbox { position: relative; }
.heart-strip { height: 90px; }
.graph-pair > .label { margin: 8px 0 2px; font-weight: 600; }
.chart-cursor { position: absolute; width: 0; border-left: 1.5px solid var(--text); opacity: .55; pointer-events: none; }
.chart-tip { position: absolute; top: 0; background: var(--card); border-radius: 10px; padding: 8px 10px; font-size: 13px; pointer-events: none;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18); min-width: 140px; z-index: 2; }
.chart-tip b { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.chart-tip div { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.chart-tip div span:last-child { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; padding-left: 10px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.note { font-size: 12px; color: var(--faint); margin-top: 8px; }
.bars { width: 100%; height: auto; display: block; }
.bars text { fill: var(--muted); font: 10px var(--font); }

/* ---- hero on a compound page ---- */
.hero { display: flex; align-items: center; gap: 8px; color: var(--c); font-weight: 600; font-size: 15px; margin: 10px 0 2px; }
.hero-value { margin: 6px 0 2px; }
.hero-value .value { font-size: 40px; }

/* ---- compound page sections (written by the pages session) ---- */
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 15px; margin: 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.src { font-size: 12px; color: var(--muted); margin-top: 8px; }
details.sec { background: var(--card); border-radius: var(--radius); padding: 0 16px; }
details.sec + details.sec { margin-top: 10px; }
details.sec summary { font-weight: 600; padding: 14px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
details.sec summary::after { content: "›"; color: var(--faint); transform: rotate(90deg); transition: transform .2s; }
details.sec[open] summary::after { transform: rotate(-90deg); }
details.sec[open] { padding-bottom: 14px; }
details.sec ul, details.sec ol { padding-left: 20px; margin: 6px 0; }
details.sec li { margin: 4px 0; font-size: 15px; }
details.sec p { font-size: 15px; line-height: 1.45; }
details.sec h4 { font-size: 15px; font-weight: 600; margin: 18px 0 4px; }
.fps { margin-top: 10px; } .fp { margin: 10px 0; font-size: 14px; }
.bar { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; border-radius: 3px; }
.refs { font-size: 13px; }

/* ---- empty states ---- */
.empty { text-align: center; color: var(--muted); padding: 34px 12px; font-size: 15px; }
.empty .ic { font-size: 40px; color: var(--faint); display: block; margin: 0 auto 10px; }

/* ---- tab bar (floating, like iOS 26) and the add button ---- */
nav { position: fixed; left: 0; right: 0; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 0 16px; z-index: 5; pointer-events: none; }
nav .tabbar { display: flex; flex: 1; max-width: 420px; height: 62px; margin: 0; background: var(--glass); backdrop-filter: blur(22px) saturate(1.8); -webkit-backdrop-filter: blur(22px) saturate(1.8);
  border-radius: 31px; padding: 4px; pointer-events: auto; box-shadow: 0 6px 24px rgba(0, 0, 0, .14), 0 0 0 .5px var(--sep); overflow: visible; }
nav .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text); font-size: 10px; font-weight: 600; border-radius: 27px; }
nav .tabbar a .ic { font-size: 23px; }
nav .tabbar a.on { color: var(--tint); background: var(--fill); }
#logBtn { width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--glass); backdrop-filter: blur(22px) saturate(1.8); -webkit-backdrop-filter: blur(22px) saturate(1.8);
  color: var(--tint); font-size: 28px; pointer-events: auto; display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0, 0, 0, .14), 0 0 0 .5px var(--sep); }

/* ---- sheets (Add Data style) and toast ---- */
#sheet { position: fixed; inset: 0; z-index: 10; background: rgba(0, 0, 0, .4); display: flex; align-items: flex-end; }
#sheet > div { width: 100%; max-width: 680px; margin: 0 auto; max-height: 94vh; overflow: auto; background: var(--bg); border-radius: 14px 14px 0 0;
  padding: 0 var(--pad) calc(22px + env(safe-area-inset-bottom)); animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: .5; } to { transform: none; opacity: 1; } }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; position: sticky; top: 0; background: var(--bg); z-index: 1; }
.sheet-bar h3 { font-size: 17px; }
.sheet-bar button { border: 0; background: none; color: var(--tint); font-size: 17px; padding: 4px 0; min-width: 64px; }
.sheet-bar button.strong { font-weight: 600; text-align: right; }
.sheet-bar button:first-child { text-align: left; }
.suggest { background: var(--card); border-radius: 0 0 var(--radius) var(--radius); margin-top: -2px; }
.suggest button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-top: .5px solid var(--sep); color: var(--text); font-size: 16px; padding: 11px 16px; }
.suggest button.on { font-weight: 600; }
.suggest .tick { margin-left: auto; color: var(--tint); font-size: 18px; }
.suggest .grow { flex: 1; min-width: 0; }
.suggest .one { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 1px; }
/* the picked compounds in the log sheet: one row each, with its own amount, unit and route */
.dose { padding: 10px 8px 10px 16px; position: relative; }
.dose + .dose::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.dose.hint { color: var(--muted); font-size: 15px; padding: 14px 16px; }
.dose-head { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.dose-head .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dose-head .badge { width: 26px; height: 26px; font-size: 15px; }
.dose-head .act { color: var(--muted); font-size: 17px; }
.dose-in { display: flex; align-items: center; gap: 8px; margin: 8px 8px 0 36px; }
.dose-in input, .dose-in select { background: var(--fill); border-radius: 8px; padding: 7px 10px; }
.dose-in input[type=number] { width: 0; flex: 1.2; text-align: right; }
.dose-in input.unit { width: 0; flex: .8; }
.dose-in select { width: 0; flex: 1.4; }
/* Menus look tappable on iPhone too: Safari drops the native arrow once a select is styled. */
.dose-in select, .field select, .slot select { -webkit-appearance: none; appearance: none; background-repeat: no-repeat; background-size: 10px 6px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238e8e93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.dose-in select { background-position: right 10px center; padding-right: 26px; }
.field select { background-position: right 0 center; padding-right: 18px; }
#toast { position: fixed; left: 16px; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); max-width: 600px; margin: 0 auto;
  background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 14px; padding: 12px 14px; z-index: 20; font-size: 15px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .2), 0 0 0 .5px var(--sep); }

/* compact interaction rows on the Summary: tap to open */
details.ix > summary { list-style: none; cursor: pointer; }
details.ix > summary::-webkit-details-marker { display: none; }
details.ix > summary > .ic:first-child { font-size: 20px; color: var(--warn); }
details.ix.bad > summary > .ic:first-child { color: var(--bad); }
details.ix.info > summary > .ic:first-child { color: var(--tint); }
details.ix[open] > summary .chev { transform: rotate(90deg); }
details.ix + details.ix > summary::before { content: ""; position: absolute; top: 0; left: 50px; right: 0; border-top: .5px solid var(--sep); }
details.ix > summary .s { text-transform: capitalize; }
.ix-body { margin: 0; padding: 0 16px 14px 50px; font-size: 15px; line-height: 1.4; color: var(--text); }

/* Wearable numbers and ranges stay neutral in both themes. */
.grid2.body-night { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.body-tile { border: 0; text-align: left; min-height: 110px; gap: 5px; }
.body-tile.on { box-shadow: inset 0 0 0 1.5px var(--tint); }
.body-tile .value { font-size: 21px; white-space: normal; overflow: visible; }
.body-tile .label { margin: 0; font-size: 12px; }
.body-picks { margin-top: 8px; }
.body-comparison { color: var(--muted); }
.body-sleep { display: flex; height: 16px; border-radius: 5px; overflow: hidden; background: var(--fill); margin-top: 10px; }
.body-sleep i { height: 100%; }
.body-chart { margin-top: 12px; }
.body-tip { max-width: 100%; }
.body-tip div { white-space: normal; overflow-wrap: anywhere; }

/* ---- Train: a block, a workout, and the plan editor ---- */
.mdot { width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--gray)); flex: none; display: inline-block; }
.tr-sub { color: var(--muted); font-size: 15px; margin-top: 2px; }
.tr-hero { background: var(--card); border-radius: var(--radius); padding: 14px 16px 16px; margin-top: 12px; }
.tr-hero .big { font-family: var(--rounded); font-size: 28px; font-weight: 700; line-height: 1.1; margin-top: 2px; }
.tr-next { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 12px 12px 14px; background: var(--fill); border-radius: 12px; }
.tr-next .grow { flex: 1; min-width: 0; }
.tr-next .t { font-weight: 600; }
.tr-next .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tr-week { display: flex; gap: 6px; margin-top: 12px; }
.tr-week button { flex: 1; min-width: 0; min-height: 46px; border: 0; border-radius: 10px; background: var(--fill); color: var(--muted); padding: 7px 2px; font-size: 11px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tr-week button .ic { font-size: 16px; }
.tr-week button.done { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.tr-week button.now { box-shadow: inset 0 0 0 1.5px var(--tint); color: var(--tint); }
.tr-week button.skip { opacity: .5; }

.ex { background: var(--card); border-radius: var(--radius); padding: 12px 12px 10px; margin-top: 12px; position: relative; transition: transform .15s; }
.ex.lift { transition: none; z-index: 2; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.ex-head { display: flex; align-items: center; gap: 8px; }
.ex-head .name { flex: 1; min-width: 0; font-weight: 600; }
.ex-head .act { margin-right: -6px; color: var(--muted); }
.ex-head .grip { width: 36px; height: 36px; margin-right: -4px; }
.ex-aim { font-size: 13px; color: var(--muted); margin: 0 0 8px 18px; }
.ex-note { font-size: 13px; margin: -4px 0 8px 18px; }
.srow { display: grid; grid-template-columns: 38px 1fr 1fr 1fr 40px; gap: 6px; align-items: center; margin-top: 6px; }
.srow.h { font-size: 11px; color: var(--muted); text-transform: uppercase; text-align: center; margin-top: 0; }
.srow .n { height: 36px; border: 0; border-radius: 8px; background: var(--fill); font-weight: 600; color: var(--text); }
.srow .n.tag { color: var(--tint); font-size: 13px; }
.srow .prev { font-size: 13px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.srow input { width: 100%; height: 36px; border-radius: 8px; background: var(--fill); text-align: center; font-variant-numeric: tabular-nums; padding: 0 4px; }
.srow input::placeholder { color: var(--faint); }
.srow .ok { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fill); color: var(--faint); display: grid; place-items: center; justify-self: center; font-size: 18px; }
.srow .ok.on { background: var(--ok); color: #fff; }
.srow.done input { background: color-mix(in srgb, var(--ok) 18%, transparent); }
.rest { position: sticky; top: 8px; z-index: 3; display: flex; align-items: center; gap: 6px; margin: 8px auto 0; border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 600;
  font-variant-numeric: tabular-nums; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); color: var(--tint); box-shadow: 0 4px 16px rgba(0, 0, 0, .14), 0 0 0 .5px var(--sep); }

.day-head { display: flex; align-items: center; gap: 8px; margin: 22px 4px 7px; }
.day-head .dname { flex: 1; font-weight: 600; font-size: 17px; }
.day-head .wk { font-size: 15px; color: var(--muted); }
.field > span.mus { width: 112px; display: flex; align-items: center; gap: 8px; }
.field > span.mus::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--gray)); flex: none; }
.stepper { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.stepper b { min-width: 84px; text-align: center; font-weight: 600; }
.stepper .act { background: var(--fill); font-size: 22px; line-height: 1; }
.seg.tall button { white-space: normal; line-height: 1.15; padding: 8px 3px; }
.row .s.wrap { white-space: normal; }
.tr-table { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.tr-table th { font-size: 11px; color: var(--muted); font-weight: 600; text-align: center; padding: 0 4px 6px; }
.tr-table td { padding: 5px 4px; text-align: center; border-top: .5px solid var(--sep); }
.tr-table td:first-child { text-align: left; font-weight: 600; color: var(--c); white-space: nowrap; padding-right: 8px; }

/* a slot of the plan: muscle on top, exercise below, so long names fit */
.slot { display: flex; align-items: center; gap: 8px; padding: 9px 8px 9px 16px; position: relative; }
.slot + .slot::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.slot .meta { flex: 1; min-width: 0; }
.slot small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.slot small::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--gray)); }
.slot select { width: 100%; font-size: 16px; font-weight: 500; padding: 3px 18px 3px 0; background-position: right 0 center; text-overflow: ellipsis; }
.link.find { display: block; margin: -2px 0 8px 18px; font-size: 14px; }
.tr-result { margin: 14px 4px 4px; font-size: 17px; font-weight: 600; line-height: 1.35; }
.ex-up { font-size: 13px; font-weight: 600; color: var(--ok); margin: -4px 0 8px 18px; }

/* Train: top-bar buttons, add set, timer, drag-to-reorder */
.top .acts { display: flex; gap: 2px; margin-right: -6px; }
.top .acts .act { color: var(--muted); }
.addset { width: 100%; margin-top: 8px; border: 0; border-radius: 10px; background: var(--fill); color: var(--tint); min-height: 38px; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.addset:active { opacity: .6; }
.rest.go { color: var(--ok); }
.timer-big { font-size: 72px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -1px; margin: 18px 0 14px; }
.timer-big.go { color: var(--ok); }
.timer-actions { display: flex; flex-direction: column; gap: 8px; }
.stepper input { flex: none; width: 56px; text-align: center; background: var(--fill); border-radius: 8px; padding: 8px 0; }
.note.center { text-align: center; padding: 14px 0; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.ro { overflow: visible; }
.ro-row { display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 16px; min-height: 52px; background: var(--card); position: relative; transition: transform .15s; }
.ro-row + .ro-row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--sep); }
.ro-row .grow { flex: 1; min-width: 0; }
.ro-row .t { font-size: 16px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-row .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.ro-row.lift { transition: none; z-index: 2; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); border-radius: 10px; }
.grip { width: 48px; height: 44px; border: 0; background: none; color: var(--faint); display: grid; place-items: center; font-size: 20px; touch-action: none; cursor: grab; border-radius: 10px; }
.grip:focus-visible { outline: 2px solid var(--tint); }
.field input[type=checkbox] { flex: none; width: 22px; height: 22px; padding: 0; accent-color: var(--tint); }

/* Train: Material tonal surfaces and touch controls */
.tr-train, .tr-sheet {
  --tr-low: color-mix(in srgb, var(--tint) 4%, var(--bg));
  --tr-surface: color-mix(in srgb, var(--tint) 6%, var(--card));
  --tr-high: color-mix(in srgb, var(--tint) 10%, var(--card));
  --tr-primary: color-mix(in srgb, var(--tint) 75%, var(--text));
  --tr-on-primary: var(--card);
  --tr-primary-container: color-mix(in srgb, var(--tint) 19%, var(--card));
  --tr-secondary-container: color-mix(in srgb, var(--tint) 10%, var(--fill));
  --tr-error: color-mix(in srgb, var(--bad) 75%, var(--text));
  --tr-error-container: color-mix(in srgb, var(--bad) 12%, var(--card));
  --tr-ease: cubic-bezier(.2, 0, 0, 1);
  font-family: "Google Sans", Roboto, system-ui, sans-serif;
  color: var(--text); font-size: 14px;
}
.tr-train { min-height: calc(100dvh - 96px); padding-bottom: 96px; background: var(--tr-low); }
.tr-train::before { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--tr-low); }
.tr-train button, .tr-sheet button { position: relative; min-height: 48px; font-family: inherit; isolation: isolate; }
.tr-train button::after, .tr-sheet button::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; pointer-events: none; transition: opacity 220ms var(--tr-ease); }
.tr-train button:active::after, .tr-sheet button:active::after { opacity: .12; }
.tr-train button:focus-visible, .tr-sheet button:focus-visible { outline: 2px solid var(--tr-primary); outline-offset: 2px; }
.tr-train button:disabled, .tr-sheet button:disabled { opacity: .35; cursor: default; }
.tr-train .back { padding-top: 0; margin: 0; font-size: 14px; }
.tr-train .tr-header { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.tr-train .tr-title { flex: 1; min-width: 0; text-align: center; }
.tr-train .tr-title h1 { font-size: 22px; line-height: 28px; letter-spacing: 0; font-weight: 500; overflow-wrap: anywhere; }
.tr-train .tr-clock { color: var(--muted); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }
.tr-train .tr-sub { text-align: center; font-size: 12px; margin: 8px 0 16px; }
.tr-train .act, .tr-sheet .act { flex: none; width: 48px; height: 48px; min-width: 48px; padding: 0; border: 0; border-radius: 16px; display: inline-grid; place-items: center; background: var(--tr-secondary-container); color: var(--tr-primary); font-size: 22px; }
.tr-train .tr-header .act { border-radius: 50%; background: transparent; color: var(--text); }
.tr-train .tr-tabs { display: flex; background: var(--tr-secondary-container); border-radius: 28px; padding: 4px; margin-bottom: 20px; }
.tr-train .tr-tabs button { flex: 1; border: 0; border-radius: 24px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; }
.tr-train .tr-tabs button.on { background: var(--tr-primary-container); color: var(--tr-primary); }
.tr-train .ex { background: var(--tr-surface); border-radius: 24px; padding: 8px; margin-top: 12px; transition: transform 240ms var(--tr-ease), background 240ms var(--tr-ease); }
.tr-train .ex.open { background: var(--tr-high); }
.tr-train .ex.lift { transition: none; }
.tr-train .ex-head { gap: 0; }
.tr-train .ex-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 8px; min-height: 64px; background: transparent; color: var(--text); border: 0; border-radius: 16px; text-align: left; }
.tr-train .ex-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.tr-train .ex-lead { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--tr-secondary-container); color: var(--tr-primary); font-size: 20px; }
.tr-train .ex-lead.done { background: color-mix(in srgb, var(--ok) 22%, transparent); color: var(--ok); }
.tr-train .ex-toggle .name { font-size: 16px; line-height: 24px; font-weight: 500; overflow-wrap: anywhere; }
.tr-train .ex-toggle .label { font-size: 12px; line-height: 16px; margin-top: 2px; }
.tr-train .ex-head .act { margin: 0; background: transparent; color: var(--muted); }
.tr-train .ex-head .grip { flex: none; width: 48px; height: 48px; margin: 0; color: var(--muted); border-radius: 16px; }
.tr-train .ex-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 240ms var(--tr-ease), opacity 240ms var(--tr-ease); opacity: 0; }
.tr-train .ex.open .ex-body { grid-template-rows: 1fr; opacity: 1; }
.tr-train .ex-inner { min-height: 0; overflow: hidden; }
.tr-train .ex-aim, .tr-train .ex-note, .tr-train .ex-up { margin: 4px 8px 8px; line-height: 20px; }
.tr-train .link.find { margin: 0 8px 8px; padding: 8px; }
.tr-train .tr-ss { position: relative; margin-top: 12px; padding: 0 8px 8px; border: 2px dashed color-mix(in srgb, var(--tr-primary) 60%, transparent); border-radius: 28px; transition: transform 240ms var(--tr-ease); }
.tr-train .tr-ss.lift { transition: none; z-index: 2; background: var(--tr-low); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.tr-train .tr-ss .ex { margin-top: 8px; }
.tr-train .tr-ss-head + .ex { margin-top: 0; }
.tr-train .tr-ss-head { display: flex; align-items: center; gap: 8px; min-height: 48px; padding-inline-start: 8px; }
.tr-train .tr-ss-label { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--tr-primary); }
.tr-train .tr-ss-note { flex: 1; min-width: 0; font-size: 12px; line-height: 16px; color: var(--muted); }
.tr-train .tr-ss-head .grip { flex: none; width: 48px; height: 48px; margin: 0; color: var(--muted); border-radius: 16px; }
.tr-train .srow { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) 48px 48px; gap: 3px; padding: 8px 0; margin-top: 8px; background: var(--tr-surface); border-radius: 16px; }
.tr-train .srow.running { background: var(--tr-primary-container); }
.tr-train .srow .n { width: 48px; height: 48px; border-radius: 50%; background: var(--tr-secondary-container); color: var(--tr-primary); font-size: 14px; padding: 0; }
.tr-train .tr-set-field { min-width: 0; background: var(--tr-secondary-container); border-radius: 8px 8px 4px 4px; padding: 4px 3px 0; box-shadow: inset 0 -1px var(--muted); }
.tr-train .tr-set-field:focus-within { box-shadow: inset 0 -2px var(--tr-primary); }
.tr-train .tr-set-field > span { display: block; font-size: 10px; line-height: 14px; color: var(--muted); padding: 0 4px; }
.tr-train .srow input { display: block; min-width: 0; height: 34px; font-size: 16px; font-variant-numeric: tabular-nums; background: transparent; color: var(--text); border: 0; border-radius: 0; padding: 0 2px 3px; text-align: center; outline: none; }
.tr-train .srow .ok { width: 48px; height: 48px; border-radius: 50%; background: transparent; color: var(--tr-primary); font-size: 22px; padding: 0; }
.tr-train .srow .ok.on { background: var(--tr-primary-container); }
.tr-train .tr-row-x { width: 48px; height: 48px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; font-size: 18px; padding: 0; }
.tr-train .tr-row-detail { grid-column: 2 / -1; font-size: 11px; line-height: 16px; color: var(--muted); padding: 2px 5px 0 0; font-variant-numeric: tabular-nums; }
.tr-train .tr-set-actions { display: flex; gap: 8px; margin: 12px 0 4px; }
.tr-train .tr-set-actions .tr-delete { margin-left: auto; background: var(--tr-error-container); color: var(--tr-error); }
.tr-train .tr-play { display: block; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 12px solid currentColor; margin-left: 3px; }
.tr-train .tr-spinner { width: 22px; height: 22px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: tr-spin 1s linear infinite; }
@keyframes tr-spin { to { transform: rotate(360deg); } }
.tr-train .tr-bottom { position: fixed; z-index: 4; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); max-width: 440px; margin: auto; }
.tr-train .tr-primary, .tr-sheet .btn { min-height: 56px; border-radius: 28px; border: 0; background: var(--tr-primary); color: var(--tr-on-primary); font-size: 16px; font-weight: 600; box-shadow: 0 3px 12px color-mix(in srgb, var(--text) 12%, transparent); }
.tr-train .tr-primary { width: 100%; }
.tr-train .rest { position: static; min-height: 48px; box-shadow: none; background: var(--tr-secondary-container); color: var(--tr-primary); backdrop-filter: none; margin: 0 auto 12px; }
.tr-train .tr-ring { position: relative; width: min(260px, 80vw); aspect-ratio: 1; margin: 26px auto 28px; color: var(--muted); }
.tr-train .tr-ring.active { color: var(--tr-primary); }
.tr-train .tr-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 3; }
.tr-train .tr-ring .track { stroke: var(--tr-secondary-container); }
.tr-train .tr-ring .arc { stroke: currentColor; stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset 250ms linear; }
.tr-train .tr-ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.tr-train .tr-ring-label { font-size: 14px; font-weight: 500; }
.tr-train .tr-ring strong { font-size: 45px; line-height: 52px; font-weight: 400; letter-spacing: -1px; font-variant-numeric: tabular-nums; color: var(--text); }
.tr-train .tr-current { background: var(--tr-high); border-radius: 24px; padding: 20px; }
.tr-train .tr-current .label { color: var(--tr-primary); font-size: 12px; margin: 0; }
.tr-train .tr-current h2 { font-size: 22px; font-weight: 500; line-height: 28px; letter-spacing: 0; margin: 8px 0 12px; }
.tr-train .tr-current-values { font-size: 16px; font-variant-numeric: tabular-nums; }
#sheet > .tr-sheet { background: var(--tr-high); border-radius: 28px 28px 0 0; animation-timing-function: var(--tr-ease); }
.tr-sheet::before { content: ""; display: block; width: 32px; height: 4px; border-radius: 2px; background: var(--muted); opacity: .6; margin: 12px auto 2px; }
.tr-sheet .sheet-bar { background: var(--tr-high); gap: 6px; padding-top: 4px; }
.tr-sheet .sheet-bar h3 { font-size: 16px; font-weight: 500; text-align: center; }
.tr-sheet .sheet-bar button { font-size: 14px; color: var(--tr-primary); border-radius: 12px; }
.tr-sheet .group, .tr-sheet .card, .tr-sheet .ro-row { background: var(--tr-surface); border-radius: 16px; }
.tr-sheet .row::before, .tr-sheet .ro-row::before { border: 0; }
.tr-sheet .row { min-height: 56px; }
.tr-sheet .stepper { gap: 8px; }
.tr-sheet .stepper b { min-width: 48px; font-variant-numeric: tabular-nums; }
.tr-sheet .timer-big { font-size: 45px; font-weight: 400; }
.tr-train .tr-snackbar { position: fixed; z-index: 11; bottom: calc(152px + env(safe-area-inset-bottom)); left: 16px; right: 16px; max-width: 440px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 16px; border-radius: 16px; background: var(--text); color: var(--card); box-shadow: 0 4px 18px #0003; animation: up 220ms var(--tr-ease); }
.tr-train .tr-snackbar button { min-width: 64px; border: 0; border-radius: 12px; background: transparent; color: var(--card); font-size: 14px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .tr-train *, #sheet > .tr-sheet, .tr-sheet *, .tr-train *::after, .tr-sheet *::after { animation: none !important; transition: none !important; }
}

/* Food */
.macros { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.macros .value { font-size: 22px; }
.macros .value small { font-size: 13px; }
.meal-photo { display: block; width: 100%; max-height: 240px; object-fit: cover; border-radius: var(--radius); margin-top: 4px; }
.meal-photo.small { max-height: 96px; width: auto; max-width: 100%; }
.words { display: block; width: 100%; padding: 12px 16px; resize: none; line-height: 1.35; }
.words::placeholder { color: var(--muted); }
.meal-thumb { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; }
.meal-end { text-align: right; line-height: 1.25; }
.meal-end small { display: block; font-size: 12px; }

/* Food: week strip, calorie budget, add bar and the diary by hour */
.week { display: flex; align-items: center; gap: 2px; margin: 12px -6px 4px; }
.wk { flex: none; width: 26px; height: 44px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; font-size: 18px; padding: 0; }
.wk:disabled { opacity: .3; }
.day { flex: 1; min-width: 0; border: 0; background: none; padding: 0; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.day:disabled { opacity: .35; }
.day .dl { font-size: 12px; color: var(--muted); }
.day.today .dl { color: var(--tint); font-weight: 600; }
.ring { --c: var(--tint); --p: 0; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--fill) 0); }
.ring b { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }
.day.over .ring { --c: var(--warn); }
.day.plain .ring { --c: var(--gray); }
.day.on .ring b { background: var(--tint); color: #fff; font-weight: 700; }
.day-title { font-size: 22px; font-weight: 700; letter-spacing: .35px; margin: 14px 0 10px; }
.budget .b-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.budget .b-top .value { font-size: 40px; white-space: nowrap; }
.budget .b-top.solo { flex-direction: column; align-items: flex-start; gap: 6px; }   /* "1,045 kcal eaten" and "Set daily targets" do not fit side by side at 375 px */
.budget .b-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.budget .meter { height: 8px; margin-top: 0; }
.budget .macros { margin-top: 16px; }
.budget .macros .meter { height: 5px; margin-top: 8px; }
.addbar { display: flex; gap: 8px; margin: 12px 0; }
.addbar button { height: 44px; border: 0; border-radius: 12px; background: var(--card); color: var(--tint); display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; }
.addbar .find { flex: 1; min-width: 0; justify-content: flex-start; padding: 0 14px; color: var(--muted); }
.addbar .rnd { flex: none; width: 44px; font-size: 21px; padding: 0; }
.addbar button:active { background: var(--fill); }
.caps.hour { display: flex; justify-content: space-between; }
.d-row { padding-top: 9px; padding-bottom: 9px; }
.d-row .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.foot-link { text-align: center; margin: 22px 0 4px; }
.credit { font-size: 11px; }
.muted { color: var(--muted); font-size: 15px; }

/* Food: the add sheet (search, plate, amount, scan) */
.tools { display: flex; gap: 8px; margin: 8px 0 4px; }
.tools button { flex: 1; min-width: 0; border: 0; background: var(--card); color: var(--tint); border-radius: 12px; padding: 10px 2px 8px; font-size: 13px; font-weight: 600; white-space: nowrap; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.tools button:active { background: var(--fill); }
.frow { padding: 0; gap: 0; align-items: stretch; }
.frow .main { flex: 1; min-width: 0; border: 0; background: none; color: inherit; text-align: left; padding: 10px 8px 10px 16px; }
.frow .plus { flex: none; width: 52px; border: 0; background: none; color: var(--tint); display: grid; place-items: center; font-size: 22px; padding: 0; }
.frow .plus.x { color: var(--bad); }
.frow .plus:active, .frow .main:active { background: var(--fill); }
.plate-slot { position: sticky; bottom: 0; z-index: 1; background: var(--bg); }
.plate { padding-top: 10px; }
.plate .group { max-height: 30vh; overflow-y: auto; }
.plate-bar { display: flex; align-items: center; gap: 14px; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); }
.plate-bar .btn { flex: 1; min-width: 0; }
.plate-bar .link { flex: none; }
.food-name { font-size: 22px; font-weight: 700; letter-spacing: .35px; margin-top: 6px; }
.stack-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.scan-video { display: block; width: 100%; max-height: 300px; object-fit: cover; border-radius: var(--radius); background: #000; margin-top: 6px; }
