:root {
  /* Unslop Warm Graphite Ramp with defined borders */
  --bg-deep: #12110f;
  --bg-page: #161513;
  --bg-card: #1c1a18;
  --bg-raised: #262421;
  --hairline: rgba(235, 220, 192, 0.28);
  --hairline-strong: rgba(245, 188, 82, 0.55);
  --text-primary: #efe9de;
  --text-secondary: #aaa398;
  --text-muted: #8a847a;
  --accent: #e5a93c;
  --pos: #4cc38a;
  --neg: #e5484d;
  --ease-unslop: cubic-bezier(0.22, 1, 0.36, 1);

  /* Legacy variable aliases mapped to Unslop tokens */
  --ui-bg-dark: #12110f;
  --ui-bg-panel: #161513;
  --ui-bg-card: #1c1a18;
  --ui-bg-slot: #12110f;
  --ui-brass: rgba(235, 200, 132, 0.42);
  --ui-brass-hi: #e5a93c;
  --ui-brass-lo: rgba(235, 220, 192, 0.24);
  --ui-slate-line: rgba(235, 220, 192, 0.28);
  --ui-cyan: #efe9de;
  --ui-emerald: #4cc38a;
  --ui-emerald-dark: #1c1a18;
  --ui-crimson: #e5484d;
  --ui-text: #efe9de;
  --ui-muted: #aaa398;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

input, textarea {
  user-select: text;
  -webkit-user-select: text;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #12110f;
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  touch-action: none;
}

#game-root {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  cursor: crosshair;
}

#overlay-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.hud-layer {
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 10;
}

/* Единая рамка: клёпаная латунь + полуночная сталь (как на ui_concept.png) */
.pixel-panel,
.hd-panel {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--ui-brass);
  border-radius: 5px;
  box-shadow:
    0 0 0 2px #12110f,
    inset 0 1px 0 rgba(255, 226, 156, 0.32),
    inset 0 0 0 1px rgba(28, 26, 24, 0.65),
    0 5px 14px rgba(18, 17, 15, 0.85);
  pointer-events: auto;
}

.brass-frame::before,
.brass-frame::after {
  content: "";
  position: absolute;
  inset: 3px;
  pointer-events: none;
  background:
    radial-gradient(circle at 0 0, var(--ui-brass-hi) 1.5px, transparent 2px),
    radial-gradient(circle at 100% 0, var(--ui-brass-hi) 1.5px, transparent 2px),
    radial-gradient(circle at 0 100%, var(--ui-brass-lo) 1.5px, transparent 2px),
    radial-gradient(circle at 100% 100%, var(--ui-brass-lo) 1.5px, transparent 2px);
  z-index: 1;
}

.brass-frame::after {
  display: none;
}

#hud-top {
  top: 10px;
  padding: 0 222px 0 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

/* Прозрачное окно сводки/истории событий по всем мирам (сверху слева) */
.world-log-glass {
  position: absolute;
  top: 96px;
  left: 12px;
  width: 318px;
  max-width: calc(100vw - 24px);
  background: rgba(18, 17, 15, 0.48);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(201, 151, 59, 0.45);
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(18, 17, 15, 0.42);
  z-index: 9;
  pointer-events: auto;
  opacity: 0.88;
  transition: opacity 0.16s ease, background 0.16s ease;
}

.world-log-glass:hover {
  opacity: 1;
  background: rgba(18, 17, 15, 0.72);
}

.world-log-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-bottom: 1px solid rgba(201, 151, 59, 0.25);
  font-size: 11px;
  font-weight: 800;
  color: #f4d996;
  letter-spacing: 0.3px;
}

.world-log-glass.collapsed .world-log-header {
  border-bottom: none;
}

.world-log-glass.collapsed .world-log-list {
  display: none;
}

.world-log-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.log-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4d5e;
  box-shadow: 0 0 8px #ff4d5e;
  animation: logPulse 1s infinite alternate;
}

@keyframes logPulse {
  from { transform: scale(0.85); opacity: 0.75; }
  to { transform: scale(1.2); opacity: 1; }
}

.world-log-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.log-mini-btn {
  background: rgba(22, 21, 19, 0.75);
  border: 1px solid rgba(201, 151, 59, 0.45);
  border-radius: 3px;
  color: #ffd98e;
  font-size: 11px;
  line-height: 1;
  padding: 2px 5px;
  cursor: pointer;
}

.log-mini-btn:hover {
  background: rgba(28, 26, 24, 0.9);
}

.repair-hud-btn {
  border-color: #63c778;
  background: var(--bg-card);
  color: #e6ffed;
}

.repair-hud-btn:hover {
  border-color: #aaa398;
  background: var(--bg-card);
  box-shadow: 0 0 0 2px #12110f, 0 0 12px rgba(239, 233, 222, 0.10);
}

.icon-btn.autoplay-btn.active {
  border-color: #e5a93c;
  background: var(--bg-card);
  box-shadow: 0 0 12px rgba(239, 233, 222, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

#game-root {
  user-select: none;
  -webkit-user-select: none;
}

#lb-callsign-input {
  user-select: text;
  -webkit-user-select: text;
}

.world-log-list {
  max-height: 152px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 6px;
}

.world-log-list::-webkit-scrollbar {
  width: 4px;
}

.world-log-list::-webkit-scrollbar-thumb {
  background: rgba(201, 151, 59, 0.45);
  border-radius: 2px;
}

.world-log-empty {
  font-size: 11px;
  color: rgba(200, 214, 240, 0.72);
  padding: 4px 2px;
}

.world-log-item {
  width: 100%;
  text-align: left;
  background: rgba(22, 21, 19, 0.54);
  border: 1px solid rgba(239, 233, 222, 0.10);
  border-left: 3px solid #e5a93c;
  border-radius: 4px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  color: #efe9de;
  font-family: inherit;
}

.world-log-item:hover {
  background: rgba(28, 26, 24, 0.8);
}

.world-log-item.kind-danger {
  border-left-color: #ff9f43;
  background: rgba(46, 26, 12, 0.56);
}

.world-log-item.kind-critical {
  border-left-color: #ff4d5e;
  background: rgba(58, 16, 24, 0.65);
}

.world-log-item.kind-drone {
  border-left-color: #e5a93c;
}

.world-log-item.kind-milestone {
  border-left-color: #6ee08d;
}

.log-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
}

.log-time {
  color: #aaa398;
  font-family: ui-monospace, Consolas, monospace;
}

.log-world {
  color: #ffd670;
  font-weight: 800;
  text-transform: uppercase;
}

.log-text {
  font-size: 11px;
  line-height: 1.25;
  color: #efe9de;
}

#game-root.debug-ui #hud-top {
  padding-right: 262px;
}

@media (max-width: 960px) and (min-width: 761px) {
  #hud-top { padding: 0 218px 0 8px; gap: 5px; }
  #top-hud-bar { font-size: 12px; padding: 4px 7px; gap: 4px; }
  .inv-hud-btn { padding: 5px 9px; font-size: 12px; }
}

#top-hud-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ui-text);
  max-width: 100%;
}

.hud-world-chip,
.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: var(--bg-card);
  border: 1px solid #2e2b27;
  border-radius: 3px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.65);
}

.hud-world-chip {
  border-color: #8f6b2c;
  background: var(--bg-card);
}

.hud-planet-tag {
  color: #ffd670;
  letter-spacing: 0.7px;
}

.hud-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hud-ico {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: block;
}

#coins-counter { color: #ffe07d; }
#islands-counter { color: #aaa398; }

.hud-wave-chip {
  padding: 2px 8px;
  gap: 6px;
}

.wave-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.05;
}

#wave-label {
  font-size: 11px;
  white-space: nowrap;
}

#wave-progress-track {
  width: 100%;
  min-width: 78px;
  height: 4px;
  background: #12110f;
  border: 1px solid #2e2b27;
  border-radius: 2px;
  overflow: hidden;
  display: block;
}

#wave-progress-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ffb703, #ffe58f);
  transition: width 0.25s linear;
}

.inv-hud-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #f8eac6;
  background: var(--bg-card);
  cursor: pointer;
}

.inv-hud-btn:hover {
  border-color: var(--ui-brass-hi);
  color: #fff6dc;
  box-shadow: 0 0 0 2px #12110f, 0 0 12px rgba(255, 209, 102, 0.35);
}

.inv-key-tag {
  font-size: 10px;
  color: #ffd98e;
  background: #12110f;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid #8f6b2c;
}

#top-actions {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
}

.icon-btn {
  background: var(--bg-card);
  color: #f4df9e;
  border: 2px solid #8c6b32;
  border-radius: 4px;
  min-width: 31px;
  height: 31px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: inset 0 1px 0 rgba(255, 232, 175, 0.2), 0 2px 0 #12110f;
}

.icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.icon-btn:hover {
  background: var(--bg-card);
  border-color: var(--ui-brass-hi);
}

.icon-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 #12110f;
}

.modal-close-btn {
  background: linear-gradient(180deg, #a63434 0%, #6b1d1d 100%);
  border-color: #f28c8c;
  color: #ffffff;
}

.modal-close-btn:hover {
  background: linear-gradient(180deg, #c44141 0%, #822525 100%);
  border-color: #ffd1d1;
}

#onboarding-banner {
  position: absolute;
  bottom: 14px;
  left: 14px;
  padding: 6px 11px;
  font-size: 11px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 11;
  color: #efe9de;
  max-width: min(390px, calc(50vw - 235px));
}

#game-root.build-active #onboarding-banner,
#game-root.build-active #context-prompt {
  display: none;
}

@media (max-width: 1080px) {
  #onboarding-banner { display: none; }
}

.mini-close {
  background: transparent;
  border: none;
  color: #c9973b;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 4px;
}

#context-prompt {
  position: absolute;
  bottom: 102px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #ffe285;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.prompt-buy-btn {
  background: var(--bg-card);
  color: #ffffff;
  border: 2px solid #8a847a;
  border-radius: 4px;
  padding: 4px 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 2px 0 #0b1f10;
}

.prompt-buy-btn:disabled {
  background: #262421;
  border-color: #2e2b27;
  color: #8a847a;
  cursor: not-allowed;
}

#toast-container {
  position: absolute;
  top: 116px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 25;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 2px solid #63c778;
  color: #e9ffef;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  box-shadow: 0 0 0 2px #12110f, 0 3px 0 rgba(0, 0, 0, 0.65);
  animation: toastIn 0.2s ease-out;
}

.toast.warn {
  border-color: #e06c53;
  color: #ffe8e2;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

#hud-bottom {
  bottom: 12px;
  padding: 0 14px;
  display: flex;
  justify-content: center;
}

@media (max-width: 1120px) and (min-width: 761px) {
  #hud-bottom { justify-content: flex-end; }
}

.orb-skill-ico {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  display: block;
}

.card-row.is-equipped {
  border-color: var(--ui-brass-hi);
  background: var(--bg-card);
}

#build-toolbar {
  position: absolute;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  z-index: 16;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: calc(100vw - 24px);
}

#build-info-line {
  font-size: 12px;
  font-weight: 700;
  color: #ffd875;
  text-align: center;
  white-space: normal;
  line-height: 1.25;
}

