@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/manrope-cyrillic-ext.woff2") format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/manrope-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Momentum — one stylesheet for the whole site.
   v4: soft dashboard. A grey page holds one big rounded sheet; inside, white cards with
   generous radius, round icon buttons, pills, one coral accent, Manrope throughout. */

:root {
  --outer: #ECECEE;
  --sheet: #FAFAFA;
  --band: #F2F2F4;
  --card: #FFFFFF;
  --ink: #121214;
  --ink-2: #7C7C84;
  --ink-3: #B4B4BB;
  --line: #E6E6EA;
  --coral: #E2694A;
  --coral-deep: #C9532F;
  --coral-soft: #FBEDE8;
  --good: #2E9E5B;
  --bad: #D64545;
  --p1: rgba(18, 18, 20, 0.16); --p2: rgba(18, 18, 20, 0.32); --p3: rgba(18, 18, 20, 0.5); --p4: rgba(18, 18, 20, 0.72); --p5: #121214;
  --font: "Manrope", system-ui, -apple-system, sans-serif;
  --r-sheet: 40px; --r-card: 28px; --r-inner: 18px; --r-pill: 999px;
  --shadow: 0 1px 2px rgba(20, 20, 20, 0.04), 0 8px 24px rgba(20, 20, 20, 0.05);
  --cell: 13px; --gap: 5px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--outer); min-height: 100vh; -webkit-font-smoothing: antialiased; padding: 12px; }
a { color: var(--coral-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--coral); color: #fff; }
.num, .stat .val, .tile .v, .chart .c-val, .rate button .n, .date-circle { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- the sheet ---------- */

.wrap { max-width: none; margin: 0 auto; background: var(--sheet); border-radius: var(--r-sheet); padding: 20px 20px 110px; min-height: calc(100vh - 24px); box-shadow: var(--shadow); overflow: hidden; }
.text-col { max-width: 760px; }
.mono { font-size: 13px; font-weight: 500; color: var(--ink-2); }

/* ---------- header ---------- */

.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 4px 0 0; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; line-height: 1.15; letter-spacing: -0.01em; }
.brand::before { content: "M"; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 18px; flex-shrink: 0; }
.brand small { display: block; font-weight: 500; color: var(--ink-2); font-size: 15px; }
.tabs { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: var(--r-pill); color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.tabs a svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.here { background: var(--ink); color: #fff; }

@media (max-width: 640px) {
  body { padding: 8px; }
  .wrap { border-radius: 28px; padding: 16px 16px 120px; }
  .brand small { display: none; }
  .tabs { position: fixed; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 30; gap: 0; padding: 6px; box-shadow: 0 10px 30px rgba(20,20,20,0.16); }
  .tabs a { flex: 1; flex-direction: column; gap: 3px; padding: 8px 0 6px; font-size: 10px; }
  .tabs a svg { width: 20px; height: 20px; }
}

/* ---------- page heads ---------- */

.page-title { font-weight: 800; font-size: clamp(34px, 7vw, 48px); letter-spacing: -0.03em; line-height: 1; padding: 34px 0 6px; }
.page-sub { color: var(--ink-2); font-size: 16px; max-width: 48ch; margin: 6px 0 24px; }

.hero { display: flex; align-items: center; gap: 20px; padding: 30px 0 0; }
.date-circle { display: grid; place-items: center; width: 108px; height: 108px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); font-weight: 700; font-size: 40px; letter-spacing: -0.03em; flex-shrink: 0; }
.hero-day { font-weight: 800; font-size: clamp(34px, 7vw, 56px); letter-spacing: -0.03em; line-height: 1; }
.hero-sub { margin-top: 8px; font-size: 16px; color: var(--ink-2); }

/* ---------- icons (Lucide, inlined by icons.js) ---------- */
.lucide { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex-shrink: 0; }
.ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--band); color: var(--coral); flex-shrink: 0; }
.tile .ph-empty .lucide, .card .poster-empty .lucide { width: 36px; height: 36px; stroke-width: 1.5; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 26px; }
.stat { display: block; color: inherit; background: var(--card); border-radius: 24px; padding: 18px 20px 18px; box-shadow: var(--shadow); }
.stat .ico { margin-bottom: 16px; }
.stat.link:hover { text-decoration: none; }
.stat .val { font-weight: 800; font-size: 32px; letter-spacing: -0.03em; line-height: 1; }
.stat .label { color: var(--ink-2); font-size: 14px; margin-top: 6px; }

section { margin-top: 36px; }
.section-title, .sec-title { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.section-title .when { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.sec-sub { color: var(--ink-2); margin: -6px 0 16px; max-width: 52ch; }

/* ---------- rendered markdown ---------- */

.md h1 { display: none; }
.md h2 { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; margin: 22px 0 8px; }
.md h3 { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 18px 0 6px; }
.md p { margin: 8px 0; }
.md ul { list-style: none; margin: 8px 0; }
.md ul li { padding: 3px 0 3px 20px; position: relative; }
.md ul li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); }
.md li.task::before { display: none; }
.md li.task { padding-inline-start: 28px; }
.md li.task .box { position: absolute; left: 0; top: 0.28em; width: 18px; height: 18px; border: 1.5px solid var(--ink-3); border-radius: 50%; }
.md li.task.checked .box { background: var(--ink); border-color: var(--ink); }
.md li.task.checked .box::after { content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.md li.task.checked { color: var(--ink-2); }
.md ol { list-style: none; margin: 8px 0; counter-reset: step; }
.md ol li { counter-increment: step; position: relative; padding: 4px 0 4px 34px; }
.md ol li::before { content: counter(step); position: absolute; left: 0; top: 0.3em; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--band); font-size: 12px; font-weight: 700; }
.md blockquote { margin: 12px 0; padding: 12px 16px; background: var(--band); border-radius: var(--r-inner); }
.md table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.md th { font-size: 12px; font-weight: 700; color: var(--ink-2); text-align: start; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.md td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.md hr { border: none; border-top: 1px solid var(--line); margin: 20px 0; }
.md code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.85em; background: var(--band); border-radius: 6px; padding: 1px 6px; }
.md strong { font-weight: 700; }

/* ---------- log page ---------- */

.entry-card { background: var(--card); border-radius: var(--r-card); padding: 8px 24px 18px; box-shadow: var(--shadow); }
.empty-today { background: var(--card); border-radius: var(--r-card); padding: 22px 24px; color: var(--ink-2); box-shadow: var(--shadow); }
.empty-today code { background: var(--band); border-radius: 6px; padding: 1px 6px; }

.day-past, .recipe { background: var(--card); border-radius: var(--r-inner); margin-bottom: 8px; box-shadow: var(--shadow); }
.day-past summary, .recipe summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 20px; }
.day-past summary::-webkit-details-marker, .recipe summary::-webkit-details-marker { display: none; }
.day-past summary::after, .recipe summary::after { content: "+"; margin-inline-start: auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); font-weight: 500; font-size: 18px; line-height: 1; color: var(--ink); flex-shrink: 0; }
.day-past[open] summary::after, .recipe[open] summary::after { content: "–"; background: var(--ink); color: #fff; border-color: var(--ink); }
.day-past .d-date { font-weight: 600; }
.day-past .body, .recipe .body { padding: 0 20px 18px; }
.recipe .r-title { font-weight: 700; }
.recipe .r-flag { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--band); border-radius: var(--r-pill); padding: 3px 10px; }
.recipe .r-flag.cooked { color: var(--coral-deep); background: var(--coral-soft); }
.recipe .photo { display: block; width: 110px; height: 110px; object-fit: cover; border-radius: 16px; margin: 4px 0 12px; cursor: zoom-in; }
.recipes-intro { color: var(--ink-2); margin: -6px 0 14px; }

