/* Coach — styles.
   Direction: Apple-style. System fonts, rounded numerals for weights and reps, warm neutrals,
   ONE accent (brass by default, changeable in Settings), generous space, big touch targets.
   Sizes are in rem so text follows the phone's text-size setting where the browser allows it. */

/* ------------------------------------------------------------------ tokens */

:root {
  /* accent (per theme: -l for light, -d for dark) */
  --acc-rgb-l: 138 82 32;   --acc-rgb-d: 217 154 78;
  --acci-l: #FFFFFF;        --acci-d: #241505;

  --acc-rgb: var(--acc-rgb-l);
  --acc-ink: var(--acci-l);

  --bg: #EFEFEA;
  --card: #FFFFFF;
  --sunk: #E6E5DD;
  --ink: #1B1C19;
  --ink2: rgb(27 28 25 / .68);
  --ink3: rgb(27 28 25 / .5);
  --line: rgb(27 28 25 / .13);
  --bar: rgb(255 255 255 / .82);
  --danger: #A8402A;
  --shadow: 0 10px 30px -14px rgb(0 0 0 / .45);
  --toast-acc: rgb(var(--acc-rgb-d));

  --acc: rgb(var(--acc-rgb));
  --acc-soft: rgb(var(--acc-rgb) / .13);
  --acc-mid: rgb(var(--acc-rgb) / .32);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --num: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color-scheme: light;
}

:root[data-accent="blue"]     { --acc-rgb-l: 46 95 224;  --acc-rgb-d: 122 162 255; --acci-d: #0B1633; }
:root[data-accent="green"]    { --acc-rgb-l: 44 122 75;  --acc-rgb-d: 92 201 138;  --acci-d: #062414; }
:root[data-accent="graphite"] { --acc-rgb-l: 58 61 69;   --acc-rgb-d: 211 214 222;  --acci-d: #16171B; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --acc-rgb: var(--acc-rgb-d);
    --acc-ink: var(--acci-d);
    --bg: #121311;
    --card: #1C1D1A;
    --sunk: #272821;
    --ink: #F3F1EA;
    --ink2: rgb(243 241 234 / .7);
    --ink3: rgb(243 241 234 / .5);
    --line: rgb(243 241 234 / .16);
    --bar: rgb(28 29 26 / .82);
    --danger: #E2604A;
    --shadow: 0 10px 30px -14px rgb(0 0 0 / .8);
    --toast-acc: rgb(var(--acc-rgb-l));
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --acc-rgb: var(--acc-rgb-d);
  --acc-ink: var(--acci-d);
  --bg: #121311;
  --card: #1C1D1A;
  --sunk: #272821;
  --ink: #F3F1EA;
  --ink2: rgb(243 241 234 / .7);
  --ink3: rgb(243 241 234 / .5);
  --line: rgb(243 241 234 / .16);
  --bar: rgb(28 29 26 / .82);
  --danger: #E2604A;
  --shadow: 0 10px 30px -14px rgb(0 0 0 / .8);
  --toast-acc: rgb(var(--acc-rgb-l));
  color-scheme: dark;
}

/* ------------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  height: 100%;
  font: 17px/1.35 var(--font);
  -webkit-text-size-adjust: 100%;
}
@supports (font: -apple-system-body) {
  html { font: -apple-system-body; line-height: 1.35; }
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

#app { height: 100%; }

button, input, textarea { font: inherit; color: inherit; }
button {
  background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
  -webkit-touch-callout: none; touch-action: manipulation;
}
button:disabled { opacity: .4; cursor: default; }
button:active:not(:disabled) { opacity: .72; }
h1, h2, h3, p, ol, ul { margin: 0; }

:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.ic { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ----------------------------------------------------------------- shell */

.shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg);
}

.nav {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 2.9rem;
  padding: .1rem .35rem;
}
.nav .nl { justify-self: start; }
.nav .nr { justify-self: end; }
.nav .nt { font-weight: 700; font-size: .95rem; }

.tbtn {
  display: inline-flex; align-items: center; gap: .2rem;
  min-height: 2.75rem; min-width: 2.75rem; padding: 0 .6rem;
  color: var(--acc); font-weight: 600; font-size: 1rem; border-radius: .8rem;
}
.tbtn.strong { font-weight: 750; }
.tbtn.icon { justify-content: center; }

.scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: .1rem 1rem 1.75rem;
}

