:root {
  --bg: #0b1118;
  --panel: #17212b;
  --surface: #1e2a36;
  --accent: #0098ea;
  --accent-2: #2acfff;
  --red: #0098ea;
  --red-dim: #0a5c8a;
  --text: #e8f4fc;
  --muted: #7f91a4;
  --line: rgba(148, 180, 210, 0.12);
  --phone: 390px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(0, 152, 234, 0.18), transparent 55%),
    radial-gradient(700px 420px at 90% 80%, rgba(42, 171, 238, 0.08), transparent 50%),
    var(--bg);
}

.screen * {
  scrollbar-width: none;
}

.screen *::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.studio {
  display: grid;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 40px 32px;
}

.phone-bezel {
  width: var(--phone);
  height: 844px;
  padding: 12px;
  border-radius: 54px;
  background: linear-gradient(180deg, #2a3542, #141c26 30%, #0e1621);
  box-shadow:
    0 0 0 1px #2a3a4a,
    0 40px 80px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(0, 152, 234, 0.12);
  position: relative;
}

.island {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 36px;
  background: #000;
  border-radius: 24px;
  z-index: 5;
}

.screen {
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background:
    radial-gradient(320px 220px at 50% -10%, rgba(0, 152, 234, 0.22), transparent 60%),
    linear-gradient(180deg, #121c28 0%, #0e1621 28%, #0b141c 100%);
  display: flex;
  flex-direction: column;
}

.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px 0;
  height: 54px;
  font-weight: 700;
  font-size: 15px;
}

.status-icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.bars,
.wifi,
.battery {
  display: block;
  background: #fff;
}

.bars {
  width: 18px;
  height: 10px;
  clip-path: polygon(0 70%, 22% 70%, 22% 40%, 48% 40%, 48% 15%, 74% 15%, 74% 0, 100% 0, 100% 100%, 0 100%);
}

.wifi {
  width: 14px;
  height: 10px;
  border-radius: 0 0 12px 12px;
  clip-path: polygon(50% 100%, 0 30%, 20% 10%, 50% 55%, 80% 10%, 100% 30%);
}

.battery {
  width: 22px;
  height: 10px;
  border-radius: 3px;
  opacity: 0.9;
}

.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  padding: 0;
  gap: 0;
}

.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px 16px 10px;
  gap: 12px;
  overflow: hidden;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin: -8px -16px 0;
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 22, 33, 0.96);
}

.top-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.head-gear {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.head-gear svg {
  width: 20px;
  height: 20px;
}

.head-gear.active {
  background: rgba(0, 152, 234, 0.16);
  border-color: rgba(0, 152, 234, 0.4);
  color: #fff;
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  flex: 1;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: Orbitron, sans-serif;
  font-size: 14px;
  background: linear-gradient(145deg, #0098ea, #003056);
  box-shadow: 0 8px 20px rgba(0, 152, 234, 0.35);
  object-fit: cover;
  overflow: hidden;
  flex-shrink: 0;
}

img.brand-mark {
  display: block;
}

.brand > div {
  min-width: 0;
  flex: 1;
}

.brand h2 {
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(-3px);
}

.brand p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transform: translateY(2px);
}

.brand-moves {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-moves svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: #7ee0ff;
}

.coins {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 152, 234, 0.35);
  background: rgba(0, 152, 234, 0.12);
  color: #fff;
  border-radius: 12px;
  height: 38px;
  padding: 0 6px;
  font: inherit;
  font-weight: 700;
}

.coins img,
.coins-mark {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.coins-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Orbitron, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: linear-gradient(145deg, #0098ea, #003056);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.coins #coins-value {
  min-width: 5ch;
  max-width: 11ch;
  text-align: right;
  font-size: 19px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
}

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

.stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.stat strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
}

.stat.accent {
  border-color: rgba(0, 152, 234, 0.35);
  background: rgba(0, 152, 234, 0.1);
}

.board-wrap {
  position: relative;
  touch-action: none;
  overflow: visible;
  user-select: none;
  cursor: grab;
}

.screen.is-swiping,
.screen.is-swiping .board-wrap {
  cursor: grabbing;
  user-select: none;
}

@keyframes ping {
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
  padding: 10px;
  border-radius: 22px;
  background: #121c28;
  border: 1px solid rgba(255, 255, 255, 0.06);
  aspect-ratio: 1;
  touch-action: none;
}

#tiles,
#fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#fx {
  overflow: visible;
  z-index: 5;
  contain: layout;
  transform: translateZ(0);
}

