:root {
  --ui-scale: 1;
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #030612;
  color: #f8fbff;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

body {
  position: fixed;
  inset: 0;
  background: #030612;
  cursor: crosshair;
  user-select: none;
  -webkit-user-select: none;
}

body.hud-hidden {
  cursor: none;
}

body.hud-hidden.hud-menu-open {
  cursor: default;
}

body.hud-hidden .hud,
body.hud-hidden .reticle,
body.hud-hidden .compact-hud-toggles,
body.hud-hidden .touch-joystick,
body.hud-hidden .tool-hotbar,
body.hud-hidden .tech-ledger,
body.hud-hidden .objective-tree,
body.hud-hidden .online-toggle,
body.hud-hidden .settings-toggle,
body.hud-hidden .map-filter,
body.hud-hidden .map-speedometer,
body.hud-hidden .hud__growth-rate,
body.hud-hidden .social-panel,
body.hud-hidden .signal-panel,
body.hud-hidden .command-panel,
body.hud-hidden .player-interaction,
body.hud-hidden .trade-panel,
body.hud-hidden .container-panel,
body.hud-hidden .trade-port-panel,
body.hud-hidden .notifications {
  display: none !important;
}

button,
canvas,
.hud,
.developer-overlay,
.compact-hud-toggles,
.touch-joystick,
.tool-hotbar,
.tech-ledger,
.objective-tree,
.map-filter,
.map-speedometer,
.hud__growth-rate,
.build-menu,
.social-panel,
.signal-panel,
.command-panel,
.player-interaction,
.trade-panel,
.container-panel,
.trade-port-panel,
.difficulty-screen,
.death-screen {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea,
select {
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

#game {
  display: block;
  width: 100vw;
  height: 100vh;
  touch-action: none;
}

.hud {
  position: fixed;
  top: 16px;
  left: 16px;
  zoom: var(--ui-scale);
  max-width: calc(100vw - 32px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  color: #f8fbff;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.hud button,
.leaderboard-panel {
  pointer-events: auto;
}

.hud__group,
.hud__mode,
.hud__progress,
.hud__score,
.hud__body,
.hud__growth-rate,
.hud__leaderboard-toggle {
  min-width: 92px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.62);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
}

.hud__group {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 10px;
}

.hud__group span {
  font-size: 12px;
  line-height: 1;
  color: rgba(232, 241, 255, 0.76);
  letter-spacing: 0;
}

.hud__group strong {
  min-width: 22px;
  font-size: 19px;
  line-height: 1;
  text-align: right;
}

.hud__mode {
  display: grid;
  place-items: center;
  min-width: 84px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #dffcff;
}

.hud__progress {
  width: min(260px, 36vw);
  display: grid;
  grid-template-rows: 18px 8px;
  align-content: center;
  gap: 5px;
  padding: 7px 10px;
}

.hud__progress-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.hud__progress-row span,
.hud__progress-row strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hud__progress-row span {
  color: rgba(232, 241, 255, 0.76);
}

.hud__progress-row strong {
  color: #f8fbff;
}

.hud__progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hud__progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #58e2ff, #ffe56f, #ff73ad);
  box-shadow: 0 0 14px rgba(88, 226, 255, 0.38);
  transition: width 180ms ease-out;
}

.hud__health {
  width: 168px;
}

.hud__health-fill {
  width: 100%;
  background: linear-gradient(90deg, #4fe68e, #f2d95b, #ff6262);
  box-shadow: 0 0 14px rgba(79, 230, 142, 0.36);
}

.hud__energy {
  width: 154px;
}

.hud__energy-fill {
  width: 100%;
  background: linear-gradient(90deg, #66e0b8, #9dff7a, #ffe56f);
  box-shadow: 0 0 14px rgba(157, 255, 122, 0.34);
}

.hud__energy-fill.is-disabled {
  background: linear-gradient(90deg, #ff4050, #ff6f76, #ff9aa4);
  box-shadow: 0 0 16px rgba(255, 64, 80, 0.48);
}

.hud__energy-fill.is-loading {
  background: linear-gradient(90deg, #58e2ff, #8fffd0, #f8fbff);
  box-shadow: 0 0 18px rgba(88, 226, 255, 0.52);
}

.hud__score {
  min-width: 126px;
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  align-items: center;
  gap: 2px;
  padding: 5px 10px;
  color: inherit;
  font: inherit;
  text-align: left;
  text-shadow: inherit;
  cursor: pointer;
}

.hud__score span,
.hud__score strong {
  overflow: hidden;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hud__score span {
  color: rgba(232, 241, 255, 0.72);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.hud__score strong {
  color: #ffe56f;
  font-size: 15px;
  font-weight: 950;
}

.hud__body {
  width: clamp(230px, calc(100vw - 506px), 420px);
  height: auto;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(64px, max-content) minmax(78px, 1fr) minmax(48px, max-content);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
}

.hud__growth-rate {
  min-width: 128px;
  display: grid;
  grid-template-columns: auto minmax(28px, 1fr) auto;
  align-items: baseline;
  gap: 7px;
  padding: 7px 10px;
}

.hud__growth-rate span {
  overflow: hidden;
  color: rgba(232, 241, 255, 0.72);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hud__growth-rate strong {
  color: #ffe56f;
  font-size: 22px;
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: 0;
  text-align: right;
  text-shadow: 0 0 16px rgba(255, 229, 111, 0.28), 0 1px 12px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}

.hud__growth-rate em {
  color: rgba(223, 252, 255, 0.86);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.hud__status-effects {
  display: none;
  align-items: center;
  gap: 5px;
  min-width: 0;
  height: 42px;
  padding: 5px 0;
}

.hud__status-effects.is-visible {
  display: flex;
}

.hud-status-effect {
  --status-progress: 1;
  --status-angle: 0deg;
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(18px, auto);
  align-items: center;
  justify-items: center;
  width: 54px;
  height: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 64, 80, 0.66);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(83, 10, 22, 0.9), rgba(30, 5, 13, 0.92));
  box-shadow: 0 0 16px rgba(255, 31, 47, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #ffdbe0;
}

.hud-status-effect__icon {
  position: relative;
  z-index: 3;
  grid-column: 1;
  font-size: 14px;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 64, 80, 0.8);
}

.hud-status-effect__time {
  position: relative;
  z-index: 3;
  grid-column: 2;
  padding-right: 4px;
  color: #fff0f2;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.72), 0 0 8px rgba(255, 64, 80, 0.64);
}

.hud-status-effect__hand {
  position: absolute;
  left: 11px;
  top: 50%;
  z-index: 2;
  width: 1.5px;
  height: 11px;
  border-radius: 999px;
  background: rgba(255, 238, 242, 0.96);
  box-shadow: 0 0 7px rgba(255, 238, 242, 0.72);
  transform: translate(-50%, -100%) rotate(var(--status-angle));
  transform-origin: 50% 100%;
}

.hud-status-effect__hand::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -2.5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff1f4;
  transform: translateX(-50%);
}

.hud-status-effect__wipe {
  position: absolute;
  inset: 2px;
  border-radius: 5px;
  background: conic-gradient(from -90deg, rgba(255, 255, 255, 0) calc(var(--status-progress) * 1turn), rgba(0, 0, 0, 0.58) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hud__body-label {
  min-width: 0;
  overflow: hidden;
  color: #f8fbff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hud__body-label--next {
  color: #ffe56f;
  font-weight: 950;
  text-align: right;
}

.hud__body-meter {
  position: relative;
  min-width: 0;
  display: grid;
  align-items: center;
}

.hud__body-meter .hud__progress-track {
  grid-area: 1 / 1;
  position: relative;
}

.hud__body-meter .hud__progress-fill {
  position: absolute;
  left: 0;
  top: 0;
}

.hud__body-meter .hud__progress-fill--stellar {
  left: 50%;
  width: 0%;
  background: linear-gradient(90deg, #eef7ff, #8ee7ff, #1c2447);
  box-shadow: 0 0 16px rgba(142, 231, 255, 0.46);
}

.hud__progress-split {
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 2px;
  transform: translateX(-1px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.52);
  opacity: 0;
}

.hud__progress-split.is-visible {
  opacity: 1;
}

.hud__body-meter strong {
  grid-area: 1 / 1;
  z-index: 1;
  padding: 0 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.76);
  white-space: nowrap;
}

.hud__body-rate {
  grid-column: 2 / 4;
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  color: rgba(223, 252, 255, 0.82);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hud__body-rate[hidden] {
  display: none;
}

.hud__leaderboard-toggle {
  color: #f8fbff;
  font: inherit;
  cursor: pointer;
  text-shadow: inherit;
}

.hud__leaderboard-toggle:not(.hud__score) {
  min-width: 128px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
}

.hud__leaderboard-toggle:hover,
.hud__leaderboard-toggle.is-active,
.hud__leaderboard-toggle:focus-visible {
  border-color: rgba(88, 226, 255, 0.46);
  background: rgba(88, 226, 255, 0.14);
}

.hud__leaderboard-toggle:focus-visible {
  outline: 2px solid rgba(88, 226, 255, 0.72);
  outline-offset: 2px;
}

.hud__land-action {
  display: none;
  min-width: 112px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(88, 226, 255, 0.34);
  border-radius: 8px;
  background: rgba(88, 226, 255, 0.16);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(12px);
  color: #dffcff;
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  text-shadow: inherit;
  cursor: pointer;
}

.hud__land-action:hover,
.hud__land-action:focus-visible {
  border-color: rgba(255, 229, 111, 0.56);
  background: rgba(255, 229, 111, 0.16);
  color: #fff7c7;
}

.hud__land-action:focus-visible {
  outline: 2px solid rgba(255, 229, 111, 0.72);
  outline-offset: 2px;
}

.leaderboard-panel {
  position: absolute;
  top: 50px;
  left: 0;
  z-index: 12;
  width: min(420px, calc(100vw - 32px));
  max-height: min(420px, calc(100vh - 88px));
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 8px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  border: 1px solid rgba(88, 226, 255, 0.24);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.84);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(16px);
  transition: opacity 150ms ease-out, visibility 150ms ease-out, transform 150ms ease-out;
}

.leaderboard-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.leaderboard-panel__header,
.leaderboard-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.leaderboard-panel__header {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 2px 4px;
  color: rgba(232, 241, 255, 0.7);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.leaderboard-panel__header strong {
  color: #f8fbff;
  font-size: 13px;
}

.leaderboard-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.leaderboard-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.leaderboard-filters span {
  color: rgba(232, 241, 255, 0.62);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.leaderboard-filters select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 28px 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  color-scheme: dark;
  accent-color: #58e2ff;
}

.leaderboard-filters select:focus-visible {
  outline: 2px solid rgba(88, 226, 255, 0.72);
  outline-offset: 2px;
}

.leaderboard-filters select option {
  background: #071025;
  color: #f8fbff;
}

.leaderboard-filters select option:disabled {
  color: rgba(248, 251, 255, 0.36);
}

.leaderboard-filters select option:checked {
  background: #1d5c99;
  color: #ffffff;
}

.leaderboard-panel__list {
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 6px;
}

.leaderboard-row {
  min-height: 42px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.leaderboard-row.is-local {
  border-color: rgba(88, 226, 255, 0.38);
  background: rgba(88, 226, 255, 0.12);
}

.leaderboard-row--status {
  display: block;
  color: rgba(232, 241, 255, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.leaderboard-row__rank,
.leaderboard-row__score,
.leaderboard-row__name {
  overflow: hidden;
  line-height: 1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.leaderboard-row__rank {
  color: rgba(223, 252, 255, 0.88);
  font-size: 12px;
  font-weight: 950;
}

.leaderboard-row__name {
  min-width: 0;
  font-size: 13px;
  font-weight: 950;
}

.leaderboard-row__score {
  color: #ffe56f;
  font-size: 12px;
  font-weight: 950;
  text-align: right;
}

.developer-overlay {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 42;
  zoom: var(--ui-scale);
  width: min(420px, calc((100vw - 32px) / var(--ui-scale)));
  max-height: min(680px, calc((100vh - 32px) / var(--ui-scale)));
  max-height: min(680px, calc((100dvh - 32px) / var(--ui-scale)));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(128, 235, 255, 0.34);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.86);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(14px);
  color: #f8fbff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 140ms ease-out, visibility 140ms ease-out, transform 140ms ease-out;
}

.developer-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.developer-overlay.is-minimized {
  width: 36px;
  max-height: 36px;
  border-radius: 9px;
}

.developer-overlay.is-minimized .developer-overlay__header {
  justify-content: center;
  padding: 6px;
  border-bottom: 0;
}

.developer-overlay.is-minimized .developer-overlay__header strong,
.developer-overlay.is-minimized .developer-overlay__copy,
.developer-overlay.is-minimized .developer-overlay__shortcut,
.developer-overlay.is-minimized .developer-overlay__copy-status,
.developer-overlay.is-minimized .developer-overlay__metrics {
  display: none;
}

.developer-overlay.is-minimized .developer-overlay__actions {
  gap: 0;
}

.developer-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(88, 226, 255, 0.1);
}

.developer-overlay__header strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.developer-overlay__actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.developer-overlay__copy,
.developer-overlay__minimize,
.developer-overlay__shortcut {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(223, 252, 255, 0.88);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.developer-overlay__minimize {
  cursor: pointer;
  min-width: 24px;
  width: 24px;
  padding: 0;
  color: #dffcff;
}

.developer-overlay__minimize:hover,
.developer-overlay__minimize:focus-visible {
  border-color: rgba(141, 244, 255, 0.72);
  background: rgba(141, 244, 255, 0.2);
}

.developer-overlay__copy {
  cursor: pointer;
  min-width: 48px;
  color: #06101c;
  background: #8df4ff;
  border-color: rgba(141, 244, 255, 0.72);
}

.developer-overlay__copy:hover,
.developer-overlay__copy:focus-visible {
  background: #f8fbff;
}

.developer-overlay__copy:active {
  transform: translateY(1px);
}

.developer-overlay__copy-status {
  display: none;
  min-height: 22px;
  padding: 5px 12px 0;
  color: #8df4ff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
}

.developer-overlay__copy-status:not(:empty) {
  display: block;
}

.developer-overlay__metrics {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 11px 12px 12px;
  overflow: hidden auto;
  color: rgba(248, 251, 255, 0.92);
  font: 11px/1.42 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
  white-space: pre-wrap;
  scrollbar-width: thin;
}

.reticle {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow:
    0 0 10px rgba(84, 226, 255, 0.32),
    inset 0 0 8px rgba(84, 226, 255, 0.22);
}

.compact-hud-toggles {
  position: fixed;
  right: 12px;
  top: 16px;
  z-index: 11;
  zoom: var(--ui-scale);
  display: grid;
  grid-template-columns: 46px;
  gap: 8px;
}

#mapToggle {
  display: none;
}

#vitalsToggle {
  display: none;
}

.compact-hud-toggle {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  color: #dffcff;
  cursor: pointer;
}

.compact-hud-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.compact-hud-toggle:hover,
.compact-hud-toggle.is-active {
  border-color: rgba(88, 226, 255, 0.5);
  background: rgba(88, 226, 255, 0.14);
}

.compact-hud-toggle.is-unclaimed {
  border-color: rgba(255, 220, 122, 0.74);
  background: rgba(255, 220, 122, 0.14);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.3), 0 0 22px rgba(255, 220, 122, 0.28);
  animation: objective-unclaimed-pulse 1.25s ease-in-out infinite;
}

.map-filter {
  position: fixed;
  right: 16px;
  bottom: calc(16px + clamp(190px, 31vmin, 292px) + 8px);
  z-index: 12;
  zoom: var(--ui-scale);
  display: none;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  min-width: 184px;
  height: auto;
  padding: 5px 7px 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  color: #f8fbff;
  pointer-events: auto;
}

.map-speedometer {
  position: fixed;
  right: 16px;
  bottom: calc(16px + clamp(190px, 31vmin, 292px) + 82px);
  z-index: 12;
  zoom: var(--ui-scale);
  display: none;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  gap: 7px;
  min-width: 184px;
  height: 48px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.76);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  color: #f8fbff;
  pointer-events: none;
}

.map-filter.is-open {
  display: grid;
}

.map-filter__row {
  display: grid;
  grid-template-columns: auto minmax(112px, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.map-speedometer.is-open {
  display: grid;
}

.map-filter span {
  color: rgba(232, 241, 255, 0.72);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.map-speedometer span {
  color: rgba(232, 241, 255, 0.72);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.map-speedometer strong {
  color: #ffe56f;
  font-size: 26px;
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 0 16px rgba(255, 229, 111, 0.28), 0 1px 12px rgba(0, 0, 0, 0.6);
}

.map-speedometer em {
  color: rgba(223, 252, 255, 0.86);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.map-filter select {
  width: 100%;
  min-width: 0;
  height: 24px;
  padding: 0 24px 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbff;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
}

.map-filter select:focus-visible {
  outline: 2px solid rgba(88, 226, 255, 0.72);
  outline-offset: 2px;
}

.map-filter select option {
  background: #071025;
  color: #f8fbff;
}

.map-filter select option:disabled {
  color: rgba(248, 251, 255, 0.36);
}

.map-filter select option:checked {
  background: #1d5c99;
  color: #ffffff;
}

.touch-joystick {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 18;
  zoom: var(--ui-scale);
  display: none;
  width: 132px;
  height: 132px;
  touch-action: none;
  pointer-events: auto;
}

.touch-joystick--fire {
  left: auto;
  right: 12px;
}

.touch-joystick__base {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(223, 252, 255, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(88, 226, 255, 0.1) 0 31%, transparent 32% 100%),
    rgba(3, 8, 24, 0.74);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.42),
    inset 0 0 0 2px rgba(88, 226, 255, 0.18),
    inset 0 0 32px rgba(88, 226, 255, 0.1);
  backdrop-filter: blur(14px);
}

.touch-joystick__stick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  margin: -29px 0 0 -29px;
  border: 3px solid rgba(255, 245, 190, 0.72);
  border-radius: 50%;
  background: rgba(255, 229, 111, 0.32);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(255, 229, 111, 0.24);
  transition: transform 90ms ease-out;
}

.touch-joystick__base--fire {
  background:
    radial-gradient(circle at center, rgba(255, 115, 173, 0.12) 0 31%, transparent 32% 100%),
    rgba(3, 8, 24, 0.74);
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.42),
    inset 0 0 0 2px rgba(255, 115, 173, 0.18),
    inset 0 0 32px rgba(255, 115, 173, 0.1);
}

.touch-joystick__stick--fire {
  border-color: rgba(255, 210, 232, 0.74);
  background: rgba(255, 115, 173, 0.32);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(255, 115, 173, 0.24);
}

.touch-joystick.is-active .touch-joystick__stick {
  transition: none;
}

.touch-joystick.is-boosting .touch-joystick__stick {
  border-color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 229, 111, 0.48);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.34),
    0 0 30px rgba(255, 229, 111, 0.52);
}

@media (pointer: coarse) {
  .touch-joystick.is-enabled {
    display: block;
  }
}

.tech-ledger {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 11;
  zoom: var(--ui-scale);
  width: min(220px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.62);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  color: #f8fbff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 150ms ease-out, visibility 150ms ease-out, transform 150ms ease-out;
}

.tech-ledger.is-open,
.tech-ledger.is-dragging {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.tech-ledger__title {
  margin-bottom: 8px;
  padding: 3px 0 5px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dffcff;
  cursor: move;
  touch-action: none;
}

.tech-ledger__list {
  display: grid;
  gap: 7px;
}

.objective-tree {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  background: rgba(2, 5, 18, 0.34);
  backdrop-filter: blur(2px);
  pointer-events: none;
  transition: opacity 140ms ease-out, visibility 140ms ease-out;
}

.objective-tree.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.objective-tree__panel {
  zoom: var(--ui-scale);
  width: min(1040px, calc((100vw - 32px) / var(--ui-scale)));
  height: min(680px, calc((100vh - 40px) / var(--ui-scale)));
  height: min(680px, calc((100dvh - 40px) / var(--ui-scale)));
  max-height: calc((100vh - 40px) / var(--ui-scale));
  max-height: calc((100dvh - 40px) / var(--ui-scale));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.82);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
  color: #f8fbff;
}

.objective-tree__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.objective-tree__header span {
  color: #f8fbff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.objective-tree__header strong {
  color: rgba(223, 252, 255, 0.76);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.objective-tree__header-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.objective-tree__claim-all {
  min-width: 86px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 220, 122, 0.48);
  border-radius: 8px;
  background: rgba(255, 220, 122, 0.14);
  color: #fff7cf;
  font: inherit;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

.objective-tree__claim-all:hover:not(:disabled),
.objective-tree__claim-all:focus-visible {
  border-color: rgba(255, 244, 200, 0.86);
  background: rgba(255, 220, 122, 0.26);
}

.objective-tree__claim-all:disabled {
  cursor: default;
  opacity: 0.48;
}

.objective-tree__close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fbff;
  font: inherit;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.objective-tree__close:hover {
  border-color: rgba(255, 115, 173, 0.48);
  background: rgba(255, 115, 173, 0.13);
}

.objective-tree__body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  gap: 12px;
  overflow: hidden;
}

.objective-tree__map {
  position: relative;
  min-height: 0;
  display: block;
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(88, 226, 255, 0.055), transparent 36%),
    linear-gradient(315deg, rgba(255, 220, 122, 0.045), transparent 42%),
    rgba(5, 9, 24, 0.72);
  cursor: grab;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  touch-action: none;
  user-select: none;
}

.objective-tree__map.is-panning {
  cursor: grabbing;
}

.objective-tree__viewport {
  position: relative;
  width: 960px;
  min-width: 100%;
  height: 1040px;
  min-height: 100%;
}

.objective-tree__graph {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}

.objective-tree__links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.objective-tree__link {
  fill: none;
  stroke: rgba(116, 130, 160, 0.34);
  stroke-width: 3.5;
  stroke-linecap: round;
}

.objective-tree__link.is-unlocked {
  stroke: rgba(213, 221, 232, 0.46);
}

.objective-tree__link.is-unclaimed {
  stroke: rgba(255, 220, 122, 0.72);
  animation: objective-link-unclaimed-pulse 1.35s ease-in-out infinite;
}

.objective-tree__link.is-claimed {
  stroke: rgba(94, 245, 154, 0.54);
}

.objective-tree__link-glow {
  fill: none;
  stroke: rgba(116, 130, 160, 0.14);
  stroke-width: 12;
  stroke-linecap: round;
}

.objective-tree__link-glow.is-unlocked {
  stroke: rgba(213, 221, 232, 0.16);
}

.objective-tree__link-glow.is-unclaimed {
  stroke: rgba(255, 220, 122, 0.24);
  animation: objective-link-glow-unclaimed-pulse 1.35s ease-in-out infinite;
}

.objective-tree__link-glow.is-claimed {
  stroke: rgba(94, 245, 154, 0.18);
}

.objective-node {
  --objective-node-size: 58px;
  --objective-accent: 213, 221, 232;
  position: absolute;
  z-index: 2;
  width: var(--objective-node-size);
  height: var(--objective-node-size);
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid rgba(213, 221, 232, 0.62);
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.18), transparent 34%),
    radial-gradient(circle at 62% 72%, rgba(var(--objective-accent), 0.18), transparent 44%),
    #101522;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22), 0 0 16px rgba(var(--objective-accent), 0.11);
  color: #f4f7fb;
  font: inherit;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: background 120ms ease-out, border-color 120ms ease-out, box-shadow 120ms ease-out, opacity 120ms ease-out, transform 120ms ease-out;
}

.objective-node::before {
  content: "";
  position: absolute;
  right: 3px;
  top: 5px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(213, 221, 232, 0.58);
  border-radius: 50%;
  background: rgba(213, 221, 232, 0.38);
  box-shadow: 0 0 10px rgba(213, 221, 232, 0.16);
}

.objective-node:hover:not(:disabled),
.objective-node:focus-visible {
  border-color: rgba(244, 247, 251, 0.78);
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.22), transparent 34%),
    radial-gradient(circle at 62% 72%, rgba(var(--objective-accent), 0.24), transparent 44%),
    #151b2a;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(var(--objective-accent), 0.14);
  transform: translate(-50%, calc(-50% - 1px));
}

.objective-node:focus-visible {
  outline: 2px solid rgba(223, 252, 255, 0.86);
  outline-offset: 4px;
}

.objective-node.is-current {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22), inset 0 0 0 2px rgba(var(--objective-accent), 0.25);
}

.objective-node.is-selected {
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34), 0 0 0 5px rgba(var(--objective-accent), 0.16);
}

.objective-node.is-claimed {
  border-color: rgba(94, 245, 154, 0.58);
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.2), transparent 34%),
    #0b2018;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24), 0 0 18px rgba(94, 245, 154, 0.14);
}

