:root {
  color-scheme: dark;
  --ink: #f4f7ef;
  --muted: #9ea7a0;
  --panel: rgba(11, 15, 14, 0.76);
  --panel-strong: rgba(17, 21, 20, 0.9);
  --line: rgba(255, 255, 255, 0.13);
  --cyan: #46e4ff;
  --lime: #a5ff6a;
  --amber: #ffca5f;
  --coral: #ff6a55;
  --violet: #c276ff;
  --shadow: rgba(0, 0, 0, 0.38);
  --command-panel-width: min(360px, calc(100vw - 36px));
  --command-panel-gutter: 18px;
  --command-panel-top: 96px;
  --command-panel-bottom: 18px;
  --game-brightness: 1;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

#game {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  background: #070807;
  filter: brightness(var(--game-brightness));
  touch-action: none;
}

body.menu-open #game {
  visibility: hidden;
}

.shell {
  position: fixed;
  inset: 0;
  z-index: 2;
  filter: brightness(var(--game-brightness));
  pointer-events: none;
}

body.menu-open .topbar,
body.menu-open .command-panel {
  display: none;
}

.topbar,
.command-panel,
.overlay,
.modal-screen {
  pointer-events: auto;
}

.topbar {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(340px, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.brand,
.readouts,
.top-actions,
.command-panel,
.toast,
.loading-panel,
.menu-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 48px var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 42%, rgba(70, 228, 255, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(5, 7, 6, 0.98), rgba(9, 13, 11, 0.92));
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 360ms ease,
    visibility 360ms ease;
  visibility: hidden;
}

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

.loading-panel {
  width: min(460px, calc(100vw - 44px));
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-radius: 8px;
  background: rgba(8, 12, 10, 0.86);
}

.loading-core {
  position: relative;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, var(--cyan), var(--lime), var(--amber), var(--cyan));
  box-shadow: 0 0 34px rgba(70, 228, 255, 0.28);
  animation: core-spin 1.15s linear infinite;
}

.loading-core::before,
.loading-core::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(7, 8, 7, 0.8);
  border-radius: 50%;
}

.loading-core::after {
  inset: -9px;
  border-color: rgba(165, 255, 106, 0.32);
  animation: core-pulse 1.3s ease-in-out infinite;
}

.loading-core span {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #f4f7ef;
  box-shadow: 0 0 20px rgba(244, 247, 239, 0.5);
}

.loading-copy strong {
  display: block;
  font-size: 24px;
  line-height: 1.05;
}

.loading-copy span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.loading-meter {
  grid-column: 1 / -1;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.loading-meter span {
  width: 0%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--lime), var(--amber));
  box-shadow: 0 0 18px rgba(165, 255, 106, 0.45);
  transition: width 100ms linear;
}

