* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  overflow: hidden;
  background: #e6d8bc;
  color: #303f38;
  font: 13px system-ui;
}
canvas {
  display: block;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #a7ad95;
  border-radius: 8px;
  background: #faf6e9;
  color: #34483a;
  padding: 12px 16px;
}
button:hover {
  background: #e1e8ce;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
/* Until game.js has loaded (see index.html). */
button[data-loading] {
  color: transparent;
  position: relative;
}
button[data-loading]::after {
  content: "Loading the workshop…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff8df;
}
button[data-loading]:not(.primary)::after {
  color: #34483a;
}
button.primary {
  background: #344f40;
  color: #fff8df;
  border: 0;
}
small {
  font-size: 9px;
  letter-spacing: 2px;
}
h1 {
  font: 90px/0.95 Georgia;
  margin: 20px 0;
  letter-spacing: -4px;
}
h1 em {
  color: #b56642;
  font-weight: 400;
}
h2 {
  font: 30px Georgia;
  margin: 10px 0 20px;
}
p {
  line-height: 1.8;
}
#lobby {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 30px;
  padding: 30px;
  background: linear-gradient(90deg, #f3e8d5ee, #e3dcc7a0);
}
.brand {
  width: 420px;
}
.brand p {
  color: #6a7361;
  font-size: 16px;
}
.card {
  background: #fffaedee;
  padding: 30px;
  border: 1px solid #fff9;
  border-radius: 18px;
  box-shadow: 0 20px 80px #353d3020;
  width: 420px;
  backdrop-filter: blur(15px);
}
label {
  display: block;
  font-size: 11px;
  color: #64705f;
  margin: 16px 0;
}
input,
select {
  width: 100%;
  display: block;
  margin-top: 7px;
  padding: 11px;
  background: #f5f1e4;
  border: 1px solid #d3d7c2;
  border-radius: 6px;
  color: #354737;
}
.fields {
  display: flex;
  gap: 12px;
}
.fields label {
  flex: 1;
}
#create-actions {
  display: grid;
  gap: 10px;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  width: auto;
  margin: 0;
}
/* ---- Room lobby: who's in, who hosts, teams, launch ---------------------- */
#room-panel {
  margin: -6px 0 18px;
  padding: 14px;
  background: #edf0e1;
  border: 1px solid #d8ddc7;
  border-radius: 12px;
}
.room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.room-head small {
  display: block;
  color: #849079;
}
.room-head b {
  font: 17px Georgia;
}
.pill {
  font-size: 10px;
  letter-spacing: 0.5px;
  color: #4d5e4b;
  background: #fffaed;
  border: 1px solid #d3d7c2;
  border-radius: 99px;
  padding: 4px 10px;
  white-space: nowrap;
}
#teams {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.team {
  --team: #849079;
  background: #fffaed;
  border: 1px solid #dfe2d0;
  border-top: 3px solid var(--team);
  border-radius: 8px;
  padding: 8px 8px 4px;
}
.team.solo {
  border-top-color: #b8bea6;
  grid-column: 1 / -1;
}
.team.mine {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--team) 40%, transparent);
}
.team header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #5d6a59;
  margin-bottom: 4px;
}
.team header button {
  padding: 3px 8px;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 99px;
  margin: 0;
}
.team ul,
#lobby-log {
  list-style: none;
  margin: 0;
  padding: 0;
}
.seat {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 2px;
  border-top: 1px solid #efefe2;
  min-height: 34px;
  flex-wrap: wrap;
}
.seat:first-child {
  border-top: 0;
}
.seat i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
  background: #c9ceb8;
}
.seat .who {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.seat small {
  flex-basis: 100%;
  padding-left: 17px;
  font-size: 10px;
  letter-spacing: 0;
  color: #8a9480;
  margin-top: -3px;
}
.seat.me {
  background: #f4efd9;
  border-radius: 6px;
}
.seat.bot .who {
  font-weight: 400;
  color: #7b8572;
}
.seat.planned i {
  background: none;
  border: 2px solid #b8bea6;
}
.seat.open i {
  background: none;
  border: 2px dashed #c4c9b2;
}
.seat.open .who {
  font-weight: 400;
  font-style: italic;
  color: #9aa290;
}
.badge {
  font-style: normal;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 4px;
  padding: 2px 5px;
}
.badge.host {
  background: #b56642;
  color: #fff8df;
}
.badge.host::before {
  content: "★ ";
}
.badge.you {
  background: #344f40;
  color: #fff8df;
}
#lobby-log {
  margin-top: 8px;
  font-size: 11px;
  color: #6f7a66;
}
#lobby-log li {
  padding: 1px 0;
  animation: log-in 0.4s ease-out;
}
#lobby-log li::before {
  content: "• ";
  color: #b56642;
}
@keyframes log-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.invite {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.invite input {
  margin: 0;
  font-size: 11px;
  padding: 9px;
  min-width: 0;
}
#room-panel .invite button {
  margin: 0;
  padding: 9px 12px;
  white-space: nowrap;
}
#host-bar {
  margin-top: 6px;
}
#launch-note {
  margin: 6px 0 2px;
  line-height: 1.5;
}
#launch {
  width: 100%;
}
#waiting {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #4d5e4b;
}
.pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #8e9f67;
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
    transform: scale(0.7);
  }
}
#join {
  width: 100%;
}
/* Everyone's countdown when the host launches. */
#countdown {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #2c3a32cc;
  color: #fff8df;
  backdrop-filter: blur(6px);
  text-align: center;
}
#countdown b {
  font: 160px/1.15 Georgia;
  margin-bottom: 6px;
}
#countdown.tick b {
  animation: count-pop 0.9s ease-out;
}
#countdown span {
  font-size: 14px;
  opacity: 0.85;
}
#countdown button {
  margin-top: 14px;
}
@keyframes count-pop {
  from {
    transform: scale(1.25);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
}
.fine {
  font-size: 10px;
  color: #849079;
}
#error {
  color: #b45336;
  font-size: 12px;
}
a {
  font-size: 10px;
  color: #6c7d69;
}
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#hud button {
  pointer-events: auto;
}
#hud header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  background: linear-gradient(#223b3270, transparent);
  color: #fff8de;
}
#hud header h2 {
  font-size: 23px;
  margin: 6px 0;
}
#clock {
  font: 32px Georgia;
}
header button {
  background: #fff8debb;
  padding: 7px 12px;
}
.panel {
  position: absolute;
  background: #fcf8e9e8;
  border: 1px solid #fff8;
  border-radius: 12px;
  padding: 16px;
  backdrop-filter: blur(8px);
}
#stats {
  left: 24px;
  top: 135px;
  width: 180px;
}
.bar {
  height: 6px;
  background: #d8dccb;
  margin: 8px 0 15px;
  border-radius: 6px;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: #75936a;
  transition: width 0.1s;
}
#boost {
  background: #c39846;
}
#score {
  font-size: 12px;
}
#board {
  right: 24px;
  top: 135px;
  width: 210px;
  font-size: 11px;
  line-height: 2;
}
.board-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.board-row.me {
  font-weight: bold;
  color: #ae6442;
}
#feed {
  position: absolute;
  right: 28px;
  top: 370px;
  color: #fff8e6;
  text-shadow: 0 1px 3px #0009;
  font-size: 11px;
  line-height: 1.8;
}
/* game.js moves the crosshair, markers and labels with `translate` (no
   layout work), measured from the top-left corner. */
