:root {
  color-scheme: dark;
  font-family: "Courier New", Courier, monospace;
  --bg: #05060c;
  --panel: rgba(5, 6, 12, 0.9);
  --line: rgba(139, 143, 204, 0.24);
  --text: #ecf7f3;
  --muted: #8da5a4;
  --cyan: #22d8ff;
  --green: #71e69b;
  --yellow: #f6c85f;
  --red: #ff5b68;
  --magenta: #f06fce;
}

* {
  box-sizing: border-box;
}

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

button,
kbd {
  font: inherit;
}

button {
  color: inherit;
}

.game-shell {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  background: #05060c;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.pixel-icon {
  display: block;
  width: 100%;
  height: 100%;
  shape-rendering: crispEdges;
}

.hud {
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 18px 20px;
  pointer-events: none;
}

.hud-top,
.hud-bottom {
  position: absolute;
  left: 20px;
  right: 20px;
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr minmax(180px, 280px);
  align-items: start;
  gap: 20px;
}

.hud-top {
  top: 18px;
}

.xp-rail {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 7px;
  overflow: hidden;
  background: rgba(83, 230, 223, 0.12);
  border-bottom: 1px solid rgba(83, 230, 223, 0.3);
}

.xp-rail span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(83, 230, 223, 0.7);
  transition: width 120ms linear;
}

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

.availability-panel,
.level-panel,
.timer-panel,
.feed-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.availability-panel,
.level-panel {
  min-height: 66px;
  padding: 10px 12px;
}

.level-panel {
  grid-column: 3;
  text-align: right;
}

.hud-label,
.timer-panel span,
.feed-panel small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.availability-panel strong,
.level-panel strong {
  display: block;
  margin: 3px 0 7px;
  color: var(--text);
  font-size: 18px;
  line-height: 1;
}

.meter,
.boss-meter {
  height: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.meter span,
.boss-meter span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--green);
  transition: width 120ms linear;
}

.timer-panel {
  justify-self: center;
  min-width: 116px;
  padding: 9px 14px 10px;
  text-align: center;
}

.timer-panel strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  line-height: 1;
}

.pause-button {
  position: absolute;
  z-index: 5;
  top: 26px;
  left: calc(50% + 72px);
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  place-items: center;
  color: var(--cyan);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.pause-button:hover,
.pause-button:focus-visible {
  color: var(--bg);
  background: var(--cyan);
  border-color: var(--cyan);
  outline: 0;
}

.give-up-button {
  position: absolute;
  z-index: 5;
  top: 26px;
  left: calc(50% + 120px);
  min-height: 38px;
  padding: 0 13px;
  cursor: pointer;
  color: #ff9ca5;
  background: rgba(31, 7, 14, 0.94);
  border: 1px solid rgba(255, 91, 104, 0.62);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}

.give-up-button:hover,
.give-up-button:focus-visible {
  color: #071015;
  background: var(--red);
  border-color: var(--red);
  outline: 0;
}

.pause-glyph {
  display: flex;
  gap: 4px;
}

.pause-glyph i {
  display: block;
  width: 4px;
  height: 14px;
  background: currentColor;
}

.buff-panel {
  position: absolute;
  z-index: 5;
  bottom: 82px;
  left: 50%;
  display: flex;
  max-width: calc(100vw - 32px);
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: none;
}

.buff-chip {
  padding: 6px 8px;
  color: var(--text);
  background: rgba(7, 16, 21, 0.92);
  border: 1px solid currentColor;
  font-size: 9px;
  white-space: nowrap;
}

.boss-panel {
  position: absolute;
  top: 96px;
  left: 50%;
  width: min(540px, calc(100vw - 40px));
  padding: 9px 12px 10px;
  transform: translateX(-50%);
  background: rgba(29, 8, 18, 0.88);
  border: 1px solid rgba(255, 91, 104, 0.42);
}

.boss-panel > div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: #ffdce0;
  font-size: 12px;
}

.boss-meter span {
  background: var(--red);
}

