/* Legibility floor. A sweep of every screen found labels set at 6 to 8.5 px: too small to read on a laptop and
   close to invisible on a phone. Nothing on a screen is now under 9 px, and the labels a rider actually uses to
   choose a run (grade, jumps, length) are 10 px. Loaded last so it wins over the older, smaller sizes, including
   the ones set inside narrow-screen rules. */

/* Home */
body .home-today-copy small{font-size:9.5px}

/* The Runs */
#gamePanel .discovery-resume small{font-size:9px;letter-spacing:.12em}
#gamePanel .run-filter-bar label>span{font-size:9px}
#gamePanel .discovery-career-stats small{font-size:9px}
#gamePanel .run-district-hero .eyebrow{font-size:9px}
#gamePanel .run-district-meta span{font-size:9px}
#gamePanel .run-discovery-card .run-card-top>b{font-size:10px}
#gamePanel .run-discovery-card .run-card-top>span{font-size:9px;padding:3px 5px}
#gamePanel .run-discovery-card .run-card-spec{font-size:10px;gap:3px 10px}
#gamePanel .run-discovery-card .run-card-access{font-size:9px}
#gamePanel .run-discovery-detail>.eyebrow{font-size:10px}
#gamePanel .run-feature-stats small{font-size:9px}
#gamePanel .run-record-strip span{font-size:9px}
#gamePanel .run-score-goals>summary{font-size:10px}
#gamePanel .run-browser-pager>span{font-size:10px}

/* The line preview shared by The Runs, Journey and the mountain map */
#gamePanel .atlas-preview-heading{font-size:9px}
#gamePanel .atlas-preview-heading b{font-size:9px}
#gamePanel .atlas-preview-scale{font-size:9px}
#gamePanel .atlas-rhythm-heading,#gamePanel .atlas-preview-legend{font-size:9px;letter-spacing:.06em}
#gamePanel .atlas-jump-profile text{font-size:8px}

/* The mountain map */
#gamePanel .atlas-pin small{font-size:9px}
#gamePanel .atlas-map-foot{font-size:9px}
#gamePanel .atlas-map-label span{font-size:9px}
#gamePanel .atlas-route small{font-size:9.5px}
#gamePanel .atlas-route-copy>.eyebrow{font-size:10px}
#gamePanel .atlas-features span{font-size:9px}
#gamePanel .atlas-heading .eyebrow,#gamePanel .atlas-pass span{font-size:9px}
#gamePanel .finder-card small{font-size:9.5px}

/* Modes and the locker */
#gamePanel .course-gallery-heading .eyebrow{font-size:9px}
#gamePanel .wardrobe-heading .eyebrow{font-size:9px}
#gamePanel .wardrobe-tabs button small{font-size:9px}

/* Weekly sessions and the ride journal */
#gamePanel .session-live-label,#gamePanel .session-live-label>b{font-size:9px}
#gamePanel .weekly-session-end{font-size:9px}
#gamePanel .session-goal-progress>span{font-size:9px}
#gamePanel .session-reward-line small{font-size:9px}
#gamePanel .ride-drop-summary .eyebrow{font-size:9px}
#gamePanel .ride-drop-at{font-size:9px}
#gamePanel .ride-history-pager span{font-size:9px}
#gamePanel .ride-history-row>summary>strong>small{font-size:9px}
#gamePanel .ride-history-row dt{font-size:9px}
#gamePanel .ride-history-sport{font-size:9px}
#gamePanel .ride-history-title>small{font-size:9px}

/* The pass */
#gamePanel .pass-lane-labels small{font-size:9px}
#gamePanel .pass-cell small{font-size:9px}

/* The crew */
#gamePanel .invite-contract span,#gamePanel .invite-course span,#gamePanel .crew-invite-ticket label{font-size:9px}
#gamePanel .crew-social-heading .eyebrow,#gamePanel .crew-empty .eyebrow{font-size:9px}
#gamePanel .crew-stats small{font-size:9px}

