:root {
  --bg: #f6f2eb;
  --bg-deep: #efe8dd;
  --surface: #ffffff;
  --surface-2: #fbf8f3;
  --ink: #1f1b16;
  --ink-2: #5b5248;
  --muted: #9a8f82;
  --line: #ebe3d6;
  --gold: #b08d57;
  --gold-deep: #8a6b3d;
  --gold-soft: #f3eadb;
  --sage: #6f8f78;
  --sage-soft: #e6efe8;
  --rose: #bf7d6c;
  --rose-soft: #f6e7e2;
  --sky: #6f95b3;
  --sky-soft: #e5eef5;
  --shadow-sm: 0 1px 2px rgba(60, 45, 25, 0.05), 0 2px 8px rgba(60, 45, 25, 0.04);
  --shadow: 0 2px 6px rgba(60, 45, 25, 0.04), 0 12px 32px rgba(60, 45, 25, 0.07);
  --radius: 22px;
  --radius-sm: 14px;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --tabbar-h: 78px;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: radial-gradient(1200px 600px at 50% -200px, #fffdf9 0%, var(--bg) 60%, var(--bg-deep) 100%) fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }

/* ---------- App frame ---------- */
.app {
  position: relative;
  max-width: 460px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
}
@media (min-width: 620px) {
  body { padding: 28px 0; }
  .app {
    min-height: calc(100dvh - 56px);
    background: rgba(255, 253, 249, 0.6);
    border: 1px solid var(--line);
    border-radius: 40px;
    box-shadow: var(--shadow);
    overflow: hidden;
  }
}

.view { animation: rise 0.35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.eyebrow { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.title { font-family: var(--serif); font-size: 34px; line-height: 1.05; font-weight: 600; letter-spacing: -0.01em; margin-top: 4px; }
.title em { font-style: italic; color: var(--gold-deep); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #fff, var(--gold-soft));
  border: 1px solid var(--line);
  font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--gold-deep);
  box-shadow: var(--shadow-sm);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}
.card.flat { box-shadow: none; background: var(--surface-2); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.card-sub { font-size: 12.5px; color: var(--muted); }
.section-label { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 22px 4px 10px; }

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, #fffdf8 0%, #f7eedf 55%, #efe1c8 100%);
  border: 1px solid #e8dac2;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(176, 141, 87, 0.18), transparent 70%);
}
.hero .big { font-family: var(--serif); font-size: 44px; line-height: 1; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hero .label { font-size: 12.5px; color: var(--ink-2); }

.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tnum { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--serif); }
.gold { color: var(--gold-deep); }
.sage { color: var(--sage); }
.rose { color: var(--rose); }

/* ---------- Progress ---------- */
.bar { height: 6px; border-radius: 99px; background: rgba(176, 141, 87, 0.14); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), #d2b27c); transition: width 0.6s ease; }
.bar.sky > i { background: linear-gradient(90deg, var(--sky), #9dbcd4); }
.bar.sage > i { background: linear-gradient(90deg, var(--sage), #9fbaa6); }

.ring { position: relative; display: grid; place-items: center; }
.ring svg { transform: rotate(-90deg); }
.ring .ring-track { stroke: var(--gold-soft); }
.ring .ring-fill { transition: stroke-dashoffset 0.8s cubic-bezier(.2,.8,.2,1); stroke-linecap: round; }
.ring .ring-center { position: absolute; text-align: center; }
.ring .ring-value { font-family: var(--serif); font-size: 22px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.ring .ring-unit { font-size: 10.5px; color: var(--muted); letter-spacing: 0.04em; }
.ring-label { text-align: center; font-size: 11.5px; color: var(--ink-2); margin-top: 6px; font-weight: 600; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 99px;
  background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(31, 27, 22, 0.18);
  transition: transform 0.15s ease, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn.gold { background: linear-gradient(135deg, #c3a06a, var(--gold-deep)); box-shadow: 0 6px 18px rgba(138, 107, 61, 0.3); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 99px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  transition: all 0.2s;
}
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; margin-bottom: 12px; }
.chips::-webkit-scrollbar { display: none; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 11.5px; font-weight: 700; background: var(--gold-soft); color: var(--gold-deep); }
.pill.sage { background: var(--sage-soft); color: var(--sage); }
.pill.sky { background: var(--sky-soft); color: var(--sky); }
.pill.rose { background: var(--rose-soft); color: var(--rose); }

.segmented { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 4px; margin-bottom: 14px; }
.segmented button { flex: 1; height: 36px; border-radius: 99px; font-size: 13px; font-weight: 700; color: var(--muted); transition: all 0.2s; }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- Meals timeline ---------- */
.timeline { position: relative; }
.meal { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.meal:first-child { border-top: 0; padding-top: 2px; }
.meal .time { font-size: 13px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.meal .slot { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.meal .name { font-weight: 700; font-size: 14.5px; line-height: 1.3; margin-top: 1px; }
.meal .macros { font-size: 12px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.meal.done .name { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(154, 143, 130, 0.5); }
.meal.next .time { color: var(--gold-deep); }
.check {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface);
  display: grid; place-items: center; transition: all 0.2s;
}
.check svg { width: 16px; height: 16px; opacity: 0; transform: scale(0.6); transition: all 0.2s; }
.check.on { background: var(--sage); border-color: var(--sage); color: #fff; }
.check.on svg { opacity: 1; transform: none; }

/* ---------- Water ---------- */
.water-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.water-actions button { height: 42px; border-radius: 14px; background: var(--sky-soft); color: #4f7898; font-weight: 700; font-size: 13.5px; transition: transform 0.15s; }
.water-actions button:active { transform: scale(0.96); }
.water-actions button.minus { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 11.5px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px 4px; letter-spacing: 0.02em; }
.input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2); outline: none; font-size: 16px;
  transition: border-color 0.2s, background 0.2s;
}
textarea.input { height: 84px; padding: 12px 14px; resize: none; }
.input:focus { border-color: var(--gold); background: #fff; }
.input-suffix { position: relative; }
.input-suffix em { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 13px; color: var(--muted); pointer-events: none; }
.inline-input { display: flex; gap: 8px; }
.inline-input .input { flex: 1; }

/* ---------- Stats ---------- */
.stat { padding: 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.stat .k { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.stat .v { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .d { font-size: 12px; font-weight: 700; margin-top: 2px; }

/* ---------- Chart ---------- */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis { font-size: 10px; fill: var(--muted); font-family: var(--sans); }
.chart .line { fill: none; stroke: var(--gold-deep); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart .avg { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: 0.7; }
.chart .area { fill: url(#goldFade); }
.chart .dot { fill: #fff; stroke: var(--gold-deep); stroke-width: 2; }
.chart .goal { stroke: var(--sage); stroke-width: 1.5; stroke-dasharray: 2 5; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 5px; background: var(--gold-deep); }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--gold) 0 4px, transparent 4px 8px); }
.legend i.goal { background: repeating-linear-gradient(90deg, var(--sage) 0 2px, transparent 2px 6px); }

/* ---------- Lists ---------- */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.list-item:first-child { border-top: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t { font-weight: 700; font-size: 14px; }
.list-item .s { font-size: 12px; color: var(--muted); }
.chev { color: var(--muted); }

.recipe-card { display: flex; gap: 14px; align-items: center; }
.recipe-thumb {
  width: 54px; height: 54px; border-radius: 16px; flex: none; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-soft), #fff); border: 1px solid var(--line); color: var(--gold-deep);
}

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding: 0 0 18px 44px; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-deep); font-weight: 800; font-size: 13px;
}
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 14.5px; top: 32px; bottom: 4px; width: 1px; background: var(--line); }
.ingredients { list-style: none; margin: 0; padding: 0; }
.ingredients li { padding: 9px 0 9px 22px; border-top: 1px solid var(--line); position: relative; font-size: 14px; }
.ingredients li:first-child { border-top: 0; }
.ingredients li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---------- Exercises ---------- */
.block-name { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 8px; }
.exercise { padding: 14px 0; border-top: 1px solid var(--line); }
.exercise:first-child { border-top: 0; padding-top: 0; }
.exercise .t { font-weight: 700; font-size: 14.5px; }
.exercise .cue { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.exercise .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 460px; z-index: 30;
  padding: 8px 14px calc(env(safe-area-inset-bottom) + 10px);
}
@media (min-width: 620px) { .tabbar { bottom: 28px; padding-bottom: 12px; } }
.tabbar nav {
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: 64px; border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(235, 227, 214, 0.9);
  box-shadow: 0 10px 30px rgba(60, 45, 25, 0.12);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0.03em; transition: color 0.2s; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.on { color: var(--ink); }
.tabbar a.on svg { color: var(--gold-deep); }

/* ---------- Sheet (modal) ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(31, 27, 22, 0.28); backdrop-filter: blur(3px); animation: fade 0.2s ease both; }
.sheet {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 51;
  width: 100%; max-width: 460px; max-height: 92dvh; overflow-y: auto;
  background: var(--bg); border-radius: 28px 28px 0 0; padding: 10px 18px calc(env(safe-area-inset-bottom) + 22px);
  box-shadow: 0 -10px 40px rgba(31, 27, 22, 0.15);
  animation: slideUp 0.32s cubic-bezier(.2,.8,.2,1) both;
}
.sheet .grabber { width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slideUp { from { transform: translate(-50%, 100%); } }

/* ---------- Timer pill ---------- */
.timer-pill {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 40;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 18px; border-radius: 99px;
  background: var(--ink); color: #fff; box-shadow: 0 12px 30px rgba(31, 27, 22, 0.3);
  animation: rise 0.25s ease both;
}
@media (min-width: 620px) { .timer-pill { bottom: calc(var(--tabbar-h) + 44px); } }
.timer-pill .tlabel { font-size: 11px; opacity: 0.7; letter-spacing: 0.04em; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer-pill .tval { font-family: var(--serif); font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; }
.timer-pill button { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.12); display: grid; place-items: center; }
.timer-pill.done { background: linear-gradient(135deg, #c3a06a, var(--gold-deep)); animation: pulse 1s ease infinite; }
@keyframes pulse { 50% { transform: translateX(-50%) scale(1.04); } }

.timer-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; height: 30px; padding: 0 12px; border-radius: 99px; background: var(--gold-soft); color: var(--gold-deep); font-size: 12px; font-weight: 800; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 14px); transform: translateX(-50%); z-index: 60;
  padding: 10px 18px; border-radius: 99px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow); animation: rise 0.25s ease both;
}

.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty .serif { font-size: 22px; color: var(--ink); margin-bottom: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 12px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.quote { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; color: var(--ink-2); }

/* Lining figures for every serif number (Cormorant defaults to old-style). */
.title, .big, .ring-value, .stat .v, .serif, .tval, .card-title, .steps li::before { font-variant-numeric: lining-nums tabular-nums; }
.pill { white-space: nowrap; }
.btn svg { width: 18px; height: 18px; flex: none; }
.timer-btn { white-space: nowrap; }
.timer-btn svg, .back svg, .chev svg { width: 16px; height: 16px; flex: none; }
.chev { display: inline-flex; }
.recipe-thumb svg { width: 24px; height: 24px; }
.timer-pill button svg { width: 18px; height: 18px; }
.timer-pill { animation: pillIn 0.25s ease both; }
.timer-pill.done { animation: pillPulse 1s ease infinite; }
@keyframes pillIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pillPulse { 0%, 100% { transform: translate(-50%, 0) scale(1); } 50% { transform: translate(-50%, 0) scale(1.04); } }

/* ---------- Shopping ---------- */
.price-box { position: relative; width: 92px; flex: none; }
.price-box .input { height: 42px; padding: 0 38px 0 10px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-box em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 10.5px; color: var(--muted); font-weight: 700; pointer-events: none; }
.shop-row .diff { font-weight: 700; }
.shop-row .diff:empty { display: none; }

/* ---------- Timer stack (several timers at once) ---------- */
.timer-stack {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 40;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: calc(100% - 32px); max-width: 428px; pointer-events: none;
}
@media (min-width: 620px) { .timer-stack { bottom: calc(var(--tabbar-h) + 44px); } }
.timer-stack .timer-pill { position: static; transform: none; pointer-events: auto; animation: stackIn 0.25s ease both; }
.timer-stack .timer-pill.done { animation: stackPulse 1s ease infinite; }
@keyframes stackIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes stackPulse { 50% { transform: scale(1.04); } }
body.immersive .timer-stack { bottom: calc(env(safe-area-inset-bottom) + 96px); }

/* ---------- Cook mode ---------- */
body.immersive .tabbar { display: none; }
body.immersive .app { padding-bottom: calc(env(safe-area-inset-bottom) + 110px); }
.cook-top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 8px; margin-bottom: 12px; }
.cook-close { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); }
.cook-close svg { width: 18px; height: 18px; }
.cook-title { text-align: center; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.cook-count { text-align: right; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.cook-progress { display: flex; gap: 4px; margin-bottom: 22px; }
.cook-progress i { flex: 1; height: 4px; border-radius: 99px; background: var(--line); transition: background 0.3s; }
.cook-progress i.past { background: var(--gold); }
.cook-progress i.now { background: var(--gold-deep); }
.cook-heading { font-family: var(--serif); font-size: 36px; line-height: 1.08; font-weight: 600; margin: 6px 0 10px; }
.cook-step { font-family: var(--serif); font-size: 30px; line-height: 1.22; font-weight: 500; margin: 10px 0 24px; color: var(--ink); }
.cook-timer { position: relative; width: 220px; height: 220px; margin: 8px auto 16px; }
.cook-timer .ct-fill { transition: stroke-dashoffset 0.3s linear; }
.ct-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ct-value { font-family: var(--serif); font-size: 54px; font-weight: 600; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.ct-label { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 600; max-width: 150px; }
.cook-timer-actions { display: flex; justify-content: center; gap: 10px; margin-bottom: 18px; }
.cook-timer-actions [hidden] { display: none; }
.cook-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 35;
  width: 100%; max-width: 460px; display: flex; gap: 10px; justify-content: space-between;
  padding: 14px 16px calc(env(safe-area-inset-bottom) + 16px);
  background: linear-gradient(to top, var(--bg) 70%, rgba(246, 242, 235, 0));
}
@media (min-width: 620px) { .cook-nav { bottom: 28px; border-radius: 0 0 40px 40px; } }
.cook-nav .btn { flex: 1; height: 54px; font-size: 15px; }
.cook-nav .btn[disabled] { opacity: 0.4; }
.mise { border-radius: 0; }
.mise.on .grow { color: var(--muted); text-decoration: line-through; }
.cook-done { text-align: center; padding-top: 30px; }
.cook-done-mark {
  width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #c3a06a, var(--gold-deep)); color: #fff; box-shadow: 0 12px 30px rgba(138, 107, 61, 0.35);
}
.cook-done-mark svg { width: 40px; height: 40px; }

/* Reserve room for running timers so they never hide content */
.app { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px + var(--timer-count, 0) * 70px); }
body.immersive .app { padding-bottom: calc(env(safe-area-inset-bottom) + 110px + var(--timer-count, 0) * 70px); }
.timer-stack .timer-pill .tlabel { max-width: 210px; }
.hero .big, .ring .ring-value, .stat .v, .timer-pill .tval, .ct-center .ct-value { font-variant-numeric: lining-nums tabular-nums; }

/* ---------- Workout logger ---------- */
.workout-bar {
  position: sticky; top: 0; z-index: 20; margin: -18px -16px 14px; padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 10px;
  background: rgba(246, 242, 235, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.exercise .last { font-size: 12px; color: var(--ink-2); margin-top: 8px; font-variant-numeric: tabular-nums; }
.hint { font-size: 12px; font-weight: 700; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin-top: 8px; }
.hint.up { color: var(--sage); background: var(--sage-soft); border-color: transparent; }
.set-head, .set-row { display: grid; grid-template-columns: 28px 1fr 1fr 40px; gap: 8px; align-items: center; }
.set-head { margin-top: 12px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.set-row { margin-top: 8px; }
.set-no { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-deep); font-weight: 800; font-size: 12px; }
.set-field { position: relative; }
.set-field .input { height: 44px; padding: 0 30px 0 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.set-field .input::placeholder { color: #c4b9aa; font-weight: 600; }
.set-field em { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11px; color: var(--muted); font-weight: 700; pointer-events: none; }
.set-row.done .set-field .input { background: var(--sage-soft); border-color: transparent; }
.set-row.done .set-no { background: var(--sage); color: #fff; }
.set-row .check { width: 40px; height: 40px; }

/* ---------- Weekly report ---------- */
.grade {
  width: 92px; height: 92px; flex: none; border-radius: 28px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 50px; font-weight: 700; color: #fff; letter-spacing: -0.02em;
  background: linear-gradient(145deg, #c9a874, var(--gold-deep)); box-shadow: 0 12px 28px rgba(138, 107, 61, 0.35);
}
.day-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 150px; }
.day-bar { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.day-bar span { font-size: 11px; font-weight: 800; color: var(--ink-2); height: 14px; }
.day-bar > div { position: relative; flex: 1; width: 100%; max-width: 30px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; display: flex; align-items: flex-end; }
.day-bar > div i { display: block; width: 100%; border-radius: 8px; transition: height 0.6s cubic-bezier(.2,.8,.2,1); }
.day-bar > div b { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--sage); }
.day-bar em { font-style: normal; font-size: 11px; font-weight: 800; color: var(--muted); }
.day-bar.future > div { opacity: 0.45; }
.win-mark { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--sage-soft); color: var(--sage); }
.win-mark svg { width: 14px; height: 14px; }

/* ---------- Sign in ---------- */
.auth { padding-top: 8vh; }
.auth-mark {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 24px; display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-size: 46px; font-weight: 600; color: #fff;
  background: linear-gradient(145deg, #c9a874, var(--gold-deep)); box-shadow: 0 14px 30px rgba(138, 107, 61, 0.3);
}
button.list-item { border-left: 0; border-right: 0; border-bottom: 0; background: none; font: inherit; color: inherit; }