.large { font-size: 2.05rem; line-height: 1.08; font-weight: 800; letter-spacing: -.025em; }
.title { font-size: 1.7rem; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.sub { color: var(--ink3); font-size: .92rem; margin: .2rem 0 1rem; }
.sec { margin-top: 1.25rem; }
.sechd { display: flex; align-items: baseline; justify-content: space-between; margin: 0 .25rem .5rem; }
.sechd h3 { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.scroll > .sechd { margin-top: 1.5rem; }
.mhead { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); margin: 1.2rem .25rem .5rem; }

.lbl { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.lbl small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.hint { color: var(--ink3); font-size: .82rem; line-height: 1.4; margin: .5rem .25rem; }
.hint.center, .center { text-align: center; }
.body { font-size: 1rem; line-height: 1.5; color: var(--ink2); margin: .4rem 0 1rem; }
.muted { color: var(--ink3); }

.linkbtn { display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; padding: 0 .4rem; color: var(--acc); font-weight: 600; font-size: .95rem; }
.linkbtn.danger { color: var(--danger); }
.linkrow { display: flex; justify-content: center; margin-top: .6rem; }

/* --------------------------------------------------------------- buttons */

.btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; min-height: 3.4rem; margin-top: .7rem;
  border-radius: 1.1rem; font-size: 1.05rem; font-weight: 700; padding: .6rem 1rem;
}
.btn.primary { background: var(--acc); color: var(--acc-ink); }
.btn.soft { background: var(--card); color: var(--ink); }
.btn.danger { background: var(--card); color: var(--danger); }
.btn.dangerfill { background: var(--danger); color: #fff; }
.btnrow { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.btnrow .btn { margin-top: 0; flex: 1; }
.btnrow2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-top: .7rem; }
.btnrow2 .btn { margin-top: 0; flex-direction: column; gap: .15rem; font-size: .8rem; min-height: 3.6rem; padding: .4rem; }
.btnrow2.stack { grid-template-columns: 1fr; }
.btnrow2.stack .btn { flex-direction: row; font-size: 1.05rem; }

/* ----------------------------------------------------------- groups & rows */

.group { background: var(--card); border-radius: 1.25rem; overflow: hidden; }
.group.padded { padding: .9rem 1rem; }
.group > * + * { border-top: .5px solid var(--line); }
.group.padded > * + * { border-top: 0; }

.row {
  display: flex; align-items: center; gap: .75rem; width: 100%;
  min-height: 3.6rem; padding: .6rem .9rem; text-align: left;
}
.row.danger .rt1 { color: var(--danger); }
.rmid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.rt1 { font-weight: 600; font-size: 1rem; }
.rt2 { color: var(--ink3); font-size: .82rem; overflow-wrap: anywhere; }
.rside { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; }
.rico { width: 2.4rem; height: 2.4rem; border-radius: .7rem; background: var(--acc-soft); color: var(--acc); display: flex; align-items: center; justify-content: center; flex: none; }
.chev { color: var(--ink3); }
.dot { color: var(--acc); font-size: .6rem; }
.rstat { color: var(--ink3); font-size: .8rem; white-space: nowrap; }
.rstat.done { color: var(--acc); font-weight: 700; }
.here { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--acc-ink); background: var(--acc); border-radius: .5rem; padding: .1rem .4rem; }
.picked { color: var(--acc); }
.nexttag { font-style: normal; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--acc); margin-left: .3rem; }

/* ---------------------------------------------------------------- photos */

.ph { background-color: var(--sunk); background-size: cover; background-position: center; background-repeat: no-repeat; }
.ph-none { display: flex; align-items: center; justify-content: center; color: var(--ink3); }
.thumb { width: 2.9rem; height: 2.9rem; border-radius: .75rem; flex: none; }
.thumb.lg { width: 3.7rem; height: 3.7rem; border-radius: .9rem; }
.face { width: min(2.5rem, 9.5vw); height: min(2.5rem, 9.5vw); border-radius: 50%; flex: none; box-shadow: 0 0 0 2.5px var(--acc); margin-left: -.6rem; }
.face:first-child { margin-left: 0; }
.mini { width: 2.1rem; height: 2.1rem; border-radius: .55rem; flex: none; }

.photos { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .35rem; width: 100%; }
.photos.one { grid-template-columns: 1fr; }
.pt { aspect-ratio: 3 / 2; border-radius: 1rem; max-width: 100%; }
.photos.one .pt { aspect-ratio: 16 / 9; }
.photos.small { margin-bottom: 1rem; }
.photos.xl { margin-top: .6rem; }
.plbl { position: absolute; bottom: .45rem; font-size: .62rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: rgb(0 0 0 / .58); color: #fff; padding: .15rem .45rem; border-radius: .45rem; }
.plbl.l { left: .5rem; }
.plbl.r { left: calc(50% + .5rem); }
.photos.one .plbl.l { left: .5rem; }

/* ----------------------------------------------------------------- Today */

.hero { background: var(--acc); color: var(--acc-ink); border-radius: 1.75rem; padding: 1.1rem 1.1rem .9rem; margin: 0 0 .9rem; }
.hero .eyebrow { font-size: .72rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; opacity: .85; }
.hero h2 { font-size: 1.95rem; line-height: 1.06; letter-spacing: -.025em; margin: .3rem 0 .3rem; font-weight: 800; }
.hero .meta { opacity: .9; font-size: .92rem; margin-bottom: .8rem; }
.faces { display: flex; margin: .2rem 0 1rem .1rem; }
.go {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; min-height: 3.6rem; border-radius: 1.2rem;
  background: var(--acc-ink); color: var(--acc); font-size: 1.15rem; font-weight: 800;
}
.herolink { display: block; margin: .3rem auto 0; min-height: 2.75rem; padding: 0 1rem; color: inherit; font-weight: 600; font-size: .92rem; opacity: .92; }

.switchrow { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; min-height: 3.6rem; }
.swt { display: flex; flex-direction: column; gap: .1rem; }
.swt b { font-weight: 600; }
.swt small { color: var(--ink3); font-size: .8rem; }
.switch {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 3.2rem; height: 2rem; border-radius: 1rem; background: var(--sunk);
  position: relative; margin: 0; border: 0; cursor: pointer; transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: .18rem; left: .18rem; width: 1.64rem; height: 1.64rem;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .35); transition: transform .2s;
}
.switch:checked { background: var(--acc); }
.switch:checked::after { transform: translateX(1.2rem); }

.rail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .55rem; }
.daychip { display: flex; flex-direction: column; gap: .12rem; text-align: left; background: var(--card); border-radius: 1.1rem; padding: .75rem .85rem; min-height: 4.6rem; box-shadow: inset 0 0 0 2px transparent; }
.daychip.next { box-shadow: inset 0 0 0 2px var(--acc); }
.daychip .dn { font-size: .68rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.daychip.next .dn { color: var(--acc); }
.daychip .dt { font-weight: 700; font-size: .95rem; line-height: 1.2; overflow-wrap: anywhere; }
.daychip .dd { color: var(--ink3); font-size: .8rem; }

.notice { background: var(--card); border-radius: 1.25rem; padding: .9rem 1rem; margin: 1rem 0; }
.notice b { display: block; margin-bottom: .15rem; }
.notice p { color: var(--ink2); font-size: .9rem; line-height: 1.45; margin: .2rem 0 .1rem; }
.notice.slim { margin: .9rem 0 0; }
.steps { padding-left: 1.2rem; margin: .4rem 0 0; color: var(--ink2); font-size: .92rem; line-height: 1.5; }

.stats3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin: .4rem 0 .9rem; }
.stat { background: var(--card); border-radius: 1.1rem; padding: .7rem .5rem; text-align: center; display: flex; flex-direction: column; gap: .05rem; }
.stat b { font: 800 1.6rem/1.1 var(--num); font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink3); font-size: .74rem; }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .4rem; padding: 2.2rem 1.2rem; color: var(--ink3); }
.empty b { color: var(--ink); font-size: 1.05rem; }
.empty p { font-size: .9rem; line-height: 1.45; max-width: 26rem; }
.empty.small { padding: 1.2rem; }