.payout {
  position: absolute;
  width: calc((100% - 20px - 24px) / 4 + 56px);
  margin-left: -28px;
  left: calc(10px + (var(--c) - 1) * ((100% - 20px - 24px) / 4 + 8px));
  top: calc(10px + (var(--r) - 1) * ((100% - 20px - 24px) / 4 + 8px) - 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  font-family: Orbitron, sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #0098ea;
  -webkit-text-stroke: 0.4px rgba(0, 0, 0, 0.55);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.65);
  white-space: nowrap;
  will-change: transform, opacity;
  backface-visibility: hidden;
  animation: fly-up 1.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.payout-ton {
  font-size: 18px;
}

.payout-ton img {
  width: 20px;
  height: 20px;
}

@keyframes fly-up {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  12% {
    opacity: 1;
  }
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(0, -86px, 0);
  }
}

.slot {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.tile {
  position: absolute;
  width: var(--cell, calc((100% - 20px - 24px) / 4));
  height: var(--cell, calc((100% - 20px - 24px) / 4));
  left: 10px;
  top: 10px;
  border-radius: 14px;
  transform: translate3d(
    calc((var(--c) - 1) * (var(--cell, 0px) + var(--gap, 8px))),
    calc((var(--r) - 1) * (var(--cell, 0px) + var(--gap, 8px))),
    0
  );
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.tile-face {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(var(--cell) * 13 / 130) calc(var(--cell) * 8 / 130)
    calc(var(--cell) * 8 / 130);
  box-sizing: border-box;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

.tile img {
  width: 72%;
  height: auto;
  max-height: calc(100% - 1em);
  flex: 0 0 auto;
  object-fit: contain;
}

.tile span {
  margin-top: auto;
  width: 100%;
  text-align: center;
  font-size: calc(var(--cell) * 18 / 130);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  opacity: 0.92;
}

.trx {
  background: linear-gradient(160deg, #c41838, #4e0014);
}
.btt {
  background: linear-gradient(160deg, #3a3a3a, #111);
}
.usdt {
  background: linear-gradient(160deg, #1a9a6e, #0a3d30);
}
.xrp {
  background: linear-gradient(160deg, #5a6d82, #1a2433);
}
.doge {
  background: linear-gradient(160deg, #e0a82a, #7a4a08);
  color: #fff8e8;
}
.ada {
  background: linear-gradient(160deg, #4d7cff, #12308a);
}
.sol {
  background: linear-gradient(160deg, #c084fc, #22d3a6);
  color: #08110e;
}
.bnb {
  background: linear-gradient(160deg, #f6d365, #c58a12);
  color: #2a2108;
}
.eth {
  background: linear-gradient(160deg, #8ea2ff, #3b4ea0);
}
.btc {
  background: linear-gradient(160deg, #e09018, #7a3d00);
  color: #fff8e8;
}
.ton-tile,
.ton {
  background: linear-gradient(160deg, #1a8ed4, #003056);
}

.tile.match .tile-face {
  outline: 2px solid #fff;
  box-shadow: 0 0 0 3px rgba(0, 152, 234, 0.55), 0 8px 16px rgba(0, 152, 234, 0.3);
}

.tile.legendary .tile-face {
  box-shadow: 0 0 16px rgba(255, 193, 74, 0.45);
}

.tile.spawn .tile-face {
  animation: spawn 0.16s ease-out;
}

.tile.pop .tile-face {
  animation: pop 0.16s ease-out;
}

@keyframes spawn {
  from {
    transform: scale(0);
  }
}

@keyframes pop {
  50% {
    transform: scale(1.12);
  }
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 8, 12, 0.72);
  border-radius: 22px;
  z-index: 4;
}

.overlay[hidden] {
  display: none;
}

.overlay-card {
  width: min(80%, 240px);
  text-align: center;
  padding: 18px 16px;
  border-radius: 18px;
  background: #17212b;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.overlay-card h3 {
  font-family: Orbitron, sans-serif;
  margin-bottom: 8px;
}

.overlay-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.splash-body {
  margin: 0;
  min-height: 100dvh;
  background: radial-gradient(120% 90% at 50% 0%, #17324a 0%, #0e1621 60%);
  color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif;
}

.splash {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 24px calc(32px + env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.splash-logo {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background: rgba(0, 152, 234, 0.12);
  border: 1px solid rgba(0, 152, 234, 0.3);
  animation: splash-pulse 2.2s ease-in-out infinite;
}

.splash-logo img {
  width: 58px;
  height: 58px;
}

@keyframes splash-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 152, 234, 0.25);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 18px rgba(0, 152, 234, 0);
  }
}

.splash-title {
  margin: 0;
  font-family: Orbitron, sans-serif;
  font-size: 30px;
  letter-spacing: 0.02em;
}

.splash-chain {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.splash-chain img {
  width: 30px;
  height: 30px;
  opacity: 0.35;
  animation: splash-coin 1.6s ease-in-out infinite;
}

.splash-chain img:nth-child(2) { animation-delay: 0.12s; }
.splash-chain img:nth-child(3) { animation-delay: 0.24s; }
.splash-chain img:nth-child(4) { animation-delay: 0.36s; }
.splash-chain img:nth-child(5) { animation-delay: 0.48s; }

@keyframes splash-coin {
  0%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-6px);
  }
}

.splash-status {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.splash-bar {
  width: min(220px, 70vw);
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.splash-bar[hidden] {
  display: none;
}

.splash-bar i {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: splash-run 1.1s ease-in-out infinite;
}

@keyframes splash-run {
  from { transform: translateX(-100%); }
  to { transform: translateX(250%); }
}

.splash-retry[hidden] {
  display: none;
}

.settings-lang-value {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.settings-lang-value img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.settings-lang-value strong {
  font-size: 13px;
  font-weight: 700;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  flex-shrink: 0;
  padding: 2px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.offer .seg button {
  min-width: 54px;
  padding: 7px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.offer .seg button.active {
  background: var(--accent);
  color: #fff;
}

.ref-tabs.top-tabs {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.row-ava {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex-shrink: 0;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.friend-card .row-ava {
  width: 48px;
  height: 48px;
}

.top-note {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  padding: 2px 0 4px;
}

.top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.top-row.me {
  border-color: rgba(0, 152, 234, 0.45);
  background: rgba(0, 152, 234, 0.12);
}

.top-place {
  width: 26px;
  flex-shrink: 0;
  text-align: center;
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.top-row:nth-child(1) .top-place {
  color: #ffd166;
}

.top-row:nth-child(2) .top-place {
  color: #d8e2ec;
}

.top-row:nth-child(3) .top-place {
  color: #e0a878;
}

.top-ava {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex-shrink: 0;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

/* Без фото на месте аватарки показываем инициалы. */
span.top-ava {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.top-row > div {
  flex: 1;
  min-width: 0;
}

.top-row strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-row p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.top-xp {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: #9ad8ff;
  font-variant-numeric: tabular-nums;
}

.lang-list {
  display: grid;
  gap: 6px;
  padding: 4px 0 2px;
  max-height: 60vh;
  overflow: auto;
  scrollbar-width: none;
}

.lang-list::-webkit-scrollbar {
  display: none;
}

.lang-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.lang-list button.active {
  border-color: rgba(0, 152, 234, 0.55);
  background: rgba(0, 152, 234, 0.14);
}

.lang-list img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.overlay-stats {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.overlay-stats[hidden] {
  display: none;
}

.overlay-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.overlay-stats span {
  color: var(--muted);
  font-size: 12px;
}

.overlay-stats strong {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.overlay-card button {
  margin-top: 14px;
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  background: rgba(20, 22, 30, 0.94);
  border: 1px solid var(--line);
  color: #fff;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 12;
}

.toast[hidden] {
  display: none;
}

.spawn-ping {
  position: absolute;
  left: 12px;
  bottom: 72px;
  z-index: 20;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  pointer-events: none;
}

.spawn-ping.ok {
  color: #6ee7a8;
}

.spawn-ping.bad {
  color: #ff8aa0;
}

html.is-miniapp .spawn-ping {
  bottom: calc(var(--tabbar-h) + 10px);
}

.dock button {
  cursor: pointer;
}

.ladder {
  overflow: hidden;
}

.ladder-track {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  padding-bottom: 2px;
}

.ladder-coin {
  min-width: 0;
  flex: 1;
  display: grid;
  justify-items: center;
  gap: 3px;
  opacity: 0.55;
  font-size: 8px;
  color: var(--muted);
}

.ladder-coin img {
  width: 28px;
  height: 28px;
}

.ladder-coin.current {
  opacity: 1;
}

.dock {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.dock button {
  border: 0;
  border-radius: 16px;
  padding: 12px 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  display: grid;
  justify-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
}

.dock svg {
  width: 22px;
  height: 22px;
}

.dock-mult {
  font-family: Orbitron, sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 22px;
  height: 22px;
  letter-spacing: -0.04em;
}

#mult-modal .ref-modal-top {
  margin-bottom: 0;
}

.mult-rule {
  border: 0;
  height: 1px;
  margin: 14px -16px;
  background: rgba(148, 180, 210, 0.2);
}

.mult-picks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.mult-note {
  margin: 0 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.mult-pick {
  flex: 0 0 calc((100% - 24px) / 4);
  aspect-ratio: 1;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.04em;
  cursor: pointer;
}

.mult-pick.on {
  color: #fff;
  background: rgba(0, 152, 234, 0.22);
  border-color: rgba(0, 152, 234, 0.45);
  box-shadow: 0 8px 20px rgba(0, 152, 234, 0.25);
}

#mult-save {
  width: 100%;
}

.mult-paid-modal {
  z-index: 26;
  padding: 48px 28px;
}

.mult-paid-card {
  width: min(100%, 280px);
  padding: 16px 14px 14px;
}

.mult-paid-card p {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.mult-paid-card .mock-cta {
  width: 100%;
}

.mult-paid-card .mock-cta + .mock-cta {
  margin-top: 8px;
}

.finish-cancel {
  width: 100%;
  margin-top: 8px;
  border: 0;
  border-radius: 12px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.dock button.on {
  color: #fff;
  background: rgba(0, 152, 234, 0.22);
  border: 1px solid rgba(0, 152, 234, 0.4);
}

.tab-panel[hidden] {
  display: none !important;
}

#tab-game:not([hidden]) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 12px;
}

.game-play {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.offer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.offer-text h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  margin-bottom: 4px;
}

.offer-gift {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #f0c36a;
}

.offer-text p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.offer-text strong {
  display: block;
  margin-top: 6px;
  color: #9ad8ff;
  font-size: 12px;
}

.offer button {
  flex-shrink: 0;
  border: 0;
  border-radius: 14px;
  padding: 12px 12px;
  min-width: 88px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

.mock-avatar.tone-4 {
  background: linear-gradient(145deg, #f6d365, #c58a12);
  color: #2a2108;
}

.mock-avatar.tone-5 {
  background: linear-gradient(145deg, #ffc14a, #e08a00);
  color: #2a2108;
}

.ladder-coin.off {
  opacity: 0.22;
  filter: grayscale(1);
}

.friends-panel:not([hidden]) {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 0 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.friends-panel:not([hidden])::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.friends-head {
  display: grid;
  gap: 10px;
}

.friends-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.friends-invite {
  padding: 9px 14px;
  font-size: 13px;
  border-radius: 12px;
  flex-shrink: 0;
}

.friends-intro {
  padding: 14px;
  border-radius: 18px;
  background: rgba(0, 152, 234, 0.08);
  border: 1px solid rgba(0, 152, 234, 0.18);
}

.friends-intro p {
  color: #c5d6e6;
  font-size: 13px;
  line-height: 1.5;
}

.friends-rule {
  border: 0;
  height: 1px;
  margin: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(154, 216, 255, 0.18) 18%,
    rgba(0, 152, 234, 0.7) 50%,
    rgba(154, 216, 255, 0.18) 82%,
    transparent
  );
}

.friends-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.friends-history {
  flex: 1;
  border: 1px solid rgba(0, 152, 234, 0.35);
  background: rgba(0, 152, 234, 0.12);
  color: #d6f1ff;
  border-radius: 12px;
  padding: 11px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.friends-info {
  width: 44px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 152, 234, 0.35);
  background: rgba(0, 152, 234, 0.12);
  color: #d6f1ff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.friends-info svg {
  width: 20px;
  height: 20px;
}

.friends-history:hover,
.friends-history:focus-visible,
.friends-info:hover,
.friends-info:focus-visible {
  border-color: rgba(0, 152, 234, 0.55);
  background: rgba(0, 152, 234, 0.2);
  color: #fff;
}

.friends-head .stat span {
  font-size: 13px;
}

.friends-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.friends-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 0;
}

.friends-list::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.friends-more {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding: 8px 0 4px;
}

.ref-levels {
  flex-shrink: 0;
}

.ref-levels-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.ref-levels-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.ref-tabs {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.hist-tabs {
  flex: none;
  width: 100%;
  grid-template-columns: repeat(4, 1fr);
}

.ref-info {
  width: 42px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.ref-info svg {
  width: 20px;
  height: 20px;
}

.ref-info:hover,
.ref-info:focus-visible {
  color: #fff;
  border-color: rgba(0, 152, 234, 0.4);
  background: rgba(0, 152, 234, 0.12);
}

.ref-modal[hidden] {
  display: none;
}

.ref-modal {
  position: absolute;
  inset: 0;
  z-index: 24;
  display: grid;
  place-items: center;
  padding: 20px 18px;
}

.ref-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(6, 8, 12, 0.72);
  cursor: pointer;
}

.ref-modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 320px);
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: #17212b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.ref-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.ref-modal-top h3 {
  font-size: 18px;
  font-weight: 800;
}

.ref-modal-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ref-modal-block {
  padding: 14px 0;
}

.ref-modal-block + .ref-modal-block {
  border-top: 1px solid var(--line);
}

.ref-modal-block h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 10px;
  text-align: center;
}

.ref-modal-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.friend-row {
  cursor: pointer;
}

.friend-card {
  position: relative;
  padding: 16px 16px 20px;
}

.friend-card-close {
  position: absolute;
  top: 10px;
  right: 10px;
}

.friend-card-nick {
  display: block;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  padding: 2px 40px 12px;
}

.friend-card-rule {
  border: 0;
  height: 1px;
  margin: 0 -16px 14px;
  background: rgba(148, 180, 210, 0.2);
}

.friend-card-heading {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}

.friend-card-stats {
  margin-bottom: 14px;
}

.friend-card-stats .stat {
  text-align: center;
}

.friend-card-stats .stat span {
  line-height: 1.25;
}

.friend-card-stats .stat strong {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.friend-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
}

.friend-card .mock-avatar {
  width: 72px;
  height: 72px;
  font-size: 20px;
  border-radius: 14px;
  flex-shrink: 0;
}

.friend-card-lines {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.friend-card > .friend-card-lines {
  margin-bottom: 14px;
}

.friend-card-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.friend-card-line span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.friend-card-line strong {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.friend-card-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin-bottom: 14px;
}

.friend-card-table th,
.friend-card-table td {
  padding: 8px 4px;
  text-align: center;
  font-size: 13px;
}

.friend-card-table th {
  color: var(--muted);
  font-weight: 700;
  padding-bottom: 10px;
}

.friend-card-table td {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.friend-card-table td:first-child {
  color: #7ee0a8;
  letter-spacing: 0.04em;
}

.friend-card-table tbody tr + tr td {
  border-top: 1px solid rgba(148, 180, 210, 0.16);
  padding-top: 10px;
}

.friend-card-earned {
  text-align: center;
  padding: 12px 14px;
}

.friend-card-earned span {
  font-size: 13px;
  line-height: 1.25;
}

.friend-card-earned strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.ref-tabs button {
  border: 0;
  border-radius: 10px;
  padding: 8px 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.ref-tabs button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(0, 152, 234, 0.28);
}

.mock-avatar.tone-1 {
  background: linear-gradient(145deg, #3a7cff, #12308a);
}

.mock-avatar.tone-2 {
  background: linear-gradient(145deg, #2ecf9a, #14785a);
}

.mock-avatar.tone-3 {
  background: linear-gradient(145deg, #c084fc, #5b21b6);
}

.page-panel {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 0 4px;
}

.bots-panel {
  overflow: auto;
}

.gen-pay-tabs {
  flex: none;
  align-self: stretch;
  width: 100%;
  margin: 0;
  box-sizing: border-box;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gen-pay-pane[hidden] {
  display: none;
}

.gen-pay-pane:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: 10px;
}

.bots-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bots-head .friends-info {
  width: 38px;
  height: 38px;
}

.bots-earn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 12px 12px 14px;
  background: rgba(8, 18, 28, 0.85);
  border: 3px solid rgba(200, 224, 240, 0.55);
  border-radius: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
}

.bots-claim-cta {
  width: 100%;
  flex-shrink: 0;
}

.bots-tabs {
  flex: none;
  width: 100%;
  grid-template-columns: 1fr 1fr;
  margin-top: 12px;
}

.bots-pane[hidden] {
  display: none;
}

#bots-pane-upgrade:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.bots-bonus-note {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 152, 234, 0.08);
  border: 1px solid rgba(0, 152, 234, 0.18);
  color: #c5d6e6;
  font-size: 13px;
  line-height: 1.45;
}

.bots-upgrade-cta {
  width: 100%;
  margin-top: auto;
}

#bots-pane-stats:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bots-stats-title {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  padding: 6px 0 2px;
}

.bots-stats-title:not(:first-child) {
  margin-top: 10px;
  padding-top: 14px;
}

.bots-next-game {
  justify-content: center;
  min-height: 52px;
}

.bots-next-game strong {
  width: 100%;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

#bots-pane-stats .offer-text h3 {
  margin-bottom: 0;
}

.bots-param-ava {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.bots-param-ava svg {
  width: 34px;
  height: 34px;
}

.bots-param-info {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.bots-param-info svg {
  width: 18px;
  height: 18px;
}

.bots-params .friend-name {
  display: block;
  line-height: 1.25;
  white-space: normal;
}

.bots-param-bar {
  position: relative;
  height: 18px;
  margin-top: 6px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(62, 207, 154, 0.1);
  --min: 1;
  --max: 86400;
  --val: 1;
}

.bots-param-bar i {
  display: block;
  width: calc((var(--val) - var(--min)) / (var(--max) - var(--min)) * 100%);
  max-width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #157f6c, #3ecf9a);
}

.bots-param-bar span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #e8f4fc;
  text-shadow: 0 1px 4px rgba(8, 14, 22, 0.7);
}

.bot-info-text {
  color: #c5d6e6;
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}

.page-kicker {
  color: var(--red);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.mock-cta {
  border: 0;
  border-radius: 12px;
  padding: 13px 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

button.offer {
  width: 100%;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.offer-nav strong {
  font-size: 18px;
  font-weight: 400;
  color: var(--muted);
}

.tasks-label {
  margin: 8px 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.task-row .task-cta {
  flex-shrink: 0;
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 10px;
}

.task-row .task-cta:disabled {
  opacity: 0.55;
  cursor: default;
}

.task-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(0, 152, 234, 0.16);
  color: #d6f1ff;
}

.task-icon svg,
.task-icon img {
  width: 22px;
  height: 22px;
}

#tab-withdraw .mock-cta {
  margin-top: 10px;
}

.withdraw-payouts {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.withdraw-payouts h4 {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.payout-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.payout-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.payout-id {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payout-status {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.payout-status.wait {
  color: #9ad8ff;
  background: rgba(0, 152, 234, 0.16);
}

.payout-status.ok {
  color: #7ee0a8;
  background: rgba(46, 180, 110, 0.16);
}

.payout-status.cancel {
  color: #ff9b9b;
  background: rgba(220, 80, 80, 0.16);
}

.payout-card-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.payout-amount {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Иконку монеты держим маленькой в любом месте карточки: у SVG своих размеров нет. */
.payout-card img,
.payout-amount img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.payout-wallet {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payout-tx {
  justify-self: start;
  margin-top: -4px;
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}

.payout-tx::before {
  content: "↗ ";
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.rates-table-wrap {
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.rates-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.rates-table th,
.rates-table td {
  padding: 11px 8px;
  text-align: center;
}

.rates-table th:first-child,
.rates-table td:first-child {
  width: 46%;
  text-align: left;
  padding-left: 14px;
}

.rates-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  background: rgba(0, 152, 234, 0.08);
}

.rates-table th:not(:first-child) {
  color: #7ee0a8;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.rates-table td {
  font-size: 13px;
}

.rates-table td:not(:first-child) {
  color: #9ad8ff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.rates-table tbody tr + tr td {
  border-top: 1px solid var(--line);
}

#tab-rates .friends-actions {
  margin-top: 8px;
}

.mock-row .hist-login {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hist-row {
  padding-top: 9px;
  padding-bottom: 9px;
}

.hist-row .mock-avatar {
  width: 42px;
  height: 42px;
  font-size: 12px;
}

.mock-row strong.friend-name {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.friend-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: block;
  transform: translateY(1px);
}

.friend-status.on {
  background: #7ee0a8;
}

.friend-status.off {
  background: #ff6b6b;
}

.hist-lvl {
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  color: #7ee0a8;
  background: rgba(0, 152, 234, 0.08);
  border: 1px solid rgba(0, 152, 234, 0.18);
}

.mock-row > div {
  flex: 1;
  min-width: 0;
}

.mock-row strong {
  display: block;
  font-size: 14px;
}

.mock-row p {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.mock-row p.ref-online {
  color: #7ee0a8;
}

.mock-row p.ref-offline {
  color: #ff9b9b;
}

.friend-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.friend-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.friend-meta svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.hist-row > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 42px;
  padding-top: 2px;
  padding-bottom: 2px;
}

.hist-row p {
  margin-top: 0;
}

.mock-row em {
  font-style: normal;
  color: #9ad8ff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.mock-avatar {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(145deg, #0098ea, #003056);
  flex-shrink: 0;
}

.mock-avatar.alt {
  background: linear-gradient(145deg, #3a7cff, #12308a);
}

.rank {
  width: 24px;
  text-align: center;
  font-family: Orbitron, sans-serif;
  font-size: 13px;
  color: var(--muted);
}

.promo-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.promo-card > span {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-family: Orbitron, sans-serif;
  font-size: 14px;
  background: rgba(0, 152, 234, 0.16);
  color: #d6f1ff;
}

.promo-card h3 {
  font-size: 15px;
  margin-bottom: 4px;
}

.promo-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.mock-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.mock-field input {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
}

#tab-calc .mock-field,
#tab-pay-ton .mock-field,
#tab-pay-bot .mock-field {
  margin-top: 16px;
  margin-bottom: 14px;
}

.pay-ton-send {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(62, 207, 154, 0.16);
  border: 1px solid rgba(62, 207, 154, 0.38);
  color: #7ee0a8;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

.pay-ton-send:empty {
  display: none;
}

#pay-ton-wallet,
#pay-ton-memo,
#pay-bot-wallet,
#pay-bot-memo {
  word-break: break-all;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

#tab-pay-ton .mock-cta.is-copied,
#tab-pay-bot .mock-cta.is-copied {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pay-ton-check {
  width: 18px;
  height: 18px;
  color: #3ecf9a;
}

#calc-ton,
#calc-stars,
#calc-f-amount {
  padding: 18px 14px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.buy-bot-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 2px auto 12px;
  border-radius: 18px;
  background: rgba(0, 152, 234, 0.14);
  border: 1px solid rgba(0, 152, 234, 0.3);
  color: #7ee0ff;
}

.buy-bot-icon svg {
  width: 34px;
  height: 34px;
}

#buy-bot-cta,
#buy-bot-ton {
  width: 100%;
  margin-top: 14px;
}

#buy-bot-ton {
  margin-top: 8px;
}

/* Заглушка забаненного: перекрывает всё, включая нижнее меню. */
.banned-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 28px;
  text-align: center;
  background: #0e1621;
}

.banned-screen strong {
  font-size: 22px;
  color: #ff9b9b;
}

.banned-screen p {
  margin: 0;
  max-width: 320px;
  color: var(--muted);
  line-height: 1.45;
}

/* Ответ на заявку показываем прямо над полями, а не тостом внизу экрана. */
.form-note {
  margin: 0 0 4px;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.form-note[hidden] {
  display: none;
}

.form-note.error {
  color: #ff9b9b;
  background: rgba(220, 80, 80, 0.16);
  border: 1px solid rgba(220, 80, 80, 0.35);
}

.form-note.ok {
  color: #7ee0a8;
  background: rgba(46, 180, 110, 0.16);
  border: 1px solid rgba(46, 180, 110, 0.35);
}

.withdraw-receive {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  border-radius: 14px;
  padding: 10px 14px;
  min-height: 46px;
  pointer-events: none;
}

.withdraw-receive img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.withdraw-receive span {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  flex-shrink: 0;
  padding: 6px 4px 10px;
  border-top: 1px solid var(--line);
  background: rgba(14, 22, 33, 0.96);
}

.tabbar button {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 4px 2px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.tabbar svg {
  width: 22px;
  height: 22px;
}

.tabbar button.active,
.tabbar button.open {
  color: #fff;
}

.tabbar button.active svg,
.tabbar button.open svg {
  color: var(--red);
}

.more-backdrop {
  position: absolute;
  inset: 0 0 62px;
  background: rgba(4, 6, 10, 0.62);
  z-index: 8;
}

.more-backdrop[hidden],
.more-sheet[hidden] {
  display: none !important;
}

.more-sheet {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 70px;
  z-index: 9;
  display: grid;
  gap: 4px;
  padding: 10px 10px 12px;
  border-radius: 22px;
  background: #17212b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  animation: sheet-up 0.18s ease-out;
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.more-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  margin: 2px auto 6px;
}

.more-caption {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 8px 4px;
}

.more-sheet button {
  border: 0;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}

.more-sheet button:hover,
.more-sheet button.active {
  background: rgba(255, 255, 255, 0.06);
}

.more-sheet svg {
  width: 20px;
  height: 20px;
  color: var(--red);
}

html.is-miniapp,
html.is-miniapp body {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html.is-miniapp body {
  background: #0e1621;
}

html.is-miniapp {
  --safe-bottom: calc(
    var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)) +
    var(--tg-content-safe-area-inset-bottom, 0px)
  );
  --tabbar-h: calc(58px + var(--safe-bottom));
}

html.is-miniapp .studio {
  display: block;
  min-height: 100%;
  height: 100%;
  padding: 0;
}

html.is-miniapp .phone-bezel {
  width: 100%;
  height: 100%;
  min-height: var(--tg-viewport-stable-height, 100dvh);
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
}

html.is-miniapp .island,
html.is-miniapp .status {
  display: none;
}

html.is-miniapp .screen {
  height: 100%;
  min-height: var(--tg-viewport-stable-height, 100dvh);
  border-radius: 0;
}

html.is-miniapp .phone {
  height: 100%;
}

/*
 * В фуллскрине Telegram отдаёт две вставки сверху: safe-area — вырез и островок
 * устройства, content-safe-area — собственная шапка с крестиком. Их складываем,
 * иначе шапка игры уезжает под них. Вне фуллскрина обе равны нулю.
 */
html.is-miniapp .app {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding-top: calc(
    var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)) +
    var(--tg-content-safe-area-inset-top, 0px)
  );
}

html.is-miniapp .board-wrap {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

html.is-miniapp .board {
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 1;
  flex: 0 0 auto;
}

html.is-miniapp .tabbar {
  padding: 6px 4px calc(10px + var(--safe-bottom));
}

html.is-miniapp .more-sheet {
  bottom: calc(var(--tabbar-h) + 8px);
}

html.is-miniapp .more-backdrop {
  inset: 0 0 var(--tabbar-h);
}

html.is-miniapp .toast {
  bottom: calc(var(--tabbar-h) + 24px);
}

@media (max-width: 900px) {
  .studio {
    padding: 24px 16px 48px;
  }

  html.is-miniapp .studio {
    padding: 0;
  }
}

body.land {
  min-height: 100vh;
  padding: 0;
}

.land-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 24px;
}

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

.land-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: block;
}

.land-brand strong {
  font-family: Orbitron, sans-serif;
  font-size: 18px;
  letter-spacing: 0.04em;
}

.land-brand p {
  color: var(--muted);
  font-size: 14px;
}

.land-lang {
  position: relative;
}

.land-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.land-lang-btn:hover,
.land-lang-btn[aria-expanded="true"] {
  border-color: rgba(0, 152, 234, 0.45);
  background: rgba(0, 152, 234, 0.1);
}

.land-lang-caret {
  width: 12px;
  height: 12px;
  color: var(--muted);
}

.land-lang-btn[aria-expanded="true"] .land-lang-caret {
  transform: rotate(180deg);
}

.land-flag {
  width: 26px;
  height: 19px;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  flex: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.land-flag[data-flag="en"] { background-image: url("/assets/img/flags/en.png"); }
.land-flag[data-flag="ru"] { background-image: url("/assets/img/flags/ru.png"); }
.land-flag[data-flag="es"] { background-image: url("/assets/img/flags/es.png"); }
.land-flag[data-flag="it"] { background-image: url("/assets/img/flags/it.png"); }
.land-flag[data-flag="de"] { background-image: url("/assets/img/flags/de.png"); }
.land-flag[data-flag="fr"] { background-image: url("/assets/img/flags/fr.png"); }
.land-flag[data-flag="nl"] { background-image: url("/assets/img/flags/nl.png"); }
.land-flag[data-flag="pl"] { background-image: url("/assets/img/flags/pl.png"); }
.land-flag[data-flag="tr"] { background-image: url("/assets/img/flags/tr.png"); }
.land-flag[data-flag="id"] { background-image: url("/assets/img/flags/id.png"); }
.land-flag[data-flag="uz"] { background-image: url("/assets/img/flags/uz.png"); }

.land-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  min-width: 188px;
  max-height: min(70vh, 420px);
  margin: 0;
  padding: 6px;
  overflow: auto;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #17212b;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.land-lang-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.land-lang-menu button:hover,
.land-lang-menu button[aria-selected="true"] {
  background: rgba(0, 152, 234, 0.12);
}

.land-hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 24px 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.land-kicker {
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.land-hero h1 {
  font-family: Orbitron, sans-serif;
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.land-lead {
  color: #c5d6e6;
  font-size: 18px;
  line-height: 1.55;
  margin-bottom: 28px;
  max-width: 520px;
}

.land-cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 520px;
  margin-top: 10px;
}

.land-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 22px;
  border-radius: 16px;
  padding: 18px 56px;
  min-width: 280px;
}

.land-cta-note {
  width: 0;
  min-width: 100%;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.land-mini-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px;
  border-radius: 22px;
  background: #121c28;
  border: 1px solid var(--line);
}

.land-mini-board .tile {
  position: relative;
  width: auto;
  height: auto;
  left: auto;
  top: auto;
  transform: none;
  will-change: auto;
  transition: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  aspect-ratio: 1;
  min-height: 104px;
  padding: 13px 8px 8px;
  box-sizing: border-box;
}

.land-mini-board .tile img {
  position: static;
  width: 72%;
  height: auto;
  max-height: calc(100% - 18px);
  flex: 0 0 auto;
  transform: none;
  object-fit: contain;
}

.land-mini-board .tile span {
  position: static;
  margin-top: auto;
  display: block;
  width: 100%;
  text-align: center;
  font-size: 18px;
  line-height: 1;
}

.land-divider {
  max-width: 1080px;
  height: 1px;
  margin: 48px auto;
  padding: 0 24px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 152, 234, 0.5), transparent);
  background-clip: content-box;
}

.land-stats {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.land-stats article {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
}

.land-stat-paid {
  padding-right: 52px;
}

.stat-info {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 152, 234, 0.14);
  color: var(--accent);
  text-decoration: none;
  transform: translateY(-50%);
}

.stat-info:hover {
  background: rgba(0, 152, 234, 0.28);
}

.stat-info svg {
  width: 18px;
  height: 18px;
}

.land-stats span {
  display: block;
  color: var(--muted);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}

.land-stats strong {
  font-size: 26px;
  font-weight: 800;
  white-space: nowrap;
}

.land-how {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 64px;
}

.land-how h2,
.land-bottom h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.land-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.land-steps article {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.land-steps b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 152, 234, 0.18);
  color: var(--accent);
  margin-bottom: 10px;
}

.land-steps h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.land-steps p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.land-bottom {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px 140px;
  text-align: center;
}

.land-bottom p {
  color: var(--muted);
  margin-bottom: 22px;
}

@media (max-width: 900px) {
  .land-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 8px;
  }

  .land-hero h1 {
    font-size: 32px;
  }

  .land-stats,
  .land-steps {
    grid-template-columns: 1fr;
  }

}