/* Party rooms: the few labels the lobby pass had not already raised */
body .mp-code small,body .mp-code button{font-size:9px}
body .mp-option-tags>span{font-size:9px}
body .mp-countdown span{font-size:9px}
body .mp-rating-result small{font-size:9px}

/* The results screen */
body .result-stage .result-medal small{font-size:9px}
body .result-rewards small{font-size:9px}
body .result-earned-drop>small{font-size:9px}
body .result-lift-caption span,body .result-ride-window span{font-size:9px}
body .result-next-goal>span{font-size:9px}
body .result-highlight small,body .result-highlight>span{font-size:9px}
body .result-ride-stats span{font-size:9px}
body .standing>header>small{font-size:9px}
body .result-stage .result-actions kbd{font-size:9px}
body .result-full-report>summary>span:last-child{font-size:9px}
body .result-stage .result-social .ghost-button{font-size:9px}

/* Phones: the few labels that only shrink on a narrow screen */
@media(max-width:650px){
  /* On a phone the map is too small for a readable second line under every pin, so pins carry the name only
     (as they already do on tablets); the place line is in the panel under the map. */
  #gamePanel .mountain-atlas .atlas-pin b,#gamePanel .atlas-pin b{font-size:9.5px}
  #gamePanel .atlas-pin small{display:none}
  /* Pins near the edge of the map keep their whole name on it. */
  #gamePanel .atlas-pin{left:clamp(42px,var(--pin-x),calc(100% - 42px));min-width:0}
  #gamePanel .atlas-pin .pin-weather{font-size:9px}
  #gamePanel .run-find>button{font-size:9px}
  #gamePanel .discovery-result-row>span,#gamePanel .discovery-result-row strong{font-size:9px}
  #gamePanel .session-goal-index{font-size:9px}
  #gamePanel .ride-drop>p{font-size:9px}
}

/* On the snow, keep the rider and the landing free of graphic overlays. */
body.playing:is([data-sport=ski],[data-sport=snowboard]) :is(.rush-fx,.speed-lines) {
  display: none;
}
body.playing:is([data-sport=ski],[data-sport=snowboard]) #hud :is(.hud-credit-row,.best-row,#topSpeed,#speedBar) {
  display: none;
}
body.playing:is([data-sport=ski],[data-sport=snowboard]) #hud :is(.velocity-read,.score-panel) {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  width: fit-content;
  min-width: 0;
  padding: 4px 9px;
  background: rgba(18,32,42,.83);
  border: 0;
  border-radius: 3px;
  text-shadow: none;
}
body.playing:is([data-sport=ski],[data-sport=snowboard]) #hud :is(#speed,#score) {
  color: #fff;
  font: 700 24px/1.05 var(--display);
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
body.playing:is([data-sport=ski],[data-sport=snowboard]) #hud :is(.score-label,.velocity-read span) {
  color: #e2ebee;
  font: 700 10px/1 var(--body);
  letter-spacing: .06em;
}
body.playing:is([data-sport=ski],[data-sport=snowboard]) #hud .score-panel { justify-self: end; align-self: start; }
body.playing:is([data-sport=ski],[data-sport=snowboard]) #hud .control-strip { animation-delay: 2s; }
body.playing:is([data-sport=ski],[data-sport=snowboard]) #hud .line-meter:has(#combo.idle) { display: none; }
body.playing.ride-touch-active:is([data-sport=ski],[data-sport=snowboard]) #hud .ride-meter {
  top: max(9px,env(safe-area-inset-top));
  bottom: auto;
  left: max(12px,env(safe-area-inset-left));
  align-items: flex-start;
  visibility: visible;
}
body.playing.ride-touch-active:is([data-sport=ski],[data-sport=snowboard]) #hud .hud-top-left {
  left: max(12px,env(safe-area-inset-left));
  top: calc(max(9px,env(safe-area-inset-top)) + 35px);
}
body.playing.ride-touch-active:is([data-sport=ski],[data-sport=snowboard]) .zone-tag {
  top: calc(max(9px,env(safe-area-inset-top)) + 64px);
}