#crosshair {
  position: absolute;
  left: 0;
  top: 0;
  translate: 50vw 45vh;
  transform: translate(-50%, -50%);
  font-size: 35px;
  color: #fff8dccc;
  text-shadow: 0 0 4px #36523b;
}
#notice {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font: 28px Georgia;
  color: #fff8db;
  text-shadow: 0 2px 8px #284338;
  width: 500px;
}
#weapons {
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  display: flex;
  gap: 18px;
  white-space: nowrap;
}
.weapon {
  opacity: 0.5;
  font-size: 11px;
}
.weapon.active {
  opacity: 1;
  color: #a5643e;
  font-weight: bold;
}
.weapon b {
  display: block;
  font-size: 16px;
  margin-bottom: 3px;
}
footer {
  position: absolute;
  bottom: 22px;
  left: 25px;
  right: 25px;
  color: #fff8dd;
  text-shadow: 0 1px 4px #283628;
  font-size: 11px;
}
footer span {
  float: right;
}
footer #controls-hint {
  float: none;
}
#results {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
}
#final-board {
  margin: 20px 0;
  font-size: 13px;
  line-height: 2;
}
@media (max-width: 800px) {
  h1 {
    font-size: 60px;
  }
  .brand {
    width: auto;
  }
  #lobby {
    padding: 20px;
  }
  .card {
    width: 350px;
    padding: 22px;
  }
  #stats {
    width: 130px;
    left: 12px;
  }
  #board {
    width: 160px;
    right: 12px;
  }
  #weapons {
    gap: 10px;
    padding: 12px;
  }
  footer span {
    display: none;
  }
}
@media (max-width: 600px) {
  .brand {
    display: none;
  }
  #board {
    top: 110px;
  }
  #stats {
    top: 110px;
  }
  #weapons {
    bottom: 65px;
  }
  .weapon {
    font-size: 9px;
  }
}

