@font-face {
  font-family: "Russo One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/russo-one-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Russo One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/russo-one-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  color-scheme: dark;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "Russo One", "Inter", "Segoe UI", system-ui, sans-serif;
  --text: #f3f6fa;
  --muted: #bac6d3;
  --panel: #111a23;
  --surface: #192531;
  --line: #364452;
  --orange: #ffa34c;
  --gold: #ffd47c;
  --red: #ff998b;
  --radius: 12px;
  --card-radius: 18px;
  --space: 8px;
  --gutter: clamp(10px, 3.6%, 20px);
  --control: 46px;
  --label-size: 13px;
  --body-size: 15px;
  --heading-size: clamp(21px, 6vw, 29px);
}

* { box-sizing: border-box; }
[hidden], .hidden, .hiddenTurret { display: none !important; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #070b10;
  color: var(--text);
  font: var(--body-size) / 1.4 var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

button { font: inherit; }
button:focus-visible, a:focus-visible {
  outline: 2px solid #fff4d8;
  outline-offset: -3px;
}

#stage {
  --safe-top: 0px;
  --safe-bottom: 0px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100vw, 56.25vh);
  height: min(100vh, 177.778vw);
  transform: translate(-50%, -50%);
  overflow: hidden;
  overscroll-behavior: none;
  user-select: none;
  background: #070b10;
  box-shadow: 0 0 0 1px #19222d, 0 20px 72px #000b;
  container-type: inline-size;
}

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

.coinIcon, .gemIcon, .heartIcon, .turretIcon {
  display: inline-block;
  flex: none;
  width: 22px;
  height: 22px;
  background: center / contain no-repeat;
}
.coinIcon { background-image: url('assets/icons/coin.png'); }
.gemIcon { background-image: url('assets/icons/diamond.png'); }
.heartIcon { background-image: url('assets/icons/heart.png'); }
.turretIcon { background-image: url('assets/icons/turret.png'); }
.price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price :is(.coinIcon, .gemIcon) { width: 18px; height: 18px; }

/* Shared controls */
.primary, .ghost, .iconBtn, .baseMiniBtn, .lbClose, .lbTab, .turretBtn {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
}

.primary, .ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: var(--control);
  padding: 8px 10px;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
}