#build-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.build-slot-btn {
  position: relative;
  background: var(--bg-card);
  color: #efe9de;
  border: 2px solid #2e2b27;
  border-radius: 4px;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 0 #12110f;
}

.build-slot-btn.tile-card {
  flex-direction: column;
  min-width: 64px;
  padding: 5px 6px 4px;
  gap: 3px;
}

.build-slot-btn .build-thumb {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.build-slot-btn .slot-key {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 9px;
  color: #ffd98e;
}

.build-limit-badge {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 3px;
  background: rgba(18, 17, 15, 0.88);
  border: 1px solid rgba(239, 233, 222, 0.10);
  color: #8a847a;
  pointer-events: none;
}

.build-limit-badge.is-full {
  border-color: rgba(255, 105, 97, 0.75);
  color: #ff8e88;
}

.build-slot-btn .slot-name {
  font-size: 10px;
  line-height: 1;
}

.build-slot-btn:hover {
  border-color: var(--ui-brass);
  background: var(--bg-card);
}

.build-slot-btn.active {
  border-color: var(--ui-brass-hi);
  background: var(--bg-card);
  color: #ffea9f;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.28), 0 2px 0 #12110f;
}

.build-slot-btn.demolish.active {
  border-color: #ff6961;
  background: linear-gradient(180deg, #542228 0%, #331317 100%);
  color: #ffb8b3;
}

.action-btn.active-mode {
  border-color: #6ee08d;
  background: var(--bg-card);
  box-shadow: 0 0 12px rgba(239, 233, 222, 0.10), 0 3px 0 #12110f;
}

#quest-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #efe9de;
  max-width: 100%;
}

#quest-pill.quest-done {
  border-color: #63c778;
  color: #d6ffe0;
}

.quest-claim-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card);
  color: #fff;
  border: 2px solid #8a847a;
  border-radius: 4px;
  padding: 2px 8px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.hd-dock {
  background: var(--bg-card);
  border: 2px solid var(--ui-brass);
  border-radius: 7px;
  padding: 6px 10px;
  box-shadow:
    0 0 0 2px #12110f,
    inset 0 1px 0 rgba(255, 224, 148, 0.3),
    0 6px 18px rgba(0, 0, 0, 0.85);
  align-items: flex-end;
}

.action-grid {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.action-btn {
  position: relative;
  width: 72px;
  height: 58px;
  background: var(--bg-card);
  border: 2px solid #8a6b33;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 232, 175, 0.2), 0 3px 0 #12110f;
  color: #f6ead0;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px;
  transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
}

.action-btn:hover {
  border-color: var(--ui-brass-hi);
  background: var(--bg-card);
}

.action-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #12110f;
}

.action-btn .btn-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn .btn-icon svg,
.orb-core svg {
  width: 22px;
  height: 22px;
  display: block;
}

.action-btn .btn-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.action-btn .btn-key {
  position: absolute;
  top: 2px;
  right: 4px;
  font-size: 9px;
  color: #ffd98e;
}

.action-btn.skill-orb-btn {
  width: 70px;
  height: 70px;
  margin-top: -12px;
  border-radius: 50%;
  border: 3px solid var(--ui-brass-hi);
  background: radial-gradient(circle at 38% 32%, #72f7ff 0%, #1bb0d6 45%, #12110f 100%);
  box-shadow:
    0 0 0 2px #12110f,
    0 0 18px rgba(239, 233, 222, 0.10),
    inset 0 2px 6px rgba(255, 255, 255, 0.62);
  color: #ffffff;
}

.action-btn.skill-orb-btn:hover {
  border-color: #fff2b2;
  box-shadow: 0 0 0 2px #12110f, 0 0 24px rgba(239, 233, 222, 0.10);
}

.action-btn.skill-orb-btn.overdrive {
  border-color: #ffd166;
  background: radial-gradient(circle at 38% 32%, #fff0a8 0%, #34e0ff 45%, #161513 100%);
  box-shadow: 0 0 26px rgba(255, 209, 102, 0.9);
}

.action-btn.skill-orb-btn.on-cooldown {
  opacity: 0.62;
  border-color: #2e2b27;
  background: radial-gradient(circle at 50% 50%, #262421 0%, #161513 100%);
  box-shadow: 0 0 0 2px #12110f;
}

.action-btn.skill-orb-btn .btn-key {
  top: -4px;
  right: -2px;
  background: #161513;
  border: 1px solid var(--ui-brass);
  border-radius: 3px;
  padding: 0 4px;
}

/* Мобильные контролы в едином стиле */
#mobile-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}

#joystick-zone {
  position: absolute;
  left: 16px;
  bottom: 20px;
  width: 132px;
  height: 132px;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#joystick-base {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: rgba(22, 21, 19, 0.68);
  border: 2px solid var(--ui-brass);
  box-shadow: 0 0 0 2px rgba(18, 17, 15, 0.8), inset 0 0 12px rgba(0, 0, 0, 0.5);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#joystick-knob {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe394, #c9862a);
  border: 2px solid #fff3c4;
  transform: translate(0, 0);
}

#mobile-right-btns {
  position: absolute;
  right: 18px;
  bottom: 92px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: auto;
}

.mobile-circle-btn {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  border: 3px solid var(--ui-brass-hi);
  background: radial-gradient(circle at 35% 30%, #e07b34, #9c4416);
  box-shadow: 0 0 0 2px #12110f, 0 4px 0 rgba(0, 0, 0, 0.65);
  cursor: pointer;
}

.mobile-circle-btn.interact {
  width: 90px;
  height: 44px;
  border-radius: 6px;
  background: var(--bg-card);
  border-color: #8a847a;
}

/* Единые безскролльные модальные окна (бронзовый заголовок + тёмная сталь + компактные плитки) */
@keyframes modalPopIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(18, 17, 15, 0.74);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 12px;
}

#modal-window,
#modal-window.modal-wide {
  width: min(860px, 94vw);
  height: min(560px, 86vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPopIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow:
    0 0 0 2px #12110f,
    0 12px 42px rgba(0, 0, 0, 0.85),
    inset 0 1px 0 rgba(255, 224, 148, 0.35);
}

#modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 13px;
  background: linear-gradient(180deg, #69491c 0%, #3d2a10 100%);
  border-bottom: 2px solid var(--ui-brass);
  box-shadow: inset 0 1px 0 rgba(255, 226, 156, 0.35);
  flex-shrink: 0;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

#modal-emblem {
  width: 22px;
  height: 22px;
  background: #161513;
  border: 2px solid var(--ui-brass-hi);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#modal-emblem svg {
  width: 15px;
  height: 15px;
  display: block;
}

#modal-title {
  margin: 0;
  font-size: 14px;
  color: #fff2cc;
  letter-spacing: 0.7px;
  text-shadow: 0 2px 0 #1c1306;
}

#modal-body {
  flex: 1;
  min-height: 0;
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
  scrollbar-width: thin;
  scrollbar-color: #2e2b27 #12110f;
}

#modal-body::-webkit-scrollbar {
  width: 6px;
}

#modal-body::-webkit-scrollbar-track {
  background: #12110f;
}

#modal-body::-webkit-scrollbar-thumb {
  background: #2e2b27;
  border-radius: 3px;
}

.ui-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-bottom: 0;
  border-bottom: 2px solid #262421;
  flex-shrink: 0;
}

.ui-tab-pill {
  position: relative;
  top: 2px;
  background: var(--bg-card);
  border: 2px solid #262421;
  border-bottom-color: #262421;
  border-radius: 5px 5px 0 0;
  color: #aaa398;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px 7px;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.ui-tab-pill:hover {
  border-color: var(--ui-brass);
  color: #fff0c2;
}

.ui-tab-pill.active {
  background: var(--bg-card);
  border-color: #e5a93c;
  border-bottom-color: #161513;
  color: #ffffff;
  box-shadow: inset 0 2px 0 rgba(239, 233, 222, 0.10);
}

.ui-filter-pill {
  background: var(--bg-card);
  border: 1px solid #2e2b27;
  border-radius: 4px;
  color: #aaa398;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
}

.ui-filter-pill:hover {
  border-color: var(--ui-brass);
  color: #fff2cc;
}

.ui-filter-pill.active {
  background: var(--bg-card);
  border-color: var(--ui-brass-hi);
  color: #fff5d4;
}

.compact-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.compact-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.compact-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.compact-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.sell-matrix-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}

.compact-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  padding: 8px 9px;
  background: var(--bg-card);
  border: 2px solid #2e2b27;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 0 #12110f;
  min-width: 0;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.compact-tile:hover {
  border-color: #8a847a;
}

.compact-tile.is-equipped,
.compact-tile.is-active {
  border-color: var(--ui-brass-hi);
  background: var(--bg-card);
}

.compact-tile.is-equipped {
  border-color: #e5a93c;
  box-shadow: 0 0 10px rgba(239, 233, 222, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.compact-tile.is-installed {
  border-color: #5bc979;
}

.compact-tile.is-locked-skill {
  border-color: #262421;
  opacity: 0.92;
}

.compact-tile.is-empty-sell {
  opacity: 0.58;
}

.tile-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(239, 233, 222, 0.10);
}

.tile-card-hdr .tile-title {
  font-size: 12.5px;
}

.tile-lvl-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  background: #12110f;
  border: 1px solid #2e2b27;
  color: #aaa398;
  flex-shrink: 0;
}

.tile-lvl-badge.equipped {
  border-color: #e5a93c;
  background: #161513;
  color: #ffffff;
}

.tile-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.tile-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 45%, #1c1a18 0%, #12110f 100%);
  border: 2px solid #8f6b2c;
  border-radius: 4px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
}

.tile-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: pixelated;
}

.tile-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.tile-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-sub {
  font-size: 11px;
  color: #8a847a;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-desc-short {
  font-size: 11px;
  color: #aaa398;
  line-height: 1.3;
}

.craft-x5-btn {
  flex: 0 0 auto !important;
  min-width: 44px;
  padding: 5px 7px !important;
}

.modal-inspector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 11px;
  background: var(--bg-card);
  border: 1px solid #2e2b27;
  border-left: 3px solid #e5a93c;
  border-radius: 4px;
  font-size: 11.5px;
  color: #efe9de;
  line-height: 1.35;
  flex-shrink: 0;
}

.cost-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.cost-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
  background: #12110f;
  border: 1px solid #262421;
  color: #efe9de;
}

.cost-chip.ok {
  border-color: #46a869;
  color: #8a847a;
}

.cost-chip.lack {
  border-color: #a84e46;
  color: #ff9c8a;
}

.cost-chip img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  image-rendering: pixelated;
}

.tile-actions {
  display: flex;
  gap: 5px;
  margin-top: auto;
}

.tile-actions .action-commit-btn,
.tile-actions .secondary-action-btn {
  flex: 1;
  padding: 5px 7px;
  font-size: 11.5px;
  text-align: center;
}

.sell-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 7px 6px;
}

.sell-tile-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #12110f;
  border: 2px solid #6b5224;
  border-radius: 4px;
}

.sell-tile-top img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  image-rendering: pixelated;
}

.sell-qty-badge {
  position: absolute;
  right: -5px;
  bottom: -4px;
  background: #161513;
  border: 1px solid #2e2b27;
  border-radius: 3px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
}

