/* src/style-2.css: the styles, part 2 of 2 (loaded right after src/style.css; later rules win). */
.modes .btn.mx {
  justify-content: flex-start;
  padding: 0 calc(var(--h) * 0.1) 0 calc(var(--h) * 0.12);
  gap: calc(1 * var(--u));
  font-size: calc(7.6 * var(--u));
}
.modes .btn.mx span {
  flex: 1;
  text-align: center;
}
.modes .btn.mx[data-act='shop'] {
  justify-content: center;
  font-size: calc(6.4 * var(--u));
}
.modes .btn.mx[data-act='shop'] span {
  flex: none;
}
@media (orientation: portrait) {
  .modes .btn.mx {
    justify-content: center;
    font-size: calc(7.4 * var(--u));
  }
  .modes .btn.mx span {
    flex: none;
  }
}
.modes .btn.mx img {
  height: calc(13.6 * var(--u));
}
.modes .btn.mx[data-act='shop'] img {
  height: calc(7.8 * var(--u));
}
.tcoins img {
  height: calc(6.3 * var(--u));
}
@media (orientation: portrait) {
  .modes .btn.mx img {
    height: calc(12 * var(--u));
  }
  .modes .btn.mx[data-act='shop'] img {
    height: calc(8.4 * var(--u));
  }
  .tcoins img {
    height: calc(5.8 * var(--u));
  }
}
.modes .btn.mx img {
  height: calc(12.6 * var(--u));
}
.modes .btn.mx[data-act='shop'] img {
  height: calc(7.3 * var(--u));
}
.tcoins img {
  height: calc(5.9 * var(--u));
}
@media (orientation: portrait) {
  .modes .btn.mx img {
    height: calc(11 * var(--u));
  }
  .tcoins img {
    height: calc(5.4 * var(--u));
  }
}
/* TIME TRIAL with smaller letters, smaller TOUR icon, stretchable coin plate (20% of the width) */
.modes .btn.mx[data-act='trial'] {
  font-size: calc(6.2 * var(--u));
}
.modes .btn.mx[data-act='tour'] img {
  height: calc(10.4 * var(--u));
}
.tcoins {
  width: calc(35.6 * var(--u));
  background: none;
  border-style: solid;
  border-color: transparent;
  border-width: 0;
  border-image-source: url(../assets/img/plate-count.webp);
  border-image-slice: 0 118 0 36 fill;
  border-image-width: 0 calc(9.1 * var(--u) * 1.15) 0 calc(9.1 * var(--u) * 0.35);
}
@media (orientation: portrait) {
  .tcoins {
    width: calc(34.2 * var(--u));
    border-image-width: 0 calc(8.9 * var(--u) * 1.15) 0 calc(8.9 * var(--u) * 0.35);
  }
  [data-screen='title'] .logo {
    width: calc(62 * var(--u));
  }
  .modes .btn.mx[data-act='trial'] {
    font-size: calc(7.4 * var(--u));
  }
  .modes .btn.mx[data-act='tour'] img {
    height: calc(11 * var(--u));
  }
}
/* layout tweaks */
.modes .btn.mx[data-act='trial'] span {
  max-width: calc(12 * var(--u));
}
.modes .btn.mx[data-act='tour'] {
  font-size: calc(6.9 * var(--u));
}
.modes .btn.mx[data-act='endless'] img {
  height: calc(10.5 * var(--u));
}
.modes .btn.mx[data-act='shop'] {
  font-size: calc(5.4 * var(--u));
}
.tcoins .ol {
  font-size: calc(4.5 * var(--u));
}
.rbtn img {
  width: 66%;
  height: 66%;
}
@media (orientation: portrait) {
  .modes .btn.mx[data-act='trial'] span {
    max-width: none;
  }
  .modes .btn.mx[data-act='tour'] {
    font-size: calc(8.6 * var(--u));
  }
  .modes .btn.mx img {
    height: calc(11.6 * var(--u));
  }
  .modes .btn.mx[data-act='endless'] img {
    height: calc(11.6 * var(--u));
  }
  .modes .btn.mx[data-act='shop'] img {
    height: calc(9 * var(--u));
  }
  .tcoins img {
    height: calc(5.6 * var(--u));
  }
  .tcoins .ol {
    font-size: calc(4.6 * var(--u));
  }
}
/* End of motocross menu */

/* ===== Motocross: screens (map, result, garage, pause, settings, sound) in the menu style.
   Dark panel with orange stripes, title plate, menu pills (--pill: nine.js keeps the round end cap). ===== */
