:root {
  --bg: #06090d;
  --bg-elevated: #0c1218;
  --glass: rgba(255, 255, 255, 0.06);
  --glass-strong: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.25);
  --text: #e9eef5;
  --muted: #8a9bb0;
  --danger: #f87171;
  --radius: 18px;
  --blur: 22px;
  font-family: "DM Sans", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -10%, rgba(45, 212, 191, 0.08), transparent),
    radial-gradient(900px 600px at 100% 0%, rgba(56, 189, 248, 0.06), transparent), var(--bg);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 1.35rem;
}

.brand span {
  opacity: 0.85;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin-bottom: 1.5rem;
  padding: 0.75rem 0;
  backdrop-filter: blur(var(--blur));
  background: linear-gradient(to bottom, rgba(6, 9, 13, 0.92), rgba(6, 9, 13, 0.65));
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid var(--border);
  background: var(--glass);
  color: var(--text);
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(var(--blur));
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;
}

.btn:hover {
  border-color: rgba(45, 212, 191, 0.45);
  background: var(--glass-strong);
}

.btn:active {
  transform: translateY(1px);
}

.btn-lg {
  padding: 0.85rem 1.35rem;
  font-size: 1.08rem;
}

.btn-accent {
  border-color: rgba(45, 212, 191, 0.45);
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.2), rgba(56, 189, 248, 0.12));
}

.btn-ghost {
  background: transparent;
}

.panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(var(--blur));
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.panel h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.kv {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.kv:last-child {
  border-bottom: none;
}

.kv dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.kv dd {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
}

.map-frame {
  width: 100%;
  height: min(72vh, 720px);
  border: 0;
  border-radius: calc(var(--radius) - 4px);
  background: #000;
}

.copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.connect-mod-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

.connect-mod-meta {
  font-size: 0.92rem;
  line-height: 1.45;
}

  /* font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.05rem;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
} */

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-on {
  background: rgba(45, 212, 191, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.35);
  color: #b6fff2;
}

.badge-off {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--muted);
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.login-card {
  width: min(420px, 100%);
}

.alert {
  margin-top: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  font-size: 0.95rem;
}

.input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 1.05rem;
  outline: none;
}

.input:focus {
  border-color: rgba(45, 212, 191, 0.55);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ——— App shell: sidebar (desktop) + bottom nav (mobile) ——— */

.app-root {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

.sidebar {
  display: none;
  flex-direction: column;
  width: 260px;
  flex-shrink: 0;
  padding: 1rem 0.85rem;
  border-right: 1px solid var(--border);
  background: rgba(8, 12, 18, 0.85);
  backdrop-filter: blur(var(--blur));
  position: sticky;
  top: 0;
  align-self: stretch;
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 0.5rem 0.65rem 1rem;
  color: var(--text);
  text-decoration: none;
}

.sidebar-brand:hover {
  text-decoration: none;
  color: var(--accent);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.sidebar-logout {
  margin-top: auto;
  padding-top: 1rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: 1px solid transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  background: var(--glass);
  text-decoration: none;
}

.nav-link--active {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.12);
}

.app-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

.mobile-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 9, 13, 0.88);
  backdrop-filter: blur(var(--blur));
  position: sticky;
  top: 0;
  z-index: 30;
}

.mobile-brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  text-decoration: none;
}

.mobile-brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.mobile-logout {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.mobile-logout:hover {
  color: var(--accent);
}

.app-content {
  flex: 1;
  padding: 1rem 1rem 1.25rem;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}

.app-content--flush {
  padding: 0;
  max-width: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.map-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.map-frame--fill {
  flex: 1;
  width: 100%;
  min-height: 280px;
  height: auto;
  border-radius: 0;
}

.bottom-nav {
  display: flex;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  transform: translateZ(0);
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: rgba(6, 9, 13, 0.92);
  backdrop-filter: blur(var(--blur));
  justify-content: space-around;
  align-items: stretch;
  gap: 0.25rem;
}

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.4rem 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border-radius: 12px;
  min-width: 0;
}

.bn-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bn-item:hover {
  color: var(--text);
  text-decoration: none;
  background: var(--glass);
}

.bn-item--active {
  color: var(--accent);
  background: rgba(45, 212, 191, 0.1);
}

.page-title-row {
  margin-bottom: 1rem;
}

.page-title-row--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
}

