/* wooalya: бирюза на чёрном. Переопределяет токены из styles.css и добавляет вход и картинки. */
:root {
  --bg: #050808;
  --bg-2: #0a1112;
  --card: #0f1819;
  --card-2: #142123;
  --line: #1c2b2d;
  --text: #eefaf8;
  --muted: #86a19d;
  --accent: #2ee6d0;
  --accent-ink: #021614;
  --sky: #0fa3b1;
}
.top { background: rgba(5, 8, 8, .88); }
.btn:hover { box-shadow: 0 10px 30px rgba(46, 230, 208, .28); }
.item.on { background: #0b2421; }
.logo { font-size: 21px; letter-spacing: -.02em; }
.logo i { background: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.slide { background: var(--c1); }
.slide h1, .slide p { text-shadow: 0 2px 12px rgba(0, 0, 0, .45); }
.slide.has-img { background: var(--img) center / cover no-repeat; grid-template-columns: minmax(0, 1fr); }
.slide.has-img > div:first-child { justify-self: start; max-width: 560px; padding: clamp(18px, 3vw, 28px); border-radius: 20px; background: rgba(5, 8, 8, .84); }
.tile-art.has-img { background: var(--img) center / cover no-repeat; color: transparent; }
.tile-logo { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; padding: 8px; background: rgba(255,255,255,.04); flex-shrink: 0; display: block; }
.notice { background: rgba(46, 230, 208, .08); border-color: rgba(46, 230, 208, .35); color: #cdf7f1; }
.item .old { font-size: 13px; color: var(--muted); text-decoration: line-through; margin-left: 6px; font-family: var(--body); font-weight: 600; }
.item .ico { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; pointer-events: none; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
.item > b { padding-right: 42px; overflow-wrap: anywhere; min-width: 0; }
.item .tag + .ico { top: 22px; }
@media (max-width: 760px) { .item .ico { top: 10px; right: 10px; width: 30px; height: 30px; } .item > b { padding-right: 36px; } }
@media (max-width: 760px) { .item .tag + .ico { top: 20px; } }

/* Вход и профиль */

/* ===== Окно входа ===== */
#loginDlg {
  width: min(92vw, 420px);
  padding: 24px;
  border: 1px solid #262626;
  border-radius: 16px;
  background: #111;
  color: #fff;
}
#loginDlg::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.login-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
#loginDlg h2 { margin: 0; font-size: 28px; font-weight: 800; color: #fff; text-align: left; }
.x-close-lg { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: #aaa; font-size: 28px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.x-close-lg:hover { background: #1b1b1b; color: #fff; }
.login-methods { display: flex; flex-direction: column; gap: 12px; }
.method-btn {
  width: 100%; height: 52px; padding: 0 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 12px; background: #1b1b1b; color: #fff;
  font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: background .15s ease;
}
.method-btn:hover { background: #262626; }
.method-btn svg { width: 24px; height: 24px; flex-shrink: 0; }
.login-methods .login-note { color: var(--muted); font-size: 14px; text-align: center; }

.home-btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 18px; margin-top: 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; }
.home-btn:hover { border-color: var(--accent); color: var(--accent); }
.orders-box .home-btn { justify-self: start; margin-top: 4px; }

/* ===== Пользовательский хедер (авторизация) ===== */
.user-auth-toggle {
  background: linear-gradient(135deg, rgba(147,51,234,.3), rgba(99,102,241,.3));
  border: 1px solid rgba(147,51,234,.3);
  border-radius: 14px;
  padding: 8px 16px;
  color: #e9d5ff;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.user-auth-toggle:hover {
  background: linear-gradient(135deg, rgba(147,51,234,.5), rgba(99,102,241,.5));
  border-color: #9333ea;
  box-shadow: 0 0 20px rgba(147,51,234,.3);
}

/* ===== Пользовательский аватар в хедере ===== */
#meBox .me {
  display: flex;
  align-items: center;
  gap: 10px;
}
#meBox button {
  background: rgba(147,51,234,.15);
  border: 1px solid rgba(147,51,234,.2);
  border-radius: 14px;
  padding: 6px 14px;
  color: #c084fc;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all .2s ease;
}
#meBox button:hover {
  background: rgba(147,51,234,.25);
  box-shadow: 0 0 16px rgba(147,51,234,.2);
}
#meBox .ava {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9333ea, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}
#meBox img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== Выпадающее меню пользователя ===== */
.me-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(15,10,30,.97);
  border: 1px solid rgba(147,51,234,.3);
  border-radius: 16px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  box-shadow: 0 16px 48px rgba(0,0,0,.5);
  backdrop-filter: blur(20px);
}
.me-menu button {
  background: transparent;
  border: none;
  padding: 10px 16px;
  text-align: left;
  color: #e5e7eb;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  cursor: pointer;
  border-radius: 10px;
  transition: all .15s ease;
}
.me-menu button:hover {
  background: rgba(147,51,234,.2);
  color: #c084fc;
}

