/* Lenus light theme is the default; dark follows the system. */
:root {
  color-scheme: light;
  --bg: #eceef0;
  --card: #ffffff;
  --card2: #f3f4f6;
  --line: #dfe3e7;
  --text: #15191c;
  --muted: #59626a;
  --accent: #1f5c3a;
  --accent-ink: #ffffff;
  --warn: #8a5200;
  --bad: #c43b3b;
  --good: #2a8a4d;
  --bad-bg: #fbe9e9;
  --bad-line: #efc2c2;
  --good-bg: #e3f3e8;
  --warn-bg: #fbf0dc;
  --warn-line: #ecd3a0;
  --adj-bg: #e6f1ea;
  --adj-line: #b9d6c4;
  --on-bad: #ffffff;
  --tabbar: rgba(255, 255, 255, 0.92);
  --scrim: rgba(20, 24, 28, 0.45);
  --shadow: rgba(20, 30, 40, 0.18);
  --soft: rgba(0, 0, 0, 0.08);
  --r: 20px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f1113;
    --card: #181b1f;
    --card2: #20242a;
    --line: #2a2f36;
    --text: #eef0f2;
    --muted: #8b939c;
    --accent: #c6f06b;
    --accent-ink: #14200a;
    --warn: #f2b35b;
    --bad: #ef6b6b;
    --good: #7ddc8f;
    --bad-bg: #3a1d1f;
    --bad-line: #5a2a2a;
    --good-bg: #1d3322;
    --warn-bg: #2a2214;
    --warn-line: #5a4a2a;
    --adj-bg: #1a2112;
    --adj-line: #4b5a2a;
    --on-bad: #ffffff;
    --tabbar: rgba(15, 17, 19, 0.92);
    --scrim: rgba(0, 0, 0, 0.55);
    --shadow: rgba(0, 0, 0, 0.4);
    --soft: rgba(0, 0, 0, 0.15);
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--bad); min-height: 1.2em; }
h1 { font-size: 28px; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 28px 4px 10px; font-weight: 600; }

.screen { padding: calc(var(--safe-t) + 16px) 16px calc(var(--safe-b) + 96px); max-width: 560px; margin: 0 auto; }

/* login */
#login { display: grid; place-items: center; min-height: 100vh; }
.login-box { width: 100%; max-width: 320px; display: grid; gap: 12px; text-align: center; }

/* inputs and buttons */
input, select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--card2);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none; min-height: 44px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 70px; resize: vertical; }
.btn {
  font: inherit; font-weight: 600; border: 0; border-radius: 12px; padding: 12px 16px;
  background: var(--card2); color: var(--text); cursor: pointer; min-height: 44px;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.bad { background: transparent; color: var(--bad); border: 1px solid var(--bad-line); }
.btn.small { padding: 8px 12px; font-size: 14px; min-height: 44px; min-width: 44px; }
.btn:active { transform: scale(0.98); }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label.f { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }

/* header */
.head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 17px; }

.banner { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-top: 16px; font-size: 14px; }
.banner.adj { border-color: var(--adj-line); background: var(--adj-bg); }
.banner.adj b { color: var(--accent); }
.banner .btn { margin-top: 10px; width: 100%; }

.targets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.targets div { background: var(--card); border-radius: 12px; padding: 10px 8px; text-align: center; }
.targets b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.targets small { color: var(--muted); font-size: 11px; }

/* tasks */
.task {
  background: var(--card); border-radius: var(--r); margin-bottom: 8px; padding: 14px;
  border: 1px solid transparent; transition: opacity 0.2s;
}
.task.now { border-color: var(--accent); }
.task.done, .task.partial { opacity: 0.55; }
.task.skipped, .task.missed { opacity: 0.45; }
.task .top { display: flex; gap: 12px; align-items: center; }
.task .time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 14px; width: 44px; flex: none; }
.task .title { font-weight: 600; flex: 1; }
.task .state { font-size: 13px; color: var(--muted); }
.task.done .state, .task.partial .state { color: var(--good); }
.task.skipped .state, .task.missed .state { color: var(--bad); }
.task .detail { color: var(--muted); font-size: 14px; margin: 8px 0 0 56px; }
.task .actions { display: none; margin: 12px 0 0 56px; gap: 8px; flex-wrap: wrap; }
.task.open .actions { display: flex; }
.task .actions input { width: 96px; flex: none; padding: 8px 10px; }
.chip { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--card2); color: var(--muted); margin-left: 6px; }
.chip.now { background: var(--accent); color: var(--accent-ink); }

