/* Home (home.js): today at a glance. The "MODE Today vs Proposed" artifact, Home B with the
   photo slot filled by your own day (B2 workout / B3 rest day). Theme tokens only, except the
   white text and dark scrim over the photo. */
.hm-head { padding-right: 186px; margin: 2px 0 14px; min-height: 28px; }
.hm-head small { display: block; font-size: 13px; color: var(--text2); margin-bottom: 2px; }
html.bd-pill-on:not(.is-offline) .hm-head, html.is-offline .hm-head { padding-right: 220px; }
@media (max-width: 379px) { html.bd-pill-on:not(.is-offline) .hm-head { padding-right: 160px; } }
.hm-head h1 { margin: 0; }

/* Shared row pieces */
.hm-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding-top: 4px; padding-bottom: 4px; }
.hm-row + .hm-row { border-top: 1px solid var(--border); }
.hm-row.dim { opacity: .55; }
.hm-row.tap { cursor: pointer; }
.hm-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--accent-soft); color: var(--accent); }
.hm-ic svg { width: 19px; height: 19px; }
.hm-ic.lift { background: var(--green-soft); color: var(--green); }
.hm-ic.cardio { background: var(--cardio-soft); color: var(--cardio); }
.hm-ic.done { background: var(--bg3); color: var(--green); }
.hm-grow { flex: 1; min-width: 0; }
.hm-t { font-size: 15px; font-weight: 700; color: var(--text); }
.hm-row.dim .hm-t { text-decoration: line-through; }
.hm-m { font-size: 12.5px; color: var(--text2); margin-top: 2px; line-height: 1.3; }
.hm-go { color: var(--text3); font-size: 20px; line-height: 1; flex-shrink: 0; }
.hm-btn { flex-shrink: 0; height: 36px; padding: 0 14px; white-space: nowrap; }