.loading-panel b {
  color: var(--amber);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

@keyframes core-spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes core-pulse {
  50% {
    inset: -15px;
    opacity: 0.45;
  }
}

.brand {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 8px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(from 210deg, var(--cyan), var(--amber), var(--lime), var(--cyan));
  box-shadow: 0 0 24px rgba(70, 228, 255, 0.32);
}

.brand-mark::after {
  content: "";
  width: 17px;
  height: 17px;
  border: 2px solid rgba(7, 8, 7, 0.92);
  border-radius: 50%;
  background: #eefcf2;
}

.brand strong,
.section-head strong,
.wave-controls strong {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 18px;
  line-height: 1.05;
}

.brand span:last-child {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.readouts {
  min-height: 62px;
  display: grid;
  grid-template-columns: repeat(5, minmax(64px, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
}

.readout {
  min-width: 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.035);
}

.readout span,
.section-head span,
.muted,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.readout strong {
  display: block;
  margin-top: 4px;
  font-size: clamp(17px, 2.1vw, 25px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.top-actions {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 900;
}

.icon-button.wide {
  width: 58px;
}

.account-badge {
  min-width: 74px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-badge.is-cloud {
  border-color: rgba(165, 255, 106, 0.5);
  color: var(--lime);
}

.icon-button:hover,
.panel-toggle:hover,
.menu-settings-button:hover,
.profile-tool-button:hover,
.tower-card:hover,
.skill-button:hover:not(:disabled),
.primary:hover:not(:disabled),
.secondary:hover:not(:disabled) {
  border-color: rgba(70, 228, 255, 0.58);
  transform: translateY(-1px);
}

.command-panel {
  position: absolute;
  right: var(--command-panel-gutter);
  top: var(--command-panel-top);
  bottom: var(--command-panel-bottom);
  width: var(--command-panel-width);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  overflow: auto;
  border-radius: 8px;
  transition:
    transform 220ms ease,
    opacity 180ms ease;
  will-change: transform;
}

.panel-toggle {
  position: fixed;
  top: calc(var(--command-panel-top) + 16px);
  right: calc(var(--command-panel-gutter) + var(--command-panel-width) + 8px);
  z-index: 6;
  width: 42px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(11, 15, 14, 0.84);
  box-shadow: 0 18px 48px var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  color: var(--ink);
  font-size: 28px;
  font-weight: 1000;
  line-height: 1;
  transition:
    right 220ms ease,
    bottom 220ms ease,
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

body.panel-collapsed .command-panel {
  opacity: 0;
  pointer-events: none;
  transform: translateX(calc(100% + var(--command-panel-gutter) + 8px));
}

body.panel-collapsed .panel-toggle {
  right: var(--command-panel-gutter);
  background: rgba(11, 15, 14, 0.94);
}

body.menu-open .panel-toggle {
  display: none;
}

.panel-section {
  flex: 0 0 auto;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.tower-shop {
  display: grid;
  gap: 8px;
}

.tower-card {
  min-height: 74px;
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.tower-card.is-selected {
  border-color: rgba(165, 255, 106, 0.78);
  background: rgba(165, 255, 106, 0.11);
}

.tower-card.is-locked {
  filter: grayscale(0.6);
}

.tower-card.is-research-locked {
  opacity: 0.62;
}

.tower-card.is-research-locked .tower-cost {
  color: var(--muted);
}

.tower-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #07100d;
  font-size: 20px;
  font-weight: 1000;
}

.tower-copy {
  min-width: 0;
}

.tower-copy strong,
.inspector-body strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.tower-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tower-cost {
  color: var(--amber);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.inspector {
  min-height: 170px;
}

.inspector-body {
  min-height: 74px;
  color: #dbe5dc;
  font-size: 13px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.mini-stat {
  padding: 8px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.2);
}

.mini-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.mini-stat strong {
  margin-top: 3px;
  font-size: 13px;
}

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

.primary,
.secondary,
.start-button {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 900;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    filter 160ms ease;
}

.primary {
  background: linear-gradient(135deg, #23d0db, #b3f96f);
  color: #06110e;
}

.secondary {
  background: rgba(255, 255, 255, 0.08);
}

.full {
  width: 100%;
}

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

.skill-button {
  width: 100%;
  min-height: 58px;
  display: grid;
  gap: 4px;
  padding: 10px;
  text-align: left;
}

.skill-button strong {
  display: block;
  font-size: 13px;
  line-height: 1.15;
}

.skill-button span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

.skill-button b {
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.skill-button .skill-free-uses {
  color: var(--cyan);
}

.skill-button.is-ready {
  border-color: rgba(165, 255, 106, 0.52);
  background: rgba(165, 255, 106, 0.1);
}

.meter {
  height: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.meter span {
  width: 0%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--lime));
  box-shadow: 0 0 18px rgba(255, 202, 95, 0.45);
  transition: width 180ms ease;
}

.wave-controls {
  order: -1;
  position: sticky;
  top: 0;
  z-index: 2;
  margin-top: 0;
  background: rgba(16, 20, 19, 0.96);
}

.wave-controls > div {
  margin-bottom: 10px;
}

.wave-warnings {
  min-height: 18px;
  display: block;
  margin-top: 5px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-shadow: 0 0 12px rgba(255, 202, 95, 0.3);
}

.wave-warnings:empty {
  visibility: hidden;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 24px;
  min-width: 260px;
  max-width: min(560px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  text-align: center;
  font-weight: 800;
  pointer-events: none;
}

.toast.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

.tutorial-guide {
  position: absolute;
  left: 18px;
  bottom: 22px;
  z-index: 4;
  width: min(360px, calc(100vw - 36px));
  display: none;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(165, 255, 106, 0.34);
  border-radius: 8px;
  background: rgba(8, 13, 11, 0.82);
  box-shadow:
    0 18px 48px var(--shadow),
    0 0 26px rgba(165, 255, 106, 0.12);
  backdrop-filter: blur(18px) saturate(1.2);
  pointer-events: none;
}

.tutorial-guide.is-open {
  display: flex;
}

.tutorial-pips {
  display: grid;
  gap: 5px;
}

.tutorial-pips span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.tutorial-pips span.is-active {
  border-color: rgba(165, 255, 106, 0.82);
  background: var(--lime);
  box-shadow: 0 0 16px rgba(165, 255, 106, 0.38);
}

.tutorial-pips span.is-complete {
  border-color: rgba(70, 228, 255, 0.82);
  background: var(--cyan);
}

.tutorial-guide-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
}

.tutorial-guide-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  color: #07100d;
  font-size: 18px;
  font-weight: 1000;
}

.tutorial-guide strong,
.tutorial-guide small {
  display: block;
  overflow-wrap: anywhere;
}

.tutorial-guide strong {
  font-size: 15px;
  line-height: 1.2;
}

.tutorial-guide small {
  margin-top: 3px;
  color: #dbe5dc;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.is-tutorial-target {
  border-color: rgba(165, 255, 106, 0.92) !important;
  box-shadow:
    0 0 0 3px rgba(165, 255, 106, 0.18),
    0 0 24px rgba(165, 255, 106, 0.24) !important;
  animation: tutorial-target-pulse 0.95s ease-in-out infinite;
}

@keyframes tutorial-target-pulse {
  50% {
    filter: brightness(1.18);
    transform: translateY(-2px) scale(1.01);
  }
}

.account-screen {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: none;
  place-items: center;
  padding: 18px;
  background: linear-gradient(90deg, rgba(4, 5, 4, 0.92), rgba(4, 5, 4, 0.42));
}

.account-screen.is-open {
  display: grid;
}

.account-card {
  width: min(420px, calc(100vw - 36px));
  display: grid;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 13, 11, 0.9);
  box-shadow: 0 18px 48px var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
}

.account-card h2 {
  margin: 0 0 4px;
  font-size: 34px;
  line-height: 1;
}

.account-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-card input {
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  outline: none;
}

.account-card input:focus {
  border-color: rgba(70, 228, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(70, 228, 255, 0.15);
}

.account-card small {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.account-card small.is-error {
  color: var(--coral);
}

.modal-screen {
  position: fixed;
  inset: 0;
  z-index: 11;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(4, 5, 4, 0.62);
}

.modal-screen.is-open {
  display: grid;
}

.settings-card {
  width: min(620px, calc(100vw - 36px));
  max-height: min(720px, calc(100vh - 36px));
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 13, 11, 0.92);
  box-shadow: 0 18px 48px var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
}

.settings-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-card h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
}

.supply-info-card {
  width: min(720px, calc(100vw - 36px));
}

.supply-preview-card-modal {
  width: min(760px, calc(100vw - 36px));
}

.topup-card {
  width: min(520px, calc(100vw - 36px));
}

.game-over-card {
  width: min(460px, calc(100vw - 36px));
}

.supply-confirm-card {
  width: min(460px, calc(100vw - 36px));
}

.research-card {
  width: min(780px, calc(100vw - 36px));
}

.store-card {
  width: min(720px, calc(100vw - 36px));
}

.help-card {
  width: min(760px, calc(100vw - 36px));
}

.settings-body {
  overflow: auto;
  padding: 18px 20px 22px;
}

.help-body {
  display: grid;
  gap: 18px;
  overflow: auto;
  padding: 18px 20px 22px;
}

.feedback-section {
  padding: 14px;
  border: 1px solid rgba(70, 228, 255, 0.2);
  border-radius: 8px;
  background: rgba(70, 228, 255, 0.055);
}

.help-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.help-section-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
}

.help-section-head small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.feedback-section textarea {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 11px 12px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.feedback-section textarea:focus {
  border-color: rgba(70, 228, 255, 0.62);
  outline: none;
}

.feedback-actions {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.feedback-actions span {
  color: var(--lime);
  font-size: 12px;
  font-weight: 900;
}

.feedback-actions button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  color: #07100d;
  font-size: 12px;
  font-weight: 1000;
}

.help-changelog {
  min-height: 0;
}

.research-body {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
  padding: 18px 20px 22px;
}

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

.research-tabs button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.research-tabs button.is-selected {
  border-color: rgba(165, 255, 106, 0.58);
  background: rgba(165, 255, 106, 0.12);
  color: var(--lime);
}

.research-content {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.research-tower-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(170px, auto);
  gap: 10px;
  align-items: center;
  padding: 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
}

.research-tower-card.is-unlocked {
  border-color: rgba(165, 255, 106, 0.26);
}

.research-tower-copy {
  min-width: 0;
}

.research-tower-copy strong,
.research-tower-copy small {
  display: block;
}

.research-tower-copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 1000;
}

.research-tower-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.research-tower-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.research-tower-actions button,
.research-tower-actions b {
  min-height: 32px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid rgba(70, 228, 255, 0.28);
  background: rgba(70, 228, 255, 0.09);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 1000;
  white-space: nowrap;
}

.research-tower-actions b {
  grid-column: 1 / -1;
  border-color: rgba(165, 255, 106, 0.32);
  background: rgba(165, 255, 106, 0.09);
  color: var(--lime);
}

.research-empty {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
  text-align: center;
}

.research-empty strong {
  color: var(--ink);
  font-size: 18px;
}

.research-empty span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.store-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 22px;
}

.store-wallet {
  justify-content: stretch;
}

.store-wallet .currency-pill {
  flex: 1 1 180px;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 14px;
}

.store-wallet .currency-pill small {
  font-size: 12px;
}

.store-wallet .currency-pill b {
  margin-left: auto;
  font-size: 16px;
}

.store-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.store-product {
  min-height: 128px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 5px 10px;
  align-content: center;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background:
    linear-gradient(135deg, rgba(70, 228, 255, 0.07), rgba(255, 202, 95, 0.04)),
    rgba(255, 255, 255, 0.045);
  color: var(--ink);
  text-align: left;
}

.store-product i {
  grid-row: 1 / -1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  color: #07100d;
  font-style: normal;
  font-size: 18px;
  font-weight: 1000;
}

.store-product strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}

.store-product span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
}

.store-product:hover {
  border-color: rgba(70, 228, 255, 0.58);
  transform: translateY(-1px);
}

.topup-body {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 18px 20px 22px;
}

.supply-confirm-body {
  display: grid;
  gap: 16px;
  padding: 18px 20px 22px;
}

.supply-confirm-body p {
  margin: 0;
  color: #dbe5dc;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.supply-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.game-over-body {
  display: grid;
  gap: 16px;
  padding: 18px 20px 22px;
}

.game-over-body p {
  margin: 0;
  color: #dbe5dc;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.topup-balance {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid rgba(194, 118, 255, 0.32);
  background: rgba(194, 118, 255, 0.1);
  color: var(--ink);
  font-size: 14px;
  font-weight: 1000;
}

.topup-packs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.topup-pack {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  text-align: left;
}

.topup-pack strong,
.topup-pack span {
  display: block;
}

.topup-pack strong {
  color: var(--violet);
  font-size: 18px;
  line-height: 1.1;
}

.topup-pack span {
  color: var(--amber);
  font-size: 12px;
  font-weight: 1000;
}

.topup-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.supply-info-body {
  overflow: auto;
  padding: 18px 20px 22px;
}

.supply-info-body section + section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.supply-info-body h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
}

.supply-info-body p {
  margin: 0;
  color: #dbe5dc;
  font-size: 13px;
  font-weight: 780;
  line-height: 1.55;
}

.supply-pool-list {
  display: grid;
  gap: 8px;
}

.supply-pool-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.supply-pool-list span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.supply-pool-list b {
  color: var(--cyan);
}

.supply-pool-list strong {
  color: var(--amber);
  font-size: 13px;
}

.supply-pool-list small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.supply-note {
  margin-top: 10px !important;
  color: var(--cyan) !important;
}

.settings-section {
  padding: 4px 0 24px;
}

.settings-section + .settings-section {
  margin-top: 10px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.settings-section > h3 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1;
  letter-spacing: 0;
}

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

.difficulty-options button,
.setting-options button {
  min-height: 58px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045)),
    rgba(255, 255, 255, 0.06);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-weight: 900;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.difficulty-options button::before,
.setting-options button::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.difficulty-options button:hover,
.setting-options button:hover {
  border-color: rgba(70, 228, 255, 0.58);
  transform: translateY(-1px);
}

.difficulty-options button.is-selected,
.setting-options button.is-selected {
  border-color: rgba(165, 255, 106, 0.78);
  background:
    linear-gradient(180deg, rgba(165, 255, 106, 0.22), rgba(70, 228, 255, 0.08)),
    rgba(165, 255, 106, 0.1);
  color: var(--lime);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 24px rgba(165, 255, 106, 0.12);
}

.difficulty-options button.is-selected::before,
.setting-options button.is-selected::before {
  background: linear-gradient(90deg, var(--cyan), var(--lime));
  box-shadow: 0 0 14px rgba(165, 255, 106, 0.36);
}

.setting-row,
.setting-toggle {
  min-height: 48px;
  display: grid;
  grid-template-columns: 86px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  color: #dbe5dc;
  font-size: 13px;
  font-weight: 900;
}

.setting-row.stacked {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.setting-row input[type="range"] {
  accent-color: var(--lime);
}

.setting-row b {
  color: var(--cyan);
  font-variant-numeric: tabular-nums;
}

.setting-row select {
  min-height: 42px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
}

.setting-toggle {
  grid-template-columns: 1fr auto;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.setting-toggle input {
  width: 22px;
  height: 22px;
  accent-color: var(--lime);
}

.settings-section.subtle {
  padding-bottom: 0;
}

.changelog-details {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.changelog-details summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.changelog-details[open] {
  padding-bottom: 10px;
}

.changelog-list {
  overflow: visible;
  padding: 0 12px;
}

.changelog-list section {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.changelog-list h3 {
  margin: 0 0 10px;
  color: var(--amber);
  font-size: 15px;
}

.changelog-list ul {
  margin: 0;
  padding-left: 20px;
  color: #dbe5dc;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.55;
}

.changelog-list li + li {
  margin-top: 6px;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: none;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  background:
    radial-gradient(circle at 16% 14%, rgba(70, 228, 255, 0.2), transparent 30%),
    radial-gradient(circle at 86% 78%, rgba(255, 202, 95, 0.13), transparent 34%),
    linear-gradient(135deg, #060807, #101511 54%, #080a09);
}

.overlay.is-open {
  display: flex;
}

.menu-card {
  position: relative;
  width: 100vw;
  height: 100vh;
  max-height: none;
  overflow: auto;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  align-self: stretch;
  padding: clamp(12px, 1.7vw, 20px);
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 180px),
    rgba(7, 10, 8, 0.98);
}

.menu-settings-button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.lobby-hero {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(10, 13, 11, 0.68), rgba(10, 13, 11, 0.18)),
    radial-gradient(circle at 78% 26%, rgba(165, 255, 106, 0.14), transparent 32%);
}

.lobby-actions {
  min-width: min(300px, 32vw);
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
  justify-items: end;
}

.wallet-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.currency-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  color: var(--ink);
  font-size: 12px;
  font-weight: 1000;
}

.currency-pill small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.currency-pill b {
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.currency-pill.premium b {
  color: var(--violet);
}

.currency-plus {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
  color: #07100d;
  font-size: 16px;
  font-weight: 1000;
  line-height: 1;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--amber);
  font-size: 11px;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 0.96;
  letter-spacing: 0;
}

.menu-copy {
  max-width: min(86ch, 100%);
  margin: 7px 0 0;
  color: #dbe5dc;
  font-size: 13px;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.menu-stats span {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.menu-stats b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.profile-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, 94px);
  gap: 10px;
  width: 100%;
  margin: 12px 0 0;
}

.profile-tool-button {
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(70, 228, 255, 0.045)),
    rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.15;
  text-align: center;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.menu-settings-button.profile-tool-button {
  padding: 10px;
}

.quartermaster-button {
  border-color: rgba(255, 202, 95, 0.32);
  background: rgba(255, 202, 95, 0.1);
  color: #ffe1a3;
}

.store-button {
  border-color: rgba(194, 118, 255, 0.38);
  background: rgba(194, 118, 255, 0.12);
  color: #ecd8ff;
}

.help-button {
  border-color: rgba(70, 228, 255, 0.3);
  background: rgba(70, 228, 255, 0.09);
  color: #c7f9ff;
}

.lobby-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(320px, 1.15fr) minmax(260px, 0.9fr);
  grid-template-areas:
    "profile map ops"
    "profile map supply";
  gap: 10px;
  min-height: 0;
}

.lobby-profile {
  grid-area: profile;
  display: flex;
  flex-direction: column;
}

.lobby-map {
  grid-area: map;
}

.lobby-ops {
  grid-area: ops;
  display: grid;
  grid-template-rows: minmax(68px, auto) minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
}

.lobby-supply {
  grid-area: supply;
}

.menu-panel {
  min-width: 0;
  min-height: 0;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.menu-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.is-collapsed > .menu-panel-head {
  margin-bottom: 0;
}

.panel-toggle-button {
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: baseline;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.panel-toggle-button:hover span {
  color: var(--cyan);
}

.panel-toggle-button i {
  color: var(--cyan);
  font-style: normal;
  font-size: 14px;
  font-weight: 1000;
  line-height: 1;
}

.is-collapsed .panel-toggle-button i {
  color: var(--lime);
}

.collapsible-content {
  display: block;
}

.is-collapsed > .collapsible-content,
.is-collapsed > .menu-panel-head + .collapsible-content {
  display: none;
}

.panel-title-with-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.menu-panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.info-button {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(70, 228, 255, 0.42);
  background: rgba(70, 228, 255, 0.1);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
}

.info-button:hover {
  border-color: rgba(165, 255, 106, 0.72);
  color: var(--lime);
}

.preview-button {
  min-height: 24px;
  flex: 0 0 auto;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid rgba(70, 228, 255, 0.42);
  background: rgba(70, 228, 255, 0.1);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.preview-button:hover {
  border-color: rgba(165, 255, 106, 0.72);
  color: var(--lime);
}

.menu-panel-head strong {
  color: var(--amber);
  font-size: 12px;
  font-weight: 1000;
}

.map-select {
  display: grid;
  gap: 6px;
}

.map-card {
  min-height: 58px;
  width: 100%;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  text-align: left;
}

.map-card i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  color: #07100d;
  font-style: normal;
  font-weight: 1000;
}

.map-card strong,
.map-card small {
  display: block;
}

.map-card strong {
  font-size: 12px;
  line-height: 1.15;
}

.map-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.18;
}

.map-card.is-selected {
  border-color: rgba(165, 255, 106, 0.78);
  background: rgba(165, 255, 106, 0.11);
}

.ops-copy,
.supply-result {
  margin: 0 0 8px;
  color: #dbe5dc;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.ops-event-panel,
.ops-daily-panel {
  overflow: hidden;
}

.ops-event-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  padding-block: 8px;
}

.ops-event-panel .ops-copy {
  margin-bottom: 0;
  max-height: 42px;
  overflow: auto;
  padding-right: 4px;
}

.ops-daily-panel {
  display: grid;
  grid-template-rows: auto 1fr;
}

.supply-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}

.supply-draw-button {
  font-size: 11px;
  font-weight: 900;
}

.supply-row span {
  min-height: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.supply-row b,
.supply-result {
  color: var(--cyan);
}

.supply-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 4px 0 8px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.supply-tabs button {
  min-height: 30px;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.supply-tabs button.is-selected {
  border-color: rgba(70, 228, 255, 0.58);
  background: rgba(70, 228, 255, 0.14);
  color: var(--cyan);
  box-shadow: inset 0 0 18px rgba(70, 228, 255, 0.1);
}

.supply-preview {
  margin: 0;
}

.supply-preview-modal-body {
  overflow: auto;
  padding: 16px 18px 18px;
}

.supply-preview-head {
  margin: 0 0 10px;
  color: #f4f7ef;
  font-size: 13px;
  font-weight: 1000;
}

.supply-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 9px;
}

.supply-preview-card {
  display: grid;
  grid-template-rows: 46px auto 1fr;
  gap: 6px;
  min-height: 128px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.supply-preview-card.rarity-sr {
  border-color: rgba(70, 228, 255, 0.24);
}

.supply-preview-card.rarity-ssr {
  border-color: rgba(194, 118, 255, 0.36);
}

.supply-preview-card.rarity-ur {
  border-color: rgba(255, 202, 95, 0.42);
}

.supply-preview-card strong {
  color: #f4f7ef;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1.15;
}

.supply-preview-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.supply-preview-visual {
  position: relative;
  display: block;
  min-height: 46px;
  overflow: hidden;
  border-radius: 7px;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.13), transparent 34%), rgba(0, 0, 0, 0.28);
}

.supply-preview-visual.is-track::before,
.supply-preview-visual.is-track::after {
  content: "";
  position: absolute;
  left: -12px;
  right: -12px;
  top: 16px;
  height: 18px;
  border-radius: 999px;
  transform: rotate(-8deg);
}

.supply-preview-visual.is-track::before {
  background: var(--path);
  box-shadow: 0 0 18px color-mix(in srgb, var(--dash), transparent 35%);
}

.supply-preview-visual.is-track::after {
  left: -4px;
  right: -4px;
  top: 21px;
  height: 7px;
  background: repeating-linear-gradient(90deg, var(--dash) 0 12px, transparent 12px 22px), var(--inner);
}

.supply-preview-visual.is-track i {
  position: absolute;
  z-index: 1;
  width: 14px;
  height: 4px;
  border-radius: 999px;
  background: var(--spark-b);
  box-shadow: 0 0 10px var(--spark-a);
}

.supply-preview-visual.is-track i:nth-child(1) {
  left: 18px;
  top: 10px;
}

.supply-preview-visual.is-track i:nth-child(2) {
  left: 56px;
  top: 27px;
  background: var(--spark-a);
}

.supply-preview-visual.is-track i:nth-child(3) {
  right: 12px;
  top: 8px;
}

.supply-preview-visual.is-track.skin-aurora {
  background: linear-gradient(135deg, rgba(17, 59, 67, 0.8), rgba(20, 34, 38, 0.95));
}

.supply-preview-visual.is-track.skin-aurora::after {
  top: 14px;
  height: 16px;
  background:
    linear-gradient(90deg, transparent, var(--spark-a), transparent),
    repeating-linear-gradient(90deg, var(--dash) 0 18px, transparent 18px 30px),
    var(--inner);
  filter: blur(0.2px);
}

.supply-preview-visual.is-track.skin-aurora i {
  width: 42px;
  height: 5px;
  opacity: 0.8;
  transform: rotate(-15deg);
}

.supply-preview-visual.is-track.skin-aurora i:nth-child(4) {
  left: 28px;
  top: 19px;
  background: var(--accent);
}

.supply-preview-visual.is-track.skin-aurora i:nth-child(5) {
  right: 18px;
  top: 30px;
  background: var(--spark-a);
}

.supply-preview-visual.is-track.skin-ember {
  background: radial-gradient(circle at 70% 70%, rgba(255, 79, 61, 0.2), transparent 45%), var(--dark);
}

.supply-preview-visual.is-track.skin-ember::after {
  background:
    linear-gradient(115deg, transparent 0 22%, var(--spark-b) 23% 25%, transparent 26% 48%, var(--accent) 49% 51%, transparent 52%),
    var(--inner);
}

.supply-preview-visual.is-track.skin-ember i {
  width: 24px;
  height: 3px;
  background: var(--spark-b);
  transform: rotate(28deg);
}

.supply-preview-visual.is-track.skin-ember i:nth-child(4) {
  left: 74px;
  top: 16px;
  background: var(--accent);
  transform: rotate(-34deg);
}

.supply-preview-visual.is-track.skin-ember i:nth-child(5) {
  left: 36px;
  top: 31px;
  transform: rotate(-18deg);
}

.supply-preview-visual.is-track.skin-void {
  background: radial-gradient(circle at 22% 24%, rgba(194, 118, 255, 0.25), transparent 18%), radial-gradient(circle at 76% 68%, rgba(100, 137, 255, 0.18), transparent 22%), var(--dark);
}

.supply-preview-visual.is-track.skin-void::after {
  background: repeating-radial-gradient(circle at 20% 55%, var(--spark-a) 0 1px, transparent 1px 9px), var(--inner);
}

.supply-preview-visual.is-track.skin-void i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--spark-a);
}

.supply-preview-visual.is-track.skin-void i:nth-child(4) {
  left: 84px;
  top: 26px;
  background: var(--accent);
}

.supply-preview-visual.is-track.skin-void i:nth-child(5) {
  left: 38px;
  top: 18px;
  background: var(--spark-b);
}

.supply-preview-visual.is-track.skin-crystal {
  background: linear-gradient(135deg, rgba(22, 45, 65, 0.95), rgba(39, 74, 102, 0.7));
}

.supply-preview-visual.is-track.skin-crystal::after {
  background:
    linear-gradient(120deg, transparent 0 18%, rgba(255, 255, 255, 0.55) 19% 21%, transparent 22% 44%, rgba(134, 221, 255, 0.38) 45% 48%, transparent 49%),
    var(--inner);
}

.supply-preview-visual.is-track.skin-crystal i {
  width: 18px;
  height: 18px;
  border: 1px solid var(--spark-a);
  border-radius: 2px;
  background: rgba(134, 221, 255, 0.2);
  transform: rotate(45deg);
}

.supply-preview-visual.is-track.skin-crystal i:nth-child(4) {
  left: 74px;
  top: 21px;
  background: rgba(255, 255, 255, 0.24);
}

.supply-preview-visual.is-track.skin-crystal i:nth-child(5) {
  left: 35px;
  top: 24px;
}

.supply-preview-visual.is-track.skin-corona {
  background: radial-gradient(circle at 50% 85%, rgba(255, 106, 85, 0.34), transparent 46%), var(--dark);
}

.supply-preview-visual.is-track.skin-corona::before {
  box-shadow: 0 0 22px var(--dash), 0 0 34px var(--spark-b);
}

.supply-preview-visual.is-track.skin-corona::after {
  background:
    repeating-linear-gradient(90deg, var(--spark-b) 0 6px, transparent 6px 18px),
    linear-gradient(90deg, var(--inner), var(--accent), var(--inner));
}

.supply-preview-visual.is-track.skin-corona i {
  width: 0;
  height: 0;
  border-radius: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 18px solid var(--spark-b);
  background: transparent;
  transform: rotate(28deg);
}

.supply-preview-visual.is-track.skin-corona i:nth-child(4) {
  left: 74px;
  top: 9px;
  border-bottom-color: var(--spark-a);
  transform: rotate(-18deg);
}

.supply-preview-visual.is-track.skin-corona i:nth-child(5) {
  left: 102px;
  top: 24px;
  border-bottom-color: var(--accent);
}

.supply-preview-visual.is-projectile {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.38), color-mix(in srgb, var(--trail), transparent 78%));
}