.boss-panel.bonus-boss {
  background: rgba(26, 22, 7, 0.9);
  border-color: rgba(246, 200, 95, 0.58);
}

.boss-panel.bonus-boss .boss-meter span {
  background: var(--yellow);
}

.boss-panel.swarm-boss {
  background: rgba(38, 3, 8, 0.94);
  border-color: rgba(255, 35, 48, 0.86);
  box-shadow: 0 0 22px rgba(255, 35, 48, 0.2);
}

.boss-panel.swarm-boss .boss-meter span {
  background: #ff2330;
}

.build-area {
  display: flex;
  grid-column: 1 / 3;
  min-width: 0;
  align-items: flex-end;
  gap: 12px;
}

.build-slots {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.upgrade-summary {
  display: flex;
  max-width: 330px;
  min-height: 48px;
  flex: 0 1 330px;
  flex-wrap: wrap;
  align-content: flex-end;
  gap: 5px;
}

.upgrade-summary-item {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  color: #071015;
  background: var(--cyan);
  border: 1px solid #b9f4ff;
  box-shadow: 0 0 8px rgba(34, 216, 255, 0.22);
}

.upgrade-summary-item[data-kind="tome"] {
  background: #fff0a8;
  border-color: #fff9d8;
  box-shadow: 0 0 8px rgba(255, 240, 168, 0.24);
}

.upgrade-summary-item[data-kind="core"] {
  background: var(--green);
  border-color: #caffdb;
  box-shadow: 0 0 8px rgba(113, 230, 155, 0.22);
}

.upgrade-summary-item .pixel-icon {
  width: 23px;
  height: 23px;
}

.upgrade-summary-level {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: grid;
  min-width: 16px;
  height: 14px;
  padding: 0 3px;
  place-items: center;
  color: #f7fbff;
  background: #090b13;
  border: 1px solid #d9e5e8;
  font-size: 8px;
  font-weight: 700;
}

.upgrade-summary-empty {
  align-self: center;
  color: var(--muted);
  font-size: 9px;
}

.pause-upgrades {
  width: min(100%, 690px);
  margin: 0 auto 18px;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(255, 240, 168, 0.26);
  border-bottom: 1px solid rgba(255, 240, 168, 0.26);
}

.pause-upgrades h3 {
  margin: 0 0 12px;
  color: #fff0a8;
  font-size: 10px;
}

.pause-upgrade-summary {
  max-width: none;
  min-height: 48px;
  flex-basis: auto;
  justify-content: center;
  overflow: visible;
}

.pause-upgrade-summary .upgrade-summary-item {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  cursor: help;
}

.pause-upgrade-summary .upgrade-summary-item .pixel-icon {
  width: 30px;
  height: 30px;
}

.pause-upgrade-summary .upgrade-summary-item[data-tooltip]::after {
  position: absolute;
  right: 50%;
  bottom: calc(100% + 10px);
  z-index: 3;
  width: 270px;
  padding: 10px 12px;
  content: attr(data-tooltip);
  color: #ecf7f3;
  background: #050b10;
  border: 1px solid #fff0a8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48);
  font-size: 10px;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(50%, 4px);
  transition: opacity 100ms ease, transform 100ms ease;
  white-space: pre-line;
}

.pause-upgrade-summary .upgrade-summary-item[data-tooltip]:hover::after,
.pause-upgrade-summary .upgrade-summary-item[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(50%, 0);
}

.pause-upgrade-summary .upgrade-summary-item:focus-visible {
  outline: 2px solid #fff0a8;
  outline-offset: 3px;
}

.build-slot {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 150px;
  min-height: 48px;
  padding: 8px 9px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.build-slot.empty {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  color: rgba(141, 165, 164, 0.65);
  border-style: dashed;
  font-size: 10px;
}

.build-slot strong,
.build-slot small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.build-slot-copy {
  min-width: 0;
}

.build-slot-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #071015;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(34, 216, 255, 0.28);
}

.build-slot[data-kind="tome"] .build-slot-icon {
  background: #fff0a8;
  box-shadow: 0 0 10px rgba(255, 240, 168, 0.28);
}

.build-slot-icon .pixel-icon {
  width: 22px;
  height: 22px;
}

.build-slot strong {
  color: var(--cyan);
  font-size: 11px;
}

.build-slot small {
  margin-top: 4px;
  color: #fff0a8;
  font-size: 9px;
  text-shadow: 0 0 8px rgba(255, 240, 168, 0.32);
}

.feed-panel {
  grid-column: 3;
  min-width: 154px;
  padding: 9px 11px;
  text-align: right;
}

.feed-panel span {
  display: block;
  color: var(--yellow);
  font-size: 20px;
  line-height: 1;
}

.banner,
.interaction-prompt {
  position: absolute;
  z-index: 6;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7, 16, 21, 0.94);
  border: 1px solid var(--yellow);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  letter-spacing: 0;
  text-align: center;
}