.sell-tile-name {
  font-size: 11px;
  font-weight: 700;
  color: #efe9de;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sell-tile-unit {
  font-size: 10px;
  color: #ffd166;
}

.sell-tile .action-commit-btn {
  width: 100%;
  padding: 4px 5px;
  font-size: 11px;
}

.inspector-text {
  flex: 1;
  min-width: 0;
}

.inspector-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.inspector-actions .action-commit-btn {
  padding: 4px 9px;
  font-size: 11px;
}

.compact-hdr-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  background: var(--bg-card);
  border: 2px solid #2e2b27;
  border-radius: 5px;
  flex-shrink: 0;
}

.bridge-split-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 10px;
  align-items: stretch;
}

.bridge-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.machine-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.section-mini-hdr {
  font-size: 11.5px;
  font-weight: 700;
  color: #8a847a;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-top: 1px;
}

.map-split-layout {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.map-side-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
}

.help-popover-box {
  padding: 8px 10px;
  background: #12110f;
  border: 1px solid #e5a93c;
  border-radius: 4px;
  font-size: 11px;
  color: #efe9de;
  line-height: 1.35;
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  background: var(--bg-card);
  border: 2px solid #2e2b27;
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 0 #12110f;
}

.card-row.is-active {
  border-color: var(--ui-brass-hi);
  background: var(--bg-card);
}

.card-row.is-installed {
  border-color: #5bc979;
}

.card-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.card-thumb {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 45%, #1c1a18 0%, #12110f 100%);
  border: 2px solid #8f6b2c;
  border-radius: 4px;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.card-thumb img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  image-rendering: pixelated;
}

.card-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
}

.level-pips {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.pip {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: #12110f;
  border: 1px solid #2e2b27;
}

.pip.filled {
  background: linear-gradient(180deg, #ffe07d 0%, #d99726 100%);
  border-color: #fff2b2;
  box-shadow: 0 0 5px rgba(255, 209, 102, 0.45);
}

.pip.filled.cyan {
  background: var(--bg-card);
  border-color: #efe9de;
  box-shadow: 0 0 5px rgba(239, 233, 222, 0.10);
}

.card-desc {
  font-size: 11.5px;
  color: #aaa398;
  line-height: 1.3;
}

.card-cost {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffd670;
}

.card-cost.affordable {
  color: #8a847a;
}

.card-cost.missing {
  color: #ff9c8a;
}

.action-commit-btn {
  background: var(--bg-card);
  color: #ffffff;
  border: 2px solid #8a847a;
  border-radius: 4px;
  padding: 7px 13px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 0 #0b1c10;
}

.action-commit-btn:hover:not(:disabled) {
  background: var(--bg-card);
  border-color: #aaa398;
}

.action-commit-btn:disabled {
  background: #262421;
  border-color: #2e2b27;
  color: #8a847a;
  box-shadow: none;
  cursor: not-allowed;
}

.action-commit-btn.danger {
  background: linear-gradient(180deg, #9c3838 0%, #631e1e 100%);
  border-color: #f08989;
  box-shadow: 0 2px 0 #210909;
}

.secondary-action-btn {
  background: var(--bg-card);
  color: #efe9de;
  border: 2px solid #e5a93c;
  border-radius: 4px;
  padding: 7px 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 0 #12110f;
}

.secondary-action-btn:hover:not(:disabled) {
  background: var(--bg-card);
  border-color: #aaa398;
}

.secondary-action-btn:disabled {
  background: #262421;
  border-color: #2e2b27;
  color: #8a847a;
  box-shadow: none;
  cursor: not-allowed;
}

.world-map-wrap {
  background: radial-gradient(circle at 50% 45%, #161513 0%, #12110f 100%);
  border: 2px solid var(--ui-brass);
  border-radius: 5px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.world-map-canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 480 / 370;
  display: block;
  border-radius: 4px;
  border: 1px solid #262421;
  cursor: pointer;
  image-rendering: pixelated;
}

.world-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  font-size: 10.5px;
  color: #aaa398;
  justify-content: center;
  padding-top: 1px;
}

.world-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.world-map-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

/* Инвентарь / Эндер-Склад */
.inv-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
  align-items: stretch;
}

.inv-left {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.inv-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 7px;
  background: #12110f;
  border: 2px solid #2e2b27;
  border-radius: 4px;
}

.inv-slot {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 48px;
  background: #161513;
  border: 2px solid #262421;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 5px;
}

.inv-slot.empty {
  background: rgba(22, 21, 19, 0.55);
  border-color: #262421;
  cursor: default;
}

.inv-slot:not(.empty):hover {
  border-color: #8a847a;
  background: #1c1a18;
}

.inv-slot.selected {
  border-color: var(--ui-brass-hi);
  background: #2b2619;
  box-shadow: 0 0 0 1px var(--ui-brass-hi), inset 0 0 10px rgba(255, 209, 102, 0.2);
}

.inv-slot img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.inv-count {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 1px 1px 0 #12110f, -1px -1px 0 #12110f;
}

.inv-right {
  background: var(--bg-card);
  border: 2px solid #8f6b2c;
  border-radius: 4px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.inv-preview-box {
  width: 78px;
  height: 78px;
  background: #12110f;
  border: 2px solid var(--ui-brass);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inv-preview-box img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  image-rendering: pixelated;
}

.inv-item-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffd670;
}

.inv-cat-pill {
  font-size: 10px;
  font-weight: 700;
  color: #aaa398;
  background: #1c1a18;
  border: 1px solid #2e2b27;
  border-radius: 3px;
  padding: 2px 8px;
}

.inv-item-desc {
  font-size: 12px;
  color: #aaa398;
  line-height: 1.35;
}

.inv-value-row {
  font-size: 14px;
  font-weight: 700;
  color: #ffe07d;
  margin-top: auto;
}

.inv-sell-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.inv-sell-all {
  grid-column: span 2;
  border-color: var(--ui-brass-hi);
}

@media (max-width: 760px) {
  #modal-body {
    overflow-y: auto;
  }
  .compact-grid-2,
  .compact-grid-3,
  .bridge-split-grid,
  .machine-top-grid,
  .map-split-layout {
    grid-template-columns: 1fr;
  }
  .compact-grid-4,
  .compact-grid-5 {
    grid-template-columns: repeat(2, 1fr);
  }
  .sell-matrix-6 {
    grid-template-columns: repeat(3, 1fr);
  }
  .inv-layout { grid-template-columns: 1fr; }
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  #top-actions {
    top: 8px;
    right: 10px;
  }
  #hud-top {
    top: 56px;
    padding: 0 10px;
  }
  #top-hud-bar {
    font-size: 11px;
    padding: 4px 6px;
    gap: 4px;
  }
  .hud-world-chip,
  .hud-chip {
    padding: 2px 5px;
  }
  .inv-hud-btn {
    padding: 5px 9px;
    font-size: 11px;
  }
  .inv-key-tag { display: none; }
  #onboarding-banner { display: none; }
  #hud-bottom {
    bottom: 10px;
    padding: 0 10px;
    justify-content: flex-end;
  }
  .orb-skill-ico {
    width: 18px;
    height: 18px;
  }
  .world-log-glass {
    top: 132px;
    left: 8px;
    width: 224px;
  }
  .world-log-list {
    max-height: 92px;
  }
  .hd-dock { padding: 4px 6px; }
  .action-grid { display: flex; gap: 4px; }
  .action-btn { width: 46px; height: 48px; }
  .action-btn.skill-orb-btn { width: 52px; height: 52px; margin-top: -6px; }
  .action-btn .btn-key { display: none; }
  .action-btn .btn-icon,
  .action-btn .btn-icon svg,
  .orb-core svg { width: 18px; height: 18px; }
  .action-btn .btn-label { font-size: 8px; }
  #build-toolbar {
    bottom: 72px;
    padding: 6px;
    width: calc(100vw - 20px);
  }
  #build-info-line { font-size: 10px; }
  .build-slot-btn.tile-card { min-width: 48px; padding: 3px 4px; }
  .build-slot-btn .build-thumb { width: 22px; height: 22px; }
  #game-root.build-active #mobile-right-btns { display: none; }
  #joystick-zone { left: 6px; bottom: 12px; width: 102px; height: 102px; }
  #joystick-base { width: 88px; height: 88px; }
  #joystick-knob { width: 40px; height: 40px; }
  #mobile-right-btns { right: 12px; bottom: 78px; gap: 8px; }
  .mobile-circle-btn { width: 64px; height: 64px; font-size: 11px; }
  #context-prompt {
    bottom: 148px;
    max-width: calc(100vw - 24px);
    font-size: 11px;
    padding: 5px 9px;
  }
  #toast-container {
    top: 185px;
    left: 10px;
    right: 10px;
    align-items: center;
  }
}

/* Speedrun Timer, Mega-Structure Monument & Leaderboard UI */
.hud-timer-chip {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color: #ffe07d;
  border-color: #6a5528;
  background: rgba(22, 21, 19, 0.92);
  gap: 5px;
}

.hud-timer-chip.done {
  color: #8a847a;
  border-color: #41aa6b;
  background: rgba(22, 21, 19, 0.92);
}

.monument-hud-btn {
  border-color: #d6a444;
  background: var(--bg-card);
}

.monument-hud-btn.completed {
  border-color: #5ee397;
  background: var(--bg-card);
  color: #aaa398;
}

.monument-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.monument-tabs .action-commit-btn {
  flex: 1;
  text-align: center;
  padding: 6px 10px;
  font-size: 12.5px;
}

.monument-tabs .action-commit-btn.active {
  background: var(--bg-card);
  border-color: #ffd670;
  color: #ffe699;
}

.monument-hero-card {
  background: var(--bg-card);
  border: 2px solid var(--ui-brass);
  border-radius: 5px;
  padding: 9px 11px;
}

.monument-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.monument-progress-bar {
  width: 100%;
  height: 11px;
  background: #12110f;
  border: 1px solid #2e2b27;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.monument-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3fb9ff 0%, #5ce8a7 55%, #ffd670 100%);
  transition: width 0.25s ease;
}

.monument-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.monument-actions-row .action-commit-btn {
  padding: 5px 10px;
  font-size: 11.5px;
}

.biome-badge-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 7px;
}

.biome-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background: #161513;
  border: 1px solid #262421;
  color: #8a847a;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biome-badge.visited {
  background: rgba(34, 92, 68, 0.48);
  border-color: #46c88a;
  color: #aaa398;
}

.monument-stage-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.monument-stage-tab {
  background: #161513;
  border: 1px solid #262421;
  border-radius: 4px;
  color: #aaa398;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 4px;
  cursor: pointer;
  text-align: center;
}

.monument-stage-tab.done {
  border-color: #3ea36d;
  color: #aaa398;
  background: rgba(22, 21, 19, 0.65);
}

.monument-stage-tab.current {
  border-color: var(--ui-brass);
  color: #ffe285;
}

.monument-stage-tab.selected {
  border-color: #e5a93c;
  color: #ffffff;
  background: var(--bg-card);
  box-shadow: 0 0 8px rgba(239, 233, 222, 0.10);
}

.monument-stage-block {
  border: 1px solid #2e2b27;
  border-radius: 4px;
  padding: 8px 10px;
  background: rgba(22, 21, 19, 0.85);
}

