/* Finishing layer: later adjustments and overrides for every screen. Part 3 of 3, loaded last: it must stay after telas.css. */
#fim #tabela > div {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 0.45);
}
#fim #tabela .tl {
  display: grid;
  grid-template-columns: calc(var(--u) * 2.6) minmax(0, 1fr) auto;
  align-items: center;
  gap: calc(var(--u) * 1.1);
  height: calc(var(--u) * 3.5);
  padding: 0 calc(var(--u) * 1.2) 0 calc(var(--u) * 0.5);
  border-radius: calc(var(--u) * 0.6);
  background: #ffffff0d;
  color: #fff;
  font-size: calc(var(--u) * 1.9);
  white-space: nowrap;
  opacity: 0;
  animation: linha 0.3s ease-out forwards;
}
#fim #tabela .tl b {
  display: grid;
  place-items: center;
  width: calc(var(--u) * 2.6);
  height: calc(var(--u) * 2.6);
  border-radius: calc(var(--u) * 0.5);
  background: #16404f;
  color: #cfe3e8;
  font-size: calc(var(--u) * 1.7);
}
#fim #tabela .tl:nth-child(1) b {
  background: linear-gradient(180deg, #ffe27a, #f0a012);
  color: #4a2a00;
}
#fim #tabela .tl:nth-child(2) b {
  background: linear-gradient(180deg, #f4f7fa, #a9b4c4);
  color: #2a3342;
}
#fim #tabela .tl:nth-child(3) b {
  background: linear-gradient(180deg, #f3b47c, #b8672a);
  color: #3d1c00;
}
.tl span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl span:last-child {
  font-variant-numeric: tabular-nums;
  color: #cfe3e8;
}
#fim #tabela .tl.eu {
  background: linear-gradient(90deg, #d6f95a, #9ed81f);
  color: #102408;
}
#fim #tabela .tl.eu span:last-child {
  color: #102408;
}
#fim.repete #btDeNovo {
  display: none;
}

/* ---- HUD: left-side notices in the same style as the plates (slanted background with colored line), in one column ---- */
body #meta,
body #missao,
body #combo {
  isolation: isolate;
  background: none;
  border: 0;
  left: calc(var(--sl) + calc(var(--u) * 2.6));
  padding: calc(var(--u) * 0.3) calc(var(--u) * 1.6);
  font-size: calc(var(--u) * 1.55);
  line-height: 1.35;
}
body #hud #rival,
body #hud #rivalTras {
  font-size: calc(var(--u) * 1.55);
  line-height: 1.35;
}
#meta::before,
#missao::before,
#combo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, #0a1020d8, #0a1020b0 70%, #0a102000);
  border-left: calc(var(--u) * 0.3) solid #ffd23f;
}
#conta {
  top: 37%;
} /* the start countdown sits below the top notice: they never overlap */
#missao::before {
  border-left-color: #35d6ff;
}
#meta.ok::before,
#missao.ok::before {
  border-left-color: #6dff8a;
}
#combo::before {
  border-left-color: currentColor;
}
/* four spaced groups: position, rivals (ahead and behind together), goals (lap goal and mission together), drift (with combo attached) */
body #hud #rival {
  top: calc(var(--u) * 7.4);
}
body #hud #rivalTras {
  top: calc(var(--u) * 10.1);
}
body #meta {
  top: calc(var(--u) * 13.8);
}
body #missao {
  top: calc(var(--u) * 16.5);
}
body #hud #drift {
  top: calc(var(--u) * 20.2);
}
body #combo {
  top: calc(var(--u) * 25);
  font-size: calc(var(--u) * 2);
}
/* notice right below the lap/time plate (one block at the top), smaller so it does not cover the track */
body #aviso,
body.toque #aviso {
  top: calc(var(--u) * 8.4);
  font-size: calc(var(--u) * 2);
}
body #aviso.longo,
body.toque #aviso.longo {
  font-size: calc(var(--u) * 1.7);
}
body #hud #vacuo,
body.toque #hud #vacuo {
  top: calc(var(--u) * 12.6);
}
/* nitro: the bar on a dark plate like the others, thicker */
body #barraNitro {
  padding: calc(var(--u) * 0.5) calc(var(--u) * 3) calc(var(--u) * 0.5) calc(var(--u) * 2);
  background: linear-gradient(90deg, #0a102000, #0a1020c0 18%, #0a1020c0 82%, #0a102000);
}
body #barraNitro i {
  height: calc(var(--u) * 1.5);
  border-color: #ffffffc8;
  background: #0a1020d8;
}
/* on mobile: 44 px top buttons and a smaller, lighter minimap */
body.toque #mapa {
  width: calc(var(--u) * 11);
  height: calc(var(--u) * 11);
  background: #0a102090;
}
body.toque #btPausa,
body.toque #btCam,
body.toque #btVolta {
  width: calc(var(--u) * 6);
  height: calc(var(--u) * 6);
  top: calc(var(--u) * 1.6);
}
body.toque #btPausa {
  right: calc(var(--sr) + calc(var(--u) * 15));
}
body.toque #btVolta {
  right: calc(var(--sr) + calc(var(--u) * 22.6));
}
body.toque #btCam {
  right: calc(var(--sr) + calc(var(--u) * 30.2));
}