.event-overlay {
  position: absolute;
  inset: 0;
  z-index: 14;
  display: grid;
  overflow: hidden;
  place-items: center;
  pointer-events: none;
}

.boost-screen {
  background: rgba(3, 10, 14, 0.36);
}

.boost-sticker {
  --boost-color: var(--cyan);
  position: relative;
  width: min(620px, calc(100vw - 36px));
  min-height: 320px;
  padding: 38px 56px 70px;
  color: #071015;
  background: var(--boost-color);
  clip-path: polygon(5% 8%, 93% 0, 100% 84%, 89% 100%, 7% 92%, 0 18%);
  filter: drop-shadow(12px 14px 0 rgba(0, 0, 0, 0.52));
  text-align: center;
  transform: rotate(-2deg);
  animation: boost-pop 1s steps(7, end) both;
}

.boost-sticker::after {
  position: absolute;
  inset: 14px;
  content: "";
  border: 4px solid #071015;
  clip-path: polygon(5% 8%, 93% 0, 100% 84%, 89% 100%, 7% 92%, 0 18%);
}

.boost-sticker p,
.boost-sticker h2,
.boost-sticker strong,
.boost-icon,
.boost-continue {
  position: relative;
  z-index: 1;
}

.boost-sticker p {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.boost-sticker h2 {
  margin: 0;
  font-size: 46px;
  line-height: 1;
}

.boost-sticker strong {
  display: block;
  margin-top: 16px;
  font-family: Arial, sans-serif;
  font-size: 17px;
}

.boost-continue {
  position: absolute;
  right: 0;
  bottom: 30px;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.boost-continue kbd {
  padding: 5px 10px;
  color: var(--boost-color);
  background: #071015;
  border: 2px solid #071015;
  box-shadow: 3px 3px 0 rgba(255, 255, 255, 0.45);
}

.team-card-art {
  position: absolute;
  inset: 18px;
  z-index: 0;
  display: none;
  overflow: hidden;
  opacity: 0.28;
}

.boost-sticker.is-team .team-card-art {
  display: block;
}

.boost-sticker.is-escalation {
  width: min(760px, calc(100vw - 36px));
  min-height: 370px;
}

.boost-sticker.is-escalation h2 {
  font-size: 42px;
}

.boost-sticker.is-escalation strong {
  max-width: 620px;
  margin-right: auto;
  margin-left: auto;
  font-size: 18px;
  line-height: 1.5;
}

.team-card-art i {
  position: absolute;
  bottom: 17px;
  left: 50%;
  width: 54px;
  height: 96px;
  background: #123f62;
  clip-path: polygon(32% 0, 68% 0, 78% 18%, 67% 32%, 83% 40%, 100% 73%, 78% 78%, 70% 55%, 68% 100%, 52% 100%, 49% 62%, 43% 100%, 26% 100%, 30% 55%, 17% 78%, 0 72%, 18% 40%, 34% 32%, 22% 18%);
}

.team-card-art i:nth-child(1) {
  transform: translateX(-150px) rotate(-17deg) scale(0.9);
}

.team-card-art i:nth-child(2) {
  transform: translateX(-27px) translateY(-20px) scale(1.18);
}

.team-card-art i:nth-child(3) {
  transform: translateX(98px) rotate(17deg) scale(0.9);
}

.boost-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  place-items: center;
  color: var(--boost-color);
  background: #071015;
  font-size: 25px;
  font-weight: 700;
}

.cinematic-screen {
  z-index: 15;
  padding: 30px;
  color: var(--yellow);
  background: rgba(3, 10, 14, 0.78);
  text-align: center;
}

.cinematic-content {
  width: min(920px, 100%);
  animation: cinematic-hit 500ms steps(5, end) both;
}

.cinematic-content p {
  margin: 0 0 16px;
  color: var(--red);
  font-size: 15px;
  font-weight: 700;
}

.cinematic-content h2 {
  margin: 0;
  color: currentColor;
  font-size: 62px;
  line-height: 0.95;
}

.cinematic-content strong {
  display: block;
  margin-top: 22px;
  color: var(--text);
  font-family: Arial, sans-serif;
  font-size: 18px;
  line-height: 1.4;
}

@keyframes boost-pop {
  0% { opacity: 0; transform: scale(0.2) rotate(12deg); }
  32% { opacity: 1; transform: scale(1.18) rotate(-5deg); }
  58% { transform: scale(0.96) rotate(-1deg); }
  100% { opacity: 1; transform: scale(1) rotate(-2deg); }
}

@keyframes cinematic-hit {
  0% { opacity: 0; transform: scale(1.55); }
  55% { opacity: 1; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

.banner {
  top: 142px;
  max-width: min(620px, calc(100vw - 32px));
  padding: 10px 18px;
  color: var(--yellow);
  font-size: 12px;
}

.banner.objective-warning {
  max-width: min(1040px, calc(100vw - 40px));
  padding: 18px 30px;
  color: #fff0a8;
  background: rgba(15, 13, 25, 0.97);
  border: 2px solid #fff0a8;
  box-shadow: 0 0 20px rgba(255, 240, 168, 0.28), 0 10px 34px rgba(0, 0, 0, 0.5);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.interaction-prompt {
  bottom: 88px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--text);
  border-color: var(--cyan);
  font-size: 11px;
}

kbd {
  display: inline-grid;
  min-width: 28px;
  min-height: 26px;
  padding: 4px 6px;
  place-items: center;
  color: var(--bg);
  background: var(--text);
  border: 0;
  border-bottom: 3px solid #91a7a5;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
}

.modal-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(3, 10, 14, 0.8);
  backdrop-filter: blur(3px);
}

.start-screen {
  place-items: center start;
  padding-left: clamp(28px, 9vw, 150px);
  background: linear-gradient(90deg, rgba(3, 10, 14, 0.96) 0%, rgba(3, 10, 14, 0.76) 47%, rgba(3, 10, 14, 0.2) 100%);
  backdrop-filter: none;
}

.start-content,
.result-content,
.compact-content,
.choice-content {
  width: min(100%, 820px);
}

.start-content {
  width: min(540px, 88vw);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.86;
}

h1 span {
  color: var(--yellow);
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

.intro-copy {
  max-width: 520px;
  margin: 22px 0;
  color: #b9cbc8;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

.control-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 10px;
}

.control-strip span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.music-settings {
  display: flex;
  min-height: 34px;
  margin: -8px 0 22px;
  align-items: center;
  gap: 12px;
}

.music-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: var(--text);
  font-size: 10px;
}

.music-toggle-control {
  position: relative;
  display: block;
  width: 42px;
  height: 22px;
}

.music-switch input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 42px;
  height: 22px;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.music-label {
  color: var(--muted);
}

.music-switch-track {
  position: relative;
  display: block;
  width: 42px;
  height: 22px;
  background: #16262c;
  border: 1px solid #486168;
  border-radius: 3px;
  box-shadow: inset 0 0 0 2px #081318;
}

.music-switch-track::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 12px;
  height: 12px;
  content: "";
  background: #718589;
  box-shadow: 2px 2px 0 #071015;
  transition: transform 120ms ease, background 120ms ease;
}

.music-switch input:checked + .music-switch-track {
  background: rgba(83, 230, 223, 0.24);
  border-color: var(--cyan);
}

.music-switch input:checked + .music-switch-track::after {
  background: var(--cyan);
  transform: translateX(20px);
}

.music-switch input:focus-visible + .music-switch-track {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

.music-state {
  width: 22px;
  color: var(--cyan);
  font-size: 10px;
}

.music-theme {
  padding-left: 12px;
  color: var(--yellow);
  border-left: 1px solid rgba(246, 200, 95, 0.36);
  font-size: 9px;
}

.compact-content .music-settings {
  justify-content: center;
  margin: 22px 0;
}

.pause-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.danger-button {
  min-height: 46px;
  padding: 0 22px;
  cursor: pointer;
  color: #ffdce0;
  background: #351019;
  border: 1px solid #ff5b68;
  border-bottom: 4px solid #8e1e2c;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
}

.danger-button:hover,
.danger-button:focus-visible {
  color: #071015;
  background: #ff5b68;
  outline: 0;
}

.danger-button:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.primary-button {
  min-height: 46px;
  padding: 0 22px;
  cursor: pointer;
  color: #041012;
  background: var(--cyan);
  border: 0;
  border-bottom: 4px solid #238d89;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
}

.primary-button:hover {
  background: #82f3ed;
}

.primary-button:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.choice-content {
  text-align: center;
}

.upgrade-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.upgrade-card {
  position: relative;
  min-height: 238px;
  padding: 20px;
  cursor: pointer;
  text-align: left;
  background: #0a171d;
  border: 1px solid rgba(83, 230, 223, 0.32);
  border-radius: 4px;
}

.upgrade-card:hover,
.upgrade-card:focus-visible {
  border-color: var(--cyan);
  outline: 0;
  transform: translateY(-3px);
}

.upgrade-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  place-items: center;
  color: var(--bg);
  background: var(--cyan);
  font-size: 22px;
  font-weight: 700;
}

.upgrade-icon .pixel-icon {
  width: 34px;
  height: 34px;
}

.upgrade-card[data-kind="tome"] .upgrade-icon {
  background: var(--yellow);
}

.upgrade-card[data-kind="core"] .upgrade-icon {
  background: var(--green);
}

.upgrade-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 18px;
}