.monument-stage-block.active-stage {
  border-color: var(--ui-brass);
  background: var(--bg-card);
}

.monument-stage-block.done-stage {
  border-color: #3f9e6b;
  background: rgba(22, 21, 19, 0.55);
}

.monument-stage-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffe08a;
}

.monument-res-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.monument-res-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 7px;
  background: #12110f;
  border: 1px solid #262421;
  border-radius: 4px;
  font-size: 11px;
}

.monument-res-item.done {
  border-color: #3ea36d;
  background: rgba(28, 26, 24, 0.55);
}

.monument-res-item img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.monument-res-meta {
  flex: 1;
  min-width: 0;
}

.monument-res-name {
  font-weight: 700;
  color: #efe9de;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.monument-res-counts {
  color: #aaa398;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 10.5px;
}

.lb-callsign-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #161513;
  border: 1px solid var(--ui-brass);
  border-radius: 4px;
}

.lb-callsign-input {
  flex: 1;
  min-width: 140px;
  background: #12110f;
  color: #fff2c4;
  border: 1px solid #2e2b27;
  border-radius: 3px;
  padding: 5px 8px;
  font-size: 12px;
  font-family: inherit;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
}

.lb-table th,
.lb-table td {
  padding: 4px 7px;
  border-bottom: 1px solid #262421;
  text-align: left;
}

.lb-table th {
  color: #ffd670;
  font-size: 11px;
  text-transform: uppercase;
  background: #161513;
}

.lb-row.is-me {
  background: rgba(239, 233, 222, 0.10);
}

.lb-row.is-me td {
  color: #aaa398;
  font-weight: 700;
}

.lb-time-cell {
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  color: #ffe07d;
  font-weight: 700;
}

.lb-source-pill {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #1c1a18;
  border: 1px solid #2e2b27;
  color: #aaa398;
}



/* ==========================================================================
   ГЛАВНОЕ МЕНЮ (MAIN MENU OVERLAY)
   ========================================================================== */
#main-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(22, 21, 19, 0.94) 0%, rgba(18, 17, 15, 0.98) 100%);
  backdrop-filter: blur(10px);
  padding: 16px;
  user-select: none;
}

#main-menu-overlay.hidden {
  display: none !important;
}

#main-menu-card {
  width: 100%;
  max-width: 580px;
  min-height: 600px;
  background: #161513;
  border: 2px solid #e5a93c;
  box-shadow: 0 0 32px rgba(239, 233, 222, 0.10), inset 0 0 20px rgba(0, 0, 0, 0.7);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 8px;
}

#main-menu-home-view,
#main-menu-shop-view {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  flex: 1;
}

.shop-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

#btn-shop-back,
#btn-shop-history {
  flex: 0 0 auto;
  min-width: 170px;
  padding: 11px 18px;
  min-height: 40px;
}

#main-menu-home-view.hidden,
#main-menu-shop-view.hidden {
  display: none !important;
}

.menu-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.menu-logo-badge {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 0 10px rgba(255, 209, 102, 0.5));
}

.menu-logo-svg {
  width: 100%;
  height: 100%;
}

.menu-title {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff3c4 0%, #ffd166 60%, #c48e24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}

.menu-subtitle {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #8a847a;
  font-weight: 600;
}

.menu-hero-card {
  background: rgba(18, 17, 15, 0.88);
  border: 1px solid #262421;
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-hero-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-hero-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid #e5a93c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(239, 233, 222, 0.10);
}

.menu-hero-info {
  flex: 1;
}

.menu-hero-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.menu-hero-role {
  font-size: 11.5px;
  color: #aaa398;
}

.menu-switch-hero-btn {
  font-size: 11px;
  padding: 5px 9px;
  background: #1c1a18;
  border: 1px solid #2e2b27;
  color: #8a847a;
  border-radius: 4px;
  cursor: pointer;
}

.menu-switch-hero-btn:hover {
  background: #262421;
  border-color: #8a847a;
}

.menu-hero-perks {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.perk-tag {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 3px;
  background: #12110f;
  border: 1px solid #262421;
}

.perk-tag.turret {
  color: #ffd670;
  border-color: #5c4416;
}

.perk-tag.bonus {
  color: #aaa398;
  border-color: #1f5438;
}

.menu-nav-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-btn-play {
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  background: var(--bg-card);
  border: 2px solid #52d68a;
  color: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.16s ease;
  box-shadow: 0 4px 14px rgba(239, 233, 222, 0.10);
}

.menu-btn-play:hover {
  background: var(--bg-card);
  box-shadow: 0 0 20px rgba(239, 233, 222, 0.10);
  transform: translateY(-1px);
}

.menu-nav-btn {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
  background: #161513;
  border: 1px solid #2e2b27;
  color: #efe9de;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.menu-nav-btn:hover {
  background: #1c1a18;
  border-color: #e5a93c;
  color: #ffffff;
}

.menu-nav-btn.no-ads-btn {
  border-color: #a87e28;
  color: #ffd670;
}

.menu-nav-btn.no-ads-btn.active {
  background: rgba(239, 233, 222, 0.10);
  border-color: #27ae60;
  color: #8a847a;
}

.menu-nav-btn.menu-restart-btn {
  border-color: #8c3d3d;
  color: #ffb0a8;
}

.menu-nav-btn.menu-restart-btn:hover {
  border-color: #ff6b6b;
  background: rgba(168, 42, 42, 0.35);
  color: #ffffff;
}

.menu-nav-btn.menu-restart-btn.is-armed {
  border-color: #ff5252;
  background: rgba(204, 38, 38, 0.55);
  color: #fff2b2;
}


.menu-footer-bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid #262421;
}

.menu-opt-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 700;
  background: #12110f;
  border: 1px solid #262421;
  color: #aaa398;
  border-radius: 4px;
  cursor: pointer;
}

.menu-opt-btn:hover {
  background: #161513;
  color: #ffffff;
}

.menu-opt-btn.close {
  background: #2b1d1f;
  border-color: #633338;
  color: #ff9999;
}

.menu-opt-btn.close:hover {
  background: #452427;
  color: #ffb8b8;
}

/* ==========================================================================
   ВЫБОР ГЕРОЯ И ДОНАТ В МОДАЛЬНОМ ОКНЕ
   ========================================================================== */
.hero-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: calc(100vh - 230px);
  overflow-y: auto;
}

@media (max-width: 768px) {
  .hero-select-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .hero-select-grid {
    grid-template-columns: 1fr;
  }
}

.hero-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: #161513;
  border: 1px solid #262421;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.hero-card:hover {
  border-color: #e5a93c;
  box-shadow: 0 0 10px rgba(239, 233, 222, 0.10);
}

.hero-card.is-equipped {
  border-color: #2ecc71;
  background: rgba(239, 233, 222, 0.10);
  box-shadow: 0 0 12px rgba(239, 233, 222, 0.10);
}

.hero-card.is-locked-char {
  border-color: #4a3c20;
}

.hero-suit-preview {
  display: flex;
  align-items: center;
  gap: 10px;
}

.suit-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.suit-body {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.suit-visor {
  position: absolute;
  width: 12px;
  height: 4px;
  border-radius: 2px;
  top: 9px;
}

.hero-role-tag {
  font-size: 11px;
  color: #aaa398;
  font-weight: 600;
}

.hero-perk-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  background: rgba(18, 17, 15, 0.6);
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #1c1a18;
  flex: 1;
}

.hero-turret-line {
  color: #ffd670;
  font-weight: 600;
}

.hero-passive-line {
  color: #aaa398;
  line-height: 1.3;
}

.donate-btn {
  background: linear-gradient(180deg, #c48e24 0%, #875c0f 100%) !important;
  border-color: #ffd166 !important;
  color: #ffffff !important;
  font-weight: 800;
  cursor: pointer;
}

.donate-btn:hover {
  background: linear-gradient(180deg, #e0a734 0%, #a87314 100%) !important;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.5);
}

.no-ads-banner-wrap {
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid #a87e28;
  border-radius: 6px;
  padding: 10px 14px;
}

.no-ads-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.no-ads-meta {
  flex: 1;
}

.no-ads-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffd670;
}

.no-ads-desc {
  font-size: 11px;
  color: #aaa398;
  margin-top: 2px;
}

.no-ads-action .action-commit-btn {
  padding: 8px 16px;
  white-space: nowrap;
}

/* ==========================================================================
   3D HERO CAROUSEL STAGE & CONTROLS
   ========================================================================== */
.hero-carousel-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.hero-carousel-stage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  position: relative;
}

.hero-carousel-canvas-container {
  position: relative;
  flex: 1;
  height: 230px;
  min-height: 190px;
  background: radial-gradient(circle at 50% 65%, #1c1a18 0%, #12110f 100%);
  border: 2px solid #262421;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.4);
}

.hero-carousel-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.hero-carousel-canvas:active {
  cursor: grabbing;
}

.hero-3d-status-pill {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 5;
  transition: all 0.2s ease;
}

.hero-3d-status-pill.selected {
  background: rgba(239, 233, 222, 0.10);
  border: 1px solid #2ecc71;
  color: #aaa398;
  box-shadow: 0 0 12px rgba(239, 233, 222, 0.10);
}

.hero-3d-status-pill.owned {
  background: rgba(239, 233, 222, 0.10);
  border: 1px solid #e5a93c;
  color: #8a847a;
  box-shadow: 0 0 10px rgba(239, 233, 222, 0.10);
}

.hero-3d-status-pill.locked {
  background: rgba(230, 126, 34, 0.35);
  border: 1px solid #f39c12;
  color: #ffcc66;
  box-shadow: 0 0 12px rgba(243, 156, 18, 0.45);
}

.hero-3d-drag-hint {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(180, 205, 240, 0.6);
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(18, 17, 15, 0.65);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.carousel-nav-btn {
  width: 46px;
  height: 54px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 2px solid #2e2b27;
  color: #8a847a;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.15s ease;
  user-select: none;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.carousel-key-hint {
  font-size: 10px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(18, 17, 15, 0.85);
  border: 1px solid #2e2b27;
  color: #ffd670;
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: 0.5px;
}

.carousel-nav-btn:hover {
  background: var(--bg-card);
  border-color: #e5a93c;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(239, 233, 222, 0.10);
  transform: scale(1.06);
}

.carousel-nav-btn:active {
  transform: scale(0.95);
}

.hero-carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 2px 0;
}

.hero-dot-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #161513;
  border: 1px solid #262421;
  border-radius: 12px;
  color: #8a847a;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.dot-hero-mini {
  width: 16px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.hero-dot-btn:hover {
  border-color: #e5a93c;
  color: #ffffff;
  background: #1c1a18;
}

.hero-dot-btn.active {
  background: #1c1a18;
  border-color: #e5a93c;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(239, 233, 222, 0.10);
  transform: translateY(-1px);
}

.hero-dot-btn.is-equipped {
  border-color: #2ecc71;
}

.hero-dot-btn.is-locked {
  border-color: #59431e;
}

.dot-lock {
  font-size: 9px;
}

.hero-details-card {
  background: #161513;
  border: 1px solid #262421;
  border-radius: 6px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-details-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1c1a18;
  padding-bottom: 6px;
}

.hero-details-name-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-det-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.hero-det-role {
  font-size: 11px;
  color: #aaa398;
  font-weight: 600;
}

.hero-det-price {
  font-size: 12px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
}

.hero-det-price.selected {
  background: rgba(239, 233, 222, 0.10);
  border: 1px solid #2ecc71;
  color: #8a847a;
}

.hero-det-price.owned {
  background: rgba(239, 233, 222, 0.10);
  border: 1px solid #e5a93c;
  color: #8a847a;
}

.hero-det-price.locked {
  background: rgba(230, 126, 34, 0.25);
  border: 1px solid #f39c12;
  color: #ffd670;
}

.hero-details-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 600px) {
  .hero-details-specs {
    grid-template-columns: 1fr;
  }
}

.hero-spec-box {
  background: rgba(18, 17, 15, 0.7);
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid #1c1a18;
}

.hero-spec-box.skill {
  grid-column: 1 / -1;
  border-left: 3px solid #ff9f43;
  background: rgba(22, 21, 19, 0.85);
}

.spec-cd-pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 214, 112, 0.14);
  border: 1px solid rgba(255, 214, 112, 0.35);
  color: #ffd670;
  font-size: 9px;
}

