@import url("./assets/fonts/fonts.css");

:root {
  font-family: "DM Sans", Arial, sans-serif;
  color: #fff8e9;
  background: #142d39;
  --yellow: #ffdb55;
  --cream: #fff8e9;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  touch-action: none;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 5px;
}
button:disabled {
  opacity: 0.4;
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
button:active {
  transform: scale(0.97);
}
[hidden] {
  display: none !important;
}
#world {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  outline: 0;
  touch-action: none;
}
.cinema-grain,
.vignette,
.speed-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.vignette {
  background: radial-gradient(
    ellipse at 60% 42%,
    transparent 44%,
    #07152466 110%
  );
  z-index: 1;
}
.cinema-grain {
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23n)' opacity='.5' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
  z-index: 2;
}
.speed-lines {
  opacity: 0;
  background: repeating-conic-gradient(
    from 17deg at 50% 55%,
    transparent 0 8deg,
    #fff7cf45 8.1deg 8.3deg,
    transparent 8.4deg 16deg
  );
  mask-image: radial-gradient(ellipse, transparent 20%, #000 110%);
  -webkit-mask-image: radial-gradient(ellipse, transparent 20%, #000 110%);
  z-index: 3;
  transition: opacity 0.3s;
}
.speed-lines.active {
  opacity: 0.65;
}
.topbar {
  position: fixed;
  z-index: 12;
  left: 0;
  right: 0;
  top: 0;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.topbar > * {
  pointer-events: auto;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  filter: drop-shadow(0 2px 5px #102c3544);
}
.brand > b {
  font-size: 20px;
  letter-spacing: -0.7px;
}
.brand-divider {
  height: 23px;
  width: 1px;
  background: #fff8e94d;
  margin: 0 2px;
}
.brand small {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.4px;
  line-height: 1.6;
}
.flag {
  display: inline-block;
  width: 28px;
  height: 19px;
  background:
    linear-gradient(0deg, transparent 39%, #ffdc52 39% 59%, transparent 59%),
    linear-gradient(90deg, #247da3 30%, #ffdc52 30% 43%, #247da3 43%);
  border-radius: 2px;
  flex-shrink: 0;
}
.flag.small {
  width: 18px;
  height: 12px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.coordinates {
  font-size: 8px;
  letter-spacing: 1px;
  margin-right: 13px;
  text-shadow: 0 1px 3px #102c35;
}
.utility {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 8px;
  letter-spacing: 1px;
  font-weight: 700;
  background: #102b3d5e;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #fff8e92e;
  border-radius: 5px;
  padding: 10px 12px;
  min-height: 34px;
}
.utility b {
  color: var(--yellow);
  font-size: 8px;
}
.utility.square {
  font-size: 20px;
  line-height: 1;
  padding: 7px 10px;
}
.utility.sound {
  font-size: 19px;
  padding: 6px 12px;
}
.utility.sound span {
  font-size: 8px;
}
.panel {
  position: fixed;
  inset: 0;
  z-index: 6;
}
.main-menu {
  background: linear-gradient(90deg, #071b2ce6, #071b2c8a 31%, #071b2c05 72%);
  display: flex;
  align-items: center;
}
.menu-copy {
  margin: 5vh 0 0 7.5vw;
  max-width: 580px;
}
.eyebrow {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  display: flex;
  gap: 9px;
  align-items: center;
  color: #fff8e9bd;
}
.live-dot {
  width: 6px;
  height: 6px;
  display: inline-block;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 12px #ffdb5570;
}
.menu-copy h1 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: clamp(90px, 12.5vw, 185px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.75;
  letter-spacing: -4px;
  margin: 25px 0 15px;
  text-shadow: 0 5px 30px #061b2c20;
}
.menu-copy h1 > span {
  text-transform: none;
  font-size: 0.8em;
  letter-spacing: -5px;
}
.subtitle {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 25px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 5px;
  color: #0d2734;
  background: var(--yellow);
  display: inline-block;
  transform: rotate(-3deg);
  padding: 5px 15px 7px;
  box-shadow: 3px 4px #9c7a2e;
  margin: 7px 0 24px;
}
.menu-description {
  font-size: 12px;
  line-height: 1.9;
  color: #e2e8dfc9;
  margin: 0 0 24px;
}
.play-button {
  background: var(--yellow);
  color: #122a33;
  border: 1px solid #ffe98d;
  box-shadow:
    0 4px 0 #bc963c,
    0 9px 30px #081f3c25;
  border-radius: 4px;
  padding: 19px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 285px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
}
.play-button:hover {
  background: #ffe780;
}
.play-icon {
  font-size: 14px;
}
.button-arrow {
  font-size: 24px;
  margin-left: auto;
  line-height: 1;
}
.island-button {
  background: transparent;
  font-size: 8px;
  letter-spacing: 1.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 22px 0 17px;
  min-width: 285px;
  text-align: left;
}
.island-button > span {
  font-size: 18px;
  margin-left: auto;
  color: var(--yellow);
}
.menu-controls {
  margin-top: 19px;
  font-size: 7px;
  letter-spacing: 1px;
  color: #eef2e780;
}
.menu-controls .desktop-only {
  display: flex;
  gap: 8px;
  align-items: center;
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 23px;
  min-height: 22px;
  padding: 4px 6px;
  font-family: inherit;
  font-size: 8px;
  font-weight: 800;
  border: 1px solid #fff8e94d;
  border-bottom-width: 2px;
  border-radius: 3px;
  color: #fff8e9;
  background: #e5e7e311;
  letter-spacing: 0.8px;
}
.menu-location {
  position: absolute;
  bottom: 95px;
  right: 45px;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 300px;
}
.location-cross {
  font-size: 33px;
  font-weight: 400;
  color: var(--yellow);
  line-height: 1;
}
.menu-location p {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0 0 6px;
}
.menu-location small {
  font-size: 6px;
  letter-spacing: 1.2px;
  white-space: nowrap;
  color: #fff8e99e;
}
.location-line {
  height: 1px;
  flex: 1;
  background: #fff8e950;
}
.location-index {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 20px;
  letter-spacing: 1px;
}
.menu-footer {
  position: absolute;
  bottom: 29px;
  left: 36px;
  right: 36px;
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  letter-spacing: 1.3px;
  color: #fff8e97d;
}
.menu-footer b {
  font-size: 13px;
  letter-spacing: 2px;
  margin-left: 10px;
  color: #fff8e9;
}
.island-menu {
  background: #081d2cdb;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 110px 7vw 50px;
  overflow-y: auto;
  touch-action: pan-y;
}
.island-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 34px;
}
.island-heading h2 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 60px;
  line-height: 1;
  margin: 12px 0 10px;
  font-style: italic;
  letter-spacing: -1px;
}
.island-heading p:not(.eyebrow) {
  font-size: 12px;
  color: #aec1c7;
}
.close-button {
  width: 42px;
  height: 42px;
  background: #ffffff0c;
  border: 1px solid #fff8e92b;
  border-radius: 50%;
  font-size: 25px;
}
.island-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1200px;
}
.island-card {
  padding: 24px;
  text-align: left;
  border: 1px solid #fff8e929;
  background: linear-gradient(135deg, #456c6926, #132d3f88);
  border-radius: 7px;
  position: relative;
  overflow: hidden;
  min-height: 180px;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.island-card:hover {
  transform: translateY(-3px);
  border-color: var(--yellow);
}
.island-card .card-number {
  font-size: 9px;
  letter-spacing: 1px;
  color: #ffdb55;
}
.island-card h3 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-style: italic;
  font-size: 35px;
  margin: 25px 0 7px;
}
.island-card p {
  font-size: 10px;
  line-height: 1.8;
  color: #c4d2cd;
  max-width: 80%;
}
.island-card .card-arrow {
  position: absolute;
  right: 23px;
  bottom: 20px;
  font-size: 25px;
  color: var(--yellow);
}
.island-card .card-stars {
  position: absolute;
  top: 22px;
  right: 20px;
  color: var(--yellow);
  letter-spacing: 2px;
  font-size: 12px;
}
.island-footnote {
  font-size: 9px;
  color: #a0b5ba;
  margin-top: 25px;
  letter-spacing: 0.4px;
}
.hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.hud button,
.hud .joystick {
  pointer-events: auto;
}
.mission-card {
  position: absolute;
  top: 106px;
  left: 36px;
  max-width: 300px;
  text-shadow: 0 1px 8px #0c263766;
}
.mission-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1.3px;
}
.difficulty {
  color: #ccd9d6a3;
  margin-left: 7px;
  font-size: 6px;
}
.mission-card h2 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 39px;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  margin: 9px 0 9px;
  letter-spacing: -0.3px;
}
.mission-card > p {
  font-size: 9px;
  color: #eff4e3b8;
  margin: 0;
}
.mission-progress {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 17px;
  font-size: 14px;
}
.ring-symbol {
  font-size: 30px;
  line-height: 1;
  color: var(--yellow);
  font-weight: 800;
}
.mission-progress > b {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 23px;
  letter-spacing: 1px;
}
.mission-divider {
  width: 1px;
  height: 18px;
  background: #fff8e94d;
  margin: 0 5px;
}
.objective-line {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 8px;
  letter-spacing: 0.4px;
  margin-top: 13px;
  color: #ffdfa5;
}
.objective-line > span:first-child {
  font-size: 17px;
}
.top-center {
  position: absolute;
  left: 50%;
  top: 34px;
  transform: translateX(-50%);
  text-align: center;
  text-shadow: 0 2px 10px #102c3570;
}
.score-label {
  font-size: 7px;
  letter-spacing: 2px;
  color: #fff8e9a1;
}
.top-center strong {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 3px;
  display: block;
  color: var(--yellow);
  line-height: 1.2;
}
.timer {
  font-size: 9px;
  letter-spacing: 1.2px;
  margin-top: 2px;
}
.health-card {
  position: absolute;
  right: 36px;
  top: 106px;
  padding: 14px 16px 12px;
  background: #0b263c5c;
  border: 1px solid #fff8e929;
  border-radius: 6px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 190px;
}
.health-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 6px;
  letter-spacing: 1.4px;
  color: #e8eedbb0;
}
.health-top button {
  background: none;
  font-size: 15px;
  padding: 0 4px;
  line-height: 1;
  min-width: 22px;
  min-height: 22px;
}
.health-card #lives {
  font-size: 24px;
  letter-spacing: 3px;
  color: #ffda66;
  margin: 5px 0 9px;
  white-space: nowrap;
}
.health-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 6px;
  letter-spacing: 1.3px;
  color: #cbd8cbbd;
}
.health-bottom .flag {
  width: 14px;
  height: 10px;
}
.minimap-wrap {
  position: absolute;
  bottom: 35px;
  left: 36px;
  width: 165px;
  height: 165px;
  border-radius: 50%;
  border: 2px solid #fff8e975;
  background: #0a32446b;
  box-shadow: 0 5px 20px #0a233c30;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
#minimap {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}
.map-north {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 800;
}
.minimap-caption {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 6px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.minimap-caption i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--yellow);
}
.speedometer {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  width: 210px;
  text-shadow: 0 2px 8px #102c3550;
}
.speed-number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
}
.speed-number strong {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 60px;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
}
.speed-number > span {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #eff3e8b3;
}
.fuel-label {
  display: flex;
  justify-content: space-between;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin: 9px 0 6px;
}
.fuel-label > span:last-child {
  color: var(--yellow);
}
.fuel-track {
  height: 5px;
  border-radius: 3px;
  background: #183d535e;
  border: 1px solid #fff8e91a;
  overflow: hidden;
}
.fuel-track > span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--yellow);
  box-shadow: 0 0 10px #ffd94c88;
  transition: width 0.1s;
}
.speed-caption {
  text-align: center;
  font-size: 5px;
  letter-spacing: 1.7px;
  margin-top: 9px;
  color: #fff8e98c;
}
.desktop-actions {
  position: absolute;
  right: 36px;
  bottom: 35px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 24px;
  max-width: 240px;
}
.desktop-actions > div {
  display: flex;
  align-items: center;
  gap: 5px;
}
.desktop-actions > div:first-child {
  grid-column: 1/3;
}
.desktop-actions span {
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 1px;
  margin-left: 6px;
}
.desktop-actions small {
  font-size: 5px;
  letter-spacing: 0.8px;
  color: #fff8e999;
  grid-column: 1/3;
  line-height: 1.6;
}
.touch-only {
  display: none;
}
.toast {
  position: absolute;
  top: 26%;
  left: 50%;
  transform: translate(-50%, -10px);
  background: #092838c9;
  border: 1px solid #fff8e92b;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffdf87;
  border-radius: 5px;
  padding: 13px 23px;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 800;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.power-notice {
  position: absolute;
  top: 29px;
  left: 50%;
  transform: translateX(-50%);
  background: #f8d44be8;
  color: #142c37;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 9px 15px;
  border: 1px solid #ffeaa6;
  border-radius: 6px;
  box-shadow: 0 0 50px #ffda4b44;
}
.power-notice > span {
  font-size: 25px;
}
.power-notice b {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  display: block;
}
.power-notice small {
  font-size: 6px;
  letter-spacing: 0.5px;
  display: block;
  margin-top: 4px;
}
.power-notice strong {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 28px;
  margin-left: 5px;
}
.level-announcement {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s;
  white-space: nowrap;
  text-shadow: 0 4px 25px #102c3577;
}
.level-announcement.show {
  opacity: 1;
}
.level-announcement > span {
  font-size: 9px;
  letter-spacing: 4px;
  color: #ffdb55;
}
.level-announcement h2 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 80px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  margin: 12px 0;
  letter-spacing: 1px;
}
.level-announcement p {
  font-size: 8px;
  letter-spacing: 3px;
  color: #fff8e9b3;
}
.damage-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse, transparent 25%, #ef572e88 110%);
  opacity: 0;
  transition: opacity 0.4s;
}
.damage-flash.hit {
  opacity: 1;
}
.modal-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
  width: 390px;
  max-width: calc(100% - 35px);
  padding: 32px;
  background: #0b2433df;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid #fff8e93d;
  border-radius: 8px;
  box-shadow: 0 20px 120px #00111d55;
}
.modal-panel h2 {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 65px;
  line-height: 0.87;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.5px;
  margin: 24px 0 20px;
}
.modal-panel > p:not(.eyebrow) {
  font-size: 11px;
  color: #d2dfd6a3;
  line-height: 1.8;
  margin-bottom: 23px;
}
.modal-panel .play-button {
  width: 100%;
  min-width: 0;
  font-size: 11px;
  padding: 16px 20px;
}
.modal-panel .island-button {
  width: 100%;
  min-width: 0;
  font-size: 7px;
  padding: 20px 0 12px;
}
.pause-controls {
  font-size: 7px;
  letter-spacing: 1px;
  color: #b4c5cba3;
  line-height: 2.3;
  border-top: 1px solid #fff8e925;
  margin-top: 15px;
  padding-top: 16px;
}
.result-stars {
  font-size: 27px;
  color: var(--yellow);
  letter-spacing: 8px;
  margin-top: 24px;
}
.result-menu h2 {
  font-size: 62px;
  margin-top: 19px;
}
.result-stats {
  display: flex;
  justify-content: space-between;
  margin: 25px 0 32px;
}
.result-stats > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.result-stats span {
  font-size: 6px;
  letter-spacing: 1.3px;
  color: #becacba0;
}
.result-stats b {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 25px;
  letter-spacing: 1px;
}
.loading {
  position: fixed;
  inset: 0;
  background: #102733;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.loading-logo {
  font-family: "Barlow Condensed", Impact, sans-serif;
  font-size: 120px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  color: #ffdb55;
}
.loading-logo > span {
  font-size: 80px;
}
.loading p {
  font-size: 8px;
  letter-spacing: 3px;
  color: #fff8e9c4;
  margin: 22px 0;
}
.loading-track {
  width: 200px;
  height: 3px;
  overflow: hidden;
  background: #ffffff15;
  border-radius: 3px;
}
.loading-track i {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--yellow);
  animation: loading 1.3s infinite ease-in-out;
}
.loading small {
  font-size: 8px;
  color: #c2d2d470;
  margin-top: 24px;
}
.webgl-error #loading {
  display: none;
}
@keyframes loading {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(360%);
  }
}

