/* Momentum arcade shell. Cash, rep rewards, and the next purchase lead the scene. */
html { overflow-y: auto; }
.game-shell { overflow: clip; border-inline: 0; padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
.masthead.stats-hud {
  position: sticky; top: 0; z-index: 20;
  display: block; flex: 0 0 auto;
  height: calc(64px + env(safe-area-inset-top)); min-height: 0;
  padding: env(safe-area-inset-top) 0 0;
  border: 0; border-bottom: 1px solid #776044;
  background: #202630; box-shadow: none;
}
.hud-summary {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: 28px 22px; column-gap: 12px;
  width: 100%; height: 63px; min-height: 44px;
  padding: 6px 12px 7px; border: 0; border-radius: 0;
  background: transparent; color: var(--cream); text-align: left;
  font: inherit; box-shadow: none;
}
.hud-summary:active:enabled { transform: none; }
.hud-summary:focus-visible { outline-offset: -3px; }
.hud-cash, .hud-income, .hud-overall, .hud-lift {
  display: flex; align-items: baseline; gap: 5px; min-width: 0;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.hud-income, .hud-lift { justify-content: flex-end; }
.hud-label { color: #c7c2b4; font-size: 10px; line-height: 1.2; letter-spacing: .015em; }
.hud-value { min-width: 0; color: #f5dfb1; font-size: 21px; line-height: 1.1; letter-spacing: -.045em; }
#cashTop { color: #f4cc70; }
#incomeTop { color: #b5dca5; font-size: 20px; }
.hud-unit { color: #c7c2b4; font-size: 10px; line-height: 1.1; }
.hud-overall .hud-value, .hud-lift .hud-value { font-size: 15px; letter-spacing: -.025em; }
.hud-overall .hud-label, .hud-lift .hud-label { font-size: 10px; }
.hud-overall .hud-unit, .hud-lift .hud-unit { font-size: 9px; }
.hud-delta {
  display: inline-block; max-width: 52%; overflow: hidden; text-overflow: ellipsis;
  color: #d5f3b9; font-size: 9px; line-height: 1.2;
}
.hud-delta[hidden], .hud-delta:empty { display: none; }
.hud-income:has(.hud-delta:not([hidden]):not(:empty)) > .hud-unit { display: none; }
.hud-income.income-up { animation: income-gain 700ms steps(3,end) both; }
@keyframes income-gain { 0%,40% { filter: brightness(1.5); } 100% { filter: brightness(1); } }

/* The Gym has one open playfield; its score is part of the game, not a top card. */
.gym-view .stats-hud { display: none; }
.gym-view .game-shell {
  display: flex; flex-direction: column;
  height: 100dvh; min-height: calc(600px + env(safe-area-inset-top) + env(safe-area-inset-bottom));
  margin-block: 0; padding-top: env(safe-area-inset-top);
  padding-bottom: calc(60px + env(safe-area-inset-bottom));
}
.gym-view #mainContent { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; padding: 0; }
.gym-view .gym-stage {
  position: relative; flex: 1 1 auto; width: 100%; min-height: 0;
  height: auto; max-height: none; aspect-ratio: auto;
  border: 0; box-shadow: none; background: #292b34; overflow: hidden;
}
.gym-view .scene-viewport,
.gym-view .scene-viewport #stageCanvas {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; max-width: none; max-height: none;
  aspect-ratio: auto; margin: 0; image-rendering: pixelated;
}
.gym-view .gym-stage.is-challenge { box-shadow: inset 0 0 0 2px var(--challenge-accent); }
.momentum-hud {
  position: absolute; z-index: 8; top: 12px; left: 12px; right: 12px;
  text-align: center; pointer-events: none;
}
.momentum-stats {
  display: flex; flex-direction: column; align-items: center;
  width: 100%; min-height: 44px; padding: 0; border: 0; border-radius: 0;
  background: transparent; color: #f3dbad; box-shadow: none;
  text-align: center; font: inherit; pointer-events: auto;
}
.momentum-stats:active:enabled { transform: none; }
.momentum-stats:focus-visible { outline-offset: 5px; }
.momentum-label { display: block; color: #d7bd8c; font-size: 12px; line-height: 1.2; letter-spacing: .2em; }
.momentum-total {
  display: block; max-width: 100%; margin: 3px 0 0;
  color: #ffe4a7; font-size: clamp(42px, 14vw, 58px); line-height: 1.05;
  font-weight: 900; letter-spacing: -.055em; white-space: nowrap;
  font-variant-numeric: tabular-nums; text-shadow: 3px 3px 0 #151c29;
  transform-origin: center; overflow: visible;
}
.momentum-income { display: flex; justify-content: center; align-items: baseline; flex-wrap: nowrap; gap: 6px; min-height: 28px; margin-top: 5px; color: #b9db9b; font-size: 14px; line-height: 1.25; white-space: nowrap; }
.momentum-income strong { font-size: 23px; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
#incomeGainCenter { max-width: 48%; overflow: hidden; text-overflow: ellipsis; color: #ffe29b; font-size: 12px; line-height: 1.2; }
#incomeGainCenter[hidden], #incomeGainCenter:empty { display: none; }
.strength-ribbon { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; gap: 5px 17px; margin-top: 11px; color: #c5c3b3; font-size: 11px; line-height: 1.2; }
.strength-ribbon > span { white-space: nowrap; }
.strength-ribbon strong { color: #efe1bc; font-size: 14px; font-variant-numeric: tabular-nums; }
.cash-pop { animation: momentum-cash-pop 190ms steps(3,end) both; }
@keyframes momentum-cash-pop { 0% { transform: scale(1); } 40% { transform: scale(1.055); color: #fff5ce; } 100% { transform: scale(1); } }
.gym-controls {
  position: absolute; z-index: 8; top: 164px; left: 12px; right: 12px;
  display: grid; grid-template-columns: minmax(0, 1fr) 58px 44px;
  gap: 4px; margin: 0;
}
.exercise-selector, .gym-controls .rotation-toggle, .workout-menu {
  width: 100%; min-width: 0; height: 44px; min-height: 44px;
  padding: 6px 8px; border: 0; border-radius: 0;
  background: #242b35cf; color: #f1ddae;
  box-shadow: none; text-shadow: none; font: 700 12px/1.2 'Courier New',monospace;
}
.exercise-selector { padding-right: 19px; text-overflow: ellipsis; }
.gym-controls .rotation-toggle { padding-inline: 3px; font-size: 11px; color: #cad4d6; }
.gym-controls .rotation-toggle.active, .gym-controls .rotation-toggle[aria-pressed="true"] { background: #242b35cf; color: #efc363; box-shadow: none; }
.workout-menu { font-size: 17px; letter-spacing: 1px; }
.gym-controls button:active:enabled { transform: none; background: #354051; }

/* The next ten-rep payout stays close to the action and fills with each rep. */
.rep-momentum {
  position: absolute; z-index: 7; left: 18px; right: 18px; bottom: 83px;
  min-height: 31px; padding: 0; border: 0; background: none; pointer-events: none;
}
.rep-momentum-copy { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; min-width: 0; margin-bottom: 7px; color: #f3dbad; font-size: 12px; line-height: 1.2; }
#repCountdown { min-width: 0; color: #ffdf96; font-size: 13px; white-space: nowrap; }
#repBonus { color: #d3ddbe; font-size: 12px; text-align: right; white-space: nowrap; }
.rep-segments { display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); gap: 4px; height: 8px; }
.rep-segments > i { display: block; min-width: 0; height: 8px; background: #4e5056; box-shadow: inset 0 -2px #343945; }
.rep-segments > i.filled { background: #e9b54a; box-shadow: inset 0 -2px #b57d39; }
.rep-momentum.bonus-ready #repCountdown, .rep-momentum.bonus-ready #repBonus { color: #fff0bd; }
.rep-momentum.bonus-ready .rep-segments > i.filled { background: #f3ce66; }
.gym-stage.is-challenge .rep-momentum { visibility: hidden; }
.rep-reward-burst {
  position: absolute; z-index: 10; left: 50%; top: 55%;
  transform: translate(-50%,-50%); max-width: 90%; margin: 0;
  color: #ffe9a5; text-align: center; font-size: 31px; line-height: 1.05;
  font-weight: 900; text-shadow: 3px 3px #1a202d;
  pointer-events: none; white-space: nowrap; opacity: 0; visibility: hidden;
}
.rep-reward-burst small { display: block; margin-top: 5px; color: #fff0c7; font-size: 12px; line-height: 1.2; letter-spacing: .08em; }
.rep-reward-burst.show, .rep-reward-burst.active{ opacity: 1; visibility: visible; animation: momentum-reward-pop 650ms steps(5,end) both; }
.rep-reward-burst.bonus { color: #d8f99a; font-size: 36px; }
@keyframes momentum-reward-pop { 0% { opacity: 0; transform: translate(-50%,-30%) scale(.85); } 20% { opacity: 1; transform: translate(-50%,-50%) scale(1.04); } 65% { opacity: 1; transform: translate(-50%,-70%) scale(1); } 100% { opacity: 0; transform: translate(-50%,-100%) scale(1); } }

/* Challenge information temporarily replaces ordinary rep progress. */
.gym-stage .challenge-panel { top: 219px; left: 12px; right: 12px; padding: 8px 10px; border-width: 2px; box-shadow: none; background: #202832f5; }
.gym-stage .challenge-eyebrow { font-size: 10px; letter-spacing: .06em; }
.gym-stage .challenge-panel .challenge-title { font-size: 21px; line-height: 1.1; }
.gym-stage .challenge-instruction { font-size: 12px; margin-bottom: 5px; }
.gym-stage .challenge-reward { font-size: 11px; }
.gym-stage .challenge-steps { height: 6px; margin: 5px 0; }
.gym-stage .challenge-steps > i { height: 6px; }
.gym-stage .challenge-clock { height: 5px; margin-top: 5px; }
.gym-stage .tempo-readout { display: none; }
.gym-stage #tempoLabel, .gym-stage .tempo-bars { display: none; }
.gym-stage .stage-footer {
  position: absolute; z-index: 9; left: 16px; right: 16px; bottom: 14px;
  display: flex; align-items: center; justify-content: center; gap: 11px;
  padding: 0; border: 0; background: none; box-shadow: none;
}
.gym-stage .stage-footer .stage-prompt {
  position: static; display: block; flex: 1 1 auto;
  width: auto; min-width: 164px; max-width: none; min-height: 52px;
  margin: 0; padding: 10px 12px; transform: none;
  border: 2px solid #ffe1a3; background: #e9b54a;
  box-shadow: 0 4px 0 #956132; color: #292b34; text-shadow: none;
  font-size: 18px; line-height: 1.1; letter-spacing: .025em;
}
.gym-stage .stage-footer .stage-prompt.challenge { background: var(--challenge-accent); color: #162332; border-color: #f8e6b5; box-shadow: 0 4px 0 #694f32; }
.gym-stage .stage-footer .stage-prompt.swipe-cue { background: #477a98; color: #fff0c9; border-color: #afd7dc; box-shadow: 0 4px 0 #264259; }
#tapReward { flex: 0 1 92px; max-width: 32%; padding: 0; color: #dbe6b7; background: none; font-size: 14px; line-height: 1.35; text-align: center; }
.gym-stage #tempoHint, .gym-stage #liftTip, #workoutWeight {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* One 68px purchase strip, with one visible effect and an affordability rail. */
.upgrade-target {
  position: relative; flex: 0 0 68px; height: 68px;
  margin: 0; padding: 6px 10px 7px; overflow: hidden;
  border: 0; border-top: 1px solid #4e5150;
  background: #252b34; color: var(--cream); box-shadow: none;
}
.target-main { display: flex; align-items: center; gap: 8px; height: 44px; min-width: 0; }
.target-details {
  display: flex; align-items: center; gap: 7px; flex: 1 1 auto;
  min-width: 0; min-height: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 0; background: none; color: inherit;
  font: inherit; text-align: left; box-shadow: none;
}
.target-details:active:enabled { transform: none; color: #fff1bf; }
.target-icon, .target-icon .asset-holder { width: 28px; height: 28px; flex: 0 0 28px; }
.target-copy { flex: 1 1 auto; min-width: 0; } #targetName { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f3dfb4; font-size: 13px; line-height: 1.25; }
.target-subline { display: flex; align-items: baseline; gap: 6px; min-width: 0; margin-top: 3px; } #targetBenefit { display: block; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b5d4c3; font-size: 12px; line-height: 1.2; }
.target-subline #targetHint { flex: 0 1 auto; min-width: 0; max-width: 48%; }
.target-buy.pixel-btn, .target-buy {
  flex: 0 0 auto; min-width: 88px; max-width: 38%; min-height: 44px; height: 44px;
  padding: 5px 8px; border: 1px solid #a18c64; border-radius: 0;
  background: #473f32; color: #f4dab0; box-shadow: none; text-shadow: none;
  font-size: 12px; line-height: 1.15; white-space: normal; overflow-wrap: anywhere;
}
.target-buy:disabled { opacity: 1; background: #30353c; color: #b9b5a8; border-color: #5e6267; }
.target-meter { height: 6px; margin-top: 4px; overflow: hidden; border: 0; background: #424852; }
.target-meter > i { display: block; width: 0; height: 100%; background: #d5a44c; box-shadow: inset 0 -2px #a37734; transition: width 180ms linear; }
#targetHint { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c6c7bc; font-size: 10px; line-height: 12px; text-align: right; }
#targetProgress{
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.upgrade-target.ready .target-meter > i { background: #7eb263; box-shadow: inset 0 -2px #5a864a; }
.upgrade-target.ready .target-buy { background: #476a42; color: #eff8d8; border-color: #8db574; }
.upgrade-target.ready #targetHint { color: #b7dca2; }
.upgrade-target.locked .target-meter > i, .upgrade-target.complete .target-meter > i { background: #71818a; box-shadow: none; }
.upgrade-target.locked #targetHint { color: #ddbb9a; }

/* Quiet navigation retains four distinct, generously sized destinations. */
.bottom-nav {
  height: calc(60px + env(safe-area-inset-bottom));
  gap: 0; padding: 3px 6px calc(3px + env(safe-area-inset-bottom));
  border-top: 1px solid #5a5b55; background: #202630;
}
.bottom-nav .nav-item {
  min-height: 44px; padding: 4px 1px; gap: 2px;
  border: 0; background: transparent; box-shadow: none;
  color: #c7c1ac; font-size: 10px; letter-spacing: 0;
}
.bottom-nav .nav-item.selected { background: #3c3030; color: #ffdf9f; box-shadow: inset 0 -3px #c85c39; }
.bottom-nav .nav-icon { width: 26px; height: 24px; }
.toast { bottom: calc(142px + env(safe-area-inset-bottom)); border-width: 2px; font-size: 11px; }

/* Detail screens preserve their existing information and touch targets. */
.upgrade-effect { margin-top: 6px; padding-top: 5px; border-top: 1px solid #6a7986; color: #c6edae; font-size: 11px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.effect-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.effect-line + .effect-line { margin-top: 6px; }
.effect-line > span { flex: 0 0 100%; color: #d6dfe1; font-size: 10px; }
.effect-line > b { font-size: 12px; }
.effect-line > small { color: #b0df93; font-size: 10px; }
.effect-note { display: block; margin-top: 4px; color: #e5d0a1; font-size: 10px; line-height: 1.4; }
.shop-actions .pixel-btn { min-height: 44px; }
.profile-brand { display: flex; justify-content: center; align-items: center; margin: 8px 0 6px; padding: 7px; border-bottom: 1px solid #776044; background: #232c3a; }
.profile-brand .brand-art { width: 180px; height: 54px; justify-content: center; }
.stat-explanation { color: #ecdfc0; font-size: 12px; line-height: 1.55; }
.stat-explanation p { margin: 8px 0; }
.stat-explanation .tiny { color: #c4d1da; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sheet-actions > button, .sheet-actions .pixel-btn { flex: 1 1 120px; min-height: 44px; }
.boot-status { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; min-height: 120px; margin: 0; padding: 24px; color: #c7c2b4; font: 11px/1.6 'Courier New',monospace; text-align: center; }

@media (max-width: 360px) {
  .hud-summary { padding-inline: 10px; column-gap: 7px; }
  .hud-value { font-size: 20px; }
  #incomeTop { font-size: 18px; }
  .hud-label, .hud-unit { font-size: 9px; }
  .hud-overall .hud-label, .hud-lift .hud-label { font-size: 9px; }
  .hud-overall .hud-value, .hud-lift .hud-value { font-size: 14px; }
  .momentum-hud { left: 10px; right: 10px; }
  .momentum-total { font-size: 49px; }
  .momentum-income strong { font-size: 22px; }
  .strength-ribbon { gap: 5px 13px; }
  .gym-controls { left: 10px; right: 10px; grid-template-columns: minmax(0,1fr) 54px 44px; gap: 3px; }
  .exercise-selector { padding-left: 7px; font-size: 11px; }
  .gym-stage .stage-footer { left: 12px; right: 12px; gap: 9px; }
  .gym-stage .stage-footer .stage-prompt { min-width: 164px; font-size: 17px; }
  .rep-momentum { left: 14px; right: 14px; }
  .rep-momentum-copy { gap: 5px; }
  #repCountdown { font-size: 12px; }
  #repBonus { font-size: 11px; }
  .upgrade-target { padding-inline: 8px; } #targetName { font-size: 12px; } #targetBenefit { font-size: 11px; }
  .target-buy { min-width: 82px; font-size: 12px; }
}
@media (max-height: 710px) {
  .momentum-hud { top: 9px; }
  .momentum-label { font-size: 11px; }
  .momentum-total { font-size: 46px; }
  .momentum-income { min-height: 26px; margin-top: 3px; }
  .momentum-income strong { font-size: 21px; }
  .strength-ribbon { margin-top: 7px; }
  .gym-controls { top: 142px; }
  .gym-stage .challenge-panel { top: 195px; }
  .gym-stage.is-challenge .momentum-total { font-size: 39px; }
  .gym-stage.is-challenge .momentum-label { display: none; }
  .gym-stage.is-challenge .momentum-income { margin-top: 2px; min-height: 24px; }
  .gym-stage.is-challenge .momentum-income strong { font-size: 19px; }
  .gym-stage.is-challenge .strength-ribbon { margin-top: 5px; }
  .gym-stage.is-challenge .gym-controls { top: 116px; }
  .gym-stage.is-challenge .challenge-panel { top: 168px; padding: 6px 8px; }
  .gym-stage .challenge-panel .challenge-title { font-size: 18px; margin: 2px 0 3px; }
  .gym-stage .challenge-eyebrow { font-size: 10px; }
  .gym-stage .challenge-instruction { font-size: 11px; line-height: 1.2; margin-bottom: 4px; }
  .gym-stage .challenge-reward { min-height: 12px; margin-top: 4px; font-size: 10px; }
  .gym-stage .challenge-steps { height: 5px; margin: 4px 0; }
  .gym-stage .challenge-steps > i { height: 5px; }
  .gym-stage .challenge-clock { height: 4px; margin-top: 4px; }
  .rep-reward-burst { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .hud-income.income-up, .cash-pop { animation: none; }
  .target-meter > i { transition: none; }
  .rep-reward-burst.show, .rep-reward-burst.active{ animation: none; opacity: 1; visibility: visible; transform: translate(-50%,-50%); }
}
.reduced-motion .hud-income.income-up, .reduced-motion .cash-pop { animation: none; }
.reduced-motion .target-meter > i { transition: none; }
.reduced-motion .rep-reward-burst.show, .reduced-motion .rep-reward-burst.active{ animation: none; opacity: 1; visibility: visible; transform: translate(-50%,-50%); }

/* Ordinary rep feedback lives in the cash burst and bonus meter. */
.gym-stage:not(.is-challenge) .rep-feedback { display: none; }
.gym-stage[data-motion="tap"]:not(.is-challenge) .tempo-readout { display: none; }
.rep-reward-burst b { font: inherit; }
/* A brief dark backing keeps payout text readable over cream skin pixels. */
.rep-reward-burst b { display: inline-block; padding: 3px 7px; background: #202630e8; }
.rep-reward-burst small { width: max-content; max-width: 100%; margin: 4px auto 0; padding: 3px 5px; background: #202630ed; }

/* Earned tiers replace the old numerical strength scores. */
.strength-ribbon {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  width: min(100%,350px); gap: 4px 10px;
  font-size: 10px; line-height: 1.3;
}
.strength-ribbon > span { min-width: 0; white-space: normal; }
.strength-ribbon strong { font-size: 12px; white-space: nowrap; color: #f4d595; }
.hud-overall, .hud-lift { min-width: 0; overflow: hidden; }
.hud-overall .hud-value, .hud-lift .hud-value { overflow: hidden; text-overflow: ellipsis; font-size: 12px; }

/* A single quiet line ties training readiness to the next verified PR. */
.tier-cue {
  position: absolute; z-index: 8; top: 214px; left: 12px; right: 12px;
  display: block; width: calc(100% - 24px); height: 38px; min-height: 38px;
  margin: 0; padding: 5px 7px 6px; border: 0; border-radius: 0;
  background: #202630c9; box-shadow: none; color: #e3cdaa;
  font: 700 10px/1.25 'Courier New',monospace; text-align: left;
}
.tier-cue:active:enabled { transform: none; background: #333c48; }
.tier-cue-copy { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; min-width: 0; }
#tierCueText { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tierCueState { display: block; flex: 0 0 auto; color: #bdc5cc; font-size: 10px; white-space: nowrap; }
.tier-readiness { display: block; height: 4px; margin-top: 6px; overflow: hidden; background: #46505b; }
.tier-readiness > i { display: block; width: 0; height: 100%; background: #7096a9; transition: width 180ms linear; }
.tier-cue.ready { color: #f9e5b1; background: #332d26e8; }
.tier-cue.ready #tierCueState { color: #f4cf76; }
.tier-cue.ready .tier-readiness > i { background: #e9b54a; }
.tier-cue.recovering #tierCueState { color: #e0b6a2; }
.tier-cue.recovering .tier-readiness > i { background: #b27b68; }
.tier-cue[hidden], .gym-stage.is-challenge .tier-cue,
.gym-stage[data-preview="true"] .tier-cue { display: none; }

/* PR attempts earn temporary focus: legible timing and power over decoration. */
.gym-stage[data-motion="pr"] .momentum-label,
.gym-stage[data-motion="pr"] .strength-ribbon { display: none; }
.gym-stage[data-motion="pr"] .momentum-total { font-size: 42px; line-height: 1.05; }
.gym-stage[data-motion="pr"] .momentum-income { margin-top: 2px; min-height: 24px; font-size: 12px; }
.gym-stage[data-motion="pr"] .momentum-income strong { font-size: 19px; }
.gym-stage[data-motion="pr"] .gym-controls { top: 104px; }
.gym-stage[data-motion="pr"] .exercise-selector,
.gym-stage[data-motion="pr"] .rotation-toggle,
.gym-stage[data-motion="pr"] .workout-menu { height: 40px; min-height: 40px; }
.gym-stage[data-motion="pr"] .challenge-panel { top: 152px; border-color: #e9b54a; padding: 7px 9px; }
.gym-stage[data-motion="pr"] .challenge-title { color: #fff0bd; }
.gym-stage[data-motion="pr"] .challenge-reward { color: #dfc590; }
.gym-stage[data-motion="pr"] .challenge-steps { gap: 3px; }
.gym-stage[data-motion="pr"] .challenge-steps > i.done { background: #e9b54a; border-color: #ffe8ae; }
.pr-gauge { display: block; min-width: 0; margin: 9px 0 4px; }
.pr-gauge[hidden], #prGaugeHint[hidden], #prStrikes[hidden] { display: none; }
#prTrack {
  position: relative; display: block; width: 100%; height: 24px;
  margin: 0; padding: 0; border: 1px solid #87949a;
  background: #101923; box-shadow: inset 0 -3px #070f17;
  overflow: visible; isolation: isolate;
}
#prZone {
  position: absolute; z-index: 1; top: 0; bottom: 0; left: 40%; width: 20%;
  display: block; background: #e9b54a; border-inline: 2px solid #ffe7ac;
  box-shadow: inset 0 -3px #ad7931;
}
#prNeedle {
  position: absolute; z-index: 3; top: -5px; bottom: -5px; left: 0;
  display: block; width: 4px; margin-left: -2px; background: #fff6d2;
  box-shadow: -2px 0 #19202c, 2px 0 #19202c;
  transition: none; will-change: left;
}
#prNeedle::before, #prNeedle::after {
  content: ''; position: absolute; left: -2px; width: 8px; height: 3px;
  background: #fff6d2;
}
#prNeedle::before { top: 0; }
#prNeedle::after { bottom: 0; }
#prCharge {
  position: absolute; z-index: 2; inset: 0 auto 0 0; display: block; width: 0;
  background: #6b9bb5; box-shadow: inset 0 -3px #3f718c;
  transition: none;
}
.pr-gauge.timing #prCharge { display: none; }
.pr-gauge.drive #prNeedle, .pr-gauge.drive #prZone { display: none; }
.pr-gauge.ready #prCharge { background: #bfdc8d; box-shadow: inset 0 -3px #739957; }
.pr-gauge.ready #prTrack { border-color: #e7f4bf; }
#prGaugeHint { display: block; min-height: 13px; margin: 5px 0 0; color: #f8e3b8; font-size: 11px; line-height: 1.3; }
#prStrikes { display: block; min-height: 13px; margin: 4px 0 0; color: #ffc1a5; font-size: 11px; line-height: 1.2; text-align: right; letter-spacing: .02em; }
.gym-stage[data-motion="pr"] .stage-footer .stage-prompt { white-space: normal; }

/* PR selection and tier evidence live in sheets rather than crowding the Gym. */
.pr-target-picker { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 8px; align-items: center; margin: 12px 0 8px; }
.pr-target-picker > button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; font-size: 20px; }
.pr-target-picker input {
  display: block; width: 100%; min-width: 0; height: 48px; padding: 5px 8px;
  border: 2px solid #bca16c; border-radius: 0; background: #172332;
  color: #ffe3a0; text-align: center; font-size: 25px; line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.pr-attempt-details { margin: 10px 0; padding: 8px 10px; border-left: 3px solid #bc9551; background: #232d3a; color: #eddbb9; font-size: 12px; line-height: 1.45; }
.pr-attempt-details p { margin: 5px 0; }
.pr-attempt-details .progress-row { gap: 8px; font-size: 11px; }
.pr-attempt-details .progress-row > :last-child { text-align: right; }
.tier-checklist { margin: 9px 0; padding: 0; list-style: none; }
.tier-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 9px; padding: 7px 0; border-bottom: 1px solid #58606b; color: #d4c7ae; font-size: 12px; line-height: 1.35; }
.tier-line:last-child { border-bottom: 0; }
.tier-line > :first-child { flex: 1 1 100px; min-width: 0; }
.tier-line b, .tier-line strong { color: #ffe0a1; text-align: right; } .tier-line.complete, .tier-line.complete b { color: #b6dda6; }
.tier-line small { color: #bfc6ca; font-size: 10px; }
.tier-ladder { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; margin: 10px 0; padding: 0; list-style: none; }
.tier-ladder > * { min-width: 0; padding: 8px 6px; border-bottom: 1px solid #555d69; font-size: 11px; line-height: 1.4; }
.tier-ladder > :last-child { border-bottom: 0; }
.tier-ladder > .current, .tier-ladder > [aria-current="true"] { background: #3d3b32; box-shadow: inset 3px 0 #e9b54a; }
.tier-ladder > .earned { color: #b4d8a4; }
.tier-badge { display: inline-block; max-width: 100%; padding: 3px 6px; border: 1px solid #b29761; background: #3b352c; color: #f7d99a; font-size: 11px; line-height: 1.3; overflow-wrap: anywhere; }
.pr-outcome { padding: 12px 10px; border: 2px solid #c6a05b; background: #222f38; text-align: center; }
.pr-outcome .big-number { color: #ffe0a0; }
.pr-outcome .tier-badge { margin-top: 8px; }
.pr-outcome.success { border-color: #bfd88e; background: #263a32; }
.pr-outcome.failure, .pr-outcome.failed { border-color: #c1846d; background: #3b2e30; }

@media (max-width: 360px) {
  .strength-ribbon { gap: 3px 6px; font-size: 9px; }
  .strength-ribbon strong { font-size: 11px; }
  .tier-cue { left: 10px; right: 10px; width: calc(100% - 20px); padding-inline: 6px; }
  .tier-cue-copy { gap: 4px; }
  #tierCueText, #tierCueState { font-size: 9px; }
  .pr-target-picker { gap: 6px; }
  .tier-line { font-size: 11px; }
}
@media (max-height: 710px) {
  .tier-cue { top: 192px; height: 36px; min-height: 36px; padding-top: 4px; }
  .gym-stage[data-motion="pr"] .momentum-hud { top: 7px; }
  .gym-stage[data-motion="pr"] .momentum-total { font-size: 34px; }
  .gym-stage[data-motion="pr"] .momentum-income { min-height: 21px; margin-top: 1px; font-size: 10px; }
  .gym-stage[data-motion="pr"] .momentum-income strong { font-size: 16px; }
  .gym-stage[data-motion="pr"] #incomeGainCenter { font-size: 10px; }
  .gym-stage[data-motion="pr"] .gym-controls { top: 78px; }
  .gym-stage[data-motion="pr"] .challenge-panel { top: 124px; padding: 6px 8px; }
  .gym-stage[data-motion="pr"] .challenge-panel .challenge-title { font-size: 18px; }
  .gym-stage[data-motion="pr"] .challenge-instruction { font-size: 11px; line-height: 1.25; }
  .gym-stage[data-motion="pr"] .challenge-reward { font-size: 10px; }
  .pr-gauge { margin-top: 7px; margin-bottom: 3px; }
  #prTrack { height: 22px; }
  #prGaugeHint, #prStrikes { font-size: 10px; min-height: 12px; }
  #prStrikes { margin-top: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .tier-readiness > i { transition: none; }
}
.reduced-motion .tier-readiness > i { transition: none; }

/* The target weight keeps its unit on the same row as both controls. */
.pr-target-picker { grid-template-columns: 44px minmax(0,1fr) 24px 44px; }
.pr-target-picker > span { text-align:center; font-size:13px; color:#e3cda6; }
.pr-gauge-caption { display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.pr-gauge-caption > span { min-width:0; margin-top:5px; }
#prStrikes { white-space:nowrap; }
.momentum-stats:disabled { opacity:1; }

/* On short phones, reclaim the currency label's space for the athlete. */
@media (max-height:710px) {
 .gym-stage:not(.is-challenge) .momentum-label { display:none; }
 .gym-stage:not(.is-challenge) .gym-controls { top:124px; }
 .gym-stage:not(.is-challenge) .tier-cue { top:174px; }
}
.gym-view #mainContent.screen-enter { animation:none; transform:none; }

/* One small decision sheet: best, target, difficulty, recovery. */
.pr-attempt-details { margin: 4px 0 0; padding: 0; border: 0; background: transparent; font-size: 14px; line-height: 1.45; }
.pr-best { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0 15px; border-bottom: 2px solid #48505b; }
.pr-best > span { color: #cabfa7; }
.pr-best strong { color: #f3dbad; font-size: 28px; font-variant-numeric: tabular-nums; }
.pr-best small { font-size: 14px; }
.pr-weight-label { display: block; margin-top: 16px; color: #c8c4b7; font-size: 12px; letter-spacing: .08em; }
.pr-target-picker { margin: 8px 0; gap: 8px; }
.pr-target-picker input { height: 58px; font-size: 32px; border-color: #e9b54a; }
.pr-target-picker input::-webkit-inner-spin-button, .pr-target-picker input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.pr-target-picker input { appearance: textfield; -moz-appearance: textfield; }
.pr-presets { display: flex; gap: 8px; }
.pr-preset { flex: 1; min-width: 0; min-height: 42px; border: 1px solid #637283; background: #293747; color: #d2e0e4; font: inherit; font-size: 11px; line-height: 1.3; padding: 6px; cursor: pointer; }
.pr-preset:hover, .pr-preset:focus-visible { background: #3a5268; border-color: #e9b54a; }
.pr-difficulty { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 18px 0 6px; }
.pr-difficulty > span { color: #b8bdbb; font-size: 11px; letter-spacing: .08em; }
.pr-difficulty strong { font-size: 17px; color: #e9b54a; text-align: right; }
.pr-difficulty[data-level='very-easy'] strong, .pr-difficulty[data-level='easy'] strong { color: #b8dc91; }
.pr-difficulty[data-level='very-hard'] strong { color: #efa878; }
.pr-difficulty[data-level='extreme'] strong { color: #f39078; }
.pr-attempt-details .pr-target-meaning { color: #f3dbad; font-size: 13px; min-height: 19px; }
.pr-attempt-details .pr-duration { margin: 4px 0 8px; color: #a9c9d9; font-size: 12px; }
.gym-stage[data-motion="pr"] .challenge-steps > i.current { background: #477a98; border-color: #9fcadd; }
.pr-attempt-details .pr-risk { margin: 7px 0 14px; color: #c4c5bf; font-size: 12px; }
.pr-attempt-details .pr-recovery { padding: 9px 0; color: #e6aa90; font-size: 13px; }
#prStartButton { width: 100%; min-height: 50px; margin: 0; }
.pr-help { margin-top: 14px; font-size: 13px; color: #c8c2b1; }
.pr-help summary { min-height: 36px; padding: 7px 0; cursor: pointer; color: #9ebfd2; }
.pr-help p { margin: 8px 0; }
.pr-result-note { color: #d4c9b1; font-size: 14px; line-height: 1.5; }
@media (max-height: 710px) {
 .pr-best { padding-bottom: 10px; }
 .pr-weight-label { margin-top: 12px; }
 .pr-difficulty { margin-top: 12px; }
 .pr-target-picker input { height: 52px; }
 .pr-help { margin-top: 9px; }
}