:root {
  --navy: #14182a;
  --row: #262b38;
  --rowline: #3a4152;
}
.panel {
  border-image-source: url(../assets/img/panel-mx.webp);
  border-image-slice: 80 fill;
  border-image-width: calc(8 * var(--u));
}
.ribbon.rays::before,
.ribbon.rays::after {
  display: none;
}
.ribbon.blue,
.ribbon.red,
.ribbon.yellow {
  border-image-source: url(../assets/img/plate-title.webp);
  border-image-slice: 0 150 fill;
}
.ribbon.green {
  border-image-source: url(../assets/img/ribbon-trophy.webp);
  border-image-slice: 0 110 0 240 fill;
  border-width: 0 calc(var(--rh) * 0.53) 0 calc(var(--rh) * 1.16);
}
.ribbon span {
  color: #fff;
}
.panel .btn,
#map .mapPlay {
  --pill: 1;
  border-width: 0;
  border-image-source: url(../assets/img/mx-blue.webp);
  border-image-slice: 0 97 fill;
  padding: 0 calc(3.4 * var(--u));
}
.panel .btn.green,
#map .mapPlay {
  border-image-source: url(../assets/img/mx-green.webp);
}
.panel .btn.purple {
  border-image-source: url(../assets/img/mx-purple.webp);
}
.panel .btn.yellow {
  border-image-source: url(../assets/img/mx-yellow.webp);
}
.panel .row .ol,
.panel .row b,
.panel .row span {
  color: #fff;
}
.count {
  background: none;
  border-style: solid;
  border-color: transparent;
  border-width: 0;
  border-radius: 0;
  box-shadow: none;
  --pill: 1;
  border-image-source: url(../assets/img/plate-count.webp);
  border-image-slice: 0 118 0 36 fill;
  padding: 0 calc(6.4 * var(--u)) 0 calc(1.8 * var(--u));
}
#map {
  background: #120a2e;
}
/* result: ranking of the 4 riders, celebrating rider beside the panel */
.stand {
  display: flex;
  flex-direction: column;
  gap: calc(0.8 * var(--u));
}
.stand .srow {
  --pill: 1;
  display: flex;
  align-items: center;
  gap: calc(1.8 * var(--u));
  height: calc(6.2 * var(--u));
  padding: 0 calc(3.2 * var(--u));
  box-sizing: border-box;
  border-style: solid;
  border-color: transparent;
  border-width: 0;
  border-image-source: url(../assets/img/row-dark.webp);
  border-image-slice: 0 36 fill;
  font-size: calc(4.3 * var(--u));
}
.stand .srow.me {
  border-image-source: url(../assets/img/row-teal.webp);
}
.stand .srow i {
  font-style: normal;
  width: calc(3.6 * var(--u));
  text-align: center;
}
.stand .srow img {
  height: calc(5 * var(--u));
}
.stand .srow b {
  margin-left: auto;
}
#clear .score,
#clear .scoreLabel {
  display: none;
}
#clear .cheer {
  position: absolute;
  right: calc(100% + 1.5 * var(--u));
  bottom: 0;
  height: calc(64 * var(--u));
  pointer-events: none;
  animation: floaty 3.2s ease-in-out infinite;
  transform-origin: 50% 100%;
}
@media (orientation: portrait) {
  #clear .cheer {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  #clear .cheer {
    animation: none;
  }
}
/* garage: workshop background, frameless panel, pill tabs, dark cards */
[data-panel='shop'] #shade {
  background: #0c0f1c url(../assets/img/garage.webp) center/cover no-repeat;
  opacity: 1;
}
#shop {
  border-image-source: none;
  border-width: calc(15 * var(--u)) calc(2 * var(--u)) calc(2 * var(--u));
}
.tabs .pill.tab {
  --pill: 1;
  background: none;
  border-style: solid;
  border-color: transparent;
  border-width: 0;
  border-radius: 0;
  border-image-source: url(../assets/img/mx-blue.webp);
  border-image-slice: 0 97 fill;
  color: #fff;
  -webkit-text-stroke: calc(0.7 * var(--u)) var(--navy);
  paint-order: stroke fill;
  padding: 0 calc(3 * var(--u));
}
.tabs .pill.tab[data-tab='bikes'] {
  border-image-source: url(../assets/img/mx-green.webp);
}
.tabs .pill.tab[data-tab='trails'] {
  border-image-source: url(../assets/img/mx-purple.webp);
}
.tabs .pill.tab img {
  filter: none;
}
#cards .card {
  background: none;
  border-style: solid;
  border-color: transparent;
  border-width: 0;
  border-image-source: url(../assets/img/card-mx.webp);
  border-image-slice: 60 fill;
  border-image-width: calc(4.2 * var(--u));
  color: #fff;
}
#settings .row,
#sound .row,
.panel .row {
  background: var(--row);
  border-color: var(--rowline);
  box-shadow: inset 0 0 0 calc(0.35 * var(--u)) var(--rowline);
}
#sound .row {
  height: calc(9.6 * var(--u));
  border: calc(0.45 * var(--u)) solid var(--rowline);
  border-radius: calc(6 * var(--u));
  padding: 0 calc(2.3 * var(--u)) 0 calc(0.6 * var(--u));
  gap: calc(2.6 * var(--u));
}
#sound .row span {
  font-size: calc(4.6 * var(--u));
}
#sound input[type='range'] {
  flex: 1;
  min-width: 0;
  height: calc(7 * var(--u));
  margin: 0;
  background: none;
  -webkit-appearance: none;
  appearance: none;
  pointer-events: auto;
  cursor: pointer;
  touch-action: none;
  --v: 50%;
}
#settings .pill {
  background: #1b1f2c;
  border-color: #ff7a1a;
  color: #fff;
}
#settings .pill img {
  filter: none;
}
.ribbon span {
  text-transform: uppercase;
}
.preview,
#prev {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}
/* compact result (ranking + goals + reward fit in 16:9) */
#clear {
  --py: 52%;
  gap: calc(0.9 * var(--u));
}
#clear .starsRow img {
  width: calc(9.6 * var(--u));
}
#clear .stand .srow {
  height: calc(5.2 * var(--u));
  font-size: calc(3.8 * var(--u));
}
#clear .stand .srow img {
  height: calc(4.2 * var(--u));
}
#clear .goals .row {
  height: calc(5 * var(--u));
  font-size: calc(3.7 * var(--u));
}
#clear .coinRow {
  background: #1b1f2c;
  box-shadow: inset 0 0 0 calc(0.35 * var(--u)) #ff7a1a;
  height: calc(6 * var(--u));
}
#clear .cheer {
  height: calc(47 * var(--u));
}
@media (orientation: portrait) {
  #clear .stand .srow {
    height: calc(6.4 * var(--u));
    font-size: calc(4.4 * var(--u));
  }
  #clear .goals .row {
    height: calc(6 * var(--u));
    font-size: calc(4.2 * var(--u));
  }
}
/* layout tweaks */
.nodes .trail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.nodes .trail polyline {
  fill: none;
  stroke: #fff1c4;
  stroke-width: calc(0.9 * var(--u));
  stroke-dasharray: calc(1.6 * var(--u)) calc(1.8 * var(--u));
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.85;
}
.node .pin {
  position: absolute;
  left: 50%;
  bottom: 92%;
  translate: -50% 0;
  width: calc(9.5 * var(--u));
  animation: bob 1.4s ease-in-out infinite;
  pointer-events: none;
}
.node .lk {
  position: absolute;
  left: 50%;
  top: 62%;
  translate: -50% -50%;
  width: calc(4.4 * var(--u));
  pointer-events: none;
}
.node.lock b {
  top: 30%;
}
.mapCard {
  position: absolute;
  left: calc(2.4 * var(--u) + env(safe-area-inset-left));
  bottom: calc(2.6 * var(--u) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: calc(0.6 * var(--u));
  padding: calc(2.2 * var(--u)) calc(4.4 * var(--u)) calc(2.4 * var(--u)) calc(3.6 * var(--u));
  border-style: solid;
  border-color: transparent;
  border-width: 0;
  border-image-source: url(../assets/img/panel-mx.webp);
  border-image-slice: 80 fill;
  border-image-width: calc(4 * var(--u));
  pointer-events: none;
}
.mapCard b {
  font-size: calc(5 * var(--u));
}
.mapCard span {
  font-size: calc(3.8 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(1 * var(--u));
}
.mapCard span img {
  height: calc(4.2 * var(--u));
}
#map .mapCorner {
  right: calc(2.4 * var(--u) + env(safe-area-inset-right));
  top: calc(2.4 * var(--u) + env(safe-area-inset-top));
}
#map .count.stars {
  right: calc(28 * var(--u) + env(safe-area-inset-right));
}
@media (orientation: portrait) {
  .mapCard {
    left: 50%;
    translate: -50% 0;
    bottom: calc(19 * var(--u) + env(safe-area-inset-bottom));
  }
  #map .count.stars {
    right: auto;
    left: calc(2.6 * var(--u));
    top: calc(14 * var(--u) + env(safe-area-inset-top));
  }
}
#cards .card .cn {
  position: absolute;
  left: 8%;
  top: 5%;
  font-size: calc(2.8 * var(--u));
  z-index: 2;
}
#cards .card {
  position: relative;
}
#ui #shop .preview canvas {
  max-width: calc(58 * var(--u));
}
#clear {
  --py: 55%;
}
#clear .stand .srow img {
  height: calc(4.8 * var(--u));
}
.btns3 .btn {
  font-size: calc(4.4 * var(--u));
  padding: 0 calc(3.8 * var(--u));
}
.ribbon.green span {
  margin-left: calc(var(--rh) * 0.12);
}
.modes .btn.mx span {
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: normal;
}
.modes .btn.mx[data-act='trial'] span {
  max-width: none;
}
/* layout tweaks */
.panel {
  border-bottom-width: calc(11 * var(--u));
}
#shop .ribbon.yellow {
  border-image-source: url(../assets/img/ribbon-yellow.webp);
  border-image-slice: 0 150 fill;
}
#shop .ribbon.yellow span {
  color: #fff;
}
.tabs .pill.tab {
  height: calc(9.2 * var(--u));
  font-size: calc(4.4 * var(--u));
}
.tabs .pill.tab img {
  height: calc(6 * var(--u));
}
@media (orientation: portrait) {
  #ui .preview::after {
    content: '';
    position: absolute;
    z-index: 0;
    left: 50%;
    bottom: calc(3 * var(--u));
    translate: -50% 0;
    width: 62%;
    height: calc(4.6 * var(--u));
    background: linear-gradient(#6b7282, #2c303c);
    border: calc(0.5 * var(--u)) solid #14182a;
    border-radius: calc(1.2 * var(--u));
    box-shadow: 0 calc(1.2 * var(--u)) 0 rgba(0, 0, 0, 0.35);
  }
}
#pause .plogo {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  top: calc(-10 * var(--u) - var(--rh) - 23 * var(--u));
  width: calc(36 * var(--u));
  pointer-events: none;
}
@media (orientation: portrait) {
  #pause .plogo {
    width: calc(48 * var(--u));
    top: calc(-10 * var(--u) - var(--rh) - 31 * var(--u));
  }
  #pause .btn {
    padding: 0 calc(5 * var(--u));
  }
}
[data-panel='pause'] #shade {
  background: rgba(8, 10, 24, 0.55);
}
.node .lk {
  top: auto;
  bottom: 6%;
  left: auto;
  right: 4%;
  translate: none;
  width: calc(4.4 * var(--u));
}
.node.lock b {
  top: 33%;
}
#map .arrow {
  top: 31%;
}
@media (orientation: portrait) {
  #map .arrow {
    top: 44%;
  }
  #map .arrow.right {
    right: calc(2.4 * var(--u) + env(safe-area-inset-right));
  }
  .mapCard {
    bottom: calc(22.5 * var(--u) + env(safe-area-inset-bottom));
  }
  #map .count.stars {
    top: calc(17 * var(--u) + env(safe-area-inset-top));
  }
}
#clear .cheer {
  right: calc(100% - 3 * var(--u));
  height: calc(44 * var(--u));
}
#clear .coinRow {
  min-width: calc(30 * var(--u));
}
.modes .btn.mx[data-act='endless'] img {
  height: calc(12.8 * var(--u));
}
#pause {
  --py: 61%;
}
#pause .plogo {
  width: calc(25 * var(--u));
  top: calc(-10 * var(--u) - var(--rh) - 14.5 * var(--u));
}
@media (orientation: portrait) {
  #pause {
    --py: 58%;
  }
  #pause .plogo {
    width: calc(48 * var(--u));
    top: calc(-10 * var(--u) - var(--rh) - 31 * var(--u));
  }
}
/* layout tweaks */
#hud .rbtn {
  width: max(calc(64 * var(--s)), 44px);
  height: max(calc(64 * var(--s)), 44px);
}
[data-screen='title'] .logo {
  top: calc(2.5 * var(--u));
  width: calc(73.7 * var(--u));
}
.modes .btn.mx {
  font-size: calc(7.3 * var(--u));
}
@media (orientation: portrait) {
  [data-screen='title'] .logo {
    top: calc(7.5 * var(--u) + env(safe-area-inset-top));
  }
  .modes .btn.mx {
    width: calc(80 * var(--u));
  }
  .modes .btn.mx[data-act='shop'] {
    width: calc(52 * var(--u));
  }
  .tcoins {
    height: calc(10.2 * var(--u));
    width: calc(39 * var(--u));
  }
  .tcoins img {
    height: calc(6.4 * var(--u));
  }
  .tcoins .ol {
    font-size: calc(5.3 * var(--u));
  }
}
#map .arrow {
  background-image: url(../assets/img/round-blue.webp);
}
#ui #shop .preview canvas {
  max-width: calc(78 * var(--u));
}
@media (orientation: portrait) {
  #ui #shop .preview canvas {
    max-width: calc(70 * var(--u));
  }
  #map .count.stars {
    top: calc(19.5 * var(--u) + env(safe-area-inset-top));
  }
}
#pause {
  --pw: calc(62 * var(--u));
}
#pause .plogo {
  width: calc(22.5 * var(--u));
  top: calc(-10 * var(--u) - var(--rh) - 12.5 * var(--u));
}
[data-panel='clear'] #shade {
  background: #120a2e url(../assets/img/menu-land.webp) center/cover no-repeat;
  opacity: 1;
  filter: blur(3px) brightness(0.55);
}
@media (orientation: portrait) {
  [data-panel='clear'] #shade {
    background-image: url(../assets/img/menu-port.webp);
  }
}
#clear .clogo {
  position: absolute;
  right: calc(100% + 4 * var(--u));
  top: calc(-4 * var(--u));
  width: calc(34 * var(--u));
  pointer-events: none;
}
@media (orientation: portrait) {
  #clear .clogo {
    display: none;
  }
}
.btns3 [data-act='next'] {
  flex-grow: 1.45;
}
@media (orientation: landscape) {
  .shopBody {
    grid-template-columns: 36% 1fr;
  }
  #shop .preview {
    overflow: visible;
  }
  #ui #shop .preview canvas {
    width: 124%;
    max-width: none;
    bottom: calc(-2 * var(--u));
  }
}
@media (orientation: portrait) {
  #shop .preview {
    min-height: calc(44 * var(--u));
  }
  #ui #shop .preview canvas {
    width: auto;
    height: 96%;
    max-width: none;
    bottom: calc(1 * var(--u));
  }
}
/* layout tweaks */
#clear .clogo {
  top: calc(-16 * var(--u));
  width: calc(30 * var(--u));
  right: calc(100% + 6 * var(--u));
}
#clear .cheer {
  height: calc(40 * var(--u));
}
.stand .srow {
  padding-left: calc(4.6 * var(--u));
}
#clear .coinRow {
  min-width: calc(40 * var(--u));
  height: calc(6.8 * var(--u));
}
#pause {
  --py: 63%;
  border-top-width: calc(12 * var(--u));
}
#pause .plogo {
  width: calc(30 * var(--u));
  top: calc(-10 * var(--u) - var(--rh) - 16 * var(--u));
}
@media (orientation: landscape) {
  #ui #shop .preview canvas {
    bottom: calc(9 * var(--u));
  }
}
.mapCard {
  min-width: calc(48 * var(--u));
}
#map .arrow {
  top: 47%;
}
#map .arrow.right {
  right: calc(1.2 * var(--u) + env(safe-area-inset-right));
}
#map .mapPlay {
  width: calc(54 * var(--u));
}
@media (orientation: portrait) {
  #map .arrow {
    top: 44%;
  }
  [data-screen='title'] .logo {
    width: calc(62 * var(--u));
    top: calc(5 * var(--u) + env(safe-area-inset-top));
  }
}
/* exact measurements from the menu */
.tcoins .ol {
  font-size: calc(5.1 * var(--u));
}
.modes .btn.mx[data-act='shop'] {
  font-size: calc(6.1 * var(--u));
}
.modes .btn.mx[data-act='tour'] {
  font-size: calc(6.2 * var(--u));
}
@media (orientation: portrait) {
  .tcoins {
    height: calc(8.9 * var(--u));
    width: calc(34.2 * var(--u));
  }
  .tcoins img {
    height: calc(5.2 * var(--u));
  }
  .tcoins .ol {
    font-size: calc(4.1 * var(--u));
  }
  .modes .btn.mx {
    justify-content: flex-start;
    padding-left: calc(13.4 * var(--u));
    gap: calc(4 * var(--u));
  }
  .modes .btn.mx span {
    flex: none;
    text-align: left;
  }
  .modes .btn.mx[data-act='shop'] {
    padding-left: calc(9 * var(--u));
    font-size: calc(7.6 * var(--u));
  }
  .modes .btn.mx[data-act='shop'] img {
    height: calc(8 * var(--u));
  }
  .modes .btn.mx[data-act='tour'] {
    font-size: calc(7.6 * var(--u));
  }
  .modes .btn.mx[data-act='trial'] {
    font-size: calc(6.6 * var(--u));
  }
  .modes .btn.mx[data-act='endless'] img {
    height: calc(12.5 * var(--u));
  }
}
/* the design font is wider: height from the measurement, width with letter spacing (no distortion) */
.tcoins .ol {
  font-size: calc(4.5 * var(--u));
  letter-spacing: 0.1em;
}
.modes .btn.mx[data-act='shop'] {
  font-size: calc(5.4 * var(--u));
}
.modes .btn.mx[data-act='shop'] span {
  letter-spacing: 0.08em;
}
@media (orientation: portrait) {
  .tcoins .ol {
    letter-spacing: 0.12em;
  }
  .modes .btn.mx[data-act='tour'] span {
    letter-spacing: 0.12em;
  }
  .modes .btn.mx[data-act='trial'] span {
    letter-spacing: 0.07em;
  }
  .modes .btn.mx[data-act='shop'] {
    font-size: calc(6 * var(--u));
  }
  .modes .btn.mx[data-act='shop'] span {
    letter-spacing: 0.04em;
  }
}
/* layout tweaks */
.node.done {
  background-image: url(../assets/img/node-done-mx.webp);
}
.node.cur {
  background-image: url(../assets/img/node-cur-mx.webp);
}
.node.lock {
  background-image: url(../assets/img/node-lock-mx.webp);
}
.node {
  aspect-ratio: 1;
  width: calc(11.5 * var(--u));
  translate: -50% -50%;
  padding-bottom: 0;
}
.node.lock {
  aspect-ratio: 1;
  width: calc(10 * var(--u));
}
.node.cur {
  aspect-ratio: 1;
  width: calc(14 * var(--u));
}
.node b,
.node.cur b,
.node.lock b {
  top: 50%;
}
.node.cur::before,
.node.cur::after {
  display: none;
}
.node .nst {
  bottom: calc(-3.8 * var(--u));
}
.node .pinw {
  position: absolute;
  left: 50%;
  bottom: 86%;
  translate: -50% 0;
  width: calc(8.5 * var(--u));
  animation: bob 1.4s ease-in-out infinite;
  pointer-events: none;
}
.node .pinw img {
  width: 100%;
  display: block;
}
.node .pinw .ph {
  position: absolute;
  left: 14%;
  top: 9%;
  width: 72%;
}
#map .mapBack {
  background-image: url(../assets/img/round-blue.webp);
}
/* result: goals in a compact box and the prize beside it */
#clear .gr {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: calc(1.6 * var(--u));
  align-items: center;
  background: #1b1f2c;
  border-radius: calc(3 * var(--u));
  padding: calc(1.2 * var(--u)) calc(1.6 * var(--u));
  box-shadow: inset 0 0 0 calc(0.35 * var(--u)) var(--rowline);
}
#clear .gr .goals .row {
  background: none;
  box-shadow: none;
  height: calc(4.6 * var(--u));
  font-size: calc(3.5 * var(--u));
  padding: 0 calc(1 * var(--u));
}
#clear .gr .coinRow {
  flex-direction: column;
  min-width: calc(22 * var(--u));
  height: auto;
  padding: calc(1 * var(--u)) calc(2 * var(--u));
  background: none;
  box-shadow: none;
  gap: calc(0.6 * var(--u));
}
#clear .gr .coinRow .rw {
  font-size: calc(3.6 * var(--u));
}
#clear .gr .coinRow b {
  color: #ffd447;
  font-size: calc(7 * var(--u));
}
@media (orientation: portrait) {
  #clear .gr {
    grid-template-columns: 1fr;
  }
  #clear .gr .coinRow {
    flex-direction: row;
  }
}
[data-panel='clear'] #shade {
  background-image: url(../assets/img/map-forest-land.webp);
  filter: blur(2px) brightness(0.5);
}
@media (orientation: portrait) {
  [data-panel='clear'] #shade {
    background-image: url(../assets/img/map-forest-port.webp);
    filter: blur(1px) brightness(0.55);
  }
}
#clear .clogo {
  right: calc(100% + 9 * var(--u));
  top: calc(-18 * var(--u));
}
/* garage: sound and settings cog stay in the corner as in the menu; the X sits beside them */
/* the garage X sits in the corner of the panel (fixed does not work: the panel has a translate) */
.tabs .pill.tab {
  gap: calc(1.4 * var(--u));
  padding: 0 calc(3.6 * var(--u)) 0 calc(4.2 * var(--u));
}
#cards .card canvas {
  width: 100% !important;
  max-width: none !important;
}
/* pause: shorter buttons, the panel and logo fit in 16:9 */
#pause .btn {
  height: calc(10.4 * var(--u));
}
#pause {
  gap: calc(1.4 * var(--u));
}
@media (orientation: portrait) {
  #pause {
    --py: 61%;
  }
}
/* layout tweaks */
#shop {
  --rw: calc(46 * var(--u));
}
.tabs .pill.tab {
  gap: calc(2.4 * var(--u));
}
@media (orientation: portrait) {
  #ui .preview::after {
    display: block;
  }
}
#pause {
  --py: 65%;
}
#pause .plogo {
  width: calc(22 * var(--u));
  top: calc(-10 * var(--u) - var(--rh) - 15.6 * var(--u));
}
@media (orientation: portrait) {
  #pause {
    --py: 62%;
  }
  #pause .plogo {
    width: calc(44 * var(--u));
    top: calc(-10 * var(--u) - var(--rh) - 30.5 * var(--u));
  }
}
@media (orientation: portrait) {
  #map .count.stars {
    top: calc(25 * var(--u) + env(safe-area-inset-top));
  }
  #map .arrow {
    top: 52%;
  }
}
#clear .gr {
  grid-template-columns: minmax(0, 1fr) auto;
}
#clear .gr .coinRow {
  min-width: calc(17 * var(--u));
  padding: calc(1 * var(--u)) calc(1 * var(--u));
}
/* garage: painted bike and rider (recolored in src/paint.js) */
@media (orientation: portrait) {
  #ui #cards .card canvas {
    height: calc(16 * var(--u));
    margin: calc(-0.4 * var(--u)) 0 calc(-1 * var(--u));
  }
  .tabs .pill.tab {
    padding-left: calc(9 * var(--u));
    padding-right: calc(1.6 * var(--u));
  }
  .tabs .pill.tab img {
    height: calc(5 * var(--u));
    left: 4%;
  }
}
[data-panel='pause'] #hud [data-act='pause'] {
  visibility: hidden;
} /* on pause only sound and the settings cog remain */
#pause::after {
  content: '';
  position: absolute;
  margin: 0;
  inset: calc(-8.6 * var(--u)) calc(-5.5 * var(--u)) calc(-7.6 * var(--u));
  border-radius: calc(2 * var(--u));
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 26%, transparent 31%) 0 0 / calc(1.4 * var(--u))
    calc(1.4 * var(--u));
} /* panel dotted pattern */
#pause > .btn {
  position: relative;
  z-index: 1;
}
/* result as in the design: coin plate, sound and settings cog in the corner, goals in green boxes of the same size */
.rcoins {
  display: none;
}
[data-panel='clear'] .rcoins {
  display: flex;
  z-index: 5;
}
[data-panel='clear'] #hud {
  display: flex;
  z-index: 5;
}
[data-panel='clear'] #hud [data-act='pause'] {
  display: none;
}
#clear .gr .goals .row {
  height: auto;
  min-height: calc(4.6 * var(--u));
  gap: calc(1.6 * var(--u));
}
#clear .gr .goals .row span {
  font-size: calc(3.3 * var(--u));
  text-transform: uppercase;
  line-height: 1.05;
  white-space: normal;
}
#clear .gr .goals .row b {
  font-size: calc(3.3 * var(--u));
  color: #cfd6e6;
  margin-left: auto;
}
#clear .gr .goals .row img {
  display: none;
}
#clear .goals .row i.ok {
  position: relative;
  width: calc(4.4 * var(--u));
  height: calc(4.4 * var(--u));
  border-radius: calc(1 * var(--u));
  background: #2a2f3c;
  border: calc(0.45 * var(--u)) solid #fff;
  box-sizing: border-box;
}
#clear .goals .row i.ok.yes {
  background: linear-gradient(#6fe33a, #2fa51a);
  border: calc(0.45 * var(--u)) solid #fff;
}
#clear .goals .row i.ok.yes::after {
  content: '';
  position: absolute;
  left: 32%;
  top: 12%;
  width: 26%;
  height: 50%;
  border: solid #fff;
  border-width: 0 calc(0.6 * var(--u)) calc(0.6 * var(--u)) 0;
  rotate: 42deg;
}
#clear .gr .coinRow {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  column-gap: calc(1.2 * var(--u));
  row-gap: calc(0.4 * var(--u));
}
#clear .gr .coinRow .rw {
  grid-column: 1/-1;
  text-align: center;
}
#clear .gr .coinRow img {
  height: calc(7 * var(--u));
}
@media (orientation: landscape) {
  #clear .gr .coinRow {
    border-left: calc(0.35 * var(--u)) solid var(--rowline);
    border-radius: 0;
    padding-left: calc(2.4 * var(--u));
  }
  #clear .gr .goals .row span,
  #clear .gr .goals .row b {
    font-size: calc(3.1 * var(--u));
  }
}
@media (orientation: portrait) {
  #clear .gr {
    grid-template-columns: 1fr;
  }
  #clear .gr .coinRow .rw {
    grid-column: auto;
  }
  #clear .gr .coinRow {
    grid-template-columns: auto auto auto;
    border-top: calc(0.35 * var(--u)) solid var(--rowline);
    border-radius: 0;
    padding-top: calc(1 * var(--u));
  }
  #clear .gr .coinRow img {
    height: calc(6 * var(--u));
  }
}
/* map: padlock under the number as in the design; in portrait, arrows beside the track card and stars below the plate */
.node .lk {
  top: auto;
  right: auto;
  left: 50%;
  bottom: -14%;
  translate: -50% 0;
  width: calc(4.6 * var(--u));
}
.node.lock b {
  top: 44%;
}
@media (orientation: portrait) {
  #map .arrow {
    top: auto;
    translate: none;
    bottom: calc(23 * var(--u) + env(safe-area-inset-bottom));
  }
  #map .count.stars {
    top: calc(29 * var(--u) + env(safe-area-inset-top));
  }
}
@media (orientation: landscape) {
  #map .mapRibbon {
    --rw: calc(58 * var(--u));
  }
} /* name plate with clearance from the coin and star plates */
/* garage: yellow ribbon from the design, orange sound/settings/X at the top right, golden price, locked in gray */
#shop .ribbon.yellow {
  border-image-source: url(../assets/img/ribbon-garage.webp);
  border-image-slice: 0 230 fill;
}
#shop {
  --rw: calc(60 * var(--u));
}
#ui .shopx {
  display: none;
}
[data-panel='shop'] #title .corner {
  z-index: 6;
}
#ui[data-panel='shop'] #title .corner .shopx {
  display: grid;
}
#shop > .close {
  display: none;
}
.card .tag {
  background: linear-gradient(#ffd84a, #f2a414);
}
.card.poor .tag {
  background: linear-gradient(#a3a9b6, #6e7483);
}
.card.poor canvas {
  filter: saturate(0.35) brightness(0.75);
}
.tabs .pill.tab {
  height: calc(11.4 * var(--u));
  font-size: calc(5.2 * var(--u));
}
.tabs .pill.tab img {
  height: calc(7.2 * var(--u));
}
@media (orientation: portrait) {
  .tabs .pill.tab {
    height: calc(10 * var(--u));
    font-size: calc(4.6 * var(--u));
  }
  .tabs .pill.tab img {
    height: calc(6 * var(--u));
  }
  #cards .card .cn {
    font-size: calc(3.6 * var(--u));
  }
}
@media (orientation: portrait) {
  #shop {
    --rw: calc(54 * var(--u));
  }
  #shop .ribbon {
    translate: -50% calc(9 * var(--u));
  }
}
/* tabs: icon and text in a centered group (the icon no longer floats at the left) */
#ui .tabs .pill.tab {
  justify-content: center;
  gap: calc(1.2 * var(--u));
  padding: 0 calc(2.6 * var(--u));
  font-size: calc(4.8 * var(--u));
}
#ui .tabs .pill.tab img {
  position: static;
  translate: none;
  height: calc(6.6 * var(--u));
}
#ui .tabs .pill.tab[data-tab='bikes'] img {
  height: calc(5.6 * var(--u));
}
#ui .tabs .pill.tab span {
  flex: none;
}
@media (orientation: portrait) {
  #ui .tabs .pill.tab {
    font-size: calc(4.4 * var(--u));
    padding: 0 calc(2 * var(--u));
  }
  #ui .tabs .pill.tab img {
    height: calc(5.6 * var(--u));
  }
  #ui .tabs .pill.tab[data-tab='bikes'] img {
    height: calc(4.8 * var(--u));
  }
}
/* pause: larger logo seated in the header, wider panel, sound and settings cog above the veil */
#pause {
  --pw: calc(72 * var(--u));
}
#pause .plogo {
  width: calc(36 * var(--u));
  top: calc(-10 * var(--u) - var(--rh) - 19 * var(--u));
}
@media (orientation: portrait) {
  #pause {
    --pw: calc(62 * var(--u));
  }
  #pause .plogo {
    width: calc(48 * var(--u));
    top: calc(-10 * var(--u) - var(--rh) - 26 * var(--u));
  }
}
[data-panel='pause'] #hud {
  z-index: 5;
}
/* result: taller ranking rows, larger stars with side rays */
#clear .stand .srow {
  height: calc(6.4 * var(--u));
  font-size: calc(4.6 * var(--u));
}
#clear .stand .srow img {
  height: calc(5.6 * var(--u));
}
#clear .starsRow {
  position: relative;
  width: max-content;
  margin-left: auto;
  margin-right: auto;
  align-self: center;
}
#clear .starsRow img {
  width: calc(11 * var(--u));
}
#clear .starsRow::before,
#clear .starsRow::after {
  content: '';
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: calc(6 * var(--u));
  height: calc(6 * var(--u));
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg stroke='%23ffd23f' stroke-width='4.5' stroke-linecap='round'%3E%3Cpath d='M8 9 L30 15'/%3E%3Cpath d='M6 21 L32 21'/%3E%3Cpath d='M8 33 L30 27'/%3E%3C/g%3E%3C/svg%3E")
    center/contain no-repeat;
}
#clear .starsRow::before {
  right: calc(100% + 0.6 * var(--u));
  scale: -1 1;
}
#clear .starsRow::after {
  left: calc(100% + 0.6 * var(--u));
}
@media (orientation: portrait) {
  #clear .stand .srow {
    height: calc(7.6 * var(--u));
    font-size: calc(5 * var(--u));
  }
  #clear .stand .srow img {
    height: calc(6.2 * var(--u));
  }
  [data-panel='clear'] #hud {
    top: calc(2.1 * var(--u) + env(safe-area-inset-top));
  }
}
/* map */
#map .arrow.off {
  opacity: 0.45;
  filter: grayscale(1);
  pointer-events: none;
}
#map .mapRibbon span {
  font-style: italic;
  font-size: calc(var(--rh) * 0.62);
}
#map .count {
  padding-right: calc(8.5 * var(--u));
}
#map .mapCard::after {
  content: '';
  position: absolute;
  right: calc(2 * var(--u));
  top: calc(1.4 * var(--u));
  width: calc(9 * var(--u));
  height: calc(4.2 * var(--u));
  background: linear-gradient(
    115deg,
    transparent 22%,
    #ff8a1f 22% 42%,
    transparent 42% 58%,
    #ff8a1f 58% 78%,
    transparent 78%
  );
}
#map .mapCard #mapCh {
  font-size: calc(4.4 * var(--u));
}
@media (orientation: portrait) {
  #map .arrow.right {
    right: calc(4 * var(--u) + env(safe-area-inset-right));
  }
  #map .arrow.left {
    left: calc(4 * var(--u) + env(safe-area-inset-left));
  }
}
#pause .plogo {
  z-index: 3;
} /* the MX logo sits on top of the PAUSED plate */
@media (orientation: landscape) {
  #shop {
    --rw: calc(46 * var(--u));
  }
}
/* layout tweaks */
.modes .btn.mx img {
  width: auto !important;
  object-fit: contain;
}
.tcoins .ol {
  margin-right: calc(2.4 * var(--u));
}
#pause {
  --rw: var(--pw);
}
#pause .ribbon {
  translate: -50% calc(2.4 * var(--u));
}
#pause .ribbon span {
  font-size: calc(var(--rh) * 0.58);
}
#pause .plogo {
  top: calc(-10 * var(--u) - var(--rh) - 15.5 * var(--u));
}
@media (orientation: portrait) {
  #pause .plogo {
    top: calc(-10 * var(--u) - var(--rh) - 26.5 * var(--u));
  }
}
@media (orientation: landscape) {
  #shop {
    --py: 49%;
  }
}
#map .mapPlay {
  width: calc(64 * var(--u));
  height: calc(15 * var(--u));
  font-size: calc(9 * var(--u));
}
.node {
  width: calc(13.6 * var(--u));
}
.node.lock {
  width: calc(12 * var(--u));
}
.node.cur {
  width: calc(16.8 * var(--u));
}
.node .pinw {
  width: calc(11 * var(--u));
}
/* end screen: no logo, no little lines on the stars, taller stars, trophy further to the
   left with the text centered in the strip, buttons with clearance, bike still (it only breathes from the wheels) and outside the
   panel; hidden when it does not fit beside it */
