/* ================== 🔄 RESET & GLOBAL ================== */
* { box-sizing: border-box; }
* { user-select: none; }

body {
  margin: 0;
  padding-top: max(32px, env(safe-area-inset-top));
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background-color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #fff;
  height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;       /* ✅ горизонталь скрываем */
  overflow-y: auto;         /* ✅ вертикаль разрешаем */
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}


/* ================== 📦 WALLET & TOKENS ================== */
.wallet-fixed {
  position: sticky;
  top: 0;
  background: #000;
  z-index: 10;
  padding-top: env(safe-area-inset-top);
  border-radius: 0 0 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 0px;
}

.wallet-info { text-align: center; margin-top: 12px; }
.wallet-balance { font-size: 28px; font-weight: bold; }
.wallet-address { font-size: 14px; color: #888; margin-bottom: 8px; }

.token-list {
  background-color: #111;
  border-radius: 20px;
  width: 100%;
  max-width: 468px;
  height: 344px;
  margin: 6px auto 0;
  padding: 12px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
}

.token-scroll-inner {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.token-scroll-inner::-webkit-scrollbar { display: none; padding: 0 16px 8px 16px; }

.token-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #222;
  padding: 10px 0;
  scroll-snap-align: start;
  height: 64px;
  box-sizing: border-box;
}
.token-item:last-child { border-bottom: none; }

.gray { color: #888; font-size: 13px; }

/* ================== 🏠 CABINET PROFILE ================== */
.cabinet-profile {
  background-color: #111;
  border-radius: 16px;
  max-width: 468px;
  margin: 12px auto 0;
  padding: 12px 14px;
  box-shadow: 0 0 12px rgba(0,0,0,0.3);
  text-align: center;
}
.cabinet-profile #cabinet-title { font-weight: bold; font-size: 18px; margin-bottom: 6px; }
.cabinet-profile #cabinet-desc { color: white; font-size: 17px; line-height: 1.4; }

/* ================== 📱 NAVIGATION ================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #111;
  border-top: 1px solid #222;
  display: flex;
  justify-content: space-around;
  padding-bottom: max(24px, env(safe-area-inset-bottom));

  z-index: 100;
}

/* 🔼 теперь поднимаем не только иконки, а всю кнопку */
.nav-item {
  text-align: center;
  font-size: 16px;
  color: #aaa;
}

.nav-item img.nav-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  margin: 0 auto 2px; /* можно уменьшить до 6px, чтобы текст был ближе к иконке */
}

.nav-item span {
  display: block;
  font-size: 10px;
  margin-top: 2px;
}

.nav-item:hover,
.nav-item.active {
  color: white;
  font-weight: bold;
}

.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 5px #ff00ff88);
}

/* ================== 🎛 ACTION BUTTONS ================== */
.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 12px auto 12px;
  width: 100%;
  max-width: 480px;
  padding: 0;
  box-sizing: border-box;
  justify-items: stretch;   /* 🔥 кнопки растянутся */
}



.action-btn {
  background-color: #111;
  border-radius: 18px;
  height: 64px;
  font-size: 14px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  line-height: 1.2;
  white-space: nowrap;
  user-select: none;
  transition: background 0.2s ease;
}
.action-btn:hover { background-color: #222; }
.action-btn.grid { text-align: center; padding: 10px; background: transparent; border: none; color: #fff; }
.action-btn.grid:hover .wallet-icon { filter: drop-shadow(0 0 5px #ffffffaa); }
.action-btn.info {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-align: left;
}
.action-btn.info:hover { background: rgba(255, 255, 255, 0.08); }
.action-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; }

.wallet-icon { width: 28px; height: 28px; margin-bottom: 4px; }
.action-btn:hover .wallet-icon { filter: drop-shadow(0 0 5px #ffffffaa); }

.btn-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
}

/* ================== 📄 PAGES ================== */
.pages-wrapper {
  position: relative;
  width: 100%;
  min-height: 100svh;
  overflow-x: hidden;           /* ✅ скрываем только горизонталь (для свайпов) */
  overflow-y: visible;          /* ✅ даём возможность вертикали появляться */
  touch-action: pan-y;
  padding-bottom: 170px;
}

.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: calc(100svh - 70px); /* 🧩 учли нижнее меню */
  opacity: 0;
  transform: translateX(100%);
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto; /* теперь контент скроллится */
  padding-bottom: 90px; /* безопасный отступ */
  -webkit-overflow-scrolling: touch;
}

.page.scrollable {
  overflow-y: auto;      /* ✅ даём вертикальный скролл */
  -webkit-overflow-scrolling: touch; /* плавный скролл на iOS */
}
.page.fullscreen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100vh - 60px); /* минус высота нижнего меню */
  overflow: hidden; /* 🚫 Запрещаем скролл */
}
.noscroll {
  overflow: hidden !important;
  height: 100vh;
}


/* ================== 🔲 MODALS ================== */
#modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#modal-backdrop.active { opacity: 1; pointer-events: auto; }

.modal-container {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.modal-container.show { 
  opacity: 1;
  visibility: visible;

  /* ✅ как только показывается — клики блокируются */
  pointer-events: auto;   
}
.modal-container.show { opacity: 1; visibility: visible; }

.modal-card {
  background: rgba(17, 17, 17, 0.75);
  border-radius: 16px;
  padding: 20px;
  color: #fff;
  width: 90%;
  max-width: 468px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: fixed;
}
.modal-container.show .modal-card { transform: translateY(0); opacity: 1; }

.modal-close-button {
  position: absolute;
  top: -12px;
  right: -12px;
  font-size: 22px;
  font-weight: bold;
  color: #f44;
  cursor: pointer;
  z-index: 1001;
  background: #111;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0,0,0,0.5);
  transition: 0.2s ease;
}
.modal-close-button:hover { background: #222; transform: scale(1.1); }
/* ❄️ Snow — PURE CSS */
#snow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -10px;
  width: 6px;
  height: 6px;
  background: #ffffffb8;
  border-radius: 50%;
  filter: blur(1px);
  animation: fall linear infinite;
  opacity: 0.9;
}

@keyframes fall {
  to {
    transform: translateY(110vh);
  }
}

/* ================== ❄️ ЗИМНИЙ LOADER (оптимизированный) ================== */
#loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, #0b0f19, #0e1b2e);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

/* ❄️ Падающий снег — лёгкая версия */
#loader::before, 
#loader::after {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='150' height='150'>\
<circle cx='20' cy='20' r='2' fill='white'/>\
<circle cx='100' cy='40' r='2' fill='white'/>\
<circle cx='60' cy='90' r='3' fill='white'/>\
<circle cx='130' cy='70' r='2' fill='white'/>\
<circle cx='30' cy='130' r='2' fill='white'/>\
</svg>");

  opacity: 0.32;
  animation: snowfall 28s linear infinite;
  will-change: background-position;
  pointer-events: none;
}

#loader::after {
  opacity: 0.5;
  animation-duration: 42s;
  background-size: 200px;
}

