/* ============================================================
   Экраны: вход, меню, подбор, конструктор, коллекция, магазин
   ============================================================ */

/* ---------- Вход ---------- */
.auth-wrap {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 30px;
  max-height: 100%;
  overflow-y: auto;
}
.auth-logo { text-align: center; }
.auth-ball { font-size: 54px; filter: drop-shadow(0 0 26px rgba(212,175,55,.45)); animation: ballBounce 2.6s ease-in-out infinite; }
@keyframes ballBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  40% { transform: translateY(-16px) rotate(140deg); }
  70% { transform: translateY(0) rotate(240deg); }
}
.auth-logo h1 {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--text);
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.35);
}
.auth-logo h1 span { color: var(--gold); }
.auth-sub { color: var(--text-dim); letter-spacing: 3px; text-transform: uppercase; font-size: 12px; margin-top: 4px; }

.auth-panel { width: 400px; max-width: 92vw; padding: 26px; }
.auth-buttons { display: flex; gap: 10px; margin-top: 14px; }
.auth-buttons .btn { flex: 1; }
.auth-error { color: var(--red-soft); font-size: 13px; min-height: 18px; margin-top: 8px; }
.auth-note { color: var(--gold-dim); font-size: 12px; text-align: center; margin-top: 4px; min-height: 0; }
.auth-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--gold-2);
  font-family: var(--font);
  font-size: 12.5px;
  text-decoration: underline dotted;
  cursor: pointer;
}
.auth-link:hover { color: var(--gold); }
.auth-hint { color: var(--text-faint); font-size: 12.5px; text-align: center; }
.auth-hint b { color: var(--gold-2); }

.field { display: block; margin-bottom: 12px; }
.field span {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 5px;
}
.field input {
  width: 100%;
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

/* ---------- Главное меню ---------- */
.menu-layout { display: flex; flex-direction: column; height: 100%; }
.menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(6, 9, 16, 0.55);
  backdrop-filter: blur(8px);
  /* поповеры громкости из шапки — над панелями меню */
  position: relative;
  z-index: 40;
}
.menu-logo { font-size: 26px; font-weight: 900; letter-spacing: 4px; }
.menu-logo span { color: var(--gold); }
.menu-logo em { font-style: normal; }
.menu-user { display: flex; align-items: center; gap: 12px; }