/* --------------------------------------------------------------- tab bar */

.tabbar {
  flex: none; display: flex; gap: .25rem; padding: .3rem .6rem .2rem;
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--line);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .08rem; min-height: 3.1rem; color: var(--ink3); font-size: .68rem; font-weight: 650; border-radius: .8rem; }
.tab.on { color: var(--acc); }

/* --------------------------------------------------------------- workout */

.wbar { flex: none; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .25rem; min-height: 2.9rem; padding: .1rem .35rem; }
.wtitle { text-align: center; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.wtitle b { font-size: .92rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wtitle span { font-size: .72rem; color: var(--ink3); }
.segs { flex: none; display: flex; gap: .25rem; padding: .1rem 1rem .5rem; }
.seg { flex: 1; height: .5rem; border-radius: .25rem; background: var(--sunk); position: relative; }
.seg::before { content: ""; position: absolute; inset: -.55rem -.05rem; }
.seg.part { background: var(--acc-mid); }
.seg.done { background: var(--acc); }
.seg.cur { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink3); }

.photos + .exname { margin-top: .85rem; }
.exname { font-size: 1.55rem; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .2rem; }
.chip { font-size: .78rem; font-weight: 600; color: var(--ink2); background: var(--card); border-radius: .6rem; padding: .25rem .6rem; }
.chip.acc { color: var(--acc); background: var(--acc-soft); }
.loadnote { color: var(--ink3); font-size: .82rem; margin: .3rem 0 .6rem; }
.setup { display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left; background: var(--acc-soft); color: var(--ink); border-radius: .9rem; padding: .6rem .8rem; font-size: .9rem; margin: .2rem 0 .6rem; }
.setup .ic { color: var(--acc); }

.tl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; margin: .5rem 0 .3rem; }
.tcell { background: var(--card); border-radius: 1.1rem; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.big { font: 800 1.45rem/1.15 var(--num); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.big.acc { color: var(--acc); }
.big.soft { color: var(--ink2); font-size: 1.15rem; }
.tcell .hint { margin: 0; font-size: .78rem; }
.lastline { font-size: .98rem; font-weight: 650; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lastline.muted { font-weight: 500; color: var(--ink3); }

.sechead { display: flex; flex-wrap: wrap; gap: .1rem .6rem; align-items: baseline; justify-content: space-between; margin: 1.1rem .25rem .45rem; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink3); }
.sechead .hint { margin: 0; text-transform: none; letter-spacing: 0; font-weight: 500; }

.warmgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(9.5rem, 100%), 1fr)); gap: .4rem; margin-bottom: .1rem; }
.warmgrid .srow { margin-bottom: 0; }
.warmgrid .panel, .warmgrid .rirrow { grid-column: 1 / -1; }
.warmgrid .srow.todo, .warmgrid .srow.done { min-height: 3rem; }
.warmgrid .sopen { min-height: 3rem; padding: 0 .55rem; gap: .5rem; }
.warmgrid .srow.done { padding: .4rem .55rem; gap: .5rem; }
.warmgrid .sv { font-size: .95rem; white-space: nowrap; }
.warmgrid .qchk { width: 2.6rem; }
.warmgrid .sn { width: 1.45rem; height: 1.45rem; font-size: .72rem; line-height: 1.45rem; }
.srow { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 3.4rem; padding: .5rem .85rem; border-radius: 1.05rem; background: var(--card); margin-bottom: .4rem; text-align: left; }
.srow.todo { background: transparent; border: 1.5px dashed var(--line); padding: 0; }
.srow.warm { min-height: 3rem; }
.sopen { display: flex; align-items: center; gap: .7rem; flex: 1; min-height: 3.4rem; padding: 0 .85rem; text-align: left; min-width: 0; }
.sn { width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--sunk); color: var(--ink2); font: 700 .8rem/1.6rem var(--num); text-align: center; flex: none; }
.srow.done .sn { background: var(--acc); color: var(--acc-ink); }
.sv { flex: 1; font: 650 1.02rem/1.2 var(--num); font-variant-numeric: tabular-nums; min-width: 0; }
.srow.todo .sv { color: var(--ink3); font-weight: 550; }
.rirb { font-size: .75rem; font-weight: 700; color: var(--ink2); background: var(--sunk); border-radius: .5rem; padding: .15rem .45rem; }
.sck { color: var(--acc); display: flex; }
.qchk { width: 3.2rem; align-self: stretch; display: flex; align-items: center; justify-content: center; color: var(--ink3); border-left: 1.5px dashed var(--line); }

.panel { background: var(--acc-soft); border-radius: 1.4rem; padding: .8rem; margin: 0 0 .5rem; }
.phead { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .1rem .5rem; margin: 0 .25rem .55rem; }
.pn { font-weight: 800; font-size: 1rem; }
.ptg { font-size: .82rem; font-weight: 650; color: var(--acc); text-align: right; }
.ptg.muted { color: var(--ink3); font-weight: 500; }
.steppers { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .55rem; }
.stp { background: var(--card); border-radius: 1.2rem; padding: .65rem .55rem .55rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 0; box-shadow: inset 0 0 0 2px transparent; }
.stp:focus-within { box-shadow: inset 0 0 0 2px var(--acc); }
.stp.nudge { box-shadow: inset 0 0 0 2px var(--acc-mid); }
.slabel { font-size: .7rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--ink3); text-align: center; }
.slabel small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.sval { width: 100%; min-width: 0; border: 0; background: transparent; text-align: center; font: 800 min(2.7rem, 11.5vw)/1.1 var(--num); font-variant-numeric: tabular-nums; color: var(--ink); padding: .05rem 0; outline: none; border-radius: .6rem; }
.sval::placeholder { color: var(--ink3); font-weight: 500; }
.sbtns { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; width: 100%; margin-top: .15rem; }
.sb { min-height: 3.5rem; border-radius: 1rem; background: var(--sunk); color: var(--ink); display: flex; align-items: center; justify-content: center; -webkit-user-select: none; user-select: none; }
.sb:active { background: var(--acc-mid); opacity: 1; }
.pfoot { display: flex; justify-content: space-between; gap: .5rem; margin-top: .4rem; }