.supply-preview-visual.is-projectile::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 36px;
  top: 18px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--trail));
  box-shadow: 0 0 14px var(--trail);
}

.supply-preview-visual.is-projectile::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 11px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--ring);
  border-radius: 50%;
  background: var(--projectile);
  box-shadow: 0 0 18px var(--projectile);
}

.supply-preview-visual.is-projectile i {
  position: absolute;
  top: 19px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--trail);
  opacity: 0.65;
}

.supply-preview-visual.is-projectile i:nth-child(1) {
  left: 22px;
}

.supply-preview-visual.is-projectile i:nth-child(2) {
  left: 42px;
}

.supply-preview-visual.is-projectile i:nth-child(3) {
  left: 62px;
}

.supply-preview-visual.is-bonus {
  display: grid;
  place-items: center;
  border: 1px solid rgba(70, 228, 255, 0.18);
}

.supply-preview-visual.is-bonus i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(70, 228, 255, 0.14);
  color: var(--cyan);
  font-size: 12px;
  font-style: normal;
  font-weight: 1000;
  box-shadow: inset 0 0 14px rgba(70, 228, 255, 0.12), 0 0 16px rgba(70, 228, 255, 0.15);
}

.skin-select-row {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.skin-select-row select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  font: inherit;
}

.daily-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.daily-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #dbe5dc;
  font-size: 12px;
  font-weight: 850;
}