/* ---- trophies: drawn cup (grey while locked, gold with laurels when earned), progress bar and earned badge ---- */
#trofeus .fundo {
  filter: blur(calc(var(--u) * 0.9)) brightness(0.3) saturate(0.7);
}
#trGrade {
  top: calc(var(--u) * 8.2);
  bottom: calc(var(--u) * 8.7);
  gap: calc(var(--u) * 0.9);
  grid-template-rows: repeat(3, minmax(0, 1fr));
}
.tf {
  overflow: hidden;
}
.tf.and::before {
  filter: grayscale(0.55) brightness(0.9);
  opacity: 0.9;
}
.tf i.pg.cheia u {
  width: calc(var(--u) * 14);
  background: linear-gradient(90deg, #d6f95a, #9ed81f);
  box-shadow: none;
}
/* every card has the same four bands (cup, name, description up to two lines, progress) so grid rows line up */
.tf {
  justify-content: center;
  gap: calc(var(--u) * 0.15);
  padding: calc(var(--u) * 0.3) calc(var(--u) * 0.8);
}
.tf svg {
  display: none;
}
.tf::before {
  content: '';
  flex: none;
  width: calc(var(--u) * 2.8);
  height: calc(var(--u) * 2.8);
  background: url(../assets/ui-taca.webp) center/contain no-repeat;
  filter: brightness(0) invert(1);
  opacity: 0.3;
}
.tf.ok::before {
  background-image: url(../assets/ui-trofeu.webp);
  filter: drop-shadow(0 calc(var(--u) * 0.3) calc(var(--u) * 0.4) #0009);
  opacity: 1;
  scale: 1.25;
}
.tf b {
  font-size: calc(var(--u) * 1.9);
}
.tf span {
  display: grid;
  place-items: center;
  min-height: 2.3em;
  line-height: 1.15;
  font-size: calc(var(--u) * 1.35);
  color: #c3d8dd;
}
.tf:not(.ok) b {
  color: #dbe7ea;
}
.tf i.pg {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 0.8);
  min-height: calc(var(--u) * 1.5);
  font-size: calc(var(--u) * 1.5);
  color: #9fd8f2;
  white-space: nowrap;
}
.tf i.pg u {
  display: block;
  width: calc(var(--u) * 9);
  height: calc(var(--u) * 1);
  border-radius: calc(var(--u) * 0.5);
  background: linear-gradient(90deg, #4fd8ff var(--p), #00000066 0);
  box-shadow: 0 0 0 calc(var(--u) * 0.12) #ffffff30;
}
.tf i.visto {
  position: absolute;
  right: calc(var(--u) * 0.9);
  top: calc(var(--u) * 0.9);
  font-size: 0;
}
#btTrCorre {
  height: calc(var(--u) * 6.2);
  bottom: calc(var(--u) * 1.1);
}
#trTotal {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 0.8);
  bottom: calc(var(--u) * 1.6);
  height: calc(var(--u) * 5.2);
  padding: 0 calc(var(--u) * 1.8) 0 calc(var(--u) * 1);
  border-radius: calc(var(--u) * 1);
  background: linear-gradient(180deg, #143326, #0a1d1a);
  border: calc(var(--u) * 0.25) solid #7fae4a;
  font-size: calc(var(--u) * 1.7);
  letter-spacing: 0.08em;
}
#trTotal::before {
  content: '';
  width: calc(var(--u) * 3.6);
  height: calc(var(--u) * 3.6);
  background: url(../assets/ui-trofeu.webp) center/contain no-repeat;
}