.rirrow { background: var(--card); border-radius: 1.1rem; padding: .7rem .75rem .6rem; margin: -.15rem 0 .5rem; }
.rirrow.flat { background: transparent; padding: .6rem .1rem 0; margin: .3rem 0 0; }
.rl { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .88rem; font-weight: 600; margin-bottom: .45rem; }
.rl small { font-weight: 500; color: var(--ink3); }
.infobtn { width: 2.75rem; height: 2.75rem; margin: -.6rem -.5rem -.6rem 0; display: flex; align-items: center; justify-content: center; color: var(--ink3); }
.rchips { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4rem; }
.rc { min-height: 3rem; border-radius: .9rem; background: var(--sunk); font: 750 1.15rem var(--num); color: var(--ink2); }
.rc.on { background: var(--acc); color: var(--acc-ink); }
.rhint { color: var(--ink3); font-size: .76rem; margin-top: .4rem; line-height: 1.35; }

.links { display: flex; flex-wrap: wrap; gap: .1rem .9rem; margin: .7rem .1rem 0; }
.noteview { margin-top: .6rem; font-size: .88rem; color: var(--ink2); background: var(--card); border-radius: .9rem; padding: .7rem .8rem; white-space: pre-wrap; overflow-wrap: anywhere; }

.ctabar { flex: none; padding: .55rem 1rem .75rem; background: var(--bg); display: flex; flex-direction: column; align-items: stretch; gap: .1rem; }
.ctabar .skip { align-self: center; }
.cta { display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; min-height: 3.7rem; border-radius: 1.3rem; background: var(--acc); color: var(--acc-ink); font-size: 1.2rem; font-weight: 800; padding: .5rem 1rem; }
.cta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cta.next { box-shadow: 0 0 0 4px var(--acc-soft); }