@media (pointer: coarse), (any-pointer: coarse) {
  .desktop-only {
    display: none !important;
  }
  .touch-only {
    display: block;
  }
  .touch-interface {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .joystick {
    position: absolute;
    width: 135px;
    height: 135px;
    bottom: max(28px, env(safe-area-inset-bottom));
    left: 35px;
    border-radius: 50%;
    background: #0b2d3d42;
    border: 1px solid #fff8e943;
    box-shadow: inset 0 0 30px #fff8e905;
    touch-action: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
  .joystick:before {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1px solid #fff8e924;
    border-radius: 50%;
  }
  .joystick-cross {
    position: absolute;
    inset: 48px;
    background:
      linear-gradient(transparent 48%, #fff8e933 48% 52%, transparent 52%),
      linear-gradient(
        90deg,
        transparent 48%,
        #fff8e933 48% 52%,
        transparent 52%
      );
  }
  #joystick-knob {
    position: absolute;
    top: 45px;
    left: 45px;
    height: 45px;
    width: 45px;
    border-radius: 50%;
    border: 1px solid #fff8e966;
    background: #f1f1db40;
    box-shadow: 0 3px 15px #0d273c33;
    pointer-events: none;
  }
  .touch-actions {
    position: absolute;
    bottom: max(32px, env(safe-area-inset-bottom));
    right: 32px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    pointer-events: auto;
  }
  .touch-actions button {
    width: 79px;
    height: 79px;
    border-radius: 50%;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1px;
    border: 1px solid #fff8e96b;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    touch-action: none;
  }
  .touch-jump {
    background: #e7e8da25;
    margin-bottom: 25px;
  }
  .touch-jump > span {
    font-size: 34px;
    line-height: 1.2;
  }
  .touch-actions .touch-boost {
    width: 94px;
    height: 94px;
    background: #ffdb55dd;
    color: #173444;
    border-color: #fff1ad;
    box-shadow: 0 3px 0 #ac872c66;
  }
  .touch-boost > span {
    font-size: 43px;
    line-height: 1.1;
  }
  .minimap-wrap {
    left: auto;
    right: 36px;
    top: 245px;
    bottom: auto;
    width: 120px;
    height: 120px;
  }
  .speedometer {
    bottom: 33px;
    width: 165px;
  }
  .speed-number strong {
    font-size: 55px;
  }
  .menu-controls {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .topbar {
    padding: 25px 30px;
  }
  .mission-card {
    left: 30px;
    top: 100px;
  }
  .health-card {
    right: 30px;
    top: 98px;
  }
  .menu-copy {
    margin-left: 7vw;
  }
  .menu-location {
    bottom: 75px;
    right: 30px;
  }
  .menu-footer {
    bottom: 22px;
  }
  .top-center {
    top: 27px;
  }
  .power-notice {
    top: 155px;
  }
  .coordinates {
    display: none;
  }
}
@media (max-width: 900px) {
  .brand > b {
    font-size: 17px;
  }
  .brand small {
    font-size: 6px;
  }
  .topbar-right {
    gap: 8px;
  }
  .utility {
    font-size: 7px;
    padding: 9px;
  }
  .utility.sound span {
    font-size: 7px;
  }
  .menu-copy h1 {
    font-size: 130px;
  }
  .menu-copy {
    margin-top: 0;
  }
  .menu-description {
    font-size: 11px;
  }
  .menu-location {
    width: 250px;
    right: 30px;
    bottom: 90px;
  }
  .island-grid {
    gap: 12px;
  }
  .island-card {
    padding: 20px;
  }
  .island-card h3 {
    font-size: 30px;
  }
  .island-card p {
    font-size: 9px;
  }
  .island-card .card-arrow {
    right: 17px;
  }
  .top-center strong {
    font-size: 30px;
  }
  .mission-card {
    max-width: 250px;
  }
  .mission-card h2 {
    font-size: 34px;
  }
  .health-card {
    width: 170px;
  }
  .health-card #lives {
    font-size: 21px;
    letter-spacing: 2px;
  }
  .coordinates {
    display: none;
  }
  .level-announcement h2 {
    font-size: 64px;
  }
}
@media (max-width: 650px) {
  .topbar {
    padding: 18px 20px;
  }
  .brand {
    gap: 7px;
  }
  .brand > b {
    font-size: 16px;
  }
  .brand small,
  .brand-divider {
    display: none;
  }
  .flag {
    width: 24px;
    height: 16px;
  }
  .topbar-right {
    gap: 6px;
  }
  .utility {
    font-size: 0;
    padding: 7px 9px;
    min-height: 30px;
    gap: 5px;
  }
  .utility b {
    font-size: 7px;
  }
  .utility > span {
    font-size: 8px;
  }
  .utility.square {
    font-size: 17px;
  }
  .utility.sound {
    font-size: 17px;
    padding: 5px 9px;
  }
  .utility.sound > span {
    display: none;
  }
  .menu-copy {
    margin: 0 0 10vh 8vw;
  }
  .menu-copy h1 {
    font-size: 123px;
    letter-spacing: -3px;
  }
  .menu-copy h1 > span {
    letter-spacing: -4px;
  }
  .eyebrow {
    font-size: 7px;
    letter-spacing: 1.3px;
  }
  .subtitle {
    font-size: 19px;
    letter-spacing: 3px;
    margin: 7px 0 20px;
    padding: 5px 12px;
  }
  .menu-description {
    font-size: 10px;
    margin-bottom: 20px;
  }
  .play-button {
    padding: 17px 20px;
    min-width: 260px;
    font-size: 12px;
  }
  .island-button {
    min-width: 260px;
    font-size: 7px;
    padding-top: 20px;
  }
  .menu-controls {
    margin-top: 12px;
    font-size: 6px;
  }
  .main-menu {
    background: linear-gradient(90deg, #071b2cde, #071b2c72 70%, #071b2c20);
  }
  .menu-location {
    bottom: 70px;
    right: 23px;
    width: 260px;
  }
  .menu-location p {
    font-size: 10px;
  }
  .location-cross {
    font-size: 26px;
  }
  .menu-footer {
    left: 20px;
    right: 20px;
    font-size: 5px;
    letter-spacing: 1px;
    bottom: 23px;
  }
  .menu-footer b {
    font-size: 11px;
  }
  .island-menu {
    padding: 90px 23px 30px;
  }
  .island-heading {
    margin-bottom: 25px;
  }
  .island-heading h2 {
    font-size: 42px;
  }
  .island-heading p:not(.eyebrow) {
    font-size: 10px;
  }
  .island-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .island-card {
    min-height: 164px;
    padding: 18px 14px;
  }
  .island-card h3 {
    font-size: 27px;
    margin-top: 25px;
  }
  .island-card p {
    font-size: 8px;
    max-width: 88%;
  }
  .island-card .card-number {
    font-size: 7px;
  }
  .island-card .card-stars {
    top: 17px;
    right: 12px;
    font-size: 8px;
    letter-spacing: 1px;
  }
  .island-footnote {
    font-size: 8px;
    line-height: 1.7;
  }
  .mission-card {
    top: 85px;
    left: 20px;
    max-width: 220px;
  }
  .mission-kicker {
    font-size: 6px;
    gap: 5px;
    letter-spacing: 1px;
  }
  .difficulty {
    display: none;
  }
  .mission-card h2 {
    font-size: 32px;
    margin: 8px 0;
  }
  .mission-card > p {
    font-size: 8px;
    max-width: 200px;
    line-height: 1.7;
  }
  .mission-progress {
    margin-top: 9px;
    gap: 7px;
  }
  .mission-progress > b {
    font-size: 20px;
  }
  .ring-symbol {
    font-size: 25px;
  }
  .mission-divider {
    margin: 0 3px;
  }
  .objective-line {
    font-size: 7px;
    margin-top: 8px;
    gap: 5px;
  }
  .top-center {
    left: auto;
    right: 20px;
    transform: none;
    top: 84px;
    text-align: right;
  }
  .score-label {
    font-size: 6px;
  }
  .top-center strong {
    font-size: 25px;
    letter-spacing: 2px;
  }
  .timer {
    font-size: 8px;
  }
  .health-card {
    right: 20px;
    top: 151px;
    width: 130px;
    padding: 8px 10px;
  }
  .health-top {
    font-size: 5px;
    letter-spacing: 0.6px;
  }
  .health-top button {
    font-size: 13px;
    min-width: 20px;
  }
  .health-card #lives {
    font-size: 17px;
    letter-spacing: 1px;
    margin: 1px 0 6px;
  }
  .health-bottom {
    font-size: 4px;
    letter-spacing: 0.7px;
    gap: 5px;
  }
  .health-bottom .flag {
    width: 12px;
    height: 8px;
  }
  .minimap-wrap {
    right: 24px;
    top: 252px;
    width: 94px;
    height: 94px;
  }
  .minimap-caption {
    font-size: 5px;
    bottom: -17px;
  }
  .map-north {
    font-size: 6px;
    top: 5px;
  }
  .joystick {
    width: 112px;
    height: 112px;
    left: 22px;
    bottom: 32px;
  }
  #joystick-knob {
    top: 37px;
    left: 37px;
    width: 38px;
    height: 38px;
  }
  .joystick:before {
    inset: 19px;
  }
  .joystick-cross {
    inset: 40px;
  }
  .touch-actions {
    right: 20px;
    bottom: 32px;
    gap: 11px;
  }
  .touch-actions button {
    width: 59px;
    height: 59px;
    font-size: 6px;
  }
  .touch-actions .touch-boost {
    width: 73px;
    height: 73px;
  }
  .touch-jump {
    margin-bottom: 28px;
  }
  .touch-jump > span {
    font-size: 27px;
  }
  .touch-boost > span {
    font-size: 34px;
  }
  .speedometer {
    bottom: 167px;
    width: 145px;
  }
  .speed-number strong {
    font-size: 47px;
  }
  .speed-number > span {
    font-size: 6px;
  }
  .fuel-label {
    font-size: 5px;
    letter-spacing: 1px;
  }
  .speed-caption {
    font-size: 4px;
    letter-spacing: 1.1px;
  }
  .toast {
    font-size: 8px;
    padding: 10px 13px;
    max-width: 95vw;
    white-space: normal;
    text-align: center;
    top: 42%;
  }
  .level-announcement {
    top: 47%;
  }
  .level-announcement h2 {
    font-size: 48px;
    letter-spacing: 0;
  }
  .level-announcement > span {
    font-size: 7px;
    letter-spacing: 2px;
  }
  .level-announcement p {
    font-size: 6px;
    letter-spacing: 1.5px;
  }
  .power-notice {
    top: auto;
    bottom: 267px;
    gap: 8px;
    padding: 7px 11px;
  }
  .power-notice > span {
    font-size: 19px;
  }
  .power-notice b {
    font-size: 8px;
  }
  .power-notice small {
    font-size: 4px;
  }
  .power-notice strong {
    font-size: 24px;
  }
  .modal-panel {
    padding: 26px;
    max-height: calc(100dvh - 110px);
    overflow: auto;
    touch-action: pan-y;
  }
  .modal-panel h2 {
    font-size: 58px;
  }
  .result-menu h2 {
    font-size: 53px;
  }
  .result-stats {
    margin: 20px 0 26px;
  }
  .pause-controls {
    font-size: 6px;
  }
  .modal-panel .eyebrow {
    font-size: 7px;
  }
}
@media (orientation: landscape) and (max-height: 650px) {
  .topbar {
    padding: 15px 24px;
  }
  .menu-copy {
    margin: 6vh 0 0 7vw;
  }
  .menu-copy h1 {
    font-size: 92px;
    margin: 16px 0 10px;
  }
  .subtitle {
    font-size: 16px;
    letter-spacing: 3px;
    margin: 5px 0 12px;
    padding: 3px 10px;
  }
  .menu-description {
    font-size: 9px;
    margin-bottom: 14px;
  }
  .menu-copy .eyebrow {
    font-size: 6px;
  }
  .menu-copy .play-button {
    padding: 12px 17px;
    min-width: 245px;
    min-height: 40px;
    font-size: 10px;
  }
  .menu-copy .island-button {
    padding: 15px 0 8px;
    min-width: 245px;
    font-size: 6px;
  }
  .menu-controls {
    margin-top: 10px;
    font-size: 5px;
  }
  .menu-location {
    bottom: 60px;
  }
  .menu-footer {
    bottom: 18px;
  }
  .mission-card {
    top: 70px;
    left: 24px;
  }
  .mission-card h2 {
    font-size: 30px;
  }
  .mission-card > p {
    font-size: 8px;
  }
  .health-card {
    top: 70px;
    right: 24px;
  }
  .top-center {
    top: 15px;
  }
  .minimap-wrap {
    top: 195px;
    right: 30px;
    width: 90px;
    height: 90px;
  }
  .joystick {
    left: 26px;
    bottom: 23px;
    width: 113px;
    height: 113px;
  }
  #joystick-knob {
    left: 37px;
    top: 37px;
    width: 39px;
    height: 39px;
  }
  .touch-actions {
    right: 24px;
    bottom: 23px;
  }
  .touch-actions button {
    width: 61px;
    height: 61px;
  }
  .touch-actions .touch-boost {
    width: 76px;
    height: 76px;
  }
  .speedometer {
    bottom: 23px;
    width: 170px;
  }
  .speed-number strong {
    font-size: 46px;
  }
  .power-notice {
    top: 80px;
  }
  .level-announcement h2 {
    font-size: 57px;
  }
  .modal-panel {
    padding: 22px 28px;
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    touch-action: pan-y;
  }
  .modal-panel h2 {
    font-size: 47px;
    margin: 17px 0 13px;
  }
  .pause-controls {
    display: none;
  }
  .modal-panel > p:not(.eyebrow) {
    margin-bottom: 17px;
    font-size: 10px;
  }
  .modal-panel .island-button {
    padding: 14px 0 8px;
  }
  .island-menu {
    padding-top: 75px;
  }
  .island-heading h2 {
    font-size: 37px;
  }
  .island-heading {
    margin-bottom: 20px;
  }
  .island-card {
    min-height: 145px;
    padding: 15px;
  }
  .island-card h3 {
    margin-top: 20px;
  }
  .result-stars {
    font-size: 20px;
    margin-top: 15px;
  }
  .result-stats {
    margin: 16px 0 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cinema-grain,
  .speed-lines {
    display: none;
  }
  .loading-track i {
    animation: none;
  }
  .level-announcement,
  .toast {
    transition: none;
  }
}

.leaderboard-panel {
  z-index: 40;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
  touch-action: pan-y;
}
.map-credit {
  position: fixed;
  z-index: 8;
  left: 20px;
  bottom: 5px;
  font-size: 8px;
  color: #d0dfd6;
  text-decoration: none;
  text-shadow: 0 1px 3px #102b30;
}
.power-notice {
  top: auto;
  bottom: 190px;
}
.leaderboard-panel .close-button {
  position: absolute;
  top: 20px;
  right: 22px;
}
.leaderboard-panel h2 {
  font-size: clamp(38px, 6vw, 65px);
}
.leaderboard-panel > small {
  display: block;
  color: #c9d9d8;
  font-size: 10px;
  line-height: 1.7;
  margin-top: 20px;
}
#leaderboard-form {
  margin-bottom: 20px;
}
#leaderboard-form label {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  margin-bottom: 10px;
  color: #e9d6a0;
}
#leaderboard-form > div {
  display: flex;
  gap: 8px;
}
#player-name {
  min-width: 0;
  flex: 1;
  padding: 12px;
  border: 1px solid #ffffff35;
  background: #ffffff09;
  color: #fff8e9;
  border-radius: 5px;
  font: inherit;
  font-size: 16px;
}
#submit-score {
  border: 0;
  padding: 12px;
  border-radius: 5px;
  background: var(--yellow);
  color: #183241;
  font-size: 10px;
  font-weight: 800;
}
#submit-score:disabled {
  opacity: .5;
}
#leaderboard-rows {
  list-style: none;
  padding: 0;
  margin: 0;
}
#leaderboard-rows li {
  display: flex;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid #ffffff12;
  padding: 12px 0;
  font-size: 13px;
}
#leaderboard-rows li > span {
  color: #91abae;
  font-size: 10px;
}
#leaderboard-rows li > b {
  flex: 1;
  overflow-wrap: anywhere;
}
#leaderboard-rows li > strong {
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}
.lithuanian-notice {
  position: absolute;
  left: 50%;
  top: 110px;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 20px;
  background: #152b24e8;
  border: 1px solid #fdb913;
  border-radius: 9px;
  box-shadow: 0 -3px #fdb913, 0 3px #c1272d;
}
.lithuanian-notice > span {
  font-size: 28px;
}
.lithuanian-notice b, .lithuanian-notice small {
  display: block;
  white-space: nowrap;
}
.lithuanian-notice b {
  color: #fdb913;
  font-size: 15px;
  letter-spacing: 2px;
}
.lithuanian-notice small {
  color: #b4dec2;
  margin-top: 4px;
  font-size: 8px;
}
.lithuanian-notice strong {
  font-size: 26px;
  color: #fdb913;
}
body.lithuanian-mode .speed-lines {
  box-shadow: inset 0 6px #fdb913, inset 0 -6px #c1272d, inset 6px 0 #006a44, inset -6px 0 #006a44;
}
body.lithuanian-mode .vignette {
  box-shadow: inset 0 6px #fdb913, inset 0 -6px #c1272d, inset 6px 0 #006a44, inset -6px 0 #006a44;
}
body.lithuanian-mode .flag {
  background: linear-gradient(#fdb913 0 33.33%, #006a44 33.33% 66.66%, #c1272d 66.66%);
}
body.lithuanian-mode .flag::before, body.lithuanian-mode .flag::after {
  display: none;
}
body.lithuanian-mode .score-label {
  color: #fdb913;
}
body.lithuanian-mode .top-center strong {
  color: #fdb913;
  text-shadow: 0 3px #c1272d, 0 -2px #006a44;
}
@media (pointer: coarse), (any-pointer: coarse) {
  .touch-actions {
    gap: 12px;
  }
  .touch-actions .touch-brake {
    width: 55px;
    height: 55px;
    background: #153947aa;
  }
  .touch-actions .touch-interact {
    position: absolute;
    right: 0;
    bottom: 110px;
    width: 80px;
    height: 58px;
    border-radius: 16px;
    background: #ffdb55e8;
    color: #173344;
  }
  .leaderboard-button {
    min-width: 30px;
  }
  .leaderboard-button span {
    display: none;
  }
  .lithuanian-notice {
    top: 85px;
    padding: 9px 12px;
  }
}
@media (max-width: 600px) {
  .lithuanian-notice {
    top: 225px;
  }
  .leaderboard-panel {
    padding: 28px 24px;
  }
}
@media (min-width: 651px) and (max-width: 1100px) {
  .top-center {
    top: 100px;
  }
  .leaderboard-button span {
    display: none;
  }
}

.menu-copy h1 > span {
  font-size: .82em;
  letter-spacing: -.035em;
}
.subtitle {
  font-size: clamp(15px, 1.7vw, 25px);
  letter-spacing: 1px;
  text-transform: none;
}
.brand b {
  font-size: 16px;
  white-space: nowrap;
}
.desktop-actions strong {
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}
.map-credit a {
  color: inherit;
  text-decoration: none;
}
.story-overlay {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  background: linear-gradient(#07111c55, transparent 25%, transparent 60%, #07111c99);
}
.story-overlay::before, .story-overlay::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 6vh;
  background: #071019;
}
.story-overlay::before { top: 0; }
.story-overlay::after { bottom: 0; }
.story-kicker {
  position: absolute;
  top: 8vh;
  left: 5vw;
  color: #fff0bc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}
.story-skip {
  position: absolute;
  right: max(5vw, env(safe-area-inset-right));
  top: 8vh;
  padding: 12px 16px;
  border: 1px solid #ffffff50;
  border-radius: 24px;
  background: #102b38a8;
  font-size: 10px;
  font-weight: 800;
  pointer-events: auto;
}
.story-dialogue {
  position: absolute;
  left: 50%;
  bottom: 9vh;
  transform: translateX(-50%);
  width: min(620px, 83vw);
  text-align: center;
  text-shadow: 0 2px 8px #000;
}
.story-dialogue b {
  color: var(--yellow);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.story-dialogue p {
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 600;
  line-height: 1.5;
  margin: 12px 0 0;
}
body.story-playing .hud,
body.story-playing .topbar {
  visibility: hidden;
}
@media (pointer: coarse), (any-pointer: coarse) {
  .touch-actions {
    display: grid;
    grid-template-columns: 76px 90px;
    align-items: center;
    justify-items: center;
    gap: 12px;
    bottom: max(26px, env(safe-area-inset-bottom));
    right: 26px;
  }
  .touch-actions button {
    width: 76px;
    height: 76px;
    margin: 0;
  }
  .touch-actions .touch-boost {
    width: 90px;
    height: 90px;
    background: linear-gradient(to top, #ffe16c var(--boost-level, 100%), #bdaf7670 var(--boost-level, 100%));
    position: relative;
    padding-bottom: 12px;
  }
  .touch-boost::after {
    content: attr(data-level);
    position: absolute;
    bottom: 10px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0;
  }
  .touch-shoot {
    background: #e7a36ee8;
    color: #382b22;
  }
  .touch-shoot > span { font-size: 28px; }
  .touch-actions .touch-interact {
    bottom: 196px;
    right: 0;
  }
}
@media (max-width: 650px) {
  .brand b { font-size: 12px; }
  .menu-copy h1 { font-size: clamp(72px, 18vw, 115px); }
  .story-kicker { font-size: 7px; max-width: 46vw; line-height: 1.7; }
  .story-skip { font-size: 8px; }
  .touch-actions {
    grid-template-columns: 62px 76px;
    right: 18px;
    gap: 9px;
  }
  .touch-actions button { width: 62px; height: 62px; }
  .touch-actions .touch-boost { width: 76px; height: 76px; }
  .touch-actions .touch-interact { bottom: 168px; }
  .map-credit { max-width: 95vw; font-size: 6px; }
}
.cat-grip {
  position: absolute;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 24;
  width: min(270px, 40vw);
  padding: 12px 14px;
  border: 1px solid #d5b76b;
  border-radius: 13px;
  background: #102c3bed;
  color: #fff4cf;
  pointer-events: auto;
  touch-action: none;
}
.cat-grip strong { display: block; font-size: 13px; }
.cat-grip span { display: block; margin: 5px 0 8px; font-size: 9px; letter-spacing: .035em; }
.cat-grip i { display: block; height: 5px; background: #ffffff25; border-radius: 4px; overflow: hidden; }
.cat-grip i b { display: block; height: 100%; width: 100%; background: #efcd69; }
.cat-grip.wriggling { background: #8b4428ed; box-shadow: 0 0 24px #ffb66355; border-color: #ffd382; }
.cat-grip:active { transform: translateX(-50%) scale(.97); filter: brightness(1.25); }