/* Содержимое */
.loader-inner {
  text-align: center;
  color: #fff;
  font-family: inherit;
  position: relative;
  z-index: 5;
}

/* ❄️ ЛОГО — лёгкое сияние (оптимизировано) */
.loader-logo {
  width: 140px;
  height: 140px;
  margin-bottom: 25px;

  filter: drop-shadow(0 0 14px rgba(140,200,255,0.35));
  will-change: transform;

  animation: winterPulse 2s infinite ease-in-out;
}

/* Прогресс бар */
.loader-progress {
  width: 180px;
  height: 10px;

  background: rgba(255,255,255,0.10); /* Лёгкая замена blur */
  border-radius: 6px;
  overflow: hidden;
  margin: 12px auto;
}

/* ❄️ Лёгкий голубой градиент */
.loader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #d0f7ff, #72ccff, #299cff);
  background-size: 200% 100%;
  transition: width 0.3s ease;
}

/* проценты */
.loader-percent {
  font-size: 15px;
  margin-top: 6px;
  color: #d8eaff;
  text-shadow: 0 0 6px rgba(160,210,255,0.45);
}


/* ============= 🌨 АНИМАЦИИ (оптимизированы) ============= */

@keyframes snowfall {
  from { background-position: 0 -800px; }
  to   { background-position: 0 800px; }
}

@keyframes winterPulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
  100% { transform: scale(1); opacity: 1; }
}

