/* ==========================================================================
   Z-LINGO STYLES · 08-mobile.css
   Мобильный интерфейс (<= 768px), горизонтальные колоды и нижний док
   ========================================================================== */

/* ==========================================================================
   ЛАКОНИЧНЫЙ МОБИЛЬНЫЙ ИНТЕРФЕЙС Z-LINGO (<= 768px) + ПРОФИЛЬ ПИЛОТА
   Десктопный дашборд (> 768px) и динамика холста сохранены на 100%!
   ========================================================================== */

/* По умолчанию на ПК (> 768px) скрываем мобильные декорации и нижний док */
.mobile-copy,
.mobile-hero-space-art,
.mobile-hero-planet-horizon,
.mobile-how-heading,
.mobile-home-discovery,
.decks-mob-active-filter-row,
.mobile-bottom-nav,
.avatar-user-mobile,
.decks-mobile-planet-bg,
.decks-mobile-filter-bar,
.deck-mobile-card-inner,
.mob-hud-vdiv,
.mob-hud-wave-pill,
.mob-hud-right-cluster,
.mobile-battle-subbar {
  display: none !important;
}

.deck-icon-tile.art-base {
  background: radial-gradient(circle at 30% 25%, rgba(34, 197, 94, 0.4), rgba(12, 34, 24, 0.95));
  border-color: rgba(74, 222, 128, 0.45);
}

/* Всплывающее меню быстрых действий колоды (кнопка ⋮) */
.deck-action-menu {
  position: fixed;
  z-index: 95;
  min-width: 218px;
  max-width: min(280px, calc(100vw - 24px));
  padding: 6px;
  border-radius: 16px;
  background: rgba(10, 18, 36, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(56, 189, 248, 0.42);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.78), 0 0 20px rgba(14, 165, 233, 0.2);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.deck-action-menu.hidden {
  display: none !important;
}

.deck-action-item {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: start;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.deck-action-item:hover,
.deck-action-item:active {
  background: rgba(56, 189, 248, 0.15);
  color: #ffffff;
}

.deck-action-item.danger {
  color: #fda4af;
}

.deck-action-item.danger:hover,
.deck-action-item.danger:active {
  background: rgba(225, 29, 72, 0.24);
  color: #ffe4e6;
}

.promo-topbar-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.decks-heading-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.home-step-item {
  cursor: pointer;
  transition: transform 0.14s ease, color 0.14s ease;
}

.home-step-item:hover {
  color: #ffffff;
}

/* Стили обновлённого окна «Профиль и настройки» (#gameSettingsDialog) */
.settings-pilot-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16), rgba(16, 185, 129, 0.14));
  border: 1px solid rgba(56, 189, 248, 0.36);
}

.settings-pilot-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-pilot-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(52, 211, 153, 0.65);
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
  flex-shrink: 0;
}

.settings-pilot-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-pilot-rank {
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.03em;
}

.settings-pilot-sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
}

.settings-pilot-quick-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-footer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.hud-btn.admin-accent-btn {
  border-color: rgba(251, 191, 36, 0.5);
  color: #fde68a;
  background: rgba(120, 53, 15, 0.28);
}

.hud-btn.admin-accent-btn:hover {
  border-color: #fbbf24;
  color: #ffffff;
}