#clear .clogo,
#clear .starsRow::before,
#clear .starsRow::after {
  display: none;
}
#clear {
  --rw: calc(86 * var(--u));
}
#clear .ribbon span {
  margin: 0;
  max-width: 100%;
}
#clear .starsRow {
  margin-top: calc(-6 * var(--u));
}
@media (orientation: landscape) {
  #clear .ribbon {
    top: calc(-7 * var(--u) - var(--rh));
  }
  #clear .starsRow {
    margin-top: calc(-5 * var(--u));
  }
} /* landscape: the strip went past the top edge (trophy and text cut off) */
.btns3 {
  gap: calc(1.8 * var(--u));
}
.btns3 .btn {
  height: calc(13 * var(--u));
  font-size: calc(3.9 * var(--u));
  padding: 0 calc(2.6 * var(--u));
  gap: calc(0.8 * var(--u));
}
.btns3 .btn img {
  height: calc(5.6 * var(--u));
}
@media (orientation: portrait) {
  .btns3 .btn {
    font-size: calc(5 * var(--u));
  }
  .btns3 [data-act='next'] {
    font-size: calc(6.4 * var(--u));
  }
  .btns3 .btn img {
    height: calc(7 * var(--u));
  }
}
#clear .cheer {
  right: calc(100% + 12 * var(--u));
  margin: 0;
  animation: breathe 3.2s ease-in-out infinite;
  transform-origin: 50% 100%;
  translate: none;
}
@keyframes breathe {
  50% {
    scale: 1.012 1.035;
  }
}
@media (orientation: landscape) and (max-aspect-ratio: 17/10), (orientation: landscape) and (max-height: 420px) {
  #clear .cheer {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  #clear .cheer {
    animation: none;
  }
}
/* buttons were too tight, plus wide-screen support. 2x2 grid in the bottom-right corner,
   equal buttons with clearance, icon and text on one line; everything measured by the screen height (--u), so on wide screens nothing
   goes off the right. The id selector beats the old per-button rules. */