.primary {
  background: linear-gradient(180deg, #ffbd72, #ff922b);
  border-color: #ffb15e;
  color: #281508;
  box-shadow: inset 0 -2px 0 #b4501766;
}
:is(.primary, .ghost, .iconBtn, .baseMiniBtn, .lbClose, .lbTab, .turretBtn):active:enabled {
  transform: translateY(1px);
}
button:disabled { cursor: default; }
:is(.primary, .ghost, .upgradeOption, .turretBtn):disabled {
  background: #18212a;
  border-color: #303b48;
  color: #a4afbd;
  box-shadow: none;
}
:is(.primary, .ghost, .upgradeOption):disabled .price { color: #abb5c3; }
.iconBtn, .baseMiniBtn, .lbClose {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--control);
  height: var(--control);
  padding: 0;
  font-size: 20px;
}

/* Battle HUD */
#hud {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity .16s ease;
}
.topbar {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space);
  padding: calc(var(--gutter) + var(--safe-top)) var(--gutter) var(--gutter);
  background: linear-gradient(#060b10ba, transparent);
}
.hudLeft, .hudRight { display: grid; gap: var(--space); }
.hudLeft { min-width: 0; }
.hudRight { justify-items: end; }
.actions { display: flex; gap: var(--space); pointer-events: auto; }
.iconBtn.off { color: #aab9c9; }
.waveCard, #wallet, .hpRow, #streakBadge {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101923f5;
}
.waveCard { padding: 8px 10px; }
.waveMain { display: flex; align-items: center; gap: 9px; }
.waveBlock, .scoreBlock { display: grid; gap: 3px; min-width: 0; }
.statLabel, .scoreBlock span {
  color: var(--muted);
  font-size: var(--label-size);
  font-weight: 750;
  line-height: 1;
}
.waveBlock b, .scoreBlock b, #waveRemaining, #hpText {
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  line-height: 1.1;
}
.waveBlock b { color: var(--gold); font-size: 22px; }
.scoreBlock b { font-size: 18px; overflow-wrap: anywhere; }
.waveSep { align-self: stretch; width: 1px; background: var(--line); }
#waveProgress { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--gold); }
.clockIcon { display: grid; place-items: center; }
.clockIcon svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.waveCaption { color: var(--muted); font-size: var(--label-size); white-space: nowrap; }
#waveProgress.cleanup { color: #ffb4a8; }
#waveProgress.cleanup .clockIcon { display: none; }
#waveProgress.cleanup .waveCaption { color: #ffb4a8; }
#waveRemaining { font-size: 17px; }
#wallet {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  color: var(--gold);
  transition: transform .16s ease;
}
#wallet.bump { transform: scale(1.05); }
.walletItem { display: flex; gap: 5px; align-items: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.walletItem :is(.coinIcon, .gemIcon) { width: 18px; height: 18px; }
#streakBadge { display: none; width: fit-content; padding: 4px 8px; color: var(--gold); font-size: var(--label-size); }
#streakBadge.show { display: grid; }
#streakBadge span { color: var(--muted); }

.bottombar { position: absolute; inset: auto var(--gutter) calc(var(--gutter) + var(--safe-bottom)); }
.hpRow {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 50%;
  min-height: var(--control);
  padding: 5px 8px;
}
.hpTrack { height: 8px; flex: 1; background: #354352; border-radius: 6px; overflow: hidden; }
#hpFill { height: 100%; background: #95dc69; }
#hpFill.low { background: #fc8173; animation: hpLow .7s ease-in-out infinite; }
@keyframes hpLow { 50% { opacity: .55; } }
#hpText { color: var(--text); font-size: 14px; min-width: 6.8ch; text-align: right; }
.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--control) + 10px);
  padding: 6px 9px;
  border-radius: 8px;
  background: #09121bea;
  color: #e6edf5;
  font-size: var(--label-size);
  line-height: 1.35;
  pointer-events: none;
  transition: opacity .25s ease;
}
#hud:has(.turretBtn:not(.hiddenTurret)) .hint { right: calc(91px + var(--space)); }
.hint.fade { opacity: 0; }
.turretBtn {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  bottom: calc(var(--gutter) + var(--safe-bottom));
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  column-gap: 5px;
  width: 91px;
  min-height: var(--control);
  padding: 4px;
  pointer-events: auto;
  color: var(--gold);
}
.turretBtn.placing { border-color: var(--orange); background: #482b19; }
.turretLabel { grid-row: 2; grid-column: 1 / -1; font-size: 11px; line-height: 1; letter-spacing: .03em; }
#turretCount { font-size: 15px; line-height: 1; }

.toast {
  position: absolute;
  top: 23%;
  left: 50%;
  z-index: 7;
  display: flex;
  gap: var(--space);
  align-items: center;
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101923f5;
  transform: translate(-50%, -5px);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toastIcon {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid;
  border-radius: 8px;
}
.toastIcon.image { background-position: center; background-size: 24px; background-repeat: no-repeat; }
.toastText { display: grid; gap: 2px; }
.toastText b { font-size: 14px; }
.toastText span { font-size: var(--label-size); color: var(--muted); }

/* Dialogs */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: var(--gutter);
  background: #050a11bc;
}
#confirmExit { z-index: 21; }
#rotate { z-index: 30; }
.menuCard {
  display: grid;
  gap: 10px;
  width: min(100%, 440px);
  max-height: 100%;
  padding: clamp(12px, 4%, 22px);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  background: var(--panel);
  box-shadow: 0 16px 48px #0008;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
.menuCard.small { max-width: 365px; text-align: center; }
.menuCard :is(h1, h2), .districtHead h2 {
  margin: 0;
  font: 400 var(--heading-size) / 1.12 var(--font-display);
  overflow-wrap: anywhere;
}
.eyebrow {
  color: var(--orange);
  font-size: var(--label-size);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .07em;
}
.eyebrow.red, .reviveStatus.error { color: var(--red); }
.lead, .reviveStatus { margin: 0; color: var(--muted); font-size: var(--body-size); }
#pause h2, #gameover h2, #confirmExit .lead { margin-bottom: 2px; }
.resultGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space); }
.resultGrid div {
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 10px 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}
.resultGrid span { display: block; color: var(--muted); font-weight: 750; font-size: var(--label-size); }
.resultGrid b { font-size: 23px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.recordLine { color: var(--muted); font-size: 14px; font-weight: 700; }
.recordLine b { color: var(--gold); }
.reviveBtn .gemIcon { width: 18px; height: 18px; }

.shopHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  min-width: 0;
}
.shopHeader > div { display: grid; gap: 3px; }
.shopHeader h2 { margin-top: 0; }
.shopCoins, .buildChip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.shopCoins { color: var(--gold); white-space: nowrap; font-size: 16px; }
.shopBuild { display: flex; flex-wrap: wrap; gap: 6px; }
.buildChip { font-size: 14px; }
.buildChip i, .optIcon {
  width: 20px;
  height: 20px;
  background: center / contain no-repeat;
}
.upgradeList { display: grid; gap: var(--space); }
.upgradeOption {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 9px 10px;
  border: 1px solid #465969;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.upgradeOption:active:enabled { border-color: var(--orange); background: #2a3241; }
.optIcon { display: block; width: 33px; height: 33px; }
.optText { display: grid; gap: 4px; min-width: 0; }
.optText b { font-size: 15px; line-height: 1.18; }
.optText span { font-size: var(--body-size); line-height: 1.25; color: var(--muted); }
.upgradeOption:disabled .optText span { color: #a4afbd; }
.upgradeOption .price { font-weight: 850; font-size: 15px; }
.shopFoot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space); }
.shopFoot :is(.primary, .ghost) { padding-inline: 5px; }
.emptyState { margin: 0; color: var(--muted); padding: 7px; }