.stats-modal-footer-row {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

/* --- МОБИЛЬНЫЙ РЕДИЗАЙН (<= 768px) ПО МАКЕТУ --- */
@media (max-width: 768px) {
  .desktop-copy,
  .desktop-copy-block,
  .avatar-gear-desktop,
  .desktop-mission-card,
  .desktop-topics-bar {
    display: none !important;
  }

  .mobile-only-hero-stack {
    display: contents !important;
  }

  .mobile-copy {
    display: inline !important;
  }

  .arcade-title-screen {
    padding: max(10px, env(safe-area-inset-top)) 16px calc(94px + env(safe-area-inset-bottom));
  }

  .home-shell {
    min-height: auto;
    justify-content: flex-start;
    gap: 12px;
  }

  /* 1. Чистая однострочная верхняя шапка: 🚀 Z-LINGO слева | 🔥 1d + 👤 справа */
  .home-navbar {
    flex-wrap: nowrap;
    padding: 4px 0 6px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .home-nav-links,
  .home-stat-chip.trophy,
  .compact-nav-langs {
    display: none !important;
  }

  .home-brand {
    gap: 9px;
    min-width: 0;
  }

  .home-brand .brand-logo-img {
    height: 46px;
    width: auto;
  }

  .home-brand-rocket {
    font-size: 1.85rem;
  }

  .home-brand-title {
    font-size: 1.38rem;
    letter-spacing: 1.6px;
  }

  .home-brand-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    white-space: nowrap;
  }

  .home-nav-right {
    flex-wrap: nowrap;
    gap: 9px;
    flex-shrink: 0;
  }

  .home-stat-chip.streak {
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(24, 17, 13, 0.86);
    border: 1.5px solid rgba(251, 146, 60, 0.78);
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.24), inset 0 0 8px rgba(251, 146, 60, 0.1);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
  }

  .home-avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(16, 26, 46, 0.92);
    border: 1.5px solid rgba(125, 211, 252, 0.38);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.16);
    color: #e2e8f0;
    padding: 0;
    flex-shrink: 0;
  }

  .avatar-user-mobile {
    display: block !important;
    width: 21px;
    height: 21px;
  }

  /* 2. Атмосферный Hero-блок без лишних рамок */
  .home-dashboard-view {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .home-hero-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .home-hero-copy {
    position: relative;
    padding: 4px 0 2px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    gap: 10px;
    overflow: visible;
  }

  .home-hero-heading {
    position: relative;
    z-index: 3;
    gap: 2px;
  }

  .hero-line-white,
  .hero-line-gold {
    font-size: clamp(1.64rem, 7.2vw, 2.08rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
  }

  .hero-sub-and-art {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 78px;
    z-index: 2;
  }

  .home-hero-subtitle {
    max-width: 62%;
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.38;
    color: #cbd5e1;
  }

  /* Космическая иллюстрация справа (планета + неоновый истребитель + розовая капсула слова) */
  .mobile-hero-space-art {
    display: block !important;
    position: absolute;
    right: -12px;
    top: -14px;
    width: 158px;
    height: 126px;
    pointer-events: none;
    z-index: 2;
  }

  [dir="rtl"] .mobile-hero-space-art {
    right: auto;
    left: -12px;
    transform: scaleX(-1);
  }

  [dir="rtl"] .mhero-target-pill {
    transform: scaleX(-1) rotate(-9deg);
  }

  .mhero-planet-orb {
    position: absolute;
    right: -18px;
    top: -12px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, #60a5fa 0%, #2563eb 42%, #0f172a 82%);
    box-shadow: -6px 6px 26px rgba(56, 189, 248, 0.42), inset 8px -8px 18px rgba(2, 6, 23, 0.85);
    opacity: 0.92;
  }

  .mhero-target-pill {
    position: absolute;
    right: 6px;
    top: 15px;
    transform: rotate(9deg);
    padding: 4px 10px 5px;
    border-radius: 10px;
    background: rgba(24, 10, 32, 0.92);
    border: 1.5px solid #f472b6;
    box-shadow: 0 0 16px rgba(244, 114, 182, 0.55), inset 0 0 8px rgba(244, 114, 182, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.06;
    z-index: 3;
  }

  .mhero-target-art {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    font-weight: 700;
    color: #fbcfe8;
  }

  .mhero-target-word {
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }

  .mhero-fighter-svg {
    position: absolute;
    left: 2px;
    bottom: -10px;
    width: 114px;
    height: 94px;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.68));
    z-index: 2;
  }

  .home-hero-perks {
    display: none !important;
  }

  /* Горизонт синей планеты под зелёной кнопкой «Start Playing Free» */
  .mobile-hero-planet-horizon {
    display: block !important;
    position: relative;
    height: 6px;
    width: 100%;
    pointer-events: none;
    z-index: 1;
  }

  .mobile-hero-planet-horizon::before {
    content: "";
    position: absolute;
    left: -18%;
    right: 8%;
    top: -12px;
    height: 76px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    background: radial-gradient(65% 95% at 45% 0%, rgba(14, 165, 233, 0.24) 0%, rgba(30, 64, 175, 0.12) 48%, transparent 82%);
    border-top: 1.5px solid rgba(56, 189, 248, 0.36);
    box-shadow: 0 -8px 24px rgba(14, 165, 233, 0.22);
  }

  /* 3. Крупная изумрудная CTA + золотая пилюля активного курса по центру */
  .home-hero-cta-row {
    position: relative;
    z-index: 3;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 4px;
    width: 100%;
  }

  .hero-green-cta {
    width: min(100%, 332px);
    min-height: 54px;
    padding: 13px 24px;
    border-radius: 999px;
    font-size: 1.12rem;
    font-weight: 800;
    gap: 10px;
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }

  .hero-cta-arrow {
    display: none !important;
  }

  /* На мобильном главном экране скрываем жёлтую пилюлю «Auto & Road» под кнопкой Начать игру */
  .arcade-title-screen .arcade-logo-sub,
  .home-hero-cta-row .arcade-logo-sub {
    display: none !important;
  }

  .course-pill-lnum {
    display: none !important;
  }

  /* 4. Карточка LIVE LESSON PREVIEW с живым кораблём и словами */
  .home-promo-monitor {
    min-height: 212px;
    height: 212px;
    border-radius: 20px;
    border: 1.5px solid rgba(56, 189, 248, 0.72);
    background: radial-gradient(115% 65% at 50% 108%, rgba(16, 185, 129, 0.18) 0%, rgba(14, 165, 233, 0.12) 44%, rgba(4, 10, 24, 0.28) 100%);
    box-shadow: 0 0 26px rgba(14, 165, 233, 0.26), inset 0 0 22px rgba(56, 189, 248, 0.14);
  }

  .promo-monitor-topbar {
    align-items: center;
    padding: 10px 13px;
  }

  .promo-hearts {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding-top: 0;
  }

  .promo-heart-svg {
    width: 14px;
    height: 14px;
  }

  .promo-live-divider {
    color: rgba(148, 163, 184, 0.45);
    font-size: 0.86rem;
    font-weight: 400;
  }

  .promo-live-label {
    font-family: var(--font-heading);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #dbeafe;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .promo-weapon-cycle {
    width: 32px;
    height: 32px;
    border-color: rgba(56, 189, 248, 0.68);
    background: rgba(10, 19, 38, 0.9);
    color: #facc15;
    font-size: 0.96rem;
  }

  /* 5. Новые блоки на мобильной Главной: Choose your level + Choose a topic + 3-колоночная карточка How it works */
  .mobile-home-discovery {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
    margin-top: 4px;
  }

  .mob-discovery-group {
    display: flex;
    flex-direction: column;
    gap: 11px;
  }

  .mob-section-heading {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-heading);
    font-size: 1.24rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
    line-height: 1.2;
  }

  html[lang="he"] .mob-section-heading,
  [dir="rtl"] .mob-section-heading {
    font-family: 'Rubik', 'Noto Sans Hebrew', sans-serif;
    font-weight: 700;
  }

  .mob-level-bars-svg {
    width: 21px;
    height: 19px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.45));
  }

  .mob-heading-emoji {
    font-size: 1.2rem;
    line-height: 1;
    flex-shrink: 0;
  }

  /* 3 неоновые горизонтальные карточки уровней (A1–A2 / B1 / B2) */
  .mob-level-list {
    display: flex;
    flex-direction: column;
    gap: 11px;
  }

  .mob-level-card {
    width: 100%;
    padding: 13px 14px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 13px;
    text-align: start;
    font-family: var(--font-ui);
    color: #f8fafc;
    cursor: pointer;
    transition: transform 0.14s ease, filter 0.14s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-level-card:active {
    transform: scale(0.985);
    filter: brightness(1.08);
  }

  .mob-level-card.level-a1 {
    background: linear-gradient(125deg, rgba(11, 46, 44, 0.92) 0%, rgba(9, 22, 34, 0.96) 62%, rgba(8, 17, 30, 0.98) 100%);
    border: 1.5px solid rgba(52, 211, 153, 0.65);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42), 0 0 20px rgba(16, 185, 129, 0.16), inset 0 1px 0 rgba(167, 243, 208, 0.16);
  }

  .mob-level-card.level-b1 {
    background: linear-gradient(125deg, rgba(12, 34, 68, 0.92) 0%, rgba(9, 21, 42, 0.96) 62%, rgba(8, 16, 32, 0.98) 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.68);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42), 0 0 20px rgba(14, 165, 233, 0.18), inset 0 1px 0 rgba(186, 230, 253, 0.16);
  }

  .mob-level-card.level-b2 {
    background: linear-gradient(125deg, rgba(35, 20, 68, 0.92) 0%, rgba(16, 16, 40, 0.96) 62%, rgba(10, 13, 30, 0.98) 100%);
    border: 1.5px solid rgba(168, 85, 247, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42), 0 0 20px rgba(147, 51, 234, 0.2), inset 0 1px 0 rgba(233, 213, 255, 0.16);
  }

  .mob-lvl-icon-tile {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.35);
  }

  .mob-level-card.level-a1 .mob-lvl-icon-tile {
    background: radial-gradient(circle at 35% 30%, rgba(34, 197, 94, 0.32), rgba(7, 32, 29, 0.96));
    border: 1px solid rgba(52, 211, 153, 0.4);
  }

  .mob-level-card.level-b1 .mob-lvl-icon-tile {
    background: radial-gradient(circle at 35% 30%, rgba(56, 189, 248, 0.32), rgba(9, 24, 52, 0.96));
    border: 1px solid rgba(96, 165, 250, 0.42);
  }

  .mob-level-card.level-b2 .mob-lvl-icon-tile {
    background: radial-gradient(circle at 35% 30%, rgba(168, 85, 247, 0.34), rgba(26, 14, 52, 0.96));
    border: 1px solid rgba(192, 132, 252, 0.42);
  }

  .mob-lvl-emoji {
    font-size: 1.72rem;
    line-height: 1;
    filter: drop-shadow(0 0 10px rgba(74, 222, 128, 0.45));
  }

  .mob-lvl-svg {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
  }

  .mob-lvl-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mob-lvl-title {
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
  }

  .mob-lvl-sub {
    font-size: 0.82rem;
    font-weight: 500;
    color: #cbd5e1;
    line-height: 1.28;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mob-lvl-meta {
    margin-top: 3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #94a3b8;
  }

  .mob-lvl-book-svg {
    width: 13px;
    height: 13px;
    color: #cbd5e1;
    opacity: 0.85;
    flex-shrink: 0;
  }

  .mob-lvl-chevron {
    width: 18px;
    height: 18px;
    color: #cbd5e1;
    flex-shrink: 0;
    opacity: 0.9;
  }

  [dir="rtl"] .mob-lvl-chevron {
    transform: scaleX(-1);
  }

  /* Сетка 2×3 карточек тем («Choose a topic») */
  .mob-topic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .mob-topic-card {
    padding: 11px 11px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 9px;
    text-align: start;
    font-family: var(--font-ui);
    color: #f8fafc;
    cursor: pointer;
    min-width: 0;
    transition: transform 0.14s ease, filter 0.14s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-topic-card:active {
    transform: scale(0.975);
    filter: brightness(1.1);
  }

  .mob-topic-card.topic-finance {
    background: linear-gradient(135deg, rgba(12, 42, 38, 0.92) 0%, rgba(9, 19, 32, 0.96) 100%);
    border: 1.2px solid rgba(52, 211, 153, 0.58);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(16, 185, 129, 0.08);
  }

  .mob-topic-card.topic-auto {
    background: linear-gradient(135deg, rgba(12, 31, 56, 0.92) 0%, rgba(9, 18, 34, 0.96) 100%);
    border: 1.2px solid rgba(56, 189, 248, 0.58);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(56, 189, 248, 0.08);
  }

  .mob-topic-card.topic-food {
    background: linear-gradient(135deg, rgba(32, 20, 60, 0.92) 0%, rgba(12, 15, 34, 0.96) 100%);
    border: 1.2px solid rgba(168, 85, 247, 0.62);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(168, 85, 247, 0.1);
  }

  .mob-topic-card.topic-business {
    background: linear-gradient(135deg, rgba(46, 33, 14, 0.92) 0%, rgba(16, 17, 30, 0.96) 100%);
    border: 1.2px solid rgba(245, 158, 11, 0.65);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(245, 158, 11, 0.1);
  }

  .mob-topic-card.topic-travel {
    background: linear-gradient(135deg, rgba(13, 33, 62, 0.92) 0%, rgba(9, 18, 35, 0.96) 100%);
    border: 1.2px solid rgba(96, 165, 250, 0.6);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(59, 130, 246, 0.09);
  }

  .mob-topic-card.topic-daily {
    background: linear-gradient(135deg, rgba(11, 42, 36, 0.92) 0%, rgba(9, 19, 32, 0.96) 100%);
    border: 1.2px solid rgba(45, 212, 191, 0.58);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(20, 184, 166, 0.09);
  }

  .mob-topic-icon {
    font-size: 1.55rem;
    line-height: 1;
    flex-shrink: 0;
    width: 30px;
    text-align: center;
  }

  .mob-topic-sep {
    width: 1px;
    align-self: stretch;
    background: rgba(148, 163, 184, 0.22);
    flex-shrink: 0;
  }

  .mob-topic-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
  }

  .mob-topic-title {
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.18;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html[lang="he"] .mob-topic-title,
  [dir="rtl"] .mob-topic-title {
    font-family: 'Rubik', 'Noto Sans Hebrew', sans-serif;
    font-weight: 700;
  }

  .mob-topic-sub {
    font-size: 0.72rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.22;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* 3-колоночная карточка «⚡ Как это работает» как на макете */
  .home-how-section {
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-how-heading {
    display: flex !important;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.24rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
  }

  .how-bolt-icon {
    font-size: 1.18rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.45));
  }

  html[lang="he"] .mobile-how-heading,
  [dir="rtl"] .mobile-how-heading {
    font-family: 'Rubik', 'Noto Sans Hebrew', sans-serif;
    font-weight: 700;
  }

  .home-steps-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 6px;
    padding: 15px 10px 14px;
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(10, 19, 38, 0.92) 0%, rgba(7, 13, 27, 0.96) 100%);
    border: 1px solid rgba(56, 189, 248, 0.28);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.44);
    position: relative;
  }

  .step-chevron {
    display: none !important;
  }

  .home-step-item {
    position: relative;
    display: grid;
    grid-template-columns: auto auto;
    justify-content: center;
    align-items: center;
    column-gap: 6px;
    row-gap: 8px;
    width: 100%;
    padding: 2px 3px;
    border-bottom: none;
    text-align: center;
    font-size: 0.76rem;
    line-height: 1.28;
    font-weight: 500;
    color: #cbd5e1;
  }

  .home-step-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 13px;
    right: -14%;
    width: 22%;
    height: 1px;
    background: rgba(148, 163, 184, 0.28);
    pointer-events: none;
  }

  [dir="rtl"] .home-step-item:not(:last-child)::after {
    right: auto;
    left: -14%;
  }

  .home-step-item .step-text.mobile-copy {
    grid-column: 1 / -1;
    display: block !important;
    text-align: center;
  }

  .home-step-item:active {
    background: rgba(56, 189, 248, 0.08);
    border-radius: 10px;
  }

  .step-num {
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.22);
  }

  .step-icon {
    width: auto;
    text-align: center;
    font-size: 1.12rem;
    flex-shrink: 0;
  }

  /* Чип активного фильтра уровня / темы на странице «Мои колоды» */
  .decks-mob-active-filter-row:not(.hidden) {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-top: -2px;
  }

  .mob-active-subfilter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.65);
    background: rgba(14, 32, 62, 0.92);
    color: #e0f2fe;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
  }

  .mob-subfilter-x {
    color: #7dd3fc;
    font-size: 0.78rem;
  }

  .deck-mob-icon-tile.art-food {
    background: radial-gradient(circle at 32% 26%, rgba(168, 85, 247, 0.48), rgba(32, 16, 56, 0.96));
    border-color: rgba(192, 132, 252, 0.48);
  }

  .deck-mob-icon-tile.art-travel {
    background: radial-gradient(circle at 32% 26%, rgba(56, 189, 248, 0.48), rgba(14, 34, 66, 0.96));
    border-color: rgba(96, 165, 250, 0.48);
  }

  /* Скрываем тяжёлые десктопные сетки на мобильном главном экране */
  .home-bento-grid,
  .home-bottom-features {
    display: none !important;
  }

  /* 6. Страница «Мои колоды» на мобильных экранах по макету (чистый космический список карточек) */
  .decks-right-sidebar,
  .decks-desktop-tabs-bar,
  .decks-cat-chips-row,
  .decks-desktop-planet-fx,
  .decks-heading-layers-svg,
  .decks-hero-right,
  #decksContinueSection,
  #decksOverviewPane > .decks-section-block > .decks-section-heading,
  #btnDecksOpenAdmin {
    display: none !important;
  }

  .decks-page-view {
    gap: 12px;
  }

  .decks-page-layout {
    display: block;
  }

  .decks-page-view.detail-open .decks-hero-banner,
  .decks-page-view.detail-open .decks-mobile-filter-bar,
  .decks-page-view.detail-open .decks-mob-active-filter-row {
    display: none !important;
  }

  .decks-main-column {
    gap: 12px;
  }

  .decks-hero-banner {
    position: relative;
    overflow: visible;
    padding: 2px 0 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    display: block;
  }

  .decks-mobile-planet-bg {
    display: block !important;
    position: absolute;
    right: -28px;
    top: -8px;
    width: 158px;
    height: 98px;
    border-radius: 50%;
    background: radial-gradient(circle at 38% 28%, rgba(56, 189, 248, 0.82) 0%, rgba(37, 99, 235, 0.48) 44%, rgba(14, 165, 233, 0.08) 74%, transparent 100%);
    box-shadow: -8px 4px 28px rgba(56, 189, 248, 0.34);
    pointer-events: none;
    z-index: 0;
    opacity: 0.92;
  }

  [dir="rtl"] .decks-mobile-planet-bg {
    right: auto;
    left: -28px;
    transform: scaleX(-1);
  }

  .decks-hero-left {
    position: relative;
    z-index: 2;
    gap: 13px;
  }

  .decks-hero-title-row {
    gap: 12px;
    align-items: center;
  }

  .decks-folder-svg-mobile {
    display: inline-flex !important;
    width: 46px;
    height: 42px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(250, 204, 21, 0.36));
  }

  .decks-folder-svg-mobile svg {
    width: 100%;
    height: 100%;
  }

  .decks-hero-title {
    font-size: 1.72rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.01em;
  }

  .decks-hero-subtitle {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 2px;
  }

  /* 2 кнопки 50/50 сверху + пилюля поиска во всю ширину снизу */
  .decks-hero-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
  }

  #btnDecksCreateDeck {
    order: 1;
    justify-content: center;
    min-height: 46px;
    padding: 10px 10px;
    border-radius: 999px;
    border: 1.5px solid rgba(167, 243, 208, 0.9);
    background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
    color: #022c22;
    font-size: 0.9rem;
    font-weight: 800;
    gap: 6px;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  }

  #btnDecksCreateDeck .create-plus-glyph {
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
  }

  #btnDecksImportAnki {
    order: 2;
    justify-content: center;
    min-height: 46px;
    padding: 10px 10px;
    border-radius: 999px;
    border: 1.5px solid rgba(56, 189, 248, 0.68);
    background: rgba(12, 22, 44, 0.9);
    color: #f8fafc;
    font-size: 0.86rem;
    font-weight: 700;
    gap: 7px;
    box-shadow: 0 0 18px rgba(14, 165, 233, 0.2), inset 0 0 10px rgba(56, 189, 248, 0.08);
  }

  .anki-dl-svg-mobile {
    display: inline-block !important;
    width: 18px;
    height: 18px;
    color: #38bdf8;
    flex-shrink: 0;
  }

  .decks-search-box {
    order: 3;
    grid-column: 1 / -1;
    min-width: 0;
    min-height: 44px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(10, 18, 36, 0.88);
    border: 1px solid rgba(100, 134, 185, 0.3);
    gap: 10px;
  }

  .decks-search-svg {
    display: inline-block !important;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    flex-shrink: 0;
  }

  .decks-search-box input {
    font-size: 0.92rem;
  }

  .decks-search-box input::placeholder {
    color: #8496b0;
  }

  /* Горизонтальная полоса 4 чипов фильтра: Все (N) · Курсы (N) · Мои (N) · Избранные */
  .decks-mobile-filter-bar {
    display: flex !important;
    align-items: center;
    gap: 7px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 1px 1px 2px;
    margin-top: -1px;
  }

  .decks-mobile-filter-bar::-webkit-scrollbar {
    display: none;
  }

  .mob-deck-filter-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1.5px solid rgba(100, 134, 185, 0.28);
    background: rgba(11, 19, 38, 0.88);
    color: #cbd5e1;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-chip-svg {
    width: 15px;
    height: 15px;
    color: #94a3b8;
    flex-shrink: 0;
  }

  .mob-deck-filter-chip.active {
    border-color: #34d399;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.28) 0%, rgba(6, 78, 59, 0.5) 100%);
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.28), inset 0 1px 0 rgba(167, 243, 208, 0.22);
    color: #ffffff;
    font-weight: 700;
  }

  .mob-deck-filter-chip.active .mob-chip-svg {
    color: #34d399;
  }

  /* Вертикальный список компактных карточек колод */
  .decks-overview-pane {
    gap: 11px;
  }

  .decks-all-grid,
  .decks-all-grid.list-mode {
    display: flex;
    flex-direction: column;
    gap: 11px;
  }

  .deck-desktop-card-inner {
    display: none !important;
  }

  .deck-mobile-card-inner {
    display: flex !important;
    align-items: center;
    gap: 13px;
    width: 100%;
    min-width: 0;
  }

  .deck-full-card,
  .decks-all-grid.list-mode .deck-full-card {
    padding: 13px 14px;
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(12, 21, 43, 0.94) 0%, rgba(8, 15, 31, 0.96) 100%);
    border: 1px solid rgba(100, 136, 190, 0.24);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.48);
    gap: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .deck-full-card:hover {
    transform: none;
  }

  .deck-full-card.is-active {
    border: 1.5px solid rgba(56, 189, 248, 0.9);
    background: linear-gradient(160deg, rgba(14, 30, 58, 0.96) 0%, rgba(9, 19, 39, 0.97) 100%);
    box-shadow: 0 0 22px rgba(14, 165, 233, 0.3), inset 0 0 18px rgba(56, 189, 248, 0.08);
  }

  .deck-mob-icon-tile {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.82rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 6px 14px rgba(0, 0, 0, 0.35);
  }

  .deck-mob-icon-tile .deck-tile-svg.deck-unique-art-svg {
    width: 100%;
    height: 100%;
    display: block;
  }

  .deck-mob-icon-tile.art-auto {
    background: radial-gradient(circle at 32% 26%, rgba(225, 29, 72, 0.44), rgba(45, 15, 44, 0.96));
    border-color: rgba(244, 63, 94, 0.45);
  }

  .deck-mob-icon-tile.art-business {
    background: radial-gradient(circle at 32% 26%, rgba(217, 119, 6, 0.48), rgba(45, 31, 18, 0.96));
    border-color: rgba(245, 158, 11, 0.46);
  }

  .deck-mob-icon-tile.art-base,
  .deck-mob-icon-tile.art-chat,
  .deck-mob-icon-tile.art-it {
    background: radial-gradient(circle at 32% 26%, rgba(34, 197, 94, 0.48), rgba(13, 46, 30, 0.96));
    border-color: rgba(74, 222, 128, 0.46);
  }

  .deck-mob-icon-tile.art-anki {
    background: radial-gradient(circle at 32% 26%, rgba(59, 130, 246, 0.52), rgba(18, 36, 76, 0.96));
    border-color: rgba(96, 165, 250, 0.5);
  }

  .deck-anki-cards-svg {
    width: 34px;
    height: 34px;
    filter: drop-shadow(0 3px 6px rgba(2, 6, 23, 0.45));
  }

  .deck-mob-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .deck-mob-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
  }

  .deck-mob-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.02rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.22;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html[lang="he"] .deck-mob-title,
  [dir="rtl"] .deck-mob-title {
    font-family: 'Rubik', 'Noto Sans Hebrew', sans-serif;
    font-weight: 700;
  }

  .deck-mob-dots-btn {
    width: 28px;
    height: 26px;
    margin: -3px -6px 0 0;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
  }

  .deck-mob-dots-btn:active {
    background: rgba(56, 189, 248, 0.16);
    color: #ffffff;
  }

  .deck-mob-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .deck-mob-meta-svg {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    flex-shrink: 0;
  }

  .deck-mob-fav-star {
    color: #fbbf24;
    font-size: 0.78rem;
    flex-shrink: 0;
  }

  .deck-mob-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 11px;
    margin-top: 4px;
  }

  .deck-mob-prog-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
  }

  .deck-mob-prog-track {
    flex: 1 1 auto;
    height: 7px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.95);
    overflow: hidden;
  }

  .deck-mob-prog-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #34d399 0%, #22c55e 100%);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.62);
    transition: width 0.3s ease;
  }

  .deck-mob-prog-pct {
    font-size: 0.86rem;
    font-weight: 800;
    color: #f8fafc;
    min-width: 32px;
    text-align: end;
  }

  .deck-mob-cta {
    flex-shrink: 0;
    min-width: 112px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-ui);
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.14s ease, transform 0.14s ease;
  }

  .deck-mob-cta:active {
    transform: scale(0.97);
  }

  .deck-mob-cta.continue {
    background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
    border: 1px solid rgba(167, 243, 208, 0.88);
    color: #022c22;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.38);
  }

  .deck-mob-cta.start {
    background: rgba(16, 27, 50, 0.92);
    border: 1.5px solid rgba(100, 146, 214, 0.44);
    color: #f8fafc;
    font-weight: 700;
  }

  .deck-mob-play-tri {
    font-size: 0.72rem;
    line-height: 1;
  }

  .deck-detail-pane {
    padding: 15px;
    border-radius: 18px;
  }

  /* 7. Фиксированная нижняя навигация на 5 вкладок (Главная · Играть · Колоды · Статистика · О проекте) */
  body.mode-title .mobile-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    align-items: stretch;
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 45;
    padding: 5px 4px;
    border-radius: 22px;
    background: rgba(8, 14, 28, 0.94);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(56, 189, 248, 0.24);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.72), 0 0 22px rgba(14, 165, 233, 0.12);
  }

  body.mode-play .mobile-bottom-nav {
    display: none !important;
  }

  .mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px 2px;
    border-radius: 15px;
    border: 1.5px solid transparent;
    background: transparent;
    color: #cbd5e1;
    font-family: var(--font-ui);
    cursor: pointer;
    transition: all 0.16s ease;
    -webkit-tap-highlight-color: transparent;
    min-width: 0;
  }

  .mob-nav-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 23px;
  }

  .mob-nav-svg {
    width: 22px;
    height: 22px;
    transition: transform 0.16s ease, color 0.16s ease;
  }

  .mob-nav-label {
    font-size: 0.63rem;
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .mob-nav-item.active {
    border-color: rgba(52, 211, 153, 0.82);
    background: radial-gradient(95% 95% at 50% 15%, rgba(16, 185, 129, 0.28) 0%, rgba(6, 78, 59, 0.44) 100%);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.28), inset 0 1px 0 rgba(167, 243, 208, 0.25);
    color: #ffffff;
  }

  .mob-nav-item.active .mob-nav-svg {
    color: #34d399;
    filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.6));
  }

  .mob-nav-item.active .mob-nav-label {
    font-weight: 700;
    color: #ffffff;
  }

  /* 8. Компактная боевая шапка и арена на мобильных устройствах (body.mode-play) по макету */
  body.mode-play .hud-center-selectors,
  body.mode-play .hud-right-metrics,
  body.mode-play .arena-top-hud,
  body.mode-play #desktopTypingPromptBar {
    display: none !important;
  }

  body.mode-play .hud-top {
    top: max(6px, env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    height: 48px;
    padding: 4px 8px 4px 10px;
    border-radius: 999px;
    background: rgba(7, 15, 32, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(56, 189, 248, 0.52);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 18px rgba(14, 165, 233, 0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: nowrap;
  }

  body.mode-play .hud-left-academy {
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  body.mode-play .hud-logo-img {
    height: 35px;
    width: auto;
    max-width: 58px;
  }

  body.mode-play .mob-hud-vdiv {
    display: block !important;
    width: 1px;
    height: 22px;
    background: rgba(125, 211, 252, 0.25);
    flex-shrink: 0;
  }

  body.mode-play .mob-hud-wave-pill {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 186px;
    height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    background: rgba(8, 22, 46, 0.94);
    border: 1.3px solid rgba(56, 189, 248, 0.68);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.22), inset 0 0 8px rgba(56, 189, 248, 0.1);
    color: #f0f9ff;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  body.mode-play .mob-hud-wave-pill:active {
    transform: scale(0.97);
    border-color: #67e8f9;
  }

  #mobHudWaveText {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html[lang="he"] body.mode-play .mob-hud-wave-pill,
  [dir="rtl"] body.mode-play .mob-hud-wave-pill {
    font-family: 'Rubik', 'Noto Sans Hebrew', sans-serif;
    font-weight: 700;
    letter-spacing: 0;
  }

  body.mode-play .mob-hud-right-cluster {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
  }

  .mob-hud-prog-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(10, 22, 44, 0.94);
    border: 1.2px solid rgba(56, 189, 248, 0.48);
    color: #f8fafc;
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .mob-crosshair-svg {
    width: 14px;
    height: 14px;
    color: #38bdf8;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.55));
  }

  .mob-hud-circle-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.2px solid rgba(56, 189, 248, 0.48);
    background: rgba(10, 22, 44, 0.94);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.12s ease, border-color 0.12s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-hud-circle-btn:active {
    transform: scale(0.92);
    border-color: #67e8f9;
    color: #ffffff;
  }

  /* Вторая строка статуса над ареной: [ЖИЗНИ: ❤️❤️❤️🖤] слева · [⚡ EMP 2] справа */
  body.mode-play .mobile-battle-subbar {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    position: fixed;
    top: calc(max(6px, env(safe-area-inset-top)) + 54px);
    left: 8px;
    right: 8px;
    height: 34px;
    z-index: 15;
    pointer-events: none;
  }

  .mob-lives-pill {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 33px;
    padding: 0 13px;
    border-radius: 999px;
    background: rgba(7, 16, 34, 0.93);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.2px solid rgba(56, 189, 248, 0.4);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.42);
  }

  .mob-lives-label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  html[lang="he"] .mob-lives-label,
  [dir="rtl"] .mob-lives-label {
    font-family: 'Rubik', 'Noto Sans Hebrew', sans-serif;
    font-weight: 700;
    letter-spacing: 0;
  }

  .mob-lives-hearts {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.96rem;
    line-height: 1;
  }

  .mob-heart.full {
    color: #ff4d6d;
    text-shadow: 0 0 8px rgba(255, 77, 109, 0.72);
  }

  .mob-heart.empty {
    color: #152036;
    -webkit-text-stroke: 1px rgba(148, 163, 184, 0.38);
  }

  .mob-emp-pill {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 33px;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(28, 25, 14, 0.94) 0%, rgba(14, 16, 26, 0.96) 100%);
    border: 1.5px solid rgba(250, 204, 21, 0.85);
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.24), inset 0 0 8px rgba(250, 204, 21, 0.1);
    color: #fde047;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-emp-pill:active:not(:disabled) {
    transform: scale(0.95);
    filter: brightness(1.12);
  }

  .mob-emp-pill:disabled {
    opacity: 0.4;
    box-shadow: none;
    cursor: not-allowed;
  }

  .mob-emp-bolt-svg {
    width: 14px;
    height: 14px;
    color: #facc15;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(250, 204, 21, 0.6));
  }

  /* Рамка боевой арены ровно между второй строкой и капсулой подсказки */
  body.mode-play .battle-arena-frame {
    top: calc(max(6px, env(safe-area-inset-top)) + 92px);
    left: 8px;
    right: 8px;
    bottom: calc(208px + env(safe-area-inset-bottom, 0px));
    padding: 8px;
    border-radius: 20px;
    border: 1.5px solid rgba(56, 189, 248, 0.46);
    box-shadow: inset 0 0 38px rgba(14, 165, 233, 0.12), 0 0 18px rgba(14, 165, 233, 0.08);
  }

  /* Нижний блок: капсула прицела «/// 🎯 Печатайте слово, чтобы стрелять ///» + клавиатура */
  body.mode-play .ztype-keyboard-dock {
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(4, 10, 22, 0) 0%, rgba(4, 10, 22, 0.94) 18%, rgba(3, 8, 18, 0.99) 100%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0 6px calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }

  body.mode-play .ztype-kbd-topline {
    display: none;
  }

  body.mode-play .ztype-target-strip {
    position: relative;
    height: 36px;
    margin: 0 2px;
    padding: 0 36px;
    border-radius: 999px;
    background: rgba(7, 18, 36, 0.94);
    border: 1.3px solid rgba(56, 189, 248, 0.56);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5), inset 0 0 14px rgba(56, 189, 248, 0.1);
    font-size: 0.84rem;
    font-weight: 700;
    color: #f1f5f9;
    justify-content: center;
    gap: 6px;
  }

  body.mode-play .ztype-target-strip::before,
  body.mode-play .ztype-target-strip::after {
    content: "///";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #22d3ee;
    opacity: 0.85;
    pointer-events: none;
  }

  body.mode-play .ztype-target-strip::before {
    left: 12px;
  }

  body.mode-play .ztype-target-strip::after {
    right: 12px;
  }

  .mob-prompt-idle-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mob-prompt-crosshair {
    width: 16px;
    height: 16px;
    color: #38bdf8;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.55));
  }

  body.mode-play .ztype-keys-container {
    padding: 0 2px;
    gap: 6px;
  }

  body.mode-play .ztype-keys-container.compact-kbd .ztype-key-row {
    gap: 2.5px;
  }

  body.mode-play .ztype-keys-container.compact-kbd .zkey {
    font-size: 1.05rem;
    height: 43px;
    border-radius: 9px;
  }

  body.mode-play .ztype-keys-container.compact-kbd .zkey .uml-sub {
    font-size: 0.62rem;
    top: 1px;
    right: 2px;
  }

  body.mode-play .ztype-key-row {
    gap: 5px;
  }

  body.mode-play .ztype-key-row.row-middle,
  body.mode-play .ztype-key-row.row-bottom {
    padding: 0;
  }

  body.mode-play .zkey {
    height: 46px;
    border-radius: 11px;
    background: linear-gradient(180deg, rgba(12, 25, 48, 0.95) 0%, rgba(7, 15, 30, 0.98) 100%);
    border: 1.2px solid rgba(56, 189, 248, 0.42);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45), inset 0 0 10px rgba(56, 189, 248, 0.08);
    color: #ffffff;
    font-size: 1.26rem;
    font-weight: 800;
  }

  body.mode-play .zkey .uml-sub {
    color: #facc15;
    font-size: 0.72rem;
    top: 2px;
    right: 4px;
  }

  body.mode-play .zkey-emp {
    border-color: rgba(250, 204, 21, 0.82);
    background: linear-gradient(180deg, rgba(44, 35, 12, 0.94) 0%, rgba(20, 18, 12, 0.98) 100%);
    box-shadow: 0 0 12px rgba(250, 204, 21, 0.22);
    color: #facc15;
  }

  .overlay-card.mode-complete {
    padding: 14px 12px;
    border-radius: 18px;
    gap: 11px;
  }

  .overlay-card.mode-complete .overlay-kpi-grid {
    gap: 6px;
  }

  .overlay-card.mode-complete .ov-kpi-val {
    font-size: 1.24rem;
  }

  .overlay-card.mode-complete .ov-kpi-lbl {
    font-size: 0.66rem;
  }

  .overlay-card.mode-complete .quiz-header {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .overlay-card.mode-complete .quiz-score-pill {
    white-space: nowrap;
  }

  .overlay-card.mode-complete .quiz-options {
    grid-template-columns: 1fr;
  }

  .overlay-card.mode-complete .ov-review-actions {
    grid-template-columns: 1fr;
  }
}

/* Защита для сверхузких телефонов (320px–370px): ни один элемент шапки не вылезает */
@media (max-width: 375px) {
  body.mode-play .mob-hud-vdiv {
    display: none !important;
  }

  body.mode-play .hud-top {
    gap: 4px;
    padding: 4px 6px 4px 8px;
  }

  body.mode-play .hud-logo-img {
    height: 31px;
  }

  body.mode-play .mob-hud-wave-pill {
    padding: 0 8px;
    font-size: 0.66rem;
  }

  .mob-hud-prog-pill {
    padding: 0 7px;
    font-size: 0.75rem;
  }

  .mob-hud-circle-btn {
    width: 29px;
    height: 29px;
  }
}

/* Компактная подстройка высоты арены на невысоких мобильных экранах (<= 680px по высоте) */
@media (max-width: 768px) and (max-height: 680px) {
  body.mode-play .zkey {
    height: 40px;
    font-size: 1.18rem;
  }

  body.mode-play .battle-arena-frame {
    bottom: calc(188px + env(safe-area-inset-bottom, 0px));
  }
}