@media (orientation: landscape) {
  #title .modes {
    position: absolute;
    inset: auto;
    left: auto;
    right: calc(3 * var(--u) + env(safe-area-inset-right));
    bottom: calc(5.5 * var(--u) + env(safe-area-inset-bottom));
    translate: none;
    width: auto;
    max-width: calc(100vw - 6 * var(--u));
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: calc(2.4 * var(--u)) calc(2.6 * var(--u));
    pointer-events: auto;
  }
  #title .modes .btn.mx[data-act] {
    position: static;
    translate: none;
    --h: calc(15.5 * var(--u));
    height: var(--h);
    width: calc(54 * var(--u));
    margin: 0;
    padding: 0 calc(var(--h) * 0.42) 0 calc(var(--h) * 0.34);
    gap: calc(2 * var(--u));
    justify-content: flex-start;
    font-size: calc(6.2 * var(--u));
  }
  #title .modes .btn.mx[data-act] span {
    flex: 1;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    max-width: none;
    letter-spacing: normal;
    margin: 0;
    line-height: 1;
  }
  #title .modes .btn.mx[data-act] img {
    height: calc(10 * var(--u));
    margin: 0;
    flex: none;
  }
  #title .modes .btn.mx[data-act='shop'] img {
    height: calc(8.4 * var(--u));
  }
}
/* the "N stars to unlock" notice covered tracks 3 and 4; it now sits below, between the tracks and the card */
#map .mapLock {
  top: 75.5%;
  white-space: nowrap;
}
@media (orientation: portrait) {
  #map .mapLock {
    top: 77%;
    font-size: 0.82em;
    padding: calc(1.4 * var(--u)) calc(4 * var(--u));
  }
}
/* no cream button (pills become a dark plate with an orange border, like the rest of the game) and, on mobile,
   a touch area of at least 44 px on small controls (invisible margin; the art does not change) */