/* The photo slot: a card like every other card, the photo on top */
.hm-hero { padding: 0; overflow: hidden; position: relative; }
.hm-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hm-track::-webkit-scrollbar { display: none; }
.hm-slide { flex: 0 0 100%; scroll-snap-align: start; min-width: 0; }
.hm-img { position: relative; height: 210px; background-color: var(--bg3); background-size: cover; background-position: center; display: flex; align-items: flex-end; }
.hm-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.78) 100%); }
.hm-img.lift { background-image: url(img/home/lift.jpg); }
.hm-img.bday { background-image: url(img/home/lift.jpg); background-position: center 30%; }
.hm-img.bday .hm-tx { padding-right: 96px; }
.hm-img.bday .hm-tag { background: #f5c451; color: #2a1a00; }
.hm-confetti { position: absolute; left: 0; top: 0; width: 100%; height: 62%; z-index: 1; pointer-events: none; }
.hm-bday-badge { position: absolute; right: 10px; bottom: 12px; z-index: 2; line-height: 0; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.hm-img.rest { background-image: url(img/home/food.jpg); }
.hm-img.cardio { background-image: url(img/home/cardio.jpg); background-position: center 40%; }
.hm-img.done { background-image: url(img/home/back.jpg); background-position: center 30%; }
.hm-img.halloween { background-image: url(img/home/halloween.jpg); background-position: center 35%; }
.hm-img.fall-run { background-image: url(img/home/fall-run.jpg); background-position: center 62%; }
.hm-img.feast { background-image: url(img/home/feast.jpg); background-position: center 48%; }
/* Your day's photo by what it is (home.js _homeLiftImg / _homeCardioImg); credits in img/home/CREDITS.md.
   Not offered to challenges (MCA_PHOTOS): a challenge photo key needs a migration. */
.hm-img.upper { background-image: url(img/home/upper.jpg); background-position: center 30%; }
.hm-img.legs { background-image: url(img/home/legs.jpg); background-position: center 30%; }
.hm-img.hiit { background-image: url(img/home/hiit.jpg); background-position: center 60%; }
/* Walks and runs by when they started (_homeTimeOfDay): morning / afternoon / evening (also night) */
.hm-img.walk-morning { background-image: url(img/home/walk-morning.jpg); background-position: center 60%; }
.hm-img.walk-afternoon { background-image: url(img/home/walk-afternoon.jpg); background-position: center 80%; }
.hm-img.walk-evening { background-image: url(img/home/walk-evening.jpg); background-position: center 85%; }
.hm-img.run-morning { background-image: url(img/home/run-morning.jpg); background-position: center 70%; }
.hm-img.run-afternoon { background-image: url(img/home/run-afternoon.jpg); background-position: center 70%; }
.hm-img.run-evening { background-image: url(img/home/run-evening.jpg); background-position: center 35%; }
.hm-img.bike { background-image: url(img/home/bike.jpg); background-position: center 60%; }
.hm-img.machine { background-image: url(img/home/machine.jpg); }
.hm-img.boxing { background-image: url(img/home/boxing.jpg); background-position: center 30%; }
.hm-img.grapple { background-image: url(img/home/grapple.jpg); background-position: center 30%; }
.hm-img.kick { background-image: url(img/home/kick.jpg); background-position: center 85%; }
.hm-img.pilates { background-image: url(img/home/pilates.jpg); background-position: center 40%; }
.hm-img.yoga { background-image: url(img/home/yoga.jpg); background-position: center 30%; }
.hm-img.barre { background-image: url(img/home/barre.jpg); background-position: center 25%; }
.hm-tx { position: relative; z-index: 1; padding: 14px 16px 12px; color: #fff; min-width: 0; }
.hm-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 4px 8px; border-radius: 99px; background: var(--primary); color: var(--on-accent); }
.hm-ht { font-size: 30px; font-weight: 900; letter-spacing: -.02em; line-height: 1.05; margin: 7px 0 3px; overflow-wrap: anywhere; }
.hm-hs { font-size: 13.5px; font-weight: 600; opacity: .9; line-height: 1.3; }
.hm-dots { position: absolute; top: 12px; left: 16px; z-index: 2; display: flex; gap: 5px; pointer-events: none; }
.hm-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.5); transition: width .2s; }
.hm-dots i.on { width: 16px; background: #fff; }
.hm-hft { display: flex; align-items: center; gap: 12px; padding: 12px 16px 14px; }
.hm-hft .hm-m { flex: 1; min-width: 0; margin: 0; font-size: 12px; }
.hm-hft .hm-bar { margin-top: 0; }

/* Almost there (the "MODE Today Challenges" canvas, option E2): white on a dark glass pill, top right
   of your day's photo. challenges.js mcAlmostHTML, else badges.js badgesAlmostPillHTML. */
.hm-pill { position: absolute; top: 10px; right: 10px; z-index: 3; max-width: calc(100% - 90px); display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 5px;
  border-radius: 99px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(15, 15, 15, .62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #fff; font: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.hm-pill > svg { flex-shrink: 0; }
.hm-pill .mc-ring circle:first-child { stroke: rgba(255, 255, 255, .25); }
.hm-pill small { font-size: 12.5px; font-weight: 600; opacity: .8; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Calories left · burned · steps */
.hm-cal { cursor: pointer; }
.hm-cal-row { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 8px; }
.hm-cal-row.two { grid-template-columns: 1.25fr 1fr; }
.hm-cal-row > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-cal-row > div + div { border-left: 1px solid var(--border); padding-left: 10px; }
.hm-cal-row span { font-size: 11.5px; font-weight: 600; color: var(--text2); }
.hm-cal-row b { display: inline-flex; align-items: center; gap: 3px; font-size: 22px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hm-cal-row > div:first-child b { font-size: 26px; }
.hm-cal-row b.over { color: var(--fuel-warn); }
.hm-cal-burn i { display: inline-grid; color: var(--kcal, var(--accent)); }
.hm-cal-burn i svg { width: 16px; height: 16px; }
.hm-bar { height: 8px; border-radius: 4px; background: var(--fuel-track, var(--bg3)); overflow: hidden; margin: 10px 0 6px; }
.hm-bar span { display: block; height: 100%; background: var(--text); border-radius: 4px; }
.hm-hft .hm-bar span, .hm-bar.acc span { background: var(--primary); }
.hm-cal-ft { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--text2); }

/* Three markers */
.hm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.hm-tile { background: var(--bg2); border: var(--card-bw) solid var(--card-border); box-shadow: var(--card-shadow); border-radius: var(--radius); padding: 11px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.hm-tile span { font-size: 11px; font-weight: 600; color: var(--text2); }
.hm-tile b { font-size: 20px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tile em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--green); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tile em.flat { color: var(--text2); font-weight: 600; }
.hm-tile em.warn { color: var(--fuel-warn); }
/* Option D ("MODE Today Tiles" canvas): earned tiles fill in solid. --streak can be set per theme. */
.hm-tile { position: relative; overflow: hidden; gap: 2px; }
.hm-tile b { font-size: 22px; line-height: 1.15; }
.hm-tile em.flat { font-size: 12px; }
.hm-tile-hd { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; }
.hm-tile-hd > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-tile-go { font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.hm-tile-ok { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: #fff; color: var(--hm-earned); }
.hm-tile-ok svg { width: 12px; height: 12px; }
.hm-segs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; margin-top: auto; padding-top: 6px; }
.hm-segs span { height: 6px; border-radius: 3px; background: var(--bg4); }
.hm-segs span.on { background: var(--accent); }
.hm-spark { display: block; height: 30px; width: calc(100% + 24px); margin: auto -12px -11px; padding-top: 6px; box-sizing: content-box; }
.hm-spark-l { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hm-spark-a { fill: var(--accent-soft); }
.hm-tile.earned { --hm-earned: color-mix(in srgb, var(--green) 82%, #000); background: var(--hm-earned); border-color: var(--hm-earned); color: #fff; }
.hm-tile.earned.st { --hm-earned: var(--streak, #c2460f); }
.hm-tile.earned span, .hm-tile.earned b, .hm-tile.earned em, .hm-tile.earned em.flat { color: #fff; font-weight: 700; }
.hm-tile.earned .hm-segs span { background: rgba(255,255,255,.35); }
.hm-tile.earned .hm-segs span.on { background: #fff; }
.hm-tile-art { position: absolute; right: -10px; bottom: -10px; width: 58px; height: 58px; color: rgba(255,255,255,.2); pointer-events: none; }

/* Coach */
.hm-coach-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; cursor: pointer; }
.hm-coach-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: var(--on-accent); flex-shrink: 0; }
.hm-coach-av svg { width: 16px; height: 16px; }
.hm-msg { font-size: 15px; line-height: 1.45; color: var(--text); cursor: pointer; }
.hm-ask { display: flex; align-items: flex-end; gap: 8px; border-radius: 20px; padding: 4px 4px 4px 16px; margin-top: 12px; background: var(--bg3); }
.hm-ask textarea { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; line-height: 22px; padding: 8px 0; outline: none; resize: none; height: 38px; overflow-y: auto; box-sizing: border-box; }
.hm-ask textarea::placeholder { color: var(--text2); }
.hm-send { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-accent); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.hm-send svg { width: 17px; height: 17px; }

/* Squad */
.hm-avs { display: flex; flex-shrink: 0; }
.hm-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg3); color: var(--text); font-size: 11.5px; font-weight: 800; box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--border); flex-shrink: 0; overflow: hidden; }
.hm-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-av.on { box-shadow: 0 0 0 2px var(--bg2), 0 0 0 4px var(--green); }
.hm-avs .hm-av + .hm-av { margin-left: -6px; }
.hm-sq { min-height: 0; margin-bottom: 12px; cursor: pointer; padding-top: 12px; padding-bottom: 12px; }

/* Placeholder while a section loads */
.hm-skel { height: 64px; border-radius: var(--radius); background: var(--bg2); border: var(--card-bw) solid var(--card-border); margin-bottom: 12px; opacity: .6; }
.hm-skel.tall { height: 290px; }

/* Progress overview (view 'pghome') */
.pg-goal { cursor: pointer; }
.pg-goal .card-hd em.ok, .pg-mk-r em { color: var(--green); font-weight: 700; }
.pg-goal .card-hd em.warn, .pg-mk-r em.warn { color: var(--fuel-warn); }
.pg-goal .bd-pace { font-size: 12px; }
.pg-goal-t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pg-goal-t b { font-size: 19px; font-weight: 800; color: var(--text); }
.pg-goal-t span { font-size: 12.5px; color: var(--text2); white-space: nowrap; }
.pg-goal-bar { height: 10px; border-radius: 5px; background: var(--bg3); overflow: hidden; margin: 10px 0 6px; }
.pg-goal-bar span { display: block; height: 100%; background: var(--primary); border-radius: 5px; }
.pg-goal-ft { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--text2); margin-top: 4px; }
.pg-goal-ft b { color: var(--text); font-weight: 700; }
.pg-spark { display: block; margin-top: 8px; }
.pg-link { border: 0; background: none; padding: 0; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--accent); cursor: pointer; }
.pg-ba-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; cursor: pointer; }
.pg-ph { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--bg3); }
.pg-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-ph.blur img { filter: blur(14px); }
.pg-ph-tag { position: absolute; top: 8px; left: 8px; font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 99px; background: var(--bg2); color: var(--text); }
.pg-ph-tag.on { background: var(--primary); color: var(--on-accent); }
.pg-ph b { position: absolute; left: 8px; bottom: 8px; font-size: 13px; font-weight: 800; padding: 3px 7px; border-radius: 8px; background: var(--bg2); color: var(--text); }
.pg-ba-mid { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; }
.pg-ba-mid b { color: var(--green); font-weight: 800; white-space: nowrap; }
.pg-ba-mid i { font-style: normal; color: var(--text3); font-size: 18px; }
.pg-ba-ft { display: flex; justify-content: space-between; margin-top: 10px; }
.pg-mk { padding-top: 2px; padding-bottom: 2px; }
.pg-mk-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; border: 0; background: none; padding: 6px 0; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.pg-mk-row + .pg-mk-row { border-top: 1px solid var(--border); }
.pg-mk-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-mk-l b { font-size: 14px; font-weight: 600; }
.pg-mk-l small { font-size: 12px; color: var(--text2); }
.pg-mk-r { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; max-width: 55%; }
.pg-mk-r b { font-size: 15px; font-weight: 800; }
.pg-mk-r em { font-style: normal; font-size: 11.5px; }
.pg-ci { min-height: 0; cursor: pointer; padding-top: 12px; padding-bottom: 12px; }
.pgh-more { padding-top: 6px; padding-bottom: 4px; }
.pgh-more-t { font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--text2); padding: 6px 0 8px; border-bottom: 1px solid var(--border); }
.pgh-more-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; border: 0; background: none; padding: 6px 0; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.pgh-more-row + .pgh-more-row { border-top: 1px solid var(--border); }
.pgh-more-row span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pgh-more-row b { font-size: 14px; font-weight: 600; }
.pgh-more-row small { font-size: 12px; color: var(--text2); }
.pgh-more-row i { font-style: normal; color: var(--text3); font-size: 20px; }
/* The old Progress tabs, one tap down: a back button before the title */
.pg-back-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pg-back-h h1 { margin: 0; }
.pg-chart { margin-top: 10px; }
.pg-spark-ft { display: flex; justify-content: space-between; font-size: 11px; color: var(--text3); margin-top: 2px; }
.pg-weeks { position: relative; display: flex; gap: 8px; align-items: flex-end; height: 76px; margin-top: 12px; }
.pgh-wk { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.pgh-wk i { width: 100%; max-height: 56px; min-height: 3px; border-radius: 6px 6px 2px 2px; background: var(--bg3); }
.pgh-wk i.hit { background: var(--green); }
.pgh-wk.cur i { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pgh-wk.cur i.hit { background: var(--green); box-shadow: none; }
.pgh-wk span { font-size: 11px; font-weight: 700; color: var(--text2); white-space: nowrap; }
.pgh-wk-tgt { position: absolute; left: 0; right: 0; height: 0; border-top: 1.5px dashed var(--text3); pointer-events: none; }
.pg-sigs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pg-sigs span { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: var(--bg3); color: var(--text2); }
.pg-sigs span.ok { color: var(--green); }
.pg-ba-ft { align-items: center; gap: 8px; }
/* Progress overview: one goal card switching between the main goal and Weight (2026-11-22) */
.pg-gtab button { padding: 5px 11px; }
.pg-chart text.pg-wv { fill: var(--text); font-size: 11px; font-weight: 700; }