.hero-spec-box.turret {
  border-left: 3px solid #ffd670;
}

.hero-spec-box.perk {
  border-left: 3px solid #e5a93c;
}

.spec-label {
  font-size: 10px;
  font-weight: 800;
  color: #aaa398;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.spec-val {
  font-size: 11px;
  color: #efe9de;
  line-height: 1.35;
  font-weight: 600;
}

.hero-action-bar {
  display: flex;
  justify-content: stretch;
  width: 100%;
}

.hero-main-action-btn {
  width: 100%;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
}


.world-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 10px;
  margin-top: 6px;
  font-size: 11.5px;
  color: #aaa398;
}

.world-stat-grid b {
  color: #fff2c4;
}

/* Единая плавная структура кнопок и компактные отступы во всех модалках (без фантомного подпрыгивания при наведении) */
.ui-tab-pill {
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
  padding: 8px 16px;
  font-size: 13px;
}

.ui-tab-pill:hover {
  transform: none !important;
}

.action-commit-btn,
.secondary-action-btn {
  transition: background 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 5px;
}

.action-commit-btn:not(:disabled):hover,
.secondary-action-btn:not(:disabled):hover,
.compact-tile:hover,
.compact-tile:active,
.menu-btn-play:hover,
.hero-dot-btn:hover,
.carousel-nav-btn:hover,
button:hover,
button:active,
.action-btn:hover,
.icon-btn:hover,
.build-slot-btn:hover,
.build-cat-btn:hover,
.menu-nav-btn:hover,
.menu-opt-btn:hover,
.test-hero-btn:hover,
.tut-next-btn:hover,
.tut-skip-btn:hover {
  transform: none !important;
}

.tile-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 5px;
}

.tile-actions > button {
  flex: 1;
}

.tile-desc-short {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.38;
  font-size: 12px;
}

.hero-carousel-canvas-container {
  height: 205px;
}

.modal-inspector {
  padding: 9px 12px;
  font-size: 12.5px;
  flex-shrink: 0;
}

/* ═══ АДАПТИВНЫЙ РАЗМЕР МОДАЛОК БЕЗ ПУСТЫХ ПРОСТРАНСТВ И РАСТЯГИВАНИЯ ═══ */
.modal-window,
#modal-window {
  width: min(1040px, 96vw) !important;
  height: auto !important;
  min-height: 0 !important;
  max-width: 1040px !important;
  max-height: min(690px, 92vh) !important;
}

#modal-window.is-tall {
  height: min(640px, 90vh) !important;
}

#modal-window:not(.is-tall) #modal-body {
  flex: 0 1 auto !important;
  padding-bottom: 12px;
}

.modal-title {
  font-size: 16px !important;
}

.tile-title {
  font-size: 13.5px !important;
}

.tile-lvl-badge {
  font-size: 11.5px !important;
  padding: 2px 7px !important;
}

.tile-icon {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  padding: 4px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tile-icon img {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain !important;
  image-rendering: pixelated;
}

.cost-chip {
  font-size: 12px !important;
  padding: 3px 7px !important;
  gap: 5px !important;
}

.cost-chip img {
  width: 18px !important;
  height: 18px !important;
  object-fit: contain !important;
  image-rendering: pixelated;
}

/* ═══ МЕНЮ ПРОДАЖИ ═══ */
.sell-matrix-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  padding-right: 4px;
}

.sell-tile {
  padding: 7px 8px !important;
  gap: 4px !important;
  justify-content: space-between;
}

.sell-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.sell-tile-top img {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain !important;
  image-rendering: pixelated;
}

.sell-qty-badge {
  font-size: 12px !important;
  padding: 2px 6px !important;
}

.sell-tile-name {
  font-size: 12.5px !important;
  font-weight: 700;
}

.sell-tile-unit {
  font-size: 11.5px !important;
}

/* ═══ ТЕСТОВЫЙ ВЫБОР ПЕРСОНАЖА В ПАНЕЛИ ТЕСТ ═══ */
.test-hero-bar {
  margin-bottom: 8px;
  padding: 8px 10px !important;
}

.test-hero-picker-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 6px;
}

.test-hero-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #161513;
  border: 1px solid #2e2b27;
  border-radius: 5px;
  color: #efe9de;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  min-width: 0;
}

.test-hero-btn:hover {
  border-color: #e5a93c;
  background: #1c1a18;
}

.test-hero-btn.is-active {
  border-color: #e5a93c;
  background: #1c1a18;
  color: #ffffff;
  box-shadow: inset 0 0 8px rgba(239, 233, 222, 0.10);
}

.test-hero-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.test-hero-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ═══ ДИНАМИЧЕСКАЯ СФЕРА АКТИВНОГО НАВЫКА ПОД ЦВЕТ ПЕРСОНАЖА + ЧЁТКАЯ ИКОНКА ═══ */
.action-btn.skill-orb-btn {
  --orb-hi: #8a847a;
  --orb-mid: #19a8cf;
  --orb-deep: #12110f;
  --orb-glow: rgba(239, 233, 222, 0.10);
  --orb-border: #8a847a;
  width: 74px;
  height: 74px;
  gap: 2px;
  padding: 4px 2px;
  border-color: var(--orb-border);
  background: radial-gradient(circle at 38% 28%, var(--orb-hi) 0%, var(--orb-mid) 48%, var(--orb-deep) 100%);
  box-shadow:
    0 0 0 2px #12110f,
    0 0 18px var(--orb-glow),
    inset 0 2px 6px rgba(255, 255, 255, 0.55);
}

.action-btn.skill-orb-btn:hover {
  border-color: #fff3c4;
  box-shadow: 0 0 0 2px #12110f, 0 0 24px var(--orb-glow);
  transform: none !important;
}

.action-btn.skill-orb-btn[data-hero='pioneer'] {
  --orb-hi: #8a847a;
  --orb-mid: #1aa7cf;
  --orb-deep: #12110f;
  --orb-glow: rgba(239, 233, 222, 0.10);
  --orb-border: #e5a93c;
}

.action-btn.skill-orb-btn[data-hero='pyro'] {
  --orb-hi: #ffc470;
  --orb-mid: #e6591e;
  --orb-deep: #4f120b;
  --orb-glow: rgba(255, 122, 51, 0.72);
  --orb-border: #ff8c42;
}

.action-btn.skill-orb-btn[data-hero='cryo'] {
  --orb-hi: #efe9de;
  --orb-mid: #3aa9e8;
  --orb-deep: #161513;
  --orb-glow: rgba(239, 233, 222, 0.10);
  --orb-border: #8a847a;
}

.action-btn.skill-orb-btn[data-hero='toxic'] {
  --orb-hi: #ccff8f;
  --orb-mid: #3cb82c;
  --orb-deep: #0e3814;
  --orb-glow: rgba(142, 255, 92, 0.68);
  --orb-border: #8eff5c;
}

.action-btn.skill-orb-btn[data-hero='xeno'] {
  --orb-hi: #efe9de;
  --orb-mid: #aaa398;
  --orb-deep: #262421;
  --orb-glow: rgba(213, 123, 255, 0.72);
  --orb-border: #efe9de;
}

.action-btn.skill-orb-btn[data-hero='overlord'] {
  --orb-hi: #fff3b0;
  --orb-mid: #e09c1e;
  --orb-deep: #4a2d08;
  --orb-glow: rgba(255, 209, 102, 0.78);
  --orb-border: #ffd166;
}

.action-btn.skill-orb-btn .orb-core {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #1c1a18 0%, #12110f 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.action-btn.skill-orb-btn .orb-skill-ico {
  width: 26px;
  height: 26px;
  object-fit: contain;
  image-rendering: pixelated;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}

.action-btn.skill-orb-btn .btn-label {
  font-size: 9.5px;
  font-weight: 800;
  text-shadow: 0 1px 2px #12110f, 0 0 4px #12110f;
  line-height: 1;
}

/* ═══ ПОШАГОВАЯ ПАНЕЛЬ ОБУЧЕНИЯ (ВИДНОЕ МЕСТО ПО ЦЕНТРУ СВЕРХУ, БЕЗ ПЕРЕКРЫТИЯ HUD) ═══ */
.tutorial-card {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  width: min(500px, calc(100vw - 380px));
  min-width: 310px;
  padding: 10px 14px;
  z-index: 26;
  background: rgba(18, 17, 15, 0.94);
  border-color: #e5a93c !important;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: auto;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 16px rgba(239, 233, 222, 0.10);
}

.tut-foot-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tut-next-btn {
  background: var(--bg-card);
  border: 1px solid #5ee092;
  color: #ffffff;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.tut-next-btn:hover {
  background: var(--bg-card);
}

.tut-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tut-step-badge {
  background: var(--bg-card);
  border: 1px solid #e5a93c;
  color: #efe9de;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.tut-title {
  flex: 1;
  font-size: 13px;
  font-weight: 800;
  color: #ffe28a;
  line-height: 1.2;
}

.tut-progress-track {
  width: 100%;
  height: 5px;
  background: #12110f;
  border: 1px solid #262421;
  border-radius: 3px;
  overflow: hidden;
}

.tut-progress-fill {
  height: 100%;
  width: 16%;
  background: linear-gradient(90deg, #4ad96d 0%, #e5a93c 100%);
  transition: width 0.25s ease;
}

.tut-desc {
  font-size: 12px;
  color: #efe9de;
  line-height: 1.42;
}

.tut-desc b {
  color: #8a847a;
}

.tut-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid #262421;
}

.tut-status {
  font-size: 11.5px;
  font-weight: 700;
  color: #8a847a;
}

.tut-skip-btn {
  background: transparent;
  border: 1px solid #2e2b27;
  color: #aaa398;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.tut-skip-btn:hover {
  border-color: #e5a93c;
  color: #ffffff;
}

/* ═══ СГРУППИРОВАННЫЙ ИНТЕРФЕЙС СТРОЙКИ ПО КАТЕГОРИЯМ ═══ */
.build-slots-grouped {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
}