.objective-node.is-claimed::before {
  border-color: rgba(94, 245, 154, 0.82);
  background: rgba(94, 245, 154, 0.74);
  box-shadow: 0 0 14px rgba(94, 245, 154, 0.24);
}

.objective-node.is-unclaimed {
  border-color: rgba(255, 220, 122, 0.92);
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.28), transparent 34%),
    #221a07;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3), 0 0 26px rgba(255, 220, 122, 0.36);
  animation: objective-unclaimed-pulse 1.25s ease-in-out infinite;
}

.objective-node.is-unclaimed::before {
  border-color: rgba(255, 220, 122, 0.95);
  background: #ffdc7a;
  box-shadow: 0 0 18px rgba(255, 220, 122, 0.52);
}

.objective-node.is-locked {
  opacity: 1;
  border-color: rgba(91, 101, 124, 0.34);
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 255, 255, 0.08), transparent 34%),
    #060a18;
  color: rgba(244, 247, 251, 0.38);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  cursor: default;
}

.objective-node.is-locked::before {
  border-color: rgba(91, 101, 124, 0.38);
  background: #060a18;
  box-shadow: none;
}

.objective-node__icon {
  color: inherit;
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.objective-node.is-current:not(.is-unclaimed):not(.is-claimed):not(.is-locked),
.objective-node.is-selected:not(.is-unclaimed):not(.is-claimed):not(.is-locked) {
  border-color: rgba(244, 247, 251, 0.78);
}

.objective-tree__detail {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.objective-detail__eyebrow {
  color: rgba(223, 252, 255, 0.76);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.objective-detail__title {
  color: #f8fbff;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.08;
}

.objective-detail__description {
  margin: 0;
  color: rgba(232, 241, 255, 0.73);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.objective-detail__progress {
  min-height: 32px;
  display: grid;
  align-items: center;
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(88, 226, 255, 0.1);
  color: rgba(223, 252, 255, 0.86);
  font-size: 12px;
  font-weight: 900;
}

.objective-detail__reward {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid rgba(255, 220, 122, 0.26);
  border-radius: 8px;
  background: rgba(255, 220, 122, 0.1);
}

.objective-detail__reward-label {
  grid-column: 1 / -1;
  color: rgba(255, 239, 181, 0.78);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.objective-detail__reward-value {
  min-width: 0;
  color: #fff4c8;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.25;
}

.objective-detail__claim {
  min-width: 76px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 220, 122, 0.58);
  border-radius: 8px;
  background: rgba(255, 220, 122, 0.18);
  color: #fff7cf;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.objective-detail__claim:hover:not(:disabled),
.objective-detail__claim:focus-visible {
  border-color: rgba(255, 244, 200, 0.86);
  background: rgba(255, 220, 122, 0.28);
}

.objective-detail__claim:disabled {
  cursor: default;
  opacity: 0.58;
}

.objective-tree__panel {
  width: min(1180px, calc((100vw - 32px) / var(--ui-scale)));
  border-color: rgba(128, 171, 255, 0.24);
  background:
    radial-gradient(circle at 18% 8%, rgba(88, 226, 255, 0.08), transparent 28%),
    radial-gradient(circle at 82% 100%, rgba(128, 171, 255, 0.08), transparent 30%),
    rgba(3, 8, 24, 0.95);
}

.objective-tree__heading {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.objective-tree__heading small {
  color: rgba(151, 178, 212, 0.7);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.objective-tree__body {
  grid-template-columns: minmax(0, 1fr) minmax(286px, 318px);
  gap: 14px;
}

.objective-tree__map {
  padding: 0;
  border-color: rgba(128, 171, 255, 0.16);
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.3) 0 1px, transparent 1.5px),
    radial-gradient(circle at 67% 36%, rgba(88, 226, 255, 0.22) 0 1px, transparent 1.5px),
    radial-gradient(circle at 38% 78%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1.5px),
    linear-gradient(135deg, rgba(88, 226, 255, 0.035), transparent 34%),
    rgba(3, 7, 20, 0.96);
  background-size: 97px 89px, 149px 137px, 181px 163px, auto, auto;
}

.objective-tree__map::after {
  content: "DRAG TO PAN  •  SCROLL TO ZOOM";
  position: sticky;
  z-index: 5;
  left: 14px;
  bottom: 12px;
  display: block;
  width: max-content;
  margin-top: -30px;
  padding: 6px 8px;
  border: 1px solid rgba(128, 171, 255, 0.13);
  border-radius: 6px;
  background: rgba(3, 8, 24, 0.78);
  color: rgba(151, 178, 212, 0.58);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.11em;
  pointer-events: none;
}

.objective-tree__viewport {
  width: 1100px;
  height: 1040px;
}

.objective-tree__chart-backdrop {
  pointer-events: none;
}

.objective-tree__lane {
  fill: rgba(128, 171, 255, 0.025);
  stroke: rgba(128, 171, 255, 0.08);
  stroke-width: 1;
}

.objective-tree__lane:nth-of-type(even) {
  fill: rgba(88, 226, 255, 0.018);
}

.objective-tree__lane-label,
.objective-tree__stage-label {
  fill: rgba(179, 202, 231, 0.62);
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.objective-tree__stage-label {
  fill: rgba(151, 178, 212, 0.5);
  font-size: 9px;
  text-anchor: middle;
}

.objective-tree__stage-line {
  stroke: rgba(128, 171, 255, 0.075);
  stroke-width: 1;
  stroke-dasharray: 3 12;
}

.objective-tree__lane-signal {
  fill: rgba(128, 171, 255, 0.72);
  filter: drop-shadow(0 0 5px rgba(128, 171, 255, 0.46));
}

.objective-tree__link {
  stroke: rgba(116, 130, 160, 0.32);
  stroke-width: 2;
}

.objective-tree__link.is-unlocked {
  stroke: rgba(198, 214, 237, 0.5);
}

.objective-tree__link.is-unclaimed {
  stroke: rgba(255, 220, 122, 0.8);
}

.objective-tree__link.is-claimed {
  stroke: rgba(94, 245, 154, 0.58);
}

.objective-tree__link-glow {
  stroke: rgba(116, 130, 160, 0.1);
  stroke-width: 9;
}

.objective-tree__link-glow.is-unlocked {
  stroke: rgba(198, 214, 237, 0.12);
}

.objective-tree__link-glow.is-unclaimed {
  stroke: rgba(255, 220, 122, 0.24);
}

.objective-tree__link-glow.is-claimed {
  stroke: rgba(94, 245, 154, 0.16);
}

.objective-node {
  --objective-node-size: auto;
  --objective-accent: 213, 221, 232;
  width: 184px;
  height: 64px;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  place-items: center stretch;
  padding: 9px 12px 9px 10px;
  overflow: hidden;
  border: 1px solid rgba(var(--objective-accent), 0.42);
  border-radius: 10px;
  background:
    linear-gradient(110deg, rgba(var(--objective-accent), 0.13), transparent 58%),
    rgba(11, 17, 34, 0.96);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  text-align: left;
}

.objective-node::before {
  right: auto;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  height: auto;
  border: 0;
  border-radius: 0 3px 3px 0;
  background: rgba(var(--objective-accent), 0.72);
  box-shadow: 0 0 12px rgba(var(--objective-accent), 0.24);
}

.objective-node::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(213, 221, 232, 0.42);
}

.objective-node:hover:not(:disabled),
.objective-node:focus-visible {
  border-color: rgba(var(--objective-accent), 0.82);
  background:
    linear-gradient(110deg, rgba(var(--objective-accent), 0.2), transparent 62%),
    rgba(16, 24, 44, 0.98);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34), 0 0 0 3px rgba(var(--objective-accent), 0.1);
  transform: translate(-50%, calc(-50% - 2px));
}

.objective-node__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--objective-accent), 0.38);
  border-radius: 50%;
  background: rgba(var(--objective-accent), 0.09);
  color: rgba(242, 248, 255, 0.94);
  font-size: 13px;
  text-align: center;
}

.objective-node__copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.objective-node__label {
  min-width: 0;
  overflow: hidden;
  color: #f4f8ff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.objective-node__meta {
  color: rgba(var(--objective-accent), 0.72);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.objective-node.is-selected {
  border-color: rgba(var(--objective-accent), 0.92);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.36), 0 0 0 3px rgba(var(--objective-accent), 0.16), 0 0 24px rgba(var(--objective-accent), 0.1);
}

.objective-node.is-current {
  border-color: rgba(var(--objective-accent), 0.72);
}

.objective-node.is-claimed {
  border-color: rgba(94, 245, 154, 0.44);
  background:
    linear-gradient(110deg, rgba(94, 245, 154, 0.13), transparent 58%),
    rgba(7, 26, 24, 0.96);
}

.objective-node.is-claimed::before,
.objective-node.is-claimed::after {
  background: rgba(94, 245, 154, 0.82);
}

.objective-node.is-unclaimed {
  border-color: rgba(255, 220, 122, 0.84);
  background:
    linear-gradient(110deg, rgba(255, 220, 122, 0.2), transparent 62%),
    rgba(35, 27, 8, 0.97);
}

.objective-node.is-unclaimed::before,
.objective-node.is-unclaimed::after {
  background: #ffdc7a;
}

.objective-node.is-locked {
  opacity: 0.58;
  border-color: rgba(var(--objective-accent), 0.2);
  background: rgba(7, 11, 24, 0.92);
  color: rgba(244, 247, 251, 0.55);
  cursor: pointer;
  filter: saturate(0.45);
}

.objective-node.is-locked::before {
  background: rgba(var(--objective-accent), 0.24);
}

.objective-node.is-locked::after {
  background: rgba(116, 130, 160, 0.35);
}

.objective-node--celestial_body {
  --objective-accent: 255, 220, 122;
}

.objective-node--speed {
  --objective-accent: 88, 226, 255;
}

.objective-node--growth_rate {
  --objective-accent: 178, 255, 112;
}

.objective-node--mob {
  --objective-accent: 255, 145, 104;
}

.objective-node--boss {
  --objective-accent: 255, 115, 173;
}

.objective-node--tool {
  --objective-accent: 128, 171, 255;
}

.objective-node--structure {
  --objective-accent: 94, 245, 154;
}

.objective-tree__lane-signal--celestial_body {
  fill: rgb(255, 220, 122);
}

.objective-tree__lane-signal--speed {
  fill: rgb(88, 226, 255);
}

.objective-tree__lane-signal--growth_rate {
  fill: rgb(178, 255, 112);
}

.objective-tree__lane-signal--mob {
  fill: rgb(255, 145, 104);
}

.objective-tree__lane-signal--boss {
  fill: rgb(255, 115, 173);
}

.objective-tree__lane-signal--tool {
  fill: rgb(128, 171, 255);
}

.objective-tree__lane-signal--structure {
  fill: rgb(94, 245, 154);
}

.objective-tree__detail {
  gap: 14px;
  padding: 18px;
  border-color: rgba(128, 171, 255, 0.17);
  background:
    linear-gradient(145deg, rgba(128, 171, 255, 0.07), transparent 42%),
    rgba(9, 15, 31, 0.96);
}

.objective-detail__eyebrow {
  color: rgba(128, 197, 255, 0.78);
  letter-spacing: 0.12em;
}

.objective-detail__title {
  font-size: 22px;
}

.objective-detail__progress {
  border: 1px solid rgba(88, 226, 255, 0.12);
  background: rgba(88, 226, 255, 0.07);
}

.tech-row,
.build-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
}