.daily-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-list small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.daily-list li.is-complete {
  border: 1px solid rgba(165, 255, 106, 0.42);
  color: var(--lime);
}

.run-history {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
}

.history-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.history-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.history-head strong {
  color: var(--amber);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.run-history-list {
  display: grid;
  gap: 5px;
  max-height: min(230px, 31vh);
  overflow: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

.run-history-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #dbe5dc;
  font-size: 12px;
  font-weight: 800;
}

.run-history-list li.muted {
  display: block;
  color: var(--muted);
}

.run-history-list small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.run-history-list b {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.start-button {
  min-width: 136px;
  min-height: 42px;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--amber), var(--lime));
  color: #07100d;
}

.menu-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 7px;
}

.tutorial-button {
  min-height: 42px;
  display: inline-grid;
  place-items: center;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 920px) {
  :root {
    --command-panel-gutter: 12px;
    --command-panel-width: calc(100vw - 24px);
  }

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

  .readouts {
    grid-column: 1 / -1;
    order: 3;
  }

  .command-panel {
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 46vh;
    overflow: auto;
  }

  .panel-toggle {
    top: auto;
    right: 18px;
    bottom: calc(12px + 46vh + 8px);
    width: 54px;
    height: 42px;
  }

  body.panel-collapsed .command-panel {
    transform: translateY(calc(100% + 18px));
  }

  body.panel-collapsed .panel-toggle {
    right: 18px;
    bottom: 12px;
  }

  .tutorial-guide {
    left: 12px;
    bottom: calc(46vh + 66px);
  }

}

