:root {
  color-scheme: dark;
  font-family: Inter, Segoe UI, system-ui, sans-serif;
  background: #07090f;
  color: #eef4ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 18%, rgba(43, 167, 255, 0.2), transparent 24rem),
    radial-gradient(circle at 74% 78%, rgba(255, 196, 87, 0.13), transparent 20rem),
    #07090f;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  height: 100vh;
  padding: 16px;
}

.game-wrap {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #05070c;
  overflow: hidden;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-light {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #75f4c8;
  box-shadow: 0 0 18px #75f4c8;
  flex: 0 0 auto;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

p {
  margin: 4px 0 0;
  color: #aeb8ca;
  font-size: 13px;
}

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

.stats div {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.stats span {
  display: block;
  color: #aeb8ca;
  font-size: 12px;
}

.stats strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.round-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.primary-action,
.secondary-action {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary-action {
  background: rgba(117, 244, 200, 0.16);
}

.secondary-action {
  background: rgba(255, 255, 255, 0.06);
}

.primary-action:hover,
.secondary-action:hover {
  border-color: rgba(255, 255, 255, 0.42);
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

#start-run {
  grid-column: 1 / -1;
}

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

.upgrade {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: inherit;
  background: rgba(255, 255, 255, 0.055);
  padding: 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.upgrade:hover {
  border-color: rgba(117, 244, 200, 0.6);
  background: rgba(117, 244, 200, 0.08);
}

.upgrade:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

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

.upgrade small {
  color: #aeb8ca;
  margin-top: 3px;
}

.upgrade b {
  min-width: 54px;
  color: #ffd36a;
  text-align: right;
}

.notice {
  margin-top: auto;
  min-height: 72px;
  border-left: 3px solid #75f4c8;
  background: rgba(117, 244, 200, 0.08);
  color: #cfeee7;
  padding: 12px;
  font-size: 14px;
  line-height: 1.35;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .game-wrap {
    height: 64vh;
  }
}