.build-cat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.build-cat-btn {
  background: var(--bg-card);
  border: 1.5px solid #2e2b27;
  border-radius: 5px;
  color: #aaa398;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  cursor: pointer;
  white-space: nowrap;
}

.build-cat-btn:hover {
  border-color: #e5a93c;
  color: #ffffff;
}

.build-cat-btn.active {
  background: var(--bg-card);
  border-color: #e5a93c;
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(239, 233, 222, 0.10);
}

.build-cat-btn.demolish {
  border-color: #7d3a3a;
  color: #ffb2a8;
}

.build-cat-btn.demolish.active {
  background: linear-gradient(180deg, #7d2525 0%, #4d1414 100%);
  border-color: #ff6b6b;
  color: #ffffff;
}

.build-sub-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.build-sub-card {
  position: relative;
  min-width: 132px !important;
  padding: 7px 12px !important;
  flex-direction: row !important;
  align-items: center;
  gap: 9px !important;
}

.build-sub-card .build-thumb {
  width: 34px !important;
  height: 34px !important;
  object-fit: contain !important;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.build-sub-card .slot-name {
  font-size: 12.5px !important;
  font-weight: 700;
  white-space: nowrap;
}

.build-size-badge {
  position: absolute;
  bottom: 3px;
  right: 5px;
  font-size: 9.5px;
  font-weight: 800;
  color: #ffd166;
  background: rgba(18, 17, 15, 0.85);
  border: 1px solid #6b5320;
  border-radius: 3px;
  padding: 0 4px;
}

/* ═══ СТАРТОВАЯ ПАНЕЛЬ ВЫБОРА ГЕРОЯ БЕЗ СКРОЛЛА ═══ */
.modal-body.modal-no-scroll {
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

.hero-select-noscroll {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 12px;
  align-items: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.hero-select-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 0;
}

.hero-select-noscroll .hero-carousel-stage-row {
  flex: 1;
  min-height: 0;
  gap: 6px;
}

.hero-select-noscroll .hero-carousel-canvas-container {
  height: 100%;
  min-height: 290px;
  max-height: 360px;
}

.hero-select-noscroll .hero-carousel-dots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.hero-select-noscroll .hero-dot-btn {
  padding: 4px 5px;
  gap: 4px;
  justify-content: flex-start;
}

.hero-select-noscroll .dot-hero-mini {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.hero-select-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 0;
}

.hero-select-right .hero-details-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 14px 16px;
  gap: 12px;
  min-height: 0;
}

.hero-select-right .hero-details-hdr {
  padding-bottom: 10px;
  border-bottom: 1px solid #262421;
}

.hero-select-right .hero-det-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.hero-select-right .hero-det-role {
  font-size: 14px;
  margin-left: 8px;
}

.hero-select-right .hero-det-price {
  font-size: 12.5px;
  padding: 5px 12px;
}

.hero-select-right .hero-details-specs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.hero-select-right .hero-spec-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px;
  gap: 6px;
}

.hero-select-right .spec-label {
  font-size: 12.5px;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.hero-select-right .spec-cd-pill {
  font-size: 11px;
  padding: 2px 7px;
}

.hero-select-right .spec-val {
  font-size: 14.5px;
  line-height: 1.45;
  font-weight: 600;
}

.spec-val-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spec-el-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

.hero-run-note {
  padding: 8px 12px;
  border-radius: 5px;
  background: rgba(22, 21, 19, 0.72);
  border: 1px solid #262421;
  color: #aaa398;
  font-size: 12.5px;
  line-height: 1.35;
  text-align: center;
}

.hero-select-right .hero-main-action-btn {
  padding: 12px 18px;
  min-height: 44px;
  font-size: 14.5px;
}

/* ═══ КОЛОНКА ГЕРОЯ В РЕЙТИНГЕ ═══ */
.lb-hero-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.lb-hero-mini {
  width: 20px;
  height: 20px;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
}

/* ═══ ПЛОТНАЯ ГРУППИРОВКА КНОПОК И ЗАЩИТА ОТ РАСТЯГИВАНИЯ ИКОНОК ═══ */
.tile-icon img,
.inv-slot img,
.build-btn img,
.craft-icon img,
.cost-chip img,
.turret-el-btn img,
.machine-icon img,
.menu-hero-avatar img {
  object-fit: contain !important;
  image-rendering: pixelated;
  max-width: 100%;
  max-height: 100%;
}

.compact-grid-2,
.compact-grid-3 {
  align-items: stretch;
  gap: 8px;
}

.compact-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.ui-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.ui-tabs-row > .ui-tab-pill {
  flex: 1 1 auto;
  text-align: center;
  justify-content: center;
}

.turret-elements-grid,
.machine-actions-row,
.craft-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.turret-elements-grid > button,
.machine-actions-row > button,
.craft-actions-row > button {
  flex: 1 1 0;
  min-width: 110px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UNSLOP DESIGN SYSTEM (adapted from unslop by Damir Sokolovsky @heydamir, CC BY 4.0)
   Passes 1–9: 4px Grid, Warm Graphite Ramp, Hairlines, Sentence Case,
   Nested Radii, Tabular Mono Figures, Quiet Chrome, Single Easing Curve
   ═══════════════════════════════════════════════════════════════════════════ */

/* Pass 2 & 7: Quiet surfaces, 8% hairlines, nested radii, no brass rivets or colored glows */
.brass-frame::before,
.brass-frame::after,
.pixel-panel::before,
.pixel-panel::after,
.hd-panel::before,
.hd-panel::after {
  display: none !important;
  content: none !important;
}

.pixel-panel,
.hd-panel,
#top-hud-bar,
#top-actions,
#action-buttons,
#build-toolbar,
#main-menu-card,
#modal-window {
  background: var(--bg-page) !important;
  border: 1px solid var(--hairline) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Полупрозрачный интерфейс подсказок, обучения, контекстных действий и журнала миров с чёткой рамкой */
#tutorial-card,
#onboarding-banner,
#context-prompt,
.world-log-glass {
  background: rgba(18, 17, 15, 0.50) !important;
  border: 1.5px solid rgba(245, 176, 65, 0.62) !important;
  box-shadow:
    0 0 0 1px rgba(8, 7, 6, 0.85),
    inset 0 1px 0 rgba(255, 242, 210, 0.20),
    0 8px 24px rgba(0, 0, 0, 0.36) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
}

/* Pass 7: Nested Radius Math (Panels 16px, Cards 12px, Controls/Buttons 8px, Keycaps 4px) */
#modal-window,
#main-menu-card,
#build-toolbar,
#tutorial-card {
  border-radius: 16px !important;
}

#top-hud-bar,
#top-actions,
#action-buttons,
.world-log-glass,
#context-prompt,
#onboarding-banner,
.inv-hud-btn {
  border-radius: 12px !important;
}

.compact-tile,
.card-row,
.compact-hdr-bar,
.modal-inspector,
.monument-hero-card,
.monument-stage-block,
.monument-res-item,
.menu-hero-card,
.hero-select-left,
.hero-select-right,
.hero-ability-card,
.hero-details-card,
.hero-spec-box,
.hero-carousel-canvas-container,
.map-island-inspector,
.world-map-wrap,
.inv-grid,
.inv-right,
.inv-preview-box,
.lb-callsign-bar,
.world-log-item,
.toast {
  background: var(--bg-card) !important;
  border: 1.5px solid rgba(235, 218, 188, 0.30) !important;
  border-radius: 12px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 2px 6px rgba(0, 0, 0, 0.42) !important;
}

#modal-body {
  background: var(--bg-page) !important;
}

.inv-slot,
.tile-icon,
.sell-tile-top,
.card-thumb,
.menu-hero-avatar,
.world-map-canvas,
.lb-callsign-input,
.hud-world-chip,
.hud-chip {
  background: var(--bg-deep) !important;
  border: 1.5px solid rgba(235, 215, 175, 0.34) !important;
  border-radius: 8px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  color: var(--text-primary) !important;
}

.inv-slot:not(.empty):hover,
.test-hero-btn:hover {
  background: var(--bg-raised) !important;
  border-color: var(--hairline-strong) !important;
}

.inv-slot.selected,
.test-hero-btn.is-active,
.ui-filter-pill.active,
.inv-cat-pill.active {
  background: var(--bg-raised) !important;
  border-color: var(--accent) !important;
  color: var(--text-primary) !important;
}

.ui-filter-pill,
.inv-cat-pill,
.test-hero-btn,
.monument-stage-tab {
  background: var(--bg-card) !important;
  border: 1px solid var(--hairline) !important;
  border-radius: 8px !important;
  color: var(--text-secondary) !important;
}

.lb-table th {
  background: var(--bg-deep) !important;
  color: var(--text-muted) !important;
  border-bottom: 1px solid var(--hairline) !important;
}

.lb-table td {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--hairline) !important;
}

.lb-row.is-me td {
  background: var(--bg-raised) !important;
}

.compact-tile.is-active,
.compact-tile.is-installed,
.card-row.is-equipped,
.monument-stage-block.active-stage {
  background: var(--bg-raised) !important;
  border-color: var(--hairline-strong) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

/* Pass 5: Typography — Inter 400/500/600, Sentence Case, Zero Shouty Tracking */
h1, h2, h3, h4,
#modal-title,
.menu-title,
.menu-subtitle,
.tut-title,
.tut-step-badge,
.tile-title,
.card-title,
.btn-label,
.hud-planet-tag,
.world-log-header,
.ui-tab-pill,
.build-cat-btn,
.action-commit-btn,
.btn-primary,
.btn-secondary,
.prompt-buy-btn {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-style: normal !important;
  text-shadow: none !important;
}

#modal-title,
.menu-title {
  font-weight: 500 !important;
  color: var(--text-primary) !important;
}

.tile-title,
.card-title,
.tut-title,
.btn-label {
  font-weight: 500 !important;
  color: var(--text-primary) !important;
}

.tile-desc-short,
.card-desc,
.tut-desc,
.menu-subtitle,
.inspector-text {
  font-weight: 400 !important;
  color: var(--text-secondary) !important;
  line-height: 1.45 !important;
}

/* Tabular Mono for Figures, Timers, Counts, and Keycaps (Signature detail) */
#coins-counter span,
#hp-counter span,
#wave-label,
#speedrun-timer-label,
#monument-live-time,
.inv-key-tag,
.btn-key,
.tile-lvl-badge,
.build-limit-badge,
.build-size-badge,
.sell-qty-badge,
.sell-tile-unit,
.cost-chip,
.tut-step-badge,
.tut-status,
.log-time {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace !important;
  font-variant-numeric: tabular-nums !important;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

/* Keycaps (Signature detail: 4px radius, raised surface, warm gold accent text) */
.inv-key-tag,
.btn-key {
  background: var(--bg-raised) !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 4px !important;
  color: #fcd34d !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  padding: 1px 5px !important;
  font-size: 11px !important;
}

/* Pass 3: Semantic & Category Color Accents on Main HUD and Menus */
.hud-world-chip {
  border-color: rgba(56, 189, 248, 0.42) !important;
}
.hud-world-chip .hud-ico {
  color: #38bdf8 !important;
}
#planet-title {
  color: #fde68a !important;
}

#coins-counter {
  border-color: rgba(251, 191, 36, 0.42) !important;
}
#coins-counter .hud-ico {
  color: #fbbf24 !important;
}
#coins-counter span {
  color: #fde68a !important;
}