.pill {
  background: linear-gradient(#3a3f4d, #1f222b);
  border-color: #ff7a1a;
  color: #fff;
  text-shadow:
    0 0.12em 0 #0a0b0f,
    0 0 0.12em #0a0b0f;
}
.pill img {
  filter: brightness(0) invert(1);
}
.langGrid .pill.sel {
  background: linear-gradient(#ffb347, #ff7a1a);
  border-color: #fff3d6;
  color: #fff;
}
.langGrid .pill span {
  font-weight: 800;
}
@media (pointer: coarse) {
  .toggle::before,
  .pill::before,
  #pause .btn::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: max(100%, 48px);
    translate: 0 -50%;
  }
  .pill,
  #pause .btn {
    position: relative;
  }
}
/* landscape: the end panels (track and Freestyle) put the title strip against the top edge
   (trophy cut off at 844x390 and 2000x543): they are 8% smaller and a bit lower. No logo on pause (it covered the plate).
   Title plate text outside the orange stripes at the ends (shrinks if needed). */
@media (orientation: landscape) {
  #clear,
  #over {
    scale: 0.92;
  }
  #clear {
    --py: 56%;
  }
  #over {
    --py: 57%;
  }
}
#pause .plogo {
  display: none;
}
.ribbon.blue span,
.ribbon.red span,
.ribbon.yellow span {
  max-width: calc(var(--rw) - var(--rh) * 2.1);
  margin: 0;
}
/* in Russian the track card on the map got wide and PLAY covered the end of the challenge. In landscape the
   card stops before the button (PLAY is 64u wide, centered) and the challenge wraps to 2 lines. */