/* ---- workshop: car on the left, three upgrades in a panel on the right, top bar like the other screens ---- */
#oficina.on {
  display: block;
}
#oficina .fundo {
  filter: brightness(0.5);
}
#ofCarro {
  position: absolute;
  left: calc(var(--sl) + 3vw);
  top: calc(var(--u) * 9);
  width: calc(94vw - var(--sl) - var(--sr) - calc(var(--u) * 50));
  height: calc(100% - calc(var(--u) * 12));
  object-fit: contain;
  object-position: center 80%;
  filter: drop-shadow(0 calc(var(--u) * 1.2) calc(var(--u) * 0.9) #000a);
}
#ofCaixa {
  position: absolute;
  right: calc(var(--sr) + calc(var(--u) * 3));
  top: max(calc(var(--u) * 9.4), calc(50% - calc(var(--u) * 13.5)));
  width: calc(var(--u) * 46);
  min-width: 0;
  padding: calc(var(--u) * 1.5) calc(var(--u) * 2) calc(var(--u) * 2);
}
#ofNome {
  margin: 0 0 calc(var(--u) * 0.3);
  font-size: calc(var(--u) * 2.8);
  line-height: 1.1;
  text-transform: uppercase;
  color: #fff3d6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.upLinha {
  grid-template-columns: calc(var(--u) * 11.5) 1fr auto;
  gap: calc(var(--u) * 1.2);
  margin-top: calc(var(--u) * 1);
  padding: calc(var(--u) * 0.9) calc(var(--u) * 0.9) calc(var(--u) * 0.9) calc(var(--u) * 1.5);
  border-radius: calc(var(--u) * 0.9);
  background: #07161dc8;
  border: calc(var(--u) * 0.2) solid #2f5a66;
  font-size: calc(var(--u) * 2);
}
/* each upgrade with its icon (engine, tire, nitro), in row order */
.upLinha > span:first-child {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 0.9);
  white-space: nowrap;
}
.upLinha > span:first-child::before {
  content: '';
  flex: none;
  width: calc(var(--u) * 4.6);
  height: calc(var(--u) * 4.6);
  background: url(../assets/ui-motor.webp) center/contain no-repeat;
}
.upLinha:nth-child(2) > span:first-child::before {
  background-image: url(../assets/ui-pneu.webp);
}
.upLinha:nth-child(3) > span:first-child::before {
  background-image: url(../assets/nitro.webp);
}
.upLinha {
  grid-template-columns: calc(var(--u) * 20) 1fr auto;
  padding-left: calc(var(--u) * 0.9);
  font-size: calc(var(--u) * 1.85);
}
#ofCaixa {
  width: calc(var(--u) * 50);
}
.upPips {
  gap: calc(var(--u) * 0.6);
  align-items: center;
}
.upPips i {
  flex: 1;
  width: auto;
  height: calc(var(--u) * 2.2);
  background: #00000070;
  box-shadow: inset 0 0 0 calc(var(--u) * 0.15) #ffffff38;
}
.upPips i.on {
  background: linear-gradient(180deg, #e2ff6a, #a9d81f);
  box-shadow: 0 0 calc(var(--u) * 0.8) #c8f23a80;
}
.upPips[data-n]::after {
  content: attr(data-n) ' / 3';
  flex: none;
  margin-left: calc(var(--u) * 0.5);
  font-size: calc(var(--u) * 1.6);
  color: #cfe3e8;
  white-space: nowrap;
}
.upLinha .b3[disabled]:not(.max) {
  color: #ff9c8a;
} /* price in light red: not enough coins */
.upLinha .b3 {
  height: calc(var(--u) * 6);
  min-width: calc(var(--u) * 13);
  font-size: calc(var(--u) * 2.3);
  gap: calc(var(--u) * 0.6);
}
.upLinha .b3::before {
  content: '';
  flex: none;
  width: calc(var(--u) * 2.7);
  height: calc(var(--u) * 2.7);
  background: url(../assets/ui-moeda.webp) center/contain no-repeat;
}
.upLinha .b3[disabled] {
  filter: none;
  border-color: #3d6b78;
  background: linear-gradient(180deg, #16404f, #0d2732);
  box-shadow: 0 calc(var(--u) * 0.5) 0 #04101a;
}
.upLinha .b3[disabled]::before {
  filter: saturate(0.6) brightness(0.8);
}
.upLinha .b3.max {
  color: var(--lima);
  border-color: var(--lima);
}
.upLinha .b3.max::before {
  display: none;
}

/* ---- garage and track map: every touch target 44 px, and the selected car row above the race button ---- */
#btTunar {
  align-items: center;
  height: calc(var(--u) * 6);
  margin-top: calc(var(--u) * 1);
  padding: 0 calc(var(--u) * 1.6) 0 calc(var(--u) * 1.4);
  border: calc(var(--u) * 0.22) solid var(--fio);
  border-radius: calc(var(--u) * 0.9);
  background: linear-gradient(180deg, var(--tinta2), var(--tinta));
  box-shadow: 0 calc(var(--u) * 0.45) 0 #04101a;
  color: #fff;
  font-size: calc(var(--u) * 1.9);
}
#btTunar span:last-child {
  font-size: 0;
  width: calc(var(--u) * 1.1);
  height: calc(var(--u) * 1.1);
  border: solid var(--lima);
  border-width: calc(var(--u) * 0.35) calc(var(--u) * 0.35) 0 0;
  rotate: 45deg;
} /* drawn arrow instead of the character */
.seg {
  height: calc(var(--u) * 1.8);
  background: linear-gradient(90deg, var(--lima) calc(var(--n) * 10%), #ffffff40 0);
}
.cc .cad {
  width: calc(var(--u) * 2.6);
  height: calc(var(--u) * 2.6);
}
#gNome {
  paint-order: stroke fill;
  -webkit-text-stroke: calc(var(--u) * 0.55) #07141e;
  text-shadow: 0 calc(var(--u) * 0.4) calc(var(--u) * 0.8) #000c;
} /* dark outline: the name stays readable over the bright garage sky */
.cc img {
  height: 54%;
}
.cc b {
  white-space: normal;
  text-overflow: clip;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: max(calc(var(--u) * 0.95), min(10px, 1.15vw));
  bottom: calc(var(--u) * 0.5);
  padding: 0 calc(var(--u) * 0.2);
  height: 2.1em;
  display: grid;
  place-items: center;
} /* long names wrap to two lines */
/* map: unlocked stop in bright blue, locked in grey; title on the left so it does not touch the coins */
.no {
  background: radial-gradient(circle at 50% 30%, #3f9fb8, #12495c 70%);
}
.no.tranc {
  background: radial-gradient(circle at 50% 30%, #44555f, #10181f 70%);
}
#turne .topo h1 {
  position: static;
  translate: none;
  margin-right: auto;
  font-size: calc(var(--u) * 3.8);
}
#cartaoPista > * {
  flex: none;
}
#cpCarro #cpCarroImg {
  width: calc(var(--u) * 6);
}
#cpCarro #cpCarroNome {
  font-size: calc(var(--u) * 1.45);
  white-space: normal;
  line-height: 1.05;
  max-height: 2.1em;
}
#cpCarro #cpCarroTroca {
  padding: calc(var(--u) * 0.45) calc(var(--u) * 0.9);
  border-radius: calc(var(--u) * 0.6);
  border: calc(var(--u) * 0.18) solid #4fd8ff;
  font-size: calc(var(--u) * 1.3);
  line-height: 1;
}
/* buttons with two highlight bands (the top one lighter), menu tagline over a dark band */
.b3 {
  background: linear-gradient(180deg, #235c70 0, #184757 48%, #103441 52%, #0d2732 100%);
}
.b3.pri,
.setaF {
  background: linear-gradient(180deg, #ffd978 0, #ffb53a 48%, #f8911f 52%, #f0760f 100%);
}
#abas .b3.sel {
  background: linear-gradient(180deg, #3a7a45 0, #2b5a35 48%, #1c4226 52%, #143320 100%);
}
#mBotoes .b3 {
  font-size: calc(var(--u) * 2.15);
}
#mBotoes .b3 svg {
  width: 1.35em;
  height: 1.35em;
}
#mBotoes #btJogar svg {
  width: 1.1em;
  height: 1.1em;
}
#lema {
  padding: calc(var(--u) * 0.5) calc(var(--u) * 1.4) calc(var(--u) * 0.4) calc(var(--u) * 4);
  right: calc(var(--sr) + calc(var(--u) * 2));
  background: linear-gradient(90deg, #07141e00, #07141ed0 30%);
}
#ajuda {
  bottom: calc(var(--u) * 2.6);
  font-size: calc(var(--u) * 1.25);
  opacity: 0.8;
}
#cartao {
  padding-top: calc(var(--u) * 1.2);
  padding-bottom: calc(var(--u) * 1.5);
}
#btCompra {
  margin-top: calc(var(--u) * 0.9);
  height: calc(var(--u) * 6.4);
}
.barra {
  margin-top: calc(var(--u) * 0.6);
}
#abas .b3 {
  height: calc(var(--u) * 6);
}
#cartaoPista {
  top: calc(var(--u) * 8.2);
  bottom: calc(var(--u) * 1.2);
  gap: calc(var(--u) * 0.6);
  padding: calc(var(--u) * 1) calc(var(--u) * 1.6) calc(var(--u) * 1.1);
}
#cpNome {
  font-size: calc(var(--u) * 2.6);
}
#miniPista {
  height: calc(var(--u) * 5.8);
}
#cpInfo {
  font-size: calc(var(--u) * 1.45);
  line-height: 1.25;
}
#cpLinha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--u) * 1);
}
#cpEst {
  font-size: calc(var(--u) * 2.5);
  letter-spacing: 0.08em;
}
#cpTab {
  min-height: 0;
  text-align: right;
}
.segs button {
  display: grid;
  place-items: center;
  padding: 0;
  min-width: 0;
  height: calc(var(--u) * 6);
  line-height: 1.05;
  white-space: normal;
  font-size: calc(var(--u) * 1.45);
  overflow: hidden;
}
#cpDupla {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: calc(var(--u) * 0.6);
}
#cpDupla button {
  font-size: calc(var(--u) * 1.25);
  letter-spacing: -0.01em;
} /* mode and style (arcade/pro) share a row; two-word names wrap to two lines */
#cpCarro {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  flex: none;
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1);
  height: calc(var(--u) * 6);
  padding: 0 calc(var(--u) * 1.2) 0 calc(var(--u) * 0.6);
  border-radius: calc(var(--u) * 0.8);
  border: calc(var(--u) * 0.2) solid #3d6b78;
  background: #07161d;
  text-transform: uppercase;
  white-space: nowrap;
}
#cpCarro:not(:has(#cpCarroNome:not(:empty))) {
  display: none;
} /* shown once the game fills in the car name */
#cpCarroImg {
  flex: none;
  width: calc(var(--u) * 8);
  height: calc(var(--u) * 4.6);
  object-fit: contain;
}
#cpCarroNome {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: calc(var(--u) * 1.7);
}
#cpCarroTroca {
  flex: none;
  font-style: inherit;
  font-size: calc(var(--u) * 1.4);
  color: #4fd8ff;
}
body #btCorrer {
  height: calc(var(--u) * 6.6);
  font-size: calc(var(--u) * 3.2);
}
.upLinha.asa > span:first-child::before {
  background-image: url(../assets/ui-asa.webp) !important;
} /* Pro mode: the wing takes the nitro row in the workshop */