#hp-counter {
  border-color: rgba(251, 113, 133, 0.42) !important;
}
#hp-counter .hud-ico {
  color: #fb7185 !important;
}

#wave-counter {
  border-color: rgba(245, 158, 11, 0.38) !important;
}
#wave-counter .hud-ico {
  color: #fbbf24 !important;
}

#speedrun-timer {
  border-color: rgba(52, 211, 153, 0.38) !important;
}
#speedrun-timer .hud-ico {
  color: #34d399 !important;
}
#speedrun-timer-label {
  color: #a7f3d0 !important;
}

#btn-inventory {
  border-color: rgba(245, 158, 11, 0.48) !important;
}
#btn-inventory .hud-ico {
  color: #fbbf24 !important;
}

#btn-monument {
  border-color: rgba(192, 132, 252, 0.55) !important;
}
#btn-monument .hud-ico {
  color: #c084fc !important;
}
#monument-hud-label {
  color: #e9d5ff !important;
}

#btn-repair-all {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(52, 211, 153, 0.65) !important;
  color: #d1fae5 !important;
}
#btn-repair-all .hud-ico {
  color: #34d399 !important;
}

/* Top-Right Utility Buttons — distinct functional accents */
#btn-menu svg { color: #fbbf24 !important; }
#btn-autoplay svg { color: #34d399 !important; }
#btn-autoplay.active {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.35) !important;
}
#btn-test svg { color: #38bdf8 !important; }
#btn-zoom-in svg, #btn-zoom-out svg { color: #fde68a !important; }
#btn-music svg { color: #c084fc !important; }
#btn-sound svg { color: #38bdf8 !important; }
#btn-save svg { color: #60a5fa !important; }

/* Bottom Dock Action Buttons — distinct color accents per section */
#btn-build {
  border-color: rgba(52, 211, 153, 0.38) !important;
}
#btn-build .btn-icon svg {
  color: #34d399 !important;
}
#btn-build.active-mode {
  background: rgba(16, 185, 129, 0.22) !important;
  border-color: #34d399 !important;
  box-shadow: 0 0 14px rgba(52, 211, 153, 0.32) !important;
}

#btn-craft {
  border-color: rgba(251, 191, 36, 0.38) !important;
}
#btn-craft .btn-icon svg {
  color: #fbbf24 !important;
}

#btn-upgrades {
  border-color: rgba(56, 189, 248, 0.38) !important;
}
#btn-upgrades .btn-icon svg {
  color: #38bdf8 !important;
}

#btn-map {
  border-color: rgba(192, 132, 252, 0.38) !important;
}
#btn-map .btn-icon svg {
  color: #c084fc !important;
}

#modal-emblem svg,
.menu-logo-svg {
  color: #fbbf24 !important;
}

/* Pass 2 & 7: Buttons & Controls — 8px radius, vibrant semantic accents */
button,
.action-commit-btn,
.btn-primary,
.btn-secondary,
.secondary-action-btn,
.prompt-buy-btn,
.ui-tab-pill,
.build-cat-btn,
.build-slot-btn,
.icon-btn,
.action-btn,
.inv-hud-btn,
.menu-opt-btn,
.tut-skip-btn,
.tut-next-btn {
  border-radius: 8px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  text-shadow: none !important;
  transition:
    background-color 140ms var(--ease-unslop),
    border-color 140ms var(--ease-unslop),
    color 140ms var(--ease-unslop),
    opacity 140ms var(--ease-unslop),
    transform 140ms var(--ease-unslop) !important;
}

/* Commit / Upgrade / Craft Buttons inside modals: Vibrant Emerald-Teal */
.action-commit-btn:not(:disabled):not(.danger) {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border: 1px solid #6ee7b7 !important;
  font-weight: 600 !important;
}

.action-commit-btn:not(:disabled):not(.danger):hover {
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%) !important;
  border-color: #a7f3d0 !important;
}

/* Primary CTA Buttons (Play, Confirm Hero, Prompt Buy): Warm Amber-Gold */
.btn-primary:not(:disabled),
.prompt-buy-btn:not(:disabled),
.hero-confirm-btn:not(:disabled) {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%) !important;
  color: #12110f !important;
  border: 1px solid #fde68a !important;
  font-weight: 600 !important;
}

.btn-primary:not(:disabled):hover,
.prompt-buy-btn:not(:disabled):hover,
.hero-confirm-btn:not(:disabled):hover {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%) !important;
  border-color: #fef3c7 !important;
}

/* Danger / Semantic Negative Buttons */
.action-commit-btn.danger:not(:disabled),
.build-cat-btn.demolish.active {
  background: rgba(229, 72, 77, 0.22) !important;
  color: #fecdd3 !important;
  border: 1px solid #fb7185 !important;
}

/* Disabled Buttons */
.action-commit-btn:disabled,
.btn-primary:disabled,
.prompt-buy-btn:disabled,
button:disabled {
  background: var(--bg-deep) !important;
  color: var(--text-muted) !important;
  border: 1px solid var(--hairline) !important;
  box-shadow: none !important;
  opacity: 0.55 !important;
}

/* Secondary & Navigation Buttons / Tabs */
.btn-secondary,
.secondary-action-btn,
.ui-tab-pill,
.build-cat-btn,
.build-slot-btn,
.icon-btn,
.action-btn:not(.skill-orb-btn),
.inv-hud-btn,
.menu-opt-btn,
.tut-skip-btn {
  background: var(--bg-card) !important;
  color: var(--text-secondary) !important;
  border: 1.5px solid rgba(235, 218, 188, 0.34) !important;
  font-weight: 500 !important;
}

.btn-secondary:hover,
.secondary-action-btn:hover,
.ui-tab-pill:hover,
.build-cat-btn:hover,
.build-slot-btn:hover,
.icon-btn:hover,
.action-btn:not(.skill-orb-btn):hover,
.inv-hud-btn:hover,
.menu-opt-btn:hover,
.tut-skip-btn:hover {
  background: var(--bg-raised) !important;
  color: var(--text-primary) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
}

/* Active tabs & selected cards: Warm Amber-Gold highlight */
.ui-tab-pill.active,
.build-cat-btn.active,
.build-slot-btn.active,
.monument-stage-tab.selected {
  background: rgba(245, 158, 11, 0.18) !important;
  color: #fef3c7 !important;
  border-color: #f59e0b !important;
  box-shadow: inset 0 1px 0 rgba(254, 243, 199, 0.22), 0 0 10px rgba(245, 158, 11, 0.2) !important;
}

.compact-tile.is-active,
.compact-tile.is-equipped,
.card-row.is-equipped,
.monument-stage-block.active-stage {
  background: var(--bg-raised) !important;
  border-color: #f59e0b !important;
  box-shadow: inset 0 1px 0 rgba(254, 243, 199, 0.15) !important;
}

.compact-tile.is-installed {
  background: var(--bg-raised) !important;
  border-color: #34d399 !important;
}

/* Item & Building Icon Boxes: subtle warm frame so sprites pop */
.tile-icon,
.sell-tile-top,
.card-thumb {
  background: radial-gradient(circle at 50% 45%, #262421 0%, #12110f 100%) !important;
  border: 1px solid rgba(245, 158, 11, 0.38) !important;
}

/* Vibrant Elemental Active Skill Orb in Bottom Dock (Per-Hero Color Identity) */
.action-btn.skill-orb-btn {
  --orb-hi: #72f7ff;
  --orb-mid: #1aa7cf;
  --orb-deep: #0b2e47;
  --orb-glow: rgba(99, 245, 255, 0.55);
  --orb-border: #38bdf8;
  border-radius: 50% !important;
  border: 2px solid var(--orb-border) !important;
  background: radial-gradient(circle at 38% 28%, var(--orb-hi) 0%, var(--orb-mid) 48%, var(--orb-deep) 100%) !important;
  box-shadow:
    0 0 0 2px #12110f,
    0 0 18px var(--orb-glow),
    inset 0 2px 6px rgba(255, 255, 255, 0.45) !important;
}

.action-btn.skill-orb-btn[data-hero='pioneer'] {
  --orb-hi: #72f7ff;
  --orb-mid: #1aa7cf;
  --orb-deep: #0b2e47;
  --orb-glow: rgba(56, 189, 248, 0.58);
  --orb-border: #38bdf8;
}

.action-btn.skill-orb-btn[data-hero='pyro'] {
  --orb-hi: #ffc470;
  --orb-mid: #e6591e;
  --orb-deep: #4f120b;
  --orb-glow: rgba(255, 122, 51, 0.65);
  --orb-border: #ff8c42;
}

.action-btn.skill-orb-btn[data-hero='cryo'] {
  --orb-hi: #d6f8ff;
  --orb-mid: #2898dc;
  --orb-deep: #0c2b4a;
  --orb-glow: rgba(124, 232, 255, 0.62);
  --orb-border: #7ce8ff;
}

.action-btn.skill-orb-btn[data-hero='toxic'] {
  --orb-hi: #ccff8f;
  --orb-mid: #3cb82c;
  --orb-deep: #0e3814;
  --orb-glow: rgba(142, 255, 92, 0.62);
  --orb-border: #8eff5c;
}

.action-btn.skill-orb-btn[data-hero='xeno'] {
  --orb-hi: #f0b8ff;
  --orb-mid: #9638df;
  --orb-deep: #2a0d47;
  --orb-glow: rgba(213, 123, 255, 0.65);
  --orb-border: #d57bff;
}

.action-btn.skill-orb-btn[data-hero='overlord'] {
  --orb-hi: #fff3b0;
  --orb-mid: #e09c1e;
  --orb-deep: #4a2d08;
  --orb-glow: rgba(255, 209, 102, 0.68);
  --orb-border: #ffd166;
}

.action-btn.skill-orb-btn .orb-core {
  background: radial-gradient(circle at 50% 45%, #232838 0%, #0e111a 100%) !important;
  border: 1.5px solid var(--orb-border) !important;
  box-shadow: 0 0 8px var(--orb-glow), inset 0 1px 4px rgba(0, 0, 0, 0.8) !important;
}

.action-btn.skill-orb-btn .btn-label {
  color: #ffffff !important;
  text-shadow: 0 1px 3px #000000 !important;
}

/* Cost chips & meta badges with clear semantic color accents */
.cost-chip,
.biome-badge,
.perk-tag {
  background: var(--bg-deep) !important;
  border: 1px solid var(--hairline-strong) !important;
  border-radius: 5px !important;
  color: var(--text-primary) !important;
  box-shadow: none !important;
}

.tile-lvl-badge {
  background: rgba(245, 158, 11, 0.14) !important;
  border: 1px solid rgba(245, 158, 11, 0.42) !important;
  border-radius: 5px !important;
  color: #fde68a !important;
}

.tut-step-badge {
  background: rgba(245, 158, 11, 0.2) !important;
  border: 1px solid #f59e0b !important;
  border-radius: 5px !important;
  color: #fef3c7 !important;
}

.tut-status {
  color: #34d399 !important;
}

#tutorial-card {
  border-color: rgba(245, 158, 11, 0.55) !important;
}

.cost-chip.ok,
.biome-badge.visited {
  color: #6ee7b7 !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  background: rgba(16, 185, 129, 0.12) !important;
}

.cost-chip.lack {
  color: #fda4af !important;
  border-color: rgba(244, 63, 94, 0.45) !important;
  background: rgba(244, 63, 94, 0.12) !important;
}

/* Level Pips inside cards */
.pip.filled {
  background: #fbbf24 !important;
  border-color: #fde68a !important;
}
.pip.filled.cyan {
  background: #38bdf8 !important;
  border-color: #bae6fd !important;
}

/* Modal header & progress bars */
#modal-header {
  background: var(--bg-deep) !important;
  border-bottom: 1px solid rgba(245, 158, 11, 0.35) !important;
  padding: 12px 16px !important;
}