/* поповер громкости внутри кнопки */
.vol-wrap { position: relative; }
.vol-wrap:hover { z-index: 130; }
/* мостик-наведение: поповер не пропадает при переходе курсора от кнопки */
.vol-wrap::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 4px;
  right: 4px;
  height: 14px;
}
.vol-pop {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  right: -6px;
  z-index: 120;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
}
.vol-wrap:hover .vol-pop, .vol-wrap.open .vol-pop { display: flex; align-items: center; gap: 10px; }
.vol-pop.vol-up { top: auto; bottom: calc(100% + 3px); }
.vol-range { width: 120px; accent-color: var(--gold); height: 4px; cursor: pointer; }
.vol-mute {
  font-size: 13px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 3px 7px;
  cursor: pointer;
  color: var(--text);
}
.vol-mute:hover { border-color: var(--gold-dim); }
.mixer { min-width: 320px; }
.mixer-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  font-size: 14px;
}
.mixer-row span { min-width: 120px; }
.mixer-row input[type="range"] {
  flex: 1;
  accent-color: var(--gold);
  height: 4px;
}
.lang-switch {
  display: flex;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
}
.lang-btn {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 6px 12px;
  background: transparent;
  color: var(--text-dim);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-btn + .lang-btn { border-left: 1px solid var(--line-soft); }
.lang-btn.active {
  background: linear-gradient(180deg, #f0cf6a, #d4af37);
  color: #241b05;
}
.lang-btn:not(.active):hover { color: var(--text); background: rgba(255,255,255,0.06); }
.menu-rating, .menu-coins {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
}
.menu-rating b, .menu-coins b { color: var(--gold-2); }

.menu-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 22px;
  padding: 26px 28px;
  min-height: 0;
  overflow: auto;
}
.menu-actions { padding: 26px; display: flex; flex-direction: column; gap: 14px; align-self: start; }
.menu-big-btn { padding: 18px 22px; text-align: left; display: flex; flex-direction: column; gap: 4px; }
.mb-title { font-size: 19px; }
.mb-sub { font-size: 12px; color: var(--text-dim); text-transform: none; letter-spacing: 0.4px; }
/* подложка не должна «съедать» подзаголовок на золотых кнопках */
.btn-gold .mb-sub { color: rgba(36, 27, 5, 0.75); text-shadow: none; }
.menu-row { display: flex; gap: 10px; margin-top: 6px; }
.menu-row .btn { flex: 1; padding: 12px 8px; font-size: 13px; }

.menu-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.menu-profile { padding: 20px; }
.menu-nick { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.menu-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.menu-stats div { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-dim); border-bottom: 1px dashed var(--line-soft); padding-bottom: 5px; }
.menu-stats b { color: var(--text); }

.menu-clubs { padding: 20px; overflow-y: auto; }
.clubs-list { display: flex; flex-direction: column; gap: 12px; }
.club-row { display: flex; gap: 12px; align-items: center; }
.club-crest { width: 38px; height: 42px; flex-shrink: 0; filter: drop-shadow(0 3px 6px rgba(0,0,0,.4)); }
.club-name { font-weight: 800; font-size: 14.5px; }
.club-style { font-size: 12px; color: var(--text-dim); }
.club-syn { font-size: 11px; color: var(--gold-dim); margin-top: 2px; }

.ai-level-btn { display: flex; flex-direction: column; gap: 3px; width: 100%; margin-top: 10px; text-align: left; }

/* ---------- Очередь ---------- */
.queue-wrap {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 30px;
}
.queue-radar { position: relative; width: 180px; height: 180px; }
.radar-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  animation: radarPulse 2.4s ease-out infinite;
}
.radar-ring.r2 { animation-delay: 0.8s; }
.radar-ring.r3 { animation-delay: 1.6s; }
@keyframes radarPulse {
  from { transform: scale(0.25); opacity: 0.9; }
  to { transform: scale(1); opacity: 0; }
}
.radar-core {
  position: absolute;
  inset: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.25), transparent 70%);
}
.queue-title { font-size: 30px; letter-spacing: 3px; }
.queue-sub { color: var(--gold-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.queue-hint { color: var(--text-faint); font-size: 12.5px; max-width: 380px; }

/* ---------- Общие шапки экранов ---------- */
.screen-top {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(6, 9, 16, 0.55);
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 40;
}
.screen-top .btn { white-space: nowrap; flex-shrink: 0; }
.screen-title { font-size: 19px; font-weight: 800; letter-spacing: 1.5px; flex: 1; }
.screen-title span { color: var(--text-dim); font-size: 13px; }

/* ---------- Конструктор состава ---------- */
.deck-layout { display: flex; flex-direction: column; height: 100%; }

/* ---------- История матчей в меню ---------- */
.menu-history { margin-top: 18px; padding: 20px; }
.history-list { display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow-y: auto; }
.history-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.history-row:hover { background: rgba(212, 175, 55, 0.12); transform: translateX(3px); }
.hr-badge {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}
.hr-badge.w { background: rgba(35, 192, 90, 0.2); color: #7be3a3; }
.hr-badge.d { background: rgba(255, 255, 255, 0.1); color: var(--text-dim); }
.hr-badge.l { background: rgba(226, 62, 72, 0.18); color: #ff9aa1; }
.hr-score { font-weight: 800; color: var(--text); flex-shrink: 0; min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }
.hr-opp { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); }
.hr-date { font-size: 10.5px; color: var(--text-faint); flex-shrink: 0; }
.history-empty { color: var(--text-faint); font-size: 12px; padding: 8px 4px; }

/* ---------- Детали матча из истории ---------- */
.hist-detail { text-align: center; min-width: 260px; }
.hd-score { font-size: 44px; font-weight: 900; letter-spacing: 4px; margin: 10px 0 4px; }
.hd-score.w { color: #7be3a3; }
.hd-score.d { color: var(--text-dim); }
.hd-score.l { color: #ff9aa1; }
.hd-badge {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hd-badge.w { background: rgba(35, 192, 90, 0.2); color: #7be3a3; }
.hd-badge.d { background: rgba(255, 255, 255, 0.1); color: var(--text-dim); }
.hd-badge.l { background: rgba(226, 62, 72, 0.18); color: #ff9aa1; }
.hd-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  text-align: left;
  font-size: 13px;
  margin-bottom: 16px;
}
.hd-grid span { color: var(--text-faint); }
.hd-grid b { color: var(--text); font-weight: 700; }

/* ---------- Таблица лидеров ---------- */
.lb-layout { display: flex; flex-direction: column; height: 100%; }
.lb-body { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 24px; overflow-y: auto; }
.lb-panel { width: 100%; max-width: 640px; }
.lb-my { text-align: center; color: var(--gold-2); font-weight: 800; font-size: 15px; margin-bottom: 12px; }
.lb-head, .lb-row {
  display: grid;
  grid-template-columns: 52px 1fr 110px 70px;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
}
.lb-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-faint);
  border-bottom: 1px solid var(--line-soft);
}
.lb-rows { display: flex; flex-direction: column; }
.lb-row { border-radius: var(--r-sm); font-size: 14px; }
.lb-row:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.lb-row.me { background: rgba(212, 175, 55, 0.1); outline: 1px solid rgba(212, 175, 55, 0.4); }
.lb-rank { text-align: center; font-weight: 800; }
.lb-nick { font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-wdl { color: var(--text-dim); text-align: center; font-size: 12.5px; }
.lb-pts { text-align: right; font-weight: 800; color: var(--gold-2); }
.lb-empty { color: var(--text-faint); font-size: 13px; padding: 18px; text-align: center; }

@media (max-width: 620px) {
  .lb-head, .lb-row { grid-template-columns: 40px 1fr 80px 56px; padding: 7px 8px; font-size: 13px; }
  .lb-wdl { font-size: 11px; }
  .history-row { font-size: 11.5px; gap: 6px; }
}
.deck-body { flex: 1; display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; padding: 20px 24px; min-height: 0; }

.deck-pitch-panel {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    repeating-linear-gradient(0deg, rgba(35, 192, 90, 0.05) 0 34px, rgba(35, 192, 90, 0.09) 34px 68px),
    radial-gradient(ellipse at 50% 0%, rgba(120, 255, 170, 0.06), transparent 60%),
    linear-gradient(180deg, #0a2415 0%, #071a0f 100%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.5), var(--shadow-md);
  padding: 18px;
  overflow-y: auto;
}
.pitch-zones { display: flex; flex-direction: column; gap: 12px; height: 100%; justify-content: space-between; }
.pitch-zone { flex: 1; }
.zone-label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(220, 255, 230, 0.55);
  margin-bottom: 8px;
}
.zone-slots { display: flex; gap: 10px; flex-wrap: wrap; }
.slot-add {
  width: 104px;
  height: 148px;
  border: 2px dashed rgba(220, 255, 230, 0.35);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: rgba(220, 255, 230, 0.5);
  cursor: pointer;
  transition: all 0.2s;
}
.slot-add:hover { border-color: var(--gold); color: var(--gold-2); background: rgba(212, 175, 55, 0.06); }

.deck-side { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; min-height: 0; }
.deck-syn { padding: 16px; flex-shrink: 0; }
.syn-active { display: flex; gap: 12px; align-items: center; }
.syn-active .syn-crest { width: 44px; height: 48px; flex-shrink: 0; }
.syn-name { font-weight: 800; color: var(--text); }
.syn-desc { font-size: 12px; color: var(--text-dim); margin-top: 3px; }
.syn-inactive .syn-name { color: var(--text-dim); }

/* доступные игроки */
.deck-available { padding: 14px 16px; flex: 1; min-height: 160px; display: flex; flex-direction: column; }
.avail-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; min-height: 60px; max-height: 300px; padding-right: 4px; }
.avail-chip .chip-add {
  color: var(--green);
  font-size: 15px;
  margin-left: 4px;
}
.avail-chip:hover .chip-add { text-shadow: 0 0 10px rgba(35,192,90,0.8); }

.deck-bench { padding: 14px 16px; flex-shrink: 0; }
.bench-count { color: var(--text-dim); font-size: 12px; }
.bench-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.bench-add { width: 88px; height: 126px; }
.bench-hint { font-size: 11.5px; color: var(--text-faint); margin-top: 10px; }
.deck-validation { padding: 14px 16px; flex-shrink: 0; }
.valid-ok { color: var(--green); font-size: 14px; font-weight: 700; }
.valid-bad { color: var(--red-soft); font-size: 13px; line-height: 1.6; }

/* окно замены */
.sub-preview { display: flex; justify-content: center; margin: 12px 0; }

/* ---------- Модальные окна / пикер ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 5, 9, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s;
}
.modal-overlay.show { opacity: 1; }
.modal-box { padding: 24px; max-width: 92vw; max-height: 88vh; overflow-y: auto; animation: screenIn 0.3s cubic-bezier(0.2,0.7,0.2,1); }
.modal-box.modal-wide { width: 860px; }
.modal-title { font-size: 22px; font-weight: 900; letter-spacing: 1px; margin-bottom: 6px; }
.modal-sub { color: var(--text-dim); font-size: 13.5px; margin-bottom: 16px; }

.picker-filters { display: flex; gap: 10px; margin-bottom: 14px; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
  max-height: 56vh;
  overflow-y: auto;
  padding: 4px;
}
.picker-empty { grid-column: 1/-1; color: var(--text-faint); text-align: center; padding: 30px; }

/* ---------- Коллекция ---------- */
.collection-layout { display: flex; flex-direction: column; height: 100%; }
.collection-filters { display: flex; gap: 14px; padding: 12px 24px; flex-wrap: wrap; }
.collection-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 14px;
  padding: 16px 24px 30px;
  overflow-y: auto;
  align-content: start;
}
.card.locked { opacity: 0.75; }
.card.locked::before { content: '🔒'; position: absolute; z-index: 3; right: 6px; top: 6px; font-size: 13px; }

.card-details { display: flex; gap: 22px; align-items: center; }
.cd-name { font-size: 22px; font-weight: 900; }
.cd-club { margin: 4px 0 12px; font-size: 13px; }
.cd-row { display: flex; justify-content: space-between; gap: 40px; font-size: 14px; color: var(--text-dim); border-bottom: 1px dashed var(--line-soft); padding: 5px 0; }
.cd-row b { color: var(--text); }
.cd-ability { margin-top: 12px; font-size: 13px; color: var(--gold-2); }

/* ---------- Магазин ---------- */
.shop-layout { display: flex; flex-direction: column; height: 100%; }
.shop-body { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 24px; overflow-y: auto; }
.packs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
  max-width: 960px;
  margin: auto 0;
}
.pack-offer { display: flex; gap: 26px; padding: 22px 28px; align-items: center; }
.pack-offer.premium { border-color: rgba(240, 208, 96, 0.45); }
.pack-offer.mega { border-color: rgba(125, 240, 255, 0.4); }

.pack-visual { position: relative; flex-shrink: 0; }
.pack-box {
  width: 148px;
  height: 200px;
  border-radius: 18px;
  border: 1px solid var(--gold-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.pack-glow {
  position: absolute;
  inset: -40%;
  background: conic-gradient(from 0deg, transparent, rgba(212,175,55,0.22), transparent 30%, transparent 60%, rgba(212,175,55,0.18), transparent);
  animation: packSpin 6s linear infinite;
}
@keyframes packSpin { to { transform: rotate(360deg); } }
.pack-icon { font-size: 40px; z-index: 1; filter: drop-shadow(0 4px 14px rgba(0,0,0,0.5)); }
.pack-label {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--gold-2);
  text-shadow: 0 0 26px rgba(212, 175, 55, 0.55);
  z-index: 1;
}
.pack-info { text-align: left; flex: 1; min-width: 0; }
.pack-name { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.pack-desc { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.pack-odds { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.odds {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.02);
}
.odds b { font-weight: 700; }
.odds-common { color: #e8b489; }
.odds-rare { color: #dfe8f2; }
.odds-epic { color: var(--gold-2); }
.odds-icon { color: #e8c8ff; }
.odds-prime { color: #7df0ff; }
.pack-guarantee { font-size: 12px; color: var(--text-faint); }
.pack-guarantee b { color: var(--gold-2); }
.pack-buy { white-space: nowrap; justify-content: center; flex-shrink: 0; }
.pack-open .pack-cards { display: flex; gap: 16px; margin: 18px 0; flex-wrap: wrap; justify-content: center; }
.pack-card-slot { position: relative; }
.pack-tag {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.pack-tag.new { background: var(--green-deep); color: #c8ffdd; }
.pack-tag.dupe { background: rgba(255,255,255,0.12); color: var(--text-dim); }
.pack-summary { text-align: center; margin: 16px 0 6px; color: var(--text-dim); font-size: 14px; min-height: 20px; }

/* ---------- Адаптив ---------- */
@media (max-width: 980px) {
  .menu-body { grid-template-columns: 1fr; }
  .deck-body { grid-template-columns: 1fr; }
  .pack-offer { flex-direction: column; gap: 18px; }
  .pack-info { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .pack-name { font-size: 20px; height: 52px; display: flex; align-items: center; justify-content: center; margin-bottom: 0; }
  .pack-desc { height: 32px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
  .pack-odds { display: grid; gap: 4px; margin: 0 auto 12px; width: fit-content; }
  .odds { display: flex; justify-content: space-between; gap: 22px; border-radius: 8px; }
  .pack-guarantee { min-height: 30px; display: flex; align-items: center; justify-content: center; }
  .pack-buy { width: 100%; }
  .card-details { flex-direction: column; }
}

/* ---------- Телефоны ---------- */
@media (max-width: 620px) {
  .menu-top { padding: 10px 12px; gap: 8px; flex-wrap: wrap; }
  .menu-logo { font-size: 18px; letter-spacing: 2px; }
  .menu-user { gap: 6px; }
  .menu-rating, .menu-coins { padding: 4px 8px; font-size: 12px; }
  .menu-rating span { display: none; } /* рейтинг без подписи на узких */
  .menu-body { padding: 14px 12px; gap: 14px; }
  .menu-actions { padding: 18px 14px; }
  .menu-big-btn { padding: 14px 16px; }
  .mb-title { font-size: 16px; }
  .menu-row { flex-direction: column; }
  .auth-logo h1 { font-size: 38px; }
  .auth-panel { width: 94vw; padding: 18px; }

  .screen-top { padding: 10px 12px; gap: 10px; flex-wrap: wrap; row-gap: 8px; }
  .screen-title { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .deck-actions { order: 3; width: 100%; display: flex; justify-content: space-between; gap: 8px; margin-left: 0; }
  .screen-title { font-size: 15px; }

  .deck-body { padding: 12px; }
  .slot-add { width: 84px; height: 120px; font-size: 26px; }
  .card.small { width: 84px; height: 120px; }
  .card.small .card-ovr { font-size: 15px; }
  /* статы не вылезают за узкую карточку */
  .card.small .card-stats { gap: 6px; padding: 4px 2px 3px; }
  .card.small .card-stat b { font-size: 10.5px; }
  .card.small .card-stat span { font-size: 6.5px; letter-spacing: 0.4px; }
  .card.small .card-name {
    font-size: 8px;
    letter-spacing: 0;
    /* длинные имена — две строки вместо обрезки */
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.12;
    overflow: hidden;
  }
  .card.small .card-ability { font-size: 7.5px; padding: 2px 4px; }
  .bench-add { width: 72px; height: 102px; }

  .collection-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; padding: 12px; }
  .pack-offer { padding: 20px 16px; gap: 18px; }
  .pack-box { width: 130px; height: 180px; }
  .packs-grid { grid-template-columns: 1fr; gap: 14px; }

  .modal-box { padding: 16px; }
  .modal-title { font-size: 17px; }
  .picker-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
}
