/* ============================================================
   FI GAME — мобильный интерфейс
   ============================================================ */

:root {
  --bg: #050a08;
  --bg-2: #061410;
  --card: rgba(16, 33, 25, 0.72);
  --card-2: rgba(22, 45, 34, 0.72);
  --line: rgba(61, 255, 139, 0.10);
  --line-strong: rgba(61, 255, 139, 0.20);
  --text: #e8fff2;
  --muted: #79a892;
  --muted-2: #557a68;
  --gold: #3dff8b;
  --gold-2: #17dd62;
  --teal: #2ee6c5;
  --blue: #60a5fa;
  --violet: #a78bfa;
  --pink: #f472b6;
  --red: #fb7185;
  --green: #4ade80;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --nav-h: 68px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overscroll-behavior: none;
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
b, strong { font-weight: 700; }
svg { display: block; }

.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- фон ---------- */

.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.bg-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5; }
.bg-glow-1 { width: 70vw; height: 70vw; top: -20vw; right: -20vw; background: radial-gradient(circle, rgba(23,221,98,0.5), transparent 65%); }
.bg-glow-2 { width: 80vw; height: 80vw; bottom: -30vw; left: -25vw; background: radial-gradient(circle, rgba(46,230,197,0.35), transparent 65%); }
.bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(61,255,139,0.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(61,255,139,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 20%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 20%, #000 20%, transparent 80%);
}
.snow {
  position: absolute; inset: 0; display: block;
  width: 100%; height: 100%; opacity: .9;
  pointer-events: none;
}

#app { position: relative; z-index: 1; min-height: 100dvh; }

/* ---------- монета ---------- */

.coin {
  position: relative;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #d6ffe7, #3dff8b 18%, #0a9c3e 38%, #b9ffd2 55%, #17dd62 74%, #076b2a 90%, #d6ffe7);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 40px rgba(23, 221, 98, 0.45), inset 0 0 0 2px rgba(255, 255, 255, 0.25);
  flex: 0 0 auto;
}
.coin::after {
  content: '';
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px solid rgba(4, 60, 30, 0.35);
  background: radial-gradient(circle at 35% 25%, #d9ffe9, #22c55e 55%, #0f8a3d);
  box-shadow: inset 0 2px 6px rgba(255,255,255,0.5), inset 0 -6px 12px rgba(4,60,30,0.35);
}
.coin-face { position: relative; z-index: 2; font-weight: 900; color: #04381b; letter-spacing: -0.03em; text-shadow: 0 1px 0 rgba(255,255,255,0.4); }
.coin-xl { width: 108px; height: 108px; }
.coin-xl .coin-face { font-size: 42px; }
.coin-shine {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden; z-index: 3;
}
.coin-shine::before {
  content: ''; position: absolute; top: -120%; left: -60%;
  width: 60%; height: 340%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.75), transparent);
  transform: rotate(24deg);
  animation: shine 4.6s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { transform: translateX(-40%) rotate(24deg); opacity: 0; } 70% { opacity: 1; } 100% { transform: translateX(340%) rotate(24deg); opacity: 0; } }

/* ---------- экран входа ---------- */

.auth {
  min-height: 100dvh;
  padding: calc(30px + env(safe-area-inset-top)) 20px calc(30px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px;
  max-width: 460px;
  margin: 0 auto;
}
.auth-hero { display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; }
.orbit {
  position: absolute; top: -14px; width: 150px; height: 150px; border-radius: 50%;
  border: 1px dashed rgba(61, 255, 139, 0.28);
  animation: spin 26s linear infinite;
}
.orbit-dot { position: absolute; top: 8px; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
@keyframes spin { to { transform: rotate(360deg); } }
.auth .coin { animation: float 5s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.brand { font-size: 52px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; margin-top: 4px; }
.brand-dot { color: var(--gold); }
.brand-sub { color: var(--muted); font-size: 14px; letter-spacing: 0.02em; }

.auth-card {
  width: 100%;
  background: linear-gradient(180deg, rgba(13, 34, 25, 0.86), rgba(7, 20, 14, 0.92));
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: rgba(255,255,255,0.05);
  padding: 4px; border-radius: 14px; margin-bottom: 16px;
}
.tab {
  padding: 10px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: 14px;
  transition: 0.2s;
}
.tab.active { background: linear-gradient(180deg, rgba(61,255,139,0.18), rgba(61,255,139,0.08)); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(61,255,139,0.25); }

.field { display: block; margin-bottom: 12px; }
.field-label { display: block; font-size: 12px; color: var(--muted); margin: 0 0 6px 4px; letter-spacing: 0.04em; text-transform: uppercase; }
.field input {
  width: 100%; padding: 14px 15px;
  background: rgba(5, 15, 11, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none; font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus { border-color: rgba(61,255,139,0.55); box-shadow: 0 0 0 3px rgba(61,255,139,0.12); }
.field-row { position: relative; display: block; }
.field-row input { padding-right: 50px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--muted-2);
}
.eye svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.eye:hover { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 14px; font-weight: 700; font-size: 15px;
  transition: transform 0.12s, filter 0.2s, opacity 0.2s;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
  color: var(--text);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; filter: saturate(0.4); }
.btn-primary {
  background: linear-gradient(135deg, #8dffb5, #17dd62 60%, #0ea24a);
  color: #03230f; border: 0;
  box-shadow: 0 10px 30px rgba(23,221,98,0.35), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-teal {
  background: linear-gradient(135deg, #64f2d8, #22c9aa 65%, #0f9e85);
  color: #04231d; border: 0;
  box-shadow: 0 10px 30px rgba(46,230,197,0.28), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-danger { background: rgba(251, 113, 133, 0.14); border-color: rgba(251,113,133,0.35); color: #ffb3c0; }
.btn-ghost { background: rgba(255,255,255,0.04); }
.btn-lg { width: 100%; padding: 16px; font-size: 16px; margin-top: 6px; border-radius: 16px; }
.btn-sm { padding: 9px 12px; font-size: 13px; border-radius: 11px; }

.link-btn { margin: 12px auto 0; display: block; color: var(--muted-2); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.auth-error { color: #ff9aa8; font-size: 13px; text-align: center; min-height: 18px; margin-top: 10px; }
.auth-features {
  width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.auth-features li {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted);
  background: rgba(255,255,255,0.035); border: 1px solid var(--line);
  padding: 10px 12px; border-radius: 12px;
}
.auth-features b { font-size: 15px; }
.auth-note { font-size: 11px; line-height: 1.5; color: var(--muted-2); text-align: center; max-width: 330px; }

/* ---------- каркас игры ---------- */

#game { max-width: 520px; margin: 0 auto; min-height: 100dvh; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(180deg, rgba(4,12,9,0.92) 65%, rgba(4,12,9,0));
  backdrop-filter: blur(14px);
}
.tb-user { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; border-radius: 12px; transition: background .18s; }
.tb-user:hover, .tb-user:focus-visible { background: rgba(255,255,255,0.045); outline: none; }
.avatar {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px; color: #03230f;
  background: linear-gradient(135deg, #a9ffc9, #17dd62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 4px 14px rgba(23,221,98,0.3);
}
.tb-user-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tb-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.tb-rank { font-size: 11px; color: var(--muted); white-space: nowrap; }
.tb-right { display: flex; align-items: center; gap: 8px; }
.price-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 12px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.pp-label { font-size: 9px; color: var(--muted-2); letter-spacing: 0.08em; }
.pp-value { font-size: 13px; font-weight: 800; color: var(--gold); }
.pp-chg { font-size: 10px; font-weight: 700; padding: 2px 4px; border-radius: 5px; }
.pp-chg.up { color: #6ef0c2; background: rgba(46,230,197,0.12); }
.pp-chg.down { color: #ff9aa8; background: rgba(251,113,133,0.12); }
.pp-live {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 8px; font-weight: 800; letter-spacing: 0.06em;
  color: #6ef0c2; text-transform: uppercase; opacity: 0.95;
}
.pp-live i {
  width: 5px; height: 5px; border-radius: 50%; background: #2ee6c5;
  animation: pp-live-pulse 2.2s ease-out infinite;
}
@keyframes pp-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(46,230,197,0.55); }
  70% { box-shadow: 0 0 0 5px rgba(46,230,197,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,230,197,0); }
}
.price-pill.tick-up { animation: pp-flash-up 0.9s ease-out; }
.price-pill.tick-down { animation: pp-flash-down 0.9s ease-out; }
@keyframes pp-flash-up {
  0% { border-color: rgba(46,230,197,0.8); box-shadow: 0 0 0 3px rgba(46,230,197,0.18); }
  100% { border-color: var(--line); box-shadow: none; }
}
@keyframes pp-flash-down {
  0% { border-color: rgba(251,113,133,0.8); box-shadow: 0 0 0 3px rgba(251,113,133,0.18); }
  100% { border-color: var(--line); box-shadow: none; }
}
@media (max-width: 560px) {
  .pp-live b { display: none; }
}
.online-dot { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.online-dot i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.bell {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 12px; flex: 0 0 auto;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--muted);
}
.bell:hover { color: var(--text); border-color: var(--line-strong); }
.bell svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bell.has-unread { color: var(--gold); border-color: rgba(61,255,139,0.35); }
.bell-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  box-shadow: 0 0 0 2px var(--bg, #040c09);
}

.balance-bar {
  display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 8px;
  padding: 4px 16px 8px;
}
.bal {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 9px 10px;
  text-align: left; transition: border-color 0.2s;
}
.bal:active { border-color: var(--line-strong); }
.bal-icon {
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  font-size: 11px; font-weight: 900; flex: 0 0 auto;
}
.bal-fi { background: linear-gradient(135deg, #a9ffc9, #17dd62); color: #03230f; }
.bal-usd { background: rgba(74, 222, 128, 0.14); color: #7bf3a6; border: 1px solid rgba(74,222,128,0.22); }
.bal-pow { background: rgba(96,165,250,0.14); color: #9cc6ff; border: 1px solid rgba(96,165,250,0.22); font-size: 13px; }
.bal-col { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.bal-col b { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bal-col small { font-size: 10px; color: var(--muted-2); white-space: nowrap; }

.view-wrap { padding: 4px 16px calc(var(--nav-h) + 26px + env(safe-area-inset-bottom)); }

.view { animation: viewIn 0.28s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- общие блоки ---------- */

.card {
  background: linear-gradient(180deg, rgba(13, 34, 25, 0.78), rgba(7, 20, 14, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.28);
  backdrop-filter: blur(12px);
}
.card-tight { padding: 13px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-title { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); text-transform: uppercase; }
.card-title span { color: var(--text); }
.section-title { font-size: 16px; font-weight: 800; margin: 18px 2px 10px; display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 10.5px; }
.gold { color: var(--gold); }
.teal { color: var(--teal); }
.red { color: var(--red); }
.green { color: var(--green); }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.tnum { font-variant-numeric: tabular-nums; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 9px; font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line); color: var(--muted);
}
.chip.gold { background: rgba(61,255,139,0.12); border-color: rgba(61,255,139,0.28); color: var(--gold); }
.chip.teal { background: rgba(46,230,197,0.1); border-color: rgba(46,230,197,0.25); color: #7ef3dd; }
.chip.red { background: rgba(251,113,133,0.12); border-color: rgba(251,113,133,0.3); color: #ffa7b4; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat {
  background: rgba(255,255,255,0.035); border: 1px solid var(--line);
  border-radius: 13px; padding: 10px 12px;
}
.stat-label { font-size: 10.5px; color: var(--muted-2); letter-spacing: 0.03em; margin-bottom: 3px; }
.stat-value { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }

.progress { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width 0.4s; }

/* ---------- шахта ---------- */

.mine-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(23,221,98,0.22), transparent 62%),
    linear-gradient(180deg, rgba(14, 36, 26, 0.92), rgba(6, 18, 13, 0.94));
  border: 1px solid rgba(61,255,139,0.18);
  border-radius: 26px; padding: 20px 18px 18px;
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.mine-hero::before {
  content: ''; position: absolute; inset: -40% -10% auto; height: 70%;
  background: radial-gradient(ellipse at 50% 100%, rgba(61,255,139,0.14), transparent 60%);
}
.mine-coin { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.mine-coin .coin { width: 74px; height: 74px; }
.mine-coin .coin-face { font-size: 29px; }
.mine-balance { font-size: 40px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.mine-balance small { font-size: 16px; color: var(--muted); font-weight: 700; margin-left: 4px; }
.mine-usd { color: var(--muted); font-size: 13px; }
.mine-rate {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  padding: 7px 12px; border-radius: 11px; font-size: 12.5px; font-weight: 650;
  background: rgba(46,230,197,0.1); border: 1px solid rgba(46,230,197,0.22); color: #8bf3e0;
}
.mine-rig { display: flex; justify-content: center; gap: 4px; margin-top: 14px; opacity: 0.9; }
.mine-rig span {
  width: 5px; border-radius: 3px; background: linear-gradient(180deg, var(--teal), rgba(46,230,197,0.1));
  animation: bars 1.5s ease-in-out infinite;
}
.mine-rig span:nth-child(1) { height: 10px; animation-delay: 0s; }
.mine-rig span:nth-child(2) { height: 18px; animation-delay: .15s; }
.mine-rig span:nth-child(3) { height: 26px; animation-delay: .3s; }
.mine-rig span:nth-child(4) { height: 18px; animation-delay: .45s; }
.mine-rig span:nth-child(5) { height: 10px; animation-delay: .6s; }
@keyframes bars { 50% { transform: scaleY(0.35); opacity: 0.5; } }

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

.action-card {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border-radius: 15px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.035);
  text-align: left; transition: border-color 0.2s, background 0.2s;
}
.action-card:active { background: rgba(255,255,255,0.06); }
.action-card .ac-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; flex: 0 0 auto; }
.action-card .ac-title { font-size: 13px; font-weight: 700; line-height: 1.15; }
.action-card .ac-sub { font-size: 10.5px; color: var(--muted-2); }
.action-card.ready { border-color: rgba(61,255,139,0.35); box-shadow: 0 0 0 1px rgba(61,255,139,0.1), 0 8px 24px rgba(23,221,98,0.12); }

.news-list { display: flex; flex-direction: column; gap: 9px; }
.news-item { display: flex; gap: 9px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.news-item .ni-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted-2); margin-top: 5px; flex: 0 0 auto; }
.news-item.up .ni-dot { background: var(--green); box-shadow: 0 0 8px rgba(74,222,128,0.6); }
.news-item.down .ni-dot { background: var(--red); box-shadow: 0 0 8px rgba(251,113,133,0.6); }
.news-item.win .ni-dot { background: var(--gold); box-shadow: 0 0 8px rgba(61,255,139,0.6); }
.news-item.announce .ni-dot { background: var(--teal); box-shadow: 0 0 8px rgba(46,230,197,0.7); }
.news-item.announce { color: #cdf7ec; }
.news-item time { margin-left: auto; color: var(--muted-2); font-size: 10px; white-space: nowrap; }

/* ---------- рынок ---------- */

.price-block { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.price-big { font-size: 38px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.price-big small { font-size: 15px; color: var(--muted); font-weight: 700; margin-left: 3px; }
.price-chg { font-size: 13px; font-weight: 750; padding: 5px 9px; border-radius: 9px; }
.price-chg.up { color: #6ef0c2; background: rgba(46,230,197,0.1); }
.price-chg.down { color: #ff9aa8; background: rgba(251,113,133,0.1); }

.chart-box { position: relative; margin: 10px -4px 2px; }
.chart-box canvas { width: 100%; height: 180px; display: block; }
.chart-badge {
  position: absolute; top: 4px; right: 6px;
  font-size: 10px; color: var(--muted-2); padding: 3px 7px; border-radius: 7px;
  background: rgba(4,12,9,0.7); border: 1px solid var(--line);
}
.market-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.market-meta span { font-size: 11px; color: var(--muted-2); }
.market-meta b { color: var(--muted); font-weight: 650; }

.trade-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.trade-box { border-radius: 17px; border: 1px solid var(--line); padding: 13px; background: rgba(255,255,255,0.03); }
.trade-box.buy { border-color: rgba(74,222,128,0.22); background: rgba(74,222,128,0.045); }
.trade-box.sell { border-color: rgba(251,113,133,0.2); background: rgba(251,113,133,0.04); }
.trade-title { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; margin-bottom: 9px; }
.trade-input { display: flex; align-items: center; gap: 8px; background: rgba(4,12,9,0.6); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; }
.trade-input input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.trade-input span { font-size: 11px; color: var(--muted-2); font-weight: 700; }
.pcts { display: flex; gap: 5px; margin: 8px 0; }
.pct {
  flex: 1; padding: 6px 4px; border-radius: 8px; font-size: 10.5px; font-weight: 650;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--muted);
}
.pct:active { background: rgba(255,255,255,0.1); }
.trade-hint { font-size: 10.5px; color: var(--muted-2); margin: 6px 2px 9px; display: flex; justify-content: space-between; gap: 6px; }
.trade-hint b { color: var(--muted); }

.frozen-banner {
  display: flex; align-items: center; gap: 8px; font-size: 11.5px;
  padding: 8px 11px; border-radius: 10px; margin-bottom: 10px;
  background: rgba(96,165,250,0.1); border: 1px solid rgba(96,165,250,0.25); color: #a9ccff;
}

/* ---------- майнеры ---------- */

.miner-card { display: flex; gap: 12px; align-items: center; }
.miner-icon {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  font-size: 24px; flex: 0 0 auto; position: relative;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
}
.miner-icon::after { content: ''; position: absolute; inset: 0; border-radius: 15px; box-shadow: inset 0 0 24px var(--tint, rgba(255,255,255,0.1)); opacity: 0.5; }
.miner-body { flex: 1; min-width: 0; }
.miner-name { font-size: 14px; font-weight: 750; display: flex; align-items: center; gap: 7px; }
.miner-desc { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.miner-stats { display: flex; gap: 12px; margin-top: 6px; font-size: 11px; color: var(--muted); }
.miner-stats b { color: var(--text); font-weight: 700; }
.miner-buy {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
}
.miner-cost { font-size: 12px; font-weight: 750; color: var(--gold); white-space: nowrap; }
.miner-lvl { font-size: 10px; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,0.07); color: var(--muted); }
.miner-lvl.on { background: rgba(46,230,197,0.12); color: #7ef3dd; }

/* ---------- рулетка ---------- */

.wheel-card { text-align: center; padding-top: 10px; }
.wheel-wrap { position: relative; width: min(320px, 84vw); aspect-ratio: 1; margin: 6px auto 4px; }
.wheel-pointer {
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; z-index: 4;
  border-left: 11px solid transparent; border-right: 11px solid transparent;
  border-top: 20px solid var(--gold);
  filter: drop-shadow(0 3px 8px rgba(61,255,139,0.7));
}
.wheel-hub {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 22%; height: 22%; border-radius: 50%; z-index: 3;
  display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #2a3552, #101626 70%);
  border: 2px solid rgba(61,255,139,0.45);
  box-shadow: 0 0 22px rgba(61,255,139,0.25), inset 0 2px 8px rgba(255,255,255,0.08);
  font-weight: 900; font-size: 15px; color: var(--gold);
}
#wheel-canvas { width: 100%; height: 100%; display: block; transition: transform 4.4s cubic-bezier(.12,.86,.12,1); will-change: transform; border-radius: 50%; }
.wheel-glow { position: absolute; inset: -8%; border-radius: 50%; box-shadow: 0 0 60px rgba(23,221,98,0.22); pointer-events: none; }

.wheel-cur-tabs {
  display: flex; gap: 4px; width: fit-content; margin: 12px auto 8px;
  padding: 4px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}
.wheel-cur {
  min-width: 62px; padding: 6px 14px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted); font-size: 12px; font-weight: 800;
}
.wheel-cur.active {
  color: var(--gold); background: rgba(61,255,139,0.14);
  box-shadow: inset 0 0 0 1px rgba(61,255,139,0.35);
}
.wheel-amount { display: flex; align-items: stretch; gap: 7px; max-width: 340px; margin: 0 auto 7px; }
.wheel-amount .trade-input { flex: 1; padding: 10px 12px; }
.wheel-amount .trade-input:focus-within { border-color: rgba(61,255,139,0.45); }
.wheel-amount input { text-align: center; font-size: 18px; }
.wheel-amount input:disabled { opacity: 0.55; }
.wheel-max { flex: 0 0 auto; padding: 0 14px; font-size: 11px; }
.wheel-hint {
  display: flex; justify-content: space-between; gap: 8px; max-width: 340px;
  margin: 0 auto 9px; text-align: left; font-size: 10.5px; color: var(--muted-2);
}
.wheel-hint b { color: var(--muted); font-variant-numeric: tabular-nums; }
.wheel-hint .bad { color: #ff9aa9; }

.bet-row { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 12px 0 8px; }
.bet {
  padding: 8px 12px; border-radius: 10px; font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.bet.active { background: rgba(61,255,139,0.14); border-color: rgba(61,255,139,0.45); color: var(--gold); }
.bet:disabled, .wheel-cur:disabled { opacity: 0.45; }
.spin-btn { width: 100%; margin-top: 4px; }
.luck-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.luck-stat { background: rgba(255,255,255,0.035); border: 1px solid var(--line); border-radius: 12px; padding: 9px 6px; }
.luck-stat b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.luck-stat span { font-size: 9.5px; color: var(--muted-2); }

/* ---------- кейс в арене ---------- */

.case-card { overflow: hidden; }
.case-lead { font-size: 11.5px; line-height: 1.5; color: var(--muted); margin: 0 0 12px; }
.case-stage { margin: 0 -16px 0; }
.case-reel-wrap {
  position: relative; height: 142px; overflow: hidden;
  border-top: 1px solid rgba(61,255,139,.12);
  border-bottom: 1px solid rgba(61,255,139,.12);
  background:
    radial-gradient(circle at 50% 10%, rgba(61,255,139,.11), transparent 56%),
    linear-gradient(180deg, rgba(4,12,8,.8), rgba(2,8,5,.92));
}
.case-reel {
  --case-item-w: 92px;
  display: flex; align-items: stretch; gap: 10px;
  height: 100%; padding: 10px calc(50% - 46px);
  transform: translate3d(0,0,0);
  will-change: transform;
}
.case-item {
  flex: 0 0 var(--case-item-w); width: var(--case-item-w); min-width: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 7px 5px 6px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: inset 0 0 24px -9px var(--tint, #3dff8b), 0 8px 18px rgba(0,0,0,.22);
  overflow: hidden; position: relative;
}
.case-item::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint, #3dff8b) 30%, transparent);
}
.ci-rarity {
  font-size: 7px; line-height: 1; font-weight: 900; letter-spacing: .08em;
  text-transform: uppercase; color: var(--tint, var(--muted-2)); white-space: nowrap;
}
.ci-usb { display: flex; align-items: center; transform: rotate(-7deg); filter: drop-shadow(0 4px 6px rgba(0,0,0,.38)); }
.usb-head {
  width: 13px; height: 15px; border-radius: 2px 0 0 2px;
  background: linear-gradient(180deg, #e7fff4, #879b90);
  border: 1px solid rgba(255,255,255,.4); border-right: 0;
  display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-left: 2px;
}
.usb-head i { display: block; width: 4px; height: 2px; border-radius: 1px; background: #33443b; }
.usb-body {
  width: 54px; height: 35px; border-radius: 3px 6px 6px 3px;
  background:
    linear-gradient(125deg, rgba(255,255,255,.2), transparent 38%),
    linear-gradient(180deg, #294337, #12241b 62%, #0a1711);
  border: 1px solid color-mix(in srgb, var(--tint, #3dff8b) 60%, #253b30);
  box-shadow: 0 0 10px -2px var(--tint, #3dff8b);
  display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
  padding: 3px 4px 7px;
}
.usb-brand { font-size: 7px; line-height: 1; font-weight: 900; color: var(--tint, var(--gold)); letter-spacing: .08em; }
.usb-cap { font-size: 11px; line-height: 1.12; font-weight: 900; color: #f2fff8; white-space: nowrap; }
.usb-meter { position: absolute; left: 4px; right: 4px; bottom: 3px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.usb-meter i { display: block; height: 100%; border-radius: 2px; background: var(--tint, var(--gold)); box-shadow: 0 0 6px var(--tint, var(--gold)); }
.ci-value { font-size: 13px; line-height: 1; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ci-value small { font-size: 8px; color: var(--muted); }
.ci-odds { font-size: 7.5px; line-height: 1; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.case-item.tier-7, .case-item.tier-8, .case-item.tier-9 { border-color: color-mix(in srgb, var(--tint) 45%, transparent); }
.case-item.tier-9 { box-shadow: inset 0 0 32px -7px var(--tint), 0 0 24px -10px var(--tint); }

.case-item.miner { background: linear-gradient(180deg, rgba(61,255,139,.12), rgba(255,255,255,.025)); }
.case-item.miner .ci-miner-art { width: 100%; height: 56px; display: flex; align-items: center; justify-content: center; }
.case-item.miner .ci-miner-art .art-svg { width: 100%; height: auto; max-height: 58px; }
.case-item.miner .ci-name {
  max-width: 100%; font-size: 9px; line-height: 1.1; font-weight: 800; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text);
}
.case-item.jackpot {
  border-color: rgba(61,255,139,.6);
  box-shadow: inset 0 0 34px -8px #3dff8b, 0 0 26px -10px #3dff8b;
  animation: caseJackpot 2.2s ease-in-out infinite;
}
@keyframes caseJackpot { 50% { box-shadow: inset 0 0 44px -4px #3dff8b, 0 0 34px -6px #3dff8b; } }

.case-pointer {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; z-index: 5;
  transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(180deg, transparent, #3dff8b 14%, #3dff8b 86%, transparent);
  box-shadow: 0 0 16px rgba(61,255,139,.95);
}
.case-pointer::before, .case-pointer::after {
  content: ''; position: absolute; left: 50%; width: 0; height: 0; transform: translateX(-50%);
  border-left: 8px solid transparent; border-right: 8px solid transparent;
}
.case-pointer::before { top: 0; border-top: 11px solid #3dff8b; }
.case-pointer::after { bottom: 0; border-bottom: 11px solid #3dff8b; }
.case-reel-fade { position: absolute; top: 0; bottom: 0; width: 46px; z-index: 4; pointer-events: none; }
.case-reel-fade.left { left: 0; background: linear-gradient(90deg, #07140e, transparent); }
.case-reel-fade.right { right: 0; background: linear-gradient(270deg, #07140e, transparent); }

.case-prize-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 11px; }
.case-rare {
  padding: 4px 8px; border-radius: 8px; font-size: 9.5px; font-weight: 750;
  color: var(--muted); background: rgba(255,255,255,.045); border: 1px solid var(--line);
}
.case-rare.jackpot { color: #b6ffd0; border-color: rgba(61,255,139,.32); background: rgba(61,255,139,.1); }
.case-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: stretch; margin-top: 12px; }
.case-price-box {
  min-width: 96px; padding: 8px 11px; border-radius: 13px; text-align: left;
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: center;
}
.case-price-box span { font-size: 9px; color: var(--muted-2); }
.case-price-box b { font-size: 15px; color: var(--gold); font-variant-numeric: tabular-nums; }
.case-open-btn { width: 100%; min-height: 48px; }
.case-balance { margin-top: 8px; text-align: center; font-size: 10px; color: var(--muted-2); }
.case-balance b { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- список призов кейса ---------- */
.case-prize-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 14px; }
.case-prize-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px;
}
.case-prize-row.jackpot {
  border-color: rgba(61,255,139,.45);
  background: linear-gradient(180deg, rgba(61,255,139,.10), rgba(61,255,139,.04));
  box-shadow: 0 0 24px rgba(61,255,139,.08);
}
.cpr-art { flex: 0 0 auto; width: 72px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: rgba(0,0,0,.25); overflow: hidden; }
.cpr-art .art-svg { width: 100%; height: auto; max-height: 56px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.cpr-usb { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.cpr-usb .usb-head { width: 20px; height: 6px; background: #b9c4c0; border-radius: 2px 2px 0 0; margin-bottom: 4px; }
.cpr-usb .usb-head i { display: block; width: 6px; height: 6px; background: #94a3b8; border-radius: 50%; margin: 0 auto 1px; }
.cpr-usb .usb-body { width: 100%; height: 34px; background: linear-gradient(180deg, #2d4a40, #123024); border-radius: 0 0 4px 4px; border: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; align-items: center; padding-top: 4px; }
.cpr-usb .usb-brand { font-size: 8px; font-weight: 900; color: #a9ffc9; letter-spacing: 1px; }
.cpr-usb .usb-cap { font-size: 7px; color: #94a3b8; margin-top: 2px; }
.cpr-usb .usb-meter { width: 26px; height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.cpr-usb .usb-meter i { display: block; height: 100%; background: #3dff8b; border-radius: 3px; }
.cpr-info { flex: 1; min-width: 0; }
.cpr-name { font-size: 13px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cpr-desc { font-size: 9.5px; color: var(--muted-2); margin-top: 2px; }
.cpr-rarity { font-size: 9px; font-weight: 800; color: var(--muted-2); white-space: nowrap; }
.case-prize-row.jackpot .cpr-rarity { color: #a9ffc9; text-shadow: 0 0 10px rgba(61,255,139,.35); }
.cpr-chance { font-size: 11px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cpr-value { font-size: 12px; font-weight: 800; color: #3dff8b; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cpr-power { font-size: 10px; font-weight: 700; color: #60a5fa; white-space: nowrap; }

/* ---------- арена: вкладки ---------- */
.arena-tabs {
  display: flex; gap: 8px; margin: 0 0 16px; padding: 7px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.025));
  border: 1px solid var(--line-strong); border-radius: 18px;
  overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.arena-tabs::-webkit-scrollbar { display: none; }
.arena-tab {
  flex: 1 0 84px; min-width: 84px; min-height: 52px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 6px 8px; border-radius: 13px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  color: #dbe8e1; transition: transform .16s, box-shadow .16s, background .16s, border-color .16s;
}
.arena-tab:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: 0 6px 16px -6px var(--accent);
}
.arena-tab .at-ico { font-size: 19px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.arena-tab .at-label { font-size: 10.5px; font-weight: 900; letter-spacing: .01em; white-space: nowrap; }
.arena-tab.active {
  color: #fff;
  border-color: color-mix(in srgb, var(--accent) 75%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 34%, transparent), color-mix(in srgb, var(--accent) 10%, transparent));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), 0 8px 22px -8px var(--accent), inset 0 0 20px -10px var(--accent);
}
.arena-tab.active .at-ico { filter: drop-shadow(0 0 6px var(--accent)); }
@media (max-width: 520px) {
  .arena-tabs { gap: 6px; padding: 6px; margin-bottom: 12px; }
  .arena-tab { flex: 0 0 76px; min-width: 76px; min-height: 48px; }
  .arena-tab .at-ico { font-size: 17px; }
  .arena-tab .at-label { font-size: 9.5px; }
}

/* ---------- флешка: призы ---------- */
.case-allprizes { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.case-allprizes summary { list-style: none; cursor: pointer; text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding: 7px 0; }
.case-allprizes summary::-webkit-details-marker { display: none; }
.case-allprizes summary::after { content: ' ▾'; color: var(--gold); }
.case-allprizes[open] summary::after { content: ' ▴'; }
.usb-svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.ci-usb { width: 76px; height: 80px; transform: rotate(-6deg); filter: none; }
.cpr-art .usb-svg { width: 56px; height: 72px; }
.case-item.big .ci-usb { width: 98px; height: 102px; }

/* ---------- блэкджек ---------- */
.bj-wrap { padding: 14px; }
.bj-felt { position: relative; margin: 12px 0 10px; padding: 14px 12px; border-radius: 18px;
  background: radial-gradient(circle at 50% -12%, rgba(61,255,139,.20), transparent 58%), linear-gradient(180deg,#0d2a1d,#06170f);
  border: 1px solid rgba(61,255,139,.24); box-shadow: inset 0 0 60px rgba(0,0,0,.5), 0 10px 30px rgba(0,0,0,.3); overflow: hidden; }
.bj-felt::before { content: ''; position: absolute; inset: 8px; border: 1px dashed rgba(61,255,139,.12); border-radius: 14px; pointer-events: none; }
.bj-seat { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; z-index: 1; }
.bj-seat-label { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 10px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; color: rgba(200,255,222,.75); }
.bj-score { font-size: 12px; color: #d7ffe6; background: rgba(0,0,0,.42); border: 1px solid rgba(61,255,139,.35); border-radius: 999px; padding: 2px 10px; font-variant-numeric: tabular-nums; }
.bj-rule { display: flex; justify-content: space-between; gap: 10px; margin: 10px 6px; font-size: 8px; font-weight: 800; letter-spacing: .12em; color: rgba(170,255,205,.42); }
.bj-hand { display: flex; justify-content: center; align-items: center; gap: 6px; min-height: 84px; flex-wrap: wrap; }
.bj-empty { font-size: 11px; color: rgba(190,230,205,.45); padding: 22px 8px; }
.bj-card { position: relative; width: 56px; height: 80px; border-radius: 8px; background: linear-gradient(158deg,#fff,#e7f1ec); color: #15251d; box-shadow: 0 7px 16px -5px rgba(0,0,0,.7), inset 0 0 0 1px rgba(0,0,0,.09); overflow: hidden; flex: 0 0 auto; }
.bj-card.red { color: #d83232; }
.bj-corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 900; }
.bj-corner.tl { top: 5px; left: 6px; }
.bj-corner.br { bottom: 5px; right: 6px; transform: rotate(180deg); }
.bj-corner b { font-size: 13px; }
.bj-corner i { font-size: 10px; font-style: normal; }
.bj-pip { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 27px; opacity: .82; }
.bj-card.hidden { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg,#155f42,#082719); border: 2px solid rgba(61,255,139,.45); box-shadow: 0 7px 16px -5px rgba(0,0,0,.7), inset 0 0 18px rgba(61,255,139,.2); }
.bj-back { font-size: 24px; color: #8affe0; }
.bj-hand .bj-card:nth-child(1) { transform: rotate(-3deg); }
.bj-hand .bj-card:nth-child(3) { transform: rotate(3deg); }
.bj-result { margin: 10px 0; padding: 11px 14px; border-radius: 12px; text-align: center; display: flex; flex-direction: column; gap: 3px; }
.bj-result b { font-size: 14px; font-weight: 900; }
.bj-result span { font-size: 11px; opacity: .85; }
.bj-result.win { background: rgba(61,255,139,.15); border: 1px solid rgba(61,255,139,.42); color: #c8ffdd; }
.bj-result.even { background: rgba(251,191,36,.14); border: 1px solid rgba(251,191,36,.4); color: #ffe3a3; }
.bj-result.loss { background: rgba(251,113,133,.14); border: 1px solid rgba(251,113,133,.4); color: #ffc0cb; }
.bj-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 9px; }
.bj-chip { min-width: 52px; padding: 7px 11px; border-radius: 999px; border: 1px solid rgba(61,255,139,.3); background: rgba(61,255,139,.08); color: #c9ffdd; font-size: 11px; font-weight: 800; }
.bj-chip.all { border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.1); color: #ffe6a3; }
.bj-bet-row { display: flex; gap: 8px; }
.bj-bet-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); }
.bj-bet-field span { font-size: 10px; color: var(--muted-2); }
.bj-bet-field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 15px; font-weight: 900; text-align: right; }
.bj-go { flex: 0 0 auto; width: auto; min-width: 132px; margin-top: 0; }
.bj-actions { display: flex; gap: 8px; }
.bj-act { flex: 1; min-height: 48px; font-size: 13px; }
.bj-act span { margin-right: 4px; }
.bj-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 11px; font-size: 10.5px; color: var(--muted-2); }
.bj-foot b { color: var(--gold); font-variant-numeric: tabular-nums; }

.result-meta { margin-top: 8px; font-size: 10.5px; color: var(--muted-2); }
.case-result { width: min(360px, 90vw); }
.cr-kicker { font-size: 9.5px; font-weight: 900; letter-spacing: .12em; color: var(--gold); text-transform: uppercase; }
.cr-art { display: flex; justify-content: center; margin: 9px 0 7px; }
.case-item.big { flex: 0 0 auto; width: 148px; height: 142px; padding: 9px 7px 8px; border-radius: 17px; }
.case-item.big .ci-rarity { font-size: 8px; }
.case-item.big .ci-usb { transform: rotate(-7deg) scale(1.16); }
.case-item.big .ci-value { font-size: 18px; }
.case-item.big .ci-odds { font-size: 9px; }
.case-item.big .ci-miner-art { height: 72px; }
.case-item.big .ci-miner-art .art-svg { max-height: 72px; }
.case-item.big .ci-name { font-size: 10px; }
.cr-title { font-size: 24px; line-height: 1.08; font-weight: 900; letter-spacing: -.03em; color: var(--text); }
.cr-sub { margin-top: 7px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.cr-sub b { color: var(--text); }
.cr-meta { margin-top: 7px; font-size: 10px; color: var(--muted-2); }
.case-result .btn { margin-top: 14px; width: 100%; }
.case-result.win { border-color: rgba(61,255,139,.35); }
.case-result.win .cr-title { color: #a9ffc9; }
.case-result.even .cr-title { color: #fbbf24; }
.case-result.loss { border-color: rgba(251,113,133,.35); }
.case-result.loss .cr-title { color: #ffb3c0; }
.case-result.jackpot { border-color: rgba(61,255,139,.55); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 70px rgba(61,255,139,.24); }
.case-result.jackpot .cr-title { color: #a9ffc9; }
.case-result.usd { border-color: rgba(250,204,21,.42); }
.case-result.usd .cr-title { color: #fde68a; }

@media (max-width: 380px) {
  .case-reel { --case-item-w: 78px; gap: 8px; padding: 9px calc(50% - 39px); }
  .case-reel-wrap { height: 132px; }
  .usb-body { width: 46px; height: 32px; }
  .usb-cap { font-size: 10px; }
  .case-actions { grid-template-columns: 1fr; }
  .case-price-box { flex-direction: row; align-items: baseline; justify-content: space-between; }
}

.result-pop {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(2,8,6,0.72); backdrop-filter: blur(6px);
  animation: fadeIn 0.2s both;
}
.result-card {
  width: min(320px, 86vw); padding: 26px 20px; text-align: center;
  border-radius: 24px; border: 1px solid rgba(61,255,139,0.3);
  background: linear-gradient(180deg, #0e2419, #071710);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(61,255,139,0.12);
  animation: pop 0.35s cubic-bezier(.2,1.4,.4,1) both;
}
.result-mult { font-size: 46px; font-weight: 900; line-height: 1; letter-spacing: -0.04em; }
.result-sum { margin-top: 8px; font-size: 15px; color: var(--muted); }
.result-sum b { color: var(--text); font-size: 20px; }
.result-card .btn { margin-top: 18px; width: 100%; }
@keyframes pop { from { transform: scale(0.8); opacity: 0; } }
@keyframes fadeIn { from { opacity: 0; } }

/* ---------- топ ---------- */

.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin-bottom: 14px; }
.pod {
  text-align: center; padding: 12px 8px; border-radius: 16px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.pod.first { padding: 20px 8px 16px; background: linear-gradient(180deg, rgba(61,255,139,0.16), rgba(61,255,139,0.03)); border-color: rgba(61,255,139,0.3); }
.pod .pod-place { font-size: 20px; margin-bottom: 2px; }
.pod .pod-ava { width: 40px; height: 40px; border-radius: 12px; margin: 0 auto 6px; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: rgba(255,255,255,0.08); border: 1px solid var(--line); }
.pod.first .pod-ava { width: 48px; height: 48px; background: linear-gradient(135deg, #a9ffc9, #17dd62); color: #03230f; }
.pod .pod-name { font-size: 12px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod .pod-worth { font-size: 11px; color: var(--gold); font-variant-numeric: tabular-nums; margin-top: 2px; }

.top-list-head { font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 4px 4px 2px; }

.top-row {
  display: flex; align-items: center; gap: 11px; padding: 11px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.top-row:last-child { border-bottom: 0; }
.top-place { width: 26px; text-align: center; font-weight: 800; color: var(--muted-2); font-size: 13px; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.top-ava { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,0.06); border: 1px solid var(--line); font-weight: 750; font-size: 12px; flex: 0 0 auto; }
.top-name { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.top-sub { font-size: 10.5px; color: var(--muted-2); }
.top-worth { margin-left: auto; text-align: right; }
.top-worth b { display: block; font-size: 13px; font-variant-numeric: tabular-nums; }
.top-worth span { font-size: 9.5px; color: var(--muted-2); }
.top-row.me { background: rgba(61,255,139,0.06); border-radius: 12px; padding-left: 8px; padding-right: 8px; border-bottom-color: transparent; }

/* ---------- профиль ---------- */

.profile-hero { display: flex; align-items: center; gap: 14px; }
.profile-ava {
  width: 62px; height: 62px; border-radius: 19px; display: grid; place-items: center;
  font-size: 24px; font-weight: 900; color: #03230f;
  background: linear-gradient(135deg, #a9ffc9, #17dd62);
  box-shadow: 0 10px 30px rgba(23,221,98,0.3);
}
.profile-name { font-size: 20px; font-weight: 850; letter-spacing: -0.01em; }
.profile-rank { font-size: 12px; color: var(--muted); margin-top: 3px; }

.owner-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px;
  border-radius: 15px; border: 1px solid rgba(46,230,197,0.35);
  background: linear-gradient(135deg, rgba(46,230,197,0.16), rgba(96,165,250,0.08));
  text-align: left;
}
.owner-btn .ob-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: rgba(46,230,197,0.2); font-size: 18px; }
.owner-btn .ob-title { font-size: 13.5px; font-weight: 750; }
.owner-btn .ob-sub { font-size: 10.5px; color: var(--muted); }

.menu-list { display: flex; flex-direction: column; }
.menu-item { display: flex; align-items: center; gap: 11px; padding: 13px 2px; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13.5px; text-align: left; width: 100%; }
.menu-item:last-child { border-bottom: 0; }
.menu-item .mi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,0.05); font-size: 15px; }
.menu-item .mi-arrow { margin-left: auto; color: var(--muted-2); }

/* ---------- навигация ---------- */

.nav {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 496px);
  height: var(--nav-h);
  display: grid; grid-template-columns: repeat(7, 1fr);
  background: rgba(8, 22, 16, 0.9);
  border: 1px solid var(--line);
  border-radius: 22px;
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  padding: 6px;
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border-radius: 14px; color: var(--muted-2);
  transition: color 0.18s, background 0.18s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.nav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn span { font-size: 8.8px; font-weight: 650; letter-spacing: 0.01em; }
.nav-btn.active { color: var(--gold); background: rgba(61,255,139,0.09); }
.nav-btn.active svg { filter: drop-shadow(0 0 6px rgba(61,255,139,0.5)); }
.nav-btn { position: relative; }
.nav-badge {
  position: absolute; top: 2px; right: 50%; transform: translateX(20px);
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  display: grid; place-items: center; font-size: 9.5px; font-weight: 800; letter-spacing: 0;
  background: linear-gradient(180deg, #ff6b8a, #e11d48); color: #fff;
  box-shadow: 0 3px 10px rgba(225,29,72,0.6);
}

/* ---------- тосты, шит, конфетти ---------- */

.toasts {
  position: fixed; z-index: 90; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none;
  width: min(92vw, 440px);
}
.toast {
  padding: 11px 16px; border-radius: 13px; font-size: 13px; font-weight: 600;
  background: rgba(11, 28, 20, 0.96); border: 1px solid var(--line-strong);
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  animation: toastIn 0.25s ease both;
  text-align: center;
}
.toast.good { border-color: rgba(46,230,197,0.4); color: #a5f7e8; }
.toast.bad { border-color: rgba(251,113,133,0.4); color: #ffb3c0; }
.toast.gold { border-color: rgba(61,255,139,0.45); color: #a9ffc9; }
.toast.ann { border-color: rgba(61,255,139,0.5); color: #d8ffe8; background: rgba(13,34,24,0.97); text-align: left; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* объявления игрокам */
.ann-list { display: flex; flex-direction: column; gap: 9px; max-height: 56vh; overflow-y: auto; margin: 4px 0 2px; }
.ann-item {
  padding: 11px 13px; border-radius: 13px; background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}
.ann-text { font-size: 13.5px; line-height: 1.4; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.ann-foot { display: flex; align-items: center; gap: 8px; margin-top: 7px; font-size: 10.5px; color: var(--muted-2); }
.ann-foot .ann-by { color: var(--gold); font-weight: 700; }

.sheet-wrap { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(2,8,6,0.7); backdrop-filter: blur(5px); }
.sheet {
  position: relative; width: min(100%, 520px); max-height: 88dvh; overflow-y: auto;
  background: linear-gradient(180deg, #0c1f16, #061410);
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom));
  animation: sheetUp 0.28s cubic-bezier(.2,.9,.3,1) both;
  box-shadow: 0 -20px 60px rgba(0,0,0,0.6);
}
@keyframes sheetUp { from { transform: translateY(30px); opacity: 0.5; } }
.sheet-grip { width: 40px; height: 4px; border-radius: 3px; background: var(--line-strong); margin: 0 auto 14px; }
.sheet h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.sheet .sheet-sub { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.owner-section { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 13px; margin-top: 13px; }
.owner-section h4 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 9px; }
.owner-row { display: flex; gap: 7px; margin-bottom: 8px; }
.owner-row input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 11px; font-size: 13px;
  background: rgba(4,12,9,0.7); border: 1px solid var(--line); outline: none;
}
.owner-row input:focus { border-color: rgba(61,255,139,0.4); }
.owner-log { max-height: 160px; overflow-y: auto; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
.owner-log div { display: flex; gap: 8px; }
.owner-log time { color: var(--muted-2); font-variant-numeric: tabular-nums; flex: 0 0 auto; }

/* редактор игрока во владельческой панели */
.ow-pe-body { margin-top: 4px; }
.ow-pe-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; margin: 8px 0 10px; }
.ow-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ow-field span { font-size: 10px; color: var(--muted); padding-left: 4px; }
.ow-field input {
  width: 100%; min-width: 0; padding: 9px 11px; border-radius: 10px; font-size: 13px;
  background: rgba(4,12,9,0.7); border: 1px solid var(--line); outline: none;
}
.ow-field input:focus { border-color: rgba(61,255,139,0.4); }
.ow-field .owner-select { width: 100%; }
.ow-miners { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; max-height: 220px; overflow-y: auto; }
.ow-miner { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 10px; padding: 5px 8px; }
.ow-miner-name { flex: 1; min-width: 0; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ow-miner-lvl { width: 54px; flex: 0 0 auto; padding: 6px 8px; border-radius: 8px; font-size: 12px; text-align: center; background: rgba(4,12,9,0.7); border: 1px solid var(--line); outline: none; }
.ow-miner-lvl:focus { border-color: rgba(61,255,139,0.4); }
.ow-textarea {
  width: 100%; min-height: 84px; resize: vertical; padding: 10px 12px; border-radius: 11px;
  font-size: 13px; font-family: inherit; line-height: 1.4; color: var(--text);
  background: rgba(4,12,9,0.7); border: 1px solid var(--line); outline: none; margin-bottom: 8px;
}
.ow-textarea:focus { border-color: rgba(61,255,139,0.4); }
.ow-check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin: 2px 0 10px; cursor: pointer; }
.ow-check input { width: 16px; height: 16px; accent-color: var(--teal); flex: 0 0 auto; }
.ow-details { margin: 8px 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px 11px; background: rgba(255,255,255,0.02); }
.ow-details summary { font-size: 11.5px; color: var(--muted); cursor: pointer; text-transform: uppercase; letter-spacing: 0.04em; }
.ow-details[open] summary { margin-bottom: 10px; }

/* управление фоновыми ботами во владельческой панели */
.ow-bots { display: flex; flex-direction: column; gap: 7px; max-height: 380px; overflow-y: auto; margin-top: 10px; padding-right: 2px; }
.ow-bot { background: rgba(255,255,255,0.025); border: 1px solid var(--line); border-radius: 13px; padding: 9px 10px; }
.ow-bot.off { opacity: 0.56; }
.ow-bot-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; }
.ow-bot-head b { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ow-bot-meta { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.ow-bot-actions { display: flex; gap: 6px; margin-top: 7px; }
.ow-bot-actions .btn { flex: 1; padding: 7px 8px; font-size: 11px; }

/* заявки и награды во владельческой панели */
.ow-reports { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; padding-right: 2px; }
.ow-report { background: rgba(255,255,255,0.025); border: 1px solid var(--line); border-radius: 13px; padding: 10px 11px; }
.ow-report-head { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-size: 12.5px; }
.ow-report-head b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ow-report-status { flex: 0 0 auto; font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.ow-report-status.ok { color: var(--teal); border-color: rgba(46,230,197,0.3); }
.ow-report-status.wait { color: var(--gold); border-color: rgba(224,184,79,0.35); }
.ow-report-status.no { color: #ef5f4d; border-color: rgba(239,95,77,0.3); }
.ow-report-meta { color: var(--muted); font-size: 10.5px; margin-top: 4px; }
.ow-report-text { color: var(--text); font-size: 11.5px; line-height: 1.45; margin-top: 5px; white-space: pre-wrap; }
.ow-report-reward { color: var(--gold); font-size: 11.5px; margin-top: 5px; }

.confetti { position: fixed; inset: 0; z-index: 85; pointer-events: none; }

/* ---------- загрузка ---------- */

.skeleton { position: relative; overflow: hidden; background: rgba(255,255,255,0.05); border-radius: 10px; color: transparent; }
.skeleton::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07), transparent);
  animation: sk 1.4s infinite;
}
@keyframes sk { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(0,0,0,0.25); border-top-color: #03230f; animation: rot 0.7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

.ban-screen { padding: 40px 20px; text-align: center; }
.ban-screen .ban-emoji { font-size: 54px; }
.ban-screen h2 { font-size: 22px; margin: 12px 0 6px; }
.ban-screen p { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* ---------- 2FA и защита ---------- */

.twofa-lead { font-size: 13.5px; color: var(--text); line-height: 1.5; margin-bottom: 14px; text-align: center; }
#twofa-code { letter-spacing: 8px; font-size: 20px; text-align: center; font-variant-numeric: tabular-nums; }

.sec-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.sec-icon {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px;
  background: rgba(46,230,197,0.1); border: 1px solid rgba(46,230,197,0.22); flex: 0 0 auto;
}
.sec-title { font-size: 14.5px; font-weight: 700; }
.sec-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; line-height: 1.4; }
.tg-box { display: flex; flex-direction: column; }
.tg-link-out {
  margin-top: 11px; padding: 12px; border-radius: 13px;
  background: rgba(4,12,9,0.6); border: 1px solid var(--line); text-align: center;
}
.tg-code-label { font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.tg-code {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 25px; font-weight: 700;
  letter-spacing: 4px; color: var(--gold);
}

/* ---------- майнеры: настоящие рисунки (SVG) ---------- */

.miner-list { display: flex; flex-direction: column; gap: 12px; }

.miner-card {
  position: relative; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(13, 34, 25, 0.85), rgba(7, 20, 14, 0.94)),
    radial-gradient(circle at 80% -10%, rgba(255,255,255,0.03), transparent 55%);
  border: 1px solid var(--line); border-radius: 24px;
  padding: 14px 14px 12px; margin-bottom: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  display: flex; flex-direction: column; gap: 11px;
}
.miner-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.46), 0 0 24px var(--tintglow, rgba(61, 255, 139, 0.10));
  border-color: rgba(var(--tint-rgb, 61, 255, 139), 0.45);
}
.miner-card::after {
  content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  border-radius: 3px; background: var(--tint, var(--gold)); opacity: 0.9;
  box-shadow: 0 0 18px var(--tint, var(--gold));
}
.miner-card.locked {
  opacity: .62; filter: saturate(.5) brightness(.85);
  pointer-events: auto;
}
.miner-card.locked .miner-art-wrap { filter: grayscale(.55) contrast(.9); }
.miner-card.locked::after { opacity: .35; box-shadow: none; }
.miner-card.locked .miner-tier { background: rgba(15,23,18,.55); border-color: rgba(255,255,255,.12); color: #94a3b8; }
.miner-card.broken {
  border-color: rgba(239,68,68,.45);
}
.miner-card.broken::after { background: #ef4444; box-shadow: 0 0 18px rgba(239,68,68,.45); }
.miner-card.broken .miner-name { color: #fca5a5; }

.miner-art-wrap {
  position: relative; border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(circle at 50% 25%, rgba(255,255,255,0.07), transparent 65%),
    linear-gradient(180deg, rgba(4,12,9,0.5), rgba(4,12,9,0.9));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: inset 0 0 20px rgba(0,0,0,.35);
  min-height: 150px; display: flex; align-items: center; justify-content: center;
}
.miner-art-wrap::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,0) 45%, rgba(255,255,255,.03) 100%);
  pointer-events: none; z-index: 1;
}
.miner-art { width: 100%; max-width: 240px; }
.miner-art .art-svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }

.miner-art .art-fan { transform-box: fill-box; transform-origin: center; animation: artSpin var(--spin, 1.4s) linear infinite; }
@keyframes artSpin { to { transform: rotate(360deg); } }
.miner-art .art-led { animation: artBlink 1.9s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes artBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.16; } }
.miner-art .art-bubble { transform-box: fill-box; transform-origin: center; animation: artRise 3.4s ease-in infinite; animation-delay: var(--d, 0s); }
@keyframes artRise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 0.95; } 100% { transform: translateY(-52px); opacity: 0; } }
.miner-art .art-flow { stroke-dasharray: 6 10; animation: artFlow 1.1s linear infinite; }
@keyframes artFlow { to { stroke-dashoffset: -32; } }
.miner-art .art-pulse { transform-box: fill-box; transform-origin: center; animation: artPulse 2.4s ease-in-out infinite; }
@keyframes artPulse { 0%, 100% { transform: scale(1); opacity: .92; } 50% { transform: scale(1.14); opacity: 1; } }

.miner-tier, .miner-lvl-pill {
  position: absolute; top: 12px; font-size: 10px; font-weight: 900; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 10px; backdrop-filter: blur(7px); z-index: 3; text-transform: uppercase;
}
.miner-tier { left: 12px; background: rgba(4,12,9,0.75); border: 1px solid var(--line-strong); color: var(--text); }
.miner-tier::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--tint, var(--gold)); margin-right: 6px; box-shadow: 0 0 10px var(--tint, var(--gold)); }
.miner-lvl-pill { right: 12px; background: rgba(61,255,139,0.18); border: 1px solid rgba(61,255,139,0.45); color: #b6ffd0; }

.miner-lock {
  position: absolute; right: 14px; bottom: 12px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(4,12,9,0.7); border: 1px solid var(--line); color: #94a3b8;
  display: grid; place-items: center; font-size: 14px; z-index: 3;
  box-shadow: 0 6px 14px rgba(0,0,0,.45);
}
.miner-card.locked .miner-lock { display: grid; }
.miner-card:not(.locked) .miner-lock { display: none; }

.miner-info { margin-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.miner-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.miner-name { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.miner-share { font-size: 11px; font-weight: 700; color: var(--tint, var(--gold)); white-space: nowrap; }
.miner-desc { font-size: 11px; color: var(--muted-2); margin-top: 2px; line-height: 1.45; }
.miner-specs { display: flex; gap: 8px; }
.spec {
  flex: 1; display: flex; flex-direction: column; gap: 1px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 10px;
}
.spec i { font-style: normal; font-size: 12px; line-height: 1; }
.spec b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.spec u { text-decoration: none; font-size: 9.5px; color: var(--muted-2); }

.miner-bar-wrap { margin-top: 2px; }
.miner-bar { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; border: 1px solid rgba(255,255,255,0.06); }
.miner-bar i { display: block; height: 100%; border-radius: 4px; background: var(--tint, var(--gold)); transition: width .4s, background .3s; box-shadow: 0 0 12px var(--tint, var(--gold)); }
.miner-card.damaged .miner-bar i { background: #fbbf24; }
.miner-card.broken .miner-bar i { background: #ef4444; }

.miner-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.miner-cost-box { display: flex; flex-direction: column; }
.miner-cost-box .tiny { margin-bottom: 1px; }
.miner-cost { font-size: 16px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.miner-buy-btn { min-width: 118px; }

@media (max-width: 520px) {
  .miner-card { padding: 12px 12px 10px; gap: 9px; border-radius: 20px; margin-bottom: 12px; }
  .miner-art-wrap { min-height: 130px; border-radius: 16px; }
  .miner-name { font-size: 14px; }
  .spec { padding: 7px 9px; gap: 1px; }
  .spec b { font-size: 13px; }
  .miner-tier, .miner-lvl-pill { font-size: 9px; padding: 3px 8px; top: 10px; }
  .miner-tier { left: 10px; } .miner-lvl-pill { right: 10px; }
}

.miner-info { margin-top: 12px; }
.miner-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.miner-name { font-size: 15.5px; font-weight: 800; letter-spacing: -0.01em; }
.miner-share { font-size: 11px; font-weight: 700; color: var(--tint, var(--gold)); white-space: nowrap; }
.miner-desc { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; line-height: 1.4; }
.miner-specs { display: flex; gap: 8px; margin-top: 10px; }
.spec {
  flex: 1; display: flex; flex-direction: column; gap: 1px;
  background: rgba(255,255,255,0.035); border: 1px solid var(--line);
  border-radius: 12px; padding: 8px 10px;
}
.spec i { font-style: normal; font-size: 12px; line-height: 1; }
.spec b { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.spec u { text-decoration: none; font-size: 9.5px; color: var(--muted-2); }
.miner-bar { height: 5px; border-radius: 4px; background: rgba(255,255,255,0.07); overflow: hidden; margin-top: 10px; }
.miner-bar i { display: block; height: 100%; border-radius: 4px; background: var(--tint, var(--gold)); transition: width 0.4s; }
.miner-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.miner-cost-box { display: flex; flex-direction: column; }
.miner-cost-box .tiny { margin-bottom: 1px; }
.miner-cost { font-size: 16px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.miner-buy-btn { min-width: 118px; }

.farm-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 15% 0%, rgba(61,255,139,0.18), transparent 60%),
    linear-gradient(180deg, rgba(14, 36, 26, 0.92), rgba(6, 18, 13, 0.94));
  border: 1px solid rgba(61,255,139,0.18);
  border-radius: 24px; padding: 16px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.farm-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 12px; }
.farm-stat { background: rgba(255,255,255,0.04); border: 1px solid var(--line); border-radius: 13px; padding: 9px 10px; }
.farm-stat b { display: block; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.farm-stat span { font-size: 9.5px; color: var(--muted-2); }

/* ---------- друзья ---------- */

.friend-search { display: flex; gap: 8px; }
.friend-search input {
  flex: 1; min-width: 0; padding: 13px 14px;
  background: rgba(5, 15, 11, 0.9); border: 1px solid var(--line);
  border-radius: 14px; outline: none; font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.friend-search input:focus { border-color: rgba(61,255,139,0.55); box-shadow: 0 0 0 3px rgba(61,255,139,0.12); }
.friend-search .btn { flex: 0 0 auto; }

.fr-list { display: flex; flex-direction: column; }
.fr-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.fr-row:last-child { border-bottom: 0; }
.fr-ava {
  width: 42px; height: 42px; border-radius: 13px; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line); position: relative;
}
.fr-ava.on::after,
.pod-ava.on::after,
.top-ava.on::after,
.profile-ava.on::after {
  content: ''; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--gold); border: 2px solid #08140f;
  box-shadow: 0 0 8px rgba(61,255,139,0.8);
}
.pod-ava, .top-ava, .profile-ava { position: relative; }
.on-chip {
  display: inline-block; vertical-align: middle; margin-left: 6px; padding: 1px 7px;
  border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: 0.02em;
  color: #03230f; background: var(--gold); box-shadow: 0 0 10px rgba(61,255,139,0.5);
}
.fr-tap { text-align: left; display: block; }
.fr-name { font-size: 13.5px; font-weight: 750; display: flex; align-items: center; gap: 6px; }
.fr-sub { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.fr-online { color: var(--gold); font-weight: 700; }
.fr-worth { margin-left: auto; text-align: right; flex: 0 0 auto; }
.fr-worth b { display: block; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.fr-worth span { font-size: 9px; color: var(--muted-2); }
.fr-x {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; color: var(--muted-2);
  display: grid; place-items: center; font-size: 14px; background: rgba(255,255,255,0.04);
}
.fr-x:active { color: var(--red); }
.fr-empty { text-align: center; padding: 20px 10px 10px; color: var(--muted); }
.fr-empty-ico { font-size: 34px; margin-bottom: 8px; opacity: 0.7; }
.fr-empty p { font-size: 12.5px; line-height: 1.5; }

.top-addfr {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; font-size: 17px; font-weight: 800;
  background: rgba(61,255,139,0.12); border: 1px solid rgba(61,255,139,0.32); color: var(--gold);
}
.top-addfr:active { transform: scale(0.94); }
.top-frst { flex: 0 0 auto; font-size: 10px; font-weight: 700; padding: 5px 8px; border-radius: 9px; color: var(--muted-2); background: rgba(255,255,255,0.05); }
.top-frst.friend { color: #b6ffd0; background: rgba(61,255,139,0.12); }
.top-frst.sent { color: #7ef3dd; background: rgba(46,230,197,0.1); }
.pod .top-addfr { margin: 6px auto 0; width: 28px; height: 28px; font-size: 15px; }
.pod .top-frst { display: inline-block; margin-top: 5px; }

/* ---------- роли ---------- */
.role-chip {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 4px 7px; border-radius: 8px;
  color: var(--rc, var(--gold));
  border: 1px solid var(--rc, rgba(61,255,139,0.4));
  background: rgba(255,255,255,0.05);
  white-space: nowrap;
}
.top-roles, .fr-roles, .pod-roles, .profile-roles { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.pod-roles { justify-content: center; }
.profile-roles { margin-top: 7px; }
.owner-select {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 11px; font-size: 13px;
  background: rgba(4,12,9,0.7); border: 1px solid var(--line); outline: none;
}
.owner-select:focus { border-color: rgba(61,255,139,0.4); }
.owner-row input[type="color"] { flex: 0 0 auto; padding: 2px; height: 38px; cursor: pointer; }
.role-list { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.role-item { display: flex; align-items: center; gap: 7px; }

@media (min-width: 420px) {
  .trade-grid { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- кнопка музыки ---------- */

.music-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; min-width: 36px; padding: 0 11px; border-radius: 12px; flex: 0 0 auto;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); color: var(--muted-2);
  transition: color .2s, border-color .2s, background .2s, box-shadow .2s;
}
.music-btn:hover { color: var(--text); border-color: var(--line-strong); }
.music-btn .mb-bars { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 15px; }
.music-btn .mb-bars i {
  width: 2.5px; height: 4px; border-radius: 2px; background: currentColor; opacity: .55;
  transition: height .25s, opacity .25s, background .25s;
}
.music-btn.on {
  color: #a9ffc9; border-color: rgba(61,255,139,.45); background: rgba(61,255,139,.10);
  box-shadow: 0 0 16px rgba(61,255,139,.18);
}
.music-btn.on .mb-bars i {
  opacity: 1; background: linear-gradient(180deg, #a9ffc9, #17dd62);
  animation: mbBar 1.05s ease-in-out infinite;
}
.music-btn.on .mb-bars i:nth-child(1) { animation-delay: 0s; }
.music-btn.on .mb-bars i:nth-child(2) { animation-delay: .16s; }
.music-btn.on .mb-bars i:nth-child(3) { animation-delay: .32s; }
.music-btn.on .mb-bars i:nth-child(4) { animation-delay: .48s; }
@keyframes mbBar { 0%, 100% { height: 4px; } 50% { height: 15px; } }
.music-btn .mb-label { font-size: 11px; font-weight: 700; }

.snow-btn .snow-icon {
  width: 18px; height: 18px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.snow-btn.on {
  color: #e3f6ff; border-color: rgba(147,197,253,.5); background: rgba(96,165,250,.10);
  box-shadow: 0 0 16px rgba(96,165,250,.20);
}
.snow-btn.on .snow-icon { animation: snowSpin 18s linear infinite; }
@keyframes snowSpin { to { transform: rotate(360deg); } }
.tb-right .snow-btn { padding: 0 9px; }
@media (max-width: 439px) {
  .tb-right .snow-btn { display: none; }
}

.snow-switch {
  width: 46px; height: 26px; padding: 3px; border-radius: 999px; flex: 0 0 auto;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line);
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.snow-switch i {
  display: block; width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted-2);
  transition: transform .2s, background .2s, box-shadow .2s;
}
.snow-switch.on {
  background: rgba(96,165,250,.16); border-color: rgba(147,197,253,.5);
  box-shadow: 0 0 14px rgba(96,165,250,.16);
}
.snow-switch.on i {
  transform: translateX(20px); background: #dff6ff;
  box-shadow: 0 0 10px rgba(147,197,253,.55);
}
.snow-switch:focus-visible { outline: 2px solid rgba(147,197,253,.6); outline-offset: 2px; }

.auth { position: relative; }
.auth-fx {
  position: absolute; z-index: 6;
  top: calc(14px + env(safe-area-inset-top)); right: 16px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
@media (max-width: 379px) {
  .auth-fx .mb-label { display: none; }
}

/* ---------- город ---------- */

.city-hero {
  position: relative; overflow: hidden; border-radius: 24px;
  border: 1px solid var(--line); margin-bottom: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(61,255,139,.14), transparent 62%),
    linear-gradient(180deg, rgba(10,26,20,.9), rgba(5,14,10,.95));
  box-shadow: var(--shadow);
}
.city-art { position: relative; width: 100%; aspect-ratio: 320 / 200; }
.city-art .city-svg { display: block; width: 100%; height: 100%; }
.city-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  padding: 30px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(3,9,6,.86) 72%);
}
.city-name { font-size: 20px; font-weight: 850; letter-spacing: -.01em; text-shadow: 0 2px 10px rgba(0,0,0,.65); }
.city-level { font-size: 11px; color: var(--muted); margin-top: 2px; }
.city-chip {
  font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 11px; white-space: nowrap;
  background: rgba(61,255,139,.14); border: 1px solid rgba(61,255,139,.4); color: #b6ffd0;
}
.city-desc { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 10px; }
.city-next { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.city-next-name { font-size: 15px; font-weight: 800; }
.city-next-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.city-cost { text-align: right; }
.city-cost b { display: block; font-size: 16px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.city-done { font-size: 14px; color: #b6ffd0; padding: 4px 0; }
.city-road { display: flex; flex-direction: column; gap: 2px; }
.city-step { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 12px; }
.city-step.now { background: rgba(61,255,139,.09); }
.city-step-dot {
  width: 24px; height: 24px; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: var(--muted-2);
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
}
.city-step.done .city-step-dot { background: linear-gradient(135deg, #a9ffc9, #17dd62); color: #03230f; border-color: transparent; }
.city-step b { font-size: 13px; font-weight: 700; }
.city-step small { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 1px; }

/* анимации города */
.city-svg .city-blink { animation: cityBlink 1.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes cityBlink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.city-svg .city-twinkle { animation: cityTwinkle 3s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes cityTwinkle { 0%, 100% { opacity: .2; } 50% { opacity: .95; } }
.city-svg .city-smoke { transform-box: fill-box; transform-origin: center; animation: citySmoke 4s ease-out infinite; animation-delay: var(--d, 0s); }
@keyframes citySmoke { 0% { transform: translateY(0) scale(.7); opacity: .35; } 100% { transform: translateY(-22px) scale(1.7); opacity: 0; } }
.city-svg .city-windmill { transform-box: fill-box; transform-origin: center; animation: citySpin 4s linear infinite; }
@keyframes citySpin { to { transform: rotate(360deg); } }
.city-svg .city-shimmer { animation: cityShimmer 3s ease-in-out infinite; }
@keyframes cityShimmer { 0%, 100% { opacity: .25; } 50% { opacity: .8; } }
.city-svg .city-ring { animation: cityRing 6s ease-in-out infinite; }
@keyframes cityRing { 0%, 100% { opacity: .7; } 50% { opacity: 1; } }
.city-svg .city-car { animation: cityDrive var(--dur, 6s) linear infinite; animation-delay: var(--delay, 0s); }
@keyframes cityDrive { from { transform: translateX(-56px); } to { transform: translateX(376px); } }
.city-svg .city-fly { animation: cityFly var(--dur, 8s) linear infinite; animation-delay: var(--delay, 0s); }
@keyframes cityFly { from { transform: translateX(-64px); } to { transform: translateX(384px); } }
.city-svg .city-drone { animation: cityDrone var(--dur, 4s) ease-in-out infinite; animation-delay: var(--delay, 0s); }
@keyframes cityDrone { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(14px, -10px); } }
.city-svg .city-neon { animation: cityNeon 3.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes cityNeon { 0%, 100% { opacity: 1; } 45% { opacity: .35; } }

/* ---------- майнеры: украшения ---------- */

.miner-art-wrap { box-shadow: inset 0 0 34px -8px var(--tint, #3dff8b); }
.miner-art-wrap::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 3px);
}
.miner-art-wrap::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.10) 46%, transparent 60%);
  transform: translateX(-130%);
  animation: minerSheen 6.5s ease-in-out infinite;
}
@keyframes minerSheen { 0%, 62% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
.miner-card { transition: transform .25s ease, box-shadow .25s ease; }
.miner-card:active { transform: scale(.995); }
.miner-card.owned { box-shadow: 0 14px 36px rgba(0,0,0,.32), 0 0 0 1px color-mix(in srgb, var(--tint, #3dff8b) 30%, transparent); }

/* ---------- заметка про Telegram ---------- */

.tg-note {
  margin-top: 9px; padding: 9px 11px; border-radius: 12px;
  font-size: 11.5px; line-height: 1.45; color: var(--muted);
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.tg-note b { color: var(--text); }


/* ---------- ������� �����: ����, ���������, ������ ---------- */

.mining-card { position: relative; overflow: hidden; }
.mining-card::after {
  content: ''; position: absolute; inset: -40% -10% auto auto; width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(61,255,139,.14), transparent 70%); pointer-events: none;
}
.mining-chance { display: flex; align-items: center; gap: 16px; margin: 6px 0 14px; position: relative; z-index: 1; }
.mining-chance-ring {
  width: 98px; height: 98px; flex: 0 0 auto; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at center, rgba(8,22,16,.95) 54%, transparent 55%), conic-gradient(#3dff8b 0 42%, rgba(61,255,139,.15) 42% 100%);
  box-shadow: inset 0 0 20px rgba(61,255,139,.12), 0 0 24px rgba(61,255,139,.08);
  border: 1px solid rgba(61,255,139,.25);
}
.mining-chance-ring b { font-size: 20px; font-weight: 900; color: var(--gold); line-height: 1; }
.mining-chance-ring span { font-size: 8.5px; color: var(--muted-2); margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
.mining-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; flex: 1; }
.mining-facts > div { padding: 9px 8px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); min-width: 0; }
.mining-facts b { display: block; font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mining-facts span { display: block; font-size: 8.5px; color: var(--muted-2); margin-top: 3px; line-height: 1.25; }
.mining-claim { margin-top: 2px; }
.mining-note { margin-top: 9px; line-height: 1.4; }
.mining-warning {
  margin-top: 10px; padding: 9px 11px; border-radius: 12px; font-size: 11px; line-height: 1.4;
  color: #ffd0b0; background: rgba(251,113,133,.09); border: 1px solid rgba(251,113,133,.25);
}
.danger { color: var(--red) !important; }
.warn { color: #fbbf24 !important; }
.good { color: #7ef3dd !important; }
.durability {
  height: 6px; margin-top: 9px; border-radius: 5px; overflow: hidden;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.04);
}
.durability i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #17dd62, #a9ffc9); transition: width .35s; }
.durability.damaged i { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.durability.broken i { background: var(--red); }
.miner-repair { width: 100%; margin-top: 9px; border-color: rgba(251,191,36,.32); color: #ffe7a8; }
.miner-broken-tag {
  display: inline-block; padding: 1px 5px; border-radius: 6px; font-size: 8.5px; font-weight: 800;
  color: #ffb3c0; background: rgba(251,113,133,.14); border: 1px solid rgba(251,113,133,.35);
  vertical-align: 1px;
}
.miner-card.broken { border-color: rgba(251,113,133,.28); }
.miner-card.broken .miner-art-wrap { filter: saturate(.5) brightness(.8); }

/* ---------- ����� ������ ---------- */

.duel-hero {
  position: relative; overflow: hidden; padding: 18px;
  border-radius: var(--radius); border: 1px solid rgba(251,113,133,.22);
  background:
    radial-gradient(circle at 88% 8%, rgba(251,113,133,.18), transparent 42%),
    radial-gradient(circle at 10% 100%, rgba(61,255,139,.12), transparent 45%),
    linear-gradient(145deg, #142a1e, #08150f);
  box-shadow: var(--shadow);
}
.duel-kicker { font-size: 10px; font-weight: 850; letter-spacing: .12em; color: var(--red); text-transform: uppercase; }
.duel-title { font-size: 26px; line-height: 1.08; font-weight: 900; letter-spacing: -.03em; margin-top: 4px; }
.duel-title span { color: var(--gold); }
.duel-lead { font-size: 12px; line-height: 1.5; color: var(--muted); margin-top: 8px; max-width: 95%; }
.duel-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.duel-hero-stats > div { padding: 9px; border-radius: 12px; background: rgba(4,12,8,.45); border: 1px solid rgba(255,255,255,.06); }
.duel-hero-stats b { display: block; font-size: 14px; font-weight: 850; color: var(--text); }
.duel-hero-stats span { display: block; margin-top: 2px; font-size: 8.5px; color: var(--muted-2); }
.duel-cooldown { margin-top: 11px; font-size: 11px; color: var(--muted-2); }
.duel-cooldown.ready { color: #a9ffc9; }
.duel-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.duel-row:last-child { border-bottom: 0; }
.duel-ava {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center;
  font-size: 14px; font-weight: 850; color: var(--muted); background: rgba(255,255,255,.06); border: 1px solid var(--line);
  position: relative;
}
.duel-ava.on::after { content: ''; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); border: 2px solid #08150f; }
.duel-ava.big { width: 48px; height: 48px; border-radius: 15px; font-size: 18px; }
.duel-name { font-size: 13.5px; font-weight: 750; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.duel-sub { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; }
.duel-sub b { color: var(--text); }
.duel-sub b.good { color: var(--gold) !important; }
.duel-tag {
  padding: 1px 6px; border-radius: 6px; font-size: 8px; font-weight: 800; letter-spacing: .03em;
  color: var(--muted); background: rgba(255,255,255,.06); border: 1px solid var(--line);
}
.duel-tag.friend { color: #b6ffd0; background: rgba(61,255,139,.12); border-color: rgba(61,255,139,.25); }
.duel-actions { display: flex; align-items: center; gap: 5px; }
.duel-incoming { border-color: rgba(61,255,139,.28); }
.duel-history { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.duel-history:last-child { border-bottom: 0; }
.duel-history-icon { width: 28px; text-align: center; }
.duel-history-name { font-size: 12.5px; font-weight: 650; }
.duel-history-sub { font-size: 10px; color: var(--muted-2); margin-top: 1px; }
.duel-history.won .duel-history-name { color: #a9ffc9; }
.duel-history.lost .duel-history-name { color: #ffb3c0; }
.duel-sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.duel-cur-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); margin-bottom: 10px; }
.duel-cur { flex: 1; padding: 8px; border-radius: 9px; font-size: 12px; font-weight: 750; color: var(--muted); }
.duel-cur.active { color: #03230f; background: linear-gradient(135deg, #a9ffc9, #17dd62); }
.duel-stake-input { margin-bottom: 8px; }
.duel-preview { margin: 13px 0 8px; padding: 11px 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.duel-preview > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 12px; color: var(--muted); }
.duel-preview b { font-size: 13px; font-variant-numeric: tabular-nums; }
.duel-fine { line-height: 1.45; margin-bottom: 8px; }
.duel-result { border-color: rgba(61,255,139,.3); }
.duel-result.loss { border-color: rgba(251,113,133,.3); }
.duel-result .result-mult { font-size: 48px; }
.duel-result-title { font-size: 24px; font-weight: 900; letter-spacing: -.03em; margin: 2px 0 8px; }
.duel-result.win .duel-result-title { color: #a9ffc9; }
.duel-result.loss .duel-result-title { color: #ffb3c0; }
.duel-result-meta { margin-top: 8px; font-size: 10.5px; color: var(--muted-2); }
@media (max-width: 360px) {
  .mining-facts { grid-template-columns: 1fr; }
  .mining-chance-ring { width: 84px; height: 84px; }
  .nav-btn span { font-size: 8px; }
}

/* ============================================================
   КОНКУРСЫ В АРЕНЕ
   ============================================================ */

.contest-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(145deg, rgba(19, 38, 29, 0.96), rgba(7, 16, 12, 0.98)),
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.07), transparent 44%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  isolation: isolate;
}
.contest-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--ca, #2ee6c5), var(--cb, #facc15), transparent);
  opacity: 0.95;
}
.contest-glow {
  position: absolute;
  z-index: -1;
  top: -90px;
  right: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ca, #2ee6c5), transparent 64%);
  opacity: 0.18;
  filter: blur(18px);
  animation: contestGlow 5.5s ease-in-out infinite alternate;
}
.contest-live { border-color: rgba(255, 255, 255, 0.11); }
.contest-idle { background: linear-gradient(145deg, rgba(15, 29, 24, 0.9), rgba(6, 13, 10, 0.98)); }
.contest-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.contest-kicker {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ca, #2ee6c5);
}
.contest-badge {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.contest-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: 0.1em;
  color: #ffb3b3;
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid rgba(251, 113, 133, 0.28);
}
.contest-live-dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff6b81;
  box-shadow: 0 0 10px #ff6b81;
  animation: contestPulse 1.6s ease-in-out infinite;
}
.contest-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
  align-items: center;
  margin-top: 9px;
}
.contest-copy { min-width: 0; }
.contest-title {
  margin: 0;
  font-size: clamp(19px, 5.4vw, 27px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 950;
  background: linear-gradient(92deg, #ffffff 10%, var(--ca, #2ee6c5) 70%, var(--cb, #facc15));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.contest-tagline {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  max-width: 34ch;
}
.contest-timer {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 9px;
  padding: 6px 9px;
  border-radius: 11px;
  background: rgba(4, 12, 8, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.contest-timer-label { font-size: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }
.contest-timer b { font-size: 15px; font-weight: 950; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.contest-prizes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.contest-prize {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.contest-prize b { font-size: 11px; line-height: 1; }
.contest-prize i { color: var(--muted); font-style: normal; font-weight: 700; }
.contest-prize.cplace-1 { background: rgba(250, 204, 21, 0.1); border-color: rgba(250, 204, 21, 0.26); }
.contest-prize.cplace-2 { background: rgba(203, 213, 225, 0.08); border-color: rgba(203, 213, 225, 0.2); }
.contest-prize.cplace-3 { background: rgba(251, 146, 60, 0.09); border-color: rgba(251, 146, 60, 0.22); }
.contest-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 118px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.1), transparent 62%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.contest-art-svg {
  width: 104px;
  height: 104px;
  overflow: visible;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 18px var(--ca, #2ee6c5));
  animation: contestFloat 4.2s ease-in-out infinite;
}
.contest-art-emoji {
  position: absolute;
  right: 7px;
  bottom: 5px;
  font-size: 18px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.55));
  transform: rotate(-8deg);
}
.contest-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}
.contest-stats > div {
  padding: 8px;
  border-radius: 11px;
  background: rgba(3, 10, 7, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.055);
  min-width: 0;
}
.contest-stats b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
}
.contest-stats span { display: block; margin-top: 2px; font-size: 8px; color: var(--muted-2); }
.contest-predict {
  margin-top: 10px;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(95, 127, 240, 0.13), rgba(46, 230, 197, 0.06));
  border: 1px solid rgba(95, 127, 240, 0.22);
}
.contest-predict.locked { opacity: 0.75; }
.contest-predict-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.contest-predict-head b { font-size: 11px; font-weight: 900; }
.contest-predict-head span { font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; }
.contest-predict-row { display: flex; align-items: center; gap: 6px; margin-top: 7px; }
.contest-predict-cur { color: var(--muted); font-size: 13px; font-weight: 900; }
.contest-predict-row input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(3, 10, 7, 0.58);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  outline: none;
}
.contest-predict-row input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46, 230, 197, 0.12); }
.contest-predict-row .btn { flex: 0 0 auto; white-space: nowrap; }
.contest-board-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.contest-board-title .chip { max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; }
.contest-board { display: grid; gap: 4px; margin-top: 7px; }
.contest-board-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid transparent;
}
.contest-board-row:nth-child(1) { background: rgba(250, 204, 21, 0.075); border-color: rgba(250, 204, 21, 0.14); }
.contest-board-row.me { border-color: rgba(46, 230, 197, 0.28); background: rgba(46, 230, 197, 0.07); }
.contest-board-place { font-size: 13px; font-weight: 900; color: var(--muted); text-align: center; }
.contest-board-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; }
.contest-board-name i { font-style: normal; color: var(--teal); font-size: 8px; font-weight: 900; }
.contest-board-name small { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--muted-2); font-size: 8px; font-weight: 600; }
.contest-board-score { font-size: 10px; font-weight: 900; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.contest-board-empty {
  margin-top: 8px;
  padding: 10px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  line-height: 1.4;
}
.contest-board-empty b { color: var(--text); }
.contest-rules { margin-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 7px; }
.contest-rules summary {
  cursor: pointer;
  list-style: none;
  font-size: 9px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.contest-rules summary::-webkit-details-marker { display: none; }
.contest-rules summary::before { content: "▸ "; color: var(--ca, #2ee6c5); }
.contest-rules[open] summary::before { content: "▾ "; }
.contest-rules ul { margin: 6px 0 0; padding-left: 16px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.contest-rules li + li { margin-top: 3px; }
.contest-last {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 9px;
  color: var(--muted-2);
  line-height: 1.4;
}
.contest-last b { color: var(--text); }
.contest-kind-market_guess .contest-art { background: radial-gradient(circle at 50% 46%, rgba(95, 127, 240, 0.22), transparent 62%), rgba(255, 255, 255, 0.02); }
.contest-kind-capital_growth .contest-art { background: radial-gradient(circle at 50% 46%, rgba(249, 115, 22, 0.2), transparent 62%), rgba(255, 255, 255, 0.02); }
.contest-kind-lucky_active .contest-art { background: radial-gradient(circle at 50% 46%, rgba(34, 197, 94, 0.2), transparent 62%), rgba(255, 255, 255, 0.02); }
.contest-kind-mining_raffle .contest-art { background: radial-gradient(circle at 50% 46%, rgba(46, 230, 197, 0.2), transparent 62%), rgba(255, 255, 255, 0.02); }
.contest-kind-arena_streak .contest-art { background: radial-gradient(circle at 50% 46%, rgba(255, 77, 109, 0.2), transparent 62%), rgba(255, 255, 255, 0.02); }

@keyframes contestGlow {
  from { transform: translate3d(0, 0, 0) scale(0.92); opacity: 0.13; }
  to { transform: translate3d(-16px, 12px, 0) scale(1.08); opacity: 0.23; }
}
@keyframes contestFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}
@keyframes contestPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.7); }
}

@media (max-width: 430px) {
  .contest-card { padding: 13px; border-radius: 19px; }
  .contest-main { grid-template-columns: minmax(0, 1fr) 94px; gap: 5px; }
  .contest-art { width: 94px; height: 94px; border-radius: 18px; }
  .contest-art-svg { width: 82px; height: 82px; }
  .contest-art-emoji { font-size: 15px; right: 5px; bottom: 4px; }
  .contest-tagline { font-size: 10px; }
  .contest-prize { font-size: 8px; padding: 4px 6px; }
  .contest-prize b { font-size: 10px; }
  .contest-predict-row .btn { padding-left: 9px; padding-right: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .contest-glow, .contest-art-svg, .contest-live-dot::before { animation: none; }
}

/* ---------- задания дня ---------- */

.quest-card { border-color: rgba(46, 230, 197, 0.16); }
.quest-list { display: grid; gap: 8px; }
.quest-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color .2s, background .2s;
}
.quest-row.ready {
  border-color: rgba(61, 255, 139, 0.4);
  background: rgba(61, 255, 139, 0.07);
}
.quest-row.done { opacity: .62; }
.quest-ico {
  width: 38px; height: 38px; display: grid; place-items: center;
  font-size: 19px; border-radius: 11px;
  background: rgba(46, 230, 197, 0.1);
  border: 1px solid rgba(46, 230, 197, 0.18);
}
.quest-body { min-width: 0; }
.quest-line { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.quest-line b { font-size: 12.5px; }
.quest-line span {
  font-size: 10.5px; color: var(--muted-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.quest-desc { font-size: 10.5px; color: var(--muted); margin: 2px 0 6px; }
.quest-bar {
  height: 4px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.07); overflow: hidden;
}
.quest-bar i {
  display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transition: width .3s;
}
.quest-reward { font-size: 10px; color: var(--gold); margin-top: 5px; }
.quest-bonus {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px; align-items: center;
  margin-top: 10px; padding: 10px; border-radius: 14px;
  border: 1px dashed rgba(61, 255, 139, 0.24);
  background: rgba(61, 255, 139, 0.04);
}
.quest-bonus.ready {
  border-style: solid;
  border-color: rgba(61, 255, 139, 0.5);
  background: rgba(61, 255, 139, 0.1);
  box-shadow: 0 0 20px rgba(61, 255, 139, 0.09);
}
.quest-bonus.done { opacity: .6; }
.quest-bonus-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.quest-bonus-info b { font-size: 11.5px; }
.quest-bonus-info span { font-size: 10px; color: var(--muted-2); }
.quest-bonus-reward {
  font-size: 10.5px; font-weight: 700; color: var(--gold); white-space: nowrap;
}
.quest-reset { margin-top: 9px; }

@media (max-width: 430px) {
  .quest-row { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 8px; padding: 9px; }
  .quest-ico { width: 32px; height: 32px; font-size: 16px; }
  .quest-row .btn { padding: 8px 9px; font-size: 11.5px; }
  .quest-bonus { grid-template-columns: minmax(0, 1fr) auto; }
  .quest-bonus-reward { grid-column: 1; grid-row: 2; }
  .quest-bonus .btn { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- компактные карточки майнеров (как раньше) ---------- */
.miner-card { flex-direction: row; align-items: stretch; gap: 11px; }
.miner-art-wrap { flex: 0 0 116px; min-height: 0; align-self: stretch; border-radius: 14px; }
.miner-art { width: 100%; max-width: none; }
.miner-art .art-svg { width: 100%; height: auto; }
.miner-info { flex: 1; min-width: 0; margin-top: 0; }
.miner-art-wrap .miner-tier,
.miner-art-wrap .miner-lvl-pill { font-size: 8px; padding: 2px 6px; top: 7px; }
.miner-art-wrap .miner-tier { left: 7px; }
.miner-art-wrap .miner-lvl-pill { top: auto; bottom: 7px; right: 7px; }
.miner-specs { margin-top: 8px; }
.miner-info .miner-top { gap: 6px; }
.miner-name { font-size: 14px; }
.miner-share { font-size: 10px; }
@media (max-width: 520px) {
  .miner-card { padding: 11px; gap: 9px; }
  .miner-art-wrap { flex-basis: 96px; min-height: 0; }
  .miner-art-wrap .miner-tier { font-size: 7px; }
  .miner-name { font-size: 13px; }
  .spec { padding: 6px 8px; }
  .spec b { font-size: 13px; }
  .miner-buy-btn { min-width: 96px; }
}

/* ---------- блэкджек: живая раздача ---------- */
.bj-felt::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background-image: radial-gradient(rgba(255,255,255,.045) .8px, transparent .8px);
  background-size: 9px 9px; opacity: .55;
}
.bj-seat-label { background: rgba(0,0,0,.26); padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.07); }
.bj-rule { padding: 6px 10px; border-radius: 10px; background: rgba(0,0,0,.24); border: 1px solid rgba(61,255,139,.12); }
.bj-score { min-width: 34px; text-align: center; }
.bj-hand .bj-card { --rot: 0deg; animation: bjDeal .4s cubic-bezier(.2,.85,.25,1) both; }
.bj-hand .bj-card:nth-child(1) { --rot: -3deg; animation-delay: .02s; }
.bj-hand .bj-card:nth-child(2) { animation-delay: .08s; }
.bj-hand .bj-card:nth-child(3) { --rot: 3deg; animation-delay: .14s; }
.bj-hand .bj-card:nth-child(4) { --rot: -1.5deg; animation-delay: .18s; }
@keyframes bjDeal {
  from { opacity: 0; transform: translateY(-22px) rotate(calc(var(--rot) - 12deg)) scale(.84); }
  to { opacity: 1; transform: rotate(var(--rot)); }
}
.bj-card.hidden { animation: bjFlip .45s ease both; }
@keyframes bjFlip { from { opacity: 0; transform: rotateY(90deg); } to { opacity: 1; transform: none; } }
.bj-result { animation: bjPop .3s ease both; }
@keyframes bjPop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.bj-go:active, .bj-act:active { transform: scale(.98); }
.bj-bet-field:focus-within { border-color: rgba(61,255,139,.5); box-shadow: 0 0 0 3px rgba(61,255,139,.08); }
.bj-chip:hover { background: rgba(61,255,139,.16); transform: translateY(-1px); }

/* ---------- скачки ---------- */
.race-card { padding: 0; overflow: hidden; }
.race-card .card-head { padding: 14px 14px 0; }
.race-track { position: relative; height: 300px; margin-top: 12px; overflow: hidden; background: #0b1f1a; }
.race-landscape { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.race-lanes { position: absolute; inset: 0; }
.race-lane {
  position: absolute; left: 0; right: 0; top: calc(118px + var(--lane) * 29px); height: 26px;
  border-top: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.10));
}
.race-runner {
  position: absolute; left: 3%; top: calc(106px + var(--lane) * 29px);
  width: 76px; height: 44px; z-index: 2;
  transition: left .06s linear;
  filter: drop-shadow(0 4px 5px rgba(0,0,0,.55));
}
.race-runner .rr-art, .race-runner .horse-svg { width: 100%; height: 100%; display: block; }
.race-runner::after {
  content: ''; position: absolute; left: 6px; right: 6px; bottom: -2px; height: 3px;
  border-radius: 3px; background: var(--tint); opacity: .45; filter: blur(2px);
}
.race-result {
  position: absolute; z-index: 4; left: 50%; top: 40%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none;
  padding: 10px 22px; border-radius: 16px; text-align: center; opacity: 0; transition: .25s;
  background: rgba(4,14,10,.86); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(6px);
}
.race-result:not(:empty) { opacity: 1; }
.race-result b { font-size: 18px; font-weight: 900; }
.race-result span { font-size: 11px; color: var(--muted); }
.race-result.win { border-color: rgba(61,255,139,.55); box-shadow: 0 0 30px rgba(61,255,139,.24); }
.race-result.win b { color: #a9ffc9; }
.race-result.loss { border-color: rgba(251,113,133,.45); }
.race-result.loss b { color: #ffc0cb; }
.race-horses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 14px 0; }
.race-horse {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 5px 7px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  border: 1px solid var(--line); color: var(--text); transition: .16s;
}
.race-horse:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tint) 55%, transparent); }
.race-horse.picked {
  border-color: var(--tint);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 20%, transparent), rgba(255,255,255,.02));
  box-shadow: 0 0 18px -6px var(--tint), inset 0 0 20px -12px var(--tint);
}
.rh-art { width: 100%; max-width: 96px; height: 54px; }
.rh-art .horse-svg { width: 100%; height: 100%; display: block; }
.rh-info { display: flex; align-items: center; justify-content: space-between; gap: 4px; width: 100%; }
.rh-info b { font-size: 9.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rh-info span { font-size: 10px; font-weight: 900; color: var(--tint); font-variant-numeric: tabular-nums; }
.race-selected {
  margin: 10px 14px 0; padding: 8px 12px; border-radius: 11px; text-align: center;
  font-size: 11px; font-weight: 700; color: var(--muted-2);
  background: rgba(255,255,255,.035); border: 1px dashed var(--line);
}
.race-selected.chosen {
  border-style: solid; border-color: rgba(61,255,139,.45);
  background: rgba(61,255,139,.09); color: #d7ffe6;
}
.race-selected b { color: #fff; }
.race-selected span { color: var(--gold); font-weight: 900; margin-left: 4px; }
.race-bet { display: flex; gap: 8px; padding: 12px 14px 0; }
.race-bet-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; padding: 0 11px;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04);
}
.race-bet-field span { font-size: 10px; color: var(--muted-2); }
.race-bet-field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 15px; font-weight: 900; text-align: right; }
.race-go { flex: 0 0 auto; width: auto; min-width: 130px; margin-top: 0; }
.race-foot { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px 14px; font-size: 10.5px; color: var(--muted-2); }
.race-foot b { color: var(--gold); font-variant-numeric: tabular-nums; }
.race-bet-value, .bj-bet-value { color: var(--gold); font-size: 12px; font-weight: 900; font-variant-numeric: tabular-nums; }

/* ---------- выбор музыки ---------- */
.music-tracks { display: flex; flex-direction: column; gap: 6px; }
.music-track {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.035); border: 1px solid var(--line);
  color: var(--text); text-align: left; transition: .16s;
}
.music-track:hover { transform: translateY(-1px); border-color: rgba(61,255,139,.35); }
.music-track.active {
  border-color: rgba(61,255,139,.5);
  background: linear-gradient(180deg, rgba(61,255,139,.13), rgba(61,255,139,.03));
  box-shadow: inset 0 0 22px -12px rgba(61,255,139,.6);
}
.mt-icon {
  flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; font-size: 15px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
}
.music-track.active .mt-icon { background: rgba(61,255,139,.14); border-color: rgba(61,255,139,.4); }
.mt-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mt-info b { font-size: 12px; font-weight: 800; }
.mt-info small { font-size: 9.5px; color: var(--muted-2); }
.mt-check { flex: 0 0 auto; width: 18px; text-align: center; font-weight: 900; font-size: 13px; color: #3dff8b; }

/* ---------- сигнал курса в профиле ---------- */
.alerts-body { display: flex; flex-direction: column; gap: 9px; }
.alerts-info { display: flex; flex-wrap: wrap; gap: 7px; }
.alerts-info > div {
  flex: 1 1 28%; min-width: 88px; display: flex; flex-direction: column; gap: 2px;
  padding: 8px 10px; border-radius: 11px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.alerts-info span { font-size: 9px; color: var(--muted-2); }
.alerts-info b { font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.alerts-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.alerts-toggle { width: 100%; margin-top: 2px; }
@media (max-width: 520px) {
  .race-track { height: 276px; }
  .race-lane { top: calc(112px + var(--lane) * 26px); height: 24px; }
  .race-runner { width: 62px; height: 40px; top: calc(102px + var(--lane) * 26px); }
  .race-horses { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .rh-art { height: 44px; }
  .rh-info b { font-size: 8.5px; }
  .race-go { min-width: 108px; }
}