@media (max-width: 640px) {
  .topbar {
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 8px;
  }

  .brand {
    min-height: 54px;
    padding: 9px;
  }

  .brand strong {
    font-size: 16px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .top-actions {
    min-height: 54px;
    padding: 6px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .icon-button.wide {
    width: 48px;
  }

  .readouts {
    min-height: 54px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .readout {
    padding: 9px 6px;
  }

  .readout span {
    font-size: 10px;
  }

  .readout strong {
    font-size: 16px;
  }

  .loading-panel {
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    padding: 16px;
  }

  .loading-core {
    width: 58px;
    height: 58px;
  }

  .loading-copy strong {
    font-size: 19px;
  }

  .loading-panel b {
    font-size: 16px;
  }

  .command-panel {
    padding: 8px;
    gap: 8px;
  }

  .panel-section {
    padding: 9px;
  }

  .tower-shop {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tower-card {
    min-height: 86px;
    grid-template-columns: 34px 1fr;
  }

  .tower-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .tower-cost {
    grid-column: 2;
  }

  .tower-copy span {
    white-space: normal;
  }

  .overlay {
    align-items: stretch;
    padding: 0;
  }

  .menu-card {
    max-height: none;
    grid-template-rows: auto auto;
  }

  .lobby-hero {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .lobby-actions {
    min-width: 0;
    width: 100%;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .wallet-strip {
    justify-content: stretch;
  }

  .currency-pill {
    flex: 1 1 140px;
    justify-content: center;
  }

  .topup-packs {
    grid-template-columns: 1fr;
  }

  .store-products {
    grid-template-columns: 1fr;
  }

  .lobby-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "profile"
      "map"
      "ops"
      "supply";
    min-height: auto;
  }

  .tutorial-guide {
    top: 134px;
    bottom: auto;
    width: min(330px, calc(100vw - 20px));
  }
}

@media (max-width: 920px) and (orientation: landscape) {
  :root {
    --command-panel-gutter: 10px;
    --command-panel-width: min(320px, 38vw);
    --command-panel-top: 76px;
    --command-panel-bottom: 10px;
  }

  .topbar {
    grid-template-columns: minmax(170px, 220px) minmax(300px, 1fr) auto;
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .brand,
  .readouts,
  .top-actions {
    min-height: 54px;
  }

  .readouts {
    grid-column: auto;
    order: 0;
  }

  .readout {
    padding: 9px 10px;
  }

  .command-panel {
    top: var(--command-panel-top);
    left: auto;
    right: var(--command-panel-gutter);
    bottom: var(--command-panel-bottom);
    width: var(--command-panel-width);
    max-height: none;
  }

  .panel-toggle {
    top: calc(var(--command-panel-top) + 12px);
    right: calc(var(--command-panel-gutter) + var(--command-panel-width) + 8px);
    bottom: auto;
    width: 42px;
    height: 54px;
  }

  body.panel-collapsed .command-panel {
    transform: translateX(calc(100% + var(--command-panel-gutter) + 8px));
  }

  body.panel-collapsed .panel-toggle {
    right: var(--command-panel-gutter);
    bottom: auto;
  }

  .tower-shop {
    grid-template-columns: 1fr;
  }

  .tower-card {
    min-height: 68px;
    grid-template-columns: 34px 1fr auto;
  }

  .tower-cost {
    grid-column: auto;
  }

  .overlay {
    align-items: stretch;
    padding: 0;
  }

  .tutorial-guide {
    top: auto;
    bottom: 12px;
    left: 10px;
    width: min(330px, calc(100vw - 20px));
  }
}
