:root {
  --bg: #FFF7F9;
  --card: #FFFFFF;
  --ink: #1F1B24;
  --ink-2: #4A4453;
  --muted: #8A8393;
  --line: #F0E4E9;
  --accent: #E8467C;
  --accent-soft: #FDE8EF;
  --accent-ink: #B41E52;
  --grad-a: #FF6A9A; --grad-b: #E8467C;
  --green: #1F9D6A;
  --green-soft: #E4F6EE;
  --blue: #2F6FE4;
  --blue-soft: #E8F0FE;
  --radius: 18px;
  --shadow: 0 2px 10px rgba(60, 20, 40, 0.06);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button { font: inherit; color: inherit; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

.app { min-height: 100vh; display: flex; flex-direction: column; }
.page { flex: 1; padding: calc(12px + var(--safe-top)) 16px calc(84px + var(--safe-bottom)); max-width: 560px; width: 100%; margin: 0 auto; }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 2px; }
.page-sub { color: var(--ink-2); margin: 0 0 14px; font-weight: 500; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 4px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 0 0 14px; }
.card h2 { font-size: 18px; font-weight: 800; margin: 0 0 10px; letter-spacing: -0.01em; }
.card h3 { font-size: 15px; font-weight: 800; margin: 14px 0 6px; }
.card p { margin: 0 0 8px; color: var(--ink-2); }
.card p:last-child { margin-bottom: 0; }
.card ul { margin: 0; padding-left: 20px; color: var(--ink-2); }
.card li { margin: 0 0 6px; }
.card.accent { background: linear-gradient(135deg, #FF6A9A 0%, #E8467C 100%); color: #fff; box-shadow: 0 8px 24px rgba(232, 70, 124, 0.28); }
.card.accent h2, .card.accent p, .card.accent .eyebrow { color: #fff; }
.card.accent .eyebrow { opacity: 0.85; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kv .k { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.kv .v { font-size: 17px; font-weight: 700; color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 14px 18px; font-weight: 700; font-size: 16px; cursor: pointer; background: var(--accent); color: #fff; width: 100%; }
.btn.light { background: #fff; color: var(--accent-ink); }
.btn.ghost { background: var(--accent-soft); color: var(--accent-ink); }
.btn.small { width: auto; padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; }

/* schedule table */
.sched { width: 100%; border-collapse: collapse; }
.sched td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sched tr:last-child td { border-bottom: 0; }
.sched td:first-child { font-weight: 800; width: 34%; }
.sched td:last-child { color: var(--ink-2); font-weight: 500; }
.sched tr.today td { color: var(--accent-ink); }
.sched tr.today td:last-child { color: var(--accent-ink); font-weight: 700; }
.sched tr.rest td:last-child { color: var(--muted); }

/* segmented control */
.seg { display: flex; background: #F6E9EE; border-radius: 14px; padding: 4px; margin: 0 0 14px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 10px; border-radius: 11px; font-weight: 800; font-size: 15px; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--accent-ink); box-shadow: var(--shadow); }

/* exercises */
.section-label { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.section-label small { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--muted); }
.ex { display: grid; grid-template-columns: 36px 1fr; gap: 12px; }
.ex .num { width: 36px; height: 36px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.ex.light .num { background: var(--blue-soft); color: var(--blue); }
.ex .name { font-weight: 800; font-size: 16px; line-height: 1.3; margin: 6px 0 4px; }
.ex .meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.chip { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #F5F0F2; font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.chip.main { background: var(--accent-soft); color: var(--accent-ink); }
.chip.ss { background: var(--green-soft); color: var(--green); }
.ex .note { color: var(--ink-2); font-size: 14.5px; margin: 0; }
.ex .optional { color: var(--muted); font-size: 13px; font-weight: 700; }

/* tab bar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.94); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-top: 1px solid var(--line); display: flex; padding: 6px 4px calc(6px + var(--safe-bottom)); }
.tabbar a { flex: 1; text-decoration: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; padding: 4px 0; }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.on { color: var(--accent-ink); }

/* login */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.login .logo { width: 84px; height: 84px; border-radius: 24px; background: linear-gradient(135deg, #FF6A9A, #E8467C); color: #fff; font-weight: 900; font-size: 40px; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 28px rgba(232,70,124,0.3); margin-bottom: 16px; }
.login h1 { font-size: 26px; margin: 0 0 4px; font-weight: 800; }
.login p { color: var(--ink-2); margin: 0 0 20px; }
.dots { display: flex; gap: 14px; justify-content: center; margin: 10px 0 22px; height: 18px; }
.dots span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent); }
.dots span.on { background: var(--accent); }
.dots.shake { animation: shake 0.35s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-8px)} 75%{transform:translateX(8px)} }
.pad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; }
.pad button { width: 76px; height: 76px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); font-size: 28px; font-weight: 700; color: var(--ink); }
.pad button:active { background: var(--accent-soft); }
.pad button.blank { background: transparent; box-shadow: none; }
.pad button.del { font-size: 22px; color: var(--ink-2); }
.err { color: var(--accent-ink); font-weight: 700; min-height: 22px; margin: 0 0 8px; }

.muted { color: var(--muted); }
.tiny { font-size: 13px; }
.soon { text-align: center; padding: 40px 16px; color: var(--ink-2); }
.soon .big { font-size: 40px; margin-bottom: 8px; }

/* ---------- phase 2 ---------- */
:root { --gold: #C9962B; --gold-ink: #6B4A00; --gold-soft: #FFF3D6; }
.card.gold { background: linear-gradient(135deg, #FBE7B2 0%, #F3D27A 100%); color: var(--gold-ink); box-shadow: 0 8px 24px rgba(201,150,43,0.22); }
.card.gold h2, .card.gold p { color: var(--gold-ink); }
.card.gold .eyebrow { color: #8A5E00; }
.ar-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ar { background: rgba(255,255,255,0.55); border-radius: 12px; padding: 10px 12px; }
.card:not(.gold) .ar { background: var(--gold-soft); }
.ar-t { font-weight: 800; color: var(--gold-ink); }
.ar-x { font-size: 14px; margin-top: 2px; color: #7A5A12; }
.card:not(.gold) .ar-x { color: var(--ink-2); }
.sched tr.active td:last-child { color: var(--gold); font-weight: 700; }
.chip.best { background: #FFF3D6; color: #9A6200; }
.back { display: inline-block; color: var(--accent-ink); font-weight: 700; text-decoration: none; margin: 4px 0 6px; }
.badge { display: inline-block; background: var(--green-soft); color: var(--green); font-weight: 800; padding: 2px 10px; border-radius: 999px; font-size: 13px; }

.status { position: fixed; top: calc(10px + var(--safe-top)); left: 50%; transform: translate(-50%, -30px); background: var(--ink); color: #fff; font-size: 13px; font-weight: 700; padding: 6px 14px; border-radius: 999px; opacity: 0; transition: all .25s; z-index: 20; pointer-events: none; }
.status.show { opacity: 1; transform: translate(-50%, 0); }
.status.err { background: var(--accent-ink); }

.kv3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.kv3 .k { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.kv3 .v { font-size: 20px; font-weight: 800; color: var(--ink); }
.kv3 .v.big { font-size: 24px; }
.kv3 .v.up { color: var(--green); }

.sugg { background: #FFF3D6; color: #7A4E00; font-weight: 700; border-radius: 12px; padding: 8px 12px; margin: 4px 0 8px; font-size: 14px; }
.last { font-size: 14px; color: var(--ink-2); margin: 0 0 6px; }
.sets { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.set-row { display: grid; grid-template-columns: 52px 1fr 1fr; gap: 10px; align-items: center; }
.set-label { font-weight: 800; color: var(--ink-2); font-size: 14px; }
.set-in { display: flex; align-items: center; background: #FAF3F6; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 10px 0 0; }
.set-in:focus-within { border-color: var(--accent); background: #fff; }
.set-in input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; font: inherit; font-weight: 800; font-size: 18px; padding: 11px 12px; color: var(--ink); outline: none; -moz-appearance: textfield; }
.set-in input::-webkit-outer-spin-button, .set-in input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.set-in input::placeholder { color: #C7B8C0; font-weight: 700; }
.set-in span { font-size: 12px; font-weight: 700; color: var(--muted); }
.addset { display: block; width: 100%; margin-top: 10px; border: 1.5px dashed var(--line); background: transparent; border-radius: 12px; padding: 10px; font-weight: 700; color: var(--accent-ink); }
.done-btn { margin-top: 8px; }
.done-btn.is-done { background: var(--green-soft); color: var(--green); }

.feel { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 10px; }
.feel button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 2px; font-size: 11px; font-weight: 700; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.feel button span { font-size: 24px; }
.feel button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; color: var(--ink); background: #FAF3F6; resize: vertical; outline: none; }
textarea:focus { border-color: var(--accent); background: #fff; }

.hist { padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.hist:last-child { border-bottom: 0; }
.hist.link:active { opacity: 0.6; }

/* ---------- food / nutrition ---------- */
.kv4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kv4 .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; }
.kv4 .v { font-size: 20px; font-weight: 800; }
.meal h3 { margin: 14px 0 6px; }
.opts { margin: 0; padding-left: 18px; color: var(--ink-2); }
.opts li { margin: 0 0 5px; }
.note-box { background: var(--gold-soft); color: var(--gold-ink); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; margin: 0 0 8px; }
.ideas { display: flex; flex-direction: column; gap: 8px; }
.idea { background: #FAF3F6; border-radius: 12px; padding: 10px 12px; }
.idea .ar-t { color: var(--accent-ink); }
.idea .ar-x { color: var(--ink-2); }
.tabbar a { font-size: 10.5px; }

/* ---------- coach editor ---------- */
.ed-in { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-weight: 600; color: var(--ink); background: #FAF3F6; outline: none; margin: 0 0 8px; }
.ed-in.big { font-weight: 800; font-size: 17px; }
.ed-in:focus { border-color: var(--accent); background: #fff; }
.ed-ta { width: 100%; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--ink); background: #FAF3F6; outline: none; margin: 0 0 8px; resize: vertical; }
.ed-ta:focus { border-color: var(--accent); background: #fff; }
.ed-row2 { display: grid; grid-template-columns: 1fr 110px; gap: 8px; }
.ed-row4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ed-row4 label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ed-row4 input { margin-top: 4px; }
.ed-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 10px 0 4px; }
.ed-group { border: 1.5px dashed var(--line); border-radius: 14px; padding: 10px; margin: 0 0 10px; }
.ed-link { background: none; border: 0; color: var(--accent-ink); font-weight: 700; padding: 4px 0; font-size: 14px; }
.ed-link.danger { color: var(--muted); }

/* ---------- weight / steps ---------- */
.ql { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ql label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ql label > span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.ql .set-in input { font-size: 20px; }
.ql input[type=date] { font-weight: 700; font-size: 16px; padding: 11px 10px; -webkit-appearance: none; min-height: 48px; }
.chart { width: 100%; height: auto; display: block; }
.ch-band { fill: rgba(232, 70, 124, 0.10); }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-daily { fill: none; stroke: #E8A2BA; stroke-width: 1.2; }
.ch-dot { fill: #E8A2BA; }
.ch-avg { fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ch-tick { font-size: 10px; fill: var(--muted); font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-top: 4px; }
.legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.lg-avg { background: var(--accent-ink); }
.lg-daily { background: #E8A2BA; height: 2px !important; }
.lg-band { background: rgba(232, 70, 124, 0.18); height: 10px !important; }
.wk { width: 100%; border-collapse: collapse; }
.wk th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; padding: 0 0 6px; }
.wk td { padding: 8px 0; border-top: 1px solid var(--line); vertical-align: top; }
.wk tr.cur td { background: linear-gradient(90deg, var(--accent-soft), transparent); }
.st { display: inline-block; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.st-on, b.st-on { background: var(--green-soft); color: var(--green); }
.st-below, b.st-below { background: var(--gold-soft); color: var(--gold-ink); }
.st-above, b.st-above { background: #FFE4EC; color: var(--accent-ink); }
.st-few, b.st-few { background: #F1EDEF; color: var(--muted); }
.card.accent b.st-on, .card.accent b.st-below, .card.accent b.st-above, .card.accent b.st-few { background: rgba(255,255,255,0.22); color: #fff; padding: 1px 8px; border-radius: 999px; }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 120px; align-items: end; margin-top: 12px; }
.bar { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-v { width: 100%; max-width: 34px; background: var(--accent-soft); border-radius: 8px 8px 4px 4px; min-height: 3px; flex: 0 0 auto; height: 0; margin-top: auto; }
.bar.hit .bar-v { background: var(--accent); }
.bar.future .bar-v { background: #F3EDEF; }
.bar-l { font-size: 11px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.bar-n { font-size: 10px; font-weight: 700; color: var(--ink-2); height: 12px; }
.bar { position: relative; }
.bar .bar-v { order: 2; } .bar .bar-l { order: 3; } .bar .bar-n { order: 1; }

/* active-rest suggestions on the pink card */
.card.accent .ar { background: rgba(255,255,255,0.18); }
.card.accent .ar-t { color: #fff; }
.card.accent .ar-x { color: rgba(255,255,255,0.92); }

/* ---------- body / photos ---------- */
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mgrid label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mgrid label > span { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.up-txt { color: var(--green); }
.poses { display: flex; gap: 6px; margin-top: 10px; }
.poses button { flex: 1; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px; font-weight: 700; color: var(--ink-2); }
.poses button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.pdate { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin: 14px 0 6px; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pthumb { position: relative; margin: 0; }
.pthumb img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; display: block; background: #F3EDEF; }
.pthumb figcaption { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; margin-top: 3px; text-transform: capitalize; }
.pdel { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(31,27,36,0.6); color: #fff; font-size: 15px; line-height: 24px; padding: 0; }
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cmp figure { margin: 0; }
.cmp img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; display: block; background: #F3EDEF; }
.cmp figcaption { text-align: center; font-weight: 700; font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.hscroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.hist-t { min-width: 480px; font-size: 14px; }
.hist-t td, .hist-t th { padding-right: 8px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; gap: 12px; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 12px; object-fit: contain; }
.lb-close { border: 0; background: #fff; color: var(--ink); font-weight: 800; padding: 10px 22px; border-radius: 999px; }
.lightbox[hidden] { display: none; }
[hidden] { display: none !important; }

/* ---------- phase 5: editors + charts ---------- */
.ed-row3 { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 8px; }
.ed-row3 label, .ed-lbl { display: flex; flex-direction: column; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; gap: 4px; }
.ed-row3 input, .ed-lbl input, .ed-lbl select { text-transform: none; letter-spacing: 0; }
.ed-checks { display: flex; flex-direction: column; gap: 2px; font-size: 13px; font-weight: 700; color: var(--ink-2); justify-content: center; }
.ed-checks input { margin-right: 4px; accent-color: var(--accent); }
.ed-actions { display: flex; gap: 14px; }
.ed-ex .ed-in, .ed-ex .ed-ta { margin-bottom: 6px; }
select.ed-in { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.ed-sched { display: grid; grid-template-columns: 44px 120px 1fr; gap: 6px; align-items: center; margin-bottom: 6px; }
.ed-sched .ed-in { margin: 0; padding: 9px 8px; font-size: 16px; }
.ed-dow { font-weight: 800; color: var(--ink-2); }
.steps-how { padding-left: 20px; color: var(--ink-2); }
.steps-how li { margin-bottom: 8px; }
.steps-how code { background: #F5F0F2; padding: 1px 6px; border-radius: 6px; font-size: 13px; word-break: break-all; }
.ch-a { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linejoin: round; }
.ch-a-dot { fill: var(--accent-ink); }
.ch-b { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linejoin: round; }
.ch-b-dot { fill: var(--blue); }
.lg-a { background: var(--accent-ink); }
.lg-b { background: var(--blue); }
.bar-v { max-height: calc(100% - 32px); }

/* ---------- rest timer ---------- */
.setactions { display: flex; gap: 8px; margin-top: 10px; }
.setactions .addset { margin-top: 0; flex: 1; }
.restbtn { flex: 1; border: 0; background: var(--accent-soft); color: var(--accent-ink); border-radius: 12px; padding: 10px; font-weight: 800; }
.restbtn.on { background: var(--accent); color: #fff; }
.restbar { position: fixed; left: 12px; right: 12px; bottom: calc(74px + var(--safe-bottom)); z-index: 30; background: var(--ink); color: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 12px 30px rgba(31,27,36,0.35); }
.restbar .rb-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(232,70,124,0.45); transition: width .25s linear; }
.restbar.done { background: var(--accent-ink); }
.restbar.done .rb-fill { display: none; }
.rb-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 16px; }
.rb-name { font-size: 12px; font-weight: 700; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.rb-time { font-size: 28px; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rb-btns { display: flex; gap: 6px; }
.rb-btns button { border: 0; background: rgba(255,255,255,0.14); color: #fff; font-weight: 800; border-radius: 10px; padding: 10px 10px; font-size: 13px; }
.rb-btns [data-rest-stop] { background: #fff; color: var(--ink); }
.setprog { margin-top: 8px; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.setprog .prog.done { color: var(--green); }
.setprog .prog.muted { color: var(--muted); font-weight: 600; }
.card.ex-done { box-shadow: 0 0 0 2px var(--green-soft), var(--shadow); }
.card.ex-done .num { background: var(--green-soft); color: var(--green); }
@keyframes rowflash { 0% { background: var(--accent-soft); } 100% { background: transparent; } }
.set-row.flash { animation: rowflash 1.4s ease-out; border-radius: 12px; }
/* chart hover / touch readout */
.chart-wrap { position: relative; touch-action: pan-y; }
.ch-cline { stroke: var(--accent-ink); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: .9; }
.ch-cdot { fill: #fff; stroke: var(--accent-ink); stroke-width: 2.5; }
.ch-tip { background: var(--ink); color: #fff; border-radius: 10px; padding: 7px 10px; font-size: 12.5px; line-height: 1.35; margin: 0 0 6px; min-height: 32px; }
.ch-tip[hidden] { display: block !important; visibility: hidden; }
.ch-tip b { font-weight: 800; }
.ch-tip .tiny { opacity: .8; }

/* ---------- batch: wake, warm-up, check-in, report ---------- */
.wake { border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.wake.on { background: var(--gold-soft); border-color: #F3D27A; color: var(--gold-ink); }
.warm { background: #FFF1E8; color: #8A3A12; font-weight: 700; border-radius: 12px; padding: 8px 12px; margin: 4px 0 8px; font-size: 14px; }
.ci h2 { font-size: 17px; line-height: 1.3; }
.ci-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-top: 10px; }
.ci-grid .k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.ci-grid .v { font-size: 20px; font-weight: 800; line-height: 1.1; }
.card.accent .ci-grid .k, .card.accent .ci-grid .v, .card.accent .ci-grid .tiny { color: #fff; }
.card:not(.accent) .ci-grid .k { color: var(--muted); } .card:not(.accent) .ci-grid .v { color: var(--ink); }
.ci-action { margin-top: 12px; border-radius: 12px; padding: 10px 12px; background: rgba(255,255,255,.18); font-size: 14.5px; }
.card:not(.accent) .ci-action { background: var(--gold-soft); color: var(--gold-ink); }
.card.accent .ci-action { color: #fff; }
.hist-t td, .hist-t th { white-space: nowrap; }