.upgrade-card p {
  margin: 0;
  color: #a8bfbc;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.upgrade-level {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--muted);
  font-size: 10px;
}

.upgrade-key {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--bg);
  background: var(--text);
  border-bottom: 3px solid #91a7a5;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
}

.compact-content,
.result-content {
  text-align: center;
}

.compact-content h2,
.result-content h2 {
  margin-bottom: 24px;
}

.result-content {
  width: min(94vw, 940px);
  max-width: none;
  max-height: calc(100vh - 48px);
  padding: 4px 12px 20px;
  overflow-y: auto;
}

.result-content > p:not(.eyebrow) {
  color: #afc4c1;
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 24px 0;
  background: var(--line);
  border: 1px solid var(--line);
}

.result-stat {
  padding: 15px 10px;
  background: #09151a;
}

.result-stat strong,
.result-stat small {
  display: block;
}

.result-stat strong {
  color: var(--yellow);
  font-size: 22px;
}

.result-stat small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.result-entry {
  width: min(100%, 540px);
  margin: 0 auto 20px;
  text-align: left;
}

.result-entry > label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: #d7e7e4;
  font-size: 10px;
}

.result-entry > label span {
  color: var(--muted);
  font-size: 8px;
}

.result-entry-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.result-entry input {
  min-width: 0;
  height: 46px;
  padding: 0 13px;
  color: #ecf7f3;
  background: #050b10;
  border: 1px solid #43575d;
  border-bottom: 3px solid #657b80;
  border-radius: 3px;
  font: 700 13px "Courier New", monospace;
  letter-spacing: 0;
  text-transform: uppercase;
}