/* ================== 💱 OTC & FORMS ================== */
.otc-tab-btn {
  flex: 1;
  padding: 10px;
  background: #222;
  color: #eee;
  border-radius: 12px;
  border: 1px solid #333;
  font-weight: bold;
  font-size: 14px;
}
.otc-tab-btn.active { background: #333; border: 1px solid #00afff; color: #fff; }

.token-select-btn {
  width: 100%;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border 0.2s;
}
.token-select-btn:hover { border-color: #00afff; cursor: pointer; }
.token-select-btn img { width: 20px; height: 20px; }

.input-like-field {
  width: 100%;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid #444;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  outline: none;
}
.input-like-field:focus { border-color: #00afff; }
.input-like-field::placeholder { color: #888; }

/* === Поля ввода === */
.modal-input,
.modal-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 16px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  outline: none;
  transition: all 0.2s ease-in-out;
  font-family: inherit;
}
.modal-input:focus, .modal-textarea:focus { border-color: #0f8fff; background: rgba(255, 255, 255, 0.12); }
.modal-textarea { min-height: 70px; resize: none; }

.btn-primary {
   position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;

  padding: 10px 0;
  font-size: 15px;
  font-weight: 800;

  background: #12c287;
  color: #fff;
  text-align: center;

  border-radius: 12px;
  border: 0;

  z-index: 3; /* ← ВАЖНО */
}

/* ===== PEOPLE: skeleton while loading ===== */
.people-skeleton { padding: 8px 0; }
.people-skeleton .sk-row {
  height: 74px;
  border-radius: 16px;
  background: linear-gradient(90deg,#1a1a1a 0%,#222 50%,#1a1a1a 100%);
  background-size: 200% 100%;
  animation: shimmer 1.1s infinite linear;
  margin-bottom: 12px;
}
@keyframes shimmer { 0%{background-position: 0% 0;} 100%{background-position: -200% 0;} }

/* ===== PEOPLE: list & cards ===== */
.person-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #1e1e20, #161617);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  transition: transform .15s ease, background .15s ease;
  animation: fadeIn .2s ease forwards;
}
.person-card:active { transform: scale(.98); background: linear-gradient(180deg,#262629,#1c1c1e); }

.person-row { display:flex; align-items:center; gap:12px; }
.person-main { flex:1; min-width:0; }

.person-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  object-fit: cover; background:#2c2c2e; border:2px solid #333; flex-shrink:0;
  display:block;
}
.avatar-fallback {
  display:flex; align-items:center; justify-content:center;
  font-weight:700; color:#cfd3ff;
  background: radial-gradient(120% 120% at 0% 0%, #344 0%, #223 70%, #112 100%);
}
/* ——— плашка статуса над карточкой/в модалке */
.person-status{
  display:inline-block;
  margin:6px 0 0;
  padding:2px 8px;
  font-size:11px;
  line-height:1.2;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  color:#fff;
  border:1px solid rgba(255,255,255,0.12);
}
.person-status.pending{ background:#645300; border-color:rgba(255,215,0,.35); }
.person-status.rejected{ background:#5b0000; border-color:rgba(255,120,120,.35); }

/* ——— бейджи «запрошено» */
.badge.pending{
  border:1px dashed rgba(255,255,255,0.35);
  background:rgba(255,255,255,0.06);
  opacity:.95;
}
.badge.pending-flag{
  margin-left:6px;
  padding:1px 6px;
  font-size:10px;
  font-weight:700;
  border-radius:999px;
  background:rgba(255,255,255,0.1);
  border:1px solid rgba(255,255,255,0.15);
  color:#fff;
}

/* ——— панель модерации запрошенных ролей (в модалке профиля) */
.admin-req{
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
}
.admin-req-title{
  margin:0 0 8px;
  font-weight:700;
  letter-spacing:.3px;
  color:#e5e5e5;
}

/* строка роли: название слева, радио-кнопки справа */
.arm-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 0;
  border-top:1px solid rgba(255,255,255,0.06);
}
.arm-item:first-child{ border-top:none; padding-top:0; }

.arm-label{
  min-width:80px;
  font-weight:800;
  color:#fff;
  letter-spacing:.3px;
}

/* набор действий (radio) */
.arm-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.arm-actions label{
  display:flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  font-size:13px;
  color:#d7d7d7;
  border-radius:8px;
  background:rgba(255,255,255,0.05);
  border:1px solid rgba(255,255,255,0.08);
  cursor:pointer;
  user-select:none;
}
.arm-actions input{
  accent-color:#6ae28e;   /* зелёный акцент на поддерживаемых браузерах */
}

.admin-req-actions{
  margin-top:10px;
  display:flex;
  justify-content:flex-end;
}

/* ——— на всякий: небольшие оттенки для конкретных ролей */
.badge.dev{ background:rgba(80,170,255,.12); border:1px solid rgba(80,170,255,.25); }
.badge.media{ background:rgba(255,140,90,.12); border:1px solid rgba(255,140,90,.25); }
.badge.smm{ background:rgba(120,255,180,.12); border:1px solid rgba(120,255,180,.25); }
.badge.mod{ background:rgba(180,120,255,.12); border:1px solid rgba(180,120,255,.25); }
.badge.verified{ background:rgba(100,255,190,.12); border:1px solid rgba(100,255,190,.35); }

.person-header { display:flex; flex-direction:column; gap:6px; }
.person-name   { font-size:16px; font-weight:700; color:#fff; }
/* мини-плашка статуса в карточке */
.person-status {
  display:inline-block; margin:6px 0 4px; padding:2px 8px;
  font-size:11px; border-radius:999px; border:1px solid;
  text-transform:uppercase; letter-spacing:.3px;
}
.person-status.pending  { color:#ffcc66; border-color:rgba(255,204,102,.5); background:rgba(255,204,102,.10); }
.person-status.rejected { color:#ff6b6b; border-color:rgba(255,107,107,.5); background:rgba(255,107,107,.10); }

/* такая же плашка в модалке */
.pm-status { margin:6px 0 2px; padding:4px 10px; border-radius:10px; font-size:12px; display:inline-block; }
.pm-status.pending  { color:#ffcc66; background:rgba(255,204,102,.12); border:1px solid rgba(255,204,102,.28); }
.pm-status.rejected { color:#ff6b6b; background:rgba(255,107,107,.12); border:1px solid rgba(255,107,107,.28); }

/* «ожидающие» бейджи ролей */
.badge.pending{ opacity:.8; background:transparent; border:1px dashed rgba(255,255,255,.35); }
.badge.pending-flag{ color:#ffcc66; background:rgba(255,204,102,.12); border:1px solid rgba(255,204,102,.25); }

/* цвета для новых ролей */
.badge.smm{ color:#79d8ff; background:rgba(0,183,255,.12); border:1px solid rgba(0,183,255,.22); }
.badge.mod{ color:#cabffd; background:rgba(167,139,250,.12); border:1px solid rgba(167,139,250,.22); }

.person-badges { display:flex; flex-wrap:wrap; gap:6px; }
.badge { padding: 3px 8px; border-radius: 8px; font-size: 11px; font-weight: 700; color:#fff; }
.badge.admin    { background:#ff3b30; }
.badge.dev      { background:#ff9500; }
.badge.media    { background:#007aff; }
.badge.verified { background:#2ecc71; }


.person-desc { font-size:14px; color:#bbb; margin-top:8px; line-height:1.4;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }

/* ===== PEOPLE: modal ===== */
.person-modal { max-width:468px; margin:0 auto; text-align:center; }
.pm-header { display:flex; flex-direction:column; align-items:center; gap:10px; }
.person-modal-avatar {
  width:84px; height:84px; border-radius:50%;
  object-fit:cover; background:#2c2c2e; border:2px solid #333;
}
.pm-title  { font-size:18px; font-weight:800; margin-top:6px; }
.pm-badges { display:flex; gap:6px; flex-wrap:wrap; justify-content:center; margin-top:4px; }
.pm-desc   { font-size:14px; color:#ccc; margin:12px 0 8px; }
.pm-desc.empty { color:#666; font-style:italic; }
.pm-actions { display:flex; flex-direction:column; gap:10px; margin-top:10px; }

.btn-primary,
.btn-secondary {
  width:100%; padding:12px; border-radius:12px; font-weight:700; font-size:15px; border:none; cursor:pointer;
}
.btn-primary  { background:linear-gradient(90deg,#007aff,#00b4ff); color:#fff; }
.btn-primary:active { transform:scale(.98); }
.btn-secondary{ background:#222; color:#fff; border:1px solid #333; }
.btn-secondary:active{ transform:scale(.98); }

/* ===== PEOPLE: optional search helpers ===== */
.people-search .icon-clear { opacity:0; pointer-events:none; transition:opacity .2s ease; }
.people-search .icon-clear.visible { opacity:1; pointer-events:auto; }

/* small helpers */
.empty { color:#888; text-align:center; margin:12px 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chips-wrap{display:flex;flex-wrap:wrap;gap:8px;background:#121212;border:1px solid #262626;border-radius:12px;padding:10px}
.chips-wrap.empty{background:#121212;color:#888;font-size:14px;padding:12px;border:1px dashed #333;border-radius:12px}
.chip{padding:8px 10px;border-radius:10px;background:#1f1f21;border:1px solid #2a2a2a;color:#fff;font-weight:700;font-size:12px;cursor:pointer;user-select:none;transition:transform .08s ease,background .15s ease,border-color .15s ease}
.chip.active{background:#0f2a3a;border-color:#00a8ff;box-shadow:0 0 0 2px rgba(0,168,255,.15) inset}
.proj-badges{display:flex;flex-wrap:wrap;gap:6px;margin:4px 0 2px}
.badge.proj{background:#222;color:#cfe9ff;border:1px solid #2c3b44}
.people-skeleton .sk-row{height:74px;border-radius:16px;background:linear-gradient(90deg,#1a1a1a 0%,#222 50%,#1a1a1a 100%);background-size:200% 100%;animation:shimmer 1.1s infinite linear;margin-bottom:12px}
@keyframes shimmer{0%{background-position:0% 0}100%{background-position:-200% 0}}

/* ==== PEOPLE: layout (добавка, без дублей) ==== */
#page-people.scrollable { overflow: hidden; }
#page-people .people-inner { height: 100%; display: flex; flex-direction: column; }
#page-people .people-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 88px; /* запас под нижнее меню */
}

/* чтобы наши бейджи-проекты на карточке имели небольшой отступ */
.person-badges.proj-line { margin-top: 4px; }

/* ==== PEOPLE: compact filters UI (уникальные классы 'pf-*') ==== */
.pf-bar{display:flex;gap:8px;align-items:center;justify-content:space-between;}
.pf-toggle{
  display:flex;align-items:center;justify-content:center;gap:6px;
  flex:1;min-width:140px;padding:10px;border-radius:12px;
  border:1px solid #333;background:#1f1f21;color:#fff;font-weight:700;
}
.pf-reset{
  padding:10px 12px;border-radius:12px;border:1px solid #333;
  background:#1f1f21;color:#fff;font-weight:700;
}
.pf-chevron{display:inline-block;transition:transform .2s ease;}
.pf-chevron.open{transform:rotate(180deg);}

.pf-drawer{
  display:none;margin-top:8px;background:#141414;border:1px solid #333;
  border-radius:12px;padding:10px;
}
.pf-drawer.open{display:block;}

.pf-verified{
  width:100%;padding:10px;border-radius:10px;border:1px solid #333;
  background:#1f1f21;color:#fff;font-weight:700;margin-bottom:8px;
}
.pf-verified.on{background:#123d1f;border-color:#1b6b36;}
/* прокрутка чипсов внутри модалки */
.chips-scroll {
  max-height: 200px;            /* ограничиваем высоту */
  overflow-y: auto;             /* вертикальный скролл */
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  padding: 2px;                 /* микро-отступ, чтобы не прилипало к рамке */
}
.chips-wrap {
  /* остальное оставь как было у тебя */
  overflow-y: auto;               /* скролл по вертикали */
  -webkit-overflow-scrolling: touch;
}
/* ================== 🎞 ANIMATIONS ================== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.05); } }
@keyframes fadeOut { 0% { opacity: 1; transform: scale(1); } 70% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(0.95); } }
@keyframes coinPulse { 0% { transform: scale(1) rotate(-2deg); opacity: 0.85; } 50% { transform: scale(1.07) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(-2deg); opacity: 0.85; } }
@keyframes spin { to { transform: rotate(360deg); } }
#claim-progress {
  height: 10px;                        /* Толщина полосы */
  width: 0%;                           /* Начальная ширина */
  background: linear-gradient(90deg, #00ff99, #00ccff);
  border-radius: 8px;
  transition: width 0.3s linear;       /* Плавное заполнение */
}
.claim-upgrade-row {
  display: flex;
  justify-content: center;   /* центрируем кнопки */
  gap: 12px;                 /* расстояние между кнопками */
  margin-top: 10px;
}

.claim-upgrade-row .action-btn {
  flex: 1;                   /* кнопки будут одинаковой ширины */
  max-width: 150px;          /* чтобы не растягивались на весь экран */
  text-align: center;
}
/* ===== мини-тайл ===== */
.mm-tile-mini {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  aspect-ratio: 1 / 1;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .25);
  transition: transform .06s ease;

  /* Ограничения и выравнивание */
  max-width: 150px;
  max-height: 150px;
  margin: 0 auto;
}
/* репутация / игра */
#page-reputation{
  display:flex;
  flex-direction:column;
  height:100%;
}

#page-reputation .game-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-bottom:1px solid #2a2a2a;
  background:#0e0e10;
}
#page-reputation .game-title{ font-weight:800 }
#page-reputation .game-controls .btn{
  padding:8px 10px;
  border:1px solid #2a2a2a;
  border-radius:10px;
  background:#1e1e20;
  color:#fff;
}

/* хост растягивается на всё оставшееся место и центрирует игру */
#page-reputation .game-host{
  flex:1;
  min-height:0; /* важно для корректного расчёта высоты во flex */
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background:#000;
}

/* КЛЮЧЕВОЕ: хост игры ограничен и по ширине, и по высоте.
   Размеры внутри посчитает fitCanvas(), поэтому без aspect-ratio */
#skyraid-root{
  position:relative;
  width:100%;
  max-width:420px;             /* хочешь крупнее — 480/520px */
  height:100%;
  max-height:100%;
  background:#0e0e10;
  border:1px solid #2a2a2a;
  border-radius:14px;
  overflow:hidden;
  box-shadow:inset 0 0 18px rgba(0,0,0,.35);
  user-select:none;            /* QoL: не выделять текст */
  -webkit-user-select:none;
  touch-action:none;           /* QoL: не скроллить при управлении */
}

/* канвас растягиваем на хост — фактический буфер задаст JS */
#skyraid-root canvas{
  display:block;
  width:100%;
  height:100%;
}

/* SkyRaid HUD + overlays */
.sr-hud{
  position:absolute; left:8px; top:8px; display:flex; gap:6px; flex-wrap:wrap;
  z-index:2; pointer-events:none;
}
.sr-pill{
  background:#1e1e20; border:1px solid #2a2a2a; color:#fff;
  border-radius:10px; padding:6px 10px; font-weight:800; pointer-events:none;
}
.sr-overlay{
  position:absolute; inset:0; display:none; align-items:center; justify-content:center;
  background:rgba(0,0,0,.55); z-index:3;
}
.sr-overlay.open{ display:flex; }
.sr-card{
  background:#0f0f12; border:1px solid #2a2a2a; border-radius:14px; padding:16px;
  max-width:320px; width:92%; text-align:center; color:#fff;
}
.sr-card h3{ margin:0 0 8px; font-size:20px; }
.sr-actions{ display:flex; gap:8px; justify-content:center; margin-top:10px; }
.sr-btn{
  background:#1e1e20; border:1px solid #2a2a2a; color:#fff; padding:8px 12px;
  border-radius:10px; font-weight:800; cursor:pointer;
  transition:transform .06s ease, filter .2s ease;
}
.sr-btn:active{ transform:translateY(1px) scale(.98); }
.sr-btn.primary{
  background:linear-gradient(90deg,#00ff99,#00ccff); border:none; color:#000;
}
.sr-legend{ font-size:12px; color:#bbb; margin-top:6px; }
/* контейнер модалки */
.person-modal{
  width: calc(100vw - 24px);   /* поля по 12px слева/справа */
  max-width: 420px;
  padding: 14px;
  box-sizing: border-box;
  overflow: hidden;            /* тени не вылезают за радиус */
}

/* заглушка под текст подгрузки */
.person-modal .pm-stats{
  margin-top: 12px;
  font-size: 13px;
  color: #ccc;
}
.person-modal .pm-stats b{ color:#fff; font-weight:600; }
.person-modal .pm-stats small{ color:#888; margin-left:6px; }

/* адаптивная сетка KPI: строго 2×2 на мобиле, далее 3/4 */
.person-modal .stats-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

/* карточки KPI (компакт) */
.person-modal .kpi{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  min-height: 70px;
  box-sizing: border-box;
  min-width: 0;                /* важно: не распирает grid */
}
.person-modal .kpi-icon{
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: 15px;
  background: rgba(255,255,255,0.08);
}
.person-modal .kpi-wrap{ min-width: 0; }
.person-modal .kpi-label{
  font-size: 10px; letter-spacing:.3px; text-transform: uppercase;
  color:#bfbfbf; line-height:1.1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.person-modal .kpi-value{ margin-top:2px; font-size:17px; font-weight:800; color:#fff; line-height:1.1; }
.person-modal .kpi-sub{ margin-top:2px; font-size:11px; color:#9aa0a6; white-space:nowrap; }
.person-modal .kpi-bar{ margin-top:5px; height:5px; border-radius:999px; background:rgba(255,255,255,0.08); overflow:hidden; }
.person-modal .kpi-bar span{ display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#3ddc97,#5be7c4); }

/* сворачиваемая разбивка по токенам */
.person-modal .breakdown{
  margin-top:10px; padding:10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius:14px;
}
.person-modal .breakdown > summary{
  cursor:pointer; user-select:none; color:#e5e5e5; font-weight:600; outline:none;
}
.person-modal .breakdown[open] > summary{ margin-bottom:8px; }

/* компактный список токенов (единый) */
.person-modal .list-compact{ margin:0; padding-left:0; list-style:none; }
.person-modal .list-compact li{
  display:flex; align-items:center; gap:8px;
  padding:4px 0; color:#c9c9c9; font-size:13px;
}
.person-modal .list-compact .sym{ font-weight:700; color:#fff; }
.person-modal .list-compact .dots{
  flex:1 1 auto; border-bottom:1px dashed rgba(255,255,255,0.12);
  margin:0 4px; transform: translateY(-2px);
}
.person-modal .list-compact .val{ color:#bfbfbf; }

/* брейкпоинты: шире модалка и больше колонок */
@media (min-width: 560px){
  .person-modal{ max-width: 520px; }
  .person-modal .stats-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 720px){
  .person-modal{ max-width: 640px; }
  .person-modal .stats-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* === FIX: согласуем размеры модалки и контента === */
.modal-card{
  /* размеры из твоей чистой версии */
  width: calc(100vw - 24px);
  max-width: 420px;
  padding: 14px;
  box-sizing: border-box;

  /* важно для крестика */
  position: relative;     /* якорь для absolute-крестика */
  overflow: visible;      /* не режем его, он частично «снаружи» */

  /* визуал оставляй как у тебя: фон, радиус, тени */
  /* background: ...; border-radius: ...; box-shadow: ...; */
}


/* внутренний контент НЕ задаёт свою ширину — просто 100% родителя */
.person-modal{
  width: 100%;
  max-width: 100%;
  padding: 0;                 /* паддинги есть у .modal-card */
  margin: 0;
  text-align: center;
}

/* сетка 2×2 + защита от переполнения */
.person-modal .stats-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}
.person-modal .kpi,
.person-modal .kpi-wrap{ min-width: 0; }  /* текст не раздвигает грид */
/* Топбар игры */
.game-topbar{
  position: relative;         /* база для абсолютного центрирования */
  height: 44px;               /* подгони под свой размер */
  padding: 0 12px;
  display: flex;              /* можно оставить flex для кнопок слева/справа */
  align-items: center;
}

/* Заголовок всегда точно по центру бара */
.game-title{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font: 700 16px/1.2 system-ui;
  white-space: nowrap;
  pointer-events: none;       /* чтобы клики по кнопкам под ним не блокировались */
}
/* --- Sky Raid banner (Cabinet) --- */
/* --- Sky Raid big hero banner --- */
/* --- Sky Raid big hero banner — fixed for desktop --- */
/* 1) герой-баннер: правильная формула ширины */
.sr-hero{
  position: relative;
  margin: 12px auto 10px;
  width: min(720px, calc(100% - 24px)); /* <-- calc добавили */
  box-sizing: border-box;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #0e0e12;
  border: 1px solid #2f2f2f;
  box-shadow: 0 14px 28px rgba(0,0,0,.35);
}

/* 2) всегда резервируем место под полосу прокрутки,
      чтобы не было «рывка» и визуального зазора */
body,
.pages-wrapper{
  scrollbar-gutter: stable both-edges;
}

.sr-hero-img{
  position:absolute; inset:0; width:100%; height:100%;
  object-fit:cover; filter:saturate(1.05) contrast(1.03);
}
.sr-hero-overlay{
  position:absolute; inset:0; display:flex; flex-direction:column; justify-content:space-between;
  background:
    linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.15) 34%, rgba(0,0,0,.55) 100%),
    radial-gradient(600px 380px at -10% -10%, rgba(0,255,200,.08), transparent 60%),
    radial-gradient(700px 420px at 120% 0%, rgba(140,120,255,.08), transparent 60%);
  pointer-events:none;
}
.sr-hero-top{padding:12px 14px 0; pointer-events:auto}
.sr-hero-title{color:#fff; font:800 20px/1.1 system-ui, sans-serif; text-shadow:0 2px 10px rgba(0,0,0,.4)}
.sr-hero-desc{color:#e9e9ef; opacity:.9; font:600 12.5px/1.25 system-ui, sans-serif; max-width:80%; margin-top:4px}

.sr-hero-bottom{
  padding:12px; display:flex; gap:8px; align-items:center; justify-content:flex-end; pointer-events:auto
}
.sr-pill{
  background:#1b1b1b;border:1px solid #2e2e2e;border-radius:999px;
  padding:7px 10px;font:700 12px system-ui;color:#fff
}
.sr-hero-btn{
  border:1px solid #3a3a3a;background:#1f5f4f;border-radius:12px;padding:10px 16px;
  color:#fff;font:800 14px system-ui; cursor:pointer
}
.sr-hero-btn[disabled]{opacity:.6; cursor:not-allowed}

@media (max-width:420px){
  .sr-hero-title{font-size:18px}
  .sr-hero-desc{max-width:86%}
}
.ad-block {
  width: 100%;
  max-width: 468px;
  aspect-ratio: 468 / 60;
  margin-left: auto;
  margin-right: auto;

  background-color: #0f0f0f;
  background-size: contain;     /* 👈 НЕ ОБРЕЗАЕТСЯ */
  background-position: center;
  background-repeat: no-repeat;

  border-radius: 8px;
  border: 1px solid #1e1e1e;
  box-shadow: 0 0 14px rgba(0,0,0,0.35);

  display: flex;
  align-items: center;
  justify-content: center;

  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 0 4px rgba(0,0,0,0.9);

  position: relative;
  overflow: hidden;
  cursor: pointer;
}


.ad-block span {
  position: relative;
  z-index: 2; /* 👆 текст выше свечения */
}

/* ✨ Пульсация ВИДИМАЯ поверх фона */
.ad-block::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1; /* 🔥 поверх background */
  background: radial-gradient(
    circle at center,
    rgba(255,255,255,0.40) 0%,
    rgba(255,255,255,0) 75%
  );
  animation: innerPulse 2s infinite ease-in-out;
  pointer-events: none;
}
.ad-fade {
  transition: opacity 0.6s ease;
  opacity: 1;
}
.ad-hidden {
  opacity: 0;
}

@keyframes innerPulse {
  0% { opacity: 0; transform: scale(0.9); }
  50% { opacity: .6; transform: scale(1.1); }
  100% { opacity: 0; transform: scale(0.9); }
}



/* 📱 маленькие экраны */
@media (max-height: 700px) {
  .ad-block {
    height: 62px;
  }
}
/* ===========================================================
   KAMIKADZE GAME — UI v2
   =========================================================== */

/* Страница игры */
#page-kamikadze {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px 16px 55px;
  background: radial-gradient(circle at 50% -40%, #071525 0%, #000 65%);
  color: #fff;
  font-family: "Roboto", system-ui, sans-serif;
  position: relative;
}

/* FX-слой (если будешь делать монетки/частицы) */
.kz-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

/* ===========================================================
   HEADER: баланс, заголовок, этаж, награда
   =========================================================== */

.kz-header {
  width: 100%;
}

/* Плашка баланса над названием */
#kz-balance {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 4px 0 10px;
  font-size: 0;           /* скрывает всё, кроме <b> */
}

#kz-balance b {
  display: inline-block;
  padding: 7px 22px;
  border-radius: 999px;
  background: radial-gradient(circle at 0 0, #2563eb, #0b1120 75%);
  box-shadow:
    0 0 24px rgba(37, 99, 235, 0.7),
    0 0 2px rgba(255,255,255,0.4);
  font-size: 17px;
  font-weight: 700;
  color: #f9fafb;
  letter-spacing: 0.35px;
}

/* Заголовок игры */
.kz-title {
  width: 100%;
  text-align: center;
  margin-bottom: 4px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.6px;
  color: #e5e7eb;
  text-shadow: 0 0 16px rgba(0,0,0,0.9);
}

.kz-title span {
  color: #38bdf8;
}

/* Этаж */
.kz-info-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 14px;
  color: #9ca3af;
  text-align: center;
}
.kz-info-bar span {
  color: #e5e7eb;
  font-weight: 700;
}

/* Награда */
.kz-status {
  text-align: center;
  margin-bottom: 10px;
  font-size: 14px;
  color: #9ca3af;
}
.kz-status b {
  font-weight: 800;
  color: #facc15;
}

/* ===========================================================
   КАРТА: башня, ряды, множители справа
   =========================================================== */

.kz-board {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  padding: 20px 0 24px;
  max-width: 370px;
  margin: 0 auto;

  /* мягкая форма */
  border-radius: 28px;

  /* стеклянный фон + лёгкая дымка */
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: blur(10px);

  /* красивые внутренние и внешние тени */
  box-shadow:
    inset 0 0 35px rgba(0, 0, 0, 0.25),
    inset 0 0 20px rgba(0, 0, 0, 0.45),
    0 18px 60px rgba(0, 0, 0, 0.85),
    0 0 22px rgba(0, 0, 0, 0.75);
}

/* Один ряд: клетки + множитель */
.kz-row-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* Клетки ряда */
.kz-row {
  display: flex;
  gap: 6px;
  position: relative;
}

/* Подсветка текущего ряда (не двигает сетку!) */
.kz-row.current-row {
  position: relative;
}
.kz-row.current-row::before {
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  bottom: -12px;
  height: 26px;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(56, 189, 248, 0.6) 0%,
    rgba(56, 189, 248, 0.22) 40%,
    transparent 80%
  );
  filter: blur(2px);
}

/* Множитель справа */
.kz-mult-right {
  min-width: 60px;
  padding: 7px 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #38bdf8;

  background: linear-gradient(145deg, rgba(15,23,42,0.9), rgba(15,23,42,0.7));
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 6px 18px rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  transition: 0.18s ease;
}

/* Пройденные уровни */
.kz-mult-right.passed {
  background: linear-gradient(145deg, #16a34a, #22c55e);
  color: #022c22;
  border-color: rgba(34, 197, 94, 0.6);
  box-shadow:
    0 0 20px rgba(34,197,94,0.85),
    0 0 3px rgba(255,255,255,0.35);
}

/* Текущий уровень */
.kz-mult-right.active {
  background: linear-gradient(145deg, #0ea5e9, #38bdf8);
  color: #012a3a;
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow:
    0 0 22px rgba(56,189,248,0.95),
    0 0 4px rgba(191, 219, 254, 0.6);
}

/* ===========================================================
   КЛЕТКИ: базовое состояние + иконки + анимации
   =========================================================== */

.cell {
  width: clamp(34px, 10vw, 48px);
  height: clamp(34px, 10vw, 48px);
  border-radius: 14px;
  background: radial-gradient(circle at 30% 15%, #1f2937, #020617);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,0.9);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease,
    filter 0.15s ease;
  position: relative;
  overflow: hidden;
}

.cell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(255,255,255,0.18), transparent 58%);
  opacity: 0.18;
  pointer-events: none;
}

/* Лёгкий hover только по текущему уровню (класс current) */
.cell.current:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.05);
}

/* Иконки поверх */
.cell.safe::before,
.cell.hero::before,
.cell.trap::before {
  content: "";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(16px, 4vw, 20px);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.95);
}
.cell.safe::before { content: "✓"; color: #022c22; }
.cell.hero::before { content: "★"; color: #022c22; }
.cell.trap::before { content: "✕"; color: #fee2e2; }

/* Текущая клетка для клика */
.cell.current {
  border-color: #38bdf8;
  background: radial-gradient(circle at 30% 15%, #1d4ed8, #020617);
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.75);
  animation: currentPulse 1.4s infinite alternate ease-in-out;
}

@keyframes currentPulse {
  0%   { transform: scale(1.02); box-shadow: 0 0 14px #0ea5e988; }
  100% { transform: scale(1.06); box-shadow: 0 0 26px #38bdf8ee; }
}

/* SAFE */
.cell.safe {
  background: radial-gradient(circle at 25% 15%, #22c55e, #15803d);
  border-color: rgba(34, 197, 94, 0.8);
  box-shadow:
    0 0 24px rgba(34, 197, 94, 0.9),
    0 6px 18px rgba(0,0,0,0.9);
  animation: safePop 0.25s ease-out;
}

@keyframes safePop {
  from { transform: scale(0.4); }
  to   { transform: scale(1.08); }
}

/* HERO */
.cell.hero {
  background: radial-gradient(circle at 25% 15%, #22d3ee, #0284c7);
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow:
    0 0 30px rgba(56, 189, 248, 0.95),
    0 6px 20px rgba(0,0,0,0.95);
  transform: scale(1.1);
  animation: heroPulse 1.8s infinite;
}

@keyframes heroPulse {
  0%   { box-shadow: 0 0 22px #22d3eecc; }
  100% { box-shadow: 0 0 40px #38bdf8ff; }
}

/* TRAP */
.cell.trap {
  background: radial-gradient(circle at 30% 15%, #f97373, #991b1b, #220202);
  border-color: rgba(248, 113, 113, 0.85);
  box-shadow:
    0 0 26px rgba(248,113,113,0.95),
    0 4px 16px rgba(0,0,0,0.9);
  animation: boom 0.35s ease-out forwards;
}

@keyframes boom {
  0%   { transform: scale(1); opacity: 1; }
  30%  { transform: scale(1.4) rotate(4deg); }
  100% { transform: scale(0.7) translateY(10px); opacity: 0.4; }
}

/* Состояние всей доски (можно триггерить классами из JS) */
.kz-board.win      { animation: winGlow 0.8s ease-out; }
.kz-board.lose     { animation: loseShake 0.45s ease-in-out; }
.kz-board.cashout  { animation: kz-cashout-bounce 0.5s ease-out; }

@keyframes winGlow {
  0%   { box-shadow: 0 0 0 #facc15; }
  50%  { box-shadow: 0 0 55px #fde047; }
  100% { box-shadow: 0 0 25px #facc15; }
}
@keyframes loseShake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}
@keyframes kz-cashout-bounce {
  0%   { transform: scale(1); box-shadow: 0 0 0 rgba(250, 250, 150, 0); }
  30%  { transform: scale(1.03) translateY(-4px); box-shadow: 0 0 40px rgba(250, 250, 150, 0.75); }
  60%  { transform: scale(0.99) translateY(2px); box-shadow: 0 0 22px rgba(250, 250, 150, 0.45); }
  100% { transform: scale(1); box-shadow: 0 0 12px rgba(250, 250, 150, 0.2); }
}

/* ===========================================================
   СТАВКИ И КНОПКИ
   =========================================================== */

.kz-bets,
.kz-action-buttons {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

/* Плашка со ставками */
.kz-bets {
  margin-top: 18px;
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.95);
}

/* Общий стиль кнопок */
.kz-bet,
#kz-play,
#kz-cashout {
  appearance: none;
  padding: 10px 18px;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.95);
  color: #e5e5e5;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s ease;
  backdrop-filter: blur(6px);
}

/* hover */
.kz-bet:hover,
#kz-play:hover:not(:disabled),
#kz-cashout:hover:not(:disabled) {
  background: rgba(30, 64, 175, 0.75);
  transform: translateY(-2px);
}

/* Активная ставка */
.kz-bet.active {
  background: #22c55e;
  color: #022c22;
  box-shadow: 0 0 20px rgba(34,197,94,0.9);
}

/* PLAY */
#kz-play {
  background: linear-gradient(145deg, #2563eb, #1e40af);
  color: #f9fafb;
  box-shadow: 0 8px 24px rgba(37,99,235,0.8);
}
#kz-play:disabled {
  opacity: 0.45;
  background: #1d4ed8;
  box-shadow: none;
}

/* CASHOUT */
#kz-cashout {
  background: linear-gradient(145deg, #f59e0b, #b45309);
  color: #111827;
  box-shadow: 0 8px 24px rgba(245,158,11,0.75);
}
#kz-cashout:disabled {
  background: #92400e;
  color: #f9fafb;
  opacity: 0.4;
  box-shadow: none;
}

/* ===========================================================
   Мобилка
   =========================================================== */

@media (max-width: 420px) {
  .kz-bets,
  .kz-action-buttons {
    gap: 6px;
  }

  .kz-bet,
  #kz-play,
  #kz-cashout {
    padding: 9px 14px;
    font-size: 14px;
  }

  .kz-board {
    max-width: 320px;
    padding: 14px 10px 18px;
  }

  .kz-info-bar {
    font-size: 13px;
    gap: 8px;
  }

  #kz-balance b {
    padding: 6px 16px;
    font-size: 16px;
  }
}

/* ====== ИГРОВЫЕ ПЛИТКИ ====== */

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}


.game-card {
  position: relative;
  background: #0e0e12;
  border: 1px solid #2f2f2f;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  height: 180px; /* фиксированная высота плитки — можешь менять */
}

.game-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;    /* <-- делает фулл-растяжение */
  object-position: center;
}

.game-card:active {
  transform: scale(0.97);
}

/* Заголовок игры сверху */
.game-card-title-top {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);

  background: rgba(0,0,0,0.65);
  padding: 5px 12px;

  color: #fff;
  font: 800 14px system-ui;
  border-radius: 10px;

  pointer-events: none;
  z-index: 3;

  white-space: nowrap;        /* ← фикс переносов */
  max-width: 90%;             /* ← защита от вылазания */
  overflow: hidden;
  text-overflow: ellipsis;
}


/* Кнопка Play снизу */
.game-card-play-btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;

  padding: 10px 0;
  font-size: 15px;
  font-weight: 800;

  background: #12c287;
  color: #fff;
  text-align: center;

  border-radius: 12px;
  border: 0;

  z-index: 3; /* ← ВАЖНО */
}



.game-card-soon {
  position: absolute;
  bottom: 12px;         /* 🔽 вместо top */
  left: 50%;            /* центрируем */
  transform: translateX(-50%);
  
  padding: 8px 18px;
  background: #ff9900;
  color: #000;

  font: 900 14px system-ui;
  border-radius: 12px;

  box-shadow: 0 4px 10px rgba(0,0,0,.45);
}


/* ==========================
   🧸 Глобальный ассистент-маскот
   ========================== */

#mascot-helper {
  position: fixed;
  bottom: 82px;             /* над нижней навигацией */
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.06);  /* лёгкая прозрачность */
  backdrop-filter: blur(10px);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0.45;            /* полупрозрачный до клика */
  transition: opacity .25s, transform .25s;

  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);

  z-index: 9999;
  cursor: pointer;

  /* мягкая анимация покачивания — как у Blum */
  animation: mascotFloat 3s ease-in-out infinite;
}

#mascot-helper:hover {
  opacity: 1;
  transform: scale(1.05);
}

#mascot-helper img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  pointer-events: none; /* Не мешает клику */
}

@keyframes mascotFloat {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}
/* затемнение */
#assistant-menu {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
}

.assistant-hidden {
  display: none;
}

/* окно */
.assistant-window {
  background: #101014;
  padding: 18px;
  width: 86%;
  max-width: 320px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: assistPop .25s ease;
}

.assistant-window h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: #fff;
}

.assistant-window p {
  margin: 0 0 14px;
  color: #ccc;
}

.assistant-window button {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border-radius: 8px;
  border: none;
  background: #1d1d28;
  color: #fff;
  font-size: 15px;
}

.close-btn {
  background: #333 !important;
}

@keyframes assistPop {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
/* затемнение */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(3px);
  z-index: 9998;
  display: none;
}

/* подсветка */
.tour-highlight-box {
  position: fixed;
  border: 3px solid #00ffcc;
  border-radius: 12px;
  box-shadow: 0 0 20px #00ffcc;
  z-index: 9999;
  display: none;
  pointer-events: none;
}

.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 999997 !important;
}

.tour-highlight-box {
  position: fixed;
  border: 3px solid #00ffc8;
  border-radius: 12px;
  box-shadow: 0 0 20px #00ffc8;
  z-index: 999998 !important;
  pointer-events: none;
}

.tour-tooltip {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  max-width: 340px;
  background: #111;
  color: #fff;
  padding: 16px;
  border-radius: 14px;
  z-index: 999999 !important;
  opacity: 0;
  transition: opacity .25s ease;
}

.tour-tooltip.show {
  opacity: 1;
}

.tour-tooltip-buttons {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
transform: translateX(-50%);
  width: 85%;
  max-width: 340px;
  background: #111;
  color: #fff;
  border-radius: 16px;
  padding: 16px;
  z-index: 10000;
  display: none;
  opacity: 0;
  transition: opacity .25s ease;
}

.tour-tooltip.show { opacity: 1; }

.tour-tooltip-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.tour-tooltip-text {
  font-size: 14px;
  opacity: .8;
  margin-bottom: 10px;
}

.tour-tooltip-steps {
  font-size: 12px;
  opacity: .6;
  text-align: right;
  margin-bottom: 12px;
}

.tour-tooltip-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tour-btn-ghost,
.tour-btn-primary {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

.tour-btn-ghost {
  background: #222;
  color: #ccc;
}

.tour-btn-primary {
  background: #4C8BF5;
  color: #fff;
}