.tech-row__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--tech-color);
  box-shadow: 0 0 12px color-mix(in srgb, var(--tech-color) 70%, transparent);
}

.tech-row__name,
.build-row__name {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgba(240, 247, 255, 0.86);
}

.tech-row__count,
.build-row__count {
  min-width: 26px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.build-menu {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  background: rgba(2, 5, 18, 0.34);
  backdrop-filter: blur(2px);
  pointer-events: none;
  transition: opacity 140ms ease-out, visibility 140ms ease-out;
}

.build-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.build-menu__panel {
  zoom: var(--ui-scale);
  width: min(1040px, calc((100vw - 32px) / var(--ui-scale)));
  height: min(680px, calc((100vh - 40px) / var(--ui-scale)));
  height: min(680px, calc((100dvh - 40px) / var(--ui-scale)));
  max-height: calc((100vh - 40px) / var(--ui-scale));
  max-height: calc((100dvh - 40px) / var(--ui-scale));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.82);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.build-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.build-menu__header span {
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  color: #f8fbff;
}

.build-menu__header strong {
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(223, 252, 255, 0.76);
}

.build-menu__header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.build-menu__close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fbff;
  font: inherit;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.build-menu__close:hover {
  border-color: rgba(255, 115, 173, 0.48);
  background: rgba(255, 115, 173, 0.13);
}

.build-menu__tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 13px;
}

