/* Part 149: glitches found by going through every page on a laptop and a phone. Loaded just before legible50.css. */

/* The Journey: GO TO LEVEL sits in the trail's head under the tally, instead of taking the trail's place in the
   page grid (it was the grid's first cell, which pushed the trail into the thin right column). */
.trail-head-side{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:none}
.trail-head .journey-level-find{display:flex;flex-wrap:nowrap;align-items:center;gap:6px;margin:0;padding:4px 4px 4px 14px;border:1px solid var(--s26-line);border-radius:var(--s26-r-pill);background:var(--s26-glass);-webkit-backdrop-filter:var(--s26-blur);backdrop-filter:var(--s26-blur)}
.trail-head .journey-level-find label{display:flex;align-items:center;gap:8px;margin:0;font:800 var(--s26-t-micro,11px)/1 var(--s26-text);letter-spacing:.12em;color:var(--s26-soft);white-space:nowrap}
.trail-head .journey-level-find input{width:92px;min-height:34px;padding:0 12px;border:1px solid var(--s26-line);border-radius:var(--s26-r-pill);background:rgba(4,12,22,.55);color:var(--s26-ink);font:800 14px/1 var(--s26-text);font-variant-numeric:tabular-nums;color-scheme:dark;-moz-appearance:textfield;appearance:textfield}
.trail-head .journey-level-find input::-webkit-inner-spin-button,.trail-head .journey-level-find input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.trail-head .journey-level-find input::placeholder{color:var(--s26-soft);opacity:.7}
.trail-head .journey-level-find input:focus-visible{outline:2px solid var(--s26-ice,#bfe6ff);outline-offset:1px}
.trail-head .journey-level-find button{display:grid;place-items:center;flex:none;width:34px;height:34px;min-height:0;padding:0;border:0;border-radius:50%;background:var(--s26-accent);color:var(--s26-on-accent,#061322);cursor:pointer;transition:transform var(--s26-press,.12s) var(--s26-ease,ease)}
.trail-head .journey-level-find button:hover{background:var(--s26-accent-hi,var(--s26-accent))}
.trail-head .journey-level-find button:active{transform:scale(.94)}
.trail-head .journey-level-find button:focus-visible{outline:2px solid var(--s26-ice,#bfe6ff);outline-offset:2px}
@media(max-width:760px){
  .trail-head .journey-level-find{padding:3px}
  .trail-head .journey-level-find label span{display:none}
  .trail-head .journey-level-find input{width:76px;min-height:32px;padding:0 10px;font-size:13px}
  .trail-head .journey-level-find button{width:32px;height:32px}
}
@media(max-height:560px) and (min-width:761px){.trail-head .journey-level-find label span{display:none}.trail-head .journey-level-find{padding:3px}}

/* The Runs: the quick finder above the run reads like the rest of the app. Search and RIDE on the first line, the
   two rows of chips on the second; capitals, one line per chip. */
#gamePanel .quick-run-picker{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:0 0 14px}
#gamePanel .quick-run-picker::before{content:"";order:1;flex-basis:100%;height:0}
#gamePanel .quick-run-picker .run-find{order:0;flex:1 1 260px;min-width:0}
#gamePanel .quick-run-picker .quick-drop{order:0;flex:none}
#gamePanel .quick-run-picker .jump-band{order:2;flex:0 1 auto;width:auto;margin:0;overflow-x:auto;scrollbar-width:none}
#gamePanel .quick-run-picker .section-band{flex:1 1 auto}
#gamePanel .quick-run-picker .jump-band::-webkit-scrollbar{display:none}
#gamePanel .quick-run-picker .jump-band button{flex:none;min-height:38px;padding:0 13px;white-space:nowrap;font:800 11px/1 var(--s26-text,var(--body));letter-spacing:.09em;text-transform:uppercase}
#gamePanel .quick-run-picker .quick-drop{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px;border-radius:12px;font:900 italic 16px/1 var(--s26-display,var(--display));letter-spacing:.03em;text-transform:uppercase;white-space:nowrap}
#gamePanel .jump-sequence figcaption{font:800 11px/1 var(--s26-text,var(--body));letter-spacing:.1em;text-transform:uppercase;color:var(--s26-soft,#9fb3c6)}
#gamePanel .jump-sequence figcaption span{font-weight:800;opacity:.75}
/* A phone: each row of chips is one line you swipe, and RIDE stays in the bar at the bottom of the screen. */
@media(max-width:650px){
  #gamePanel .quick-run-picker{gap:8px}
  #gamePanel .quick-run-picker .run-find{flex-basis:100%}
  #gamePanel .quick-run-picker .jump-band,#gamePanel .quick-run-picker .section-band{display:flex;flex:1 1 100%;width:100%;grid-template-columns:none}
  #gamePanel .quick-run-picker .jump-band button{flex:none;padding:0 12px}
  #gamePanel .quick-run-picker .quick-drop{display:none}
}

/* Page heads on a phone: the line over the title stays on one line (the SLOPE 26 part steps aside). */
#gamePanel[data-panel] .panel-header .eyebrow{white-space:nowrap}
/* Part 153: the brand and the page group are two pieces in a flex row; without this the row's 8 px gap was added
   to the space after the dot. The space is kept (pre) and the gap goes. */
#gamePanel[data-panel]:not([data-panel="results"]) .panel-header .eyebrow:has(.eyebrow-brand){gap:0}
#gamePanel[data-panel]:not([data-panel="results"]) .panel-header .eyebrow:has(.eyebrow-brand)::before{margin-right:8px}
#gamePanel[data-panel] .panel-header .eyebrow-brand{white-space:pre}
@media(max-width:580px){#gamePanel[data-panel] .panel-header .eyebrow-brand{display:none}}

/* The page tabs on a phone scroll sideways; their ends fade, so a tab half past the edge reads as more to swipe
   rather than a word cut in half. */
@media(max-width:760px){#gamePanel[data-panel]:not([data-panel="results"]) .panel-navigation{-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 22px,#000 calc(100% - 22px),transparent 100%);mask-image:linear-gradient(90deg,transparent 0,#000 22px,#000 calc(100% - 22px),transparent 100%)}}

/* Part 153: a piece's page in the Store on a laptop screen up to 800 px tall ran 17 px past the bottom of the page at
   1280x720, cutting the skis under the turn buttons. The card is as tall as its words (38 px padding above and
   below), and the stage at least 390 px: both give a little. */
@media(min-width:901px) and (max-height:800px){#gamePanel .store-live-stage,#gamePanel .store-live-stage canvas{min-height:clamp(300px,calc(100dvh - 350px),390px)}#gamePanel[data-panel=store] .store-live-copy{padding-block:20px}}

/* Part 155: the pause menu's buttons fill their rows. On a laptop eight show (no touch layout to edit), which left a
   hole after PROFILE; with PRACTISE LAST JUMP on a phone ten show, which left one button alone. The grid is six
   narrow columns, a button takes two, and the last row shares the width evenly. */
#pause .pause-navigation{grid-template-columns:repeat(6,minmax(0,1fr))}
#pause .pause-navigation>button{grid-column:span 2}
#pause .pause-navigation>button:nth-last-child(1 of :not(.hidden)):nth-child(3n+2 of :not(.hidden)),#pause .pause-navigation>button:nth-last-child(2 of :not(.hidden)):nth-child(3n+1 of :not(.hidden)){grid-column:span 3}
#pause .pause-navigation>button:nth-last-child(1 of :not(.hidden)):nth-child(3n+1 of :not(.hidden)){grid-column:span 6}

/* Part 157: Home with your party, on a phone held sideways. The run picker and THE GAME filled the left column and
   pushed READY UP (and START for the leader) below the bottom of the screen (375..424 at 844x390). The way to ride
   stays in view and the picker above it scrolls; part 89's rule for this only reached Home without a party. */
@media (orientation:landscape) and (max-height:540px){
  body .home-trip-dock:has(.home-party-games){display:flex;flex-direction:column;overflow:visible}
  body .home-trip-dock:has(.home-party-games)>.home-playlist{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
  body .home-trip-dock:has(.home-party-games)>:is(.duo-line,.home-launch){flex:none}
}

/* Part 162: Home with your party. FORMAT and COMPETITION share a row and read alike (COMPETITION was a sentence-case
   label over a full-width box, under a half-width FORMAT that left the other half empty). On an upright phone the card
   was 353 px tall and covered the line-up from the waist down; the shared row gives the riders 63 px back. */
.home-playlist:has(>.home-party-selects+.online-series:not(.home-party-games)){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.home-playlist:has(>.home-party-selects+.online-series:not(.home-party-games))>*{grid-column:1/-1}
.home-playlist>.home-party-selects:has(+.online-series:not(.home-party-games)),.home-playlist>.home-party-selects+.online-series:not(.home-party-games){grid-column:auto;min-width:0}
.home-playlist>.home-party-selects:has(+.online-series:not(.home-party-games)){grid-template-columns:minmax(0,1fr)}
.home-playlist .online-series .series-picker{display:grid;gap:5px;min-width:0;margin:0;color:var(--home-muted);font:700 10px/1.2 var(--body);letter-spacing:.06em;text-transform:uppercase}
.home-playlist .online-series .series-picker select{min-width:0;min-height:44px;width:100%;padding:7px;border:1px solid var(--home-border);border-radius:5px;background:#132b3e;color:var(--home-text);font:600 12px var(--body);text-transform:uppercase}
/* The party mode reads like the two choices above it: a small capital label, then the choice. */
.home-playlist .party-rules-picker>summary{color:var(--home-muted);font:700 10px/1.2 var(--body);letter-spacing:.06em;text-transform:uppercase}
.home-playlist .party-rules-picker>summary b{margin-left:6px;color:var(--home-text);font:800 15px/1.1 var(--body);letter-spacing:.02em;vertical-align:-1px}
