/* cardio.css — the Cardio panel (cardio upgrade, owner 2026-10-11; cardioPanel.js).
 *
 * Pick 1a: the room's own look rather than a web form — a square umber pixel border,
 * the cream ground, the top bar's letter-spaced heading, hard pixel drop shadows instead
 * of soft ones. Colours are the skin's palette tokens (palette.css); every literal is
 * that token's fallback or a shade of one. `.pr-` is the shared ruler (pixelRuler.js).
 */

.cp-veil { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(20, 28, 14, .58); }
.cp-panel { display: flex; flex-direction: column; width: min(calc(100% - 16px), 460px);
  max-height: calc(100dvh - 70px); margin-bottom: calc(env(safe-area-inset-bottom) + 8px);
  color: var(--tol-umber, #3a2c23); background: var(--tol-cream, #f8f3e4);
  border: 3px solid var(--tol-umber, #3a2c23); box-shadow: 4px 4px 0 rgba(10, 6, 4, .55); }
.cp-pix { display: block; flex: 0 0 auto; image-rendering: pixelated; }
.cp-lbl { font-size: 9.5px; font-weight: 900; letter-spacing: 1.4px; text-transform: uppercase; color: var(--tol-wood-dark, #8a5a35); }
.cp-link { padding: 4px 0; font: inherit; font-size: 11px; font-weight: 900; color: var(--tol-wood-dark, #8a5a35);
  background: none; border: none; text-decoration: underline; }
.cp-hint, .cp-empty { margin: -2px 0 8px; font-size: 9.5px; color: #8a7a6a; }
.cp-empty { margin: 10px 0 0; font-size: 11px; }
.cp-copy { margin: 0 0 10px; font-size: 12px; line-height: 1.5; }

/* the head: the top bar's heading, an umber rule under it */
.cp-head { flex: 0 0 auto; display: flex; align-items: stretch; height: 42px;
  border-bottom: 2px solid var(--tol-umber, #3a2c23); }
.cp-title { flex: 1; display: flex; align-items: center; padding: 0 12px; font-weight: 800; font-size: 13px; letter-spacing: 2px; }
.cp-x, .cp-back { width: 46px; padding: 0; font: inherit; font-size: 16px; font-weight: 900; color: var(--tol-umber, #3a2c23);
  background: var(--tol-warm-tan, #e3d5b8); border: none; border-left: 2px solid var(--tol-umber, #3a2c23); }
.cp-back { border-left: none; border-right: 2px solid var(--tol-umber, #3a2c23); font-size: 20px; }
.cp-x:active, .cp-back:active { background: var(--tol-wood-light, #c9975b); }
.cp-body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 14px; }

/* date (the sauna's step arrows, in cream) + the streak */
.cp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cp-dstep { display: flex; height: 42px; border: 2px solid var(--tol-umber, #3a2c23); box-shadow: 2px 2px 0 rgba(58, 44, 35, .3); }
.cp-darrow { width: 32px; padding: 0; font: inherit; font-size: 18px; font-weight: 900; color: var(--tol-cream, #f8f3e4);
  background: var(--tol-wood-dark, #8a5a35); border: none; }
.cp-darrow:disabled { color: rgba(248, 243, 228, .3); }
.cp-dmid { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 84px; padding: 0 8px; line-height: 1.15; cursor: pointer; background: var(--tol-warm-tan, #e3d5b8);
  border-left: 2px solid var(--tol-umber, #3a2c23); border-right: 2px solid var(--tol-umber, #3a2c23); }
.cp-dmid b { font-size: 12.5px; }
.cp-dmid span { font-size: 10px; font-weight: 800; color: var(--tol-wood-dark, #8a5a35); }
.cp-datein { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
/* 2b: the activity row — it SLIDES (owner, 2026-10-12): swipe on the phone, drag with a
   mouse, and it settles on a tile edge */
.cp-tiles { display: flex; gap: 7px; margin: 4px -12px 6px 0; padding: 3px 12px 8px 2px; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity; scroll-padding-left: 2px; cursor: grab; }
.cp-tiles::-webkit-scrollbar { display: none; }
.cp-tiles.drag { cursor: grabbing; scroll-snap-type: none; }
/* Every tile is the SAME size (owner, 2026-10-12): the icon sits in a fixed 52 px band —
   the tallest icon (the stair climber, 26 art px at 2x) fits whole — and a long name
   wraps onto a second line instead of being cut off or widening its tile. */
.cp-tile { flex: 0 0 84px; width: 84px; height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px;
  padding: 6px 4px; font: inherit; color: var(--tol-umber, #3a2c23); scroll-snap-align: start;
  background: var(--tol-warm-tan, #e3d5b8); border: 2px solid var(--tol-umber, #3a2c23);
  box-shadow: inset 0 -3px 0 rgba(138, 90, 53, .35);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-x; }
.cp-tile .cp-pix { -webkit-user-drag: none; pointer-events: none; }
.cp-tic { flex: 0 0 52px; height: 52px; display: flex; align-items: flex-end; justify-content: center; }
.cp-tl { display: flex; align-items: center; justify-content: center; min-height: 2.3em; max-width: 100%;
  text-align: center; line-height: 1.15; font-size: 9px; font-weight: 900; letter-spacing: .6px; text-transform: uppercase; }
.cp-tile.on { background: var(--tol-cream, #f8f3e4); border-color: var(--tol-terracotta, #c96f4a);
  box-shadow: 0 0 0 2px var(--tol-umber, #3a2c23), 3px 3px 0 2px rgba(58, 44, 35, .35); }
.cp-tile.on .cp-tl { color: var(--tol-terracotta, #c96f4a); }
.cp-tile.held { border-color: #a33; background: rgba(170, 51, 51, .1); }
.cp-add { justify-content: center; font-size: 22px; font-weight: 900; color: rgba(58, 44, 35, .55);
  background: rgba(227, 213, 184, .35); border-color: rgba(58, 44, 35, .25); box-shadow: none; }
.cp-tile:active { transform: translateY(1px); }

.cp-rmbar, .cp-addrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 10px; padding: 7px 8px;
  font-size: 11px; font-weight: 800; border: 2px solid rgba(138, 90, 53, .28); background: rgba(227, 213, 184, .45); }
.cp-rmbar span { flex: 1 1 100%; }
.cp-addin { flex: 1; min-width: 0; padding: 7px 8px; font: inherit; font-size: 13px; color: var(--tol-umber, #3a2c23);
  background: #fff; border: 2px solid var(--tol-umber, #3a2c23); border-radius: 0; }
.cp-addmsg { flex: 1 1 100%; font-size: 10px; color: #a33; }
.cp-addmsg:empty { display: none; }
.cp-sbtn { padding: 6px 10px; font: inherit; font-size: 11px; font-weight: 900; color: var(--tol-umber, #3a2c23);
  background: var(--tol-warm-tan, #e3d5b8); border: 2px solid var(--tol-umber, #3a2c23); }
.cp-sbtn.cp-rmyes { color: var(--tol-cream, #f8f3e4); background: #a8402b; }

/* 3b: value boxes over rulers */
.cp-vbox { margin-bottom: 8px; padding: 8px 10px 10px; background: rgba(227, 213, 184, .45); border: 2px solid var(--tol-umber, #3a2c23); }
.cp-vhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.cp-big { display: inline-flex; align-items: baseline; gap: 3px; margin: 2px 0 0; cursor: text; }
.cp-bignum { min-width: 1ch; padding: 0; font: inherit; font-size: 26px; font-weight: 900; line-height: 1.05;
  color: var(--tol-umber, #3a2c23); background: none; border: none; border-bottom: 2px solid rgba(138, 90, 53, .22);
  border-radius: 0; font-variant-numeric: tabular-nums; }
.cp-bignum:focus { outline: none; border-bottom-color: var(--tol-terracotta, #c96f4a); }
.cp-big small { font-size: 12px; font-weight: 800; }

.pr-ruler { position: relative; height: 36px; margin-top: 8px; overflow: hidden; touch-action: none; cursor: grab;
  background: var(--tol-cream, #f8f3e4); border: 2px solid var(--tol-umber, #3a2c23); box-shadow: inset 0 2px 0 rgba(58, 44, 35, .15);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); }
.pr-ruler.grab { cursor: grabbing; }
.pr-ruler:focus-visible { outline: 2px solid var(--tol-terracotta, #c96f4a); outline-offset: 2px; }
.pr-tape { position: absolute; inset: 0; pointer-events: none; }
.pr-tape i { position: absolute; top: 0; width: 2px; height: 5px; margin-left: -1px; background: rgba(138, 90, 53, .45); }
.pr-tape i.mid { height: 9px; }
.pr-tape i.big { height: 12px; background: var(--tol-umber, #3a2c23); }
.pr-tape b { position: absolute; bottom: 3px; transform: translateX(-50%); font-size: 10px; font-weight: 900;
  white-space: nowrap; font-variant-numeric: tabular-nums; }
.pr-marker { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; pointer-events: none;
  background: var(--tol-terracotta, #c96f4a); }
.pr-marker::before { content: ''; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--tol-terracotta, #c96f4a); }

/* the note (under the icons), the time of day, Log — owner's order, 2026-10-12 */
/* ＋ Note | Start time — two buttons on one row, each opening in place (owner's pick 1A);
   Start time opens 1C's step arrows, 15 minutes a tap */
.cp-nt { margin: 0 0 10px; }
.cp-duo { display: flex; gap: 8px; }
.cp-duob { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px;
  font: inherit; font-size: 11px; font-weight: 900; letter-spacing: .5px; text-transform: uppercase; color: var(--tol-umber, #3a2c23);
  background: var(--tol-warm-tan, #e3d5b8); border: 2px solid var(--tol-umber, #3a2c23); box-shadow: inset 0 -3px 0 rgba(138, 90, 53, .35); }
.cp-duob.set { color: var(--tol-terracotta, #c96f4a); background: var(--tol-cream, #f8f3e4); border-color: var(--tol-terracotta, #c96f4a); }
.cp-duob .cp-pix { width: 15px; height: auto; }
.cp-duob:active { transform: translateY(1px); }
.cp-tstep { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cp-tstep .cp-dstep { flex: 1; }
.cp-tstep .cp-dmid { flex: 1; }
.cp-tstep .cp-dmid b { font-size: 15px; }
/* ✕ = no start time: a faded square, the same height as the arrows */
.cp-notime { flex: 0 0 42px; height: 42px; padding: 0; font: inherit; font-size: 17px; font-weight: 900; color: var(--tol-wood-dark, #8a5a35);
  background: rgba(227, 213, 184, .45); border: 2px solid rgba(138, 90, 53, .28); }
.cp-notime:active { background: rgba(227, 213, 184, .8); }
.cp-nt .cp-note { margin: 8px 0 0; }
.cp-note { display: block; width: 100%; min-height: 44px; margin: 0 0 10px; padding: 7px 8px; font: inherit; font-size: 13px; resize: vertical;
  color: var(--tol-umber, #3a2c23); background: #fff; border: 2px solid var(--tol-umber, #3a2c23); }
.cp-log { display: block; width: 100%; padding: 12px; font: inherit; font-size: 14px; font-weight: 900; letter-spacing: 1px;
  color: var(--tol-cream, #f8f3e4); background: var(--tol-moss, #3a5a40); border: 2px solid var(--tol-umber, #3a2c23);
  box-shadow: inset 0 2px 0 #557a5b, inset 0 -3px 0 #263c2a, 3px 3px 0 rgba(58, 44, 35, .35); }
.cp-log:active { transform: translateY(1px); }
.cp-log:disabled { opacity: .7; }
.cp-log.done { background: var(--tol-leaf, #7a9b5e); }

/* 7: this week — bars coloured by activity (owner's pick) */
.cp-week { margin-top: 14px; padding-top: 10px; border-top: 2px solid var(--tol-umber, #3a2c23); }
.cp-whead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cp-wtot { font-size: 12px; font-weight: 900; }
.cp-bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 92px;
  margin: 18px 0 2px; padding: 0 2px; border-bottom: 2px solid var(--tol-umber, #3a2c23); }
.cp-bcol { position: relative; display: flex; flex-direction: column-reverse; height: 100%; }
.cp-bseg { border: 2px solid var(--tol-umber, #3a2c23); border-bottom: none; }
.cp-bseg.run, .cp-key.run { background: var(--tol-terracotta, #c96f4a); }
.cp-bseg.walk, .cp-key.walk { background: var(--tol-leaf, #7a9b5e); }
.cp-bseg.mach, .cp-key.mach { background: var(--tol-wood-light, #c9975b); }
.cp-bmin { position: absolute; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 900; white-space: nowrap; }
/* today: a faded column behind the bar, not a dashed frame */
.cp-bcol.today::after { content: ''; position: absolute; z-index: -1; inset: -4px -3px -2px; background: rgba(201, 111, 74, .14); pointer-events: none; }
.cp-bars { position: relative; z-index: 0; }
.cp-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 0 2px; text-align: center; font-size: 9.5px; font-weight: 900; }
.cp-days .today { color: var(--tol-terracotta, #c96f4a); }
.cp-legend { display: flex; gap: 12px; margin: 6px 0 2px; font-size: 9.5px; font-weight: 800; }
.cp-key { display: inline-block; width: 9px; height: 9px; margin-right: 4px; vertical-align: -1px; border: 2px solid var(--tol-umber, #3a2c23); }

.cp-hist { margin-top: 10px; }
.cp-hrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 11.5px;
  background: rgba(227, 213, 184, .35); border: 2px solid var(--tol-umber, #3a2c23); }
.cp-hrow + .cp-hrow { margin-top: 5px; }
.cp-hdate { font-size: 10.5px; font-weight: 900; color: var(--tol-umber, #3a2c23); }
.cp-htxt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cp-hmain { font-weight: 800; }
.cp-hnote { font-size: 10.5px; font-style: italic; color: #6b5a4b; }
.cp-hdel { flex: 0 0 auto; width: 28px; height: 28px; padding: 0; font: inherit; font-size: 16px; font-weight: 900; color: #a33; background: none; border: none; }
.cp-seeall { display: block; margin-top: 8px; }
.cp-clearall { display: block; margin: 14px auto 0; padding: 7px 12px; font: inherit; font-size: 11px; font-weight: 900;
  color: #a33; background: none; border: 2px solid #a33; }

.cp-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.cp-ibtn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; font: inherit; font-size: 10.5px; font-weight: 900;
  color: var(--tol-umber, #3a2c23); background: var(--tol-warm-tan, #e3d5b8); border: 2px solid var(--tol-umber, #3a2c23); }

/* 6a: Edit machines */
.cp-body > .cp-addrow { margin-top: 10px; }

/* ---- step 5: live sessions ---- */
.cp-vhead .cp-liveacts { display: flex; gap: 5px; align-self: center; }
.cp-pbtn { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; font: inherit; font-size: 10.5px; font-weight: 900;
  letter-spacing: .5px; text-transform: uppercase; color: var(--tol-cream, #f8f3e4); background: var(--tol-terracotta, #c96f4a);
  border: 2px solid var(--tol-umber, #3a2c23); box-shadow: inset 0 2px 0 #e39572, inset 0 -2px 0 #8f3d22, 2px 2px 0 rgba(58, 44, 35, .35); }
.cp-pbtn.wood { background: var(--tol-wood-dark, #8a5a35); box-shadow: inset 0 2px 0 #a8744a, inset 0 -2px 0 #5b3a25, 2px 2px 0 rgba(58, 44, 35, .35); }
.cp-pbtn .cp-pix { width: 13px; height: auto; }
.cp-pbtn:active { transform: translateY(1px); }

.cp-livetag { font-size: 11px; font-weight: 900; letter-spacing: 1px; color: var(--tol-terracotta, #c96f4a); }
.cp-livesub { font-size: 10.5px; font-weight: 800; color: var(--tol-wood-dark, #8a5a35); }
.cp-nice { margin: 2px 0 8px; font-size: 13px; text-transform: uppercase; }
.cp-face { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; padding: 12px;
  background: rgba(227, 213, 184, .45); border: 2px solid var(--tol-umber, #3a2c23); }
.cp-readout { min-width: 0; }
.cp-clock { font-size: 40px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.cp-clock.over { color: var(--tol-terracotta, #c96f4a); }
.cp-of { margin-top: 3px; font-size: 11px; font-weight: 800; color: var(--tol-wood-dark, #8a5a35); }
.cp-prog { height: 12px; margin-bottom: 10px; background: var(--tol-cream, #f8f3e4); border: 2px solid var(--tol-umber, #3a2c23); }
.cp-prog i { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--tol-terracotta, #c96f4a) 0 6px, #b25d3b 6px 8px); }
.cp-discard { display: block; margin: 8px auto 0; }
.cp-livehint { margin-top: 10px; font-size: 10.5px; line-height: 1.45; color: #6b5a4b; }
.cp-ask { padding: 10px; background: rgba(201, 111, 74, .14); border: 2px solid var(--tol-terracotta, #c96f4a); }
.cp-asktitle { margin-bottom: 9px; font-size: 13px; font-weight: 800; line-height: 1.35; }
.cp-askrow { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-fix { border-color: var(--tol-terracotta, #c96f4a); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes cpDing { 50% { box-shadow: inset 0 0 0 3px var(--tol-terracotta, #c96f4a), 4px 4px 0 rgba(10, 6, 4, .55); } }
  .cp-panel.cp-ding { animation: cpDing .5s ease-out 3; }
}

/* the iPhone timer page */
.cp-steps { margin: 0 0 10px; padding-left: 20px; font-size: 12px; line-height: 1.5; }
.cp-steps li + li { margin-top: 3px; }
.cp-namerow { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.cp-test { margin-bottom: 12px; }
.cp-ihint { margin-top: 12px; line-height: 1.45; }

/* ---- review 3 (owner, 2026-10-13) ---- */

/* "With Willow" — a full-width row under the activities, on a walk */
.cp-dogrow { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 0 0 8px; padding: 8px 10px;
  font: inherit; text-align: left; color: var(--tol-umber, #3a2c23);
  background: rgba(227, 213, 184, .45); border: 2px solid rgba(58, 44, 35, .25); }
.cp-dogrow .cp-pix { width: 26px; height: auto; }
.cp-dogtxt { font-size: 12px; font-weight: 900; letter-spacing: .4px; text-transform: uppercase; }
.cp-dogrow.on { background: var(--tol-cream, #f8f3e4); border-color: var(--tol-moss, #3a5a40);
  box-shadow: 0 0 0 2px var(--tol-umber, #3a2c23), 3px 3px 0 2px rgba(58, 44, 35, .3); }
.cp-dogrow.on .cp-dogtxt { color: var(--tol-moss, #3a5a40); }
.cp-dogrow:active { transform: translateY(1px); }

/* history: one card per day, the pencil unlocks the deletes */
.cp-hhead { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.cp-pencil { min-width: 34px; height: 30px; padding: 0 8px; font: inherit; font-size: 14px; font-weight: 900; color: var(--tol-umber, #3a2c23);
  background: rgba(227, 213, 184, .45); border: 2px solid rgba(58, 44, 35, .25); }
.cp-pencil.on { font-size: 11px; text-transform: uppercase; color: var(--tol-cream, #f8f3e4); background: var(--tol-wood-dark, #8a5a35); border-color: var(--tol-umber, #3a2c23); }
.cp-hist { margin-top: 6px; }
.cp-hday { padding: 6px 8px 4px; background: rgba(227, 213, 184, .35); border: 2px solid var(--tol-umber, #3a2c23); }
.cp-hday + .cp-hday { margin-top: 6px; }
.cp-hdtop { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-bottom: 4px;
  border-bottom: 2px solid rgba(58, 44, 35, .12); }
.cp-hdtot { font-size: 10.5px; font-weight: 800; color: var(--tol-wood-dark, #8a5a35); }
.cp-hday .cp-hrow { padding: 5px 0; background: none; border: none; }
.cp-hday .cp-hrow + .cp-hrow { margin-top: 0; border-top: 1px solid rgba(58, 44, 35, .08); }
.cp-hdog { font-size: 10.5px; font-weight: 800; color: var(--tol-moss, #3a5a40); }
.cp-hist.editing .cp-hday { border-color: #a33; }

/* ✕ — closes the add-a-machine row (owner, 2026-10-13: an icon, not "cancel") */
.cp-xbtn { flex: 0 0 34px; height: 34px; padding: 0; font: inherit; font-size: 15px; font-weight: 900; color: var(--tol-wood-dark, #8a5a35);
  background: rgba(227, 213, 184, .45); border: 2px solid rgba(138, 90, 53, .28); }
.cp-xbtn:active { background: rgba(227, 213, 184, .8); }

/* the edit bar (owner, 2026-10-13): Rename · Cancel · Delete — Delete on the far right,
   Cancel quieter than Rename so the two never read as the same kind of button */
.cp-editacts { flex: 1 1 100%; display: flex; gap: 6px; }
.cp-right { margin-left: auto; }
.cp-sbtn.cp-cancelbtn { color: var(--tol-wood-dark, #8a5a35); background: transparent; border-color: rgba(138, 90, 53, .35); box-shadow: none; }
.cp-rmbar.cp-delask { border-color: rgba(168, 64, 43, .45); background: rgba(168, 64, 43, .08); }
.cp-rmbar.cp-delask .cp-rmyes { margin-left: auto; }