/* Loading */
#loading {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space);
  padding: 16px 16px 14%;
  background: #070b10 url('assets/images/ui/preloader.png') center / cover no-repeat;
}
.loader { display: none; }
.loadText, .loadBar, #loading .startBtn { width: min(100%, 285px); }
.loadText {
  padding: 6px 9px;
  border-radius: 8px;
  background: #101923eb;
  text-align: center;
  color: var(--text);
  font-size: var(--body-size);
  font-weight: 750;
}
.loadBar { height: 8px; border-radius: 6px; overflow: hidden; background: #273545; }
#loadBarFill { display: block; width: 0; height: 100%; background: var(--orange); transition: width .18s ease; }

/* Base */
.baseScreen {
  position: absolute;
  inset: 0;
  z-index: 10;
  background:
    linear-gradient(180deg, #0b142444, transparent 26%, transparent 58%, #1b0e08b8),
    #986338 url('assets/images/base/base-background.jpg') center / cover no-repeat;
}
.baseScene {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: var(--space);
  padding: calc(var(--gutter) + var(--safe-top)) var(--gutter) calc(var(--gutter) + var(--safe-bottom));
}
.baseTop {
  display: flex;
  align-items: stretch;
  gap: var(--space);
  min-width: 0;
}
.baseLevel, .baseSupplies, .baseTop .baseMiniBtn {
  background: #121b25f5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.baseLevel {
  display: grid;
  align-content: center;
  flex: 1 1 0;
  min-width: 0;
  gap: 2px;
  padding: 6px 8px;
  line-height: 1.2;
}
.baseLevel span { color: var(--muted); font-size: 12px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.baseLevel b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
}
.baseSupplies {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  color: var(--gold);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
.baseMiniBtn img { width: 24px; height: 24px; object-fit: contain; }
.baseArt { position: relative; min-height: 0; }
.baseTent {
  position: absolute;
  left: 46%;
  bottom: 1%;
  transform: translateX(-50%);
  width: min(52.5%, 224px);
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 10px 12px #362b20a8);
}
.baseSoldier {
  position: absolute;
  right: 0;
  bottom: 3%;
  width: min(26%, 132px);
  aspect-ratio: 1;
  background: url('assets/images/base/soldier-idle.png') 0 0 / 400% 400% no-repeat;
  filter: drop-shadow(0 6px 8px #362b20b3);
  pointer-events: none;
}
.baseTip {
  position: absolute;
  z-index: 1;
  bottom: 8px;
  right: 0;
  left: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111a23fa;
  color: var(--gold);
  line-height: 1.35;
}
.baseDistrict { display: grid; gap: 8px; min-width: 0; }
.districtHead { display: flex; align-items: center; justify-content: space-between; gap: var(--space); }
.districtHead h2 { font-size: 17px; text-shadow: 0 1px 5px #1a100c, 0 0 3px #1a100c; }
.buildingNav { display: flex; gap: 5px; }
.buildingNav .baseMiniBtn { width: 44px; height: 44px; font-size: 25px; line-height: 1; }
.buildingNav .baseMiniBtn:disabled { color: #8d99a6; background: #1b2330ba; }
.baseBuildings {
  display: flex;
  gap: var(--space);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: none;
  scroll-snap-type: x mandatory;
  scroll-snap-stop: always;
  touch-action: pan-x;
  scrollbar-width: none;
}
.baseBuildings::-webkit-scrollbar { display: none; }
.baseBuildNode {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  flex: 0 0 calc((100% - 2 * var(--space)) / 3);
  min-height: 96px;
  padding: 8px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #13202af5;
  color: var(--text);
  cursor: pointer;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  touch-action: pan-x;
}
.baseBuildNode.locked { background: #1a222ce6; }
.baseBuildNode.ready { border-color: var(--orange); box-shadow: inset 0 0 0 1px #ffae6680; }
.baseBuildNode img { width: 35px; height: 35px; object-fit: contain; }
.baseBuildNode.locked img { filter: grayscale(1); opacity: .8; }
.baseBuildNode b { font-size: 13px; line-height: 1.1; }
.baseBuildNode small { font-size: 12px; line-height: 1.15; color: var(--muted); }
.baseBuildNode.ready small { color: var(--gold); }
.baseFooter { display: grid; gap: var(--space); }
.baseFooter .primary { min-height: 50px; font-family: var(--font-display); font-size: 19px; font-weight: 400; }

.baseIntroCard { text-align: center; }
.baseIntroImg { display: block; width: min(47%, 148px); max-height: 22vh; object-fit: contain; margin: 0 auto; }
.baseIntroCard .lead { margin: 0 0 5px; }
.rulesLink { justify-self: center; color: var(--gold); padding: 5px; font-size: 14px; }
.baseCardHead { display: flex; align-items: center; gap: 12px; min-width: 0; }
.baseCardHead > div { display: grid; gap: 3px; }
.baseCardIcon {
  flex: none;
  width: 47px;
  height: 47px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface) center / contain no-repeat;
}
.baseCardStats { display: grid; gap: 6px; }
.baseCardStats:empty { display: none; }
.baseCardStats div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--surface); border-radius: 8px; }
.baseCardStats b { color: var(--gold); text-align: right; }
.baseWeaponOptions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space); }
.baseWeaponOptions .ghost[aria-pressed="true"] { border-color: var(--orange); color: var(--gold); }
.baseWeaponOptions .weaponPick { flex-direction: column; gap: 6px; min-height: 98px; padding: 6px; }
.weaponPick img { width: 78px; height: 42px; object-fit: contain; pointer-events: none; }
.weaponPick span { display: grid; gap: 4px; }
.weaponPick small { color: var(--muted); font-size: 11px; font-weight: 750; }

/* Ranking */
.leaderboardCard { display: flex; flex-direction: column; overflow: hidden; }
.lbHead { display: flex; justify-content: space-between; align-items: center; gap: var(--space); }
.lbClose { font-size: 26px; }
.lbTabs { display: grid; gap: 4px; grid-template-columns: .8fr 1fr 1.2fr; }
.lbTab { min-height: 44px; padding: 4px 3px; font-size: 12px; }
.lbTab.active { border-color: var(--orange); color: var(--gold); background: #38281d; }
.lbList { display: grid; gap: 8px; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
.lbStatus { color: var(--muted); padding: 12px 4px; text-align: center; }
.lbGap { color: var(--muted); text-align: center; line-height: 1; }
.lbRow {
  display: grid;
  grid-template-columns: 2.8ch 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.lbRow.me { border-color: #c97b43; background: #38281d; }
.lbRank { color: var(--gold); font-weight: 800; font-size: 13px; overflow-wrap: anywhere; }
.lbAvatar {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #303e4b;
  font-size: 12px;
  font-weight: 800;
}
.lbAvatar img { width: 100%; height: 100%; object-fit: cover; }
.lbName { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 750; }
.lbScore { display: grid; gap: 2px; text-align: right; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lbScore small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }

#baseGoalsBtn { position: relative; }
.goalsBadge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--orange);
  color: #1a1008;
  font-size: 10px;
  font-weight: 850;
  line-height: 16px;
  text-align: center;
}
.goalsBadge[hidden] { display: none; }
.goalsHeadTools { display: flex; align-items: center; gap: 8px; }
#goals { z-index: 22; }
.goalsClock {
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.goalsLead { margin: 0; }
.goalsList { display: grid; gap: 10px; }
.goalRow {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101923;
}
.goalRow.done { border-color: #3d6b4a; }
.goalTop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.goalTop b { font-size: 14px; font-weight: 800; }
.goalCount { color: var(--gold); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.goalTrack { height: 6px; border-radius: 6px; background: #354352; overflow: hidden; }
.goalTrack i { display: block; height: 100%; width: 0; background: var(--gold); }
.goalRow.done .goalTrack i { background: #95dc69; }
.goalReward { color: var(--muted); font-size: 12px; font-weight: 700; }
.goalRow.done .goalReward { color: #95dc69; }
.goalsPrize {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.goalsPrize.done { color: #95dc69; }

@container (max-width: 330px) {
  .waveCaption { display: none; }
  .waveMain { gap: 6px; }
  .walletItem :is(.coinIcon, .gemIcon) { width: 16px; height: 16px; }
  .baseTop { gap: 5px; }
  .baseTop .baseMiniBtn { width: 42px; height: 42px; }
  .baseSupplies { padding-inline: 5px; }
  .baseBuildNode { flex-basis: calc((100% - var(--space)) / 2); }
  .shopFoot :is(.primary, .ghost) { font-size: 13px; }
  .upgradeOption { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 6px; padding-inline: 7px; }
  .optIcon { width: 28px; height: 28px; }
  .baseBuildNode b { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; }
}