@media (orientation: landscape) {
  .mapCard {
    max-width: calc(50vw - 36 * var(--u) - env(safe-area-inset-left));
  }
  .mapCard span {
    white-space: normal;
    line-height: 1.05;
  }
}
/* MAP/AGAIN/NEXT buttons in landscape: icon and sides smaller so the text does not shrink too much */
@media (orientation: landscape) {
  .btns3 .btn {
    padding: 0 calc(1.6 * var(--u));
    gap: calc(0.5 * var(--u));
    font-size: calc(4.2 * var(--u));
  }
  .btns3 .btn img {
    height: calc(4.6 * var(--u));
  }
}
/* End of motocross screens */
/* Final polish:
   - "tap to start" screen: logo and text pulse slowly; the first tap unlocks sound and opens the menu
   - landscape menu: smaller letters and wider buttons (TIME TRIAL on a single line)
   - map: only the helmet moves (the track dot stays still in the center of the clearing), arena name a bit
     lower on the plate, card and notice texts smaller, PLAY centered on the button face (the shadow at the bottom of the art
     made the text sit low and look crooked) */
.tapStart {
  display: none;
  position: absolute;
  left: 50%;
  bottom: calc(12 * var(--u) + env(safe-area-inset-bottom));
  translate: -50% 0;
  font-size: calc(6.4 * var(--u));
  white-space: nowrap;
  padding: calc(1.6 * var(--u)) calc(6 * var(--u));
  border-radius: calc(4 * var(--u));
  background: rgba(12, 10, 28, 0.62);
  animation: tapPulse 1.8s ease-in-out infinite;
}
@keyframes tapPulse {
  50% {
    scale: 1.04;
    opacity: 0.82;
  }
}
#ui.start #title {
  pointer-events: auto;
  cursor: pointer;
}
#ui.start .tapStart {
  display: block;
}
#ui.start #title .modes,
#ui.start #title .tcoins,
#ui.start #title .corner {
  display: none;
}
@media (orientation: landscape) {
  #title .modes .btn.mx[data-act] {
    --h: calc(13 * var(--u));
    width: calc(58 * var(--u));
    font-size: calc(4.6 * var(--u));
    gap: calc(1.6 * var(--u));
  }
  #title .modes .btn.mx[data-act] img {
    height: calc(8.6 * var(--u));
  }
  #title .modes .btn.mx[data-act='shop'] img {
    height: calc(7.2 * var(--u));
  }
}
.node.cur {
  animation: none;
}
.node .pinw {
  animation: pinBob 1.4s ease-in-out infinite;
}
@keyframes pinBob {
  50% {
    translate: -50% -10%;
  }
}
#map .mapRibbon span {
  translate: 0 calc(0.7 * var(--u));
}
#map .mapCard b {
  font-size: calc(4 * var(--u));
}
#map .mapCard #mapCh {
  font-size: calc(3.4 * var(--u));
}
#map .mapCard span img {
  height: calc(3.4 * var(--u));
}
#map .mapLock {
  font-size: calc(4.2 * var(--u));
  padding: calc(1.2 * var(--u)) calc(3.6 * var(--u));
  gap: calc(1.4 * var(--u));
}
#map .mapLock img {
  height: calc(6 * var(--u));
}
#map .mapPlay {
  width: calc(54 * var(--u));
  height: calc(13 * var(--u));
  font-size: calc(7.6 * var(--u));
}
.panel .btn span,
#map .mapPlay span {
  position: relative;
  top: -0.06em;
}
@media (orientation: portrait) {
  #map .mapLock {
    font-size: calc(4.6 * var(--u));
  }
  #map .mapCard b {
    font-size: calc(5 * var(--u));
  }
  #map .mapCard #mapCh {
    font-size: calc(4.2 * var(--u));
  }
}
/* end screen: smaller trophy and further left (the strip grows to the left and gets shorter) and smaller text,
   always inside the green part (before, the R of the rank label went past the fold on the right) */