#crosshair.hit {
  color: #ffca61;
  transform: translate(-50%, -50%) scale(1.5);
  text-shadow: 0 0 12px #ffb94f;
}
#hit-confirm {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translateX(-50%);
  color: #ffe4a2;
  font-size: 10px;
  letter-spacing: 2px;
  text-shadow: 0 1px 4px #000;
}
.pilot-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -100%);
  pointer-events: none;
  width: 95px;
  background: #633c32ba;
  color: #fff3dc;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 10px;
  text-align: center;
}
.pilot-label i {
  display: block;
  height: 3px;
  background: #f6ad70;
  margin-top: 4px;
}
.pilot-label.friendly {
  background: #31584fba;
}
.pilot-label.friendly i {
  background: #93dfbb;
}
.damage-number {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  color: #ffe199;
  font: bold 24px system-ui;
  text-shadow: 0 2px 6px #5e3925;
}

#audio-controls {
  position: fixed;
  z-index: 40;
  top: 25px;
  right: 160px;
  display: flex;
  gap: 7px;
  align-items: center;
}
#audio-controls button {
  padding: 6px 9px;
  background: #fff8dee6;
  font-size: 10px;
}
#audio-controls input {
  width: 60px;
  margin: 0;
  padding: 0;
  accent-color: #698677;
}
@media (max-width: 700px) {
  #audio-controls {
    top: auto;
    bottom: 50px;
    right: 15px;
  }
  #audio-controls input {
    width: 45px;
  }
}

.card {
  max-height: calc(100vh - 40px);
  overflow: auto;
}
#plane-preview {
  margin: 0 0 18px;
  border: 1px solid #d8ddc7;
  background: radial-gradient(ellipse at center, #fbf7e8, #e4e7d6);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  padding-bottom: 10px;
}
#preview-canvas {
  height: 135px;
}
#preview-canvas canvas {
  width: 100% !important;
  height: 135px !important;
}
#preview-name {
  font: 18px Georgia;
  margin: 0 0 5px;
}
#plane-preview small {
  font-size: 8px;
  letter-spacing: 1.4px;
}

/* Settings in the lobby card */
.settings {
  margin: -6px 0 14px;
}
.settings .check {
  margin: 6px 0;
}

/* Game-feel overlays */
#speed-lines,
#vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
}
#speed-lines {
  background: repeating-conic-gradient(
    from 0deg at 50% 45%,
    #fff8e400 0deg 3deg,
    #fff8e455 3deg 3.6deg,
    #fff8e400 3.6deg 9deg
  );
  -webkit-mask-image: radial-gradient(ellipse at 50% 45%, transparent 35%, #000 80%);
  mask-image: radial-gradient(ellipse at 50% 45%, transparent 35%, #000 80%);
  transition: opacity 0.25s;
}
#speed-lines.on {
  animation: speed-spin 0.35s steps(3) infinite;
}
@keyframes speed-spin {
  to {
    transform: rotate(9deg);
  }
}
#vignette {
  background: radial-gradient(ellipse at center, transparent 45%, #9d2f1fcc 100%);
}
#vignette.low {
  animation: low-pulse 0.9s ease-in-out infinite;
}
@keyframes low-pulse {
  50% {
    opacity: 0.55;
  }
}
#banner {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  font: bold 26px Georgia;
  letter-spacing: 1px;
  color: #ffe4a2;
  text-shadow: 0 2px 10px #3d2414;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
  white-space: nowrap;
}
#banner.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
#banner small {
  display: block;
  text-align: center;
  font: 11px system-ui;
  letter-spacing: 2px;
  color: #fff3d6;
}
#stick {
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 2px solid #fff8dccc;
  box-shadow: 0 0 4px #36523b;
  pointer-events: none;
}
.pickup-label {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
  color: #e9ffd2;
  font: bold 14px system-ui;
  text-shadow: 0 1px 5px #24402c;
  white-space: nowrap;
}
.pilot-label.offscreen {
  width: auto;
  white-space: nowrap;
  padding: 3px 6px;
  transform: translate(-50%, -50%);
}
.pilot-label.offscreen i {
  display: none;
}
.weapon.empty-flash {
  animation: empty-flash 0.4s;
}
@keyframes empty-flash {
  50% {
    color: #c4492c;
    opacity: 1;
  }
}
.team-total {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  border-bottom: 1px solid #d8dccb;
  margin-bottom: 4px;
}
@media (prefers-reduced-motion: reduce) {
  #speed-lines.on,
  #vignette.low {
    animation: none;
  }
}