.lightbox { position: fixed; inset: 0; margin: auto; width: fit-content; height: fit-content; border: none; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; }
.lightbox::backdrop { background: rgba(18, 18, 20, 0.7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox img { display: block; max-width: 94vw; max-height: 94vh; border-radius: 24px; cursor: zoom-out; }

footer { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 14px; }
.load-error { margin-top: 48px; background: var(--card); border-radius: var(--r-card); padding: 22px 24px; box-shadow: var(--shadow); }
.load-error h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.load-error pre { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--band); border-radius: 12px; padding: 12px 16px; margin-top: 12px; overflow-x: auto; }
.load-error code { font-family: ui-monospace, Menlo, monospace; }

/* ---------- workouts: hero row (date circle · rating · greeting) ---------- */

.offline { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.today-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 26px 0 30px; }
.today-row .date-circle { width: 96px; height: 96px; font-size: 36px; }
.today-row .t-label { font-weight: 600; font-size: 17px; line-height: 1.25; color: var(--ink); white-space: pre-line; padding-inline-end: 18px; border-inline-end: 1px solid var(--line); margin-inline-end: 4px; }
.today-row .greet { margin-inline-start: auto; text-align: end; }
.today-row .t-q { font-weight: 700; font-size: clamp(26px, 3vw, 40px); letter-spacing: -0.03em; line-height: 1.1; }
.today-row .t-state { color: var(--ink-3); font-size: clamp(20px, 2.4vw, 34px); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin-top: 2px; }
.rate { display: flex; gap: 8px; }
.rate button { width: 56px; height: 56px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); display: grid; place-items: center; }
.rate button:hover { border-color: var(--ink); }
.rate button:active { transform: scale(0.94); }
.rate button .n { font-weight: 700; font-size: 18px; line-height: 1; }
.rate button .w, .rate button .sw { display: none; }
.rate button.on { background: var(--coral); border-color: var(--coral); color: #fff; }
.today-row .clear-btn { color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.today-row .clear-btn:hover { color: var(--ink); }
.clear-btn { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; padding: 0; }
.clear-btn:hover { color: var(--ink); }

/* ---------- the grey band that holds the cards ---------- */

.dash { background: var(--band); border-radius: var(--r-card); padding: 14px; margin: 0 -8px; }

/* ---------- tiles + ring ---------- */

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 12px 0 0; }
.tile { background: var(--card); border-radius: 24px; padding: 18px 20px; }
.tile .ico { margin-bottom: 14px; }
.tile .v { font-weight: 800; font-size: 30px; letter-spacing: -0.03em; line-height: 1; }
.tile .l { color: var(--ink-2); font-size: 13px; margin-top: 6px; }

.ring { background: var(--ink); color: #fff; border-radius: 50%; width: 100%; aspect-ratio: 1; display: grid; place-items: center; position: relative; margin: 12px auto 0; max-width: 200px; }
.ring svg { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); transform: rotate(-90deg); }
.ring .track { fill: none; stroke: rgba(255,255,255,0.14); stroke-width: 7; }
.ring .bar { fill: none; stroke: var(--coral); stroke-width: 7; stroke-linecap: round; }
.ring .r-txt { text-align: center; position: relative; }
.ring .r-val { font-weight: 800; font-size: 30px; letter-spacing: -0.03em; line-height: 1; }
.ring .r-lbl { font-size: 12px; color: rgba(255,255,255,0.65); margin-top: 4px; }

/* ---------- workouts: heatmap as dots ---------- */

.grid-card { background: var(--card); border-radius: var(--r-card); padding: 22px 22px 18px; position: relative; margin-top: 12px; }
.grid-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 16px; gap: 12px; }
.grid-title { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.grid-note { color: var(--ink-2); font-size: 13px; white-space: nowrap; background: var(--band); border-radius: var(--r-pill); padding: 6px 12px; }
.scroller { overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.heat { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; width: max-content; }
.months { grid-column: 2; display: grid; grid-auto-flow: column; grid-auto-columns: calc(var(--cell) + var(--gap)); height: 18px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.months span { white-space: nowrap; }
.days { grid-column: 1; grid-row: 2; display: grid; grid-template-rows: repeat(7, var(--cell)); row-gap: var(--gap); font-size: 11px; font-weight: 600; color: var(--ink-2); position: sticky; left: 0; z-index: 2; background: var(--card); padding-inline-end: 8px; margin-inline-end: -8px; }
.days span { line-height: var(--cell); }
.cells { grid-column: 2; grid-row: 2; display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, var(--cell)); grid-auto-columns: var(--cell); gap: var(--gap); }
.cell { width: var(--cell); height: var(--cell); border-radius: 50%; background: #E9E9EC; padding: 0; border: none; }
.cell:hover { transform: scale(1.35); position: relative; z-index: 1; }
.cell.r1 { background: var(--p1); } .cell.r2 { background: var(--p2); } .cell.r3 { background: var(--p3); } .cell.r4 { background: var(--p4); } .cell.r5 { background: var(--p5); }
.cell.today { box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--ink); }
.cell.future { background: transparent; border: 1px dashed var(--line); cursor: default; }
.cell.future:hover { transform: none; }
.legend { display: flex; align-items: center; gap: 5px; justify-content: flex-end; margin: 12px 0 0; color: var(--ink-2); font-size: 12px; font-weight: 500; }
.legend i { display: inline-block; width: var(--cell); height: var(--cell); border-radius: 50%; background: #E9E9EC; }
.legend i.r1 { background: var(--p1); } .legend i.r2 { background: var(--p2); } .legend i.r3 { background: var(--p3); } .legend i.r4 { background: var(--p4); } .legend i.r5 { background: var(--p5); }

.tooltip { position: absolute; pointer-events: none; z-index: 5; white-space: nowrap; background: var(--ink); color: #fff; border-radius: 12px; padding: 7px 12px; font-size: 13px; line-height: 1.4; opacity: 0; }
.tooltip .t-head { font-size: 11px; font-weight: 600; opacity: 0.65; }
.tooltip.show { opacity: 1; }

/* ---------- lists ---------- */

.recent, .b-recent { background: var(--card); border-radius: var(--r-card); padding: 20px 22px 12px; margin-top: 12px; }
.recent h2, .b-recent h2 { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; margin-bottom: 6px; }
.row { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: start; }
.row:last-child { border-bottom: 0; }
.row:hover .r-date { color: var(--coral-deep); }
.row .r-date { font-weight: 600; min-width: 9.5em; }
.row .meter { display: flex; gap: 4px; }
.row .meter i { width: 10px; height: 10px; border-radius: 50%; background: #E9E9EC; }
.row .meter i.on.r1 { background: var(--p1); } .row .meter i.on.r2 { background: var(--p2); } .row .meter i.on.r3 { background: var(--p3); } .row .meter i.on.r4 { background: var(--p4); } .row .meter i.on.r5 { background: var(--p5); }
.row .r-word { margin-inline-start: auto; font-size: 13px; color: var(--ink-2); background: var(--band); border-radius: var(--r-pill); padding: 4px 10px; }
.empty { border: 1.5px dashed var(--line); border-radius: var(--r-inner); padding: 18px 22px; color: var(--ink-2); margin-top: 8px; }

/* ---------- dialogs ---------- */

.day-dlg, .goals-dlg, .detail { border: none; border-radius: 32px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(18,18,20,0.25); }
.day-dlg::backdrop, .goals-dlg::backdrop, .detail::backdrop { background: rgba(18, 18, 20, 0.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.day-dlg, .goals-dlg { position: fixed; inset: 0; margin: auto; width: min(460px, 92vw); height: fit-content; padding: 26px 26px 24px; }
.day-dlg .d-when { display: block; font-size: 14px; font-weight: 600; color: var(--coral-deep); margin-bottom: 6px; }
.day-dlg .d-q, .goals-dlg .d-q { font-weight: 700; font-size: 26px; letter-spacing: -0.03em; line-height: 1.1; }
.day-dlg .rate { margin-top: 18px; justify-content: space-between; }
.day-dlg .rate button { width: 60px; height: 60px; }
.goals-dlg .d-hint { color: var(--ink-2); font-size: 14px; margin: 6px 0 16px; }
.d-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; }
.goals-dlg .d-foot { justify-content: flex-end; }
.close { font-size: 13px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 9px 16px; background: var(--card); }
.close:hover { border-color: var(--ink); }

/* ---------- body section ---------- */

.body-sec { margin-top: 12px; }
.goal-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 4px 0; font-size: 14px; }
.goal-line .g { font-weight: 700; color: var(--coral-deep); margin-inline-end: 4px; }
.goal-line .gv { color: var(--ink); background: var(--card); border-radius: var(--r-pill); padding: 5px 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.goal-line button { color: var(--ink-2); font-size: 14px; padding: 5px 4px; text-decoration: underline; text-underline-offset: 3px; }
.goal-line button:hover { color: var(--ink); }

.entry { background: var(--card); border-radius: var(--r-card); padding: 20px 22px 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 12px; align-items: end; margin-top: 12px; }
.entry label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.entry .fld { display: flex; align-items: center; gap: 8px; background: var(--band); border-radius: 16px; padding: 0 14px; }
.entry input { font: inherit; font-weight: 700; font-size: 22px; letter-spacing: -0.02em; color: var(--ink); width: 100%; min-width: 0; padding: 12px 0; border: none; background: transparent; font-variant-numeric: tabular-nums; }
.entry input::placeholder { color: var(--ink-3); }
.entry input:focus { outline: none; }
.entry .fld:focus-within { box-shadow: 0 0 0 1.5px var(--ink); }
.entry input[type=date] { font-size: 15px; font-weight: 600; background: var(--band); border-radius: 16px; padding: 12px 14px; }
.entry .unit { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.entry .date-l { grid-column: 1 / -1; }
.entry .entry-title { display: none; grid-column: 1 / -1; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; margin-bottom: 2px; }
.entry .saved { grid-column: 1 / -1; margin: 0; min-height: 0; }
.save { grid-column: 1 / -1; min-height: 50px; padding: 0 22px; border-radius: var(--r-pill); background: var(--coral); color: #fff; font-size: 15px; font-weight: 700; }
.save:hover { background: var(--coral-deep); }
.save:disabled { opacity: 0.5; cursor: default; }
.saved { color: var(--ink-2); font-size: 14px; margin: 8px 0 0; min-height: 1.5em; }
.goals-dlg .entry { padding: 0; background: none; margin: 0; }

.charts { display: grid; gap: 12px; margin-top: 12px; }
.chart { background: var(--card); border-radius: var(--r-card); padding: 20px 20px 10px; position: relative; }
.chart .c-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 8px; flex-wrap: wrap; }
.chart .c-label { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.chart .c-label .ico { width: 32px; height: 32px; }
.chart .c-label .ico svg { width: 16px; height: 16px; }
.chart .c-val { font-weight: 800; font-size: 28px; letter-spacing: -0.03em; margin-inline-start: auto; line-height: 1; }
.chart .c-val small { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-inline-start: 3px; letter-spacing: 0; }
.chart svg { display: block; width: 100%; height: auto; }
.chart svg text { font-family: var(--font); font-size: 10px; font-weight: 600; fill: var(--ink-2); }
.chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 4; }
.chart .line { fill: none; stroke: var(--coral); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .goal { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 4 5; }
.tooltip .t-avg { font-size: 12px; opacity: 0.75; margin-top: 2px; }
.chart .goal-t { fill: var(--ink-2); }
.chart .pt { fill: var(--coral); stroke: var(--card); stroke-width: 2; }
.chart .pt.hot { fill: var(--ink); r: 5; }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; opacity: 0; }
.chart .lbl { fill: var(--ink); font-weight: 700; font-size: 11px; }
.chart .hit { fill: transparent; cursor: crosshair; }

.b-recent table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.b-recent th { font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: end; padding: 8px 8px; border-bottom: 1px solid var(--line); }
.b-recent th:first-child, .b-recent td:first-child { text-align: start; padding-inline-start: 0; }
.b-recent td { padding: 11px 8px; border-bottom: 1px solid var(--line); text-align: end; }
.b-recent tr:last-child td { border-bottom: 0; }
.b-recent tr.pick { cursor: pointer; }
.b-recent tr.pick:hover td:first-child { color: var(--coral-deep); }
.b-recent .del { color: var(--ink-3); font-size: 13px; width: 28px; height: 28px; border-radius: 50%; }
.b-recent .del:hover { color: var(--bad); background: var(--band); }

/* ---------- recipes + movies ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.grid .tile, .card { text-align: start; color: inherit; background: var(--card); border-radius: var(--r-card); padding: 10px 10px 16px; cursor: pointer; box-shadow: var(--shadow); }
.grid .tile > .ico { display: none; }
.tile .ph, .card .poster { width: 100%; object-fit: cover; display: block; border-radius: var(--r-inner); }
.tile .ph { aspect-ratio: 1; }
.card .poster { aspect-ratio: 2 / 3; }
.tile .ph-empty, .card .poster-empty { width: 100%; display: grid; place-items: center; background: var(--band); border-radius: var(--r-inner); color: var(--ink-3); font-size: 34px; }
.tile .ph-empty { aspect-ratio: 1; }
.card .poster-empty { aspect-ratio: 2 / 3; }
.tile .t-info, .card .c-info { padding: 12px 8px 0; }
.tile .t-name, .card .c-name { font-weight: 700; font-size: 15px; line-height: 1.3; display: block; letter-spacing: -0.01em; }
.tile .t-badge { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--band); border-radius: var(--r-pill); padding: 3px 10px; }
.tile .t-badge.cooked { color: var(--coral-deep); background: var(--coral-soft); }
.card .c-stars { display: block; margin-top: 6px; font-size: 13px; letter-spacing: 2px; color: var(--coral); }
.card .c-date { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-2); }
.c-stars .off, .d-stars .off { color: var(--line); }
.c-stars .half, .d-stars .half { background: linear-gradient(90deg, var(--coral) 50%, var(--line) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.detail { position: fixed; inset: 0; margin: auto; width: min(680px, 94vw); height: fit-content; max-height: 92vh; overflow-y: auto; padding: 24px 28px 30px; }
.detail .close { position: sticky; top: 0; float: right; }
.detail .big-photo { width: 100%; border-radius: var(--r-inner); margin: 6px 0 16px; display: block; }
.detail .md h1 { display: block; font-weight: 800; font-size: 30px; letter-spacing: -0.03em; line-height: 1.1; margin: 4px 0 14px; }
.detail .d-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 16px; }
.detail .d-poster { width: 120px; border-radius: 16px; flex-shrink: 0; }
.detail .d-title { font-weight: 800; font-size: 28px; letter-spacing: -0.03em; line-height: 1.1; }
.detail .d-date { font-size: 13px; font-weight: 600; color: var(--ink-2); display: block; margin-top: 10px; }
.detail .d-stars { font-size: 18px; letter-spacing: 3px; color: var(--coral); margin-top: 10px; }
.detail .d-stars .num { font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: 0; margin-inline-start: 8px; }
.detail p { margin: 10px 0; }
.detail .why { color: var(--ink-2); }

.queue { background: var(--card); border-radius: var(--r-card); padding: 18px 22px 14px; margin-bottom: 20px; box-shadow: var(--shadow); }
.queue .q-label { color: var(--coral-deep); display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.queue ul { list-style: none; }
.queue li { padding: 4px 0 4px 20px; position: relative; }
.queue li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--coral); }
.queue li .q-note { color: var(--ink-2); }

/* ---------- 404 ---------- */

.nf { min-height: calc(100vh - 24px); display: grid; place-items: center; text-align: center; padding: 24px; background: var(--sheet); border-radius: var(--r-sheet); }
.nf h1 { font-weight: 800; font-size: clamp(48px, 10vw, 96px); letter-spacing: -0.04em; line-height: 1; margin-bottom: 12px; }
.nf p { color: var(--ink-2); margin-bottom: 20px; }
.nf a { display: inline-block; background: var(--ink); color: #fff; border-radius: var(--r-pill); padding: 12px 22px; font-weight: 600; }


/* ---------- responsive ---------- */

@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 16px 16px; border-radius: 20px; }
  .stat .ico { width: 34px; height: 34px; margin-bottom: 12px; }
  .stat .ico svg { width: 17px; height: 17px; }
  .stat .val { font-size: 28px; }
  .hero { gap: 16px; padding-top: 24px; }
  .date-circle { width: 84px; height: 84px; font-size: 32px; }
  .page-title { padding-top: 24px; }
  .today-row { gap: 14px; padding: 22px 0 22px; }
  .today-row .date-circle { width: 72px; height: 72px; font-size: 28px; }
  .today-row .t-label { font-size: 15px; }
  .today-row .greet { margin-inline-start: 0; text-align: start; flex-basis: 100%; order: -1; }
  .rate { flex-basis: 100%; justify-content: space-between; }
  .rate button { width: 52px; height: 52px; }
  .grid-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .row .r-date { min-width: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dash { margin: 0 -8px; padding: 10px; border-radius: 24px; }
}
@media (min-width: 641px) {
  .wrap { padding: 24px 28px 90px; }
  .tiles { grid-template-columns: repeat(4, 1fr); }
  .charts { grid-template-columns: repeat(3, 1fr); }
  .dash { margin: 0; padding: 14px; }
}
@media (min-width: 1024px) {
  body { padding: 16px; }
  .wrap { padding: 26px 36px 60px; min-height: calc(100vh - 32px); }
  .page-title { padding-top: 28px; }
  .dash-page .page-title, .dash-page .page-sub { display: none; }

  .seg { margin-top: 26px; }
  .dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; align-items: stretch; padding: 14px; margin-top: 12px; }
  .dash > * { min-width: 0; margin: 0; }
  .dash .sec-title, .dash .sec-sub { display: none; }
  /* working out */
  .dash-train .session { grid-column: span 7; order: 1; align-self: start; }
  .dash-train .tiles { grid-column: span 5; order: 2; grid-template-columns: 1fr 1fr; align-content: start; }
  .dash-train .plan-card { grid-column: 1 / -1; order: 3; }
  .dash-train .grid-card { grid-column: 1 / -1; order: 4; }
  .dash-train .recent { grid-column: 1 / -1; order: 5; }
  /* macro tracking */
  .dash-macros .entry { grid-column: span 5; order: 1; align-content: start; }
  .dash-macros .entry .entry-title { display: block; }
  .dash-macros .ring-wrap { grid-column: span 2; order: 2; display: grid; place-items: center; }
  .dash-macros .ring { margin: 0; max-width: 100%; }
  .dash-macros .b-recent { grid-column: span 5; order: 3; }
  .dash-macros .food { grid-column: 1 / -1; order: 4; }
  .dash-macros .food-body { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .dash-macros .goal-line { grid-column: 1 / -1; order: 5; margin: 4px 6px -2px; }
  .dash-macros .charts { grid-column: 1 / -1; order: 6; }

  .cols { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px; align-items: start; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ---------- login + installed app ---------- */

.login-wrap { display: grid; place-items: center; }
.login { width: min(400px, 100%); background: var(--card); border-radius: var(--r-card); padding: 28px 26px 22px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.login .brand { margin-bottom: 6px; }
.login label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.login .fld { display: flex; align-items: center; background: var(--band); border-radius: 16px; padding: 0 14px; }
.login .fld:focus-within { box-shadow: 0 0 0 1.5px var(--ink); }
.login input { font: inherit; font-weight: 600; font-size: 18px; color: var(--ink); width: 100%; padding: 13px 0; border: none; background: transparent; }
.login input:focus { outline: none; }
.login .saved { margin: -6px 0 0; }
.login .hint { color: var(--ink-2); font-size: 13px; margin: 0; }

@media (display-mode: standalone) {
  body { padding-top: calc(env(safe-area-inset-top) + 8px); }
  .tabs { bottom: calc(10px + env(safe-area-inset-bottom)); }
}

.login .brand small { display: block; }

/* ---------- body fat goal bar (phones) ---------- */

.goal-bar { display: none; background: var(--card); border-radius: 24px; padding: 16px 18px 14px; margin: 14px 0 0; box-shadow: var(--shadow); }
.goal-bar .gb-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.goal-bar .gb-label { font-weight: 700; font-size: 15px; }
.goal-bar .gb-val { font-weight: 800; font-size: 22px; letter-spacing: -0.03em; color: var(--coral-deep); font-variant-numeric: tabular-nums; }
.goal-bar .gb-track { height: 14px; border-radius: var(--r-pill); background: var(--band); overflow: hidden; }
.goal-bar .gb-fill { height: 100%; width: 0; min-width: 14px; border-radius: var(--r-pill); background: var(--coral); }
.goal-bar .gb-foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
@media (max-width: 640px) {
  .goal-bar { display: block; }
  .ring-wrap { display: none; }
  .today-row { padding-top: 18px; }
}

/* ---------- food: calories + protein ---------- */

.food { background: var(--card); border-radius: var(--r-card); padding: 20px 22px 18px; margin-top: 12px; }
.food-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.food-title { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.food-edit { color: var(--ink-2); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.food-edit:hover { color: var(--ink); }
.food-body { display: grid; gap: 18px 28px; }
.macro { margin-bottom: 14px; }
.macro .m-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.macro .m-val { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.macro .m-val b { font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.macro .m-track { height: 14px; border-radius: var(--r-pill); background: var(--band); overflow: hidden; }
.macro .m-fill { height: 100%; width: 0; border-radius: var(--r-pill); background: var(--coral); }
.macro .m-fill.over { background: var(--bad); }
.macro .m-fill.hit { background: var(--good); }
.macro .m-foot { margin-top: 6px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.food-add { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 6px; }
.food-add svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linejoin: round; }
.meals { list-style: none; }
.meal { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.meal:last-child { border-bottom: 0; }
.meal-at { color: var(--ink-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.meal-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meal-name em { font-style: normal; font-weight: 500; color: var(--ink-3); font-size: 12px; }
.meal-kcal, .meal-p { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.meal-p { background: var(--band); border-radius: var(--r-pill); padding: 3px 9px; font-size: 12px; font-weight: 600; }
.meal .del { color: var(--ink-3); font-size: 13px; width: 28px; height: 28px; border-radius: 50%; }
.meal .del:hover { color: var(--bad); background: var(--band); }
.meal-empty { color: var(--ink-2); font-size: 14px; padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.week { margin-top: 14px; }
.wk-title { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.wk-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; }
.wk-day { display: grid; justify-items: center; gap: 5px; }
.wk-bar { width: 100%; height: 56px; border-radius: 8px; background: var(--band); display: flex; align-items: flex-end; overflow: hidden; }
.wk-bar i { display: block; width: 100%; border-radius: 8px; background: var(--coral); }
.wk-bar i.over { background: var(--bad); }
.wk-day.none .wk-bar { background: repeating-linear-gradient(135deg, var(--band) 0 4px, transparent 4px 8px); }
.wk-p { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.wk-p.hit { background: var(--good); }
.wk-l { font-size: 11px; font-weight: 600; color: var(--ink-2); }

/* meal dialog */
.meal-dlg { position: fixed; inset: 0; margin: auto; width: min(480px, 92vw); height: fit-content; max-height: 92vh; overflow-y: auto; padding: 26px 26px 24px; border: none; border-radius: 32px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(18,18,20,0.25); }
.meal-dlg::backdrop { background: rgba(18, 18, 20, 0.45); }
.meal-dlg .d-q { font-weight: 700; font-size: 26px; letter-spacing: -0.03em; line-height: 1.1; }
.meal-dlg .d-hint { color: var(--ink-2); font-size: 14px; margin: 6px 0 16px; }
.meal-dlg .d-when { display: block; font-size: 13px; font-weight: 600; color: var(--coral-deep); margin-bottom: 6px; }
.photo-pick { display: grid; place-items: center; min-height: 160px; border-radius: var(--r-inner); background: var(--band); border: 1.5px dashed var(--ink-3); cursor: pointer; overflow: hidden; position: relative; }
.photo-pick:hover { border-color: var(--ink); }
.photo-pick span { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink-2); }
.photo-pick svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linejoin: round; }
.meal-preview { width: 100%; max-height: 300px; object-fit: cover; display: block; }
.meal-note { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.meal-note textarea { font: inherit; font-size: 15px; font-weight: 500; color: var(--ink); background: var(--band); border: none; border-radius: 16px; padding: 12px 14px; resize: vertical; }
.meal-note textarea:focus { outline: none; box-shadow: 0 0 0 1.5px var(--ink); }
.est-items { list-style: none; margin: 12px 0 14px; }
.est-items li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.est-items li em { font-style: normal; color: var(--ink-3); }
.est-items li span:last-child { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.est-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.est-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.est-grid .fld { background: var(--band); border-radius: 14px; padding: 0 10px; }
.est-grid input { font: inherit; font-weight: 700; font-size: 18px; color: var(--ink); width: 100%; padding: 10px 0; border: none; background: transparent; font-variant-numeric: tabular-nums; }
.est-grid input:focus { outline: none; }
.est-grid .fld:focus-within { box-shadow: 0 0 0 1.5px var(--ink); }
.coach { margin-top: 14px; padding: 12px 14px; background: var(--coral-soft); border-radius: 16px; font-size: 14px; color: var(--coral-deep); font-weight: 500; }

@media (min-width: 641px) { .food-body { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .est-grid { grid-template-columns: repeat(2, 1fr); } .meal { grid-template-columns: auto minmax(0, 1fr) auto auto; } .meal-kcal { grid-column: 3; } .meal .del { grid-column: 4; } .meal-p { display: none; } }

/* carbs + fat, side by side */
.macro-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.macro.small .m-val b { font-size: 18px; }
.macro.small .m-track { height: 10px; }
.targets-dlg .entry { grid-template-columns: 1fr 1fr; }

/* ---------- workouts: two sections (Working out · Macro tracking) ---------- */

.seg { display: inline-flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; margin: 4px 0 6px; }
.seg button { padding: 9px 18px; border-radius: var(--r-pill); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--ink); color: #fff; }
.seg button:hover:not(.on) { color: var(--ink); }
.panel[hidden] { display: none; }
.dash-macros { margin-top: 14px; }
.row .r-ex { font-size: 13px; color: var(--ink-2); margin-inline-start: auto; }
.row .r-ex + .r-word { margin-inline-start: 0; }

/* session card: what he did today */
.session { background: var(--card); border-radius: var(--r-card); padding: 20px 22px 16px; margin-top: 12px; }
.ses-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.ses-title { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.ses-sub { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.ses-date input { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--band); border: none; border-radius: var(--r-pill); padding: 8px 12px; }
.ses-date input:focus { outline: none; box-shadow: 0 0 0 1.5px var(--ink); }
.ex-list { list-style: none; }
.ex { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ex:last-child { border-bottom: 0; }
.ex-img { width: 52px; height: 52px; object-fit: cover; border-radius: 14px; background: var(--band); display: block; }
.ex-main { text-align: start; min-width: 0; padding: 0; display: grid; gap: 2px; }
.ex-main b { font-weight: 700; font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-main span { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-main:hover b { color: var(--coral-deep); }
.ex-kg { display: flex; align-items: center; gap: 4px; background: var(--band); border-radius: var(--r-pill); padding: 0 10px 0 6px; font-size: 12px; color: var(--ink-2); font-weight: 600; }
.ex-kg input { font: inherit; font-weight: 700; font-size: 15px; color: var(--ink); width: 46px; text-align: end; padding: 8px 0; border: none; background: transparent; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.ex-kg input::-webkit-outer-spin-button, .ex-kg input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ex-kg input:focus { outline: none; }
.ex-kg:focus-within { box-shadow: 0 0 0 1.5px var(--ink); }
.ex-check { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; padding: 0; }
.ex-check .lucide { width: 18px; height: 18px; }
.ex-check:hover { border-color: var(--ink); }
.ex.done .ex-check { background: var(--coral); border-color: var(--coral); color: #fff; }
.ex.done .ex-main b { color: var(--ink-2); }
.ex.done .ex-img { opacity: 0.55; }
.ex-empty { color: var(--ink-2); font-size: 14px; padding: 10px 0 12px; }
.ses-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.ses-count { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.pill-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 9px 16px 9px 12px; background: var(--card); margin-inline-start: auto; }
.pill-btn:hover { border-color: var(--ink); }
.pill-btn .lucide { width: 16px; height: 16px; }

/* the plan: Mon · Wed · Fri */
.plan-card { background: var(--card); border-radius: var(--r-card); padding: 22px 22px 18px; margin-top: 12px; }
.plan-cols { display: grid; gap: 18px; }
.pc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.pc-day { font-weight: 700; font-size: 15px; }
.pc-name { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--band); border-radius: var(--r-pill); padding: 3px 10px; }
.pc.now .pc-day { color: var(--coral-deep); }
.pc.now .pc-name { color: var(--coral-deep); background: var(--coral-soft); }
.pc-ex { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; text-align: start; padding: 6px 0; }
.pc-ex img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; background: var(--band); display: block; }
.pc-ex b { display: block; font-weight: 600; font-size: 14px; line-height: 1.25; }
.pc-ex small { display: block; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pc-ex:hover b { color: var(--coral-deep); }
@media (min-width: 641px) { .plan-cols { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; } .pc-head { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 8px; } }
@media (min-width: 1200px) {
  .plan-cols { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  /* Share the heading and five exercise rows so wrapped text stays aligned. */
  .plan-cols > .pc { display: grid; grid-row: span 6; grid-template-rows: subgrid; row-gap: 0; }
}

/* exercise detail + picker dialogs */
.ex-dlg, .pick-dlg { position: fixed; inset: 0; margin: auto; width: min(560px, 92vw); height: fit-content; max-height: 92vh; overflow-y: auto; padding: 26px 26px 24px; border: none; border-radius: 32px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(18,18,20,0.25); }
.ex-dlg::backdrop, .pick-dlg::backdrop { background: rgba(18, 18, 20, 0.45); }
.ex-dlg .d-q, .pick-dlg .d-q { font-weight: 700; font-size: 26px; letter-spacing: -0.03em; line-height: 1.1; padding-inline-end: 44px; }
.ex-dlg .d-when { display: block; font-size: 13px; font-weight: 600; color: var(--coral-deep); margin-bottom: 6px; text-transform: capitalize; }
.x { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; padding: 0; }
.x .lucide { width: 16px; height: 16px; }
.ex-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 14px; }
.ex-pics img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-inner); background: var(--band); display: block; }
.ex-edit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ex-edit[hidden] { display: none; }
.ex-edit label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.ex-edit .fld { display: flex; align-items: center; gap: 6px; background: var(--band); border-radius: 14px; padding: 0 12px; }
.ex-edit input { font: inherit; font-weight: 700; font-size: 18px; color: var(--ink); width: 100%; min-width: 0; padding: 10px 0; border: none; background: transparent; font-variant-numeric: tabular-nums; }
.ex-edit input:focus { outline: none; }
.ex-edit .fld:focus-within { box-shadow: 0 0 0 1.5px var(--ink); }
.ex-edit .unit { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.ex-steps { list-style: none; margin: 16px 0 0; counter-reset: step; }
.ex-steps li { counter-increment: step; position: relative; padding: 4px 0 4px 34px; font-size: 14px; }
.ex-steps li::before { content: counter(step); position: absolute; left: 0; top: 0.35em; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--band); font-size: 12px; font-weight: 700; }
.ex-steps .loading { color: var(--ink-2); padding-inline-start: 0; }
.ex-steps .loading::before { display: none; }
.ex-credit { margin-top: 14px; font-size: 12px; color: var(--ink-3); }
.ex-dlg .d-foot[hidden] { display: none; }
.pick-search { display: flex; align-items: center; gap: 10px; background: var(--band); border-radius: 16px; padding: 0 14px; margin-top: 14px; color: var(--ink-2); }
.pick-search .lucide { width: 18px; height: 18px; }
.pick-search input { font: inherit; font-size: 16px; font-weight: 500; color: var(--ink); width: 100%; padding: 12px 0; border: none; background: transparent; -webkit-appearance: none; }
.pick-search input:focus { outline: none; }
.pick-search:focus-within { box-shadow: 0 0 0 1.5px var(--ink); }
.pick-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pick-chips button { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--band); border-radius: var(--r-pill); padding: 6px 12px; }
.pick-chips button.on { background: var(--ink); color: #fff; }
.pick-list { list-style: none; margin-top: 12px; max-height: 48vh; overflow-y: auto; }
.pick-list button { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.pick-list li:last-child button { border-bottom: 0; }
.pick-list img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; background: var(--band); display: block; }
.pick-list b { display: block; font-weight: 600; font-size: 14px; }
.pick-list small { display: block; font-size: 12px; color: var(--ink-2); text-transform: capitalize; }
.pick-list .ico { width: 32px; height: 32px; }
.pick-list .ico .lucide { width: 16px; height: 16px; }
.pick-list button:hover .ico { background: var(--coral-soft); }
.pick-empty { color: var(--ink-2); font-size: 14px; padding: 12px 0; }

@media (max-width: 640px) {
  .seg { display: flex; }
  .seg button { flex: 1; }
  .ex { grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 10px; }
  .ex-img { width: 48px; height: 48px; }
  .ex-kg input { width: 40px; }
  .ex-check { width: 36px; height: 36px; }
  .ex-dlg, .pick-dlg { padding: 22px 20px 20px; }
  .ses-title { font-size: 17px; }
}


/* Progress presentation — styles scoped to this page. */
.progress-page { padding: 20px 32px; }
.progress-header { display:flex; justify-content:space-between; align-items:center; gap:16px; max-width:1600px; margin:0 auto 20px; }
.progress-header .brand { color:var(--ink); text-decoration:none; }
.progress-tools { display:flex; gap:8px; }
.progress-tools button { padding:10px 18px; border:1px solid #d3d3d8; border-radius:999px; font-size:13px; }
#progress-deck { max-width:1600px; margin:auto; }
.progress-slide { margin:0; background:var(--sheet); border-radius:40px; padding:clamp(28px,4.5vw,76px); min-height:calc(100svh - 176px); display:flex; flex-direction:column; }
.progress-slide[hidden] { display:none; }
.progress-eyebrow { color:#686870; font-weight:600; font-size:14px; margin-bottom:22px; }
.progress-slide h2 { font-size:clamp(38px,4.9vw,78px); font-weight:800; line-height:1.05; letter-spacing:-.045em; max-width:1000px; margin:0 0 32px; }
.progress-lead { font-size:clamp(20px,2vw,29px); line-height:1.55; letter-spacing:-.02em; }
.progress-body { font-size:clamp(17px,1.5vw,22px); line-height:1.6; max-width:960px; margin-top:22px; }
.progress-source { font-size:12px; color:#686870; padding-top:28px; margin-top:auto; }
.progress-cover { background:var(--ink); color:#fff; }
.progress-cover .progress-eyebrow { color:#c5c5ca; }
.progress-cover h2 { font-size:clamp(54px,7.8vw,122px); color:#ee9178; }
.progress-cover .progress-lead { color:#e0e0e4; }
.progress-cover-bottom { margin-top:auto; padding-top:45px; display:flex; justify-content:space-between; gap:20px; font-size:14px; color:#bfbfc5; }
.progress-cover-bottom strong { color:#fff; }
.progress-totals { display:grid; grid-template-columns:repeat(3,1fr); gap:30px; margin:8px 0 42px; }
.progress-totals strong { display:block; color:var(--coral-deep); font-size:clamp(80px,10vw,144px); letter-spacing:-.07em; line-height:1; }
.progress-totals span { display:block; margin-top:14px; font-size:20px; }
.progress-training,.progress-body-split { display:grid; grid-template-columns:1fr 1fr; gap:60px; align-items:start; }
.progress-calendar { display:grid; grid-template-columns:repeat(6,1fr); gap:8px; }
.progress-day { background:#ebebee; border-radius:16px; padding:12px 4px; text-align:center; }
.progress-day span,.progress-day b { display:block; }
.progress-day span { font-size:20px; font-weight:700; }
.progress-day b { font-size:12px; margin-top:5px; font-weight:500; }
.progress-day.logged { background:var(--coral-soft); color:#9e3e23; }
.progress-caption { color:#686870; font-size:13px; margin-top:14px; }
.progress-events { display:grid; grid-template-columns:1fr 1fr; gap:30px 60px; }
.progress-events article { border-top:1px solid var(--line); padding-top:16px; }
.progress-events time { color:var(--coral-deep); font-size:13px; font-weight:700; }
.progress-events h3 { font-size:24px; margin:6px 0; letter-spacing:-.025em; }
.progress-events p { font-size:18px; max-width:440px; }
.progress-food,.progress-films { display:grid; gap:20px; }
.progress-food { grid-template-columns:repeat(4,1fr); }
.progress-food img { width:100%; height:clamp(150px,19vw,280px); object-fit:cover; border-radius:20px; }
.progress-food figcaption,.progress-films figcaption { font-size:16px; font-weight:700; margin-top:10px; }
.progress-food figcaption span,.progress-films figcaption span { display:block; color:#686870; font-size:13px; font-weight:500; margin-top:3px; }
.progress-films { grid-template-columns:repeat(5,1fr); }
.progress-films img { width:100%; height:clamp(160px,20vw,290px); object-fit:cover; border-radius:12px; }
.progress-measures>div { padding:14px 0; border-top:1px solid var(--line); }
.progress-measures span { display:block; font-size:15px; color:#686870; }
.progress-measures strong { font-size:clamp(25px,2.8vw,43px); letter-spacing:-.04em; }
.progress-measures small { font-size:18px; font-weight:500; }
.progress-big-number { font-size:100px; font-weight:800; line-height:1; color:var(--coral-deep); letter-spacing:-.06em; }
.progress-big-number span { display:block; font-size:20px; font-weight:500; letter-spacing:normal; line-height:1.5; margin-top:10px; color:var(--ink); }
.progress-then-now { display:grid; grid-template-columns:1fr 1fr; gap:70px; }
.progress-then-now>div { border-top:1px solid var(--line); padding-top:15px; }
.progress-then-now h3 { color:#686870; font-size:16px; font-weight:500; }
.progress-then-now p { font-size:27px; line-height:1.45; margin-top:18px; letter-spacing:-.02em; }
.progress-then-now span { font-size:13px; color:#686870; }
.progress-last { background:#f8e5dd; }
.progress-next { max-width:950px; margin-bottom:26px; }
.progress-next p { display:grid; grid-template-columns:160px 1fr; border-top:1px solid #dec7bd; padding:16px 0; font-size:20px; gap:20px; }
.progress-return { margin-top:25px; font-weight:700; }
.progress-controls { display:flex; justify-content:space-between; align-items:center; gap:16px; max-width:1600px; margin:16px auto 0; padding:0; border:0; }
.progress-controls>div { display:flex; gap:22px; align-items:center; }
#progress-count { font-variant-numeric:tabular-nums; font-size:14px; color:var(--ink); font-weight:700; }
.progress-key-hint { font-size:12px; color:#686870; }
.progress-controls nav { display:flex; align-items:center; gap:20px; }
.progress-controls nav>button { background:white; width:44px; height:44px; border-radius:50%; font-size:21px; }
.progress-controls button:disabled { opacity:.3; cursor:default; }
.progress-dots { display:flex; gap:4px; }
.progress-dots button { width:22px; height:32px; display:grid; place-items:center; }
.progress-dots button:before { content:''; width:6px; height:6px; border-radius:50%; background:#b4b4bb; }
.progress-dots button[aria-current="step"]:before { background:var(--coral-deep); width:9px; height:9px; }
.progress-entry { display:flex; align-items:center; justify-content:space-between; gap:20px; background:var(--coral-soft); color:var(--ink); border-radius:24px; padding:20px 24px; margin-top:24px; }
.progress-entry strong { display:block; font-size:20px; }
.progress-entry span { font-size:14px; }
@media(max-width:760px) {
.progress-page { padding:14px 12px 24px; }
.progress-header { margin-bottom:14px; }
.progress-header .brand { font-size:14px; }
.progress-tools button { padding:8px 10px; font-size:11px; }
.progress-slide { padding:28px 24px; border-radius:28px; min-height:calc(100svh - 165px); }
.progress-slide h2 { margin-bottom:25px; }
.progress-eyebrow { font-size:12px; }
.progress-cover h2 { margin-top:30px; }
.progress-cover-bottom { flex-direction:column; }
.progress-totals { gap:15px; margin:10px 0 35px; }
.progress-totals strong { font-size:64px; }
.progress-totals span { font-size:13px; }
.progress-training,.progress-body-split,.progress-then-now { grid-template-columns:1fr; gap:25px; }
.progress-events { grid-template-columns:1fr; gap:20px; }
.progress-events h3 { font-size:21px; }
.progress-events p { font-size:16px; }
.progress-food { grid-template-columns:1fr 1fr; gap:20px 12px; }
.progress-food img { height:180px; }
.progress-films { grid-template-columns:repeat(3,1fr); gap:18px 12px; }
.progress-films img { height:150px; }
.progress-food figcaption,.progress-films figcaption { font-size:13px; }
.progress-source { font-size:11px; }
.progress-then-now p { font-size:23px; }
.progress-next p { grid-template-columns:1fr; gap:4px; font-size:18px; }
.progress-controls nav { gap:8px; }
.progress-controls>div { gap:0; }
.progress-key-hint { display:none; }
.progress-dots { gap:0; }
.progress-dots button { width:18px; }
}
@media print {
@page { size:landscape; margin:10mm; }
.progress-page { background:white; padding:0; }
.progress-header,.progress-controls { display:none; }
.progress-slide,.progress-slide[hidden] { display:flex!important; break-after:page; break-inside:avoid; min-height:175mm; border-radius:0; padding:12mm; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
.progress-slide:last-child { break-after:auto; }
.progress-slide h2 { font-size:36pt; margin-bottom:20px; }
.progress-cover h2 { font-size:66pt; }
.progress-body,.progress-events p { font-size:13pt; }
.progress-lead { font-size:17pt; }
.progress-food img { height:48mm; }
.progress-films img { height:55mm; }
.progress-tools,.progress-return { display:none; }
}

/* Main site v5 — the presentation's typography, colour and open compositions.
   Scoped so the progress presentation retains its original design. */
.site-page { --ink-2:#686870; --ink-3:#898991; --shadow:none; padding:20px 32px; }
.site-page > .top { max-width:1600px; margin:0 auto 20px; padding:0; min-height:44px; }
.site-page .wrap { max-width:1600px; padding:48px 56px 40px; min-height:calc(100svh - 104px); overflow:clip; }
.site-page .tabs { background:transparent; border-color:#d3d3d8; }
.site-page .tabs a { padding:10px 18px; color:#56565e; }
.site-page .tabs a.here { color:white; }
.site-page .site-hero { background:var(--ink); color:#fff; border-radius:40px; padding:50px 56px 54px; margin:-48px -56px 42px; }
.site-page .site-eyebrow { color:#c5c5ca; font-size:14px; font-weight:600; margin:0 0 20px; }
.site-page .site-hero .page-title,.site-page .site-hero .hero-day { display:block; color:#ee9178; font-size:clamp(52px,6.8vw,104px); font-weight:800; line-height:1.02; letter-spacing:-.05em; margin:0; padding:0; }
.site-page .site-hero .page-sub,.site-page .site-hero .hero-sub { display:block; color:#dedee3; font-size:clamp(18px,1.8vw,26px); line-height:1.5; max-width:50ch; margin:22px 0 0; }
.site-page .site-hero-compact { padding-top:34px; padding-bottom:36px; margin-bottom:24px; }
.site-page .site-hero-compact .page-title { font-size:clamp(46px,5vw,76px); }
.site-page .site-hero-compact .site-eyebrow { margin-bottom:14px; }
.site-page .site-hero-compact .page-sub { margin-top:14px; font-size:19px; }
.site-page .hero { flex-direction:row-reverse; justify-content:space-between; align-items:flex-end; gap:30px; }
.site-page .hero .date-circle { width:112px; height:112px; background:transparent; color:#ee9178; border-color:#4b3c37; font-size:44px; margin-bottom:4px; }
.site-page .stats { gap:0; margin-top:0; margin-bottom:32px; }
.site-page .stat { background:transparent; border-radius:0; padding:0 28px; border-inline-start:1px solid var(--line); box-shadow:none; }
.site-page .stat:first-child { border-inline-start:0; padding-inline-start:0; }
.site-page .stat .ico { display:none; }
.site-page .stat .val { color:var(--coral-deep); font-size:clamp(48px,5.8vw,84px); line-height:1.1; letter-spacing:-.065em; }
.site-page .stat .label { font-size:15px; color:#686870; margin-top:8px; }
.site-page .progress-entry { padding:25px 30px; background:#f8e5dd; margin-top:0; border-radius:24px; }
.site-page .progress-entry:hover { text-decoration:none; background:#f4d9cc; }
.site-page .progress-entry strong { font-size:clamp(22px,2.3vw,32px); letter-spacing:-.035em; margin-bottom:6px; }
.site-page .progress-entry>span { font-size:30px; }
.site-page .cols { gap:60px; }
.site-page .section-title,.site-page .sec-title { font-size:30px; line-height:1.2; letter-spacing:-.035em; margin-bottom:24px; }
.site-page .section-title .when { font-size:13px; }
.site-page .text-col { max-width:820px; }
.site-page .entry-card { background:transparent; padding:0; border-radius:0; }
.site-page .md { font-size:16px; line-height:1.8; }
.site-page .md h2 { font-size:21px; letter-spacing:-.025em; margin-top:26px; }
.site-page .md p { margin:12px 0; }
.site-page .md li { padding-top:5px; padding-bottom:5px; }
.site-page .md ul li::before { top:1em; }
.site-page .md li.task .box { top:.65em; }
.site-page .day-past,.site-page .recipe { background:transparent; border-radius:0; border-top:1px solid var(--line); margin:0; }
.site-page .day-past summary,.site-page .recipe summary { padding:20px 0; }
.site-page .day-past .body,.site-page .recipe .body { padding:0 0 24px; }
.site-page .recipe .photo { width:100%; height:220px; border-radius:18px; }
.site-page .col-side section { margin-bottom:40px; }
.site-page footer { margin-top:48px; padding-top:24px; display:flex; font-size:13px; }
.site-page footer a { margin-inline-start:12px; }
/* Photographs lead; captions sit directly on the page. */
.site-page.recipes-page .grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:30px; }
.site-page.movies-page .grid { grid-template-columns:repeat(5,minmax(0,1fr)); gap:24px; }
.site-page .grid .tile,.site-page .grid .card { background:transparent; padding:0 0 16px; border-radius:0; box-shadow:none; align-self:start; }
.site-page .grid .tile:hover .t-name,.site-page .grid .card:hover .c-name { color:var(--coral-deep); }
.site-page .tile .ph,.site-page .card .poster { border-radius:20px; }
.site-page .tile .t-info,.site-page .card .c-info { padding:18px 0 0; }
.site-page .tile .t-name,.site-page .card .c-name { font-size:20px; letter-spacing:-.025em; line-height:1.4; }
.site-page .tile .t-badge { padding:0; border-radius:0; background:none; margin-top:8px; font-size:13px; }
.site-page .queue { background:#f8e5dd; border-radius:20px; padding:20px 26px; margin-bottom:36px; }
.site-page .queue li { padding-inline-start:0; font-size:17px; }
.site-page .queue li::before { display:none; }
/* Tracking: bigger headings and values, quieter containers. */
.site-page .seg { margin:0 0 16px; padding:5px; background:var(--band); border:none; }
.site-page .seg button { min-height:44px; padding:10px 22px; font-size:15px; }
.site-page .today-row { margin-top:0; padding:20px 0 36px; gap:16px; }
.site-page .today-row .date-circle { width:76px; height:76px; font-size:30px; background:transparent; }
.site-page .today-row .t-q { font-size:clamp(26px,2.8vw,38px); letter-spacing:-.04em; }
.site-page .today-row .t-state { font-size:23px; color:var(--ink-2); margin-top:6px; }
.site-page .today-row .t-label { border:0; padding-inline-end:8px; font-size:15px; }
.site-page .rate button { width:50px; height:50px; background:transparent; }
.site-page .rate button.on { background:var(--coral-deep); border-color:var(--coral-deep); }
.site-page .dash { background:transparent; padding:0; margin:0; gap:28px; }
.site-page .session,.site-page .food,.site-page .entry,.site-page .grid-card,.site-page .recent,.site-page .b-recent,.site-page .plan-card,.site-page .chart { padding:28px; background:var(--card); border-radius:28px; }
.site-page .ses-title,.site-page .food-title,.site-page .grid-title,.site-page .recent h2,.site-page .b-recent h2,.site-page .entry .entry-title { font-size:25px; font-weight:700; letter-spacing:-.035em; }
.site-page .ses-head { margin-bottom:16px; flex-wrap:wrap; }
.site-page .ses-sub { margin-top:6px; }
.site-page .ses-date input { min-height:44px; }
.site-page .ex { padding:14px 0; }
.site-page .ex-main b { font-size:16px; white-space:normal; }
.site-page .ex-check { width:44px; height:44px; }
.site-page .ex-kg input { min-height:44px; }
.site-page .tiles { gap:0 22px; }
.site-page .tiles .tile { background:transparent; padding:24px 0; border-radius:0; border-top:1px solid var(--line); }
.site-page .tiles .ico { display:none; }
.site-page .tiles .v { font-size:clamp(38px,4vw,62px); color:var(--coral-deep); letter-spacing:-.055em; }
.site-page .tiles .l { font-size:14px; line-height:1.5; margin-top:9px; }
.site-page .grid-note { background:none; padding:0; white-space:normal; }
.site-page .plan-cols { gap:28px; }
.site-page .pc-head { margin-bottom:16px; }
.site-page .pc-day { font-size:21px; letter-spacing:-.03em; }
.site-page .pc-name { background:transparent; padding:0; border-radius:0; font-weight:500; }
.site-page .pc.now .pc-name { background:transparent; }
.site-page .pc-ex { padding:10px 0; }
.site-page .pc-ex b { line-height:1.4; }
.site-page .chart .c-val { font-size:36px; }
.site-page .chart .c-label .ico { display:none; }
.site-page .chart .c-label { font-size:16px; }
.site-page .charts { gap:24px; }
.site-page .chart { padding:24px 20px 12px; }
.site-page .food-head { gap:15px; margin-bottom:28px; }
.site-page .macro .m-val b { font-size:32px; }
.site-page .macro { margin-bottom:22px; }
.site-page .macro.small .m-val b { font-size:22px; }
.site-page .save { background:var(--ink); color:white; min-height:50px; }
.site-page .save:hover { background:#343438; }
.site-page .ring-wrap { background:#f8e5dd; border-radius:28px; padding:18px; }
.site-page .ring { background:transparent; color:var(--ink); }
.site-page .ring .track { stroke:#e4c5b9; }
.site-page .ring .r-lbl { color:#686870; }
.site-page .ring .r-val { color:var(--coral-deep); }
.site-page .goal-bar { background:#f8e5dd; }
.site-page .goal-bar .gb-track { background:#e4c5b9; }
.site-page .goal-line .gv { background:var(--band); }
.site-page .b-recent { overflow-x:auto; }
.site-page .entry .fld { border-radius:12px; }
.site-page .pill-btn,.site-page .close { min-height:44px; }
.site-page .detail { padding:36px; }
.site-page .detail .d-title { font-size:36px; letter-spacing:-.04em; }
.site-page .detail .md { font-size:16px; }
.site-page .day-dlg,.site-page .goals-dlg,.site-page .meal-dlg,.site-page .ex-dlg,.site-page .pick-dlg { padding:30px; }
.site-page .d-q { font-size:30px; }
.site-page .goals-dlg .entry { padding:0; }
.site-page .x { width:44px; height:44px; }
.site-page .meal-name { white-space:normal; }
/* Entry points use the same dark cover and coral type as the presentation. */
.site-page.login-wrap { padding:0; }
.site-page .login-wrap { display:grid; grid-template-columns:1fr 1fr; gap:60px; align-content:center; background:var(--ink); }
.site-page .signin-intro { color:white; }
.site-page .signin-intro h1 { color:#ee9178; font-size:clamp(56px,7vw,104px); letter-spacing:-.06em; line-height:1.05; margin-bottom:24px; }
.site-page .signin-intro>p:last-child { font-size:20px; color:#dedee3; }
.site-page .login { width:min(440px,100%); padding:32px; border-radius:28px; }
.site-page .nf { background:var(--ink); }
.site-page .nf h1 { color:#ee9178; }
.site-page .nf p { color:#dedee3; }
.site-page .nf a { background:#f8e5dd; color:var(--ink); }
@media(min-width:1024px) {
.site-page .dash-train .session { grid-column:span 8; }
.site-page .dash-train .tiles { grid-column:span 4; }
.site-page .dash-macros .entry { grid-column:span 5; }
.site-page .dash-macros .ring-wrap { grid-column:span 2; }
.site-page .dash-macros .b-recent { grid-column:span 5; }
.site-page .dash-macros .food { order:0; }
.site-page .cols { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); }
}
@media(min-width:641px) and (max-width:1100px) {
.site-page .wrap { padding:36px; }
.site-page .site-hero { margin:-36px -36px 36px; padding:40px 36px; }
.site-page.recipes-page .grid { gap:20px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.site-page.movies-page .grid { gap:20px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.site-page .today-row .greet { flex-basis:100%; order:-1; text-align:start; }
.site-page .charts { grid-template-columns:1fr; }
}
@media(max-width:1023px) {
.site-page .dash>* { margin-top:24px; }
.site-page .dash .session { margin-top:0; }
.site-page .dash .sec-title { margin-top:36px; margin-bottom:12px; }
.site-page .dash .sec-sub { margin-top:0; }
.site-page .ring-wrap { max-width:240px; margin-inline-start:auto; margin-inline-end:auto; }
}
@media(max-width:640px) {
.site-page { padding:14px 12px calc(92px + env(safe-area-inset-bottom)); }
.site-page > .top { margin-bottom:16px; min-height:44px; padding:0 6px; }
.site-page .brand { font-size:15px; }
.site-page .wrap { padding:24px 20px 30px; border-radius:28px; min-height:calc(100svh - 176px); }
.site-page .site-hero { border-radius:28px; margin:-24px -20px 28px; padding:32px 26px 36px; }
.site-page .site-eyebrow { font-size:12px; margin-bottom:20px; }
.site-page .site-hero .page-title,.site-page .site-hero .hero-day { font-size:clamp(42px,11.8vw,70px); }
.site-page .site-hero .page-sub,.site-page .site-hero .hero-sub { font-size:17px; margin-top:20px; }
.site-page .site-hero-compact { padding-top:25px; padding-bottom:28px; margin-bottom:20px; }
.site-page .site-hero-compact .page-sub { font-size:16px; margin-top:12px; }
.site-page .hero .date-circle { display:none; }
.site-page .hero { justify-content:flex-end; }
.site-page .stats { row-gap:24px; margin-bottom:28px; }
.site-page .stat { padding:0 18px; }
.site-page .stat:nth-child(odd) { padding-inline-start:0; border-inline-start:0; }
.site-page .stat .val { font-size:54px; }
.site-page .stat .label { font-size:13px; margin-top:3px; }
.site-page .progress-entry { padding:22px; align-items:flex-start; gap:16px; }
.site-page .progress-entry strong { font-size:25px; line-height:1.2; }
.site-page .progress-entry span { font-size:12px; }
.site-page .progress-entry>span { font-size:25px; }
.site-page .section-title,.site-page .sec-title { font-size:28px; flex-wrap:wrap; gap:8px; margin-bottom:20px; }
.site-page .md { font-size:15px; line-height:1.75; }
.site-page .md h2 { font-size:20px; }
.site-page .tabs { left:14px; right:14px; background:var(--ink); border:0; padding:6px; bottom:calc(12px + env(safe-area-inset-bottom)); box-shadow:0 6px 24px #0003; }
.site-page .tabs a { min-height:54px; padding:7px 0 6px; color:#c5c5ca; }
.site-page .tabs a.here { background:#f8e5dd; color:var(--ink); }
.site-page .tabs a:hover { color:#ee9178; }
.site-page .tabs a.here:hover { color:var(--ink); }
.site-page.recipes-page .grid,.site-page.movies-page .grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:26px 14px; }
.site-page .tile .ph,.site-page .card .poster { border-radius:14px; }
.site-page .tile .t-info,.site-page .card .c-info { padding-top:12px; }
.site-page .tile .t-name,.site-page .card .c-name { font-size:16px; }
.site-page .queue { padding:20px; margin-bottom:28px; }
.site-page .queue li { font-size:15px; }
.site-page .seg { display:flex; width:100%; }
.site-page .seg button { flex:1; padding:10px 12px; font-size:13px; }
.site-page .today-row { padding:10px 0 26px; }
.site-page .today-row .date-circle { width:52px; height:52px; font-size:23px; }
.site-page .today-row .greet { margin:0 0 8px; }
.site-page .today-row .t-q { font-size:28px; }
.site-page .today-row .t-state { font-size:20px; }
.site-page .rate button { width:48px; height:48px; }
.site-page .session,.site-page .food,.site-page .entry,.site-page .grid-card,.site-page .recent,.site-page .b-recent,.site-page .plan-card { padding:22px 16px; border-radius:22px; }
.site-page .session { margin-inline-start:-8px; margin-inline-end:-8px; }
.site-page .ses-title,.site-page .food-title,.site-page .grid-title,.site-page .recent h2,.site-page .b-recent h2 { font-size:23px; }
.site-page .ex { grid-template-columns:40px minmax(0,1fr) auto; gap:10px; }
.site-page .ex-img { width:40px; height:40px; border-radius:10px; grid-row:span 2; }
.site-page .ex-main { grid-column:2; }
.site-page .ex-main b { font-size:15px; }
.site-page .ex-main span { white-space:normal; font-size:12px; }
.site-page .ex-kg { grid-column:2; justify-self:start; padding-inline-start:10px; }
.site-page .ex-check { grid-column:3; grid-row:1 / span 2; }
.site-page .tiles .v { font-size:42px; }
.site-page .tiles .l { font-size:13px; }
.site-page .plan-cols { gap:26px; }
.site-page .pc-head { align-items:baseline; flex-wrap:wrap; }
.site-page .pc-ex { grid-template-columns:44px minmax(0,1fr); }
.site-page .pc-ex img { width:44px; height:44px; }
.site-page .charts { grid-template-columns:1fr; }
.site-page .entry { gap:14px 8px; }
.site-page .entry .fld { padding:0 8px; gap:4px; }
.site-page .entry input { font-size:18px; }
.site-page .entry .unit { font-size:11px; }
.site-page .food-head { flex-wrap:wrap; margin-bottom:24px; }
.site-page .macro .m-head { flex-wrap:wrap; gap:4px; }
.site-page .macro-row { gap:16px; }
.site-page .macro .m-val b { font-size:28px; }
.site-page .meal { grid-template-columns:auto minmax(0,1fr) auto; }
.site-page .meal-kcal { grid-column:2; }
.site-page .meal-p { grid-column:2; justify-self:start; }
.site-page .meal .del { grid-column:3; grid-row:1 / span 3; }
.site-page .meal-at { align-self:start; }
.site-page .row { gap:8px; flex-wrap:wrap; }
.site-page .r-word { font-size:12px; }
.site-page .detail { padding:24px; }
.site-page .detail .d-title { font-size:28px; }
.site-page .day-dlg,.site-page .goals-dlg,.site-page .meal-dlg,.site-page .ex-dlg,.site-page .pick-dlg { padding:24px 20px; }
.site-page .d-q { font-size:27px; }
.site-page .goals-dlg .entry { padding:0; }
.site-page .day-dlg .rate button { width:48px; height:48px; }
.site-page .login-wrap { grid-template-columns:1fr; gap:32px; padding:36px 24px; }
.site-page .signin-intro { width:100%; }
.site-page .signin-intro h1 { font-size:64px; }
.site-page .signin-intro>p:last-child { font-size:17px; }
.site-page .login { padding:24px; }
.site-page.signin-page,.site-page.notfound-page { padding-bottom:14px; }
}
@media(display-mode:standalone) {
.site-page { padding-top:calc(env(safe-area-inset-top) + 14px); }
}
/* Keep dialog controls above long titles, including narrow phone layouts. */
.site-page .detail .close { float:none; display:flex; margin-inline-start:auto; margin-bottom:18px; z-index:2; }
@media(max-width:640px) {
.site-page .detail .d-poster { width:96px; }
.site-page .detail .d-head { gap:16px; }
.site-page .detail .d-head>div { min-width:0; }
}
.site-page .entry input[type=number] { appearance:textfield; -moz-appearance:textfield; }
.site-page .entry input[type=number]::-webkit-inner-spin-button,.site-page .entry input[type=number]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
.site-page .ring-wrap { align-self:start; aspect-ratio:1; }
@media(min-width:641px) { .site-page .dash-macros .entry input[type=number] { font-size:20px; } .site-page .dash-macros .entry .fld { padding:0 10px; gap:4px; } }

/* Phone refinement: consistent gutters, compact type and comfortable tap targets. */
@media screen and (max-width:640px) {
  .site-page { font-size:14px; padding:12px 12px calc(88px + env(safe-area-inset-bottom)); }
  .site-page > .top { padding:0 4px; margin-bottom:12px; }
  .site-page .brand { font-size:14px; gap:10px; }
  .site-page .brand::before { width:38px; height:38px; font-size:16px; }
  .site-page .wrap { padding:22px 18px 24px; border-radius:24px; }
  .site-page .site-hero { margin:-22px -18px 24px; padding:25px 22px 28px; border-radius:24px; }
  .site-page .site-eyebrow { font-size:11px; line-height:1.5; margin-bottom:12px; }
  .site-page .site-hero .page-title,.site-page .site-hero .hero-day { font-size:clamp(32px,9vw,40px); line-height:1.1; letter-spacing:-.045em; }
  .site-page .site-hero .page-sub,.site-page .site-hero .hero-sub { font-size:14px; line-height:1.55; margin-top:14px; }
  .site-page .site-hero-compact { padding:23px 22px 25px; margin-bottom:18px; }
  .site-page .site-hero-compact .page-sub { font-size:14px; margin-top:12px; }
  .site-page .hero>div { min-width:0; }
  .site-page section { margin-top:28px; }
  .site-page .stats { gap:18px 0; margin-bottom:24px; }
  .site-page .stat { padding:0 20px; }
  .site-page .stat .val { font-size:40px; line-height:1.1; }
  .site-page .stat .label { font-size:12px; line-height:1.5; margin-top:5px; }
  .site-page .progress-entry { padding:18px 20px; gap:16px; align-items:center; border-radius:20px; }
  .site-page .progress-entry>div { min-width:0; }
  .site-page .progress-entry strong { font-size:19px; line-height:1.3; margin-bottom:6px; }
  .site-page .progress-entry span { font-size:11px; line-height:1.5; }
  .site-page .progress-entry>span { font-size:22px; flex-shrink:0; }
  .site-page .section-title,.site-page .sec-title { font-size:22px; line-height:1.3; gap:6px 12px; margin-bottom:16px; align-items:baseline; }
  .site-page .section-title .when { font-size:11px; margin-inline-start:auto; text-align:end; }
  .site-page .md,.site-page .detail .md { font-size:14px; line-height:1.7; overflow-wrap:anywhere; }
  .site-page .md h2 { font-size:17px; line-height:1.4; margin:22px 0 8px; }
  .site-page .md h3 { font-size:14px; line-height:1.5; margin:18px 0 6px; }
  .site-page .md p { margin:10px 0; }
  .site-page .md li { padding-top:4px; padding-bottom:4px; }
  .site-page .md ul li::before { top:.95em; }
  .site-page .md li.task .box { top:.5em; }
  .site-page .md blockquote { padding:12px 14px; border-radius:14px; }
  .site-page .md table { font-size:12px; }
  .site-page .md th,.site-page .md td { padding:7px 5px; }
  .site-page .day-past summary,.site-page .recipe summary { padding:14px 0; gap:10px; font-size:13px; line-height:1.5; }
  .site-page .day-past summary::after,.site-page .recipe summary::after { width:36px; height:36px; font-size:18px; }
  .site-page .recipe summary { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 12px; }
  .site-page .recipe .r-title { grid-column:1; }
  .site-page .recipe .r-flag { grid-column:1; justify-self:start; font-size:10px; padding:2px 8px; }
  .site-page .recipe summary::after { grid-column:2; grid-row:1 / span 2; }
  .site-page .recipes-intro,.site-page .sec-sub { font-size:13px; line-height:1.65; margin-bottom:14px; }
  .site-page .col-side section { margin-bottom:28px; }
  .site-page .empty,.site-page .empty-today { font-size:13px; padding:16px; }
  .site-page footer { margin-top:32px; padding-top:18px; font-size:12px; line-height:1.6; }
  .site-page footer p { width:100%; }
  .site-page footer a { margin-inline-start:8px; }
  .site-page .tabs { left:14px; right:14px; padding:5px; }
  .site-page .tabs a { min-height:48px; padding:6px 0; font-size:10px; gap:3px; }
  .site-page .tabs a svg { width:18px; height:18px; }
  /* Galleries keep their titles and captions on the same left edge. */
  .site-page.recipes-page .grid,.site-page.movies-page .grid { gap:22px 14px; }
  .site-page .grid .tile,.site-page .grid .card { padding-bottom:0; }
  .site-page .tile .t-info,.site-page .card .c-info { padding:10px 0 0; }
  .site-page .tile .t-name,.site-page .card .c-name { font-size:14px; line-height:1.45; letter-spacing:-.015em; }
  .site-page .tile .t-badge { font-size:11px; margin-top:5px; }
  .site-page .card .c-stars { font-size:12px; letter-spacing:1px; }
  .site-page .card .c-date { font-size:10px; line-height:1.5; }
  .site-page .queue { padding:16px 18px; margin-bottom:24px; border-radius:18px; }
  .site-page .queue .q-label { font-size:11px; margin-bottom:4px; }
  .site-page .queue li { font-size:13px; line-height:1.6; }
  /* Training sections share one card edge and one spacing rhythm. */
  .site-page .seg { margin-bottom:14px; }
  .site-page .seg button { padding:10px 8px; min-height:44px; font-size:12px; }
  .site-page .today-row { display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:12px 10px; padding:4px 0 22px; margin-top:0; align-items:center; }
  .site-page .today-row .greet { grid-column:1 / -1; margin:0 0 4px; }
  .site-page .today-row .t-q { font-size:22px; line-height:1.3; letter-spacing:-.03em; }
  .site-page .today-row .t-state { font-size:15px; line-height:1.5; margin-top:4px; }
  .site-page .today-row .date-circle { width:44px; height:44px; font-size:20px; }
  .site-page .today-row .t-label { font-size:12px; line-height:1.5; padding:0; margin:0; }
  .site-page .today-row .rate { grid-column:1 / -1; grid-row:3; justify-content:space-between; gap:8px; width:100%; }
  .site-page .today-row .clear-btn { grid-column:3; grid-row:2; font-size:12px; min-height:44px; }
  .site-page .rate button { width:44px; height:44px; flex-shrink:0; }
  .site-page .rate button .n { font-size:16px; }
  .site-page .dash>* { margin-top:20px; }
  .site-page .dash .session { margin-top:0; }
  .site-page .session { margin-inline-start:0; margin-inline-end:0; }
  .site-page .session,.site-page .food,.site-page .entry,.site-page .grid-card,.site-page .recent,.site-page .b-recent,.site-page .plan-card { padding:18px 14px; border-radius:20px; }
  .site-page .ses-title,.site-page .food-title,.site-page .grid-title,.site-page .recent h2,.site-page .b-recent h2,.site-page .entry .entry-title { font-size:19px; line-height:1.35; letter-spacing:-.025em; }
  .site-page .ses-head { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; margin-bottom:8px; }
  .site-page .ses-sub { font-size:12px; line-height:1.6; margin-top:4px; }
  .site-page .ses-date { width:100%; }
  .site-page .ses-date input { width:100%; min-width:0; font-size:16px; min-height:44px; padding:8px 12px; border-radius:12px; }
  .site-page .ex { grid-template-columns:36px minmax(0,1fr) 44px; gap:5px 10px; padding:12px 0; }
  .site-page .ex-img { width:36px; height:36px; align-self:start; margin-top:3px; }
  .site-page .ex-main b { font-size:13px; line-height:1.45; }
  .site-page .ex-main span { font-size:11px; line-height:1.5; }
  .site-page .ex-kg { font-size:11px; padding:0 10px; border-radius:12px; }
  .site-page .ex-kg input { font-size:16px; width:42px; min-height:44px; }
  .site-page .ses-foot { gap:10px; margin-top:14px; }
  .site-page .ses-count { font-size:11px; }
  .site-page .pill-btn { font-size:12px; padding:9px 12px; }
  .site-page .tiles { gap:0 18px; }
  .site-page .tiles .tile { padding:18px 0; }
  .site-page .tiles .v { font-size:34px; }
  .site-page .tiles .l { font-size:12px; margin-top:6px; }
  .site-page .plan-cols { gap:22px; }
  .site-page .pc-head { gap:4px 8px; margin-bottom:8px; }
  .site-page .pc-day { font-size:17px; }
  .site-page .pc-name { font-size:11px; line-height:1.5; }
  .site-page .pc-ex { grid-template-columns:36px minmax(0,1fr); gap:10px; padding:8px 0; min-height:52px; }
  .site-page .pc-ex img { width:36px; height:36px; border-radius:10px; }
  .site-page .pc-ex b { font-size:13px; }
  .site-page .pc-ex small { font-size:11px; line-height:1.5; }
  .site-page .grid-head { margin-bottom:14px; gap:6px; }
  .site-page .grid-note { font-size:11px; line-height:1.5; }
  .site-page .recent .row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 10px; padding:14px 0; }
  .site-page .row .r-date { font-size:13px; grid-column:1; }
  .site-page .row .meter { grid-column:2; grid-row:1; justify-content:flex-end; }
  .site-page .row .r-ex { grid-column:1; margin:0; font-size:11px; }
  .site-page .row .r-word { grid-column:2; grid-row:2; justify-self:end; margin:0; font-size:11px; padding:3px 8px; }
  /* Macro labels and values use predictable baselines. */
  .site-page .goal-bar { margin-top:0; padding:16px; border-radius:18px; }
  .site-page .goal-bar .gb-label { font-size:13px; }
  .site-page .goal-bar .gb-val { font-size:18px; }
  .site-page .goal-bar .gb-track { height:10px; }
  .site-page .goal-bar .gb-foot { font-size:11px; gap:12px; }
  .site-page .food-head { flex-wrap:nowrap; align-items:center; margin-bottom:20px; gap:10px; }
  .site-page .food-edit { font-size:11px; min-height:44px; flex-shrink:0; }
  .site-page .food-body { gap:20px; }
  .site-page .macro { margin-bottom:18px; }
  .site-page .macro .m-head { align-items:baseline; font-size:12px; gap:4px 8px; margin-bottom:6px; }
  .site-page .macro .m-val { white-space:nowrap; margin-inline-start:auto; font-size:11px; }
  .site-page .macro .m-val b { font-size:22px; }
  .site-page .macro .m-track { height:10px; }
  .site-page .macro .m-foot { font-size:11px; line-height:1.5; margin-top:5px; }
  .site-page .macro-row { gap:14px; }
  .site-page .macro.small .m-head { display:block; }
  .site-page .macro.small .m-val { display:block; margin-top:3px; }
  .site-page .macro.small .m-val b { font-size:19px; }
  .site-page .macro.small .m-track { height:8px; }
  .site-page .save { font-size:13px; min-height:44px; padding:0 18px; }
  .site-page .food-add { margin-top:0; }
  .site-page .meal { grid-template-columns:minmax(0,1fr) auto 32px; gap:4px 8px; padding:12px 0; font-size:12px; }
  .site-page .meal-at { grid-column:1; grid-row:1; font-size:10px; }
  .site-page .meal-name { grid-column:1; grid-row:2; line-height:1.5; }
  .site-page .meal-kcal { grid-column:2; grid-row:2; font-size:11px; align-self:start; line-height:1.65; }
  .site-page .meal .del { grid-column:3; grid-row:1 / span 2; width:32px; height:44px; }
  .site-page .meal-empty { font-size:12px; line-height:1.6; }
  .site-page .week { margin-top:18px; }
  .site-page .wk-title { font-size:11px; }
  .site-page .wk-row { gap:6px; }
  .site-page .dash .sec-title { margin:28px 0 10px; }
  .site-page .dash .sec-sub { font-size:13px; line-height:1.65; margin:0; }
  .site-page .goal-line { display:flex; gap:6px; font-size:12px; line-height:1.5; margin:16px 0 0; }
  .site-page .goal-line .g { flex-basis:100%; font-size:12px; margin-bottom:2px; }
  .site-page .goal-line .gv { padding:5px 8px; font-size:11px; }
  .site-page .goal-line button { min-height:44px; padding:5px 0; font-size:12px; }
  .site-page .entry { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px 10px; }
  .site-page .entry label { position:relative; min-width:0; font-size:11px; line-height:1.5; gap:6px; }
  .site-page .entry .fld { padding:0 8px; gap:0; min-width:0; }
  .site-page .entry .unit { position:absolute; top:0; right:0; font-size:10px; }
  .site-page .entry input { font-size:16px; min-height:44px; padding:10px 0; text-align:center; }
  .site-page .entry input[type=date] { width:100%; min-width:0; font-size:16px; text-align:start; padding:10px 12px; }
  .site-page .saved { font-size:12px; line-height:1.5; }
  .site-page .charts { gap:16px; }
  .site-page .chart { padding:18px 12px 10px; border-radius:20px; }
  .site-page .chart .c-head { gap:8px; margin:0 2px 12px; }
  .site-page .chart .c-label { font-size:13px; }
  .site-page .chart .c-val { font-size:27px; }
  .site-page .chart .c-val small { font-size:11px; }
  .site-page .b-recent table { font-size:12px; }
  .site-page .b-recent th { font-size:10px; padding:10px 4px; }
  .site-page .b-recent td { padding:10px 4px; }
  .site-page .b-recent .del { width:28px; height:36px; }
  /* Dialogs remain readable above the keyboard and inside short screens. */
  .site-page .detail,.site-page .day-dlg,.site-page .goals-dlg,.site-page .meal-dlg,.site-page .ex-dlg,.site-page .pick-dlg { width:calc(100% - 24px); max-width:440px; max-height:calc(100dvh - 32px); overflow-y:auto; padding:20px 18px; border-radius:24px; }
  .site-page .d-q,.site-page .detail .d-title { font-size:22px; line-height:1.3; letter-spacing:-.03em; overflow-wrap:anywhere; }
  .site-page .detail .md h1 { font-size:24px; line-height:1.25; margin-bottom:14px; }
  .site-page .detail .close { font-size:12px; margin-bottom:14px; }
  .site-page .detail .d-head { gap:14px; margin-bottom:16px; }
  .site-page .detail .d-poster { width:88px; border-radius:12px; }
  .site-page .detail .d-date { font-size:11px; line-height:1.5; margin-top:8px; }
  .site-page .detail .d-stars { font-size:15px; letter-spacing:2px; margin-top:8px; }
  .site-page .detail p { font-size:14px; line-height:1.7; }
  .site-page .detail .big-photo { border-radius:16px; margin-bottom:16px; }
  .site-page .lightbox img { border-radius:16px; }
  .site-page .d-hint { font-size:12px; line-height:1.65; margin-top:8px; }
  .site-page .d-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:20px; }
  .site-page .d-foot .clear-btn { flex:1; min-width:0; text-align:start; font-size:12px; line-height:1.5; min-height:44px; }
  .site-page .d-foot .save,.site-page .d-foot .close { min-height:44px!important; flex-shrink:0; font-size:12px; }
  .site-page .day-dlg .rate { gap:8px; margin-top:18px; }
  .site-page .day-dlg .rate button { width:44px; height:44px; }
  .site-page .day-dlg .d-when { font-size:12px; }
  .site-page .goals-dlg .entry { padding:0; }
  .site-page .targets-dlg .entry { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .site-page .presets { margin-bottom:14px; }
  .site-page .presets-l { font-size:11px; }
  .site-page .preset { padding:9px 12px; border-radius:14px; }
  .site-page .preset b { font-size:12px; }
  .site-page .preset span { font-size:11px; }
  .site-page .photo-pick { min-height:120px; border-radius:16px; }
  .site-page .photo-pick span { font-size:12px; gap:8px; }
  .site-page .meal-note { font-size:11px; line-height:1.5; }
  .site-page .meal-note textarea { font-size:16px; line-height:1.5; padding:10px 12px; }
  .site-page .est-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .site-page .est-grid label { font-size:11px; }
  .site-page .est-grid input { min-width:0; font-size:16px; min-height:44px; }
  .site-page .est-items li,.site-page .coach { font-size:12px; line-height:1.6; }
  .site-page .x { top:14px; right:14px; }
  .site-page .ex-dlg .d-when { padding-inline-end:44px; font-size:11px; }
  .site-page .ex-dlg .d-q,.site-page .pick-dlg .d-q { padding-inline-end:44px; min-height:36px; }
  .site-page .ex-pics { gap:8px; margin:14px 0; }
  .site-page .ex-edit { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  .site-page .ex-edit label { font-size:11px; }
  .site-page .ex-edit .fld { padding:0 8px; gap:4px; }
  .site-page .ex-edit input { font-size:16px; min-height:44px; }
  .site-page .ex-edit .unit { font-size:10px; }
  .site-page .ex-steps li { font-size:13px; line-height:1.65; margin-bottom:6px; }
  .site-page .ex-credit { font-size:10px; line-height:1.5; }
  .site-page .pick-search { margin-top:12px; padding:0 12px; }
  .site-page .pick-chips { gap:6px; }
  .site-page .pick-chips button { font-size:11px; min-height:36px; padding:7px 11px; }
  .site-page .pick-list { max-height:48dvh; }
  .site-page .pick-list button { grid-template-columns:36px minmax(0,1fr) 28px; gap:10px; padding:10px 0; }
  .site-page .pick-list img { width:36px; height:36px; border-radius:10px; }
  .site-page .pick-list b { font-size:12px; line-height:1.5; }
  .site-page .pick-list small { font-size:10px; line-height:1.5; }
  .site-page .pick-list .ico { width:28px; height:28px; }
  .site-page .login-wrap { padding:28px 20px; gap:24px; }
  .site-page .signin-intro h1 { font-size:44px; line-height:1.1; margin-bottom:16px; }
  .site-page .signin-intro>p:last-child { font-size:14px; line-height:1.6; }
  .site-page .login { padding:20px; gap:14px; border-radius:20px; }
  .site-page .login .brand small { font-size:12px; }
  .site-page .login input { font-size:16px; }
  .site-page .login .hint { font-size:11px; line-height:1.65; }
  .site-page .login label { font-size:11px; }
  .site-page .nf { min-height:calc(100svh - 24px); border-radius:24px; padding:24px; }
  .site-page .nf h1 { font-size:38px; }
  .site-page .nf p { font-size:14px; line-height:1.6; }
  .site-page .nf a { font-size:13px; min-height:44px; }
}
/* Presentation uses the same phone scale, with persistent slide navigation. */
@media screen and (max-width:640px) {
  .progress-page { padding:12px 12px calc(90px + env(safe-area-inset-bottom)); }
  .progress-header { gap:12px; margin-bottom:14px; flex-wrap:wrap; }
  .progress-header .brand { font-size:13px; gap:8px; }
  .progress-header .brand::before { width:36px; height:36px; font-size:15px; }
  .progress-tools { gap:6px; }
  .progress-tools button { min-height:36px; padding:8px 10px; font-size:10px; }
  .progress-slide { padding:24px 20px; min-height:calc(100svh - 166px); border-radius:24px; }
  .progress-eyebrow { font-size:11px; line-height:1.5; margin-bottom:16px; }
  .progress-slide h2 { font-size:30px; line-height:1.12; letter-spacing:-.04em; margin-bottom:22px; }
  .progress-cover h2 { font-size:42px; margin-top:24px; }
  .progress-lead { font-size:16px; line-height:1.65; }
  .progress-body { font-size:14px; line-height:1.7; margin-top:18px; }
  .progress-cover-bottom { font-size:12px; line-height:1.6; gap:12px; padding-top:30px; }
  .progress-source { font-size:10px; line-height:1.65; padding-top:24px; }
  .progress-totals { gap:12px; margin:6px 0 28px; }
  .progress-totals strong { font-size:46px; }
  .progress-totals span { font-size:11px; line-height:1.5; margin-top:8px; }
  .progress-training,.progress-body-split,.progress-then-now { gap:22px; }
  .progress-calendar { gap:6px; }
  .progress-day { padding:10px 2px; border-radius:12px; }
  .progress-day span { font-size:16px; }
  .progress-day b { font-size:10px; }
  .progress-caption { font-size:11px; line-height:1.6; margin-top:12px; }
  .progress-events { gap:18px; }
  .progress-events article { padding-top:14px; }
  .progress-events time { font-size:11px; }
  .progress-events h3 { font-size:18px; line-height:1.35; margin:6px 0; }
  .progress-events p { font-size:14px; line-height:1.65; }
  .progress-food { gap:18px 12px; }
  .progress-food img { height:auto; aspect-ratio:1; border-radius:14px; }
  .progress-films { gap:18px 10px; }
  .progress-films img { height:auto; aspect-ratio:2 / 3; border-radius:10px; }
  .progress-food figcaption,.progress-films figcaption { font-size:11px; line-height:1.5; margin-top:8px; }
  .progress-food figcaption span,.progress-films figcaption span { font-size:10px; }
  .progress-measures span { font-size:12px; }
  .progress-measures strong { font-size:26px; }
  .progress-measures small { font-size:14px; }
  .progress-big-number { font-size:60px; }
  .progress-big-number span { font-size:15px; line-height:1.6; }
  .progress-then-now h3 { font-size:13px; }
  .progress-then-now p { font-size:18px; line-height:1.55; margin-top:14px; }
  .progress-then-now span { font-size:11px; }
  .progress-next p { font-size:14px; line-height:1.6; gap:5px; padding:14px 0; }
  .progress-return { font-size:13px; }
  .progress-controls { position:fixed; bottom:calc(10px + env(safe-area-inset-bottom)); left:12px; right:12px; background:var(--outer); padding:8px 10px; border-radius:24px; z-index:10; gap:8px; }
  #progress-count { font-size:11px; }
  .progress-controls nav { gap:4px; }
  .progress-controls nav>button { width:40px; height:44px; font-size:18px; }
  .progress-dots button { width:16px; height:44px; }
}
@media screen and (max-width:359px) {
  .site-page .section-title .when { flex-basis:100%; text-align:start; margin-inline-start:0; }
  .site-page .ses-foot { justify-content:flex-start; }
  .site-page .ses-foot .pill-btn { margin-inline-start:0; }
  .site-page .b-recent th,.site-page .b-recent td { padding-inline-start:2px; padding-inline-end:2px; font-size:10px; }
  .site-page .b-recent .del { width:24px; }
  .progress-header { align-items:center; }
  .progress-header .brand { width:100%; }
  .progress-tools { margin-inline-start:44px; }
  .progress-dots button { width:14px; }
  .progress-controls { padding:6px 8px; }
}
@media screen and (max-width:640px) {
  .site-page .section-title .when { letter-spacing:normal; }
  .site-page.recipes-page .tile .t-name { min-height:2.9em; }
  .site-page .goal-line { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; align-items:stretch; }
  .site-page .goal-line .g { grid-column:1 / -1; }
  .site-page .goal-line .gv { display:flex; align-items:center; justify-content:center; text-align:center; min-height:44px; padding:7px 6px; border-radius:12px; }
  .site-page .goal-line button { grid-column:1 / -1; justify-self:start; }
  .site-page .recent .row:not(:has(.r-ex)) .r-date { grid-row:1 / span 2; }
}

/* Workouts hero subtitle = a random Goggins line per load (his request 2026-09-12) */
.site-page .site-hero .page-sub small { display: block; margin-top: 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #ee9178; }

/* ---------- food: add new / browse previous (2026-09-14) ---------- */
.food-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 6px; }
.food-actions .food-add { margin-top: 0; }
.food-browse { min-height: 50px; justify-content: center; margin-inline-start: 0; padding: 0 18px 0 14px; font-size: 14px; }
.browse-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; max-height: 60vh; overflow-y: auto; padding-bottom: 4px; }
.bm { display: grid; gap: 3px; text-align: start; background: var(--band); border-radius: var(--r-inner); padding: 10px 10px 12px; min-width: 0; align-content: start; }
.bm:hover { background: var(--coral-soft); }
.bm-pic { width: 100%; aspect-ratio: 1; border-radius: 14px; background: var(--card); overflow: hidden; display: grid; place-items: center; margin-bottom: 6px; }
.bm-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bm-pic .ico { width: 44px; height: 44px; }
.bm b { font-weight: 700; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bm span { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bm small { font-size: 11px; color: var(--ink-3); font-weight: 600; }
.p-pic img { width: 96px; height: 96px; border-radius: 16px; object-fit: cover; display: block; margin-top: 12px; }
.p-nums { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.d-actions { display: inline-flex; gap: 8px; }
@media (max-width: 640px) {
  .food-actions { grid-template-columns: 1fr; }
  .browse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* =====================================================================
   v6 (2026-09-14): Mono charts + better-* polish
   Charts follow amicro's Mono Charts: one ink colour, 3 px rounded splines, dashed grey secondary
   series, dashed horizontal grid only, no axis lines, 10 px grey ticks, an inset rounded stage
   (card radius − padding = stage radius), pill bars, a footer line with the legend.
   ===================================================================== */

/* ---- line charts ---- */
.chart { padding: 12px; }
.chart .c-head { margin: 8px 10px 10px; }
.chart .c-stage { position: relative; background: var(--band); border-radius: 16px; padding: 8px; }
.chart .c-empty { color: var(--ink-2); font-size: 14px; padding: 18px 10px; margin: 0; }
.chart svg text { font-size: 10px; font-weight: 500; fill: #A1A1AA; }
.chart .grid { stroke: rgba(18, 18, 20, 0.07); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .goal { stroke: rgba(18, 18, 20, 0.28); stroke-width: 1.5; stroke-dasharray: 4 4; stroke-linecap: round; }
.chart .goal-t { fill: var(--ink-2); font-weight: 600; }
.chart .line { fill: none; stroke: #A1A1AA; stroke-width: 2; stroke-dasharray: 4 4; stroke-linecap: round; stroke-linejoin: round; opacity: 1; }
.chart .avg { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart .pt { fill: var(--band); stroke: #A1A1AA; stroke-width: 2; }
.chart .pt.last { fill: var(--ink); stroke: var(--band); stroke-width: 2; }
.chart .pt.hot { fill: var(--ink); stroke: #A1A1AA; stroke-width: 2; r: 6; }
.chart .cross { stroke: rgba(18, 18, 20, 0.25); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0; }
.chart .lbl { fill: var(--ink); font-weight: 700; font-size: 11px; }
.chart .c-foot { display: flex; align-items: center; gap: 14px; margin: 10px 10px 2px; padding-top: 8px; border-top: 1px solid rgba(18, 18, 20, 0.06); font-size: 11px; font-weight: 600; color: var(--ink-2); }
.chart .c-foot span { display: inline-flex; align-items: center; gap: 6px; }
.chart .c-foot i { display: inline-block; width: 14px; height: 0; border-top: 3px solid var(--ink); border-radius: 2px; }
.chart .c-foot i.k-raw { border-top: 2px dashed #A1A1AA; }
.chart .c-foot b { margin-inline-start: auto; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.tooltip .t-avg { font-size: 12px; opacity: 0.75; margin-top: 2px; }

/* ---- 7-day calorie strip: pill bars on a stage ---- */
.wk-stage { background: var(--band); border-radius: 16px; padding: 12px 10px 8px; }
.wk-row { gap: 6px; }
.wk-bar { height: 56px; border-radius: var(--r-pill); background: rgba(18, 18, 20, 0.06); justify-content: center; }
.wk-bar i { width: 16px; max-width: 100%; border-radius: var(--r-pill); background: var(--ink); min-height: 0; }
.wk-bar i.over { background: var(--coral); }
.wk-day.none .wk-bar { background: repeating-linear-gradient(135deg, rgba(18, 18, 20, 0.06) 0 4px, transparent 4px 8px); }
.wk-p { width: 8px; height: 8px; border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1.5px rgba(18, 18, 20, 0.25); }
.wk-p.hit { background: var(--ink); box-shadow: none; }
.wk-l { font-size: 10px; font-weight: 600; color: #A1A1AA; }

/* ---- macro meters: ink fill, coral only when over ---- */
.macro .m-track { height: 10px; background: rgba(18, 18, 20, 0.06); }
.macro .m-fill { background: var(--ink); }
.macro .m-fill.over { background: var(--coral); }
.macro .m-fill.hit { background: var(--ink); }
.macro.small .m-track { height: 8px; }

/* ---- goal ring + goal bar: monochrome ---- */
.ring .track { stroke: rgba(255, 255, 255, 0.12); }
.ring .bar { stroke: #fff; }
.goal-bar .gb-fill { background: var(--ink); }
.goal-bar .gb-val { color: var(--ink); }
.goal-bar .gb-track { background: rgba(18, 18, 20, 0.06); }

/* ---- heatmap: rounded mono tiles ---- */
.cell, .legend i, .row .meter i { border-radius: 4px; }
.cell { background: rgba(18, 18, 20, 0.06); }
.legend i, .row .meter i { background: rgba(18, 18, 20, 0.06); }
.cell.future { border-color: rgba(18, 18, 20, 0.12); }

/* ---- concentric radii (better-ui): outer = inner + padding ---- */
.dash { border-radius: 42px; }
@media (max-width: 640px) { .dash { border-radius: 38px; } }
.bm { border-radius: 24px; }
.bm-pic { border-radius: 14px; }
.photo-pick { border-radius: 16px; }

/* ---- typography (better-typography) ---- */
.page-title, .hero-day, .t-q, .d-q, .sec-title, .section-title, .grid-title, .ses-title, .food-title, .recent h2, .b-recent h2, .detail .d-title, .md h2, .login h1, .signin-intro h1 { text-wrap: balance; }
.page-sub, .sec-sub, .d-hint, .hero-sub, .md p, .ex-steps li, footer p, .ex-empty, .meal-empty, .pick-empty, .c-empty, .coach, .empty, .t-state { text-wrap: pretty; }
.ses-count, .r-ex, .m-val, .meal-kcal, .meal-p, .est-items li span:last-child, .p-nums, .bm span, .pc-ex small, .ex-main span, .grid-note, .c-foot b, .wk-title { font-variant-numeric: tabular-nums lining-nums; }
.bm b, .pc-ex b, .ex-main b { line-height: 1.3; }
.ex-steps li, .md li, .coach, .d-hint, .sec-sub { line-height: 1.5; }
.days span, .months span, .wk-l { letter-spacing: 0.02em; }

/* ---- touch + pointer behaviour (better-accessibility) ---- */
button, a, input, select, textarea, label, summary { touch-action: manipulation; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
dialog { overscroll-behavior: contain; }
@media (hover: none) {
  .bm:hover, .preset:hover { background: var(--band); }
  .pick-list button:hover .ico { background: var(--band); }
  .cell:hover { transform: none; }
  .rate button:hover, .ex-check:hover, .pill-btn:hover, .close:hover { border-color: var(--line); }
  .ex-main:hover b, .pc-ex:hover b, .row:hover .r-date, .b-recent tr.pick:hover td:first-child { color: inherit; }
}

/* ---- hit areas: 36 px+ for small controls, extended zones for text-link buttons ---- */
.b-recent .del, .meal .del { width: 36px; height: 36px; margin: -4px; }
.food-edit, .goal-line button, .clear-btn, .today-row .clear-btn { position: relative; }
.food-edit::after, .goal-line button::after, .clear-btn::after { content: ""; position: absolute; inset: -10px -8px; }

/* ---- press feedback: always scale(0.96), never less ---- */
.save:active, .pill-btn:active, .close:active, .ex-check:active, .bm:active, .preset:active, .rate button:active, .seg button:active, .pc-ex:active, .x:active { transform: scale(0.96); }

/* ---- image outlines: 1 px low-opacity pure black for consistent depth ---- */
.ex-img, .pc-ex img, .bm-pic img, .p-pic img, .ex-pics img, .recipe .photo, .tile .ph, .card .poster, .meal-preview, .detail .big-photo, .detail .d-poster, .pick-list img { outline: 1px solid rgba(0, 0, 0, 0.08); outline-offset: -1px; }

/* ---- skip link (first focusable element on every page) ---- */
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 100; background: var(--ink); color: #fff; border-radius: var(--r-pill); padding: 10px 16px; font-weight: 600; font-size: 14px; transform: translateY(-200%); }
.skip-link:focus { transform: none; outline: 2px solid #fff; outline-offset: 2px; }