.result-entry input::placeholder {
  color: #617478;
}

.result-entry input:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.result-entry input:disabled {
  color: #9ab0ad;
  opacity: 0.72;
}

.result-entry .primary-button:disabled {
  cursor: default;
  color: #82a09c;
  background: #173438;
  border-bottom-color: #10282b;
}

.leaderboard-status {
  min-height: 14px;
  margin: 7px 0 0;
  color: var(--cyan);
  font-size: 9px;
  text-align: right;
}

.leaderboards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  text-align: left;
}

.leaderboard-panel {
  min-width: 0;
  background: #071116;
  border: 1px solid #263a40;
  border-bottom: 3px solid #304a50;
  border-radius: 3px;
}

.leaderboard-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 12px;
  background: #0b1a20;
  border-bottom: 1px solid #263a40;
}

.leaderboard-panel h3 {
  margin: 0;
  color: #ecf7f3;
  font-size: 12px;
}

.leaderboard-panel header span {
  color: var(--yellow);
  font-size: 9px;
}

.leaderboard-panel table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.leaderboard-panel th,
.leaderboard-panel td {
  height: 36px;
  padding: 0 8px;
  overflow: hidden;
  border-bottom: 1px solid rgba(70, 94, 100, 0.35);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-panel th {
  height: 26px;
  color: #71898d;
  font-size: 9px;
  font-weight: 700;
}

.leaderboard-panel td {
  color: #bdcfcc;
  font-size: 14px;
}

.leaderboard-panel th:first-child,
.leaderboard-panel td:first-child {
  width: 42px;
  padding-right: 4px;
  padding-left: 4px;
  color: #71898d;
  text-align: center;
}

.leaderboard-panel th:nth-child(3),
.leaderboard-panel th:nth-child(4),
.leaderboard-panel td:nth-child(3),
.leaderboard-panel td:nth-child(4) {
  width: 72px;
  text-align: right;
}

.leaderboard-panel tr:last-child td {
  border-bottom: 0;
}

.leaderboard-panel tr.is-current td {
  color: #071015;
  background: var(--cyan);
}

.leaderboard-empty {
  color: #617478 !important;
  text-align: center !important;
}

@media (max-width: 840px) {
  .leaderboards {
    grid-template-columns: 1fr;
  }
}

.is-hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .hud {
    padding: 10px;
  }

  .hud-top,
  .hud-bottom {
    left: 10px;
    right: 10px;
    gap: 8px;
  }

  .hud-top {
    top: 10px;
    grid-template-columns: 1fr 86px 1fr;
  }

  .hud-bottom {
    bottom: 10px;
  }

  .availability-panel,
  .level-panel {
    min-width: 0;
    min-height: 58px;
    padding: 8px;
  }

  .availability-panel strong,
  .level-panel strong {
    font-size: 13px;
  }

  .timer-panel {
    min-width: 0;
    padding: 8px 5px;
  }

  .timer-panel strong {
    font-size: 18px;
  }

  .pause-button {
    top: 74px;
    right: 10px;
    left: auto;
    width: 34px;
    height: 34px;
    transform: none;
  }

  .give-up-button {
    top: 74px;
    right: 54px;
    left: auto;
    min-height: 34px;
  }

  .boss-panel {
    top: 118px;
  }

  .banner {
    top: 176px;
  }

  .build-slot {
    width: min(27vw, 120px);
  }

  .feed-panel {
    min-width: 108px;
  }

  .upgrade-choices {
    grid-template-columns: 1fr;
  }

  .upgrade-card {
    min-height: 180px;
  }

  .control-strip span:nth-child(3) {
    display: none;
  }

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

  .boost-sticker {
    min-height: 290px;
    padding: 32px 26px 68px;
  }

  .boost-sticker h2 {
    font-size: 34px;
  }

  .cinematic-content h2 {
    font-size: 40px;
  }
}