/* ===== track map: image stops, single-row tabs and a block panel =====
     The panel is 34 wide and at least 43 tall; top to bottom: cup and stage, name, layout with three chips, stars and points,
     three options in one row (each tap cycles), car and RACE. */
body #turne {
  --livre: calc(100vw - var(--sr) - calc(var(--u) * 38));
}
body #cartaoPista {
  width: calc(var(--u) * 34);
  top: calc(var(--u) * 8);
  bottom: calc(var(--u) * 1.4);
  padding: calc(var(--u) * 1.3) calc(var(--u) * 1.6) calc(var(--u) * 1.4);
  gap: calc(var(--u) * 0.75);
  border-radius: calc(var(--u) * 1.6);
}
#cpCopa {
  font-size: calc(var(--u) * 1.35);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lima);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body #cpNome {
  font-size: calc(var(--u) * 3.1);
  border-left: 0;
  padding-left: 0;
  line-height: 1;
  margin-top: calc(var(--u) * -0.2);
}
body #cpMeio {
  grid-template-columns: calc(var(--u) * 13.5) 1fr;
  gap: calc(var(--u) * 1.1);
  padding: calc(var(--u) * 0.8);
  border-radius: calc(var(--u) * 1);
  background: #06141bcc;
  border: calc(var(--u) * 0.15) solid #24505c;
}
body #miniPista {
  width: calc(var(--u) * 13.5);
  height: calc(var(--u) * 8.6);
  background: radial-gradient(circle at 50% 40%, #123a48, #07161d);
  border: 0;
  border-radius: calc(var(--u) * 0.7);
}
body #cpInfo {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 0.5);
  font-size: calc(var(--u) * 1.4);
  line-height: 1;
  white-space: nowrap;
  min-width: 0;
}
#cpInfo span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--u) * 0.6);
  padding: calc(var(--u) * 0.55) calc(var(--u) * 0.8);
  border-radius: calc(var(--u) * 0.5);
  background: #ffffff0d;
  color: #b9d2d8;
}
#cpInfo span b {
  color: #fff;
  font-size: calc(var(--u) * 1.6);
}
#cpInfo span.rec b {
  color: var(--lima);
}
body #cpLinha {
  padding: 0 calc(var(--u) * 0.3);
}
body #cpEst {
  display: flex;
  gap: calc(var(--u) * 0.35);
  font-size: 0;
  letter-spacing: 0;
  text-shadow: none;
}
#cpEst img {
  width: calc(var(--u) * 3);
  height: calc(var(--u) * 3);
}
#cpEst img.off {
  filter: grayscale(1) brightness(0.45);
}
body #cpTab {
  font-size: calc(var(--u) * 1.4);
  color: #b9d2d8;
}
body #cpTab b {
  color: #ffd23f;
  font-size: calc(var(--u) * 1.8);
}
#cpOpcoes {
  display: grid;
  grid-template-columns: 1.12fr 1.05fr 1fr;
  gap: calc(var(--u) * 0.5);
}
.segs.ciclo {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(var(--u) * 0.35);
  height: calc(var(--u) * 6);
  min-width: 0;
  padding: 0 calc(var(--u) * 0.7);
  border-radius: calc(var(--u) * 0.8);
  border: calc(var(--u) * 0.18) solid #2f5f6c;
  background: linear-gradient(180deg, #123543, #0a202b);
  text-transform: uppercase;
  position: relative;
}
.segs.ciclo > span {
  display: block;
  font-size: calc(var(--u) * 1.05);
  letter-spacing: 0.1em;
  color: #8fb4bd;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.segs.ciclo div {
  display: block;
  border: 0;
  background: none;
  border-radius: 0;
}
.segs.ciclo div i {
  display: none;
  font-style: inherit;
}
.segs.ciclo div i.on {
  display: block;
  color: #fff;
  font-size: calc(var(--u) * 1.5);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: calc(var(--u) * 1);
}
.segs.ciclo::after {
  content: '';
  position: absolute;
  right: calc(var(--u) * 0.75);
  top: 50%;
  width: calc(var(--u) * 0.7);
  height: calc(var(--u) * 0.7);
  border-right: calc(var(--u) * 0.25) solid var(--lima);
  border-bottom: calc(var(--u) * 0.25) solid var(--lima);
  transform: translateY(-50%) rotate(-45deg);
}
.segs.ciclo:active {
  filter: brightness(0.88);
}
.segs.ciclo:focus-visible {
  outline: calc(var(--u) * 0.3) solid var(--lima);
  outline-offset: calc(var(--u) * 0.2);
}
body #cpCarro {
  height: calc(var(--u) * 6);
  border-color: #2f5f6c;
  background: linear-gradient(180deg, #123543, #0a202b);
  padding: 0 calc(var(--u) * 1) 0 calc(var(--u) * 0.4);
}
body #cpCarro #cpCarroImg {
  width: calc(var(--u) * 9);
  height: calc(var(--u) * 5);
}
body #cpCarro #cpCarroNome {
  font-size: calc(var(--u) * 1.75);
}
body #btCorrer {
  height: calc(var(--u) * 7.2);
  font-size: calc(var(--u) * 3.6);
  margin-top: auto;
}
/* cup tabs: one strip, the selected one with a light background and green underline */
body #abas {
  right: calc(var(--sr) + calc(var(--u) * 38));
  top: calc(var(--u) * 8);
  gap: 0;
  padding: calc(var(--u) * 0.4);
  border-radius: calc(var(--u) * 1.1);
  background: #07141ecc;
  border: calc(var(--u) * 0.18) solid #2f5f6c;
  box-shadow: 0 calc(var(--u) * 0.5) calc(var(--u) * 1.2) #0008;
}
body #abas .b3 {
  height: calc(var(--u) * 5.2);
  border: 0;
  border-radius: calc(var(--u) * 0.8);
  background: none;
  box-shadow: none;
  color: #b9d2d8;
  font-size: calc(var(--u) * 1.6);
}
body #abas .b3.sel {
  background: linear-gradient(180deg, #2c6a3a, #1a4226);
  color: #fff;
  box-shadow: inset 0 calc(var(--u) * -0.35) 0 var(--lima);
}
/* stops: drawn medallion (grey locked, blue unlocked, gold with podium), number on top; the selected one is larger and other cups recede */
body .no {
  width: calc(var(--u) * 6.4);
  height: calc(var(--u) * 6.4);
  border: 0;
  border-radius: 50%;
  background: url(../assets/ui-no-aberta.webp) center/contain no-repeat;
  box-shadow: none;
  filter: drop-shadow(0 calc(var(--u) * 0.4) calc(var(--u) * 0.5) #000b);
  font-size: calc(var(--u) * 2.7);
  text-shadow: 0 calc(var(--u) * 0.2) 0 #000a;
  transition: scale 0.15s;
}
body .no.tranc {
  background: url(../assets/ui-no-tranc.webp) center/contain no-repeat;
  color: #aab6bb;
}
body .no.feita {
  background: url(../assets/ui-no-feita.webp) center/contain no-repeat;
}
body .no.fora {
  scale: 0.82;
  filter: drop-shadow(0 calc(var(--u) * 0.4) calc(var(--u) * 0.5) #000b) saturate(0.7) brightness(0.85);
}
body .no.sel {
  scale: 1.18;
  box-shadow: none;
  filter: drop-shadow(0 0 calc(var(--u) * 0.9) var(--lima))
    drop-shadow(0 calc(var(--u) * 0.4) calc(var(--u) * 0.5) #000b);
  z-index: 2;
}
body .no small {
  top: 88%;
  font-size: calc(var(--u) * 1.7);
}
body .no .cad {
  right: -10%;
  bottom: -8%;
  width: calc(var(--u) * 2.6);
  height: calc(var(--u) * 2.6);
}
.no.sel::after {
  content: '';
  position: absolute;
  inset: calc(var(--u) * -0.7);
  border-radius: 50%;
  border: calc(var(--u) * 0.3) solid var(--lima);
  opacity: 0.9;
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.calmo) .no.sel::after {
    animation: pulsaNo 1.4s ease-in-out infinite;
  }
}
@keyframes pulsaNo {
  50% {
    inset: calc(var(--u) * -1.3);
    opacity: 0.25;
  }
}
/* finish replay: corner badge and black cinema bars; the HUD hides */
#reprise {
  display: none;
  position: fixed;
  left: calc(env(safe-area-inset-left, 0px) + var(--u) * 3);
  top: calc(var(--u) * 5.6);
  z-index: 5;
  font-size: calc(var(--u) * 3);
  color: #fff;
  letter-spacing: 0.12em;
  pointer-events: none;
}
#reprise::before {
  content: '';
  display: inline-block;
  width: calc(var(--u) * 1.6);
  height: calc(var(--u) * 1.6);
  margin-right: calc(var(--u) * 1);
  border-radius: 50%;
  background: #ff3b30;
  animation: piscaRep 1s steps(2) infinite;
}
@keyframes piscaRep {
  50% {
    opacity: 0.2;
  }
}
body.reprise #reprise {
  display: block;
}
body.reprise #hud,
body.reprise .ctl,
body.reprise #btPausa,
body.reprise #btCam,
body.reprise #btVolta {
  opacity: 0 !important;
}
body.reprise::before,
body.reprise::after {
  content: '';
  position: fixed;
  left: 0;
  right: 0;
  height: calc(var(--u) * 4.2);
  background: #000;
  z-index: 4;
  pointer-events: none;
}
body.reprise::before {
  top: 0;
}
body.reprise::after {
  bottom: 0;
}
/* ===== trophies as landscape cards: large cup on the left, larger text on the right, full-width progress bar ===== */
body .tf {
  display: grid;
  grid-template-columns: calc(var(--u) * 5.2) 1fr;
  grid-template-rows: auto 1fr auto;
  column-gap: calc(var(--u) * 1.1);
  row-gap: calc(var(--u) * 0.2);
  align-items: center;
  justify-items: start;
  text-align: left;
  padding: calc(var(--u) * 0.9) calc(var(--u) * 1.1);
}
body .tf::before {
  grid-row: 1/4;
  width: calc(var(--u) * 5.2);
  height: calc(var(--u) * 5.2);
  opacity: 0.38;
}
body .tf.ok::before {
  scale: 1.1;
  opacity: 1;
}
body .tf b {
  font-size: calc(var(--u) * 1.75);
  line-height: 1.05;
}
body .tf span {
  display: block;
  min-height: 0;
  font-size: calc(var(--u) * 1.45);
  line-height: 1.2;
  color: #cfe0e4;
  align-self: start;
}
body .tf i.pg {
  width: 100%;
  gap: calc(var(--u) * 0.7);
  font-size: calc(var(--u) * 1.45);
}
body .tf i.pg u {
  flex: 1;
  width: auto;
  height: calc(var(--u) * 1.1);
}
/* price in the garage row: locked cars show their cost instead of the name */
.cc em {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--u) * 0.6);
  font-style: inherit;
  font-size: calc(var(--u) * 1.5);
  color: #ffd23f;
  text-align: center;
  white-space: nowrap;
}
.cc em::before {
  content: '';
  display: inline-block;
  width: calc(var(--u) * 1.5);
  height: calc(var(--u) * 1.5);
  margin-right: calc(var(--u) * 0.4);
  vertical-align: -10%;
  background: url(../assets/ui-moeda.webp) center/contain no-repeat;
}
.cc.tranc em {
  display: block;
}
.cc.tranc b {
  display: none;
}
/* settings and pause: panel with a title band and a bit more breathing room */
body #pausa .titulo {
  padding-bottom: calc(var(--u) * 1);
  border-bottom: calc(var(--u) * 0.2) solid #ffffff22;
  width: 100%;
  text-align: center;
}
/* cup ceremony: large cup with rotating rays, cup name and reward; a tap closes it */
#cerim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 0.8);
  background: radial-gradient(circle at 50% 45%, #1d4a3af2, #050d14fa 70%);
  cursor: pointer;
  text-transform: uppercase;
  text-align: center;
}
#cerim.on {
  display: flex;
}
#ceTaca {
  position: relative;
  width: calc(var(--u) * 20);
  height: calc(var(--u) * 20);
  display: grid;
  place-items: center;
}
#ceTaca::before {
  content: '';
  position: absolute;
  inset: calc(var(--u) * -6);
  border-radius: 50%;
  background: repeating-conic-gradient(#ffd23f33 0 10deg, #0000 0 20deg);
  -webkit-mask: radial-gradient(circle, #000 20%, #0000 68%);
  mask: radial-gradient(circle, #000 20%, #0000 68%);
}
#ceTaca img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 calc(var(--u) * 0.8) calc(var(--u) * 1.2) #000a);
}
#ceTit {
  font-size: calc(var(--u) * 5);
  color: #ffab2e;
  line-height: 1;
  text-shadow: 0 calc(var(--u) * 0.35) 0 #5a2a04;
}
#ceNome {
  font-size: calc(var(--u) * 3);
  color: #fff;
  letter-spacing: 0.1em;
}
#cePremioCx {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 0.8);
  font-size: calc(var(--u) * 3.4);
  color: #ffd23f;
}
#cePremioCx img {
  width: calc(var(--u) * 3.6);
  height: calc(var(--u) * 3.6);
}
#ceToque {
  margin-top: calc(var(--u) * 0.6);
  font-size: calc(var(--u) * 1.6);
  letter-spacing: 0.2em;
  color: #b9d2d8;
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.calmo) #cerim.on #ceTaca::before {
    animation: giraRaio 14s linear infinite;
  }
  body:not(.calmo) #cerim.on #ceTaca img {
    animation: entraTaca 0.5s cubic-bezier(0.2, 1.5, 0.4, 1) both;
  }
  body:not(.calmo) #cerim.on #ceToque {
    animation: piscaRep 1.6s steps(2) infinite;
  }
}
@keyframes giraRaio {
  to {
    rotate: 360deg;
  }
}
@keyframes entraTaca {
  from {
    scale: 0.3;
    opacity: 0;
  }
}
/* daily challenge: card in the corner of the main menu */
#desafio {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  position: absolute;
  right: calc(var(--sr) + calc(var(--u) * 3));
  bottom: calc(var(--u) * 8);
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1);
  height: calc(var(--u) * 6.6);
  padding: 0 calc(var(--u) * 1.4) 0 calc(var(--u) * 0.9);
  border-radius: calc(var(--u) * 1.1);
  border: calc(var(--u) * 0.25) solid #ffab2e;
  background: linear-gradient(180deg, #123543f4, #0a1f2af6);
  box-shadow:
    0 calc(var(--u) * 0.6) 0 #04101a,
    0 calc(var(--u) * 1) calc(var(--u) * 1.4) #0008;
  text-transform: uppercase;
  white-space: nowrap;
}
#desafio img {
  width: calc(var(--u) * 4.4);
  height: calc(var(--u) * 4.4);
}
#desafio span {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 0.3);
}
#desafio small {
  font-size: calc(var(--u) * 1.2);
  letter-spacing: 0.14em;
  color: #ffab2e;
  line-height: 1;
}
#desafio b {
  font-size: calc(var(--u) * 1.9);
  line-height: 1;
}
#desafio em {
  font-style: inherit;
  font-size: calc(var(--u) * 2.2);
  color: #ffd23f;
  margin-left: calc(var(--u) * 0.6);
}
#desafio.ok {
  border-color: var(--lima);
}
#desafio.ok em {
  color: var(--lima);
}
#desafio:active {
  transform: translateY(calc(var(--u) * 0.3));
}
/* smaller stop number (fits inside the medallion) and wing choice without overflowing text */
body .no {
  font-size: calc(var(--u) * 1.95);
  padding-bottom: calc(var(--u) * 0.15);
}
body .no.sel {
  font-size: calc(var(--u) * 1.95);
}
/* ===== long translations and polish =====
     Text that does not fit: hud.js (encaixa) shrinks it down to 62%; elements that may wrap get the .quebra class (two lines max). */