/* week */
.bar { margin-bottom: 14px; }
.bar .lbl { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.bar .track { height: 10px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--accent); border-radius: 99px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { background: var(--card); border-radius: 12px; padding: 8px 4px; text-align: center; font-size: 12px; }
.day b { display: block; font-size: 15px; margin-top: 2px; }
.day.good b { color: var(--good); } .day.mid b { color: var(--warn); } .day.bad b { color: var(--bad); }
.plan-day { background: var(--card); border-radius: 12px; padding: 12px 14px; margin-bottom: 6px; font-size: 14px; }
.plan-day .r { color: var(--accent); font-size: 13px; margin-top: 4px; }
.note { background: var(--card); border-radius: var(--r); padding: 14px; font-size: 15px; white-space: pre-wrap; }

/* check-in */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-slot {
  aspect-ratio: 3/4; border-radius: 12px; background: var(--card2) center/cover no-repeat;
  border: 1px dashed var(--line); display: grid; place-items: center; color: var(--muted); font-size: 13px; position: relative;
}
.photo-slot input { position: absolute; inset: 0; opacity: 0; }
.hist { background: var(--card); border-radius: var(--r); padding: 14px; margin-bottom: 8px; }
.hist .thumbs { display: flex; gap: 6px; margin-top: 10px; }
.hist .thumbs img { width: 64px; height: 86px; object-fit: cover; border-radius: 8px; }
.delta.down { color: var(--good); } .delta.up { color: var(--warn); }

/* setup */
.card { background: var(--card); border-radius: var(--r); padding: 14px; display: grid; gap: 10px; }
.sub-card { background: var(--card2); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.base { font-size: 14px; color: var(--muted); }
.base b { color: var(--text); }
.weekday-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.weekday-pick button { min-height: 44px; padding: 8px 0; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 13px; }
.weekday-pick button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* nav */
#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  background: var(--tabbar); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); padding: 6px 8px calc(var(--safe-b) + 6px);
}
#tabs button {
  flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px;
  display: grid; justify-items: center; gap: 2px; padding: 6px 0;
}
#tabs button .ico { width: 24px; height: 24px; }
#tabs button.active { color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-b) + 84px); transform: translateX(-50%) translateY(20px);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 99px; font-size: 14px; font-weight: 600;
  opacity: 0; transition: all 0.25s; pointer-events: none; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- phase 1: today checklist ---------- */
.head-right { display: flex; align-items: center; gap: 12px; }
.bell { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); color: var(--text); display: grid; place-items: center; padding: 0; }
.bell svg { width: 22px; height: 22px; }
.bell i { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: var(--on-bad); font-size: 11px; font-style: normal; display: grid; place-items: center; padding: 0 4px; }
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 16px; }
.wd { text-align: center; padding: 6px 0; border-radius: 12px; color: var(--muted); }
.wd small { display: block; font-size: 11px; }
.wd b { display: block; font-size: 16px; color: var(--text); }
.wd.today { background: var(--accent); color: var(--accent-ink); }
.wd.today b { color: var(--accent-ink); }
.wd.good b { color: var(--good); } .wd.mid b { color: var(--warn); } .wd.bad b { color: var(--bad); }

