:root {
  color-scheme: dark;
  --ui-scale: 1;
  --black: #04090e;
  --night: #08131d;
  --glass: rgba(8, 18, 27, 0.74);
  --glass-strong: rgba(6, 14, 22, 0.9);
  --glass-soft: rgba(16, 30, 41, 0.58);
  --white: #f3f8fb;
  --muted: #9db0bd;
  --faint: #718694;
  --line: rgba(210, 234, 245, 0.16);
  --line-strong: rgba(218, 239, 248, 0.28);
  --goose: #ffd24a;
  --goose-soft: #ffe9a0;
  --heli: #70caf5;
  --heli-soft: #c4edff;
  --danger: #ff626f;
  --danger-soft: #ff9da5;
  --success: #76e5b6;
  --romance: #ff76ad;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--black);
}

body {
  color: var(--white);
  font-family: var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
select,
input {
  font: inherit;
}

button,
a,
select,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.game-skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.45rem;
  color: #111820;
  background: var(--goose);
  font-weight: 850;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 140ms ease;
}

.game-skip-link:focus {
  transform: translateY(0);
}

.game-app,
#game-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.game-app {
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 65% 26%, rgba(118, 187, 217, 0.18), transparent 35%),
    linear-gradient(160deg, #112b3d, #07111a 70%);
}

#game-canvas {
  z-index: 0;
  display: block;
  outline: none;
  touch-action: none;
  user-select: none;
}

#game-canvas > .cesium-viewer,
#game-canvas .cesium-viewer-cesiumWidgetContainer,
#game-canvas .cesium-widget,
#game-canvas .cesium-widget canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#game-canvas .cesium-widget canvas {
  display: block;
  outline: none;
  touch-action: none;
}

#game-canvas .cesium-viewer-toolbar {
  z-index: 7;
  top: max(3.15rem, calc(env(safe-area-inset-top) + 2.65rem));
  right: max(0.75rem, env(safe-area-inset-right));
}

#game-canvas .cesium-viewer-bottom {
  z-index: 9;
  right: auto;
  bottom: max(0.3rem, env(safe-area-inset-bottom));
  left: max(0.55rem, env(safe-area-inset-left));
  max-width: calc(100% - 1.1rem);
}

.is-playing #game-canvas .cesium-viewer-bottom,
.is-paused #game-canvas .cesium-viewer-bottom,
.is-over #game-canvas .cesium-viewer-bottom {
  bottom: max(5rem, calc(env(safe-area-inset-bottom) + 4.5rem));
}