#plane-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  padding: 8px 16px 0;
  text-align: left;
}
#plane-stats .stat {
  font-size: 9px;
  letter-spacing: 1px;
  color: #64705f;
}
#plane-stats i {
  position: relative;
  display: block;
  height: 5px;
  margin-top: 3px;
  background: #dfe2d2;
  border-radius: 3px;
}
#plane-stats i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: #8f9a86;
}
#plane-stats b {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 3px;
}
#plane-stats b.up {
  background: #6f9a63;
}
#plane-stats b.down {
  background: #c27a55;
}

#bot-label .hint {
  color: #93a08a;
  font-size: 10px;
}
#bot-count {
  padding: 0;
  accent-color: #344f40;
  background: none;
  border: 0;
}

/* Aiming aids */
#crosshair.lock {
  color: #ff6a4d;
  text-shadow: 0 0 10px #ff3d1f;
}
#crosshair.lock::after {
  content: "LOCKED";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  font: bold 9px system-ui;
  letter-spacing: 2px;
  color: #ffd2c4;
}
#lead {
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid #ffe08a;
  transform: rotate(45deg);
  box-shadow: 0 0 6px #6b4a12;
  pointer-events: none;
}

/* ---------------------------------------------------------------------------
   Phones and tablets (body.touch, set by game.js only on touch-first
   devices). Nothing below applies on desktop. */
button {
  touch-action: manipulation;
}
/* Mobile browsers widen the page to fit anything poking past the edge
   (like off-screen pilot markers) instead of clipping it, which shifts the
   whole HUD. Pin the page to the screen and clip it. */
html.touch {
  overflow: hidden;
  height: 100%;
}
body.touch {
  position: fixed;
  inset: 0;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
/* 16px stops iOS zooming the page when a field is focused. */
body.touch input,
body.touch select {
  font-size: 16px;
}
body.touch #hud,
body.touch canvas {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
@media (max-height: 500px) {
  body.touch #lobby {
    padding: 10px calc(16px + env(safe-area-inset-right)) 10px
      calc(16px + env(safe-area-inset-left));
  }
  body.touch h1 {
    font-size: 46px;
    letter-spacing: -2px;
    margin: 10px 0;
  }
  body.touch .brand p {
    font-size: 13px;
  }
  body.touch .card {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    padding: 18px 20px;
  }
}

/* Phone flight HUD: just the controls. No panels, scoreboard, kill feed or
   weapon bar (the cycle button shows the weapon and its ammo); health and
   boost are two slim bars, the clock is small, and Sound / Leave are icons.
   The full scoreboard is on the results screen. */
body.touch header {
  padding: calc(8px + env(safe-area-inset-top))
    calc(14px + env(safe-area-inset-right)) 8px
    calc(14px + env(safe-area-inset-left));
  background: none;
  justify-content: center;
}
body.touch header > div:first-child {
  display: none;
}
body.touch #clock {
  font-size: 17px;
  opacity: 0.85;
  text-shadow: 0 1px 4px #0008;
}
body.touch #exit {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  right: calc(10px + env(safe-area-inset-right));
}
body.touch #exit,
body.touch #sound {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
  background: #1d2b2566;
  border: 1px solid #fff8de55;
  color: #fff8de;
}
body.touch #exit::before {
  content: "✕";
  font-size: 15px;
}
body.touch #sound::before {
  content: "♪";
  font-size: 16px;
}
body.touch #sound[aria-pressed="false"] {
  opacity: 0.45;
  text-decoration: line-through;
}
body.touch #stats {
  top: calc(12px + env(safe-area-inset-top));
  left: calc(14px + env(safe-area-inset-left));
  width: 110px;
  padding: 0;
  background: none;
  border: 0;
  backdrop-filter: none;
}
body.touch #stats small,
body.touch #score {
  display: none;
}
body.touch #stats .bar {
  height: 4px;
  margin: 0 0 5px;
  background: #ffffff40;
}
body.touch #board,
body.touch #feed,
body.touch #weapons,
body.touch footer {
  display: none;
}
body.touch #notice {
  width: min(500px, 80vw);
  font-size: 20px;
}
body.touch #banner {
  font-size: 18px;
  top: 20%;
}
/* Other pilots: a small name and health line, no box. */
body.touch .pilot-label {
  width: 56px;
  padding: 0;
  background: none;
  font-size: 9px;
  color: #fff3dccc;
  text-shadow: 0 1px 3px #000c;
}
body.touch .pilot-label i {
  height: 2px;
  margin-top: 2px;
}
body.touch .pilot-label.offscreen {
  padding: 0;
}
/* Phones have volume keys: keep only a small sound toggle, in a corner. */
body.touch #audio-controls {
  top: calc(6px + env(safe-area-inset-top));
  bottom: auto;
  right: calc(8px + env(safe-area-inset-right));
}
body.touch #volume,
body.touch #sound-test {
  display: none;
}
@media (orientation: portrait) {
  body.touch:not(.playing) #lobby {
    padding-top: calc(40px + env(safe-area-inset-top));
  }
}
body.touch.playing #audio-controls {
  top: calc(8px + env(safe-area-inset-top));
  right: calc(52px + env(safe-area-inset-right));
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

