:root {
  --kzt-background: #05050a;
  --kzt-text: #e6e9ef;
  --kzt-dim: #8b93a3;
  --kzt-pro: #6ea8ff;
  --kzt-tp: #ffad66;
}

/* Native hidden state also wins over grid/flex display rules. */
[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--kzt-text);
  font-family: "SF Mono", "JetBrains Mono", "Fira Mono", Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}

#gameplay {
  position: fixed;
  inset: 0;
  overflow: hidden;
  container-type: size;
}

#viewport {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
}

.kzt-crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
  background: rgba(230, 233, 239, 0.55);
  pointer-events: none;
}

.kzt-hud {
  position: absolute;
  left: 50%;
  bottom: 16%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.kzt-keys {
  display: grid;
  grid-template-columns: repeat(3, min(60px, 18cqw));
  grid-template-rows: repeat(2, min(26px, 8cqw));
  gap: min(6px, 1.5cqw);
  justify-items: center;
  align-items: center;
}

.kzt-key {
  color: #fff;
  font-size: min(15px, 4cqw);
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.kzt-speed {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.kzt-speed-value {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.kzt-speed-value.is-perf {
  color: #58d17a;
}

.kzt-speed-unit {
  font-size: 11px;
  color: var(--kzt-dim);
}

.kzt-top {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(50% - 12px);
}

.kzt-timer {
  flex-shrink: 0;
  color: #fff;
  font-size: min(20px, 5cqw);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.kzt-run-mode[data-mode="PRO"] { color: var(--kzt-pro); }
.kzt-run-mode[data-mode="TP"] { color: var(--kzt-tp); }

.kzt-status {
  min-height: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--kzt-dim);
  letter-spacing: 0.03em;
}

.kzt-capture-prompt {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: #0009;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.kzt-capture-mouse {
  width: min(112px, 24cqw, 28cqh);
  height: auto;
  filter: drop-shadow(0 2px 8px #0006);
}

.kzt-capture-lmb {
  animation: capture-lmb-flash 500ms steps(1, end) infinite;
}

@keyframes capture-lmb-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.12; }
}

.kzt-chat {
  position: absolute;
  left: 14px;
  bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: calc(100% - 28px);
  max-height: max(0px, min(35%, calc(50% - 28px), calc(100% - 76px)));
  overflow: hidden;
  justify-content: flex-end;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.kzt-chat-line {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.kzt-chat-input {
  position: absolute;
  left: 14px;
  bottom: 8px;
  display: none;
  align-items: stretch;
  gap: 6px;
  max-width: calc(100% - 28px);
  overflow-wrap: anywhere;
  font-size: 12px;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.kzt-chat-input.is-open {
  display: flex;
}

.kzt-chat-prompt {
  color: var(--kzt-dim);
}

.kzt-chat-draft {
  min-width: 1ch;
  white-space: pre;
}

.kzt-chat-caret {
  width: 7px;
  background: var(--kzt-text);
  animation: kzt-caret 1s steps(1, end) infinite;
}

@keyframes kzt-caret {
  50% {
    opacity: 0;
  }
}

/* Plugin and system lines, e.g. the NullBind toggle. */
.kzt-chat-white {
  color: var(--kzt-text);
}

/* Distance-tier colours, matching GOKZ `gC_DistanceTierChatColours`. */
.kzt-chat-grey {
  color: #9aa2b1;
}

.kzt-chat-blue {
  color: #6ea8ff;
}

.kzt-chat-green {
  color: #58d17a;
}

.kzt-chat-darkred {
  color: #ff5a5a;
}

.kzt-chat-gold {
  color: #f5b942;
}

@container (height < 420px) {
  .kzt-hud {
    transform: translateX(-50%) scale(0.7);
    transform-origin: bottom center;
  }

  .kzt-chat,
  .kzt-chat-input {
    font-size: 10px;
  }
}

@container (width < 700px) {
  .kzt-chat {
    bottom: calc(16% + 110px);
    max-height: max(0px, min(30%, calc(50% - 90px)));
  }
}

/* Map selection */
@font-face {
  font-family: "InterVariable";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
}

#main-menu {
  height: 100%;
  overflow-y: auto;
  background: #111111;
  font-family: "InterVariable", "Segoe UI", Arial, sans-serif;
  font-optical-sizing: auto;
  font-synthesis: none;
  line-height: 1.5;
}

.menu-shell {
  max-width: 1440px;
  margin: auto;
  padding: 0 64px 32px;
}

.menu-header {
  display: flex;
  align-items: center;
  min-height: 104px;
}

.menu-brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: #f5f5f5;
  font-size: 42px;
  font-weight: 720;
  letter-spacing: -0.055em;
  text-decoration: none;
}

.menu-logo { display: block; width: auto; height: 64px; }
.brand-name { line-height: 1; white-space: nowrap; }
.brand-dot { color: #858585; }
.brand-fire {
  display: inline-block;
  color: transparent;
  background-color: #dd4b12;
  background-image:
    radial-gradient(ellipse at 50% 100%, #fff5c0 0 12%, #ffbd42 28%, #fa5c12 45%, transparent 68%),
    radial-gradient(ellipse at 50% 100%, #fff0a0 0 10%, #ff941e 28%, transparent 60%),
    linear-gradient(0deg, #ffbf47, #e34a10 50%, #9e2615);
  background-size: 31px 68px, 44px 72px, 100% 100%;
  background-position: 0 -18px, 20px -22px, 0 0;
  background-repeat: repeat-x;
  -webkit-background-clip: text;
  background-clip: text;
  animation: brand-fire 1.6s ease-in-out infinite;
}

/* Animate only the fill. The glyph clip keeps every bright plume inside the letters. */
@keyframes brand-fire {
  0%, 100% { background-position: 0 -18px, 20px -22px, 0 0; background-size: 31px 68px, 44px 72px, 100% 100%; }
  35% { background-position: 9px -34px, 5px -16px, 0 0; background-size: 26px 74px, 38px 64px, 100% 100%; }
  70% { background-position: -7px -24px, 28px -38px, 0 0; background-size: 36px 62px, 48px 78px, 100% 100%; }
}

.map-browser { padding-top: 20px; }
.map-browser-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.map-browser-heading h1, #map-count { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -0.025em; margin: 0; }
#map-count { color: #919191; font-variant-numeric: tabular-nums; }
.map-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.map-search { display: flex; align-items: center; gap: 10px; max-width: 320px; flex: 1 1 180px; padding: 0 12px; background: #ffffff04; border: 1px solid #ffffff1c; border-radius: 7px; color: #909090; }
.map-search:focus-within { border-color: #b5edb2; }
.map-search svg { width: 16px; height: 16px; flex-shrink: 0; }
.map-search input { width: 100%; min-width: 0; padding: 8px 0; color: #eeeeee; background: transparent; border: 0; outline: 0; font: inherit; font-size: 13px; font-weight: 450; line-height: 20px; color-scheme: dark; }
.map-search input::placeholder { color: #909090; opacity: 1; }
.tier-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.tier-1 { --tier-color: #a3e887; }
.tier-2 { --tier-color: #4fd293; }
.tier-3 { --tier-color: #f6d76b; }
.tier-4 { --tier-color: #ffad66; }
.tier-5 { --tier-color: #f38cb9; }
.tier-6 { --tier-color: #fa7076; }
.tier-7 { --tier-color: #bc9cff; }
.tier-option { display: inline-flex; align-items: center; gap: 5px; color: var(--tier-color, #bdbdbd); background: #ffffff03; border: 1px solid #ffffff12; border-radius: 6px; padding: 8px; font: inherit; font-size: 12px; font-weight: 500; line-height: 1.3; letter-spacing: -0.015em; white-space: nowrap; cursor: pointer; }
.tier-option strong { font-weight: 650; }
.map-tier { color: var(--tier-color); }
.tier-option:hover { background: #ffffff0a; border-color: #ffffff40; }
.tier-option[aria-pressed="true"] { border-color: var(--tier-color, #b5edb2); background: color-mix(in srgb, var(--tier-color, #b5edb2) 12%, #111111); }

.map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.map-card { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid #ffffff18; border-radius: 10px; overflow: hidden; background: #191919; color: inherit; text-decoration: none; transition: border-color 200ms, box-shadow 200ms; }
.map-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 20% 30%, #e0ffd0, transparent 55%),
    radial-gradient(ellipse at 80% 70%, #9ef0b4, transparent 50%),
    linear-gradient(125deg, #477c61, #87d9a7, #477c61);
  background-size: 220% 220%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms;
}
.map-card:is(:hover, :focus-visible) { border-color: #81bf94; box-shadow: 0 0 20px #94e8aa18; }
.map-card:is(:hover, :focus-visible)::before { opacity: 1; animation: map-border-drift 9s ease-in-out infinite alternate; }
@keyframes map-border-drift {
  from { background-position: 0% 20%, 100% 80%, 0% 50%; }
  to { background-position: 100% 80%, 0% 20%, 100% 50%; }
}
.map-preview { position: relative; flex: none; aspect-ratio: 16 / 9; overflow: hidden; background: #242424; }
.map-preview::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, #11111170); pointer-events: none; }
.map-preview img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.map-preview[data-state="loaded"] img { opacity: 1; }
.map-preview-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #bcbcbc; font-size: 12px; }
.map-preview-spinner { width: 28px; height: 28px; border: 2px solid #ffffff20; border-top-color: #b5edb2; border-radius: 50%; animation: transition-spinner-turn 900ms linear infinite; }
.map-run-info { position: absolute; z-index: 1; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 5px; background: #000000a6; border: 1px solid #ffffff1c; border-radius: 5px; padding: 7px 9px; font-size: 11px; font-weight: 550; line-height: 1.3; letter-spacing: -0.01em; }
.map-record { color: #fff; font-variant-numeric: tabular-nums; }
.map-card-body { padding: 8px 16px 9px; }
.map-author { color: #a4a4a4; font-size: 12px; font-weight: 400; line-height: 1.23; margin: 3px 0 0; }
.map-card h2 { font-size: clamp(16px, 1.45vw, 20px); line-height: 1.17; letter-spacing: -0.03em; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.map-empty { text-align: center; border: 1px dashed #ffffff25; border-radius: 10px; padding: 32px 20px; }
.map-empty h2 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 8px; }
.map-empty p { color: #a3a3a3; font-size: 14px; line-height: 1.6; margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#main-menu :is(a, button):focus-visible { outline: 2px solid #b5edb2; outline-offset: 4px; }
.map-card:focus-visible { outline-offset: 2px !important; }

@media (max-width: 1000px) {
  .menu-shell { padding: 0 32px; }
  .menu-header { min-height: 88px; }
  .map-grid { gap: 16px; }
}

@media (max-width: 720px) {
  .menu-shell { padding: 0 22px 24px; }
  .menu-header { min-height: 90px; }
  .menu-logo { height: 56px; }
  .menu-brand { gap: 14px; font-size: 36px; }
  .map-browser { padding-top: 16px; }
  .map-grid { grid-template-columns: 1fr; }
  .map-card-body { padding: 7px 16px 9px; }
  .map-search { max-width: none; flex-basis: 100%; }
  .tier-filter { gap: 6px; }
}

/* Shared full-screen typography; each screen owns its backdrop. */
.screen-transition,
#pause-menu {
  --screen-accent: #b5edb2;
  position: fixed;
  inset: 0;
  isolation: isolate;
  color: #f0f3ee;
  font-family: "InterVariable", "Segoe UI", Arial, sans-serif;
  font-optical-sizing: auto;
  font-synthesis: none;
  line-height: 1.5;
  pointer-events: auto;
}


.screen-transition {
  --screen-accent: #efefef;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vh, 52px);
  overflow: hidden;
  padding: 48px 28px;
  color: #f2f2f2;
  background: #101010;
  text-align: center;
}

.transition-backdrop {
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
}

.transition-backdrop {
  inset: -5%;
  background-image: none;
  background-position: center;
  background-size: cover;
  filter: grayscale(1);
  opacity: 0.4;
  transform: scale(1.04);
  animation: transition-preview-drift 18s ease-in-out infinite alternate;
}

.screen-transition::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 34%, #ffffff04, #10101085 58%, #080808f0),
    linear-gradient(180deg, #10101050, #10101060 45%, #101010eb);
  pointer-events: none;
}

.transition-spinner {
  display: block;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  color: var(--screen-accent);
  animation: transition-spinner-turn 900ms linear infinite;
}

.transition-content {
  width: min(100%, 720px);
}

.transition-content h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 64px);
  font-weight: 580;
  letter-spacing: -0.055em;
  line-height: 1.12;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 28px #00000040;
}

#transition-status {
  max-width: 48ch;
  min-height: 1.5em;
  margin: 20px auto 0;
  color: #b8b8b8;
  font-size: 13px;
  font-weight: 430;
  overflow-wrap: anywhere;
}



.screen-transition[data-phase="leaving"] .transition-spinner {
  animation-play-state: paused;
}



.screen-transition[data-phase="error"] {
  --screen-accent: #efb3a6;
}

.screen-transition[data-phase="error"] .transition-spinner {
  animation: none;
}


.transition-recovery {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 12px 18px;
  border: 1px solid #efb3a650;
  border-radius: 6px;
  color: #f4d8d1;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.transition-recovery:is(:hover, :focus-visible) {
  background: #efb3a612;
  outline: 2px solid #efb3a6;
  outline-offset: 4px;
}

@keyframes transition-preview-drift {
  from { transform: scale(1.04) translate(-0.5%, 0.5%); }
  to { transform: scale(1.1) translate(0.5%, -0.5%); }
}

@keyframes transition-spinner-turn {
  to { transform: rotate(360deg); }
}


#pause-menu {
  z-index: 20;
  display: flex;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: max(36px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) max(36px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
  color: #f4f4f4;
  background: #0009;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  cursor: default;
}

#pause-menu:focus {
  outline: none;
}

.pause-shell {
  width: max-content;
  max-width: 100%;
  margin: auto;
  animation: pause-enter 180ms ease-out both;
}

.pause-heading {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 52px;
}

.pause-icon {
  display: block;
  flex: 0 0 48px;
  width: 48px;
  height: 64px;
}

.pause-details {
  min-width: 0;
}

.pause-map {
  overflow: hidden;
  margin: 0 0 8px;
  color: #f4f4f4;
  font-size: clamp(20px, 2.3vw, 28px);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pause-timer {
  margin: 0;
  color: #c2c2c2;
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.pause-actions {
  --pause-key-width: 112px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: max-content;
  max-width: 100%;
  gap: 24px;
}

.pause-action {
  display: grid;
  grid-template-columns: var(--pause-key-width) max-content;
  min-width: max-content;
  appearance: none;
  align-items: center;
  gap: 24px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  color: inherit;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pause-action:hover { background: #ffffff14; }

.pause-action > span {
  color: #f4f4f4;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.2;
  white-space: nowrap;
}

.pause-action kbd {
  color: #c2c2c2;
  font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1.2;
}

#settings-menu {
  width: min(820px, calc(100vw - 56px));
  max-width: 100%;
}

#settings-menu:focus { outline: none; }

.settings-title {
  margin: 0 0 30px;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.settings-sensitivity,
.settings-binding-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  align-items: center;
  gap: 24px;
}

.settings-sensitivity > label,
.settings-action-name {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.settings-sensitivity { margin-bottom: 30px; }
.settings-sensitivity-inputs { display: flex; align-items: center; gap: 16px; min-width: 0; }
#settings-sensitivity-range { min-width: 0; width: 100%; margin: 0; accent-color: var(--screen-accent); cursor: pointer; }

#settings-sensitivity-value {
  min-width: 5ch;
  color: #f4f4f4;
  font-size: 21px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

#settings-bindings { display: grid; gap: 30px; }
.settings-binding-group { display: grid; gap: 10px; }
.settings-binding-slots { display: flex; align-items: center; gap: 10px; min-width: 0; }
.settings-slot-separator { color: #858b85; font-size: 22px; }

.settings-binding-slot,
.settings-back {
  border: 1px solid #ffffff2b;
  border-radius: 8px;
  padding: 11px 14px;
  color: #f4f4f4;
  background: #ffffff08;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color 100ms, border-color 100ms;
}

.settings-binding-slot { --binding-accent: #efb45f; min-width: 0; flex: 1 1 0; overflow-wrap: anywhere; }
.settings-binding-slot:hover { border-color: #efb45f80; background: #efb45f1c; }
.settings-back:hover { border-color: #b5edb280; background: #b5edb21c; }
.settings-binding-slot[aria-pressed="true"] { border-color: var(--binding-accent); color: var(--binding-accent); background: #efb45f26; }
.settings-commands { margin: 12px 0 0; color: #929892; font-size: 15px; line-height: 1.5; }
.settings-commands p { margin: 4px 0; }
.settings-back {
  display: block;
  margin: 28px auto 0;
  padding: 14px 26px;
  border-color: #ffffff50;
  background: #ffffff14;
  font-size: 22px;
  font-weight: 700;
}
#pause-menu :is(input, button):focus-visible { outline: 2px solid #b5edb2; outline-offset: 3px; }
#pause-menu .settings-binding-slot:focus-visible { outline-color: var(--binding-accent); }
#pause-home .pause-action:focus-visible { outline-color: #c2c2c2; }

@media (max-width: 600px) {
  .settings-title { margin-bottom: 24px; }
  .settings-sensitivity,
  .settings-binding-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .settings-sensitivity > label,
  .settings-action-name { font-size: 18px; }
  .settings-binding-group { gap: 16px; }
  .settings-binding-slot { font-size: 17px; }
  .settings-sensitivity-inputs { gap: 12px; }
  .settings-commands { font-size: 14px; }
}

body.is-paused #gameplay {
  pointer-events: none;
}

body.is-paused .kzt-crosshair {
  opacity: 0;
}

@keyframes pause-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .screen-transition { padding-right: 22px; padding-left: 22px; }
  #transition-status { font-size: 12px; }
  .pause-heading { gap: 20px; margin-bottom: 40px; }
  .pause-icon { flex-basis: 40px; width: 40px; height: 54px; }
  .pause-map { margin-bottom: 6px; }
  .pause-timer { font-size: 14px; }
  .pause-actions { --pause-key-width: clamp(64px, 20vw, 80px); }
  .pause-action { gap: 18px; }
  .pause-action kbd { font-size: 23px; }
}

@media (max-height: 580px) {
  .screen-transition { gap: 24px; padding-top: 28px; padding-bottom: 28px; }
  .transition-spinner { width: 56px; height: 56px; }
  .transition-content h1 { font-size: clamp(26px, 5vw, 42px); }
  #transition-status { margin-top: 12px; }
  #pause-menu { padding-top: max(22px, env(safe-area-inset-top)); padding-bottom: max(22px, env(safe-area-inset-bottom)); }
  .pause-heading { margin-bottom: 28px; }
  .pause-icon { flex-basis: 40px; width: 40px; height: 54px; }
  .pause-map { font-size: 22px; }
  .pause-actions { --pause-key-width: clamp(72px, 13vw, 92px); gap: 20px; }
  .pause-action > span { font-size: clamp(24px, 4.5vw, 32px); }
  .pause-action kbd { font-size: clamp(22px, 3.7vw, 26px); }
}

@media (max-height: 360px) {
  .screen-transition { gap: 18px; padding-top: 18px; padding-bottom: 18px; }
  .transition-spinner { width: 44px; height: 44px; }
  .transition-content h1 { font-size: 26px; }
  #transition-status { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .brand-fire { animation: none; }
  .map-card, .map-card::before { transition: none; }
  .map-card:is(:hover, :focus-visible)::before { animation: none; }
  .map-preview-spinner,
  .transition-backdrop,
  .transition-spinner,
  .pause-shell { animation: none; }
  .kzt-capture-lmb { animation: none; }
  .transition-backdrop { transform: none; }
}