.online-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.12);
  color: #b6fff2;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 -0.25rem;
}

.cell-muted {
  color: var(--muted);
  font-size: 0.98rem;
}

@media (min-width: 769px) {
  .sidebar {
    display: flex;
  }

  .mobile-topbar {
    display: none;
  }

  .bottom-nav {
    display: none;
  }

  .app-column {
    height: 100vh;
    height: 100dvh;
  }

  .app-content--flush {
    flex: 1;
    min-height: 0;
  }

  .map-page {
    height: 100%;
    min-height: 0;
  }

  .map-frame--fill {
    flex: 1;
    height: 100%;
    min-height: 0;
  }
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }

  .app-content:not(.app-content--flush) {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }

  .app-content--flush {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }

  .app-content--flush .map-frame--fill {
    min-height: 0;
    height: auto;
    flex: 1;
  }

  .table-players thead {
    display: none;
  }

  .table-players tbody tr {
    display: block;
    margin-bottom: 0.85rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.25);
  }

  .table-players td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .table-players td:last-child {
    border-bottom: none;
  }

  .table-players td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
  }
}

@media (max-width: 640px) {
  .nav-links .btn span.nav-text {
    display: none;
  }
}

/* ——— gBank + полноэкранные модалки ——— */

.bank-scene {
  max-width: 720px;
  margin: 0 auto;
}