/* On-screen controls */
#touch-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#thumb-zone {
  position: absolute;
  left: 0;
  top: calc(50px + env(safe-area-inset-top));
  bottom: 0;
  width: 48%;
  pointer-events: auto;
  touch-action: none;
}
#thumb-stick {
  position: absolute;
  width: 112px;
  height: 112px;
  margin: -56px 0 0 -56px;
  border-radius: 50%;
  border: 2px solid #fff8dc99;
  background: #fff8dc22;
  box-shadow: 0 0 10px #2a3c3366;
  pointer-events: none;
}
#thumb-stick i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: #fff8dccc;
  box-shadow: 0 2px 8px #2a3c3388;
}
.t-btn {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #fff8dcaa;
  /* No backdrop blur: blurring the 3D view behind five buttons every frame
     cost a budget phone ~6 ms. A darker tint keeps them readable. */
  background: radial-gradient(circle, #1f2e2733, #1f2e2759);
  color: #fff8de;
  font: bold 10px system-ui;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 3px #1f2e27;
  box-shadow: 0 2px 12px #1f2e2744;
  pointer-events: auto;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  transition:
    transform 0.06s,
    background 0.06s;
}
.t-btn:hover {
  background: #fff8de30;
}
.t-btn.down {
  transform: scale(0.93);
  background: #fff8de70;
}
#t-fire {
  right: calc(20px + env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: 94px;
  height: 94px;
  font-size: 12px;
  background: #c4663f55;
  border-color: #ffc9a2;
}
#t-fire.down {
  background: #e0794bb0;
}
#t-boost {
  right: calc(128px + env(safe-area-inset-right));
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: 68px;
  height: 68px;
  background: #c3984655;
  border-color: #ffe0a0;
}
#t-boost.down {
  background: #d8a94cb0;
}
/* On the right thumb's arc, up and to the left of fire. */
#t-brake {
  right: calc(112px + env(safe-area-inset-right));
  bottom: calc(100px + env(safe-area-inset-bottom));
  width: 60px;
  height: 60px;
}
#t-cycle {
  left: calc(20px + env(safe-area-inset-left));
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: 112px;
  height: 56px;
  border-radius: 28px;
  font-size: 9px;
  letter-spacing: 1px;
  z-index: 1;
}
#t-cycle b {
  font-size: 17px;
  line-height: 1;
  margin-bottom: 2px;
}
#t-cycle.empty {
  border-color: #ff9d80;
}
#t-center {
  left: calc(42px + env(safe-area-inset-left));
  bottom: calc(96px + env(safe-area-inset-bottom));
  width: 66px;
  height: 66px;
  z-index: 1;
}
#t-center::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px dashed #fff8dc88;
}
#t-center i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffe2a8;
  box-shadow: 0 0 6px #ffcf7a;
  transition: transform 0.05s linear;
}
#t-center span {
  position: absolute;
  top: 100%;
  margin-top: 4px;
  font-size: 8px;
  white-space: nowrap;
}
#touch-ui:not(.tilt) #t-center i {
  display: none;
}

/* Portrait prompt */
#rotate-hint {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background: #1f2e27e6;
  color: #fff8de;
  text-align: center;
  font: 20px Georgia;
  pointer-events: auto;
}
#rotate-hint small {
  font: 10px system-ui;
  letter-spacing: 2px;
}
#rotate-hint .phone {
  width: 38px;
  height: 64px;
  border: 3px solid #fff8de;
  border-radius: 8px;
  animation: rotate-phone 1.8s ease-in-out infinite;
}
@keyframes rotate-phone {
  40%,
  100% {
    transform: rotate(-90deg);
  }
}
#rotate-hint button {
  background: transparent;
  color: #fff8de;
  border-color: #fff8de88;
}