.quebra {
  white-space: normal !important;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.05 !important;
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: clip !important;
}
/* garage: the bar label does not overlap the pips; "WORKSHOP 3 / 9" stays on one line */
.barra > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: calc(var(--u) * 0.6);
}
#txTunar {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 0.3em;
  white-space: nowrap;
}
#txTunar b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: inherit;
}
/* map: tabs and selected car; the car name takes priority over "change" */
#abas .b3 {
  overflow: hidden;
}
body #cpCarro #cpCarroNome {
  white-space: nowrap;
  max-height: none;
}
body #cpCarro #cpCarroTroca {
  flex: none;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* stop touch area larger than the drawing (the number keeps its size) */
.no::before {
  content: '';
  position: absolute;
  inset: calc(var(--u) * -0.8);
  border-radius: 50%;
}
@media (max-height: 520px) {
  body #abas .b3 {
    height: calc(var(--u) * 6);
  }
}
/* track card: everything fits inside it in any language (long languages like Japanese push the RACE button out otherwise). The layout box is what shrinks;
     the button never shrinks. Smaller gaps and shorter info rows. */
body #cartaoPista {
  gap: calc(var(--u) * 0.55);
  padding-bottom: calc(var(--u) * 1.2);
}
body #cartaoPista > #cpMeio {
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: calc(var(--u) * 0.6);
}
body #miniPista {
  height: calc(var(--u) * 7.4);
  max-height: 100%;
}
body #cpInfo {
  gap: calc(var(--u) * 0.35);
}
body #cpInfo span {
  padding: calc(var(--u) * 0.4) calc(var(--u) * 0.8);
  line-height: 1.05;
}
body #cartaoPista > #btCorrer {
  flex: none;
  height: calc(var(--u) * 6.6);
}
/* results: the row label (cup, mission) never disappears because of the value; the position fits in the medal */
.fl {
  grid-template-columns: calc(var(--u) * 3) minmax(34%, 1fr) minmax(0, auto);
}
.fl b {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
#medalhaN {
  white-space: nowrap;
  max-width: 74%;
  overflow: visible;
}
#fim.repete #fimTitulo {
  color: #e6f0f3;
} /* no podium: the title is white; win and podium stay orange */
/* trophies: the title does not run under the earned badge */
body .tf.ok b {
  padding-right: calc(var(--u) * 2.8);
}
/* settings: "Quality" may wrap instead of being cut */
#qRot {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* menu: daily challenge with a max width; keyboard hint on a dark band; tagline band aligned with the card */
#desafio {
  max-width: calc(var(--u) * 50);
}
#desafio span {
  min-width: 0;
}
#desafio b,
#desafio small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#desafio small {
  font-size: calc(var(--u) * 1.35);
}
#lema {
  right: calc(var(--sr) + calc(var(--u) * 3));
  max-width: calc(var(--u) * 50);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#mBotoes {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