.bank-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.bank-logo {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

.bank-title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.bank-tagline {
  margin: 0.2rem 0 0;
}

.bank-flash {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  font-size: 0.98rem;
  line-height: 1.4;
  border: 1px solid var(--border);
}

.bank-flash--ok {
  border-color: rgba(45, 212, 191, 0.45);
  background: rgba(45, 212, 191, 0.1);
  color: #c6fff2;
}

.bank-flash--err {
  border-color: rgba(248, 113, 113, 0.5);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

.bank-panel-main {
  background: linear-gradient(160deg, rgba(16, 24, 32, 0.85), rgba(6, 9, 13, 0.75));
  border-color: rgba(234, 179, 8, 0.18);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.bank-balance-block {
  text-align: center;
  margin-bottom: 1.5rem;
}

.bank-balance {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.4rem 0 0;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.bank-coin {
  font-size: 1.1em;
  line-height: 1;
}

.bank-balance-val {
  font-variant-numeric: tabular-nums;
}

.bank-rate {
  line-height: 1.45;
}

.bank-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .bank-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.btn-xl {
  padding: 1rem 1.2rem;
  font-size: 1.1rem;
  width: 100%;
  border-radius: 16px;
}

.btn-bank {
  border-color: rgba(234, 179, 8, 0.32);
  background: linear-gradient(160deg, rgba(234, 179, 8, 0.2), rgba(6, 9, 13, 0.3));
}

.btn-bank:hover {
  border-color: rgba(250, 204, 21, 0.55);
  background: linear-gradient(160deg, rgba(250, 204, 21, 0.24), rgba(6, 9, 13, 0.35));
}

.btn-bank-secondary {
  border-color: rgba(45, 212, 191, 0.3);
  background: linear-gradient(160deg, rgba(45, 212, 191, 0.12), rgba(6, 9, 13, 0.3));
}

.bank-footnote {
  margin: 1.15rem 0 0;
  line-height: 1.5;
  font-size: 0.9rem;
}

.input-bank {
  font-size: 1.2rem;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.modal-full {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
}

.modal-full.is-open {
  display: flex;
}

.modal-full__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.modal-full__inner {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(92dvh, 100%);
  overflow: auto;
}

.modal-full__panel {
  position: relative;
  margin: 0;
}

.modal-full__title {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.4rem 0.55rem;
  border-radius: 12px;
}

.modal-form {
  margin-top: 1rem;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.inline-spinner {
  display: inline-block;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: -0.15em;
}

.inline-spinner--lg {
  width: 1.75rem;
  height: 1.75rem;
  border-width: 3px;
  margin-right: 0.65rem;
}

.inline-spinner--inline {
  width: 0.95rem;
  height: 0.95rem;
  margin-right: 0.35rem;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.panel-loader {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 0.25rem;
  color: var(--muted);
}

.online-chip--loading {
  min-width: 8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bank-balance-val--loading {
  min-width: 5rem;
  display: inline-flex;
  align-items: center;
}

.bank-live-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.bank-op-loading {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.bank-op-loading.is-open {
  display: flex;
}

.bank-op-loading__panel {
  max-width: 360px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.75rem 1.5rem;
}

.bank-op-loading__text {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.bank-op-loading__hint {
  font-size: 0.88rem;
}

.bank-actions--three {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .bank-actions--three {
    grid-template-columns: repeat(3, 1fr);
  }
}

.btn-bank-transfer {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.14), rgba(6, 9, 13, 0.3));
}

.btn-bank-transfer:hover {
  border-color: rgba(125, 211, 252, 0.45);
}

.bank-ledger {
  margin-top: 1.25rem;
}

.bank-ledger__title {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ledger-table-wrap {
  overflow-x: auto;
  margin: 0 -0.25rem;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.ledger-table th,
.ledger-table td {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

.ledger-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-align: left;
}

.ledger-ts {
  white-space: nowrap;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  width: 1%;
}

.modal-full__panel--scroll {
  max-height: min(92dvh, 720px);
  display: flex;
  flex-direction: column;
}

.transfer-fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

.transfer-fieldset .label {
  margin-bottom: 0.45rem;
}

.transfer-pick {
  max-height: min(42vh, 300px);
  overflow-y: auto;
  padding: 0.35rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
}

.transfer-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
}

.transfer-option:hover {
  background: var(--glass);
}

.transfer-option input {
  flex-shrink: 0;
}

/* gMarket */
.market-scene {
  max-width: 1100px;
  margin: 0 auto;
}

.market-layout {
  display: grid;
  gap: 1.25rem;
  margin-top: 1rem;
  max-height: calc(100dvh - 5.75rem);
  min-height: 0;
}

.market-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
}

.market-toolbar {
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

.market-search-input {
  width: 100%;
}

.market-balance-bar {
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

.market-catalog-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.3rem;
  margin-top: 0.2rem;
}

@media (min-width: 900px) {
  .market-layout {
    grid-template-columns: 1fr minmax(260px, 300px);
    align-items: stretch;
  }
}

@media (max-width: 899px) {
  .market-main {
    max-height: min(58vh, 520px);
  }
}

.market-flash--hidden {
  display: none;
}

.market-section {
  margin-top: 1.25rem;
}

.market-cat-title {
  font-size: 1.05rem;
  margin: 0 0 0.65rem;
  font-weight: 650;
}

.market-price-hint {
  font-weight: 400;
  font-size: 0.88rem;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
}

.market-card {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.market-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.5rem;
}

.market-card-body {
  padding: 0.4rem 0.5rem 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.market-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
}

.market-card-controls {
  width: 100%;
  margin-top: 0.2rem;
}

.market-btn-add {
  width: 100%;
  padding: 0.45rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 650;
}

.market-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.2rem;
  width: 100%;
}

.market-step-btn {
  flex: 0 0 2.1rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.market-step-btn:hover:not(:disabled) {
  background: var(--glass);
}

.market-step-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.market-step-val {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.market-family-wrapper {
  margin-bottom: 0.5rem;
}

.market-family-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.market-family-header:hover {
  background: rgba(255, 255, 255, 0.08);
}

.market-family-icon {
  width: 1.8rem;
  height: 1.8rem;
  object-fit: contain;
  flex-shrink: 0;
}

.market-family-title {
  flex: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.market-family-toggle {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.2s;
  color: var(--muted);
}

.market-family-wrapper.is-open .market-family-toggle {
  transform: rotate(180deg);
}

.market-family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
  padding: 0.75rem 0.25rem;
}

.market-cart {
  position: sticky;
  top: 0.75rem;
}

.market-cart-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.market-cart-meta {
  font-size: 0.84rem;
  margin: 0 0 0.65rem;
}

.market-cart-lines {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  max-height: min(40vh, 280px);
  overflow-y: auto;
  font-size: 0.9rem;
}

.market-cart-line {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.market-cart-name {
  flex: 1;
  min-width: 0;
}

.market-cart-qty {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.market-cart-total {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 0.75rem;
}

.market-cart-note {
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0.75rem 0 0;
}

.market-checkout-btn {
  position: relative;
  width: 100%;
  min-height: 3.25rem;
}

.market-checkout-spinner-wrap {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.market-checkout-btn.is-busy .market-checkout-spinner-wrap {
  display: flex;
}

/* Вращение только на внутреннем круге — иначе transform анимации затирает translate центрирования. */
.market-checkout-spinner-el {
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  flex-shrink: 0;
}

.market-checkout-btn.is-busy .market-checkout-label {
  opacity: 0;
}


/* ===== gBank Mobile App Style (SMP, 2026) ===== */
.gbank-splash {
  position: fixed;
  inset: 0;
  background: #06090d;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: opacity 0.4s ease;
}
.gbank-splash--fadeout {
  opacity: 0;
  pointer-events: none;
}
.gbank-splash__card {
  text-align: center;
  background: rgba(12, 18, 24, 0.9);
  backdrop-filter: blur(20px);
  padding: 2rem 2rem;
  border-radius: 32px;
  border: 1px solid rgba(45, 212, 191, 0.3);
  animation: floatGlow 2s infinite alternate;
}
@keyframes floatGlow {
  0% { box-shadow: 0 0 5px rgba(45,212,191,0.2); transform: translateY(0px); }
  100% { box-shadow: 0 0 20px rgba(45,212,191,0.5); transform: translateY(-6px); }
}
.gbank-splash__logo {
  font-size: 4rem;
  filter: drop-shadow(0 0 12px #2dd4bf);
  margin-bottom: 1rem;
}
.gbank-splash__greeting {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e9eef5, #2dd4bf);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}
.gbank-splash__spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border: 3px solid rgba(45,212,191,0.3);
  border-top-color: #2dd4bf;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.gbank-splash__version {
  margin-top: 1rem;
  color: #8a9bb0;
  font-size: 0.8rem;
  letter-spacing: 1px;
}
.gbank-main {
  max-width: 540px;
  margin: 0 auto;
  padding: 0.8rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.gbank-main--appear {
  opacity: 1;
  transform: translateY(0);
}
.gbank-header {
  margin-bottom: 1rem;
}
.gbank-header__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.gbank-header__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.gbank-header__icon {
  font-size: 2rem;
}
.gbank-header__title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.gbank-header__sub {
  font-size: 0.7rem;
  color: #8a9bb0;
}
.gbank-header__badge {
  background: rgba(45,212,191,0.2);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.7rem;
  border: 0.5px solid #2dd4bf;
  color: #2dd4bf;
  font-weight: 600;
}
.gbank-header__greeting {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 0.3rem;
  background: linear-gradient(95deg, #fff, #8a9bb0);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.gbank-ad-banner {
  background: linear-gradient(135deg, rgba(45,212,191,0.15), rgba(56,189,248,0.1));
  border-radius: 20px;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  border: 1px solid rgba(45,212,191,0.3);
  backdrop-filter: blur(4px);
}
.gbank-ad-banner__text {
  font-weight: 500;
}
.gbank-ad-banner__tag {
  background: rgba(0,0,0,0.5);
  padding: 0.2rem 0.5rem;
  border-radius: 30px;
  font-size: 0.6rem;
  color: #aaa;
}
.gbank-balance-card {
  background: linear-gradient(145deg, rgba(12,18,24,0.95), rgba(6,9,13,0.9));
  border-radius: 32px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid rgba(250,204,21,0.25);
  margin-bottom: 1.2rem;
  backdrop-filter: blur(12px);
}
.gbank-balance-card__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8a9bb0;
}
.gbank-balance-card__value {
  font-size: 2.7rem;
  font-weight: 800;
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.gbank-balance-card__coin {
  font-size: 2rem;
}
.gbank-balance-card__rate {
  font-size: 0.7rem;
  background: rgba(0,0,0,0.5);
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
}
.gbank-presence {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  font-size: 0.75rem;
  color: #8a9bb0;
}
.gbank-presence__dot {
  width: 8px;
  height: 8px;
  background: #f87171;
  border-radius: 50%;
  display: inline-block;
  transition: background 0.2s;
}
.gbank-presence__dot--online {
  background: #2dd4bf;
  box-shadow: 0 0 5px #2dd4bf;
}
.gbank-actions-grid {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}
.gbank-action-btn {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  font: inherit;
  color: var(--text);
  background: rgba(20,28,36,0.8);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  padding: 0.8rem 0.2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}
.gbank-action-btn:active { transform: scale(0.96); }
.gbank-action-btn:hover:not(:disabled) {
  background: rgba(45,212,191,0.2);
  border-color: rgba(45, 212, 191, 0.25);
}
.gbank-action-btn__icon { font-size: 1.6rem; display: block; }
.gbank-action-btn__label { font-weight: 700; font-size: 0.85rem; margin-top: 4px; display: block; }
.gbank-action-btn__desc { font-size: 0.6rem; color: #8a9bb0; display: block; }
.gbank-action-btn--transfer { background: linear-gradient(145deg, rgba(56,189,248,0.2), rgba(45,212,191,0.1)); }
.gbank-info-card {
  background: rgba(0,0,0,0.3);
  border-radius: 20px;
  padding: 0.8rem 1rem;
  margin-bottom: 1.2rem;
  border-left: 3px solid #2dd4bf;
}
.gbank-info-card__header {
  font-weight: 700;
  font-size: 0.8rem;
  gap: 6px;
  display: flex;
  align-items: center;
  margin-bottom: 0.4rem;
}
.gbank-info-card__content {
  font-size: 0.7rem;
  color: #b0c4de;
  line-height: 1.4;
}
.gbank-history {
  background: rgba(12,18,24,0.6);
  border-radius: 24px;
  padding: 0.8rem;
}
.gbank-history__header {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.6rem;
}
.gbank-history__count {
  background: #2dd4bf20;
  padding: 0.1rem 0.5rem;
  border-radius: 20px;
  font-size: 0.7rem;
}
.gbank-history__list {
  max-height: min(40vh, 280px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin: 0 -0.15rem;
  padding: 0 0.15rem;
}
.gbank-history-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.gbank-history-item__time {
  font-size: 0.6rem;
  color: #8a9bb0;
}
.gbank-history-item__desc {
  font-size: 0.8rem;
  margin-top: 2px;
}
.gbank-history-empty {
  text-align: center;
  color: #8a9bb0;
  font-size: 0.8rem;
  padding: 1rem;
}
.gbank-footer-note {
  text-align: center;
  font-size: 0.6rem;
  color: #5a6e8a;
  margin-top: 1rem;
  padding-bottom: 1rem;
}
@media (max-width: 480px) {
  .gbank-balance-card__value { font-size: 2rem; }
  .gbank-action-btn__label { font-size: 0.7rem; }
}