/* ===== РЕСЕЛЛЕР-ПОРТАЛ (админка) ===== */
.reseller-panel {
  background: rgba(15,10,30,.6);
  border: 1px solid rgba(147,51,234,.2);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 24px;
}
.reseller-panel h3 {
  font-family: 'Unbounded', sans-serif;
  color: #c084fc;
  font-size: 18px;
  margin: 0 0 16px;
}
.reseller-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.reseller-card {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(147,51,234,.15);
  border-radius: 16px;
  padding: 20px;
}
.reseller-card h4 {
  color: #e5e7eb;
  font-size: 15px;
  margin: 0 0 8px;
}
.reseller-card input, .reseller-card select {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(147,51,234,.2);
  border-radius: 10px;
  color: #e5e7eb;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  margin-bottom: 8px;
}
.reseller-card input:focus, .reseller-card select:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 12px rgba(147,51,234,.2);
}
.reseller-card label {
  color: #9ca3af;
  font-size: 12px;
  margin-bottom: 4px;
  display: block;
}

/* ===== Тарифы реселлера ===== */
.retail-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.tier-card {
  background: linear-gradient(135deg, rgba(147,51,234,.1), rgba(99,102,241,.1));
  border: 1px solid rgba(147,51,234,.2);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.tier-card.active {
  border-color: #9333ea;
  background: linear-gradient(135deg, rgba(147,51,234,.2), rgba(99,102,241,.2));
  box-shadow: 0 0 24px rgba(147,51,234,.3);
}
.tier-card h5 {
  color: #c084fc;
  margin: 0 0 8px;
  font-size: 14px;
}
.tier-card .discount {
  color: #22d3ee;
  font-size: 24px;
  font-weight: 800;
  font-family: 'Unbounded', sans-serif;
}

/* ===== Ключи API ===== */
.api-key-display {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(147,51,234,.2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 12px;
}
.api-key-display code {
  flex: 1;
  color: #22d3ee;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  user-select: all;
  overflow-x: auto;
  white-space: nowrap;
}
.api-key-display button {
  background: rgba(147,51,234,.3);
  border: 1px solid #9333ea;
  border-radius: 8px;
  padding: 6px 14px;
  color: #e9d5ff;
  font-size: 13px;
  cursor: pointer;
}

/* ===== Статус реселлера ===== */
.reseller-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}
.reseller-status.active {
  background: rgba(34,197,94,.1);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,.2);
}
.reseller-status.inactive {
  background: rgba(239,68,68,.1);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.2);
}
.auth-btn { height: 42px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink); font-weight: 800; white-space: nowrap; cursor: pointer; }
.user-auth-toggle { height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.user-auth-toggle:hover { border-color: var(--accent); color: var(--accent); }
.auth-google-btn, .auth-telegram-btn { padding: 10px 24px; border-radius: 12px; border: 0; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.auth-google-btn { background: #fff; color: #333; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.auth-google-btn:hover { background: #f0f0f0; transform: translateY(-1px); }
.auth-telegram-btn { background: linear-gradient(135deg, #2AABEE, #229ED9); color: #fff; box-shadow: 0 2px 8px rgba(42,171,238,.3); }
.auth-telegram-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(42,171,238,.4); }
.me { position: relative; }
.me > button { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px 0 5px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-weight: 700; max-width: 200px; }
.me img, .me .ava { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 800; }
.me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-menu { position: absolute; right: 0; top: 50px; min-width: 200px; padding: 6px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); display: grid; box-shadow: 0 20px 40px rgba(0, 0, 0, .5); }
.me-menu button { text-align: left; padding: 10px 12px; border: 0; border-radius: 10px; background: none; font-weight: 600; }
.me-menu button:hover { background: var(--card); }
.login-box { padding: 28px; display: grid; gap: 16px; justify-items: center; text-align: center; }
.login-box h2 { font-size: 22px; }
.login-opts { display: grid; gap: 12px; justify-items: center; min-height: 50px; width: 100%; }
.login-note { font-size: 13px; color: var(--muted); max-width: 34ch; }
.orders-box { padding: 24px; display: grid; gap: 12px; max-height: 80vh; overflow: auto; }
.orders-box h2 { font-size: 20px; }
.o-row { padding: 14px; border-radius: 12px; background: var(--card); display: grid; gap: 4px; font-size: 14px; }
.o-row b { font-size: 15px; }
.status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--card-2); }
.status.paid, .status.done { background: var(--accent); color: var(--accent-ink); }
.status.cancel { background: #4a1d1d; color: #ffb4b4; }
.x-close { justify-self: end; border: 0; background: var(--card); width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
.loading { padding: 60px 0; text-align: center; color: var(--muted); }
@media (max-width: 760px) {
  .me > button span { display: none; }
  .me > button { padding: 0 5px; }
  .auth-btn { padding: 0 14px; height: 38px; }
}

/* ===== Страницы заказа и тестовой оплаты ===== */
.order-page { max-width: 640px; margin: 0 auto; padding: 24px 0 60px; display: grid; gap: 18px; }
.order-page h1 { font-size: 26px; word-break: break-all; }
.order-err { padding: 14px 16px; border-radius: 12px; background: #4a1d1d; color: #ffb4b4; font-weight: 600; }
#box { display: grid; gap: 18px; }
/* статус заказа: крупная карточка с анимированным значком (зелёная галочка = оплата прошла) */
.order-status { --c: #22c55e; display: grid; justify-items: center; text-align: center; gap: 10px; padding: 28px 20px 24px; border-radius: 20px;
  background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%), var(--card); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--line));
  animation: os-in .45s ease-out both; }
.order-status.t-wait { --c: #f5b301; }
.order-status.t-bad { --c: #ff5a5a; }
.os-icon { position: relative; width: 84px; height: 84px; border-radius: 50%; background: var(--c); display: grid; place-items: center; box-shadow: 0 10px 30px color-mix(in srgb, var(--c) 45%, transparent);
  animation: os-pop .55s cubic-bezier(.2, 1.4, .4, 1) .1s both; }
.os-icon::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c); animation: os-ring 1.8s ease-out .5s infinite; }
.os-icon svg { width: 44px; height: 44px; fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.os-icon .chk { stroke-dasharray: 40; stroke-dashoffset: 40; animation: os-draw .45s ease-out .55s forwards; }
.os-icon .spin { transform-origin: 50% 50%; animation: os-spin 1.1s linear infinite; }
.os-title { font-family: var(--display); font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.25; }
.os-sub { color: var(--muted); font-size: 14px; max-width: 34ch; }
.os-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
@keyframes os-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes os-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes os-ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }
@keyframes os-draw { to { stroke-dashoffset: 0; } }
@keyframes os-spin { to { transform: rotate(360deg); } }
/* этапы — не кнопки, а шкала: кружок с галочкой + линия */
.order-steps { list-style: none; margin: 0; padding: 4px 4px 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: st; }
.order-steps li { position: relative; display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); counter-increment: st; }
.order-steps li::before { content: counter(st); position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card-2); border: 2px solid var(--line); color: var(--muted); font-size: 13px; transition: background .3s, border-color .3s; }
.order-steps li + li::after { content: ''; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.order-steps li.done { color: var(--text); }
.order-steps li.done::before { content: '✓'; background: #22c55e; border-color: #22c55e; color: #fff; }
.order-steps li.done + li.done::after { background: #22c55e; }
.order-steps li.now::before { content: ''; background: transparent; border-color: #22c55e; border-top-color: transparent; animation: os-spin 1s linear infinite; }
.order-steps li.stopped::before { content: '✕'; background: #ff5a5a; border-color: #ff5a5a; }
.order-info { display: grid; gap: 10px; padding: 16px; border-radius: 16px; background: var(--card); }
.order-info > div { display: flex; justify-content: space-between; gap: 16px; font-size: 15px; }
.order-info b { text-align: right; }
.order-page .btn { justify-self: start; text-decoration: none; }
.pay-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.order-page h1 { font-size: 18px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .order-status, .os-icon, .os-icon::after, .os-icon .chk, .os-icon .spin, .order-steps li.now::before { animation: none !important; stroke-dashoffset: 0; } }

/* ===== Разделы каталога: одна строка с прокруткой, у раздела число игр ===== */
.cat-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 12px calc(-1 * var(--gutter-r)) 16px calc(-1 * var(--gutter-l)); padding: 2px var(--gutter-r) 4px var(--gutter-l); scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs .chip { flex: none; display: inline-flex; align-items: center; gap: 8px; scroll-snap-align: start; white-space: nowrap; background: var(--card); border-color: var(--line); color: var(--text); }
.cat-tabs .chip small { font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--card-2); color: var(--muted); }
.cat-tabs .chip.on small { background: rgba(0, 0, 0, .18); color: inherit; }
.grid-more { min-height: 1px; display: flex; justify-content: center; margin-top: 16px; }

/* ===== Меню профиля в шапке: ссылки как кнопки ===== */
.me-menu a { display: block; padding: 10px 12px; border-radius: 10px; font-weight: 600; text-decoration: none; color: var(--text); }
.me-menu a:hover { background: var(--card); }

/* ===== Нижняя панель (телефон и Mini App) ===== */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgba(18, 18, 18, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 0; border-radius: 12px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; transition: color .2s; }
  .tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar a.on { color: var(--accent); }
  .tabbar a.on svg { filter: drop-shadow(0 0 8px rgba(46, 230, 208, .45)); }
  body.has-tabbar { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* ===== Кабинет ===== */
.profile { max-width: 720px; margin: 0 auto; padding: 20px 0 40px; display: grid; gap: 14px; }
.pf-card { border-radius: 22px; overflow: hidden; border: 1px solid rgba(46, 230, 208, .25);
  background: radial-gradient(120% 120% at 0% 0%, rgba(46, 230, 208, .18), transparent 55%), radial-gradient(90% 90% at 100% 0%, rgba(30, 150, 200, .16), transparent 60%), var(--card); }
.pf-head { display: flex; align-items: center; gap: 16px; padding: 20px; }
.pf-head h1 { font-size: 22px; line-height: 1.2; margin: 0 0 2px; word-break: break-word; }
.pf-head > div:last-child { display: grid; gap: 2px; min-width: 0; }
.pf-since { font-size: 13px; color: var(--accent); font-weight: 700; }
.pf-ava { flex: none; width: 68px; height: 68px; border-radius: 50%; padding: 3px; background: conic-gradient(from 200deg, #2ee6d0, #1e96c8, #2ee6d0); }
.pf-ava img, .pf-ava span { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center; background: var(--bg-2); border: 3px solid var(--card); font-family: var(--display); font-size: 24px; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.pf-stats > div { display: grid; justify-items: center; gap: 2px; padding: 14px 6px; text-align: center; }
.pf-stats > div + div { border-left: 1px solid var(--line); }
.pf-stats b { font-family: var(--display); font-size: 18px; }
.pf-stats span { font-size: 12px; color: var(--muted); }
.pf-guest { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 32px 20px; }
.pf-guest .muted { max-width: 36ch; }
.pf-fav { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.pf-fav.empty { border-style: dashed; }
.pf-fav > div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.pf-fav small { color: var(--muted); font-size: 13px; }
.pf-thumb { flex: none; width: 52px; height: 52px; border-radius: 14px; overflow: hidden; display: block; position: relative; background: var(--card-2); }
.pf-thumb .tile-art, .pf-thumb .tile-logo { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border-radius: 0; font-size: 18px; aspect-ratio: auto; }
.pf-thumb .tile-art:not(.has-img) { display: grid; place-items: center; background: linear-gradient(135deg, var(--c1, #1f6f68), var(--c2, #15414d)); font-family: var(--display); font-weight: 800; color: #fff; }
.pf-block { display: grid; gap: 10px; }
.pf-title { display: flex; align-items: baseline; gap: 8px; padding: 6px 4px 0; }
.pf-title h2 { font-size: 18px; margin: 0; }
.pf-list { border-radius: 18px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.pf-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; transition: opacity .25s, transform .25s; }
.pf-row + .pf-row { border-top: 1px solid var(--line); }
.pf-row.gone { opacity: 0; transform: translateX(30px); }
.pf-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.pf-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-main small { font-size: 12px; }
.pf-id { font-family: ui-monospace, Consolas, monospace; color: var(--accent); font-weight: 700; }
.pf-acts { flex: none; display: grid; justify-items: end; gap: 6px; }
.pf-acts .btn.small, .pf-fav .btn.small { min-height: 34px; height: 34px; padding: 0 14px; font-size: 13px; }
.pf-del { width: 34px; height: 34px; min-height: 34px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); display: grid; place-items: center; padding: 0; }
.pf-del:hover { color: #ff6b6b; border-color: #7a2d2d; }
.pf-del svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pf-row[data-acc] .pf-acts { grid-auto-flow: column; align-items: center; }
.pf-st { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.pf-st.ok { color: #22c55e; background: rgba(34, 197, 94, .14); }
.pf-st.wait { color: #f5b301; background: rgba(245, 179, 1, .14); }
.pf-st.bad { color: #ff6b6b; background: rgba(255, 90, 90, .14); }
.pf-link { font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; }
.pf-empty { padding: 18px; border-radius: 18px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.pf-empty a { color: var(--accent); }
.pf-menu { display: grid; border-radius: 18px; background: var(--card); border: 1px solid var(--line); overflow: hidden; margin-top: 6px; }
.pf-menu > a, .pf-menu > button { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-align: left; background: none; border: 0; color: var(--text); text-decoration: none; font: inherit; min-height: 0; }
.pf-menu > * + * { border-top: 1px solid var(--line); }
.pf-menu i { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-weight: 800; }
.pf-menu span { display: grid; gap: 2px; }
.pf-menu small { color: var(--muted); font-size: 13px; }
.i-help { background: rgba(46, 230, 208, .14); color: var(--accent); }
.i-faq { background: rgba(30, 150, 200, .16); color: #5cc4f0; }
.i-out { background: rgba(255, 90, 90, .12); color: #ff6b6b; }
#pfLogout b { color: #ff6b6b; }
.profile .pf-block { scroll-margin-top: 80px; }

/* ===== Сохранённые аккаунты на странице игры ===== */
.saved-accs { display: grid; gap: 8px; }
.saved-title { font-size: 14px; font-weight: 600; color: #cfe5e2; }
.sacc-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.sacc { flex: none; display: flex; align-items: stretch; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.sacc.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46, 230, 208, .18); }
.sacc-use { display: grid; text-align: left; gap: 1px; padding: 8px 6px 8px 12px; border: 0; background: none; color: var(--text); min-height: 0; }
.sacc-use b { font-family: ui-monospace, Consolas, monospace; font-size: 14px; }
.sacc-use small { font-size: 11px; color: var(--muted); }
.sacc-del { width: 32px; min-height: 0; border: 0; background: none; color: var(--muted); font-size: 18px; }
.sacc-del:hover { color: #ff6b6b; }

/* один способ оплаты (KZ/KG/UZ) — на всю ширину */
.pay label:only-child { grid-column: 1 / -1; }
/* скрытый переключатель оплаты держим внутри кнопки, иначе он вылезает за экран и страница «плавает» вбок */
.pay label { position: relative; }
.pay input { inset: 0; width: 100%; height: 100%; margin: 0; }

/* ===== Телефон / Mini App: ничего не выходит за ширину экрана (страница не «уезжает» вбок) ===== */
html, body { max-width: 100%; overflow-x: clip; }
@media (max-width: 760px) {
  .top .wrap { position: relative; gap: 8px; }
  /* профиль — в нижней панели, в шапке только логотип, лупа и страна */
  .top #meBox { display: none; }
  .region-sel { max-width: 92px; padding: 0 6px; font-size: 13px; }
  /* поиск: просто значок лупы; по нажатию раскрывается на всю шапку */
  .search { flex: none; width: 40px; height: 40px; max-width: none; margin-left: auto; cursor: pointer; }
  .search svg { left: 10px; top: 10px; width: 20px; height: 20px; stroke: var(--text); pointer-events: none; z-index: 2; }
  .search input { position: absolute; right: 0; top: 0; width: 40px; height: 40px; padding: 0; border-color: transparent; background: transparent; color: transparent; cursor: pointer;
    transition: width .25s ease, background .2s, border-color .2s; }
  .search input::placeholder { color: transparent; }
  .search.open { position: absolute; left: var(--gutter-l); right: var(--gutter-r); top: 10px; width: auto; z-index: 5; }
  .search.open input { width: 100%; padding: 0 16px 0 40px; border-color: var(--accent); background: var(--bg-2); color: var(--text); cursor: text; }
  .search.open input::placeholder { color: var(--muted); }
  .search.open svg { stroke: var(--accent); }
}

/* ===== Логотип: новогодняя шапка Санты, свисающая набок ===== */
.logo i { position: relative; overflow: visible; }
.logo i::before { content: ""; position: absolute; left: -6px; top: -28px; width: 54px; height: 38px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 48'%3E%3Cdefs%3E%3ClinearGradient id='r' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%23ff6b6b'/%3E%3Cstop offset='.55' stop-color='%23e63946'/%3E%3Cstop offset='1' stop-color='%23b71c2b'/%3E%3C/linearGradient%3E%3ClinearGradient id='w' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%23d9e3ee'/%3E%3C/linearGradient%3E%3CradialGradient id='p' cx='.38' cy='.32' r='.75'%3E%3Cstop offset='0' stop-color='%23ffffff'/%3E%3Cstop offset='1' stop-color='%23cfdbe8'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M8 36C6 23 15 13 29 12c13-1 23 8 28 22l1 3H8z' fill='url(%23r)'/%3E%3Cpath d='M30 13c11 0 20 8 25 21' fill='none' stroke='%23a3172a' stroke-opacity='.45' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M13 30c1-8 7-14 15-15' fill='none' stroke='%23ffffff' stroke-opacity='.35' stroke-width='2.6' stroke-linecap='round'/%3E%3Crect x='2' y='31' width='53' height='13' rx='6.5' fill='url(%23w)'/%3E%3Cg fill='url(%23w)'%3E%3Ccircle cx='9' cy='43' r='4.2'/%3E%3Ccircle cx='20' cy='44' r='4.4'/%3E%3Ccircle cx='32' cy='44' r='4.4'/%3E%3Ccircle cx='44' cy='44' r='4.4'/%3E%3C/g%3E%3Crect x='6' y='33' width='45' height='2.4' rx='1.2' fill='%23ffffff' fill-opacity='.9'/%3E%3Ccircle cx='59' cy='36' r='7' fill='url(%23p)'/%3E%3Ccircle cx='56.6' cy='33.6' r='2.4' fill='%23fff' fill-opacity='.8'/%3E%3C/svg%3E") no-repeat center / contain; pointer-events: none; transform: rotate(-5deg); transform-origin: 40% 85%; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }


/* ===== Шапка: страна — только флаг; рядом кошелёк с суммой ===== */
/* флаги-эмодзи: Windows их не рисует (показывает буквы RU/KZ) — подключаем локальный шрифт только для флагов (Twemoji, CC-BY 4.0) */
@font-face { font-family: "Flags"; src: url("/a/fonts/TwemojiCountryFlags~woff2") format("woff2"); unicode-range: U+1F1E6-1F1FF; font-display: swap; }
.region-sel { font-family: "Flags", system-ui, sans-serif; width: auto; min-width: 0; max-width: 64px; padding: 0 6px; font-size: 20px; text-align: center; }
.wallet-chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-weight: 700; font-size: 14px; white-space: nowrap; text-decoration: none; flex: none; }
.wallet-chip svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wallet-chip:hover { border-color: var(--accent); }
@media (max-width: 760px) {
  .region-sel { max-width: 54px; font-size: 20px; padding: 0 4px; }
  .wallet-chip { height: 38px; padding: 0 9px; font-size: 13px; gap: 5px; }
}
@media (max-width: 360px) { .wallet-chip svg { display: none; } }

/* ===== Кабинет: баланс ===== */
.pf-wallet .wl-sum { font-family: var(--display); font-size: 34px; font-weight: 800; margin: 4px 0 14px; }
.wl-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.wl-presets button { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-weight: 600; cursor: pointer; }
.wl-presets button:hover { border-color: var(--accent); }
.wl-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.wl-form input, .wl-form select { flex: 1 1 140px; min-width: 0; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-size: 15px; }
.wl-form .btn { flex: 1 1 140px; }
.wl-form #wlMail { flex-basis: 100%; }
.wl-hist { margin-top: 14px; }
.wl-amt { white-space: nowrap; }
.wl-amt.plus { color: #3ddc84; }
.wl-amt.minus { color: var(--text); }
.pay-wallet small { color: var(--accent); }

/* ---------- оплата с баланса: строка баланса вместо выбора способа ---------- */
.pay-info { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 15px; }
.pay-info b { font-weight: 800; }
.pay-info .need { color: var(--yolk); font-weight: 700; }
.pay-info .pay-topup { margin-left: auto; font-weight: 800; color: var(--accent); text-decoration: underline; }

/* ---------- поле ID: ник игрока, регион и мелкая ссылка «сменить» ---------- */
.region-note { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; margin-top: 8px; font-size: 14px; line-height: 1.35; color: var(--muted); }
.region-note b { color: var(--text); font-size: 16px; font-weight: 800; word-break: break-word; }
.region-note span { color: var(--muted); }
.region-note.ok b::before { content: "✓ "; color: var(--accent); }
.region-note.bad { color: #ff8a8a; }
.region-note .region-change { all: unset; cursor: pointer; font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; margin-left: auto; padding: 2px 0; -webkit-tap-highlight-color: transparent; }
.region-note .region-change:hover { color: var(--text); }
.region-hint { padding: 22px 16px; border-radius: 18px; border: 1px dashed var(--line); text-align: center; color: var(--muted); grid-column: 1 / -1; }
.id-first { display: grid; gap: 10px; }
.id-first .field input { height: 52px; font-size: 18px; font-weight: 700; }
#tabs[hidden] { display: none !important; }

/* вторая кнопка в оформлении: пополнить кошелёк */
#payBtn { width: 100%; margin-top: 10px; background: transparent; color: var(--text); border: 1.5px solid var(--line); box-shadow: none; }
#payBtn:hover { border-color: var(--accent); }

/* ---------- FAQ: на всю ширину, как соседние блоки; стрелка вниз, при открытии переворачивается ---------- */
.faq { max-width: none; }
.faq summary { padding: 18px 56px 18px 20px; }
.faq summary::after { content: ""; width: 10px; height: 10px; right: 24px; top: 50%; border: solid var(--accent); border-width: 0 2.5px 2.5px 0; background: none; translate: 0 -75%; rotate: 45deg; transition: rotate .25s, translate .25s; }
.faq details[open] summary::after { rotate: 225deg; translate: 0 -25%; }
.faq p { max-width: none; }

/* ---------- проверка аккаунта: аватарка и имя ---------- */
.ident-note { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.ident-note.ok { border-color: var(--accent); }
.ident-note.bad { border-color: #ff8a8a; color: #ffb1b1; }
.ident-ava { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.ident-none { display: grid; place-items: center; background: var(--line); color: var(--text); font-weight: 800; font-size: 18px; }
.ident-txt { display: grid; gap: 1px; min-width: 0; }
.ident-txt b { color: var(--text); font-size: 16px; word-break: break-word; }
.ident-txt small { color: var(--muted); font-size: 12px; }

/* стрелки баннеров — только компьютер */
.hero-arrow { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 900px) {
  .hero-arrow { display: block; position: absolute; top: 50%; translate: 0 -50%; z-index: 3; width: 44px; height: 130px; padding: 0; border: 0; background: transparent no-repeat center / contain; font-size: 0; color: transparent; cursor: pointer; opacity: 0; pointer-events: none; filter: drop-shadow(0 2px 6px rgba(0,0,0,.65)); transition: opacity .2s, scale .2s; }
  .hero-arrow.prev { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 90'%3E%3Cpath d='M24 6L6 45l18 39' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  .hero-arrow.next { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 90'%3E%3Cpath d='M6 6l18 39L6 84' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
  .hero-arrow.prev { left: 10px; } .hero-arrow.next { right: 10px; }
  .hero:hover .hero-arrow { opacity: .75; pointer-events: auto; }
  .hero .hero-arrow:hover { opacity: 1; scale: 1.1; }
}

/* ---------- ник игрока: крупно, в карточке с акцентом ---------- */
.region-note.ok { margin-top: 12px; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, rgba(60, 220, 170, .16), rgba(60, 220, 170, .04)); border: 1px solid rgba(60, 220, 170, .45); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.region-note.ok b { flex: 1 0 100%; font-size: 24px; line-height: 1.15; font-weight: 800; letter-spacing: .2px; color: var(--text); }
.region-note.ok b::before { content: "✓"; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; background: var(--accent); color: #062a24; font-size: 14px; font-weight: 900; vertical-align: 3px; }
.region-note.ok span { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .08); font-size: 13px; font-weight: 700; color: var(--text); }
.region-note.ok .region-change { margin-left: auto; }
.ident-note.ok .ident-txt b { font-size: 22px; line-height: 1.15; font-weight: 800; }
.ident-note.ok .ident-ava { width: 52px; height: 52px; box-shadow: 0 0 0 2px var(--accent); }
.ident-note.ok { background: linear-gradient(135deg, rgba(60, 220, 170, .16), rgba(60, 220, 170, .04)); border-color: rgba(60, 220, 170, .45); padding: 12px 14px; }

/* ---------- поле ID и карточка ника: покороче, ник крупнее ---------- */
.id-first { max-width: 440px; }
.region-note.ok b { font-size: 24px; }
.ident-note.ok .ident-txt b { font-size: 22px; }
.sacc-use small { font-size: 14px; font-weight: 700; color: var(--text); }
.hero { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.hero.drag { cursor: grabbing; }
.hero .slide { -webkit-user-drag: none; }
/* шапка: запас сверху под шапку Санты, весь ряд (логотип, меню, поиск, кошелёк) сдвинут вместе */
.top .wrap { box-sizing: border-box; height: 78px; padding-top: 10px; }
@media (max-width: 700px) { .top .wrap { height: 70px; } }

/* сохранённые аккаунты: переносятся на новую строку, а не обрезаются по краю */
.sacc-row { flex-wrap: wrap; overflow: visible; }
.sacc { max-width: 100%; }
.sacc-use { min-width: 0; }
.sacc-use b, .sacc-use small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- логотипы банков КР ---------- */
.banks { margin-top: 14px; }
.banks-t { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.banks-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bk { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 10px; border-radius: 12px; background: #fff; overflow: hidden; }
.bk img { max-height: 26px; max-width: 100%; object-fit: contain; }
.bk i { font-style: normal; font-weight: 700; font-size: 13px; color: #222; white-space: nowrap; }
.bk-dark { background: #1a1d21; }
.bk:has(i) img { max-height: 28px; max-width: 28px; border-radius: 6px; }

/* банки: полоса в подвале и окно выбора оплаты */
footer .foot-banks { grid-column: 1 / -1; }
footer .foot-banks .banks-g { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.bank-modal { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.65); display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.bank-box { width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; background: var(--card, #13201f); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: grid; gap: 12px; }
.bank-box h3 { margin: 0; }
.bank-box p { margin: 0; font-size: 13px; }
@media (min-width: 700px) { .bank-modal { align-items: center; } }