#modal-title {
  color: #fde68a !important;
}

#wave-progress-track,
.tut-progress-track,
.monument-progress-bar {
  background: var(--bg-deep) !important;
  border: 1px solid var(--hairline-strong) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
}

.tut-progress-fill,
.monument-progress-fill {
  background: linear-gradient(90deg, #10b981 0%, #f59e0b 100%) !important;
  box-shadow: none !important;
}

/* Pass 9: Remove looping pulse animations */
.log-dot,
.skill-orb-btn,
.monument-hud-btn,
.quest-claim-btn {
  animation: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ГЛАВНОЕ МЕНЮ (#main-menu-card) — ЯРКИЕ ЦВЕТОВЫЕ АКЦЕНТЫ КНОПОК И КАРТОЧКИ ГЕРОЯ
   ═══════════════════════════════════════════════════════════════════════════ */
#main-menu-card {
  border-color: rgba(245, 158, 11, 0.45) !important;
  box-shadow:
    inset 0 1px 0 rgba(254, 243, 199, 0.14),
    0 18px 48px rgba(0, 0, 0, 0.72),
    0 0 32px rgba(245, 158, 11, 0.12) !important;
}

.menu-title {
  color: #fde68a !important;
}

#menu-hero-preview.menu-hero-card {
  background: radial-gradient(circle at 18% 30%, rgba(245, 158, 11, 0.14) 0%, rgba(28, 26, 24, 0.96) 70%) !important;
  border: 1px solid rgba(245, 158, 11, 0.42) !important;
}

#menu-hero-name {
  color: #fef3c7 !important;
  font-weight: 600 !important;
}

#menu-hero-role {
  color: #fcd34d !important;
}

#menu-hero-turret.perk-tag.turret {
  background: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(251, 191, 36, 0.45) !important;
  color: #fde68a !important;
}

#menu-hero-bonus.perk-tag.bonus {
  background: rgba(16, 185, 129, 0.14) !important;
  border: 1px solid rgba(52, 211, 153, 0.45) !important;
  color: #a7f3d0 !important;
}

/* 1–3. Спокойные графитовые кнопки меню: Персонажи, Пасс и Таблица времени */
#btn-menu-characters,
#btn-menu-no-ads,
#btn-menu-leaderboard {
  background: var(--bg-card) !important;
  border: 1.5px solid var(--hairline) !important;
  color: var(--text-primary) !important;
}
#btn-menu-characters .menu-btn-icon,
#btn-menu-no-ads .menu-btn-icon,
#btn-menu-leaderboard .menu-btn-icon {
  color: var(--text-secondary) !important;
}
#btn-menu-characters:hover,
#btn-menu-no-ads:hover,
#btn-menu-leaderboard:hover {
  background: var(--bg-raised) !important;
  border-color: rgba(235, 218, 188, 0.48) !important;
  color: #ffffff !important;
}
#btn-menu-no-ads.active {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(52, 211, 153, 0.55) !important;
  color: #d1fae5 !important;
}
#btn-menu-no-ads.active .menu-btn-icon {
  color: #34d399 !important;
}

/* 4. Кнопка «Начать экспедицию заново» — сдержанный рубиново-красный акцент */
#btn-menu-restart {
  background: linear-gradient(180deg, rgba(225, 29, 72, 0.36) 0%, rgba(127, 29, 29, 0.55) 100%) !important;
  border: 1px solid rgba(251, 113, 133, 0.72) !important;
  color: #ffe4e6 !important;
}
#btn-menu-restart .menu-btn-icon {
  color: #fb7185 !important;
}
#btn-menu-restart:hover,
#btn-menu-restart.is-armed {
  background: linear-gradient(180deg, rgba(225, 29, 72, 0.58) 0%, rgba(153, 27, 27, 0.78) 100%) !important;
  border-color: #fda4af !important;
  color: #ffffff !important;
}

/* Нижние кнопки звука, музыки и возврата в игру */
#btn-menu-sound.is-on,
#btn-menu-music.is-on {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
  color: #a7f3d0 !important;
}

#btn-menu-close {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: rgba(251, 191, 36, 0.55) !important;
  color: #fde68a !important;
}
#btn-menu-close:hover {
  background: rgba(245, 158, 11, 0.28) !important;
  border-color: #fbbf24 !important;
  color: #ffffff !important;
}

/* ============================================================================
   Сдержанный кастомный курсор в стиле «Фабрики миров» (Warm Graphite + Ivory)
   ============================================================================ */
:root {
  --cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 3L17.5 11.2L11.4 12.9L8.8 18.8L4 3Z' fill='%23efe9de' stroke='%2312110f' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M7.2 7.2L13 11.1L9.9 12L7.2 7.2Z' fill='%23aaa398' fill-opacity='0.45'/%3E%3C/svg%3E") 3 2, default;
  --cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 3L17.5 11.2L11.4 12.9L8.8 18.8L4 3Z' fill='%23f7f2e8' stroke='%2312110f' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='9.5' cy='11.2' r='1.4' fill='%23d9a54c'/%3E%3C/svg%3E") 3 2, pointer;
  --cursor-aim: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cg stroke='%2312110f' stroke-width='3' stroke-linecap='round' opacity='0.75'%3E%3Cline x1='12' y1='4' x2='12' y2='8'/%3E%3Cline x1='12' y1='16' x2='12' y2='20'/%3E%3Cline x1='4' y1='12' x2='8' y2='12'/%3E%3Cline x1='16' y1='12' x2='20' y2='12'/%3E%3C/g%3E%3Cg stroke='%23efe9de' stroke-width='1.4' stroke-linecap='round' opacity='0.9'%3E%3Cline x1='12' y1='4' x2='12' y2='8'/%3E%3Cline x1='12' y1='16' x2='12' y2='20'/%3E%3Cline x1='4' y1='12' x2='8' y2='12'/%3E%3Cline x1='16' y1='12' x2='20' y2='12'/%3E%3C/g%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23efe9de' stroke='%2312110f' stroke-width='0.9'/%3E%3C/svg%3E") 12 12, crosshair;
}

html,
body,
#game-root {
  cursor: var(--cursor-default);
}

#game-canvas,
#overlay-canvas {
  cursor: var(--cursor-aim);
}

button,
a,
[role="button"],
.hud-btn,
.icon-btn,
.dock-btn,
.build-card,
.craft-row,
.upgrade-card,
.planet-card,
.hero-card,
.menu-btn-row,
.close-btn,
.tab-btn,
.action-commit-btn,
.log-mini-btn {
  cursor: var(--cursor-pointer);
}

button:disabled,
.disabled {
  cursor: not-allowed;
}

.bot-cursor-focus {
  outline: 2px solid #e5a93c !important;
  outline-offset: 2px;
  box-shadow: 0 0 14px rgba(229, 169, 60, 0.35) !important;
}

.respawn-countdown {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(18, 17, 15, 0.14) 0%, rgba(18, 17, 15, 0.62) 100%);
  pointer-events: none;
}

.respawn-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 34px;
  border-radius: 12px;
  background: rgba(18, 17, 15, 0.84);
  border: 1px solid rgba(229, 72, 77, 0.58);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.6);
  color: #efe9de;
  font-family: var(--font-ui, Inter, sans-serif);
  backdrop-filter: blur(6px);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.respawn-title {
  font-size: 18px;
  font-weight: 700;
  color: #fda4af;
  letter-spacing: 0.4px;
}

.respawn-sub {
  font-size: 12.5px;
  color: #aaa398;
}

.respawn-countdown .respawn-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(229, 72, 77, 0.20);
  border: 1px solid rgba(251, 113, 133, 0.75);
  color: #ffe4e6;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 24px;
  font-weight: 700;
}

.respawn-instant-btn {
  pointer-events: auto;
  margin-top: 4px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(229, 169, 60, 0.92) 0%, rgba(196, 134, 34, 0.96) 100%);
  border: 1px solid rgba(251, 191, 36, 0.85);
  color: #161513;
  font-size: 12.5px;
  font-weight: 600;
  cursor: var(--cursor-pointer, pointer);
}

.respawn-instant-btn:hover {
  filter: brightness(1.08);
}

.bot-virtual-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  margin-left: -3px;
  margin-top: -2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M4 3L17.5 11.2L11.4 12.9L8.8 18.8L4 3Z' fill='%23f7f2e8' stroke='%2312110f' stroke-width='1.5' stroke-linejoin='round'/%3E%3Ccircle cx='9.5' cy='11.2' r='1.4' fill='%23d9a54c'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 10050;
  will-change: transform;
  transition: filter 0.08s ease;
}

.bot-virtual-cursor.is-clicking {
  filter: drop-shadow(0 0 6px rgba(229, 169, 60, 0.75)) brightness(1.1);
}

.bot-virtual-cursor.hidden {
  display: none !important;
}

#modal-window.is-menu-sized {
  width: min(92vw, 480px);
  max-width: 480px;
}

.shop-menu-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-row-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--r-md, 10px);
  background: var(--bg-card, #1c1a18);
  border: 1px solid var(--hairline, rgba(239, 233, 222, 0.12));
  color: var(--text-primary, #efe9de);
  text-align: left;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.shop-row-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.shop-row-btn:disabled {
  opacity: 0.72;
  cursor: default;
}

.shop-row-btn.shop-gold {
  background: rgba(229, 169, 60, 0.10);
  border-color: rgba(229, 169, 60, 0.36);
  box-shadow: inset 0 0 18px rgba(229, 169, 60, 0.06);
}

.shop-row-btn.shop-gold:hover:not(:disabled) {
  background: rgba(229, 169, 60, 0.17);
  border-color: rgba(229, 169, 60, 0.62);
}

.shop-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.shop-row-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  color: #e5a93c;
}

.shop-row-ico img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  image-rendering: pixelated;
}

.shop-row-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.shop-row-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary, #efe9de);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-row-sub {
  font-size: 11.5px;
  color: var(--text-secondary, #aaa398);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-row-price {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(18, 17, 15, 0.55);
  border: 1px solid rgba(239, 233, 222, 0.14);
  color: #efe9de;
  flex-shrink: 0;
}

.shop-gold .shop-row-price {
  border-color: rgba(229, 169, 60, 0.45);
  color: #f3c86d;
}

.respawn-countdown .respawn-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(229, 72, 77, 0.22);
  border: 1px solid rgba(251, 113, 133, 0.75);
  color: #ffe4e6;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 15px;
  font-weight: 600;
}