.build-menu__body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(170px, 210px) minmax(260px, 1fr) minmax(220px, 250px);
  gap: 12px;
  align-items: stretch;
  overflow: hidden;
}

.build-menu__resources {
  min-height: 100%;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.build-menu__resources-title {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(223, 252, 255, 0.78);
}

.build-menu__resources-list {
  display: grid;
  gap: 8px;
}

.build-menu__tab {
  height: 34px;
  min-width: 72px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(240, 247, 255, 0.78);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.build-menu__tab:hover,
.build-menu__tab.is-active {
  border-color: rgba(88, 226, 255, 0.48);
  background: rgba(88, 226, 255, 0.14);
  color: #f8fbff;
}

.build-menu__grid {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 2px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  align-content: start;
  gap: 10px;
}

.build-card {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 32px;
  gap: 7px;
  aspect-ratio: 1;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #f8fbff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.build-card.is-locked {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(3, 7, 18, 0.58);
  color: rgba(232, 241, 255, 0.6);
  opacity: 0.78;
}

.build-card__icon {
  width: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.16), transparent 34%),
    rgba(2, 6, 18, 0.64);
}

.build-card__icon img {
  width: 78%;
  height: 78%;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(88, 226, 255, 0.24));
}

.build-card__skin-swatch,
.build-detail__skin-swatch {
  width: 58%;
  aspect-ratio: 1;
  display: block;
  border: 3px solid rgba(255, 255, 255, 0.74);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.14) 18%, transparent 32%),
    linear-gradient(135deg, var(--skin-color), color-mix(in srgb, var(--skin-color) 64%, #000000)),
    var(--skin-color);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--skin-accent) 28%, transparent),
    0 0 24px color-mix(in srgb, var(--skin-color) 52%, transparent);
}

.build-detail__skin-swatch {
  width: 72px;
  margin-bottom: 2px;
}

.build-card:not(:disabled):hover {
  border-color: rgba(255, 115, 173, 0.52);
  background: rgba(255, 255, 255, 0.1);
}

.build-card.is-owned-tool,
.build-card.is-owned-skin {
  border-color: rgba(94, 245, 154, 0.52);
  background: rgba(94, 245, 154, 0.12);
}

.build-card.is-owned-tool .build-card__icon,
.build-card.is-owned-skin .build-card__icon {
  border-color: rgba(94, 245, 154, 0.28);
  background:
    radial-gradient(circle at 50% 20%, rgba(94, 245, 154, 0.24), transparent 34%),
    rgba(4, 24, 18, 0.72);
}

.build-card.is-owned-tool .build-card__icon img,
.build-card.is-owned-skin .build-card__icon img {
  filter: drop-shadow(0 0 16px rgba(94, 245, 154, 0.28));
}

.build-card.is-selected {
  border-color: rgba(88, 226, 255, 0.78);
  background: rgba(88, 226, 255, 0.13);
  box-shadow:
    0 0 0 1px rgba(88, 226, 255, 0.18),
    0 12px 34px rgba(88, 226, 255, 0.08);
}

.build-card.is-owned-tool.is-selected,
.build-card.is-owned-skin.is-selected {
  border-color: rgba(94, 245, 154, 0.86);
  background: rgba(94, 245, 154, 0.18);
  box-shadow:
    0 0 0 1px rgba(94, 245, 154, 0.2),
    0 12px 34px rgba(94, 245, 154, 0.1);
}

.build-card.is-equipped-skin::after {
  content: "ON";
  position: absolute;
  right: 7px;
  top: 7px;
  min-width: 24px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 1px solid rgba(94, 245, 154, 0.46);
  border-radius: 8px;
  background: rgba(4, 24, 18, 0.78);
  color: #dcffeb;
  font-size: 9px;
  font-weight: 950;
  line-height: 1;
}

.build-card.is-locked .build-card__icon {
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.08), transparent 34%),
    rgba(0, 0, 0, 0.42);
}

.build-card.is-locked .build-card__icon img {
  opacity: 0.58;
  filter: grayscale(0.34) drop-shadow(0 0 10px rgba(0, 0, 0, 0.16));
}

.build-card__title {
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: rgba(248, 251, 255, 0.92);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
  text-align: center;
}

.build-menu__details {
  min-height: 100%;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.build-detail__empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: rgba(232, 241, 255, 0.64);
  font-size: 13px;
  font-weight: 850;
}

.build-detail__icon {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 255, 255, 0.16), transparent 34%),
    rgba(2, 6, 18, 0.64);
}

.build-detail__icon img {
  width: 76%;
  height: 76%;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(88, 226, 255, 0.24));
}