.item { background: var(--card); border-radius: var(--r); margin-bottom: 8px; border: 1px solid transparent; }
.item .row-main { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px; min-height: 60px; }
.item .check {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: transparent;
  color: var(--accent-ink); font-size: 20px; font-weight: 700; display: grid; place-items: center; cursor: pointer;
}
.item .body { flex: 1; min-width: 0; cursor: pointer; }
.item .ttl { font-weight: 600; }
.item .sub { color: var(--muted); font-size: 14px; margin-top: 2px; overflow-wrap: anywhere; }
.item .due { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; flex: none; }
.item.is-done .check { background: var(--good); border-color: var(--good); }
.item.is-done .ttl { color: var(--muted); }
.item.is-missed { border-color: var(--bad-line); background: var(--bad-bg); }
.item.is-missed .check { border-color: var(--bad); color: var(--bad); }
.item.is-catch { border-style: dashed; border-color: var(--adj-line); }
.item .panel { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px 66px; }
.item .panel input { width: 120px; flex: none; padding: 8px 10px; }
.item .panel textarea { min-height: 60px; }
.item .panel .btn, .item .panel a.btn { min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.catch { background: var(--adj-bg); color: var(--accent); }
.done-toggle { width: 100%; background: transparent; border: 1px dashed var(--line); color: var(--muted); border-radius: 12px; padding: 10px; font: inherit; font-size: 14px; margin-bottom: 8px; min-height: 44px; }

.fab {
  position: fixed; right: max(16px, calc(50vw - 264px)); bottom: calc(var(--safe-b) + 80px); width: 56px; height: 56px;
  border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 30px; line-height: 1;
  box-shadow: 0 6px 20px var(--shadow); z-index: 5;
}

/* today header and week strip (Lenus front page) */
.greet { font-size: 14px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.head h1 { font-size: 26px; }
.weekstrip { background: var(--card); border-radius: var(--r); padding: 10px 6px; gap: 2px; }
.wd { position: relative; padding: 6px 0 8px; }
.wd .dot { display: block; width: 8px; height: 8px; border-radius: 50%; margin: 4px auto 0; background: var(--line); }
.wd.good .dot { background: var(--good); } .wd.mid .dot { background: var(--warn); } .wd.bad .dot { background: var(--bad); }
.wd.good b, .wd.mid b, .wd.bad b { color: var(--text); }
.wd.today { background: var(--accent); color: var(--accent-ink); }
.wd.today .dot { box-shadow: 0 0 0 2px var(--accent-ink); }
.wd.today.none .dot { background: var(--accent-ink); }
.wd.today b { color: var(--accent-ink); }
.wd.pre b { font-weight: 400; }

/* quick add tiles */
.qa-tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.qa-tile { display: grid; justify-items: center; gap: 6px; align-content: center; min-height: 88px; border: 0; border-radius: var(--r); background: var(--card2); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; padding: 10px 4px; cursor: pointer; }
.qa-tile.on { background: var(--accent); color: var(--accent-ink); }
.qa-tile svg { width: 26px; height: 26px; }
.qa-pane { display: grid; gap: 10px; margin-top: 14px; }

/* sheet */
/* The page behind is locked by openSheet; only .sheet-body scrolls (UI_RULES: sheets). */
#sheet { position: fixed; inset: 0; z-index: 20; overscroll-behavior: contain; }
.sheet-back { position: absolute; inset: 0; background: var(--scrim); touch-action: none; }
.sheet-card {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 88vh; max-height: 88dvh; display: flex; flex-direction: column;
  background: var(--card); border-radius: 20px 20px 0 0; max-width: 560px; margin: 0 auto; will-change: transform;
}
.sheet-top { position: relative; flex: none; height: 48px; touch-action: none; }
.sheet-grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; }
.sheet-x {
  position: absolute; top: 4px; right: 8px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 22px;
  background: var(--card2); color: var(--text); display: grid; place-items: center; cursor: pointer;
}
.sheet-x svg { width: 20px; height: 20px; }
.sheet-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 0 16px calc(var(--safe-b) + 20px);
}
.sheet-card h3 { margin: 4px 0 14px; font-size: 20px; }
.sheet-card .form, .sheet-card .qa { display: grid; gap: 12px; }
.tog { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.tog input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--accent); }
.tog small { display: block; color: var(--muted); font-size: 13px; }
.msg { background: var(--card2); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.msg.unread { border-left: 3px solid var(--accent); }
.msg-top { display: flex; justify-content: space-between; gap: 8px; }
.msg-top small { color: var(--muted); }
.msg-body { margin-top: 6px; font-size: 15px; white-space: pre-wrap; }

/* tasks tab */
.tpl { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: var(--card); border-radius: var(--r); padding: 12px 14px; margin-bottom: 8px; min-height: 56px; cursor: pointer; }
.tpl.locked { cursor: default; opacity: 0.75; }
.tpl .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.tpl .tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.tpl .chip { margin-left: 0; }
#tabs button { min-height: 44px; }

/* ---------- P0-1: Progress sub tabs, module tabs ---------- */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--card); border-radius: 12px; padding: 4px; }
.seg button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.seg button.active { background: var(--card2); color: var(--text); }
.sub-screen { padding-top: 16px; }