#mBotoes .b3 {
  min-width: 0;
  overflow: hidden;
} /* menu buttons do not grow with the text: the text shrinks */
#ajuda {
  box-sizing: border-box;
  max-width: calc(var(--u) * 40);
  padding: calc(var(--u) * 0.7) calc(var(--u) * 1.2);
  border-radius: calc(var(--u) * 0.8);
  background: #07141ecc;
  opacity: 1;
  text-wrap: balance;
}
/* replay: same dark HUD plate, with the tap-to-skip hint */
#reprise {
  padding: calc(var(--u) * 0.9) calc(var(--u) * 3.2) calc(var(--u) * 0.9) calc(var(--u) * 1.6);
  background: linear-gradient(90deg, #07141ef0, #07141eb0);
  border-left: calc(var(--u) * 0.5) solid #ff3b30;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--u) * 1.6) 100%, 0 100%);
}
#reprise::after {
  content: attr(data-pular);
  display: block;
  margin-top: calc(var(--u) * 0.4);
  font-size: calc(var(--u) * 1.6);
  letter-spacing: 0.06em;
  color: #dfeef2;
}
body.calmo #reprise::before {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  #reprise::before {
    animation: none;
  }
}
/* ceremony: opaque background (results hidden behind) and "continue" as the orange main button, pulsing slowly */
#cerim {
  background: radial-gradient(circle at 50% 45%, #1d4a3a, #050d14 70%);
}
#ceToque {
  margin-top: calc(var(--u) * 1.8);
  padding: calc(var(--u) * 1) calc(var(--u) * 3.4);
  border-radius: calc(var(--u) * 3);
  border: 0;
  background: linear-gradient(180deg, #ffc14a, #ff8a1e);
  box-shadow: 0 calc(var(--u) * 0.45) 0 #a8480a;
  font-size: calc(var(--u) * 2.1);
  color: #1c1204;
  letter-spacing: 0.12em;
  max-width: 80vw;
}
@keyframes ceRespira {
  50% {
    opacity: 0.6;
  }
}
@media (prefers-reduced-motion: no-preference) {
  body:not(.calmo) #cerim.on #ceToque {
    animation: ceRespira 1.8s ease-in-out 0.9s infinite;
  }
}
#ceTit,
#ceNome {
  max-width: 92vw;
  white-space: nowrap;
}
/* workshop (Pro): the wing label column is sized to the label; the three options take the rest of the row */
body .upLinha.asa {
  grid-template-columns: auto minmax(0, 1fr) 0;
}
/* very short screens (740x360): --u is 6.8 px and 6u buttons would be 41 px; the finger minimum is 44 px */
@media (max-height: 380px) {
  .b3,
  #btTunar,
  .segs.ciclo,
  body #cpCarro,
  .upLinha .segs button {
    min-height: 44px;
  }
  body #cartaoPista {
    gap: calc(var(--u) * 0.4);
  }
  body #miniPista {
    height: calc(var(--u) * 6.4);
  }
}
.upLinha.asa .segs button {
  font-size: calc(var(--u) * 1.5);
  padding: 0 calc(var(--u) * 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
/* language: a full row below the toggles; each tap cycles to the next language (the page reloads with the new texts) */
#chIdioma {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: calc(var(--u) * 1);
}
#chIdioma b {
  color: var(--lima);
  font-size: calc(var(--u) * 1.9);
}
/* readability and consistency pass */
/* frame rate is a diagnostic number, not something players need to read */
#qFps {
  display: none;
}
/* trophy description in the game font (progress bars stay aligned at the bottom of every card) */
body .tf span {
  font-family: inherit;
  font-style: italic;
  font-weight: 700;
  color: #c9dbe0;
}
/* the garage panel already names the car: no floating title over the door */
#gNome {
  display: none;
}
/* inactive cup tabs readable */
#abas .b3:not(.sel) {
  color: #e2edf1;
}
/* controls hint: each key/action pair stays on one line */
#ajuda span {
  display: inline-block;
  white-space: nowrap;
  margin-right: calc(var(--u) * 1.2);
}
/* empty upgrade slots visible against the dark panel */
.upPips i:not(.on) {
  box-shadow: inset 0 0 0 calc(var(--u) * 0.15) #ffffff80;
}
/* while a race warning is on screen, the slipstream label moves below it instead of overlapping */
#aviso.on ~ #vacuo {
  translate: -50% calc(var(--u) * 4.2);
  transition:
    opacity 0.2s,
    translate 0.2s;
}
/* language dropdown (Settings): native select styled like the toggles, value in lime */
#selIdioma {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  font-size: calc(var(--u) * 1.9);
  color: var(--lima);
  text-transform: uppercase;
  background: #07141e
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c6f432' stroke-width='2'/%3E%3C/svg%3E")
    no-repeat right calc(var(--u) * 1) center/calc(var(--u) * 1.4) auto;
  border: calc(var(--u) * 0.15) solid #ffffff40;
  border-radius: calc(var(--u) * 0.6);
  padding: calc(var(--u) * 0.4) calc(var(--u) * 3.4) calc(var(--u) * 0.4) calc(var(--u) * 1.2);
  cursor: pointer;
}
#selIdioma:focus-visible {
  outline: calc(var(--u) * 0.25) solid var(--lima);
}
#selIdioma option {
  background: #0e1a24;
  color: #fff;
  font-style: normal;
  text-transform: none;
}
/* touch steering: the whole lower-left area takes the finger; the stick (#base) appears where the finger lands, then returns to its spot */
body.toque #dir {
  left: 0;
  bottom: 0;
  width: 46vw;
  height: 62vh;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