.build-detail__category,
.build-detail__section-title {
  color: rgba(223, 252, 255, 0.76);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.build-detail__title {
  color: #f8fbff;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.08;
}

.build-detail__description {
  margin: 0;
  color: rgba(232, 241, 255, 0.73);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.build-detail__cost {
  display: grid;
  gap: 7px;
  margin: 0;
}

.build-detail__cost-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.build-detail__cost-row dt {
  min-width: 0;
  overflow: hidden;
  color: rgba(240, 247, 255, 0.82);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-detail__cost-row dt::before {
  content: "";
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--tech-color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--tech-color) 70%, transparent);
}

.build-detail__cost-row dd {
  margin: 0;
  color: #f8fbff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.build-detail__cost-row dd.is-short {
  color: #ffddea;
}

.build-detail__status {
  min-height: 30px;
  display: grid;
  align-items: center;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(94, 245, 154, 0.11);
  color: rgba(220, 255, 235, 0.88);
  font-size: 12px;
  font-weight: 900;
}

.build-detail__action {
  width: 100%;
  min-height: 38px;
  margin-top: 2px;
  border: 1px solid rgba(88, 226, 255, 0.42);
  border-radius: 8px;
  background: rgba(88, 226, 255, 0.16);
  color: #dffcff;
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.build-detail__action:disabled {
  border-color: rgba(255, 115, 173, 0.28);
  background: rgba(255, 115, 173, 0.12);
  color: rgba(255, 221, 234, 0.72);
  cursor: not-allowed;
}

.build-detail__upgrades {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.build-upgrade {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.build-upgrade.is-disabled {
  opacity: 0.62;
}

.build-upgrade__summary {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.build-upgrade__name {
  min-width: 0;
  overflow: hidden;
  color: #f8fbff;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-upgrade__meta {
  color: rgba(232, 241, 255, 0.66);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.build-upgrade__cost {
  display: grid;
  gap: 6px;
  margin: 0;
}

.build-upgrade__action {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(94, 245, 154, 0.42);
  border-radius: 8px;
  background: rgba(94, 245, 154, 0.15);
  color: #dcffeb;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.build-upgrade__action:disabled {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.065);
  color: rgba(232, 241, 255, 0.48);
  cursor: not-allowed;
}

.build-menu__empty {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: rgba(232, 241, 255, 0.64);
  font-size: 13px;
  font-weight: 800;
}

.tool-hotbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  zoom: var(--ui-scale);
  display: none;
  grid-auto-flow: column;
  grid-auto-columns: 92px;
  gap: 8px;
  transform: translateX(-50%);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.68);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
}

.tool-hotbar.is-visible {
  display: grid;
}

.tool-slot {
  position: relative;
  height: 48px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
  font: inherit;
  cursor: pointer;
}

.tool-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tool-color) 26%, transparent);
  pointer-events: none;
}

.tool-slot.is-equipped {
  border-color: color-mix(in srgb, var(--tool-color) 62%, white 10%);
  background: color-mix(in srgb, var(--tool-color) 20%, rgba(255, 255, 255, 0.06));
}

.tool-slot__key {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(248, 251, 255, 0.82);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
}

.tool-slot__name {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-toggle {
  position: fixed;
  left: 18px;
  bottom: 18px;
  zoom: var(--ui-scale);
  min-width: 112px;
  height: 42px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.68);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  color: #f8fbff;
  font: inherit;
  cursor: pointer;
}

.online-toggle[hidden] {
  display: none;
}

.online-toggle:hover,
.online-toggle.is-active {
  border-color: rgba(88, 226, 255, 0.5);
  background: rgba(88, 226, 255, 0.14);
}

.online-toggle strong {
  font-size: 19px;
  line-height: 1;
}

.online-toggle span {
  color: rgba(232, 241, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.settings-toggle {
  position: fixed;
  top: 16px;
  right: 70px;
  zoom: var(--ui-scale);
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.68);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  color: #dffcff;
  cursor: pointer;
}

.settings-toggle svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: currentColor;
}

.settings-toggle:hover,
.settings-toggle.is-active {
  border-color: rgba(88, 226, 255, 0.5);
  background: rgba(88, 226, 255, 0.14);
}

.settings-panel {
  position: fixed;
  z-index: 13;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  background: rgba(2, 5, 18, 0.42);
  backdrop-filter: blur(3px);
  color: #f8fbff;
  pointer-events: none;
  transition: opacity 140ms ease-out, visibility 140ms ease-out;
}

.settings-panel__panel {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  overflow: hidden;
  transform: translateY(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.88);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
  transition: transform 140ms ease-out;
}

.settings-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.settings-panel.is-open .settings-panel__panel {
  transform: translateY(0);
}

.settings-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-panel__header strong {
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.settings-panel__close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
  font: inherit;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.settings-panel__body {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding-right: 2px;
}

.settings-panel__section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(109, 214, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 17, 36, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.settings-panel__section-toggle {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 0;
  background: rgba(18, 31, 56, 0.72);
  color: #f8fbff;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.settings-panel__section-toggle::after {
  content: "+";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #58e2ff;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
}

.settings-panel__section.is-open .settings-panel__section-toggle {
  background: rgba(44, 82, 118, 0.62);
}

.settings-panel__section.is-open .settings-panel__section-toggle::after {
  content: "-";
}

.settings-panel__section-toggle:hover,
.settings-panel__section-toggle:focus-visible {
  background: rgba(88, 226, 255, 0.13);
  outline: none;
}

.settings-panel__section-toggle > span:first-child {
  overflow: hidden;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-panel__section-summary {
  overflow: hidden;
  color: rgba(232, 241, 255, 0.58);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-panel__section-body {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: rgba(4, 9, 24, 0.24);
}

.settings-panel__section-body[hidden] {
  display: none;
}

.settings-panel__group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
}

.settings-panel__group--controls {
  min-height: 0;
}

.sound-toggle {
  width: 100%;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #dffcff;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.sound-toggle:hover,
.sound-toggle.is-active {
  border-color: rgba(88, 226, 255, 0.5);
  background: rgba(88, 226, 255, 0.14);
}

.sound-toggle.is-muted {
  color: rgba(232, 241, 255, 0.54);
  border-color: rgba(255, 115, 173, 0.24);
  background: rgba(255, 115, 173, 0.08);
}

.settings-panel__range,
.settings-panel__check,
.settings-panel__join-code,
.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.settings-panel__range span,
.settings-panel__check span,
.settings-panel__join-code span,
.settings-row__label,
.settings-panel__section-title {
  overflow: hidden;
  color: rgba(232, 241, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-panel__join-code {
  grid-template-columns: minmax(0, 1fr) minmax(72px, auto) auto;
}

.settings-panel__join-code strong {
  color: #ffe56f;
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}

.settings-panel__range output {
  color: #ffe56f;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.multiplayer-status {
  margin: 0;
}

.settings-panel input[type="range"] {
  width: 100%;
  accent-color: #58e2ff;
}

.settings-panel input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #58e2ff;
  cursor: pointer;
}

.settings-panel__section-title {
  color: rgba(223, 252, 255, 0.76);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-panel__controls {
  display: grid;
  gap: 7px;
}

.settings-panel__save-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.settings-panel__save-form.is-overwrite {
  grid-template-columns: minmax(0, 1fr);
}

.settings-panel__save-form.is-overwrite input {
  display: none;
}

.settings-panel__save-form.is-overwrite .settings-panel__save-action,
.settings-panel__exit > .settings-panel__save-action {
  width: 100%;
  min-height: 38px;
  line-height: 1.15;
  white-space: normal;
}

.settings-panel__exit {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 158, 191, 0.22);
  border-radius: 8px;
  background: rgba(255, 158, 191, 0.075);
}

.settings-panel__restart-confirm {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(255, 158, 191, 0.24);
  border-radius: 8px;
  background: rgba(255, 158, 191, 0.08);
}

.settings-panel__restart-confirm[hidden] {
  display: none;
}

.settings-panel__restart-confirm p {
  margin: 0;
  color: rgba(248, 251, 255, 0.86);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.settings-panel__restart-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.settings-panel__auth-form {
  display: grid;
  gap: 8px;
}

.settings-panel__auth-actions,
.settings-panel__crazy-account,
.settings-panel__account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.settings-panel__crazy-account span,
.settings-panel__account span {
  min-width: 0;
  overflow: hidden;
  color: #dffcff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-panel__crazy-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.settings-panel__save-form input,
.settings-panel__auth-form input {
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.settings-panel__save-form input::placeholder,
.settings-panel__auth-form input::placeholder {
  color: rgba(232, 241, 255, 0.48);
}

.settings-panel__save-list {
  min-height: 42px;
  max-height: 150px;
  display: grid;
  gap: 7px;
  overflow-y: auto;
}

.settings-panel__save-empty {
  margin: 0;
  color: rgba(232, 241, 255, 0.58);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.settings-panel__save-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.settings-panel__save-item.is-current {
  border-color: rgba(143, 255, 212, 0.34);
  background: rgba(143, 255, 212, 0.08);
}

.settings-panel__save-details {
  min-width: 0;
}

.settings-panel__save-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.settings-panel__save-actions .settings-panel__save-action {
  min-width: 74px;
}

.settings-panel__save-item strong,
.settings-panel__save-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-panel__save-item strong {
  display: block;
  color: #f8fbff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
}

.settings-panel__save-item span {
  color: rgba(232, 241, 255, 0.58);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.settings-panel__save-status {
  min-height: 14px;
  margin: 0;
  color: rgba(232, 241, 255, 0.72);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
}

.settings-panel__save-status.is-success {
  color: #8fffd4;
}

.settings-panel__save-status.is-error {
  color: #ff9ebf;
}

.settings-row__key,
.settings-panel__save-action,
.settings-panel__reset {
  min-width: 90px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.settings-panel__save-action[disabled],
.settings-panel__reset[disabled] {
  cursor: default;
  opacity: 0.58;
}

.settings-row__key:hover,
.settings-row__key.is-listening,
.settings-panel__save-action:hover:not([disabled]),
.settings-panel__reset:hover:not([disabled]) {
  border-color: rgba(88, 226, 255, 0.48);
  background: rgba(88, 226, 255, 0.14);
}

.settings-panel__save-action--danger {
  border-color: rgba(255, 158, 191, 0.3);
  color: #ffd7e4;
}

.settings-panel__save-action--danger:hover:not([disabled]) {
  border-color: rgba(255, 158, 191, 0.58);
  background: rgba(255, 158, 191, 0.14);
}

.settings-row__key.is-listening {
  color: #ffe56f;
}

.settings-panel__reset {
  width: 100%;
}

.social-panel {
  position: fixed;
  left: 18px;
  bottom: 68px;
  z-index: 8;
  zoom: var(--ui-scale);
  width: min(340px, calc(100vw - 36px));
  max-height: min(520px, calc(100vh - 96px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.84);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
  color: #f8fbff;
  pointer-events: none;
  transition: opacity 140ms ease-out, visibility 140ms ease-out;
}

.social-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.social-panel__header,
.social-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-panel__header {
  justify-content: space-between;
}

.social-panel__header strong {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-panel__header strong.is-account-origin {
  font-style: italic;
}

.social-panel__close,
.social-row button,
.signal-panel button {
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.social-panel__close {
  width: 32px;
  padding: 0;
  font-size: 18px;
}

.social-panel__tools {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.social-panel__tools input[type="search"] {
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.social-panel__filter {
  height: 36px;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(232, 241, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.social-panel__list {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 8px;
}

.social-row {
  min-height: 48px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.social-row__main {
  min-width: 0;
  flex: 1 1 auto;
}

.social-row__name,
.social-row__status {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-row__name {
  font-size: 13px;
  font-weight: 950;
  line-height: 1.1;
}

.social-row__status {
  margin-top: 4px;
  color: rgba(232, 241, 255, 0.62);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.social-row button {
  min-width: 34px;
  padding: 0 9px;
}

.social-row button:hover,
.signal-panel button:hover {
  border-color: rgba(88, 226, 255, 0.48);
  background: rgba(88, 226, 255, 0.14);
}

.social-row__empty {
  min-height: 80px;
  display: grid;
  place-items: center;
  color: rgba(232, 241, 255, 0.64);
  font-size: 13px;
  font-weight: 850;
}

.signal-panel {
  position: fixed;
  left: 50%;
  top: 76px;
  z-index: 16;
  zoom: var(--ui-scale);
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 8px;
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  border: 1px solid rgba(255, 209, 102, 0.32);
  border-radius: 8px;
  background: rgba(20, 14, 6, 0.84);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(16px);
  color: #fff5d6;
  pointer-events: none;
  transition: opacity 160ms ease-out, visibility 160ms ease-out, transform 160ms ease-out;
}

.signal-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.signal-panel strong {
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

.signal-panel span {
  overflow: hidden;
  color: rgba(255, 245, 214, 0.78);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-panel__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.command-panel {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 10;
  zoom: var(--ui-scale);
  width: min(520px, calc(100vw - 32px));
  display: grid;
  gap: 6px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  border: 1px solid rgba(88, 226, 255, 0.28);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.86);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
  pointer-events: none;
  transition: opacity 140ms ease-out, visibility 140ms ease-out, transform 140ms ease-out;
}

.command-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.command-panel input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  outline: none;
}

.command-panel input:focus {
  border-color: rgba(88, 226, 255, 0.58);
  box-shadow: 0 0 0 2px rgba(88, 226, 255, 0.12);
}

.command-panel__hint {
  min-height: 14px;
  overflow: hidden;
  color: rgba(223, 252, 255, 0.72);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-interaction {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 11;
  zoom: var(--ui-scale);
  width: min(220px, calc(100vw - 32px));
  display: grid;
  gap: 7px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, calc(-50% - 118px));
  border: 1px solid rgba(88, 226, 255, 0.34);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.84);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(14px);
  color: #f8fbff;
  pointer-events: none;
  transition: opacity 120ms ease-out, visibility 120ms ease-out, transform 120ms ease-out;
}

.player-interaction.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, calc(-50% - 126px));
  pointer-events: auto;
}

.player-interaction__name {
  overflow: hidden;
  color: rgba(223, 252, 255, 0.74);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-interaction__choices {
  display: grid;
  gap: 6px;
}

.player-interaction__choice {
  height: 34px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  color: rgba(248, 251, 255, 0.82);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: left;
  cursor: pointer;
}

.player-interaction__choice:hover,
.player-interaction__choice.is-selected {
  border-color: rgba(88, 226, 255, 0.56);
  background: rgba(88, 226, 255, 0.16);
  color: #ffffff;
}

.player-interaction__choice.is-requested {
  border-color: rgba(255, 229, 111, 0.72);
  background: rgba(255, 229, 111, 0.14);
  box-shadow: 0 0 18px rgba(255, 229, 111, 0.28);
}

.player-interaction__icon {
  display: grid;
  place-items: center;
  color: #dffcff;
  font-size: 15px;
  line-height: 1;
}

.trade-panel,
.container-panel,
.trade-port-panel {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 12;
  zoom: var(--ui-scale);
  width: min(620px, calc(100vw - 32px));
  display: grid;
  gap: 12px;
  padding: 14px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(10px);
  border: 1px solid rgba(88, 226, 255, 0.28);
  border-radius: 8px;
  background: rgba(3, 8, 24, 0.88);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
  color: #f8fbff;
  pointer-events: none;
  transition: opacity 140ms ease-out, visibility 140ms ease-out, transform 140ms ease-out;
}

.trade-panel.is-open,
.container-panel.is-open,
.trade-port-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.container-panel {
  width: min(470px, calc(100vw - 32px));
}

.trade-port-panel {
  width: min(760px, calc(100vw - 32px));
}

.trade-port-panel__main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(170px, 0.76fr) minmax(260px, 1.24fr);
  gap: 12px;
}

.trade-port-panel__editor,
.trade-port-panel__storage {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trade-port-panel__storage {
  grid-column: 1 / -1;
}

.trade-port-panel__section-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.trade-port-panel__section-header button {
  min-height: 24px;
  padding: 4px 9px;
  font-size: 11px;
}

.trade-panel__header,
.trade-panel__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.trade-panel__header strong {
  overflow: hidden;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-panel__close {
  width: 32px;
  min-width: 32px;
  padding: 0;
}

.trade-panel__columns {
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trade-panel__column-title {
  display: block;
  margin-bottom: 8px;
  color: rgba(223, 252, 255, 0.74);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trade-panel__list {
  max-height: min(310px, 42vh);
  display: grid;
  gap: 7px;
  overflow-y: auto;
}

.trade-row {
  min-height: 34px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.trade-row__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tech-color);
  box-shadow: 0 0 10px color-mix(in srgb, var(--tech-color) 70%, transparent);
}

.trade-row__name {
  overflow: hidden;
  color: rgba(240, 247, 255, 0.84);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-row.is-selected {
  border-color: rgba(88, 226, 255, 0.48);
  background: rgba(88, 226, 255, 0.11);
}

.trade-row__stack {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.trade-row__sub {
  overflow: hidden;
  color: rgba(223, 252, 255, 0.58);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trade-row__controls {
  display: grid;
  grid-template-columns: 24px 36px 24px;
  align-items: center;
  gap: 4px;
}

.container-panel .trade-row__controls {
  grid-template-columns: 36px 24px 24px;
}

.trade-port-panel .trade-row__controls {
  grid-template-columns: 24px 34px 24px;
}

.trade-port-panel__storage .trade-row__controls {
  grid-template-columns: 36px 24px 24px;
}

.trade-row__controls button {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
}

.trade-row__amount {
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.trade-panel__actions button {
  flex: 1 1 0;
}

.trade-panel__status {
  min-height: 16px;
  margin: 0;
  overflow: hidden;
  color: rgba(223, 252, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notifications {
  position: fixed;
  top: 72px;
  left: 18px;
  bottom: 74px;
  z-index: 13;
  zoom: var(--ui-scale);
  width: min(260px, calc(100vw - 36px));
  display: grid;
  align-content: start;
  gap: 4px;
  overflow: hidden;
  pointer-events: none;
}

.notification {
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0 3px 10px;
  border-left: 2px solid rgba(88, 226, 255, 0.46);
  color: rgba(232, 241, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-align: left;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.78);
  pointer-events: auto;
  animation: notify-in 180ms ease-out both;
}

.notification__message {
  min-width: 0;
  flex: 1 1 auto;
}

.notification__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
}

.notification__action {
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #58e2ff;
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.25;
  text-shadow: 0 0 10px rgba(88, 226, 255, 0.32), 0 1px 8px rgba(0, 0, 0, 0.78);
  cursor: pointer;
}

.notification__action:hover,
.notification__action:focus-visible {
  color: #fff4c8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.notification.is-leaving {
  animation: notify-out 220ms ease-in both;
}

.difficulty-screen,
.death-screen {
  position: fixed;
  inset: 0;
  z-index: 14;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 98, 98, 0.2), transparent 28%),
    rgba(2, 4, 14, 0.78);
  backdrop-filter: blur(8px);
  pointer-events: none;
  transition: opacity 320ms ease, visibility 320ms ease;
}

.difficulty-screen {
  z-index: 15;
  background:
    radial-gradient(circle at 50% 38%, rgba(88, 226, 255, 0.18), transparent 30%),
    rgba(2, 4, 14, 0.82);
}

.difficulty-screen.is-open,
.death-screen.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.difficulty-screen__panel,
.death-screen__panel {
  zoom: var(--ui-scale);
  width: min(460px, calc((100vw - 32px) / var(--ui-scale)));
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 9, 24, 0.84);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  color: #f8fbff;
  text-align: center;
}

.death-screen__panel {
  display: flex;
  flex-direction: column;
  width: min(460px, calc((100vw - 32px) / var(--ui-scale)));
  max-height: calc((100vh - 32px) / var(--ui-scale));
  max-height: calc((100dvh - 32px) / var(--ui-scale));
  overflow: auto;
  overscroll-behavior: contain;
}

.difficulty-screen__panel {
  width: min(760px, calc((100vw - 32px) / var(--ui-scale)));
}

.start-menu {
  display: grid;
  gap: 18px;
  max-height: calc((100vh - 48px) / var(--ui-scale));
  max-height: calc((100dvh - 48px) / var(--ui-scale));
  overflow: auto;
  overscroll-behavior: contain;
}

.start-menu__top {
  display: grid;
  grid-template-columns: 84px 1fr 84px;
  align-items: start;
  gap: 10px;
}

.start-menu__top .difficulty-screen__eyebrow,
.start-menu__top h1 {
  grid-column: 2;
}

.start-menu__account {
  grid-column: 2;
  justify-self: center;
  display: grid;
  gap: 2px;
  width: min(360px, 100%);
  margin-top: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(116, 224, 255, 0.28);
  border-radius: 8px;
  background: rgba(9, 24, 45, 0.66);
  color: rgba(248, 251, 255, 0.78);
  text-align: center;
  box-shadow: inset 0 0 22px rgba(116, 224, 255, 0.08);
}

.start-menu__account[hidden] {
  display: none;
}

.start-menu__account span {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.start-menu__account strong {
  color: #f8fbff;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.start-menu__account-logout {
  justify-self: center;
  min-height: 28px;
  margin-top: 6px;
  padding: 0 14px;
  border: 1px solid rgba(248, 251, 255, 0.2);
  border-radius: 8px;
  background: rgba(248, 251, 255, 0.08);
  color: rgba(248, 251, 255, 0.86);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.start-menu__account-logout[hidden] {
  display: none;
}

.start-menu__account-logout:hover,
.start-menu__account-logout:focus-visible {
  border-color: rgba(116, 224, 255, 0.48);
  background: rgba(116, 224, 255, 0.14);
  color: #f8fbff;
}

.start-menu__account-logout:disabled {
  cursor: wait;
  opacity: 0.56;
}

.start-menu__account-login {
  color: #74e0ff;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.start-menu__account-login:hover,
.start-menu__account-login:focus-visible {
  color: #f8fbff;
}

.start-menu__account.is-fnm-linked {
  border-color: rgba(255, 210, 108, 0.46);
  box-shadow:
    inset 0 0 22px rgba(255, 210, 108, 0.08),
    0 12px 34px rgba(255, 210, 108, 0.08);
}

.start-menu__account.is-loading,
.start-menu__account.is-signed-out {
  border-color: rgba(248, 251, 255, 0.2);
  color: rgba(248, 251, 255, 0.66);
  box-shadow: inset 0 0 22px rgba(248, 251, 255, 0.05);
}

.start-menu__account.is-signed-out strong {
  color: rgba(248, 251, 255, 0.78);
}

.start-menu__back {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(248, 251, 255, 0.88);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.start-menu__back[hidden] {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

.start-menu__view {
  display: none;
}

.start-menu__view.is-active {
  display: block;
}

.start-menu__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: min(360px, 100%);
  margin: 0 auto;
}

.start-menu__actions--split {
  width: min(460px, 100%);
}

.shared-world-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.shared-world-stat {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.shared-world-stat span,
.shared-world-stat strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.shared-world-stat span {
  color: rgba(223, 252, 255, 0.66);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.shared-world-stat strong {
  margin-top: 5px;
  color: #f8fbff;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
}

.shared-world-stat--wide {
  grid-column: 1 / -1;
}

.start-menu__leaderboard {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  width: min(460px, 100%);
  max-height: clamp(180px, calc((100vh - 320px) / var(--ui-scale)), 360px);
  max-height: clamp(180px, calc((100dvh - 320px) / var(--ui-scale)), 360px);
  margin: 0 auto;
  text-align: left;
}

.start-menu__leaderboard .leaderboard-panel__header {
  padding: 0 8px 4px;
}

.start-menu__leaderboard .leaderboard-panel__list {
  min-height: 172px;
}

.start-store {
  display: grid;
  gap: 12px;
  width: min(760px, 100%);
  margin: 0 auto;
  text-align: left;
}

.start-store__status {
  min-height: 34px;
  display: grid;
  align-items: center;
  padding: 9px 11px;
  border: 1px solid rgba(116, 224, 255, 0.2);
  border-radius: 8px;
  background: rgba(9, 24, 45, 0.52);
  color: rgba(223, 252, 255, 0.84);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.start-store__status.is-error {
  border-color: rgba(255, 115, 173, 0.28);
  background: rgba(255, 115, 173, 0.1);
  color: #ffd7e4;
}

.start-store__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.start-store__filter {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(232, 241, 255, 0.78);
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  transition: background 120ms ease-out, border-color 120ms ease-out, color 120ms ease-out, box-shadow 120ms ease-out;
}

.start-store__filter:hover,
.start-store__filter:focus-visible {
  border-color: rgba(88, 226, 255, 0.58);
  background: rgba(88, 226, 255, 0.12);
  color: #f8fbff;
  outline: none;
}

.start-store__filter.is-active {
  border-color: rgba(255, 229, 111, 0.58);
  background: rgba(255, 229, 111, 0.14);
  color: #fff7cf;
  box-shadow: inset 0 0 0 1px rgba(255, 229, 111, 0.12);
}

.start-store__content {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.start-store__preview {
  min-width: 0;
  min-height: 258px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  justify-items: center;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(116, 224, 255, 0.18);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 38%, rgba(88, 226, 255, 0.14), rgba(9, 24, 45, 0.52) 58%),
    rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.start-store__preview-canvas {
  width: 100%;
  max-width: 136px;
  height: auto;
  aspect-ratio: 9 / 11;
  display: block;
  align-self: center;
}

.start-store__preview-name,
.start-store__preview-meta {
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-store__preview-name {
  color: #f8fbff;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
}

.start-store__preview-meta {
  color: rgba(232, 241, 255, 0.64);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.start-store__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: clamp(220px, calc((100vh - 300px) / var(--ui-scale)), 430px);
  max-height: clamp(220px, calc((100dvh - 300px) / var(--ui-scale)), 430px);
  padding: 2px 4px 8px 2px;
  overflow: auto;
  overscroll-behavior: contain;
}

.start-store__card {
  position: relative;
  min-width: 0;
  min-height: 126px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.start-store__card.is-owned {
  border-color: rgba(102, 224, 184, 0.32);
  background: rgba(102, 224, 184, 0.08);
}

.start-store__card.is-equipped {
  border-color: rgba(255, 229, 111, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 229, 111, 0.14);
}

.start-store__card.is-previewed {
  border-color: rgba(88, 226, 255, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(88, 226, 255, 0.16),
    0 0 18px rgba(88, 226, 255, 0.08);
}

.start-store__card:focus-visible {
  border-color: rgba(88, 226, 255, 0.76);
  outline: none;
  box-shadow:
    inset 0 0 0 1px rgba(88, 226, 255, 0.22),
    0 0 0 2px rgba(88, 226, 255, 0.18);
}

.start-store__swatch {
  width: 56px;
  height: 56px;
  display: block;
  border: 1px solid color-mix(in srgb, var(--skin-accent) 62%, white 8%);
  border-radius: 50%;
  background:
    linear-gradient(135deg, var(--skin-color) 0 58%, var(--skin-accent) 59% 100%);
  box-shadow:
    inset 0 0 0 6px rgba(255, 255, 255, 0.08),
    0 10px 22px color-mix(in srgb, var(--skin-color) 24%, transparent);
}

.start-store__summary {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 2px 46px 0 0;
}

.start-store__name,
.start-store__meta,
.start-store__status-pill {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-store__name {
  color: #f8fbff;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.1;
}

.start-store__meta {
  color: rgba(232, 241, 255, 0.64);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.start-store__status-pill {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: calc(100% - 20px);
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  color: #ffe56f;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.start-store__action {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 36px;
}

.start-menu__button {
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.start-menu__button--primary {
  border-color: rgba(255, 229, 111, 0.42);
  background: linear-gradient(90deg, rgba(88, 226, 255, 0.2), rgba(255, 229, 111, 0.18));
}

.start-menu__button:hover:not(:disabled),
.start-menu__button:focus-visible,
.start-menu__back:hover,
.start-menu__back:focus-visible {
  border-color: rgba(88, 226, 255, 0.58);
  background: rgba(88, 226, 255, 0.14);
  outline: none;
}

.start-menu__button:disabled {
  cursor: default;
  opacity: 0.58;
}

.start-menu__join {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 8px;
}

.start-menu__join input,
.lobby-panel__invite input {
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
  font: inherit;
  font-size: 15px;
  font-weight: 850;
}

.start-menu__join input:focus,
.lobby-panel__invite input:focus {
  border-color: rgba(88, 226, 255, 0.58);
  box-shadow: 0 0 0 2px rgba(88, 226, 255, 0.12);
}

.start-menu__list {
  display: grid;
  gap: 8px;
  min-height: 86px;
  max-height: 260px;
  overflow: auto;
  overscroll-behavior: contain;
  text-align: left;
}

.start-menu__empty,
.start-menu__row {
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(232, 241, 255, 0.78);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
}

.start-menu__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.start-menu__row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.start-menu__row strong,
.start-menu__row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-menu__row strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.lobby-panel {
  display: grid;
  gap: 12px;
  text-align: left;
}

.lobby-panel__summary {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.lobby-panel__summary span,
.lobby-panel__summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-panel__summary span {
  color: rgba(232, 241, 255, 0.7);
  font-size: 12px;
  font-weight: 900;
}

.lobby-panel__summary strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.lobby-panel__difficulty {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid rgba(126, 255, 191, 0.28);
  border-radius: 8px;
  border-color: rgba(126, 255, 191, 0.52);
  background: rgba(126, 255, 191, 0.12);
}

.lobby-panel__difficulty > span {
  color: rgba(232, 241, 255, 0.7);
  font-size: 12px;
  font-weight: 900;
}

.lobby-difficulty-select {
  position: relative;
  min-width: 0;
}

.lobby-difficulty-select__toggle,
.lobby-difficulty-select__menu button {
  width: 100%;
  min-height: 48px;
  padding: 0 42px 0 14px;
  border: 1px solid rgba(88, 226, 255, 0.48);
  border-radius: 8px;
  outline: none;
  background: rgba(11, 24, 32, 0.98);
  color: #f8fbff;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  text-align: left;
}

.lobby-difficulty-select__toggle {
  position: relative;
  cursor: pointer;
}

.lobby-difficulty-select__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 15px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid rgba(248, 251, 255, 0.92);
  transform: translateY(-42%);
}

.lobby-difficulty-select.is-open .lobby-difficulty-select__toggle::after {
  transform: translateY(-58%) rotate(180deg);
}

.lobby-difficulty-select__toggle:hover:not(:disabled),
.lobby-difficulty-select__toggle:focus-visible,
.lobby-difficulty-select__menu button:hover,
.lobby-difficulty-select__menu button:focus-visible {
  border-color: rgba(88, 226, 255, 0.72);
  background: rgba(18, 49, 60, 0.98);
}

.lobby-difficulty-select__toggle:disabled {
  cursor: default;
  opacity: 0.58;
}

.lobby-difficulty-select__menu {
  position: absolute;
  z-index: 3;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(88, 226, 255, 0.44);
  border-radius: 8px;
  background: rgba(5, 10, 24, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
}

.lobby-difficulty-select__menu[hidden] {
  display: none;
}

.lobby-difficulty-select__menu button {
  min-height: 40px;
  padding-right: 14px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  cursor: pointer;
}

.lobby-difficulty-select__menu button.is-selected {
  border-color: rgba(126, 255, 191, 0.58);
  background: rgba(126, 255, 191, 0.15);
}

.lobby-panel__players {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.lobby-slot {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  text-align: center;
}

.lobby-slot.is-filled {
  border-color: rgba(88, 226, 255, 0.28);
}

.lobby-slot strong,
.lobby-slot span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lobby-slot strong {
  color: #ffffff;
  font-size: 14px;
  font-weight: 950;
}

.lobby-slot span {
  color: rgba(232, 241, 255, 0.68);
  font-size: 11px;
  font-weight: 850;
}

.lobby-slot button {
  min-height: 30px;
}

.lobby-panel__invite {
  display: grid;
  gap: 8px;
}

.lobby-panel__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.start-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}

.difficulty-screen__eyebrow,
.death-screen__eyebrow {
  margin: 0 0 8px;
  color: #ff9d9d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.difficulty-screen__eyebrow {
  color: #58e2ff;
}

.difficulty-screen h1,
.death-screen h1 {
  margin: 0 0 20px;
  color: #ffffff;
  font-size: 44px;
  line-height: 1;
  letter-spacing: 0;
}

.difficulty-screen__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.difficulty-card {
  min-height: 156px;
  display: grid;
  align-content: center;
  gap: 9px;
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.065);
  color: #f8fbff;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.difficulty-card:hover,
.difficulty-card:focus-visible {
  border-color: rgba(88, 226, 255, 0.52);
  background: rgba(88, 226, 255, 0.13);
  outline: none;
}

.difficulty-card.is-recommended {
  border-color: rgba(255, 229, 111, 0.4);
}

.difficulty-card strong {
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
}

.difficulty-card span {
  color: rgba(248, 251, 255, 0.86);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.difficulty-card small {
  color: rgba(232, 241, 255, 0.68);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.death-screen__stats {
  flex: 1 1 260px;
  min-height: 0;
  max-height: min(336px, 42vh);
  max-height: min(336px, 42dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 22px;
  text-align: left;
}

.death-screen__stat {
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.death-screen__stat dt {
  margin: 0 0 7px;
  color: rgba(232, 241, 255, 0.7);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.death-screen__stat dd {
  margin: 0;
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
  line-height: 1.08;
}

.death-screen__leaderboard {
  display: grid;
  gap: 9px;
  margin: 0 0 12px;
}

.death-screen__leaderboard label {
  color: rgba(232, 241, 255, 0.76);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
}

.death-screen__leaderboard input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
  font: inherit;
  font-size: 16px;
  font-weight: 850;
  text-align: center;
}

.death-screen__leaderboard input:focus {
  border-color: rgba(88, 226, 255, 0.58);
  box-shadow: 0 0 0 2px rgba(88, 226, 255, 0.12);
}

.death-screen__leaderboard-status {
  min-height: 16px;
  margin: 0;
  color: rgba(232, 241, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.death-screen__button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #ff6262, #ffe56f);
  color: #170915;
  font: inherit;
  font-size: 15px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(255, 98, 98, 0.26);
}

.death-screen__button + .death-screen__button {
  margin-top: 12px;
}

.death-screen__button--secondary {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(20, 26, 46, 0.9);
  color: #f8fbff;
  box-shadow: none;
}

.death-screen__button:disabled {
  cursor: default;
  opacity: 0.72;
}

.death-screen__button.is-loading:disabled {
  cursor: wait;
}

.death-screen__button.is-saved:disabled {
  cursor: default;
  opacity: 1;
}

@keyframes notify-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes notify-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-6px);
  }
}

@keyframes objective-unclaimed-pulse {
  0%,
  100% {
    filter: brightness(1);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.3), 0 0 22px rgba(255, 220, 122, 0.28);
  }

  50% {
    filter: brightness(1.22);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 34px rgba(255, 220, 122, 0.5);
  }
}

@keyframes objective-link-unclaimed-pulse {
  0%,
  100% {
    stroke: rgba(255, 220, 122, 0.58);
  }

  50% {
    stroke: rgba(255, 231, 151, 0.9);
  }
}

@keyframes objective-link-glow-unclaimed-pulse {
  0%,
  100% {
    stroke: rgba(255, 220, 122, 0.16);
  }

  50% {
    stroke: rgba(255, 220, 122, 0.34);
  }
}

@media (max-width: 900px), (max-height: 560px) {
  .hud {
    top: 70px;
    left: 12px;
    max-width: calc(100vw - 24px);
    gap: 6px;
  }

  .developer-overlay {
    top: 70px;
    right: 12px;
    width: min(420px, calc((100vw - 24px) / var(--ui-scale)));
    max-height: min(560px, calc((100vh - 82px) / var(--ui-scale)));
    max-height: min(560px, calc((100dvh - 82px) / var(--ui-scale)));
  }

  .hud.is-compact:not(.is-compact-open) .hud__progress,
  .hud.is-compact:not(.is-compact-open) .hud__score,
  .hud.is-compact:not(.is-compact-open) .hud__body,
  .hud.is-compact:not(.is-compact-open) .hud__growth-rate,
  .hud.is-compact:not(.is-compact-open) .hud__status-effects,
  .hud.is-compact:not(.is-compact-open) .leaderboard-panel {
    display: none;
  }

  .hud__land-action.is-visible {
    display: inline-flex;
  }

  .hud__health {
    width: 148px;
  }

  .hud__energy {
    width: 148px;
  }

  .hud__score {
    min-width: 112px;
  }

  .hud__body {
    width: clamp(216px, calc(100vw - 458px), 360px);
    grid-template-columns: minmax(60px, max-content) minmax(64px, 1fr) minmax(44px, max-content);
    gap: 7px;
    padding: 7px 9px;
  }

  .hud__growth-rate {
    min-width: 116px;
    padding: 7px 9px;
  }

  .hud__status-effects {
    height: 38px;
  }

  .hud-status-effect {
    width: 50px;
  }

  .compact-hud-toggles {
    top: 12px;
    left: 118px;
    right: auto;
    bottom: auto;
    grid-template-columns: repeat(5, 46px);
  }

  #vitalsToggle {
    display: grid;
  }

  #mapToggle {
    display: grid;
  }

  .map-filter {
    right: 10px;
    bottom: calc(10px + 58px + clamp(160px, 34vmin, 228px) + 8px);
    display: none;
    min-width: min(184px, calc(100vw - 20px));
  }

  .map-speedometer {
    right: 10px;
    bottom: calc(10px + 58px + clamp(160px, 34vmin, 228px) + 82px);
    display: none;
    min-width: min(184px, calc(100vw - 20px));
  }

  .map-filter.is-open {
    display: grid;
  }

  .map-speedometer.is-open {
    display: grid;
  }

  .touch-joystick.is-enabled {
    display: block;
  }

  .online-toggle {
    left: 12px;
    right: auto;
    top: 12px;
    bottom: auto;
    min-width: 96px;
    height: 46px;
  }

  .tech-ledger {
    top: auto;
    right: 12px;
    bottom: 70px;
    width: min(220px, calc(100vw - 24px));
    padding: 10px;
  }

  .settings-toggle {
    right: 12px;
    top: 12px;
    bottom: auto;
    width: 46px;
    height: 46px;
  }

  .build-menu {
    padding: 14px;
  }

  .objective-tree {
    padding: 14px;
  }

  .build-menu__panel {
    width: min(760px, calc((100vw - 28px) / var(--ui-scale)));
    height: min(700px, calc((100vh - 28px) / var(--ui-scale)));
    height: min(700px, calc((100dvh - 28px) / var(--ui-scale)));
    max-height: calc((100vh - 28px) / var(--ui-scale));
    max-height: calc((100dvh - 28px) / var(--ui-scale));
    padding: 12px;
  }

  .build-menu__body {
    grid-template-columns: minmax(150px, 190px) minmax(240px, 1fr);
    overflow-y: auto;
  }

  .build-menu__details {
    grid-column: 1 / -1;
    min-height: 0;
  }

  .objective-tree__panel {
    width: min(760px, calc((100vw - 28px) / var(--ui-scale)));
    height: min(700px, calc((100vh - 28px) / var(--ui-scale)));
    height: min(700px, calc((100dvh - 28px) / var(--ui-scale)));
    max-height: calc((100vh - 28px) / var(--ui-scale));
    max-height: calc((100dvh - 28px) / var(--ui-scale));
    padding: 12px;
  }

  .objective-tree__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(330px, 1fr) auto;
    overflow-y: auto;
  }

  .objective-tree__map {
    min-height: 330px;
  }

  .objective-tree__viewport {
    width: 900px;
    height: 1000px;
  }

  .objective-tree__detail {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .hud {
    top: 118px;
    left: 10px;
    right: 10px;
    max-width: calc(100vw - 20px);
    gap: 6px;
  }

  .hud__group,
  .hud__mode,
  .hud__progress,
  .hud__score,
  .hud__body,
  .hud__growth-rate,
  .hud__status-effects,
  .hud__leaderboard-toggle {
    min-width: 0;
    flex: 1 1 0;
    height: 38px;
  }

  .hud__status-effects {
    flex: 0 0 auto;
  }

  .hud-status-effect {
    width: 48px;
    height: 30px;
  }

  .hud__group {
    gap: 8px;
    padding: 7px 8px;
  }

  .hud__group strong {
    font-size: 17px;
  }

  .hud__progress {
    flex-basis: 100%;
    width: 100%;
  }

  .compact-hud-toggles {
    top: 64px;
    left: 12px;
    grid-template-columns: repeat(5, 42px);
    gap: 6px;
  }

  .compact-hud-toggle {
    width: 42px;
    height: 42px;
  }

  .map-filter {
    grid-template-columns: minmax(0, 1fr);
    min-width: min(176px, calc(100vw - 20px));
  }

  .map-filter__row {
    grid-template-columns: auto minmax(92px, 1fr);
  }

  .hud__score {
    min-width: 112px;
  }

  .hud__energy {
    min-width: 118px;
  }

  .hud__body {
    flex-basis: 100%;
    width: 100%;
    grid-template-columns: minmax(62px, auto) minmax(88px, 1fr) minmax(64px, auto);
    gap: 7px;
    padding: 7px 8px;
  }

  .hud__growth-rate {
    min-width: 116px;
  }

  .hud__body-label {
    font-size: 11px;
  }

  .hud__body-meter strong {
    padding: 0 6px;
    font-size: 10px;
  }

  .hud__leaderboard-toggle:not(.hud__score) {
    flex-basis: 100%;
    width: 100%;
  }

  .leaderboard-panel {
    top: 122px;
    width: calc(100vw - 20px);
    max-height: min(360px, calc(100vh - 146px));
  }

  .notifications {
    top: 96px;
    left: 10px;
    bottom: 66px;
    width: min(220px, calc(100vw - 20px));
  }

  .player-interaction {
    width: min(210px, calc(100vw - 20px));
    transform: translate(-50%, calc(-50% - 104px));
  }

  .player-interaction.is-open {
    transform: translate(-50%, calc(-50% - 112px));
  }

  .trade-panel,
  .container-panel {
    bottom: 10px;
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }

  .trade-panel__columns {
    grid-template-columns: 1fr;
  }

  .trade-panel__list {
    max-height: 34vh;
  }

  .tech-row,
  .build-row {
    gap: 7px;
  }

  .build-menu {
    padding: 12px;
  }

  .objective-tree {
    padding: 12px;
  }

  .build-menu__panel {
    width: calc((100vw - 24px) / var(--ui-scale));
    height: calc((100vh - 24px) / var(--ui-scale));
    height: calc((100dvh - 24px) / var(--ui-scale));
    max-height: calc((100vh - 24px) / var(--ui-scale));
    max-height: calc((100dvh - 24px) / var(--ui-scale));
    grid-template-rows: auto auto minmax(0, 1fr);
    padding: 12px;
  }

  .build-menu__header {
    gap: 10px;
  }

  .build-menu__header span {
    font-size: 16px;
  }

  .build-menu__header strong {
    max-width: 92px;
    overflow: hidden;
    text-align: right;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .build-menu__body {
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(190px, 0.95fr) minmax(180px, 1fr);
    gap: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .build-menu__resources {
    min-height: 0;
    padding: 10px;
  }

  .build-menu__tabs {
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .build-menu__tab {
    flex: 0 0 auto;
  }

  .build-menu__grid {
    overflow-y: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 4px;
  }

  .build-menu__details {
    grid-column: auto;
    min-height: 0;
    overflow-y: auto;
  }

  .objective-tree__panel {
    width: calc((100vw - 24px) / var(--ui-scale));
    height: calc((100vh - 24px) / var(--ui-scale));
    height: calc((100dvh - 24px) / var(--ui-scale));
    max-height: calc((100vh - 24px) / var(--ui-scale));
    max-height: calc((100dvh - 24px) / var(--ui-scale));
    padding: 12px;
  }

  .objective-tree__header {
    gap: 10px;
  }

  .objective-tree__header span {
    font-size: 16px;
  }

  .objective-tree__header strong {
    max-width: 140px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .objective-tree__header-actions {
    gap: 6px;
  }

  .objective-tree__claim-all {
    min-width: 74px;
    padding: 0 9px;
    font-size: 10px;
  }

  .objective-tree__body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(360px, 1fr) auto;
    gap: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .objective-tree__map {
    min-width: 460px;
    min-height: 360px;
    padding: 16px;
  }

  .objective-node {
    --objective-node-size: 56px;
  }

  .objective-node__icon {
    font-size: 18px;
  }

  .objective-tree__viewport {
    width: 820px;
    height: 940px;
  }

  .objective-tree__detail {
    min-height: 0;
    overflow-y: auto;
  }

  .tool-hotbar {
    bottom: 10px;
    max-width: calc(100vw - 20px);
    grid-auto-columns: minmax(78px, 1fr);
    overflow-x: auto;
  }

  .tool-slot {
    height: 44px;
  }

  .online-toggle {
    left: 10px;
    right: auto;
    top: 10px;
    bottom: auto;
    min-width: 96px;
    height: 46px;
  }

  .touch-joystick {
    left: 10px;
    bottom: 10px;
    width: 118px;
    height: 118px;
  }

  .touch-joystick--fire {
    left: auto;
    right: 10px;
  }

  .compact-hud-toggles {
    left: 10px;
    right: auto;
    top: 64px;
    bottom: auto;
  }

  .tech-ledger {
    right: 10px;
    bottom: 64px;
  }

  .settings-toggle {
    right: 10px;
    top: 64px;
    bottom: auto;
    width: 46px;
    height: 46px;
  }

  .settings-panel {
    padding: 12px;
  }

  .settings-panel__panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);

    padding: 12px;
  }

  .settings-panel__body {
    grid-template-columns: 1fr;
  }

  .settings-panel__group--controls {
    grid-row: auto;
  }

  .social-panel {
    top: auto;
    left: 10px;
    right: auto;
    bottom: 64px;
    width: calc(100vw - 20px);
    max-height: min(420px, calc(100vh - 120px));
  }

  .signal-panel {
    top: 14px;
    width: calc(100vw - 20px);
  }

  .command-panel {
    bottom: 70px;
    width: calc(100vw - 20px);
  }

  .difficulty-screen,
  .death-screen {
    padding: 10px;
  }

  .difficulty-screen__panel,
  .death-screen__panel {
    padding: 18px;
  }

  .death-screen__panel {
    width: min(100%, calc((100vw - 20px) / var(--ui-scale)));
    max-height: calc((100vh - 20px) / var(--ui-scale));
    max-height: calc((100dvh - 20px) / var(--ui-scale));
    padding: 14px;
  }

  .difficulty-screen h1,
  .death-screen h1 {
    font-size: 36px;
  }

  .start-menu {
    gap: 12px;
    max-height: calc((100vh - 20px) / var(--ui-scale));
    max-height: calc((100dvh - 20px) / var(--ui-scale));
  }

  .start-menu[data-active-menu-view="main"] {
    gap: 10px;
    overflow: hidden;
  }

  .start-menu__top {
    grid-template-columns: 64px 1fr 64px;
  }

  .start-menu[data-active-menu-view="main"] .start-menu__top {
    gap: 6px;
  }

  .start-menu[data-active-menu-view="main"] .start-menu__back[hidden] {
    display: none;
  }

  .start-menu[data-active-menu-view="main"] .difficulty-screen__eyebrow {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .start-menu[data-active-menu-view="main"] h1 {
    margin-bottom: 8px;
    font-size: clamp(28px, 9vw, 36px);
  }

  .start-menu[data-active-menu-view="main"] .start-menu__account {
    gap: 1px;
    width: min(320px, 100%);
    padding: 7px 9px;
  }

  .start-menu[data-active-menu-view="main"] .start-menu__account span {
    font-size: 9px;
  }

  .start-menu[data-active-menu-view="main"] .start-menu__account strong {
    font-size: 13px;
  }

  .start-menu__back {
    min-height: 32px;
    padding: 0 8px;
    font-size: 11px;
  }

  .start-menu__join,
  .lobby-panel__actions {
    grid-template-columns: 1fr;
  }

  .start-menu__actions {
    gap: 8px;
  }

  .shared-world-stats {
    grid-template-columns: 1fr;
  }

  .start-store {
    gap: 10px;
  }

  .start-store__content {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .start-store__preview {
    min-height: 150px;
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    justify-items: start;
    align-items: center;
    padding: 10px;
  }

  .start-store__preview-canvas {
    grid-row: 1 / span 2;
    max-width: 96px;
  }

  .start-store__preview-name,
  .start-store__preview-meta {
    text-align: left;
  }

  .start-store__preview-name {
    align-self: end;
  }

  .start-store__preview-meta {
    align-self: start;
  }

  .start-store__grid {
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: clamp(180px, calc((100vh - 390px) / var(--ui-scale)), 280px);
    max-height: clamp(180px, calc((100dvh - 390px) / var(--ui-scale)), 280px);
    padding: 2px 3px 8px 2px;
  }

  .start-store__card {
    min-height: 110px;
    grid-template-columns: 50px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 9px 10px;
    padding: 10px;
  }

  .start-store__summary {
    padding-right: 44px;
  }

  .start-store__status-pill {
    top: 9px;
    right: 9px;
  }

  .start-store__swatch {
    width: 50px;
    height: 50px;
  }

  .start-store__action {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .start-menu__button,
  .start-menu__join input,
  .lobby-panel__invite input {
    min-height: 46px;
    font-size: 14px;
  }

  .start-menu[data-active-menu-view="main"] .start-menu__button {
    min-height: 42px;
  }

  .start-menu__row {
    grid-template-columns: 1fr;
  }

  .start-menu__row-actions {
    justify-content: stretch;
  }

  .start-menu__row-actions .settings-panel__save-action {
    flex: 1 1 0;
    min-width: 0;
  }

  .lobby-panel__difficulty,
  .lobby-panel__players,
  .start-settings {
    grid-template-columns: 1fr;
  }

  .lobby-panel__summary {
    grid-template-columns: 60px minmax(0, 1fr) auto;
  }

  .death-screen__eyebrow {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .death-screen h1 {
    margin-bottom: 12px;
    font-size: 32px;
  }

  .difficulty-screen__options {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .difficulty-card {
    min-height: 92px;
    padding: 12px;
  }

  .death-screen__stats {
    grid-template-columns: 1fr;
    flex-basis: 180px;
    gap: 6px;
    margin-bottom: 12px;
    padding-right: 2px;
  }

  .death-screen__stat {
    min-height: 0;
    padding: 9px 10px;
  }

  .death-screen__stat dt {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .death-screen__stat dd {
    font-size: 16px;
  }

  .death-screen__leaderboard {
    gap: 7px;
    margin-bottom: 8px;
  }

  .death-screen__leaderboard input,
  .death-screen__button {
    min-height: 42px;
  }

  .death-screen__leaderboard input {
    height: 42px;
  }

  .death-screen__leaderboard-status {
    min-height: 14px;
    font-size: 11px;
  }
}

@media (max-height: 460px) {
  .death-screen {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .death-screen__panel {
    max-height: calc((100vh - 16px) / var(--ui-scale));
    max-height: calc((100dvh - 16px) / var(--ui-scale));
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .death-screen__eyebrow {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .death-screen h1 {
    margin-bottom: 10px;
    font-size: 30px;
  }

  .death-screen__stats {
    flex-basis: 120px;
    gap: 6px;
    margin-bottom: 10px;
  }

  .death-screen__stat {
    min-height: 0;
    padding: 8px 10px;
  }

  .death-screen__stat dt {
    margin-bottom: 4px;
  }

  .death-screen__stat dd {
    font-size: 16px;
  }

  .death-screen__leaderboard {
    gap: 6px;
    margin-bottom: 8px;
  }

  .death-screen__leaderboard input,
  .death-screen__button {
    min-height: 40px;
  }

  .death-screen__leaderboard input {
    height: 40px;
  }
}

@media (max-height: 460px) and (min-width: 480px) {
  .difficulty-screen__panel.start-menu[data-active-menu-view="main"] {
    grid-template-columns: minmax(170px, 0.86fr) minmax(240px, 1.14fr);
    align-items: center;
    width: min(720px, calc((100vw - 16px) / var(--ui-scale)));
    max-height: calc((100vh - 16px) / var(--ui-scale));
    max-height: calc((100dvh - 16px) / var(--ui-scale));
    gap: 10px;
    padding: 10px 12px;
    overflow: hidden;
  }

  .start-menu[data-active-menu-view="main"] .start-menu__top {
    grid-template-columns: 1fr;
    justify-items: center;
    align-content: center;
    gap: 4px;
  }

  .start-menu[data-active-menu-view="main"] .start-menu__top .difficulty-screen__eyebrow,
  .start-menu[data-active-menu-view="main"] .start-menu__top h1,
  .start-menu[data-active-menu-view="main"] .start-menu__account {
    grid-column: 1;
  }

  .start-menu[data-active-menu-view="main"] .difficulty-screen__eyebrow {
    margin-bottom: 2px;
    font-size: 9px;
  }

  .start-menu[data-active-menu-view="main"] h1 {
    margin-bottom: 4px;
    font-size: clamp(24px, 5vw, 32px);
  }

  .start-menu[data-active-menu-view="main"] .start-menu__account {
    width: min(260px, 100%);
    padding: 6px 8px;
  }

  .start-menu[data-active-menu-view="main"] .start-menu__actions {
    width: 100%;
    gap: 6px;
  }

  .start-menu[data-active-menu-view="main"] .start-menu__button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .death-screen__panel {
    display: grid;
    grid-template-columns: minmax(148px, 0.82fr) minmax(210px, 1.18fr);
    grid-template-rows: auto auto auto auto;
    align-items: start;
    column-gap: 10px;
    overflow: hidden;
    padding: 8px 10px;
  }

  .death-screen__eyebrow,
  .death-screen h1,
  .death-screen__leaderboard,
  .death-screen__button {
    grid-column: 1;
  }

  .death-screen__eyebrow {
    margin-bottom: 3px;
    font-size: 9px;
  }

  .death-screen h1 {
    margin-bottom: 5px;
    font-size: 20px;
  }

  .death-screen__stats {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: start;
    grid-template-columns: 1fr;
    min-height: 0;
    max-height: calc(((100vh - 16px) / var(--ui-scale)) - 16px);
    max-height: calc(((100dvh - 16px) / var(--ui-scale)) - 16px);
    height: auto;
    margin: 0;
  }

  .death-screen__leaderboard {
    gap: 4px;
    margin-bottom: 5px;
  }

  .death-screen__leaderboard label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .death-screen__leaderboard input,
  .death-screen__button {
    min-height: 28px;
    font-size: 12px;
  }

  .death-screen__leaderboard input {
    height: 28px;
    padding: 0 8px;
  }

  .death-screen__leaderboard-status {
    display: none;
  }

  .death-screen__button + .death-screen__button {
    margin-top: 5px;
  }
}

@media (max-height: 360px) and (min-width: 480px) {
  .difficulty-screen__panel.start-menu[data-active-menu-view="main"] {
    padding: 8px 10px;
  }

  .start-menu[data-active-menu-view="main"] h1 {
    font-size: 24px;
  }

  .start-menu[data-active-menu-view="main"] .start-menu__account {
    padding: 5px 7px;
  }

  .start-menu[data-active-menu-view="main"] .start-menu__button {
    min-height: 34px;
  }
}