/* ---------- phase 5C: progress ---------- */
.pback { min-height: 44px; padding: 0 12px 0 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; margin: -8px 0 0; }
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.pcard { display: grid; gap: 4px; align-content: start; text-align: left; min-height: 104px; padding: 14px; border: 0; border-radius: var(--r); background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.pcard .pt { font-size: 13px; color: var(--muted); font-weight: 600; }
.pcard b { font-size: 24px; line-height: 1.15; }
.pcard .ps { font-size: 13px; color: var(--muted); }
.pcard:active { transform: scale(0.98); }
.tile-link { cursor: pointer; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chipbtn { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.chipbtn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chipbtn:disabled { opacity: 0.4; }
.btn:disabled { opacity: 0.4; cursor: default; }
.chartcard { margin-top: 12px; }
.chart { width: 100%; height: auto; display: block; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-lbl { fill: var(--muted); font-size: 10px; }
.ch-avg { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch-raw { fill: var(--muted); }
.ch-raw.ch-ring { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.ch-goal { stroke: var(--warn); stroke-width: 1.5; stroke-dasharray: 5 4; }
.st-bar { fill: var(--muted); }
.st-bar.hit { fill: var(--accent); }
.chart-empty { padding: 24px 0; text-align: center; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend .lg { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.lg.avg { background: var(--accent); } .lg.raw { background: var(--muted); } .lg.bar { background: var(--accent); }
.lg.goal { background: none; border-top: 2px dashed var(--warn); height: 0; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.stats > div { background: var(--card); border-radius: var(--r); padding: 12px 14px; display: grid; gap: 2px; }
.stats small { color: var(--muted); font-size: 12px; font-weight: 600; }
.stats b { font-size: 20px; }
.stats span { font-size: 12px; color: var(--muted); }
.mhead { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.small { font-size: 13px; }
.btn.wide { width: 100%; margin: 14px 0; }
.seg.two { grid-template-columns: repeat(2, 1fr); margin-top: 14px; }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.pager .bell { font: inherit; font-size: 22px; line-height: 1; }
.pager .bell:disabled { opacity: 0.35; }
.strow { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 12px 14px; }
.strow .stv { margin-left: auto; text-align: right; }
.strow .stv small { color: var(--muted); }
.strow.off { opacity: 0.55; }
.cmp { position: relative; margin-top: 12px; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: var(--card2); }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cmp-tag { position: absolute; top: 8px; padding: 2px 8px; border-radius: 99px; background: var(--scrim); color: var(--on-bad); font-size: 12px; }
.cmp-tag.l { left: 8px; } .cmp-tag.r { right: 8px; }
#cmpRange { width: 100%; min-height: 44px; margin-top: 8px; accent-color: var(--accent); }
.soon { margin-top: 16px; }
.soon p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* diet phase card (Today) */
.phase-card .sub { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.phase-reasons { margin: 8px 0; padding-left: 18px; font-size: 14px; }
.phase-btns { display: flex; gap: 8px; margin-top: 10px; }
.phase-btns .btn { flex: 1; min-height: 44px; }
.sheet-actions { display: flex; gap: 8px; margin-top: 12px; }
.sheet-actions .btn { flex: 1; min-height: 44px; }

/* P7-2F food picker */
.nu-pick { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.nu-pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.nu-pick-head, .nu-pick-empty { font-size: 13px; color: var(--muted); }
.nu-pick-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 44px; padding: 8px 12px; text-align: left; font: inherit; color: var(--text); background: var(--card2); border: 0; border-radius: 12px; }
.nu-pick-name { font-size: 15px; overflow-wrap: anywhere; }
.nu-pick-meta { font-size: 12px; color: var(--muted); }
.nu-pick-meta .chip { margin-left: 0; margin-right: 4px; }
.nu-pick-lines { display: flex; flex-direction: column; gap: 6px; }
.nu-pick-line { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.nu-pick-line .nu-pick-name { flex: 1; min-width: 0; }
.nu-pick-amt { width: 72px; min-height: 44px; text-align: right; font-size: 16px; }
.nu-pick-unit { font-size: 13px; color: var(--muted); min-width: 44px; }
.nu-pick-x { min-height: 44px; min-width: 44px; padding: 0 10px; font: inherit; font-size: 13px; color: var(--muted); background: none; border: 0; }

/* ops cards in Setup */
.ops-list { margin-top: 8px; }
.ops-row { display: flex; gap: 8px; align-items: baseline; min-height: 32px; padding: 4px 0; border-top: 1px solid var(--line); font-size: 13px; }
.ops-when { flex: none; width: 74px; color: var(--muted); }
.ops-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ops-st { flex: none; }
.ops-bad { color: var(--bad); font-weight: 600; }
.ops-card .btn { min-height: 44px; }

/* Today after the test round (P9-F1): week strip buttons, pep card, alerts, steps and weigh in cards */
button.wd { font: inherit; border: 0; background: transparent; cursor: pointer; min-height: 56px; min-width: 44px; color: var(--muted); }
button.wd:disabled { opacity: 0.4; cursor: default; }
.wd.sel:not(.today) { box-shadow: inset 0 0 0 2px var(--accent); }
.backtoday { width: 100%; margin-top: 10px; min-height: 44px; }
.daynote { color: var(--muted); }
.pepcard { margin-top: 16px; gap: 8px; }
.pep-line { margin: 0; font-size: 16px; line-height: 1.4; }
.pep-quote { margin: 0; padding-left: 12px; border-left: 3px solid var(--accent); color: var(--muted); font-size: 14px; line-height: 1.4; }
.pep-quote cite { display: block; margin-top: 4px; font-style: normal; font-size: 13px; }
.alertsbox { margin-top: 12px; gap: 6px; border: 1px solid var(--adj-line); }
.alert-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; font-size: 14px; }
.alert-row .btn { flex: none; }
.stepscard, .weighcard { margin-top: 12px; }
.sc-top { display: flex; justify-content: space-between; align-items: center; min-height: 24px; }
.linkbtn { background: transparent; border: 0; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; min-height: 44px; min-width: 44px; padding: 0 4px; cursor: pointer; }
.sc-num { font-size: 22px; }
.sc-num .muted { font-size: 14px; font-weight: 400; }
.sc-track { display: block; height: 8px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.sc-track span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.sc-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sc-form input { width: 110px; flex: none; min-height: 44px; }
.extra-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.item .check.ro { cursor: default; }
.tr-sessthumb { flex: none; width: 56px; }
.tr-sessthumb .tm-imgbox, .tr-sessthumb .tm-tile { width: 56px; aspect-ratio: 1 / 1; }
.tr-sessthumb .tm-tile span { display: none; }

/* progress graphs (P9-F2) */
.pgh { margin: 22px 0 0; }
#pgraphs .chips { margin-top: 10px; }
#pgraphs .mhead { display: flex; justify-content: space-between; align-items: baseline; min-height: 28px; }

/* Today after the D69 test (P10-F3) */
.targets div { min-height: 64px; display: flex; flex-direction: column; justify-content: center; }
.sc-plan { display: block; margin: 2px 0 8px; }
.tl-card { cursor: pointer; }
.tl-card .row-main { min-height: 60px; }
.item .tl-mark { background: var(--good); border-color: var(--good); }
.tl-card .chip { margin-left: 0; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; }
.nu-recent { margin-top: 4px; }
.nu-recent-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.nu-rchip { min-height: 36px; padding: 0 12px; font-size: 13px; }
.nu-manual { display: grid; gap: 8px; }