.scene-treatment {
  position: fixed;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene-treatment__vignette,
.scene-treatment__grain {
  position: absolute;
  inset: 0;
}

.scene-treatment__vignette {
  background:
    linear-gradient(180deg, rgba(1, 5, 9, 0.22), transparent 18% 75%, rgba(1, 5, 9, 0.34)),
    radial-gradient(circle at center, transparent 55%, rgba(0, 5, 9, 0.34) 120%);
}

.scene-treatment__grain {
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.88' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  transition: opacity 180ms ease;
}

.game-app[data-film-grain="true"] .scene-treatment__grain {
  opacity: 0.07;
}

.ui-layer {
  position: fixed;
  z-index: 20;
  inset: 0;
}

.ui-kicker {
  margin: 0;
  color: #9cb4c2;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}

.performance-badge {
  position: fixed;
  z-index: 45;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  min-height: 1.85rem;
  padding: 0 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(204, 234, 247, 0.13);
  border-radius: 999px;
  color: #aec1cb;
  background: rgba(4, 12, 18, 0.58);
  box-shadow: 0 0.5rem 1.8rem rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(0.7rem);
  font-family: var(--mono);
  font-size: 0.6rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.performance-badge__divider {
  width: 1px;
  height: 0.75rem;
  background: var(--line-strong);
}

.performance-badge__fps {
  min-width: 3.6rem;
  color: #d7f2df;
}

.performance-badge[data-performance="poor"] .performance-badge__fps {
  color: var(--danger-soft);
}

.is-playing .performance-badge,
.is-paused .performance-badge,
.is-over .performance-badge {
  top: max(4.8rem, calc(env(safe-area-inset-top) + 4.3rem));
  /* The phone media query anchors the badge to the bottom for the menu;
     with this rule's `top` also winning during play, both anchors applied
     and the pill stretched to full screen height. */
  bottom: auto;
}

.crosshair {
  position: fixed;
  z-index: 12;
  top: 50%;
  left: 50%;
  width: 2.8rem;
  height: 2.8rem;
  color: rgba(226, 247, 255, 0.88);
  filter: drop-shadow(0 0 0.2rem rgba(0, 0, 0, 0.9));
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 100ms ease, transform 100ms ease;
}

.crosshair[data-state="hot"] {
  color: var(--danger-soft);
  transform: translate(-50%, -50%) scale(0.84);
}

.crosshair__ring {
  position: absolute;
  inset: 0.58rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.85;
}

.crosshair__dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.2rem;
  height: 0.2rem;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.crosshair__tick {
  position: absolute;
  background: currentColor;
}

.crosshair__tick--top,
.crosshair__tick--bottom {
  left: calc(50% - 0.5px);
  width: 1px;
  height: 0.4rem;
}

.crosshair__tick--left,
.crosshair__tick--right {
  top: calc(50% - 0.5px);
  width: 0.4rem;
  height: 1px;
}

.crosshair__tick--top {
  top: 0;
}

.crosshair__tick--bottom {
  bottom: 0;
}

.crosshair__tick--left {
  left: 0;
}

.crosshair__tick--right {
  right: 0;
}

/* Loading */

.loading-screen {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(92, 174, 210, 0.16), transparent 30rem),
    linear-gradient(155deg, rgba(9, 28, 40, 0.97), rgba(3, 9, 14, 0.99));
}

.loading-screen__wash {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.loading-screen__wash::before,
.loading-screen__wash::after {
  position: absolute;
  border: 1px solid rgba(158, 215, 237, 0.08);
  border-radius: 50%;
  content: "";
}

.loading-screen__wash::before {
  top: 50%;
  left: 50%;
  width: min(76vw, 62rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
}

.loading-screen__wash::after {
  top: 50%;
  left: 50%;
  width: min(52vw, 40rem);
  aspect-ratio: 1;
  box-shadow:
    0 0 0 6rem rgba(158, 215, 237, 0.013),
    0 0 0 12rem rgba(158, 215, 237, 0.009);
  transform: translate(-50%, -50%);
}

.loading-card {
  position: relative;
  width: min(31rem, calc(100% - 2rem));
  text-align: center;
}

.loading-mark {
  position: relative;
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  display: grid;
  place-items: center;
}

.loading-mark__core {
  z-index: 2;
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(213, 240, 250, 0.35);
  border-radius: 50%;
  color: var(--goose-soft);
  background: rgba(11, 26, 37, 0.82);
  box-shadow:
    0 0 2rem rgba(105, 198, 234, 0.14),
    inset 0 0 1rem rgba(255, 210, 74, 0.08);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.loading-mark__wing,
.loading-mark__rotor {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(196, 232, 246, 0.24);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.loading-mark__wing {
  width: 5rem;
  height: 2.2rem;
  animation: loading-wing 2.4s ease-in-out infinite;
}

.loading-mark__rotor {
  width: 2.2rem;
  height: 5rem;
  animation: loading-rotor 1.6s linear infinite;
}

@keyframes loading-wing {
  50% {
    transform: translate(-50%, -50%) rotate(18deg) scaleX(0.86);
  }
}

@keyframes loading-rotor {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.loading-title {
  margin: 0.45rem 0 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.55rem;
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 1;
}

.loading-title span:first-child {
  color: var(--goose);
}

.loading-title span:nth-of-type(2) {
  color: var(--heli-soft);
}

.loading-title em {
  color: rgba(255, 255, 255, 0.62);
  font-family: Georgia, serif;
  font-size: 0.4em;
  font-weight: 400;
}

.loading-title b {
  align-self: start;
  margin-top: -0.2rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid rgba(112, 202, 245, 0.4);
  border-radius: 0.25rem;
  color: var(--heli);
  font-family: var(--mono);
  font-size: 0.2em;
  letter-spacing: 0.08em;
}

.loading-status {
  min-height: 1.5rem;
  margin: 0 0 0.7rem;
  color: #cad7df;
  font-size: 0.79rem;
  font-weight: 700;
}

.loading-progress {
  position: relative;
  width: 100%;
  height: 0.38rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0.2rem rgba(0, 0, 0, 0.3);
}

.loading-progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--goose), #f7efad 50%, var(--heli));
  box-shadow: 0 0 1rem rgba(112, 202, 245, 0.5);
  transition: width 220ms ease;
}

.loading-meta {
  margin-top: 0.7rem;
  display: flex;
  justify-content: space-between;
  color: #6f8492;
  font-family: var(--mono);
  font-size: 0.59rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.loading-meta a {
  color: var(--goose-soft);
  text-decoration-color: rgba(255, 210, 74, 0.45);
  text-underline-offset: 0.18rem;
}

.loading-meta a:hover,
.loading-meta a:focus-visible {
  color: white;
  text-decoration-color: white;
}

/* Main menu */

.main-menu {
  overflow: auto;
  background:
    linear-gradient(90deg, rgba(3, 10, 16, 0.84), rgba(3, 10, 16, 0.48) 58%, rgba(3, 10, 16, 0.16)),
    linear-gradient(180deg, rgba(3, 9, 14, 0.36), transparent 34%, rgba(3, 8, 12, 0.55));
  scrollbar-width: thin;
}

.main-menu__ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(112, 202, 245, 0.12) 1px, transparent 1px)
      calc(100% - 10vw) 50% / 4rem 4rem,
    linear-gradient(rgba(112, 202, 245, 0.12) 1px, transparent 1px)
      calc(100% - 10vw) 50% / 4rem 4rem;
  mask-image: radial-gradient(circle at 88% 48%, black, transparent 34%);
  opacity: 0.35;
}

.main-menu__layout {
  position: relative;
  width: min(44rem, calc(100% - 2rem));
  min-height: 100%;
  padding:
    max(3.5rem, calc(env(safe-area-inset-top) + 2rem))
    clamp(0.1rem, 2vw, 1.5rem)
    max(1.5rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu-brand {
  margin-bottom: clamp(1.4rem, 4vh, 2.7rem);
}

.status-dot {
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.45rem;
  display: inline-block;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0.8rem rgba(118, 229, 182, 0.6);
  vertical-align: 0.02rem;
}

.menu-title {
  margin: 0.35rem 0 0;
  display: flex;
  align-items: baseline;
  gap: clamp(0.3rem, 1vw, 0.7rem);
  font-size: clamp(2.7rem, 6.7vw, 5.9rem);
  font-weight: 950;
  letter-spacing: -0.075em;
  line-height: 0.95;
}

.menu-title__goose {
  color: var(--goose);
  text-shadow: 0 0 2rem rgba(255, 210, 74, 0.14);
}

.menu-title__versus {
  color: rgba(255, 255, 255, 0.7);
  font-family: Georgia, serif;
  font-size: 0.35em;
  font-style: italic;
  font-weight: 400;
}

.menu-title__chopper {
  color: var(--heli-soft);
  text-shadow: 0 0 2rem rgba(112, 202, 245, 0.14);
}

.menu-title__edition {
  align-self: start;
  margin-top: 0.08rem;
  padding: 0.2rem 0.32rem;
  border: 1px solid rgba(112, 202, 245, 0.35);
  border-radius: 0.22rem;
  color: var(--heli);
  font-family: var(--mono);
  font-size: 0.15em;
  letter-spacing: 0.05em;
}

.menu-tagline {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: clamp(0.82rem, 1.5vw, 0.96rem);
}

.side-select {
  display: grid;
  gap: 0.65rem;
}

.side-card {
  position: relative;
  width: 100%;
  min-height: 8.2rem;
  padding: 1rem 3.2rem 1rem 1rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.8rem 4.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  outline: none;
  color: var(--white);
  background:
    linear-gradient(100deg, rgba(255, 255, 255, 0.045), transparent 60%),
    var(--glass);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.13);
  backdrop-filter: blur(1rem);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 170ms ease,
    background-color 170ms ease,
    transform 170ms ease;
}

.side-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.2rem;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleY(0.5);
  transition: opacity 170ms ease, transform 170ms ease;
}

.side-card:hover,
.side-card:focus-visible {
  transform: translateX(0.3rem);
}

.side-card:hover::before,
.side-card:focus-visible::before {
  opacity: 1;
  transform: scaleY(1);
}

.side-card--goose:hover,
.side-card--goose:focus-visible {
  border-color: rgba(255, 210, 74, 0.52);
  background-color: rgba(30, 28, 17, 0.84);
}

.side-card--heli:hover,
.side-card--heli:focus-visible {
  border-color: rgba(112, 202, 245, 0.55);
  background-color: rgba(13, 31, 43, 0.84);
}

.side-card:focus-visible {
  box-shadow: 0 0 0 3px var(--night), 0 0 0 5px white;
}

.side-card__number {
  align-self: start;
  color: #637b89;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 800;
}

.side-card__icon {
  font-size: 3.4rem;
  filter: drop-shadow(0 0.6rem 0.55rem rgba(0, 0, 0, 0.25));
  line-height: 1;
  transition: transform 180ms ease;
}

.side-card--goose .side-card__icon {
  transform: scaleX(-1) rotate(-7deg);
}

.side-card--goose:hover .side-card__icon,
.side-card--goose:focus-visible .side-card__icon {
  transform: scaleX(-1) rotate(-3deg) translateX(-0.15rem);
}

.side-card--heli:hover .side-card__icon,
.side-card--heli:focus-visible .side-card__icon {
  transform: rotate(-2deg) translateX(0.15rem);
}

.side-card__content {
  min-width: 0;
  display: block;
}

.side-card__eyebrow {
  display: block;
  color: #758c99;
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.side-card__title {
  margin-top: 0.12rem;
  display: block;
  font-size: 1.38rem;
  font-weight: 880;
  letter-spacing: -0.025em;
}

.side-card--goose .side-card__title {
  color: var(--goose-soft);
}

.side-card--heli .side-card__title {
  color: var(--heli-soft);
}

.side-card__description {
  max-width: 30rem;
  margin-top: 0.23rem;
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.side-card__record {
  margin-top: 0.42rem;
  display: block;
  color: #778c99;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
}

.side-card__record strong {
  color: #cbd7dc;
}

.side-card__arrow {
  position: absolute;
  top: 50%;
  right: 1.1rem;
  color: #90a5b0;
  font-size: 1.2rem;
  transform: translateY(-50%);
  transition: transform 170ms ease;
}

.side-card:hover .side-card__arrow,
.side-card:focus-visible .side-card__arrow {
  transform: translate(0.18rem, -50%);
}

.menu-tools {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: minmax(13rem, 1.4fr) minmax(18rem, 2fr);
  gap: 0.65rem;
}

.mating-toggle {
  min-width: 0;
  min-height: 4.1rem;
  padding: 0.7rem 0.75rem;
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr) 2rem;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 118, 173, 0.29);
  border-radius: 0.7rem;
  outline: none;
  color: var(--white);
  background: rgba(50, 15, 35, 0.45);
  backdrop-filter: blur(0.8rem);
  text-align: left;
  cursor: pointer;
  transition: border-color 170ms ease, background 170ms ease;
}

.mating-toggle:hover,
.mating-toggle:focus-visible {
  border-color: rgba(255, 118, 173, 0.62);
}

.mating-toggle:focus-visible {
  box-shadow: 0 0 0 3px var(--night), 0 0 0 5px white;
}

.mating-toggle[aria-pressed="false"] {
  border-color: var(--line);
  background: rgba(15, 27, 37, 0.65);
}

.mating-toggle__icon {
  width: 1.8rem;
  height: 1.8rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 118, 173, 0.35);
  border-radius: 50%;
  color: var(--romance);
  background: rgba(255, 118, 173, 0.08);
  font-size: 0.7rem;
}

.mating-toggle strong,
.mating-toggle small {
  display: block;
}

.mating-toggle strong {
  font-size: 0.71rem;
  font-weight: 820;
}

.mating-toggle small {
  margin-top: 0.12rem;
  overflow: hidden;
  color: #a98b9b;
  font-size: 0.56rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mating-toggle__switch,
.option-switch {
  position: relative;
  width: 2rem;
  height: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 118, 173, 0.28);
}

.mating-toggle__switch::after,
.option-switch::after {
  position: absolute;
  top: 0.15rem;
  left: calc(100% - 0.82rem);
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0.2rem 0.45rem rgba(0, 0, 0, 0.3);
  content: "";
  transition: left 160ms ease, background 160ms ease;
}

.mating-toggle[aria-pressed="false"] .mating-toggle__switch {
  background: rgba(255, 255, 255, 0.06);
}

.mating-toggle[aria-pressed="false"] .mating-toggle__switch::after {
  left: 0.15rem;
  background: #8da0aa;
}

.menu-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.menu-nav button,
.menu-nav a {
  min-width: 0;
  min-height: 1.85rem;
  padding: 0.45rem 0.65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  outline: none;
  color: #bbcad2;
  background: rgba(7, 17, 25, 0.58);
  font-size: 0.62rem;
  font-weight: 780;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.menu-nav button:hover,
.menu-nav button:focus-visible,
.menu-nav a:hover,
.menu-nav a:focus-visible {
  border-color: rgba(212, 237, 247, 0.35);
  color: white;
  background: rgba(21, 37, 48, 0.74);
}

.menu-nav button:focus-visible,
.menu-nav a:focus-visible {
  box-shadow: 0 0 0 2px white;
}

.nav-count {
  padding: 0.14rem 0.3rem;
  border-radius: 999px;
  color: var(--goose-soft);
  background: rgba(255, 210, 74, 0.08);
  font-family: var(--mono);
  font-size: 0.5rem;
}

.menu-footer {
  margin-top: 0.8rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #657a86;
  font-family: var(--mono);
  font-size: 0.54rem;
}

/* HUD */

.game-hud {
  position: fixed;
  z-index: 10;
  inset: 0;
  color: var(--white);
  pointer-events: none;
  user-select: none;
}

.hud-top,
.hud-bottom {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right));
  left: max(1rem, env(safe-area-inset-left));
  display: grid;
  align-items: center;
}

.hud-top {
  top: max(0.9rem, env(safe-area-inset-top));
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
}

.hud-bottom {
  bottom: max(1rem, env(safe-area-inset-bottom));
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
}

.hud-cluster {
  min-height: 3.3rem;
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(207, 235, 246, 0.14);
  border-radius: 0.6rem;
  background: rgba(4, 12, 18, 0.55);
  box-shadow: 0 0.6rem 1.7rem rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(0.75rem);
}

.hud-cluster--left {
  justify-self: start;
}

.hud-cluster--center {
  min-height: 2.3rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.hud-cluster--right {
  justify-self: end;
}

.hud-mode {
  min-width: 7rem;
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-right: 1px solid var(--line);
}

.hud-mode__icon {
  font-size: 1.65rem;
  line-height: 1;
  filter: drop-shadow(0 0.3rem 0.3rem rgba(0, 0, 0, 0.25));
}

.hud-mode small,
.hud-mode strong,
.hud-stat small,
.hud-stat output {
  display: block;
}

.hud-mode small,
.hud-stat small,
.hud-combo small {
  color: #7f96a3;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hud-mode strong {
  margin-top: 0.08rem;
  font-size: 0.72rem;
  font-weight: 850;
}

.hud-stat {
  min-width: 5.5rem;
  padding: 0.52rem 0.8rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--line);
}

.hud-stat:last-child {
  border-right: 0;
}

.hud-stat output {
  margin-top: 0.06rem;
  color: var(--goose-soft);
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.hud-stat--muted output {
  color: #b4c3ca;
  font-size: 0.75rem;
}

.hud-stat--wave {
  min-width: 4.3rem;
  border-right: 1px solid var(--line);
  text-align: center;
}

.hud-stat--wave output {
  color: var(--heli-soft);
}

.hud-hearts {
  min-height: 2.25rem;
  padding: 0.4rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid rgba(208, 234, 246, 0.14);
  border-radius: 999px;
  background: rgba(4, 12, 18, 0.55);
  backdrop-filter: blur(0.75rem);
}

.hud-hearts span {
  color: var(--danger);
  font-size: 0.76rem;
  filter: drop-shadow(0 0 0.35rem rgba(255, 98, 111, 0.4));
}

.hud-hearts span.is-empty {
  color: rgba(255, 255, 255, 0.15);
  filter: none;
}

.hud-combo {
  min-width: 7rem;
  margin-left: 0.45rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid rgba(255, 210, 74, 0.2);
  border-radius: 0.45rem;
  background: rgba(16, 14, 5, 0.68);
  backdrop-filter: blur(0.75rem);
}

.hud-combo > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.hud-combo strong {
  color: var(--goose);
  font-family: var(--mono);
  font-size: 0.84rem;
  font-weight: 900;
}

.hud-icon-button {
  width: 2.75rem;
  border: 0;
  border-left: 1px solid var(--line);
  outline: none;
  color: #b9c9d1;
  background: transparent;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 900;
  pointer-events: auto;
  cursor: pointer;
}

.hud-icon-button:hover,
.hud-icon-button:focus-visible {
  color: white;
  background: rgba(255, 255, 255, 0.07);
}

.hud-icon-button:focus-visible {
  box-shadow: inset 0 0 0 2px white;
}

.hud-boss {
  position: absolute;
  top: max(4.8rem, calc(env(safe-area-inset-top) + 4.3rem));
  left: 50%;
  width: min(34rem, calc(100% - 2rem));
  padding: 0.5rem 0.65rem 0.58rem;
  border: 1px solid rgba(255, 98, 111, 0.25);
  border-radius: 0.48rem;
  background: rgba(25, 6, 10, 0.65);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(0.8rem);
  transform: translateX(-50%);
}

.hud-boss__label {
  margin-bottom: 0.35rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.55rem;
  text-transform: uppercase;
}

.hud-boss__label span {
  color: #9f6d75;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.hud-boss__label strong {
  color: #ffd7da;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.hud-boss__label output {
  justify-self: end;
  color: #d6a4aa;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.hud-meter {
  position: relative;
  width: 100%;
  height: 0.2rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.hud-meter > span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: var(--heli);
  box-shadow: 0 0 0.5rem rgba(112, 202, 245, 0.42);
  transform-origin: left center;
  transition: width 80ms linear, background-color 120ms ease;
}

.hud-meter--combo > span {
  background: var(--goose);
  box-shadow: 0 0 0.5rem rgba(255, 210, 74, 0.45);
}

.hud-meter--boss {
  height: 0.28rem;
}

.hud-meter--boss > span {
  background: var(--danger);
  box-shadow: 0 0 0.6rem rgba(255, 98, 111, 0.6);
}

.threat-locator {
  --threat-angle: 0deg;
  position: fixed;
  z-index: 11;
  width: 2.75rem;
  height: 2.75rem;
  color: #ff7b86;
  filter: drop-shadow(0 0.12rem 0.22rem rgba(0, 0, 0, 0.9));
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.threat-locator__ring {
  position: absolute;
  inset: 0.34rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 0.55rem rgba(255, 70, 84, 0.42);
}

.threat-locator__ring::before,
.threat-locator__ring::after {
  position: absolute;
  background: currentColor;
  content: "";
}

.threat-locator__ring::before {
  top: 50%;
  right: -0.38rem;
  left: -0.38rem;
  height: 1px;
}

.threat-locator__ring::after {
  top: -0.38rem;
  bottom: -0.38rem;
  left: 50%;
  width: 1px;
}

.threat-locator__arrow {
  position: absolute;
  top: -0.52rem;
  left: 50%;
  width: 0;
  height: 0;
  border-right: 0.3rem solid transparent;
  border-bottom: 0.54rem solid currentColor;
  border-left: 0.3rem solid transparent;
  opacity: 0;
  transform: translateX(-50%) rotate(var(--threat-angle));
  transform-origin: 50% 1.9rem;
}

.threat-locator[data-edge="true"] .threat-locator__arrow {
  opacity: 1;
}

.threat-locator__distance {
  position: absolute;
  top: calc(100% + 0.12rem);
  left: 50%;
  min-width: 3.4rem;
  color: #ffd8dc;
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 850;
  text-align: center;
  text-shadow: 0 1px 0.24rem #000;
  white-space: nowrap;
  transform: translateX(-50%);
}

.hud-abilities {
  justify-self: start;
  display: flex;
  gap: 0.45rem;
}

.hud-ability {
  min-width: 8.5rem;
  padding: 0.45rem 0.58rem;
  display: grid;
  grid-template-columns: auto minmax(4.5rem, 1fr);
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(207, 235, 246, 0.14);
  border-radius: 0.48rem;
  background: rgba(4, 12, 18, 0.55);
  backdrop-filter: blur(0.75rem);
}

.hud-key {
  min-width: 2.2rem;
  height: 1.45rem;
  padding-inline: 0.3rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(222, 241, 249, 0.22);
  border-radius: 0.25rem;
  color: #b7c8d0;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 -0.12rem 0 rgba(0, 0, 0, 0.2);
  font-family: var(--mono);
  font-size: 0.46rem;
  font-weight: 900;
}

.hud-ability__label {
  margin-bottom: 0.27rem;
  display: block;
  color: #bdcbd2;
  font-size: 0.56rem;
  font-weight: 800;
}

.hud-status-message {
  justify-self: center;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(255, 210, 74, 0.24);
  border-radius: 999px;
  color: var(--goose-soft);
  background: rgba(18, 15, 4, 0.62);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(0.75rem);
  font-size: 0.57rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.hud-resources {
  justify-self: end;
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
}

.hud-resource {
  min-width: 8rem;
  padding: 0.48rem 0.6rem;
  border: 1px solid rgba(207, 235, 246, 0.14);
  border-radius: 0.48rem;
  background: rgba(4, 12, 18, 0.55);
  backdrop-filter: blur(0.75rem);
}

.hud-resource__label {
  margin-bottom: 0.31rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: #aebfc7;
  font-size: 0.55rem;
  font-weight: 800;
}

.hud-resource__label output {
  color: #dbe7eb;
  font-family: var(--mono);
  font-size: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.hud-resource--compact {
  min-width: 4.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #95a9b4;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hud-resource--compact output {
  margin-top: 0.08rem;
  color: var(--heli-soft);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 900;
}

.hud-meter--heat > span {
  background: linear-gradient(90deg, var(--heli), var(--goose), var(--danger));
}

.hud-meter--dignity > span {
  background: var(--romance);
  box-shadow: 0 0 0.5rem rgba(255, 118, 173, 0.38);
}

/* Modal layers */

.modal-layer {
  padding:
    max(1rem, env(safe-area-inset-top))
    max(1rem, env(safe-area-inset-right))
    max(1rem, env(safe-area-inset-bottom))
    max(1rem, env(safe-area-inset-left));
  overflow: auto;
  display: grid;
  place-items: center;
  background: rgba(2, 7, 11, 0.69);
  backdrop-filter: blur(0.5rem);
  scrollbar-width: thin;
}

.modal-card {
  position: relative;
  width: min(31rem, 100%);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 45%),
    var(--glass-strong);
  box-shadow:
    0 2rem 6rem rgba(0, 0, 0, 0.45),
    inset 0 1px rgba(255, 255, 255, 0.04);
}

.modal-card--compact {
  width: min(25rem, 100%);
  text-align: center;
}

.modal-card--wide {
  width: min(62rem, 100%);
}

.modal-card--options {
  width: min(66rem, 100%);
}

.modal-card h2 {
  margin: 0.2rem 0 0;
  color: var(--white);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 920;
  letter-spacing: -0.055em;
  line-height: 1;
  text-transform: uppercase;
}

.modal-lead {
  margin: 0.75rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.modal-actions {
  display: grid;
  gap: 0.48rem;
}

.modal-actions--row {
  grid-template-columns: 1fr 1fr;
}

.ui-button {
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  outline: none;
  color: #d9e4e9;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.ui-button:hover,
.ui-button:focus-visible {
  border-color: rgba(222, 240, 247, 0.4);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.ui-button:focus-visible {
  box-shadow: 0 0 0 2px var(--night), 0 0 0 4px white;
}

.ui-button--primary {
  border-color: rgba(255, 210, 74, 0.55);
  color: #211c08;
  background: linear-gradient(180deg, #ffe27a, var(--goose));
  box-shadow: 0 0.65rem 1.7rem rgba(255, 210, 74, 0.12);
}

.ui-button--primary:hover,
.ui-button--primary:focus-visible {
  border-color: #fff2bd;
  color: #121006;
  background: #ffe88e;
}

.ui-button--quiet {
  color: #8fa3ad;
  background: transparent;
}

.modal-shortcut {
  margin: 1rem 0 0;
  color: #657a86;
  font-size: 0.59rem;
}

kbd {
  min-width: 1.55rem;
  padding: 0.22rem 0.35rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(215, 236, 245, 0.2);
  border-radius: 0.26rem;
  color: #d3e0e5;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 -0.12rem rgba(0, 0, 0, 0.2);
  font-family: var(--mono);
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1;
}

.modal-header {
  margin-bottom: 1.4rem;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.modal-header__tools {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-header__tools output {
  color: #8095a1;
  font-family: var(--mono);
  font-size: 0.6rem;
}

.modal-close {
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  outline: none;
  color: #adbec6;
  background: rgba(255, 255, 255, 0.035);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus-visible {
  border-color: rgba(223, 241, 248, 0.4);
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.modal-close:focus-visible {
  box-shadow: 0 0 0 2px white;
}

/* Game over */

.game-over-card {
  text-align: center;
}

.over-score {
  margin: 1rem 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.025);
}

.over-score > span {
  padding: 1rem;
}

.over-score > span + span {
  border-left: 1px solid var(--line);
}

.over-score small,
.over-score output {
  display: block;
}

.over-score small {
  color: #768b98;
  font-size: 0.53rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.over-score output {
  margin-top: 0.15rem;
  color: var(--goose);
  font-family: var(--mono);
  font-size: 1.8rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.over-score > span + span output {
  color: #c8d7de;
  font-size: 1.2rem;
}

.over-stats {
  margin: 0 0 1.1rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}

.over-stats div {
  padding: 0.65rem 0.35rem;
  border: 1px solid rgba(211, 235, 245, 0.1);
  border-radius: 0.4rem;
}

.over-stats dt {
  color: #738995;
  font-size: 0.5rem;
  font-weight: 750;
  text-transform: uppercase;
}

.over-stats dd {
  margin: 0.15rem 0 0;
  color: #d0dde3;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 850;
}

.new-best {
  margin: 0 0 1rem;
  padding: 0.45rem;
  border: 1px solid rgba(255, 210, 74, 0.25);
  border-radius: 0.35rem;
  color: var(--goose-soft);
  background: rgba(255, 210, 74, 0.06);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Controls */

.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.control-side {
  padding: clamp(1rem, 2.4vw, 1.4rem);
  background: rgba(255, 255, 255, 0.018);
}

.control-side + .control-side {
  border-left: 1px solid var(--line);
}

.control-side--goose {
  box-shadow: inset 0 0.15rem var(--goose);
}

.control-side--heli {
  box-shadow: inset 0 0.15rem var(--heli);
}

.control-side__heading {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.control-side__heading > span {
  font-size: 2.3rem;
  line-height: 1;
}

.control-side__heading small {
  color: #718692;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.control-side__heading h3 {
  margin: 0.15rem 0 0;
  font-size: 1rem;
}

.control-side--goose h3 {
  color: var(--goose-soft);
}

.control-side--heli h3 {
  color: var(--heli-soft);
}

.control-list {
  margin: 0;
}

.control-list > div {
  min-height: 2.7rem;
  display: grid;
  grid-template-columns: 10rem 1fr;
  align-items: center;
  gap: 0.7rem;
  border-bottom: 1px solid rgba(211, 235, 245, 0.08);
}

.control-list dt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.control-list dd {
  margin: 0;
  color: #b6c5cc;
  font-size: 0.65rem;
  font-weight: 700;
}

.control-side > p {
  margin: 0.9rem 0 0;
  color: #738894;
  font-size: 0.61rem;
  line-height: 1.55;
}

.common-controls {
  margin-top: 0.7rem;
  padding: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1.5rem;
  border: 1px solid rgba(211, 235, 245, 0.09);
  border-radius: 0.45rem;
  color: #8296a1;
  font-size: 0.59rem;
}

/* Medals */

.medals-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.medal {
  min-width: 0;
  min-height: 4.5rem;
  padding: 0.75rem;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  border: 1px solid rgba(210, 235, 245, 0.09);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.018);
}

.medal__seal {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(221, 238, 246, 0.18);
  border-radius: 50%;
  color: #607681;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 0.22rem rgba(4, 12, 18, 0.6);
  font-size: 0.85rem;
}

.medal.is-unlocked {
  border-color: rgba(255, 210, 74, 0.2);
  background: rgba(255, 210, 74, 0.035);
}

.medal.is-unlocked .medal__seal {
  border-color: #8e6c08;
  color: #785a00;
  background: linear-gradient(145deg, #fff0a4, var(--goose));
  box-shadow:
    inset 0 0 0 0.22rem rgba(255, 242, 178, 0.2),
    0 0 1rem rgba(255, 210, 74, 0.14);
}

.medal__name {
  overflow: hidden;
  display: block;
  color: #697e8a;
  font-size: 0.66rem;
  font-weight: 860;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.medal.is-unlocked .medal__name {
  color: var(--goose-soft);
}

.medal__description {
  margin-top: 0.2rem;
  display: block;
  color: #5e737e;
  font-size: 0.56rem;
  line-height: 1.35;
}

.medal.is-unlocked .medal__description {
  color: #95a8b1;
}

/* Options */

.options-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}

.options-section {
  min-width: 0;
  padding: 1rem;
}

.options-section:nth-child(even) {
  border-left: 1px solid var(--line);
}

.options-section:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.options-section__heading {
  min-height: 3.2rem;
  margin-bottom: 0.5rem;
}

.options-section__heading h3 {
  margin: 0;
  color: #dce7eb;
  font-size: 0.78rem;
  font-weight: 850;
}

.options-section__heading p {
  margin: 0.2rem 0 0;
  color: #6d828e;
  font-size: 0.55rem;
  line-height: 1.35;
}

.option-grid {
  display: grid;
  gap: 0.35rem;
}

.option-row {
  position: relative;
  min-height: 3.7rem;
  padding: 0.55rem 0.65rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(211, 235, 245, 0.08);
  border-radius: 0.42rem;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.option-row:hover,
.option-row:focus-within {
  border-color: rgba(215, 237, 246, 0.22);
  background: rgba(255, 255, 255, 0.035);
}

.option-row strong,
.option-row small {
  display: block;
}

.option-row strong {
  color: #c7d5db;
  font-size: 0.62rem;
  font-weight: 820;
}

.option-row small {
  margin-top: 0.14rem;
  color: #697f8b;
  font-size: 0.5rem;
  line-height: 1.3;
}

.option-row input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.option-switch {
  background: rgba(112, 202, 245, 0.27);
}

.option-row input:not(:checked) + .option-switch {
  background: rgba(255, 255, 255, 0.055);
}

.option-row input:not(:checked) + .option-switch::after {
  left: 0.15rem;
  background: #8397a1;
}

.option-row input:focus-visible + .option-switch {
  box-shadow: 0 0 0 2px var(--night), 0 0 0 4px white;
}

.option-row--select {
  margin-bottom: 0.35rem;
}

.option-row select {
  min-width: 6.4rem;
  height: 2rem;
  padding: 0 1.7rem 0 0.55rem;
  border: 1px solid rgba(215, 238, 247, 0.18);
  border-radius: 0.34rem;
  outline: none;
  color: #dbe8ed;
  background:
    linear-gradient(45deg, transparent 50%, #9bb0ba 50%) calc(100% - 0.75rem) 50% / 0.3rem 0.3rem no-repeat,
    linear-gradient(135deg, #9bb0ba 50%, transparent 50%) calc(100% - 0.45rem) 50% / 0.3rem 0.3rem no-repeat,
    #0c1922;
  appearance: none;
  font-size: 0.56rem;
  font-weight: 750;
}

.option-row select:focus-visible {
  border-color: white;
  box-shadow: 0 0 0 2px white;
}

.option-row--secret {
  grid-template-columns: minmax(0, 1fr);
  cursor: text;
}

.option-row--secret input {
  width: 100%;
  min-width: 0;
  height: 2rem;
  padding: 0 0.58rem;
  border: 1px solid rgba(215, 238, 247, 0.18);
  border-radius: 0.34rem;
  outline: none;
  color: #dbe8ed;
  background: #0c1922;
  font-family: var(--mono);
  font-size: 0.58rem;
}

.option-row--secret input::placeholder {
  color: #5f7581;
}

.option-row--secret input:focus-visible {
  border-color: white;
  box-shadow: 0 0 0 2px white;
}

.data-source-note {
  margin: 0.55rem 0 0;
  padding: 0.65rem;
  border: 1px solid rgba(112, 202, 245, 0.12);
  border-radius: 0.42rem;
  color: #718792;
  background: rgba(112, 202, 245, 0.025);
  font-size: 0.52rem;
  line-height: 1.5;
}

.options-footer {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.options-footer p {
  margin: 0;
  color: #627782;
  font-size: 0.54rem;
}

.text-button {
  padding: 0.35rem 0;
  border: 0;
  border-bottom: 1px solid rgba(205, 231, 242, 0.25);
  outline: none;
  color: #9db0b9;
  background: transparent;
  font-size: 0.56rem;
  font-weight: 750;
  cursor: pointer;
}

.text-button:hover,
.text-button:focus-visible {
  border-color: white;
  color: white;
}

/* Toasts and announcements */

.toast-region {
  position: fixed;
  z-index: 50;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(20rem, calc(100% - 2rem));
  display: grid;
  gap: 0.45rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 0.85rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  border: 1px solid rgba(255, 210, 74, 0.3);
  border-radius: 0.55rem;
  background: rgba(7, 16, 23, 0.92);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(0.8rem);
  animation: toast-in 220ms ease-out both;
}

.toast.is-leaving {
  animation: toast-out 200ms ease-in both;
}

.toast__icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #745700;
  background: var(--goose);
  font-size: 0.7rem;
}

.toast strong,
.toast small {
  display: block;
}

.toast strong {
  color: var(--goose-soft);
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toast small {
  margin-top: 0.12rem;
  color: #8fa3ad;
  font-size: 0.54rem;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(1rem);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(1rem);
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Responsive game UI */

@media (min-width: 1100px) {
  .main-menu__layout {
    margin-left: clamp(1rem, 5vw, 6rem);
  }
}

@media (max-width: 920px) {
  .main-menu__layout {
    margin: 0 auto;
  }

  .menu-tools {
    grid-template-columns: 1fr;
  }

  .options-form {
    grid-template-columns: 1fr;
  }

  .options-section:nth-child(even) {
    border-left: 0;
  }

  .options-section + .options-section {
    border-top: 1px solid var(--line);
  }

  .hud-top {
    grid-template-columns: 1fr auto;
  }

  .hud-cluster--center {
    position: absolute;
    top: 4rem;
    left: 50%;
    transform: translateX(-50%);
  }

  .hud-bottom {
    grid-template-columns: 1fr 1fr;
  }

  .hud-status-message {
    display: none;
  }
}

@media (max-width: 700px) {
  .performance-badge {
    top: auto;
    right: max(0.5rem, env(safe-area-inset-right));
    bottom: max(0.5rem, env(safe-area-inset-bottom));
    opacity: 0.72;
  }

  /* On phones the boss/threat banner spans the full width at the same
     height the badge uses on desktop — tuck the badge under it. */
  .is-playing .performance-badge,
  .is-paused .performance-badge,
  .is-over .performance-badge {
    top: max(7rem, calc(env(safe-area-inset-top) + 6.5rem));
    right: auto;
    left: max(0.5rem, env(safe-area-inset-left));
  }

  .main-menu__layout {
    padding-top: max(3rem, calc(env(safe-area-inset-top) + 2rem));
  }

  .menu-brand {
    margin-bottom: 1.4rem;
  }

  .menu-title {
    flex-wrap: wrap;
  }

  .side-card {
    min-height: 7.25rem;
    grid-template-columns: 1.5rem 3.4rem minmax(0, 1fr);
  }

  .side-card__icon {
    font-size: 2.7rem;
  }

  .side-card__description {
    max-width: 25rem;
  }

  .menu-footer {
    flex-direction: column;
    gap: 0.22rem;
  }

  .hud-top,
  .hud-bottom {
    right: 0.5rem;
    left: 0.5rem;
  }

  .hud-mode {
    min-width: 3rem;
    padding-inline: 0.5rem;
  }

  .hud-mode > span:last-child,
  .hud-stat--muted {
    display: none;
  }

  .hud-stat {
    min-width: 4.4rem;
    padding-inline: 0.5rem;
  }

  .hud-abilities {
    gap: 0.25rem;
  }

  .hud-ability {
    min-width: 5.5rem;
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .hud-key {
    display: none;
  }

  .hud-resources {
    gap: 0.25rem;
  }

  .hud-resource {
    min-width: 5.6rem;
  }

  .hud-resource--compact {
    min-width: 3.7rem;
  }

  .controls-grid,
  .medals-list {
    grid-template-columns: 1fr;
  }

  .control-side + .control-side {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .options-form {
    display: block;
  }

  .options-section + .options-section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .options-section__heading {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .menu-title__versus {
    display: none;
  }

  .main-menu__layout {
    width: calc(100% - 1rem);
  }

  .side-card {
    padding-left: 0.65rem;
    grid-template-columns: 2.7rem minmax(0, 1fr);
  }

  .side-card__number {
    display: none;
  }

  .side-card__description {
    font-size: 0.65rem;
  }

  .menu-nav {
    grid-template-columns: 1fr;
  }

  .hud-mode {
    display: none;
  }

  .hud-cluster--left {
    min-width: 4.4rem;
  }

  .hud-cluster--right .hud-stat {
    min-width: 3.5rem;
  }

  .hud-cluster--center {
    top: 3.8rem;
  }

  .hud-combo {
    min-width: 5rem;
  }

  .hud-bottom {
    align-items: end;
  }

  .hud-ability {
    min-width: 4.3rem;
  }

  .hud-resource {
    min-width: 4.7rem;
  }

  .hud-resource--compact {
    min-width: 3.2rem;
  }

  #hud-dignity-group {
    display: none;
  }

  .modal-actions--row {
    grid-template-columns: 1fr;
  }

  .control-list > div {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.5rem 0;
  }

  .options-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-height: 720px) and (min-width: 701px) {
  .main-menu__layout {
    padding-top: max(2rem, env(safe-area-inset-top));
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
  }

  .menu-brand {
    margin-bottom: 1rem;
  }

  .menu-tagline {
    margin-top: 0.45rem;
  }

  .side-card {
    min-height: 6.4rem;
  }

  .side-card__description {
    display: none;
  }

  .mating-toggle {
    min-height: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- touch controls ---------- */

/* Hidden everywhere by default; the coarse-pointer media query below turns
   them on during play. All pads float above the canvas but below modals. */
.touch-controls {
  display: none;
}

.touch-stick {
  position: fixed;
  z-index: 30;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1.05rem, env(safe-area-inset-bottom));
  width: 7.6rem;
  height: 7.6rem;
  border: 2px solid rgba(214, 235, 247, 0.34);
  border-radius: 50%;
  background: rgba(8, 18, 26, 0.44);
  box-shadow: inset 0 0 1.6rem rgba(2, 8, 12, 0.55);
  backdrop-filter: blur(0.35rem);
  touch-action: none;
  pointer-events: auto;
}

.touch-stick__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.9rem;
  height: 2.9rem;
  margin: -1.45rem 0 0 -1.45rem;
  border: 2px solid rgba(226, 243, 252, 0.55);
  border-radius: 50%;
  background: rgba(95, 178, 232, 0.42);
  box-shadow: 0 0.2rem 0.7rem rgba(0, 0, 0, 0.4);
  will-change: transform;
}

.touch-rail {
  position: fixed;
  z-index: 30;
  right: max(0.95rem, env(safe-area-inset-right));
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 9.9rem);
  display: grid;
  width: 3rem;
  height: 7.4rem;
  border: 2px solid rgba(214, 235, 247, 0.3);
  border-radius: 999px;
  background: rgba(8, 18, 26, 0.44);
  place-items: center;
  touch-action: none;
  pointer-events: auto;
}

.touch-rail__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.2rem;
  height: 2.2rem;
  margin-top: -1.1rem;
  border: 2px solid rgba(226, 243, 252, 0.55);
  border-radius: 50%;
  background: rgba(255, 210, 74, 0.42);
  transform: translate(-50%, 0);
  will-change: transform;
}

.touch-rail__arrow {
  position: absolute;
  left: 50%;
  color: rgba(226, 243, 252, 0.6);
  font-size: 0.6rem;
  transform: translateX(-50%);
}

.touch-rail__arrow--up {
  top: 0.38rem;
}

.touch-rail__arrow--down {
  bottom: 0.38rem;
}

.touch-buttons {
  position: fixed;
  z-index: 30;
  right: max(0.95rem, env(safe-area-inset-right));
  bottom: max(1.05rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: 0.55rem;
  pointer-events: none;
}

.touch-button {
  display: grid;
  border: 2px solid rgba(214, 235, 247, 0.4);
  border-radius: 50%;
  color: #eaf6fd;
  background: rgba(18, 38, 52, 0.62);
  box-shadow: 0 0.25rem 0.9rem rgba(0, 0, 0, 0.4);
  place-items: center;
  font-family: var(--mono);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  touch-action: none;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.touch-button--large {
  width: 4.6rem;
  height: 4.6rem;
  border-color: rgba(255, 181, 46, 0.6);
  background: rgba(84, 52, 6, 0.6);
  color: #ffe9c4;
  font-size: 0.62rem;
}

.touch-button--small {
  width: 3.4rem;
  height: 3.4rem;
}

.touch-button[data-held="true"] {
  filter: brightness(1.5);
  transform: scale(0.94);
}

@media (pointer: coarse) {
  .game-app[data-ui-state="playing"] .touch-controls {
    display: contents;
  }

  /* Touch pads replace the keyboard hint cards, and the minimap moves to
     the top-right so the right thumb owns the lower-right corner. */
  .game-app[data-ui-state="playing"] .hud-abilities,
  .game-app[data-ui-state="playing"] .hud-status-message {
    display: none;
  }

  .game-app[data-ui-state="playing"] .hud-bottom {
    grid-template-columns: 1fr;
    justify-items: center;
    /* Keep the resource cards clear of the stick (left) and the action
       buttons (right). */
    padding: 0 6.2rem 0.3rem 8.6rem;
  }

  .game-app[data-ui-state="playing"] .minimap {
    top: max(8.4rem, calc(env(safe-area-inset-top) + 7.9rem));
    right: max(0.9rem, env(safe-area-inset-right));
    bottom: auto;
  }

  .game-app[data-ui-state="playing"] .minimap canvas {
    width: 96px;
    height: 96px;
  }
}

/* ---------- seduction telegraph ---------- */

.seduction-alert {
  position: fixed;
  z-index: 12;
  top: max(7.4rem, calc(env(safe-area-inset-top) + 6.8rem));
  left: 50%;
  max-width: min(92vw, 30rem);
  padding: 0.5rem 1rem;
  border: 1.5px solid rgba(255, 122, 178, 0.65);
  border-radius: 999px;
  color: #ffe3ef;
  background: rgba(64, 10, 34, 0.82);
  box-shadow: 0 0 1.4rem rgba(255, 90, 150, 0.45);
  backdrop-filter: blur(0.6rem);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
  transform: translateX(-50%);
  animation: seduction-pulse 0.9s ease-in-out infinite;
}

@keyframes seduction-pulse {
  0%,
  100% {
    box-shadow: 0 0 1.1rem rgba(255, 90, 150, 0.35);
    transform: translateX(-50%) scale(1);
  }

  50% {
    box-shadow: 0 0 2rem rgba(255, 90, 150, 0.7);
    transform: translateX(-50%) scale(1.05);
  }
}

/* Pink pulsing edge vignette while a seduction is in progress — visible even
   when the latched pair is off-camera. Sits under every modal/overlay. */
.game-app[data-seduction="active"]::after {
  position: fixed;
  z-index: 9;
  inset: 0;
  content: "";
  box-shadow: inset 0 0 16vmin rgba(255, 92, 158, 0.42);
  pointer-events: none;
  animation: seduction-vignette 1.1s ease-in-out infinite;
}

@keyframes seduction-vignette {
  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

.game-app[data-seduction="active"] .hud-meter--dignity > span {
  animation: seduction-meter 0.7s linear infinite;
}

@keyframes seduction-meter {
  50% {
    filter: brightness(1.7);
  }
}

/* ---------- round minimap ---------- */

.minimap {
  position: absolute;
  right: max(1.1rem, env(safe-area-inset-right));
  bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 7.6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}

.minimap canvas {
  width: 158px;
  height: 158px;
  border-radius: 50%;
  background: rgba(10, 20, 30, 0.72);
  border: 2.5px solid rgba(214, 235, 247, 0.28);
  box-shadow:
    0 0 0 4px rgba(8, 16, 25, 0.55),
    inset 0 0 22px rgba(4, 10, 16, 0.65),
    0 6px 18px rgba(2, 6, 10, 0.5);
}

.minimap__city {
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: rgba(10, 20, 30, 0.78);
  border: 1.5px solid rgba(214, 235, 247, 0.22);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #ffd24a;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 860px), (max-height: 560px) {
  .minimap canvas {
    width: 118px;
    height: 118px;
  }

  .minimap {
    bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 6.4rem);
  }
}