#clear .ribbon {
  --rh: calc(var(--rw) / 4.7);
  width: calc(var(--rw) + 8 * var(--u));
  translate: calc(-50% - 4 * var(--u)) 0;
  font-size: calc(var(--rh) * 0.42);
}
#clear .ribbon span {
  max-width: calc(100% - 4 * var(--u));
}
/* garage: the grid always has 8 slots (the preview does not jump when switching tabs); on the tabs the icon sits at the
   end and the text is centered in the rest, all with the same lettering; label and padlock away from the card edge; corner X
   with the same stroke thickness as the sound and settings cog */
.card.ghost {
  visibility: hidden;
  pointer-events: none;
}
#ui .tabs .pill.tab {
  position: relative;
  justify-content: center;
  padding: 0 calc(2.4 * var(--u)) 0 calc(9.6 * var(--u));
  gap: 0;
}
#ui .tabs .pill.tab img {
  position: absolute;
  left: calc(2.6 * var(--u));
  top: 50%;
  translate: 0 -50%;
}
#ui .tabs .pill.tab span {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-size: calc(4.4 * var(--u));
}
#cards .card {
  padding-bottom: calc(2.4 * var(--u));
}
#cards .card canvas {
  margin-top: calc(-1.2 * var(--u));
}
#cards .card .tag {
  height: calc(4.3 * var(--u));
  font-size: calc(2.9 * var(--u));
  min-width: 72%;
}
#cards .card .tag img {
  height: calc(3 * var(--u));
}
#cards .card .lk {
  right: calc(2.6 * var(--u));
  bottom: calc(8.6 * var(--u));
  width: calc(4 * var(--u));
}
.rbtn img[src*='ic-close'] {
  width: 48%;
  height: 48%;
}
@media (orientation: portrait) {
  #ui .tabs .pill.tab {
    padding-left: calc(8.4 * var(--u));
  }
  #ui .tabs .pill.tab img {
    left: calc(2 * var(--u));
  }
  #ui .tabs .pill.tab span {
    font-size: calc(4 * var(--u));
  }
}
/* tabs: text centered on the whole pill (before, in the space to the right of the icon, and it looked crooked); equal
   clearance on both sides and a slightly smaller icon so it does not touch the text */