.rest { flex: none; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .8rem .5rem 1rem; background: var(--card); border-top: .5px solid var(--line); }
.rleft { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.rtime { font: 800 1.55rem/1 var(--num); font-variant-numeric: tabular-nums; }
.rlbl { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink3); }
.rest.done .rtime { font-size: 1.2rem; color: var(--acc); }
.rctl { display: flex; gap: .35rem; }
.rb { min-width: 2.9rem; min-height: 2.9rem; padding: 0 .55rem; border-radius: .9rem; background: var(--sunk); color: var(--acc); font-weight: 750; font-size: .95rem; display: inline-flex; align-items: center; justify-content: center; }
.rb.wide { padding: 0 1.1rem; }
.ring .rt { stroke: var(--sunk); stroke-width: 3.6; }
.ring .rp { stroke: var(--acc); stroke-width: 3.6; stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.rest.done .ring .rp { stroke: var(--acc); }

.wurow { display: flex; align-items: center; gap: .75rem; padding: .6rem .8rem; min-height: 4.4rem; }
.chk { width: 3rem; height: 3rem; border-radius: .95rem; border: 2px solid var(--line); color: transparent; display: flex; align-items: center; justify-content: center; flex: none; }
.chk.on { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }

/* ---------------------------------------------------------------- summary */

.sumex { padding: .85rem 1rem; }
.sumhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .1rem .6rem; }
.sumhead .nm { font-weight: 750; font-size: 1rem; }
.sumhead .cnt { font-size: .8rem; color: var(--ink3); white-space: nowrap; }
.sumhead .cnt.part { color: var(--acc); font-weight: 650; }
.chips2 { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.c2 { background: var(--sunk); border-radius: .65rem; padding: .35rem .65rem; font: 650 .92rem var(--num); font-variant-numeric: tabular-nums; }
.c2.tap { min-height: 2.5rem; }
.nexttime { display: flex; align-items: center; gap: .4rem; margin-top: .55rem; color: var(--acc); font-size: .88rem; }
.saved { text-align: center; font-size: .82rem; font-weight: 600; color: var(--ink3); margin: 1rem 0 .25rem; }

/* --------------------------------------------------------------- progress */

.trend { font-size: .75rem; font-weight: 700; color: var(--ink3); }
.trend.up { color: var(--acc); }
.trend.down { color: var(--danger); }
.spark { width: 4rem; height: 1.5rem; display: block; }
.spark .sl { stroke: var(--acc); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark .sd { fill: var(--acc); }
.segctl { display: flex; background: var(--sunk); border-radius: .9rem; padding: .2rem; gap: .15rem; margin: .3rem 0 .8rem; }
.sc { flex: 1; min-height: 2.6rem; border-radius: .7rem; font-size: .88rem; font-weight: 650; color: var(--ink2); padding: 0 .4rem; }
.sc.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.chartcard { background: var(--card); border-radius: 1.25rem; padding: .8rem .5rem .4rem; margin-bottom: .7rem; }
.chart { width: 100%; height: auto; display: block; color: var(--acc); }
.chart .cg { stroke: var(--line); stroke-width: 1; }
.chart .cy, .chart .cx { fill: var(--ink3); font-size: 10.5px; font-family: var(--font); }
.chart .ca { fill: var(--acc); opacity: .14; }
.chart .cl { stroke: var(--acc); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.chart .cd { fill: var(--card); stroke: var(--acc); stroke-width: 2.2; }
.chart .cd.last { fill: var(--acc); }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; margin-bottom: .8rem; }
.kpi { background: var(--card); border-radius: 1.1rem; padding: .7rem .7rem; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.kpi b { font: 800 1.1rem/1.2 var(--num); font-variant-numeric: tabular-nums; }
.kpi small { color: var(--ink3); font-size: .74rem; }

/* ------------------------------------------------------------------ plan */

.daycard { display: flex; flex-direction: column; gap: .2rem; width: 100%; text-align: left; background: var(--card); border-radius: 1.4rem; padding: .95rem 1rem; margin-bottom: .6rem; }
.dchead { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.daycard .dn { font-size: .7rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--acc); }
.daycard .dtime { font-size: .78rem; color: var(--ink3); }
.dtitle { font-size: 1.3rem; font-weight: 800; letter-spacing: -.015em; }
.dfocus { color: var(--ink3); font-size: .85rem; }
.dthumbs { display: flex; gap: .3rem; margin-top: .55rem; flex-wrap: wrap; }

.searchbox { display: flex; align-items: center; gap: .5rem; background: var(--sunk); border-radius: .95rem; padding: 0 .8rem; min-height: 2.9rem; color: var(--ink3); margin-top: .7rem; }
.searchbox input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 1rem; color: var(--ink); min-height: 2.8rem; }
.fchips { display: flex; gap: .4rem; overflow-x: auto; padding: .7rem 0 .6rem; margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.fchip { flex: none; min-height: 2.5rem; padding: 0 .95rem; border-radius: 1.3rem; background: var(--card); color: var(--ink2); font-weight: 650; font-size: .9rem; }
.fchip.on { background: var(--acc); color: var(--acc-ink); }

.prow { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem 0; }
.pl { display: flex; flex-direction: column; min-width: 0; }
.pl b { font-weight: 650; }
.pl small { color: var(--ink3); font-size: .78rem; }
.pctl { display: flex; align-items: center; gap: .3rem; flex: none; }
.pb { width: 2.9rem; height: 2.9rem; border-radius: .9rem; background: var(--sunk); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.pv { min-width: 3.6rem; text-align: center; font: 800 1.05rem var(--num); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- settings */

.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin-top: .45rem; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .65rem .2rem; min-height: 4.4rem; border-radius: 1rem; background: var(--sunk); font-size: .74rem; font-weight: 650; color: var(--ink2); box-shadow: inset 0 0 0 2px transparent; }
.swatch i { width: 1.8rem; height: 1.8rem; border-radius: 50%; display: block; }
.swatch.on { box-shadow: inset 0 0 0 2px var(--acc); color: var(--ink); }
.sw-brass i { background: #B0692A; }
.sw-blue i { background: #3F70EA; }
.sw-green i { background: #37985F; }
.sw-graphite i { background: #6B707C; }

/* ------------------------------------------------------------------ sheets */

.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgb(0 0 0 / .45); }
.modal[hidden] { display: none; }
.sheet { width: 100%; max-width: 600px; max-height: 92%; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 1.6rem 1.6rem 0 0; padding: .8rem 1rem calc(1.2rem + env(safe-area-inset-bottom, 0px)); animation: sheetUp .24s cubic-bezier(.2, .8, .2, 1); }
.sheet::before { content: ""; display: block; width: 2.4rem; height: .3rem; border-radius: .2rem; background: var(--line); margin: 0 auto .8rem; }
@keyframes sheetUp { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.shead { display: flex; align-items: flex-start; justify-content: space-between; gap: .7rem; margin-bottom: .8rem; }
.shead > div { flex: 1; min-width: 0; }
.shead h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.shead .sub { margin: .2rem 0 0; }
.shead .thumb { margin-right: .1rem; }
.xbtn { width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--sunk); color: var(--ink2); display: flex; align-items: center; justify-content: center; flex: none; }
.io { width: 100%; border: 0; border-radius: 1rem; background: var(--card); padding: .8rem .9rem; resize: vertical; font-size: 1rem; line-height: 1.4; outline: none; margin-top: .4rem; box-shadow: inset 0 0 0 2px transparent; }
.io:focus { box-shadow: inset 0 0 0 2px var(--acc); }
.io.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.err { color: var(--danger); font-size: .88rem; margin: .5rem .2rem 0; }
.rirlist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; margin: 0 0 .8rem; }
.rirlist li { background: var(--card); border-radius: .9rem; padding: .6rem .8rem; color: var(--ink2); }
.rirlist b { color: var(--acc); font-family: var(--num); margin-right: .3rem; }

.toast { position: fixed; left: 1rem; right: 1rem; margin: 0 auto; width: max-content; bottom: calc(6.4rem + env(safe-area-inset-bottom, 0px)); z-index: 60; max-width: min(26rem, calc(100% - 2rem)); display: flex; align-items: center; gap: .9rem; background: var(--ink); color: var(--bg); padding: .7rem 1rem; border-radius: 1.1rem; font-size: .92rem; font-weight: 600; box-shadow: var(--shadow); }
.toast[hidden] { display: none; }
.toast button { color: var(--toast-acc); font-weight: 750; min-height: 2.5rem; padding: 0 .3rem; }

.shake { animation: shake .32s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

/* a tick you can press is an empty ring; a set that is done is a filled disc */
.qchk svg { box-sizing: content-box; width: 1.1rem; height: 1.1rem; padding: .22rem; border: 1.5px solid var(--ink3); border-radius: 50%; }
.sck svg { box-sizing: content-box; width: 1.1rem; height: 1.1rem; padding: .22rem; border-radius: 50%; background: var(--acc); color: var(--acc-ink); }

/* ------------------------------------------------------ version 2.1 additions */

/* tab bar: four tabs, dot on Settings when a backup is due */
.tab { min-width: 0; }
.ticon { position: relative; display: flex; }
.tdot { position: absolute; top: -1px; right: -3px; width: .55rem; height: .55rem; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px var(--bg); }

/* Today */
.hero .focus { font-size: .95rem; font-weight: 600; opacity: .95; margin: -.05rem 0 .35rem; }
.week { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem .8rem; background: var(--card); border-radius: 1.25rem; padding: .75rem 1rem; margin: 0 0 .7rem; }
.wk { display: flex; flex-direction: column; flex: 1 1 8rem; min-width: 0; }
.wk b { font-size: .95rem; }
.wk small { color: var(--ink3); font-size: .82rem; }
.wdots { display: flex; gap: .4rem; flex: none; }
.wd { width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 2px solid var(--line); box-sizing: border-box; }
.wd.on { background: var(--acc); border-color: var(--acc); }

.nudge { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .65rem; background: var(--card); border-radius: 1.1rem; padding: .6rem .5rem .6rem .7rem; margin: 1.1rem 0 .4rem; }
.nudge .nico { width: 2.2rem; height: 2.2rem; border-radius: .65rem; background: var(--acc-soft); color: var(--acc); display: flex; align-items: center; justify-content: center; flex: none; }
.nudge .ntx { flex: 1 1 8rem; min-width: 0; overflow-wrap: anywhere; display: flex; flex-direction: column; }
.nudge .ntx b { font-size: .9rem; }
.nudge .ntx small { color: var(--ink3); font-size: .78rem; line-height: 1.25; }
.nudge .nbtn { min-height: 2.5rem; padding: 0 .85rem; border-radius: 1rem; background: var(--acc-soft); color: var(--acc); font-weight: 700; font-size: .9rem; flex: none; }
.nudge .nx { width: 2.5rem; height: 2.5rem; display: flex; align-items: center; justify-content: center; color: var(--ink3); flex: none; }

/* workout: Swap / Skip, swipe hint, slide, PR badge */
.exact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .8rem 0 .1rem; }
.exact.one { grid-template-columns: 1fr; }
.exact .btn { margin-top: 0; min-height: 3.2rem; font-size: .95rem; gap: .4rem; padding: 0 .6rem; }
.swipehint { display: flex; align-items: center; justify-content: center; gap: .4rem; color: var(--ink3); font-size: .78rem; margin: 1rem 0 .2rem; opacity: .85; }
@keyframes slideL { from { transform: translateX(28px); opacity: .0; } to { transform: none; opacity: 1; } }
@keyframes slideR { from { transform: translateX(-28px); opacity: .0; } to { transform: none; opacity: 1; } }
.scroll.slide-l { animation: slideL .22s ease-out; }
.scroll.slide-r { animation: slideR .22s ease-out; }
.prb { display: inline-flex; align-items: center; gap: .2rem; font-size: .72rem; font-weight: 800; letter-spacing: .04em; color: var(--acc-ink); background: var(--acc); border-radius: .5rem; padding: .12rem .42rem; }
.prb .ic { stroke: none; }

/* workout complete */
.donehero { text-align: center; padding: .6rem 0 .5rem; }
.donering { width: 5.2rem; height: 5.2rem; margin: 0 auto .7rem; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 .5rem var(--acc-soft); animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.donehero h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.1; }
.donehero .sub { margin: .35rem 0 .7rem; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.vsline { text-align: center; color: var(--ink3); font-size: .86rem; margin: -.2rem 0 .9rem; }
.vsline.up { color: var(--acc); font-weight: 650; }
.prcard { background: var(--acc-soft); border: 1.5px solid var(--acc-mid); border-radius: 1.25rem; padding: .85rem 1rem .6rem; margin: 0 0 .9rem; }
.prhead { display: flex; align-items: center; gap: .45rem; color: var(--acc); margin-bottom: .35rem; }
.prhead .ic { stroke: none; }
.prhead b { font-size: 1.02rem; color: var(--ink); }
.prrow { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .5rem 0; border-top: .5px solid var(--acc-mid); }
.prrow:first-of-type { border-top: 0; }
.prnm { display: flex; flex-direction: column; min-width: 0; font-weight: 650; }
.prnm small { color: var(--ink3); font-weight: 500; font-size: .78rem; }
.prval { font: 800 1.05rem var(--num); font-variant-numeric: tabular-nums; color: var(--acc); flex: none; text-align: right; }
.c2.pr { background: var(--acc-soft); color: var(--acc); display: inline-flex; align-items: center; gap: .3rem; }
.c2.pr .ic { stroke: none; }

/* ------------------------------------------------ version 2.2: storage safety */
.warnbox { background: rgb(168 64 42 / .12); border: 1.5px solid rgb(168 64 42 / .45); border-radius: 1.25rem; padding: .9rem 1rem 1rem; margin: 0 0 .9rem; }
.warnbox b { display: block; color: var(--danger); font-size: 1.02rem; margin-bottom: .2rem; }
.warnbox p { color: var(--ink2); font-size: .9rem; line-height: 1.45; margin: .2rem 0 .6rem; }
.warnbox .btn { margin-top: .5rem; }
.urlrow { background: var(--sunk); border-radius: .8rem; padding: .55rem .7rem; overflow-wrap: anywhere; font-size: .82rem; }
.urlrow code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.nudge.upd, .nudge.lightn { margin: 0 0 .8rem; }
.storage .kv { display: flex; justify-content: space-between; gap: .8rem; padding: .45rem 0; border-top: .5px solid var(--line); font-size: .92rem; }
.storage .kv:first-child { border-top: 0; }
.storage .kv span { color: var(--ink3); }
.storage .kv b { text-align: right; font-weight: 650; overflow-wrap: anywhere; }
.storage .hint { margin: .6rem 0 .1rem; text-align: left; }

/* ======================================================= version 3 */

/* Today: hero links, rings, later today */
.herolinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .4rem; }
.herolinks .herolink { display: inline-flex; align-items: center; gap: .35rem; margin: .3rem 0 0; }
.week.rings { display: block; }
.whead { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.whead small { color: var(--ink3); font-size: .78rem; }
.rgrow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .3rem; }
.rg { display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 0; text-align: center; }
.rg b { font-size: .8rem; font-weight: 700; }
.rg small { color: var(--ink3); font-size: .72rem; font-variant-numeric: tabular-nums; }
.rgc { position: relative; width: 3.5rem; height: 3.5rem; display: flex; align-items: center; justify-content: center; }
.rgc .ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.rgc .rt { stroke: var(--sunk); stroke-width: 3.6; }
.rgc .rp { stroke: var(--acc); stroke-width: 3.6; stroke-linecap: round; }
.rgn { position: relative; font: 800 1.1rem var(--num); color: var(--ink); display: flex; }
.rg.full .rgn { color: var(--acc); }
.rg.full .rgn .ic { stroke-width: 2.6; }
.secnote { color: var(--ink3); font-size: .78rem; }
.row.later .gopill { flex: none; min-height: 2.2rem; padding: 0 .9rem; border-radius: 1.1rem; background: var(--acc-soft); color: var(--acc); font-weight: 750; font-size: .88rem; display: inline-flex; align-items: center; }
.row.later.dim { opacity: .55; }
.notice.setup .btnrow { margin-top: .6rem; }
.rt3 { display: block; color: var(--ink3); font-size: .78rem; margin-top: .1rem; }

/* sheets: option rows, plan card, guides */
.opts { display: flex; flex-direction: column; gap: .4rem; margin: .2rem 0 .9rem; }
.opt { display: flex; align-items: center; gap: .75rem; text-align: left; background: var(--card); border-radius: 1.1rem; padding: .75rem .9rem; box-shadow: inset 0 0 0 2px transparent; }
.opt.on { box-shadow: inset 0 0 0 2px var(--acc); }
.ropt { width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.opt.on .ropt { border-color: var(--acc); background: radial-gradient(circle, var(--acc) 0 45%, transparent 50%); }
.wrapchips { flex-wrap: wrap; overflow: visible; margin: 0; padding: .5rem 0 .8rem; }
.plancard { background: var(--acc-soft); border-radius: 1.2rem; padding: .8rem .95rem; display: flex; flex-direction: column; gap: .25rem; margin-bottom: .7rem; }
.plancard b { font-size: 1.25rem; }
.plancard span { color: var(--ink2); font-size: .9rem; line-height: 1.4; }
.plancard small { color: var(--ink3); font-size: .78rem; }
.prognote { font-style: normal; font-weight: 700; color: var(--acc); font-size: .85rem; }
.guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: 0 0 .5rem; }
.guide > div { background: var(--card); border-radius: 1rem; padding: .6rem .75rem; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.guide small { color: var(--ink3); font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.guide b { font-size: .9rem; line-height: 1.3; }
.effort10 { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: .5rem 0 1rem; }
.distrow { margin: .4rem 0 1rem; }
.distrow .io { width: 100%; }
.eq .ic { margin-right: .3rem; vertical-align: -2px; }
.chip.eq { display: inline-flex; align-items: center; }

/* timer screen */
.xcard { background: var(--card); border-radius: 1.75rem; padding: 1.2rem 1rem 1.1rem; text-align: center; margin: .3rem 0 .8rem; }
.xcard.hard { background: var(--acc); color: var(--acc-ink); }
.xcard.hard .rt { stroke: rgb(255 255 255 / .28); }
.xcard.hard .rp { stroke: var(--acc-ink); }
.xcard.hard .xsub { color: inherit; opacity: .85; }
.xlabel { font-size: .9rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); }
.xcard.hard .xlabel { color: inherit; }
.xcard.done .xlabel { color: var(--acc); }
.xring { position: relative; width: min(14rem, 62vw); aspect-ratio: 1; margin: .5rem auto; display: flex; align-items: center; justify-content: center; }
.xring .ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.xring .rt { stroke: var(--sunk); stroke-width: 2.6; }
.xring .rp { stroke: var(--acc); stroke-width: 2.6; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.xtime { position: relative; font: 800 min(3.6rem, 15vw)/1 var(--num); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.xsub { color: var(--ink3); font-size: .95rem; min-height: 1.3em; }
.xtot { display: flex; justify-content: space-between; gap: .8rem; color: var(--ink3); font-size: .88rem; margin: 0 .4rem .8rem; }
.xtot b { color: var(--ink); font-variant-numeric: tabular-nums; }
.xctl { display: flex; gap: .5rem; margin-bottom: .8rem; }
.xb { flex: 1; min-height: 3.4rem; border-radius: 1.1rem; background: var(--card); font-weight: 700; display: flex; align-items: center; justify-content: center; gap: .4rem; }
.xb.main { flex: 2; background: var(--acc-soft); color: var(--acc); }

/* Why + plates + gym mode */
.tcell .lbl { display: flex; align-items: center; justify-content: space-between; }
.why { width: 2.75rem; height: 2.75rem; margin: -.7rem -.6rem -.7rem 0; display: flex; align-items: center; justify-content: center; color: var(--acc); }
.why-body p { color: var(--ink2); font-size: .98rem; line-height: 1.5; margin: 0 0 .7rem; }
.why-body b { color: var(--ink); }
.lightp { background: var(--acc-soft); border-radius: .9rem; padding: .6rem .8rem; }
.stallbox { background: var(--card); border-radius: 1.2rem; padding: .85rem 1rem 1rem; margin-top: .4rem; }
.stallbox p { color: var(--ink2); font-size: .9rem; line-height: 1.45; margin: .25rem 0 .3rem; }
.plates { color: var(--ink2); font-size: .82rem; text-align: center; margin: .55rem 0 .1rem; font-variant-numeric: tabular-nums; }
.plates[hidden] { display: none; }
.rval { font: 750 .95rem var(--num); color: var(--ink); text-align: right; }
.shell.gym .photos, .shell.gym .chips, .shell.gym .loadnote, .shell.gym .swipehint, .shell.gym .setup { display: none; }
.shell.gym .exname { font-size: 1.8rem; margin-top: .2rem; }
.shell.gym .sval { font-size: min(4rem, 17vw); }
.shell.gym .tcell .big { font-size: 1.7rem; }
.shell.gym .stp .stpbtn, .shell.gym .stp button { min-height: 3.6rem; }

/* month recap, calendar, balance */
.mnav { display: inline-flex; gap: .2rem; }
.mnav button { width: 2.6rem; height: 2.6rem; border-radius: .8rem; background: var(--card); display: flex; align-items: center; justify-content: center; color: var(--acc); }
.mgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; }
.mtile { background: var(--card); border-radius: 1rem; padding: .6rem .4rem; text-align: center; display: flex; flex-direction: column; min-width: 0; }
.mtile b { font: 800 1.2rem/1.15 var(--num); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mtile span { color: var(--ink3); font-size: .72rem; }
.mtop { display: flex; align-items: center; gap: .4rem; color: var(--ink2); font-size: .85rem; margin: .6rem .2rem 0; }
.mtop .ic { color: var(--acc); stroke: none; flex: none; }
.calwrap { background: var(--card); border-radius: 1.25rem; padding: .7rem .6rem .6rem; margin-top: .6rem; }
.calgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .2rem; }
.calgrid .dow { font-style: normal; text-align: center; font-size: .68rem; font-weight: 700; color: var(--ink3); padding-bottom: .2rem; }
.cd { position: relative; aspect-ratio: 1; border-radius: .7rem; display: flex; flex-direction: column; align-items: center; justify-content: center; font-style: normal; gap: 1px; min-width: 0; }
.cd b { font: 650 .82rem var(--num); }
.cd em { display: flex; gap: 2px; min-height: 5px; }
.cd.blank { background: none; }
.cd.lift { background: var(--acc); color: var(--acc-ink); }
.cd.today { box-shadow: inset 0 0 0 2px var(--ink3); }
.cd.lift.today { box-shadow: inset 0 0 0 2px var(--ink); }
.dc, .ds, .lg { display: inline-block; width: 5px; height: 5px; border-radius: 50%; }
.dc { background: #3A86D9; }
.ds { background: #E0733A; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; color: var(--ink3); font-size: .74rem; margin: .6rem .2rem 0; }
.lg { width: .7rem; height: .7rem; margin-right: .3rem; }
.lg.lift { background: var(--acc); }
.lg.dc { background: #3A86D9; }
.lg.ds { background: #E0733A; }
.bal .brow { display: grid; grid-template-columns: 5.2rem minmax(0, 1fr) 3.2rem; align-items: center; gap: .6rem; padding: .3rem 0; }
.bn { font-size: .88rem; font-weight: 600; }
.bbar { position: relative; height: .7rem; border-radius: .4rem; background: var(--sunk); }
.bnow { position: absolute; left: 0; top: 0; bottom: 0; background: var(--acc); border-radius: .4rem; min-width: 0; }
.bprev { position: absolute; top: -.2rem; bottom: -.2rem; width: 3px; border-radius: 2px; background: var(--ink); opacity: .55; }
.bv { font: 750 .88rem var(--num); text-align: right; font-variant-numeric: tabular-nums; }
.bv small { color: var(--ink3); font-weight: 500; }

/* starting weights */
.blrow { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; }
.blrow .rmid { flex: 1; min-width: 0; }
.blctl { display: flex; align-items: center; gap: .3rem; flex: none; }
.blctl .pb { width: 2.75rem; height: 2.75rem; }
.blin { width: 3.9rem; height: 2.75rem; border: 0; border-radius: .8rem; background: var(--sunk); text-align: center; font: 800 1.05rem var(--num); color: var(--ink); padding: 0; outline: none; }
.blin:focus { box-shadow: inset 0 0 0 2px var(--acc); }
.blin::placeholder { color: var(--ink3); font-weight: 500; }
.padded1 { padding: .5rem 1rem; }
.pb:disabled { opacity: .35; }

.herolinks .herolink { padding: 0 .55rem; }
.sheet .stickycta { position: sticky; bottom: -.4rem; z-index: 2; box-shadow: 0 -14px 14px -4px var(--bg); }

.nudge.lightn { margin-top: .8rem; }

.rgrow { grid-template-columns: repeat(auto-fit, minmax(min(4.4rem, 100%), 1fr)); }
.rgc { width: min(3.5rem, 100%); height: auto; aspect-ratio: 1; }
.rg b, .rg small { overflow-wrap: anywhere; }
.row.later .rmid { min-width: 0; }
.row.later .rt1, .row.later .rt2 { white-space: normal; overflow-wrap: anywhere; }

.prow { flex-wrap: wrap; }
.prow .pl { flex: 1 1 9rem; }
.mgrid { grid-template-columns: repeat(auto-fit, minmax(min(6.2rem, 100%), 1fr)); }
.mtile b { overflow-wrap: anywhere; font-size: clamp(1rem, 1.2rem, 1.3rem); }
.bal .brow { grid-template-columns: minmax(3.6rem, 5.2rem) minmax(0, 1fr) auto; }
.bn { overflow-wrap: anywhere; }

.pb { width: min(2.9rem, 20vw); height: min(2.9rem, 20vw); }
.pv { min-width: min(3.6rem, 20vw); }
.blctl .pb { width: min(2.75rem, 15vw); height: min(2.75rem, 15vw); }
.blin { width: min(3.9rem, 17vw); height: min(2.75rem, 15vw); }
.pctl { max-width: 100%; flex-wrap: wrap; justify-content: flex-end; }
.pv { min-width: min(3.6rem, 12vw); padding: 0 .2rem; }
.sec + .group { margin-top: .9rem; }
.scroll > .group + .mhead, .scroll > .group + .sechd { margin-top: 1.4rem; }
.blrow { gap: .55rem; padding: .5rem .7rem; }
.blrow .thumb { width: 2.6rem; height: 2.6rem; }
.blctl { gap: .2rem; }
.blctl .pb { width: min(2.4rem, 12vw); height: min(2.4rem, 12vw); border-radius: .75rem; }
.blin { width: min(3.3rem, 15vw); height: min(2.4rem, 12vw); font-size: 1rem; }

.warnbox.info { background: var(--acc-soft); border-color: var(--acc-mid); }
.warnbox.info b:first-child { color: var(--ink); }
.warnbox.info p b { display: inline; color: var(--ink); margin: 0; font-size: inherit; }