#base {
  position: absolute;
  left: calc(env(safe-area-inset-left) + var(--u) * 3);
  bottom: calc(env(safe-area-inset-bottom) + var(--u) * 3.5);
  width: calc(var(--u) * 28);
  height: calc(var(--u) * 11);
  border-radius: calc(var(--u) * 5.5);
  background: #0a102050;
  border: calc(var(--u) * 0.16) solid #ffffff90;
  opacity: 0.75;
  transition: opacity 0.12s;
}
#dir.pega #base {
  opacity: 1;
}
/* touch pedals: drift is automatic (brake while turning), so no handbrake button; big gas, smaller brake beside it, nitro next */
body.toque #mao {
  display: none !important;
}
body.toque #gas {
  right: calc(env(safe-area-inset-right) + var(--u) * 2.5);
  bottom: calc(env(safe-area-inset-bottom) + var(--u) * 2.5);
  width: calc(var(--u) * 14);
  height: calc(var(--u) * 14);
}
body.toque #freio {
  right: calc(env(safe-area-inset-right) + var(--u) * 18);
  bottom: calc(env(safe-area-inset-bottom) + var(--u) * 2.5);
  width: calc(var(--u) * 10);
  height: calc(var(--u) * 10);
}
body.toque #nitro {
  right: calc(env(safe-area-inset-right) + var(--u) * 30);
  bottom: calc(env(safe-area-inset-bottom) + var(--u) * 2.5);
}
body.toque.autogas #nitro {
  right: calc(env(safe-area-inset-right) + var(--u) * 15);
}
body.toque #taco {
  bottom: calc(env(safe-area-inset-bottom) + var(--u) * 18);
}
/* start countdown: tight line box, sized by screen height too (short phone screens), centered lower so the zoom-in never leaves the screen */
#conta {
  line-height: 1;
  font-size: min(calc(var(--u) * 13), 24vh);
  top: 50%;
}
/* iPhone: long-press on the game must not select text or open the magnifier (loupe) */
*,
*::before,
*::after {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input,
select,
textarea {
  -webkit-user-select: auto;
  user-select: auto;
}
/* best lap under the timer: white with a light dark outline, readable on a blue sky */
#tempo small {
  color: #fff;
  -webkit-text-stroke: calc(var(--u) * 0.12) #0b1020;
  paint-order: stroke fill;
  text-shadow: 0 calc(var(--u) * 0.15) calc(var(--u) * 0.35) #000a;
}
/* touch steering with arrows (default): two big glass buttons at the bottom left; the touch area is still the whole lower-left zone of #dir */
#setas {
  display: none;
  position: absolute;
  left: calc(env(safe-area-inset-left) + var(--u) * 2.5);
  bottom: calc(env(safe-area-inset-bottom) + var(--u) * 2.5);
  gap: calc(var(--u) * 2.2);
  pointer-events: none;
}
body.volSetas #setas {
  display: flex;
}
body.volSetas #base {
  display: none;
}
#setas i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(var(--u) * 11);
  height: calc(var(--u) * 11);
  border-radius: calc(var(--u) * 2.6);
  background: #0a102050;
  border: calc(var(--u) * 0.16) solid #ffffff70;
  opacity: 0.8;
  transition:
    transform 0.06s,
    background 0.06s,
    opacity 0.06s;
}
#setas i {
  position: relative;
}
#setas i svg {
  position: static;
  translate: none;
  width: 44%;
  height: 44%;
  opacity: 0.95;
}
#setas i.on {
  transform: scale(0.94);
  background: #ffffff38;
  border-color: #fff;
  opacity: 1;
}
/* Settings: steering choice shown as a value, like the language */
#chTilt {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#vVol {
  color: var(--lima);
  font-size: calc(var(--u) * 1.8);
  text-transform: uppercase;
  white-space: nowrap;
}
/* iPhone: no grey tap flash and no double-tap zoom anywhere in the game */
* {
  -webkit-tap-highlight-color: transparent;
}
html,
body {
  touch-action: manipulation;
}
body.correndo #c {
  touch-action: none;
}
/* Settings: language and "Keyboard & controller" side by side in the last row */
#pLinha {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: calc(var(--u) * 1.2);
  margin-top: calc(var(--u) * 1);
}
#pLinha #chIdioma {
  margin-top: 0;
  width: auto;
}
#chCmd {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#chCmd svg {
  width: calc(var(--u) * 2.4);
  height: calc(var(--u) * 2.4);
  color: var(--lima);
  flex: none;
}
/* Keyboard & controller table (shown instead of the toggles) */
#pCmd {
  display: none;
}
body.cmd #pCmd {
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 1);
}
body.cmd #pChaves,
body.cmd #pLinha {
  display: none;
}
#cmdTabela {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: calc(var(--u) * 0.7) calc(var(--u) * 0.8);
  align-items: center;
}
#cmdTabela > :nth-child(6n + 4) {
  margin-left: calc(var(--u) * 1.6);
}
#cmdTabela b {
  min-width: 0;
  font-size: calc(var(--u) * 1.3);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--lima);
  text-align: center;
  overflow-wrap: anywhere;
  line-height: 1.1;
}
#cmdTabela span {
  min-width: 0;
  font-size: calc(var(--u) * 1.45);
  line-height: 1.1;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.cmdT {
  height: calc(var(--u) * 4.6);
  min-width: 0;
  padding: 0 calc(var(--u) * 0.5);
  border-radius: calc(var(--u) * 0.7);
  border: calc(var(--u) * 0.15) solid #ffffff40;
  background: #07141e;
  color: #fff;
  font: inherit;
  font-size: calc(var(--u) * 1.65);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmdT:hover,
.cmdT:focus-visible {
  border-color: var(--lima);
}
.cmdT.espera {
  border-color: var(--lima);
  color: var(--lima);
  animation: cmdPisca 0.8s ease-in-out infinite alternate;
}
@keyframes cmdPisca {
  to {
    background: #1c3a1f;
  }
}
#cmdPes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--u) * 1.2);
}
#cmdInfo {
  font-size: calc(var(--u) * 1.35);
  color: #b8cbd2;
  line-height: 1.3;
  font-style: normal;
}
#btCmdPadrao {
  flex: none;
  height: calc(var(--u) * 4.6);
  padding: 0 calc(var(--u) * 2);
  font-size: calc(var(--u) * 1.6);
}
/* End of css/acabamento.css (complete file). */