#ui .tabs .pill.tab {
  padding: 0 calc(7.4 * var(--u));
}
#ui .tabs .pill.tab img {
  left: calc(2 * var(--u));
  height: calc(5.8 * var(--u));
}
#ui .tabs .pill.tab[data-tab='bikes'] img {
  height: calc(4.9 * var(--u));
}
@media (orientation: portrait) {
  #ui .tabs .pill.tab {
    padding: 0 calc(6.6 * var(--u));
  }
  #ui .tabs .pill.tab img {
    left: calc(1.6 * var(--u));
    height: calc(5 * var(--u));
  }
  #ui .tabs .pill.tab[data-tab='bikes'] img {
    height: calc(4.2 * var(--u));
  }
}
#ui .tabs .pill.tab span {
  padding: 0;
  margin: 0;
  overflow: visible;
} /* old rules gave crooked clearance to the text */
#ui .tabs .pill.tab span {
  font-size: calc(3.1 * var(--u));
}
#ui .tabs .pill.tab img {
  left: calc(1.6 * var(--u));
}
/* pause: the strip + panel centered on the screen height (before there were 178 px left on top and 40 at the bottom) */
@media (orientation: landscape) {
  #pause {
    --py: 57.3%;
  }
}
@media (orientation: portrait) {
  #pause {
    --py: 52.8%;
  }
}
/* pause: slightly smaller letters and the text a bit lower, in the middle of the button */
#pause .btn {
  font-size: calc(5.2 * var(--u));
}
#pause .btn span {
  top: 0.04em;
}
@media (orientation: portrait) {
  #pause .btn {
    font-size: calc(5.6 * var(--u));
  }
}
/* garage also via the map: the corner X closes and returns to the map */
#ui[data-screen='map'][data-panel='shop'] .mapCorner .shopx {
  display: grid;
}
#ui[data-screen='map'][data-panel='shop'] .mapCorner {
  z-index: 6;
}
/* garage ("the bike looks like it is flying"): new background without the loose step and the bike on a painted stage
   attached to the preview (moves with it on any screen). --pb = height from the bottom edge of the stage to the middle of the top */
[data-panel='shop'] #shade {
  background-image: url(../assets/img/garage.webp);
}
#ui #shop .preview {
  overflow: visible;
}
#ui #shop .preview::before {
  content: '';
  position: absolute;
  z-index: 0;
  left: var(--palcoX, 50%);
  bottom: var(--palcoY, 0px);
  translate: -50% 0;
  width: var(--palcoW, 100%);
  aspect-ratio: 1100/268;
  background: url(../assets/img/palco.webp) center/100% 100% no-repeat;
}
#ui #shop .preview::after {
  display: none;
} /* old gray plate on portrait mobile: the painted stage replaces it */
/* garage tabs ("looks crooked"): no icon, just the text in the middle of the button face; no rectangular shadow
   that made a dark line under the pill */
#ui .tabs .pill.tab {
  box-shadow: none;
  padding: 0 calc(3 * var(--u));
}
#ui .tabs .pill.tab img {
  display: none;
}
#ui .tabs .pill.tab span {
  font-size: calc(3.9 * var(--u));
  position: relative;
  top: -0.06em;
}
@media (orientation: portrait) {
  #ui .tabs .pill.tab {
    padding: 0 calc(2 * var(--u));
  }
  #ui .tabs .pill.tab span {
    font-size: calc(3.8 * var(--u));
  }
}
/* garage via the map: button in the bottom-right corner (on top it hit the star plate) */
#map .mapShop {
  position: absolute;
  right: calc(3 * var(--u) + env(safe-area-inset-right));
  bottom: calc(3 * var(--u) + env(safe-area-inset-bottom));
  width: calc(13 * var(--u));
  height: calc(13 * var(--u));
  z-index: 3;
}
#map .mapShop img {
  width: 62%;
  height: 62%;
}
@media (orientation: portrait) {
  #map .mapShop {
    bottom: calc(5 * var(--u) + env(safe-area-inset-bottom));
    width: calc(15 * var(--u));
    height: calc(15 * var(--u));
  }
}
/* map: the yellow dot of the current track is the same size as the others and has the number in the same pattern */
.node.cur {
  width: calc(19.8 * var(--u));
} /* the yellow circle takes 59% of the art (rays around it); the green one, 86% */
.node.cur b {
  font-size: inherit;
}
#nodes .node:not(.lock) b {
  font-size: calc(5.4 * var(--u));
}
#nodes .node.cur b {
  top: 58.5%;
} /* center of the yellow circle in the art (the box includes the light rays, taller on top) */
#over .row span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}
#over .row b {
  flex: none;
  min-width: 0;
  margin-left: calc(1.2 * var(--u));
} /* a long label (Russian) shrinks; the value stays whole inside the row */

/* End of src/style-2.css: complete file, part 2 of 2 of the styles. This is the last part. */
