:root {
  --blue: #2f80ed;
  --blue-dark: #1b4f9b;
  --blue-light: #eaf3ff;
  --orange: #ff8a3d;
  --orange-light: #fff0e6;
  --bg: var(--tg-theme-bg-color, #f5f7fb);
  --text: var(--tg-theme-text-color, #1b2b4b);
  --hint: var(--tg-theme-hint-color, #7a869a);
  --card: var(--tg-theme-secondary-bg-color, #ffffff);
  --shadow: 0 8px 24px rgba(27, 43, 75, 0.08);
  --shadow-pressable: 0 2px 0 rgba(27, 43, 75, 0.08), 0 6px 16px rgba(27, 43, 75, 0.1);
  --shadow-pressable-active: 0 1px 0 rgba(27, 43, 75, 0.06), 0 2px 6px rgba(27, 43, 75, 0.07);
  --shadow-pressable-blue: 0 2px 0 rgba(47, 128, 237, 0.16), 0 6px 16px rgba(47, 128, 237, 0.14);
  --shadow-pressable-orange: 0 2px 0 rgba(255, 138, 61, 0.15), 0 6px 14px rgba(255, 138, 61, 0.12);
  --mascot-size: clamp(72px, 22vw, 96px);
  --play-hint-size: clamp(84px, 25vw, 108px);
  --pressable-transition: transform 0.12s ease, box-shadow 0.12s ease;
  --radius: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

button {
  font: inherit;
}

.app-shell {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: 88px;
  position: relative;
  overflow-x: hidden;
}

.app-shell::before,
.app-shell::after {
  content: '';
  position: fixed;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}

.app-shell::before {
  background: var(--blue);
  bottom: 80px;
  left: -40px;
}

.app-shell::after {
  background: var(--orange);
  bottom: 40px;
  right: -30px;
}

.topbar,
.app,
.bottom-nav {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px 16px 4px;
}

.topbar--brand {
  min-height: 56px;
}

.help-hint-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-pressable-blue);
  transition: var(--pressable-transition);
}

.help-hint-btn:active {
  transform: translateY(calc(-50% + 2px));
  box-shadow: var(--shadow-pressable-active);
}

.plan-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 8px 14px;
  border: none;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: var(--shadow-pressable);
  transition: var(--pressable-transition);
}

.plan-badge:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-pressable-active);
}

.plan-badge--base {
  background: var(--blue-light);
  color: var(--blue-dark);
  box-shadow: var(--shadow-pressable-blue);
}

.plan-badge--vip {
  background: var(--orange-light);
  color: #c2410c;
  box-shadow: var(--shadow-pressable-orange);
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.icon-btn--help {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--blue-dark);
  background: var(--blue-light);
  box-shadow: inset 0 0 0 1px rgba(47, 128, 237, 0.15);
}

.icon-btn--help:active {
  transform: scale(0.96);
}

.logo {
  font-weight: 900;
  color: var(--blue-dark);
}

.logo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  letter-spacing: -0.02em;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.logo-btn--hero {
  padding-top: 2px;
}

.logo__brand {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.05;
  color: var(--blue-dark);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95),
    0 3px 10px rgba(47, 128, 237, 0.28);
}

.logo-btn:hover {
  filter: brightness(1.06);
}

.logo-btn:active {
  transform: scale(0.97);
}

.logo__accent {
  color: var(--orange);
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95),
    0 3px 10px rgba(255, 138, 61, 0.35);
}

.logo__tag {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--hint);
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-shadow: none;
}

.logo__hint {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--hint);
  letter-spacing: 0.03em;
  text-shadow: none;
}

.plan-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 0 1px rgba(27, 43, 75, 0.08);
}

.subscription-action--modal {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px 16px;
  font-size: 0.95rem;
}

.subscription-promo--modal {
  display: block;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  text-align: center;
}

.plan-account-summary {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

.plan-account-summary.hidden {
  display: none;
}

.plan-toggle-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px 16px;
  border: none;
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--pressable-transition);
  -webkit-tap-highlight-color: transparent;
}

.plan-toggle-btn:active {
  transform: translateY(2px);
}

.plan-toggle-btn--vip {
  background: linear-gradient(135deg, var(--orange) 0%, #ea580c 100%);
  color: #fff;
  box-shadow: var(--shadow-pressable-orange);
}

.plan-toggle-btn--vip:active {
  box-shadow: 0 1px 0 rgba(255, 138, 61, 0.12), 0 2px 6px rgba(255, 138, 61, 0.1);
}

.plan-toggle-btn--base {
  background: var(--blue-light);
  color: var(--blue-dark);
  box-shadow: var(--shadow-pressable-blue);
}

.plan-toggle-btn--base:active {
  box-shadow: 0 1px 0 rgba(47, 128, 237, 0.12), 0 2px 6px rgba(47, 128, 237, 0.1);
}

.plan-toggle-btn.hidden {
  display: none;
}

.subscription-action {
  padding: 7px 10px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange) 0%, #ea580c 100%);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 138, 61, 0.28);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.subscription-action:active {
  transform: scale(0.97);
}

.subscription-action:disabled {
  opacity: 0.65;
  cursor: wait;
}

.subscription-action.hidden {
  display: none;
}

.subscription-promo {
  padding: 7px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7 0%, #ffedd5 100%);
  color: #b45309;
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.subscription-promo.hidden {
  display: none;
}

.plan-toggle__btn {
  padding: 8px 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--hint);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.plan-toggle__btn--basic.plan-toggle__btn--active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(47, 128, 237, 0.28);
}

.plan-toggle__btn--full.plan-toggle__btn--active {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 138, 61, 0.32);
}

.app {
  padding: 0 16px 16px;
}

.screen.hidden {
  display: none;
}

.hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  box-shadow: var(--shadow);
}

.hero--home {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2.5vw, 14px);
  margin-bottom: 8px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  min-height: 0;
}

.hero--home .hero__art {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(96px, 32vw, 148px);
}

.hero--home .hero__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  text-align: left;
}

.hero__title--home {
  margin: 0;
  font-size: clamp(2.05rem, 8.8vw, 3rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--blue-dark);
  text-wrap: balance;
}

.hero__lead {
  margin: 0;
  font-size: clamp(1.2rem, 4.8vw, 1.52rem);
  line-height: 1.32;
  font-weight: 800;
  color: var(--text);
  text-wrap: pretty;
}

.hero--home .hero__picture {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.home-pick-btn {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 16px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--orange) 0%, #ea580c 100%);
  color: #fff;
  font-size: clamp(1.18rem, 4.6vw, 1.48rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-pressable-orange);
  transition: var(--pressable-transition);
  -webkit-tap-highlight-color: transparent;
}

.home-pick-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(234, 88, 12, 0.2), 0 2px 8px rgba(255, 138, 61, 0.24);
}

.hero--banner {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 12px;
  padding: 0;
  background: #fff;
  box-shadow: var(--shadow-pressable);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-height: 96px;
}

.hero--banner .hero__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-width: 0;
  padding: 14px 12px;
}

.hero--banner .hero__title {
  margin: 0 0 6px;
  font-size: clamp(0.9rem, 3.2vw, 1.4rem);
  line-height: 1.35;
  font-weight: 800;
  color: var(--blue-dark);
  text-align: left;
}

.hero--banner .hero__help-text {
  display: block;
  margin: 0;
  font-size: calc(0.95rem + 2px);
  font-weight: 800;
  color: #ff8a3d;
  line-height: 1.35;
  white-space: nowrap;
}

.hero--banner .hero__help-arrow {
  font-size: 1rem;
  font-weight: 900;
  color: #ff8a3d;
  line-height: 1;
}

.hero__art-btn {
  flex: 0 0 38%;
  max-width: 148px;
  min-width: 88px;
  align-self: stretch;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: inset 4px 0 12px rgba(27, 43, 75, 0.04);
  transition: var(--pressable-transition);
}

.hero__art-btn:active {
  transform: translateY(1px);
  box-shadow: inset 4px 0 8px rgba(27, 43, 75, 0.06);
}

.hero__art-btn .hero__picture {
  pointer-events: none;
}

.hero__picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.home-above-fold {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.home-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 6px;
}

.home-scroll-hint.hidden {
  display: none;
}

.home-scroll-hint__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--blue-dark);
  text-align: center;
}

.home-scroll-hint__cue {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--hint);
  animation: home-scroll-bounce 1.6s ease-in-out infinite;
}

@keyframes home-scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(5px); opacity: 1; }
}

.hero__text h1 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--blue-dark);
}

.hero__text p {
  margin: 0;
  color: var(--hint);
  font-size: 0.9rem;
}

.hero__dice {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.dice {
  position: absolute;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.4rem;
  box-shadow: var(--shadow);
}

.dice--white {
  top: 0;
  right: 0;
  background: #fff;
  transform: rotate(12deg);
}

.dice--orange {
  bottom: 0;
  left: 0;
  background: var(--orange);
  color: #fff;
  transform: rotate(-10deg);
}

.menu-cards {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.menu-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.menu-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-pressable);
  text-align: left;
  cursor: pointer;
  transition: var(--pressable-transition);
  -webkit-tap-highlight-color: transparent;
}

.menu-card--primary {
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--blue-light);
  box-shadow: var(--shadow-pressable-blue);
}

.menu-card--primary .menu-card__body strong {
  font-size: clamp(1.2rem, 4.2vw, 2.1rem);
  margin-bottom: 8px;
}

.menu-card--primary .menu-card__body span {
  font-size: clamp(0.46rem, 1.6vw, 0.84rem);
  line-height: 1.35;
  color: var(--blue-dark);
}

.menu-card__picture--choose {
  width: clamp(64px, 20vw, 88px);
  height: clamp(64px, 20vw, 88px);
  object-fit: contain;
  flex-shrink: 0;
}

.menu-card--square {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 148px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: var(--shadow-pressable);
}

.menu-card--square strong {
  display: block;
  font-size: clamp(0.78rem, 2.8vw, 0.95rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--blue-dark);
}

.menu-card--favorites {
  background: var(--orange-light);
  box-shadow: var(--shadow-pressable-orange);
}

.menu-card--game-day {
  background: #eef2f6;
  box-shadow: var(--shadow-pressable);
}

.menu-card__picture {
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.menu-card__picture--hello {
  width: clamp(72px, 22vw, 96px);
  height: clamp(72px, 22vw, 96px);
  margin-left: auto;
}

.menu-card__picture--tile {
  width: clamp(56px, 18vw, 72px);
  height: clamp(56px, 18vw, 72px);
}

.menu-card__day-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--hint);
}

.menu-card:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-pressable-active);
}

.menu-card--primary:active {
  box-shadow: 0 1px 0 rgba(47, 128, 237, 0.12), 0 2px 6px rgba(47, 128, 237, 0.1);
}

.menu-card--favorites:active {
  box-shadow: 0 1px 0 rgba(255, 138, 61, 0.12), 0 2px 6px rgba(255, 138, 61, 0.1);
}

.menu-card__icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 1.75rem;
  flex-shrink: 0;
}

.menu-card__icon--blue {
  background: var(--blue-light);
}

.menu-card__icon--orange {
  background: var(--orange-light);
  color: var(--orange);
}

.menu-card__icon--game-day {
  background: #fef3c7;
  color: var(--orange);
  font-size: 2rem;
  font-weight: 900;
}

.menu-card__icon--sliders svg {
  display: block;
}

.menu-card__body {
  flex: 1;
  min-width: 0;
}

.menu-card__body strong {
  display: block;
  margin-bottom: 6px;
  color: var(--blue-dark);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.25;
}

.menu-card__body span {
  display: block;
  color: var(--hint);
  font-size: 0.84rem;
  line-height: 1.4;
}

.menu-card__arrow {
  color: var(--hint);
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.menu-card--pending {
  opacity: 0.88;
}

.home-extra {
  flex-shrink: 0;
}

#screen-home {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.recent-games {
  margin-top: 8px;
  flex-shrink: 0;
}

.catalog-search-wrap--home {
  margin: 12px 0 8px;
  padding: 10px 14px;
  border-radius: 14px;
}

.catalog-search-wrap--home .catalog-search__icon {
  font-size: 1rem;
}

.catalog-search-wrap--home .catalog-search {
  font-size: clamp(0.9rem, 3vw, 1rem);
  font-weight: 600;
}

.home-search-results {
  margin-bottom: 8px;
}

.home-search-results.hidden {
  display: none;
}

.home-search-results .status {
  margin: 0 0 10px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.recent-games.hidden {
  display: none;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--blue-dark);
}

.badge {
  min-width: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.text-btn,
.back-btn {
  border: none;
  background: none;
  color: var(--blue);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.back-btn {
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.filter-panel {
  display: none;
}

/* --- Страница подбора --- */
.picker-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  margin-bottom: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  box-shadow: var(--shadow);
}

.picker-hero__text h2 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: var(--blue-dark);
}

.picker-hero__text p {
  margin: 0;
  color: var(--hint);
  font-size: 0.88rem;
  line-height: 1.4;
}

.picker-hero__art {
  font-size: 2rem;
  flex-shrink: 0;
}

.filter-section {
  margin-bottom: 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--section-color, var(--blue));
}

.filter-section--who { --section-color: #8b5cf6; --section-bg: #f3e8ff; --section-active: #7c3aed; }
.filter-section--situation { --section-color: #10b981; --section-bg: #d1fae5; --section-active: #059669; }
.filter-section--inventory { --section-color: #f59e0b; --section-bg: #fef3c7; --section-active: #d97706; }

.filter-section__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.filter-section__icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--section-bg);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.filter-section__head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--blue-dark);
}

.filter-section__head p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--hint);
  line-height: 1.35;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 10px 14px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip--active {
  background: var(--section-active);
  border-color: var(--section-active);
  color: #fff;
}

.filter-subsection {
  margin-bottom: 14px;
}

.filter-subsection__label {
  margin: 0 0 10px;
  color: var(--blue-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-subsection__label--lg {
  font-size: clamp(1.2rem, 3.8vw, 1.64rem);
  line-height: 1.25;
}

.filter-subsection__hint {
  display: block;
  margin-top: 4px;
  font-size: 0.72em;
  font-weight: 700;
  color: var(--hint);
}

.filter-select-all {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.filter-section--situation .filter-select-all {
  color: #059669;
}

.filter-section--situation .filter-select-all--active {
  color: #047857;
}

.filter-section--situation .filter-select-all:active {
  opacity: 0.75;
}

.filter-subsection--players {
  margin-bottom: 18px;
}

.option-grid--filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.option-grid--filter .option-card {
  aspect-ratio: auto;
  min-height: 112px;
  justify-content: center;
  padding: 12px 8px;
  gap: 8px;
}

.option-grid--filter .option-card__icon {
  font-size: clamp(2.8rem, 9vw, 4rem);
  line-height: 1;
}

.option-grid--filter .option-card__icon--combo {
  display: flex;
  gap: 2px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  font-size: clamp(1.35rem, 4.2vw, 1.95rem);
  line-height: 1;
}

.option-grid--filter .option-card__icon--combo span {
  display: inline-block;
}

.option-grid--filter .option-card__label {
  font-size: clamp(1.02rem, 3.6vw, 1.38rem);
  font-weight: 800;
  line-height: 1.15;
  word-break: break-word;
  hyphens: auto;
}

.player-count-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.player-count-btn {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid rgba(124, 58, 237, 0.18);
  border-radius: 14px;
  background: var(--card);
  color: var(--blue-dark);
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.player-count-btn:active {
  transform: scale(0.96);
}

.filter-section--who .player-count-btn--active {
  background: var(--section-active);
  border-color: var(--section-active);
  color: #fff;
}

.inventory-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.inventory-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 72px;
  padding: 8px 4px;
  border: 2px solid rgba(16, 185, 129, 0.18);
  border-radius: 14px;
  background: var(--card);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.inventory-option:active {
  transform: scale(0.97);
}

.inventory-option__icon {
  font-size: 1.35rem;
  line-height: 1;
}

.inventory-option__label {
  color: var(--blue-dark);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.filter-section--situation .inventory-option--active {
  background: var(--section-active);
  border-color: var(--section-active);
  color: #fff;
}

.filter-section--situation .inventory-option--active .inventory-option__label {
  color: #fff;
}

.game-detail__inventory {
  margin: 0 0 8px;
}

.game-detail__inventory-title {
  margin: 0 0 8px !important;
}

.inventory-display {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inventory-display__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 68px;
  padding: 8px 6px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #065f46;
}

.inventory-display__icon {
  font-size: 1.2rem;
  line-height: 1;
}

.inventory-display__label {
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.option-grid--compact {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 400px) {
  .option-grid--compact {
    grid-template-columns: repeat(3, 1fr);
  }
}

.option-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: none;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-pressable);
  text-align: center;
  cursor: pointer;
  transition: var(--pressable-transition);
  -webkit-tap-highlight-color: transparent;
}

.option-card:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-pressable-active);
}

.option-card__icon {
  font-size: 1.5rem;
}

.option-card__label {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.option-card--active {
  background: var(--section-bg);
  box-shadow: 0 2px 0 rgba(47, 128, 237, 0.18), 0 6px 14px rgba(47, 128, 237, 0.16);
}

.picker-actions {
  display: grid;
  gap: 10px;
  margin: 20px 0;
}

.picker-actions .ghost-btn,
.picker-actions .primary-btn {
  font-size: 2rem;
}

.ghost-btn {
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: var(--card);
  color: var(--hint);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-pressable);
  transition: var(--pressable-transition);
}

.ghost-btn:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-pressable-active);
}

.primary-btn {
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-pressable-blue);
  transition: var(--pressable-transition);
}

.primary-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(47, 128, 237, 0.14), 0 2px 6px rgba(47, 128, 237, 0.12);
}

.catalog-results {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#screen-catalog.catalog--results #catalog-picker {
  display: none;
}

#screen-catalog.catalog--results .catalog-results {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

#screen-catalog.catalog--results .section-head {
  flex-shrink: 0;
}

#screen-catalog.catalog--results #catalog-games-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

#screen-catalog.catalog--results #catalog-games-grid.pick-results {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  align-content: flex-start;
}

.catalog-results__back {
  margin-right: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.section-head--catalog-results {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.catalog-results__choose {
  flex-shrink: 0;
  width: 100%;
  margin-top: 12px;
  padding: 14px 12px;
  border: 2px solid rgba(47, 128, 237, 0.2);
  border-radius: 14px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 1.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.catalog-results__choose:active {
  transform: scale(0.98);
}

.catalog-empty-reset {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 12px;
  border: 2px solid rgba(47, 128, 237, 0.2);
  border-radius: 14px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.catalog-empty-reset.hidden {
  display: none;
}

.games-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 520px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.game-tile {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-pressable);
  cursor: pointer;
  transition: var(--pressable-transition);
  -webkit-tap-highlight-color: transparent;
}

.game-tile:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-pressable-active);
}

.game-tile__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.game-tile__title {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.3;
  color: var(--blue-dark);
}

.fav-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 87, 34, 0.12);
  color: #e53935;
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.fav-btn:hover {
  background: rgba(255, 87, 34, 0.22);
  transform: scale(1.06);
}

.fav-btn--active {
  background: linear-gradient(135deg, #ff5722 0%, #e53935 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.35);
}

.fav-btn--corner {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.game-tile__category {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 700;
}

.game-tile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.meta-chip {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--hint);
  font-size: 0.75rem;
}

.game-tile__rules {
  margin: 0;
  color: var(--hint);
  font-size: 0.85rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-tile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.72rem;
}

.tag--link {
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.tag--link:hover {
  background: #bfdbfe;
}

.tag--link:active {
  transform: scale(0.97);
}

.status {
  text-align: center;
  color: var(--hint);
  padding: 24px 12px;
}

.status.error {
  color: #c0392b;
}

.game-detail {
  position: relative;
  padding: 18px;
  padding-right: 56px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.game-detail h2 {
  margin: 0 0 10px;
  padding-right: 8px;
  color: var(--blue-dark);
}

.game-detail p {
  margin: 0 0 8px;
  color: var(--hint);
  line-height: 1.5;
  font-size: 0.92rem;
}

.game-detail__rules {
  margin-top: 0 !important;
  padding-top: 0;
  border-top: none;
  color: var(--text) !important;
  font-size: 0.95rem !important;
  line-height: 1.55 !important;
  white-space: pre-line;
}

.game-detail__rules-toggle {
  display: inline-block;
  margin-top: 10px;
  padding: 0;
  border: none;
  background: none;
  color: #f59e0b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.game-detail__rules-toggle:active {
  opacity: 0.75;
}

.game-detail__rules-full {
  margin-top: 10px;
}

.game-detail__rules-full.hidden {
  display: none;
}

.game-detail__rules--full {
  margin-top: 0 !important;
}

.game-detail__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em;
  margin: 0 0 10px;
  padding-right: 8px;
  font-size: calc(1.55rem + 10px);
  line-height: 1.2;
  font-weight: 900;
}

.game-detail__title-prefix {
  color: #ff8a3d;
  font-size: 0.5em;
}

.game-detail__title-name {
  color: var(--blue-dark);
}

.game-detail__benefits {
  display: flow-root;
  margin: 0 0 12px;
  padding: 0;
  border-top: none;
}

.game-detail__hero {
  margin-bottom: 12px;
}

.game-detail__hero .game-detail__title {
  width: 100%;
  margin-bottom: 10px;
}

.game-detail__hero .game-detail__benefits {
  margin-bottom: 0;
}

.game-detail__mascot {
  float: right;
  display: block;
  width: var(--mascot-size);
  height: var(--mascot-size);
  object-fit: contain;
  margin: 0 0 8px 10px;
}

.game-detail__params {
  margin: 0 0 14px;
  padding: 10px 8px;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px rgba(27, 43, 75, 0.06);
}

.game-detail__params-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
}

.game-detail__params-row--labels {
  margin-bottom: 8px;
}

.game-detail__param-label {
  font-size: 1.16rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  color: var(--hint);
}

.game-detail__param-value {
  display: grid;
  place-items: center;
  min-height: 48px;
  text-align: center;
}

.game-detail__param-age {
  font-size: 1.43rem;
  font-weight: 900;
  color: var(--blue-dark);
  line-height: 1;
}

.game-detail__param-check {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #dcfce7;
  color: #16a34a;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
}

.game-detail__param-cross {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
}

.game-detail__param-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.game-detail__param-inventory {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
}

.game-detail__param-inv-icon {
  font-size: 2rem;
  line-height: 1;
}

.game-detail__rules-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(27, 43, 75, 0.08);
}

.game-detail__rules-title {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 1.84rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.game-detail__rules-block,
.game-detail__benefits {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(27, 43, 75, 0.08);
}

.game-detail__benefits {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.game-detail__section-title {
  margin: 0 0 8px !important;
  color: var(--blue-dark) !important;
  font-size: 0.92rem !important;
  line-height: 1.3 !important;
}

.game-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-detail__tags .tag {
  background: var(--blue-light);
  color: var(--blue-dark);
  border: 1px solid rgba(47, 128, 237, 0.18);
  font-size: 0.96rem;
  font-weight: 700;
  padding: 5px 10px;
  text-decoration: none;
}

.game-detail__tags .tag--link:hover {
  background: #dcecff;
  border-color: rgba(47, 128, 237, 0.32);
}

.game-detail__tags .tag--link:active {
  transform: scale(0.97);
  background: #cfe4ff;
}

.cards-list {
  display: grid;
  gap: 12px;
}

.card-item {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-item__head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--hint);
  font-size: 0.8rem;
}

.card-values {
  display: grid;
  gap: 8px;
}

.card-value {
  padding: 12px;
  border-radius: 12px;
  background: var(--bg);
  line-height: 1.4;
}

.card-value--empty {
  color: var(--hint);
  font-style: italic;
}

.card-answer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(27, 43, 75, 0.12);
  color: var(--hint);
  font-size: 0.88rem;
}

/* --- Экран игры --- */
.game-screen-head {
  margin-bottom: 8px;
}

.back-btn {
  padding: 8px 4px;
  border: none;
  background: none;
  color: var(--blue);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.game-no-host-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.game-no-host-note__icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.game-no-host-note p {
  margin: 0;
  color: #047857;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.game-start-bar {
  flex-shrink: 0;
  margin-top: 8px;
}

.game-start-bar .primary-btn {
  width: 100%;
  font-size: 2rem;
}

.game-detail__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.game-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.game-badge--orange {
  background: var(--orange-light);
  color: #c2410c;
}

.game-play {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-height: 0;
}

.play-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.play-intro {
  padding: 14px 16px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.play-intro__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.play-intro__fav {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 2.3rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.play-intro__fav.fav-btn--active {
  color: var(--orange);
}

.play-intro__main {
  flex: 1;
  min-width: 0;
}

.play-intro__title {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--blue-dark);
  font: inherit;
  font-size: calc(1.42rem + 5px);
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
  cursor: pointer;
}

.play-intro__title:active {
  opacity: 0.75;
}

.play-intro__difficulty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.play-intro__difficulty.hidden {
  display: none;
}

.play-intro__difficulty-title {
  color: var(--orange);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
}

.play-intro__difficulty-stars {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.play-intro__level-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.18);
}

.play-intro__level-stars {
  color: #ea580c;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
}

.play-intro__rules {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(27, 43, 75, 0.08);
  color: var(--blue-dark);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: left;
}

.play-intro__rules.hidden {
  display: none;
}

.play-intro__rules-label {
  font-weight: 800;
  margin-right: 0.25em;
}

.play-hint-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.play-hint-icon--intro,
.play-hint-icon--tool {
  width: var(--play-hint-size);
  height: var(--play-hint-size);
}

.play-hint-icon__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.play-hint-icon--intro .play-hint-icon__tooltip,
.play-hint-icon--tool .play-hint-icon__tooltip {
  max-width: min(300px, calc(100vw - 24px));
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  box-shadow: 0 8px 22px rgba(47, 128, 237, 0.28);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  top: calc(100% + 10px);
  bottom: auto;
  transform: translate(0, 4px);
}

.play-hint-icon--intro .play-hint-icon__tooltip {
  right: 0;
  left: auto;
}

.play-hint-icon--tool .play-hint-icon__tooltip {
  left: 0;
  right: auto;
}

.play-hint-icon--intro:hover .play-hint-icon__tooltip,
.play-hint-icon--intro:focus-visible .play-hint-icon__tooltip,
.play-hint-icon--intro.is-active .play-hint-icon__tooltip,
.play-hint-icon--tool:hover .play-hint-icon__tooltip,
.play-hint-icon--tool:focus-visible .play-hint-icon__tooltip,
.play-hint-icon--tool.is-active .play-hint-icon__tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(0, 0);
}

.play-hint-icon__tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 120;
  width: max-content;
  max-width: min(240px, 72vw);
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(27, 43, 75, 0.94);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.play-hint-icon__tooltip--fixed {
  position: fixed;
  bottom: auto;
  z-index: 200;
}

.play-hint-icon:hover .play-hint-icon__tooltip,
.play-hint-icon:focus-visible .play-hint-icon__tooltip,
.play-hint-icon.is-active .play-hint-icon__tooltip {
  opacity: 1;
  visibility: visible;
}

.play-hint-icon:not(.play-hint-icon--intro):not(.play-hint-icon--tool):hover .play-hint-icon__tooltip,
.play-hint-icon:not(.play-hint-icon--intro):not(.play-hint-icon--tool):focus-visible .play-hint-icon__tooltip,
.play-hint-icon:not(.play-hint-icon--intro):not(.play-hint-icon--tool).is-active .play-hint-icon__tooltip {
  transform: translate(-50%, 0);
}

.play-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  overflow: visible;
}

.play-timer-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px rgba(47, 128, 237, 0.12);
  flex: 1;
  min-width: 0;
  overflow: visible;
}

.play-timer-pill__toggle {
  margin-left: auto;
}

.play-timer-ring {
  position: relative;
  width: 86px;
  height: 86px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.play-timer-ring__svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.play-timer-ring__track {
  fill: none;
  stroke: #dbeafe;
  stroke-width: 6;
}

.play-timer-ring__progress {
  fill: none;
  stroke: #2f80ed;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s linear;
}

.play-timer-ring.is-running .play-timer-ring__progress {
  stroke: #2563eb;
}

.play-timer-ring__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.play-timer-ring__time {
  color: #2f80ed;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.play-timer-ring__caption {
  color: var(--hint);
  font-size: 0.52rem;
  font-weight: 700;
}

.play-letter-section {
  flex-shrink: 0;
}

.play-letter-section__row {
  display: flex;
  align-items: center;
  gap: 10px 12px;
}

.play-letter-slot {
  display: flex;
  flex: 1;
  min-width: 0;
  justify-content: center;
  align-items: center;
}

.play-letter-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: 16px;
  min-height: 0;
}

.play-letter-display__bg {
  color: var(--hint);
  font-size: calc(0.98rem + 4px);
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  user-select: none;
  text-align: left;
}

.play-letter-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.play-nav-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--blue);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.play-letter-card {
  position: relative;
  min-width: calc(96px + 10px);
  min-height: calc(96px + 10px);
  padding: calc(14px + 10px) calc(22px + 10px);
  border: 2px solid rgba(255, 138, 61, 0.22);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.play-letter-card:active {
  transform: scale(0.98);
}

.play-letter-card__value {
  color: var(--orange);
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.play-game-card {
  flex: 1;
  min-height: 0;
  display: flex;
}

.play-game-card__surface {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 16px 16px 14px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.play-game-card__surface--level-1 {
  --card-accent: #a67c00;
  --card-accent-soft: rgba(180, 140, 60, 0.14);
  background: linear-gradient(180deg, #fffdf7 0%, #f8efd8 100%);
  border-color: rgba(196, 165, 90, 0.18);
}

.play-game-card__surface--level-2 {
  --card-accent: #ea580c;
  --card-accent-soft: rgba(234, 88, 12, 0.14);
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  border-color: rgba(234, 88, 12, 0.18);
}

.play-game-card__surface--level-3 {
  --card-accent: #16a34a;
  --card-accent-soft: rgba(22, 163, 74, 0.16);
  background: linear-gradient(180deg, #ecfdf5 0%, #bbf7d0 100%);
  border-color: rgba(22, 163, 74, 0.2);
}

.play-game-card__surface--level-4 {
  --card-accent: #7c3aed;
  --card-accent-soft: rgba(124, 58, 237, 0.16);
  background: linear-gradient(180deg, #f5f3ff 0%, #ddd6fe 100%);
  border-color: rgba(124, 58, 237, 0.2);
}

.play-game-card__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.play-game-card__level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--card-accent, #c2410c);
  font-size: 1rem;
  font-weight: 800;
}

.play-game-card__refresh {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--card-accent, #ea580c);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
}

.play-rules-short.hidden {
  display: none;
}

.play-game-card__hint {
  margin: 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  box-shadow: 0 8px 22px rgba(47, 128, 237, 0.28);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  flex: 1;
  min-width: 0;
}

.play-game-card__hint.hidden {
  display: none;
}

.play-game-card__footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  flex-shrink: 0;
}

.play-game-card__bottom-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.play-game-card__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.play-game-card__counter {
  color: var(--hint);
  font-size: 0.98rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.play-game-card__counter.hidden {
  display: none;
}

.play-game-card__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.55);
}

.play-game-card__dot--active {
  width: 10px;
  height: 10px;
  background: var(--card-accent, #ea580c);
}

.toggle--compact .toggle__track {
  width: 36px;
  height: 22px;
}

.toggle--compact .toggle__track::after {
  width: 16px;
  height: 16px;
}

.toggle--compact input:checked + .toggle__track::after {
  transform: translateX(14px);
}

.game-level-picker,
.level-bar {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.level-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-detail > .level-bar {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-top: 12px;
  margin-bottom: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}

.game-detail > .level-bar .level-bar__label {
  width: 100%;
  color: var(--hint);
}

.game-detail > .level-bar .level-bar__options--checks {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.level-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 6px 0;
  cursor: pointer;
  user-select: none;
}

.level-check__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.level-check__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(245, 158, 11, 0.45);
  border-radius: 5px;
  background: #fff;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.level-check__box::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  margin-top: -2px;
  transition: transform 0.12s ease;
}

.level-check__input:checked + .level-check__box {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #d97706;
}

.level-check__input:checked + .level-check__box::after {
  transform: rotate(45deg) scale(1);
}

.level-check__stars {
  flex-shrink: 0;
  font-size: 0.78rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.level-check__label {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--blue-dark);
}

.level-check:active .level-check__box {
  transform: scale(0.95);
}

.level-bar__label {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hint);
}

.level-bar__options {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 4px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.level-bar__options::-webkit-scrollbar {
  display: none;
}

.level-option {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 36px;
  padding: 0;
  border: 1.5px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.level-option:active {
  transform: scale(0.95);
}

.level-option__stars {
  color: #f59e0b;
  letter-spacing: -0.02em;
  font-size: 0.68rem;
  line-height: 1;
  pointer-events: none;
}

.level-option--active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #d97706;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

.level-option--active .level-option__stars {
  color: #fff;
}

.game-level-picker__title {
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--blue-dark);
}

.game-level-picker__hint {
  width: 100%;
  margin: 8px 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--hint);
}

.play-top-card {
  display: none;
}

.play-block {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.play-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.play-block__label {
  font-weight: 800;
  color: var(--blue-dark);
  font-size: 0.95rem;
}

.play-block__hint {
  color: var(--hint);
  font-size: 0.78rem;
  font-weight: 700;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle__track {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  transition: background 0.2s ease;
}

.toggle__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle input:checked + .toggle__track {
  background: var(--blue);
}

.toggle input:checked + .toggle__track::after {
  transform: translateX(18px);
}

.toggle__text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hint);
}

.timer-display {
  font-size: 2.6rem;
  font-weight: 900;
  text-align: center;
  color: #2f80ed;
  letter-spacing: 0.04em;
  margin: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.play-timer-ring__time.timer-display {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.timer-display--warning {
  color: #dc2626;
  animation: pulse 0.8s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.alphabet-letter {
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0;
  border-radius: 12px;
  background: transparent;
  font-weight: 900;
  color: var(--orange);
  box-shadow: none;
  line-height: 1.1;
}

.play-letter-section__counter {
  display: block;
  margin: 0;
  color: var(--hint);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.play-letter-section__hint {
  display: block;
  margin-top: 8px;
  color: var(--hint);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}

.action-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.action-btn:active {
  transform: scale(0.98);
}

.action-btn--timer {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
}

.action-btn--timer.is-running {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.action-btn--alphabet {
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  color: #fff;
}

.action-btn--card {
  background: linear-gradient(135deg, var(--orange) 0%, #ea580c 100%);
  color: #fff;
}

.play-card {
  flex: 1;
  min-height: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.play-card__stack {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
}

.play-card--with-answer {
  cursor: default;
}

.play-card--with-answer .play-card__stack {
  cursor: pointer;
}

.play-card--game .play-card__single,
.play-card--topic .play-card__single {
  padding: 8px 12px;
  border-radius: 14px;
  background: transparent;
  box-shadow: none;
  font-size: clamp(1.6rem, 7vw, 2.4rem);
  line-height: 1.1;
  font-weight: 900;
  color: var(--blue);
  text-align: center;
  letter-spacing: 0.03em;
}

.play-card--game .play-card__text,
.play-card--topic .play-card__text {
  text-transform: uppercase;
}

.play-card--game .play-card__emoji,
.play-card--topic .play-card__emoji {
  display: inline-block;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 1.75em;
  line-height: 1;
  vertical-align: -0.08em;
  letter-spacing: 0;
  text-transform: none;
}

.play-card--game .play-card__dual,
.play-card--topic .play-card__dual {
  width: 100%;
  min-height: 72px;
  height: auto;
  border-radius: 14px;
  box-shadow: none;
}

.play-card--topic .play-card__side {
  padding: 12px 10px;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 800;
  color: var(--blue-dark);
}

.play-card--topic .play-card__side--blue,
.play-card--topic .play-card__side--orange {
  color: var(--blue-dark);
}

.play-level-filter {
  margin-top: 16px;
  margin-bottom: 4px;
  padding: 12px;
  border-radius: 14px;
  background: var(--bg);
}

.play-level-filter__title {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--blue-dark);
}

.play-level-filter__hint {
  width: 100%;
  margin: 8px 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--hint);
}

.chip--level {
  border-color: rgba(245, 158, 11, 0.35);
}

.chip--level.chip--active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-color: #d97706;
  color: #fff;
}

.chip__stars {
  letter-spacing: 0.05em;
}

.chip__count {
  opacity: 0.75;
  font-size: 0.72rem;
}

.play-card-level {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.25);
}

.play-card-level__stars {
  color: #f59e0b;
  letter-spacing: 0.06em;
}

.play-card__empty {
  padding: 24px 16px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--hint);
  text-align: center;
  font-weight: 700;
}

.action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.play-card__single {
  padding: 24px 20px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #fff 0%, var(--blue-light) 100%);
  box-shadow: var(--shadow);
  font-size: 1.15rem;
  line-height: 1.5;
  text-align: center;
  font-weight: 700;
  color: var(--blue-dark);
}

.play-card__dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 160px;
}

.play-card__side {
  display: grid;
  place-items: center;
  align-content: center;
  padding: 16px 12px;
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 3px solid transparent;
}

.play-card__side--blue {
  background: linear-gradient(145deg, #dbeafe 0%, #93c5fd 100%);
  color: #1e3a8a;
}

.play-card__side--orange {
  background: linear-gradient(145deg, #ffedd5 0%, #fdba74 100%);
  color: #9a3412;
}

.play-card__side--selected {
  border-color: var(--blue-dark);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  transform: scale(1.02);
  z-index: 1;
}

.play-card__answer-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: 100%;
  flex-shrink: 0;
}

.play-card__answer-input {
  width: 100%;
  min-width: 0;
  padding: 12px 14px;
  border: 2px solid rgba(47, 128, 237, 0.25);
  border-radius: 12px;
  background: #fff;
  color: var(--blue-dark);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
}

.play-card__answer-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.15);
}

.play-card__answer-input--wrong {
  border-color: #ef4444;
  animation: answer-shake 0.45s ease;
}

.play-card__answer-form--correct .play-card__answer-input {
  border-color: #22c55e;
  background: #f0fdf4;
}

.play-card__answer-check {
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.play-card__answer-check:disabled {
  opacity: 0.65;
  cursor: default;
}

@keyframes answer-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.victory-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.victory-overlay__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.victory-overlay__message {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 18px 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 40px rgba(29, 78, 216, 0.25);
  color: var(--blue-dark);
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  animation: victory-pop 0.45s cubic-bezier(0.2, 0.9, 0.2, 1.2);
}

@keyframes victory-pop {
  0% {
    opacity: 0;
    transform: scale(0.6) translateY(12px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.play-footer {
  margin-top: 4px;
  padding-bottom: 8px;
}

#screen-game {
  padding-bottom: 8px;
}

.game-screen-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.game-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 14px 12px;
  border: 2px solid transparent;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: var(--pressable-transition);
  -webkit-tap-highlight-color: transparent;
}

.game-screen-actions .game-action-btn {
  min-height: 72px;
  padding: 16px 14px;
  font-size: 1.64rem;
}

.game-action-btn:active {
  transform: translateY(3px);
}

.game-action-btn__icon {
  font-size: 1.15rem;
  line-height: 1;
}

.game-action-btn--blue {
  background: linear-gradient(180deg, #f0f7ff 0%, #dbeafe 100%);
  color: var(--blue-dark);
  border-color: rgba(47, 128, 237, 0.38);
  box-shadow:
    0 4px 0 #93c5fd,
    0 10px 22px rgba(47, 128, 237, 0.18);
}

.game-action-btn--blue:active {
  box-shadow:
    0 1px 0 #93c5fd,
    0 4px 10px rgba(47, 128, 237, 0.12);
}

.game-action-btn--orange {
  background: linear-gradient(180deg, #ffb066 0%, #ff8a3d 45%, #ea580c 100%);
  color: #fff;
  border-color: rgba(194, 65, 12, 0.45);
  box-shadow:
    0 4px 0 #c2410c,
    0 10px 22px rgba(255, 138, 61, 0.28);
}

.game-action-btn--orange:active {
  box-shadow:
    0 1px 0 #c2410c,
    0 4px 10px rgba(255, 138, 61, 0.16);
}

.game-action-btn--orange .game-action-btn__icon {
  filter: brightness(1.1);
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 16px;
}

.image-modal.hidden {
  display: none;
}

.image-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.image-modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  max-height: calc(100dvh - 32px);
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.image-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue-dark);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(27, 43, 75, 0.12);
}

.image-modal__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 80px);
  object-fit: contain;
  border-radius: 12px;
}

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + env(safe-area-inset-bottom));
  z-index: 120;
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(27, 43, 75, 0.94);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
  transform: translateX(-50%);
  animation: toast-in 0.22s ease;
}

.app-toast.hidden {
  display: none;
}

.app-toast--success {
  background: rgba(4, 120, 87, 0.94);
}

.app-toast--error {
  background: rgba(185, 28, 28, 0.94);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.info-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.info-modal__panel {
  position: relative;
  width: min(100%, 420px);
  max-height: min(80vh, 640px);
  overflow: auto;
  padding: 20px 18px 18px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 20px 50px rgba(27, 43, 75, 0.22);
}

.info-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  color: var(--hint);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.info-modal__title {
  margin: 0 28px 12px 0;
  font-size: 1.1rem;
  color: var(--blue-dark);
}

.info-modal__body {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.ghost-btn--danger {
  color: #dc2626;
  border-color: rgba(220, 38, 38, 0.25);
}

.ghost-btn--danger:hover {
  background: #fef2f2;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(27, 43, 75, 0.08);
  backdrop-filter: blur(10px);
  box-shadow: 0 -8px 24px rgba(27, 43, 75, 0.06);
}

.bottom-nav__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: var(--bg);
  color: var(--hint);
  cursor: pointer;
  transition: var(--pressable-transition);
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    0 3px 0 rgba(27, 43, 75, 0.07),
    0 6px 14px rgba(27, 43, 75, 0.06);
}

.bottom-nav__item:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(27, 43, 75, 0.06),
    0 3px 8px rgba(27, 43, 75, 0.05);
}

.bottom-nav__item--active {
  color: var(--blue-dark);
  background: linear-gradient(180deg, #f0f7ff 0%, var(--blue-light) 100%);
  border-color: rgba(47, 128, 237, 0.28);
  box-shadow:
    0 3px 0 rgba(47, 128, 237, 0.18),
    0 8px 18px rgba(47, 128, 237, 0.14);
}

.bottom-nav__icon {
  font-size: 2rem;
  line-height: 1;
}

.hidden {
  display: none !important;
}

/* --- Экран подбора 2×2 --- */
.picker-screen {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.picker-screen__head {
  text-align: center;
}

.picker-screen__title {
  margin: 0 0 8px;
  font-size: clamp(1.15rem, 4.4vw, 1.65rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--blue-dark);
}

.picker-screen__hint {
  margin: 0;
  font-size: clamp(0.92rem, 3.2vw, 1.05rem);
  line-height: 1.35;
  color: var(--hint);
}

.picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.picker-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 10px;
  border-radius: 16px;
  background: var(--panel-bg);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--panel-accent) 28%, transparent);
}

.picker-panel--who {
  --panel-bg: #ecfdf5;
  --panel-accent: #10b981;
  --chip-active-bg: #10b981;
  --chip-active-shadow: rgba(16, 185, 129, 0.35);
}

.picker-panel--players {
  --panel-bg: #fefce8;
  --panel-accent: #eab308;
  --chip-active-bg: #ca8a04;
  --chip-active-shadow: rgba(234, 179, 8, 0.38);
}

.picker-panel--situation {
  --panel-bg: #eff6ff;
  --panel-accent: #3b82f6;
  --chip-active-bg: #2563eb;
  --chip-active-shadow: rgba(37, 99, 235, 0.34);
}

.picker-panel--inventory {
  --panel-bg: #faf5ff;
  --panel-accent: #a855f7;
  --chip-active-bg: #9333ea;
  --chip-active-shadow: rgba(147, 51, 234, 0.34);
}

.picker-panel__title {
  margin: 0;
  font-size: clamp(0.72rem, 2.6vw, 0.88rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--panel-accent) 78%, #1e293b);
}

.picker-panel__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  flex: 1;
}

.picker-panel__status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.85rem;
  text-align: center;
  color: var(--hint);
}

.picker-panel__status--error {
  color: #dc2626;
}

.picker-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 58px;
  padding: 6px 4px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  color: #334155;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}

.picker-chip:active {
  transform: translateY(1px);
}

.picker-chip__icon {
  font-size: clamp(1rem, 3.8vw, 1.25rem);
  line-height: 1;
}

.picker-chip__label {
  font-size: clamp(0.62rem, 2.2vw, 0.74rem);
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.picker-chip--plain .picker-chip__label {
  font-size: clamp(1rem, 4vw, 1.35rem);
  font-weight: 900;
}

.picker-chip--active {
  background: var(--chip-active-bg);
  color: #fff;
  box-shadow: 0 2px 0 color-mix(in srgb, var(--chip-active-bg) 55%, #000), 0 8px 16px var(--chip-active-shadow);
}

.picker-actions--screen {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.picker-match {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.picker-match__img {
  width: clamp(56px, 16vw, 80px);
  height: clamp(56px, 16vw, 80px);
  object-fit: contain;
  flex-shrink: 0;
}

.picker-match__text {
  margin: 0;
  font-size: clamp(1rem, 3.8vw, 1.22rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--blue-dark);
}

.picker-screen__submit {
  margin-bottom: 0;
}

.picker-screen__reset {
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--hint);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.catalog-top--results {
  margin-bottom: 10px;
}

/* --- Общие компоненты подбора --- */
.catalog-top {
  margin-bottom: 10px;
}

.catalog-title {
  margin: 0 0 12px;
  text-align: center;
  font-size: clamp(1.2rem, 4.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--blue-dark);
}

.catalog-search-wrap--pick {
  margin: 4px 0 6px;
  padding: 8px 12px;
  border-radius: 12px;
  gap: 6px;
}

.catalog-search-wrap--pick .catalog-search__icon {
  font-size: 0.95rem;
}

.catalog-search-wrap--pick .catalog-search {
  font-size: clamp(0.82rem, 2.8vw, 0.92rem);
  font-weight: 600;
}

.catalog-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px rgba(27, 43, 75, 0.08);
}

.catalog-search__icon {
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.7;
}

.catalog-search {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: calc(clamp(1.1rem, 3.5vw, 1.84rem) - 5px);
  font-weight: 700;
  outline: none;
}

.catalog-search::placeholder {
  color: var(--hint);
  font-weight: 600;
}

.play-card-tap-hint {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #eff6ff;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.play-card-tap-hint.hidden {
  display: none;
}

.play-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 8px;
}

.play-action-btn {
  width: 100%;
  padding: 14px 12px;
  border-radius: 14px;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: var(--pressable-transition);
}

.play-action-btn:active {
  transform: scale(0.98);
}

.play-action-btn--restart {
  border: 2px solid rgba(37, 99, 235, 0.18);
  background: #eff6ff;
  color: var(--blue-dark);
}

.play-action-btn--end {
  border: 2px solid rgba(27, 43, 75, 0.1);
  background: var(--card);
  color: var(--hint);
}

.repeat-modal__panel {
  width: min(100%, 380px);
}

.repeat-modal__text {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.45;
}

.repeat-modal__actions {
  display: grid;
  gap: 10px;
}

.repeat-modal__levels {
  justify-content: center;
  margin-bottom: 14px;
}

.repeat-modal__start {
  width: 100%;
}

.play-end-btn {
  flex-shrink: 0;
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  border: 2px solid rgba(27, 43, 75, 0.1);
  border-radius: 14px;
  background: var(--card);
  color: var(--hint);
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

.play-end-btn:active {
  transform: scale(0.98);
}

.play-game-card__level-stars {
  color: var(--card-accent, #ea580c);
  letter-spacing: 0.04em;
}

.filter-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.filter-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  border: none;
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  font-size: calc(clamp(1.4rem, 4.5vw, 2.46rem) - 10px);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--shadow-pressable);
  transition: var(--pressable-transition);
  -webkit-tap-highlight-color: transparent;
}

.filter-tab:active {
  transform: translateY(2px);
  box-shadow: var(--shadow-pressable-active);
}

.filter-tab__badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  line-height: 1;
}

.filter-tab__badge.hidden {
  display: none;
}

.filter-tab--active[data-filter-tab="who"] {
  background: #f3e8ff;
  color: #7c3aed;
  box-shadow: 0 2px 0 rgba(124, 58, 237, 0.22), 0 6px 14px rgba(124, 58, 237, 0.14);
}

.filter-tab--active[data-filter-tab="situation"] {
  background: #d1fae5;
  color: #059669;
  box-shadow: 0 2px 0 rgba(5, 150, 105, 0.22), 0 6px 14px rgba(5, 150, 105, 0.14);
}

.filter-tab--active[data-filter-tab="inventory"] {
  background: #fef3c7;
  color: #d97706;
  box-shadow: 0 2px 0 rgba(217, 119, 6, 0.22), 0 6px 14px rgba(217, 119, 6, 0.14);
}

.filter-tab--active[data-filter-tab="who"] .filter-tab__badge {
  background: #7c3aed;
}

.filter-tab--active[data-filter-tab="situation"] .filter-tab__badge {
  background: #059669;
}

.filter-tab--active[data-filter-tab="inventory"] .filter-tab__badge {
  background: #d97706;
}

.filter-section {
  display: none;
}

.filter-section--active {
  display: block;
}

.catalog-filters {
  flex: 1;
  min-height: 0;
}

.game-tile--compact {
  padding: 12px;
}

.game-tile--compact .game-tile__title {
  font-size: calc(1.08rem + 2px);
}

.game-tile__params {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.game-tile__param {
  font-size: 1.05rem;
  line-height: 1;
  font-weight: 800;
  color: var(--blue-dark);
  white-space: nowrap;
}

.game-tile--compact .fav-btn {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}

.games-grid--compact {
  gap: 10px;
}

.games-grid--pick-list,
.games-grid--pick {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pick-results {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 4px;
}

.pick-results__heading {
  margin: 0;
  font-size: clamp(1.2rem, 4.2vw, 1.45rem);
  font-weight: 900;
  color: var(--blue-dark);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.pick-results__more-count {
  margin: 0;
  font-size: clamp(1.02rem, 3.8vw, 1.18rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--blue-dark);
}

.pick-results__subheading--top {
  margin-top: 4px;
  font-size: clamp(1rem, 3.5vw, 1.12rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-dark);
}

.pick-results__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.pick-results__actions--top {
  margin-top: 4px;
  margin-bottom: 0;
}

.pick-results__actions--footer {
  margin-top: 12px;
}

.pick-results__action-btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: clamp(0.98rem, 3.6vw, 1.12rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
  transition: var(--pressable-transition);
}

.pick-results__action-btn--primary {
  border: none;
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: var(--shadow-pressable-blue);
}

.pick-results__action-btn--primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(47, 128, 237, 0.14), 0 2px 6px rgba(47, 128, 237, 0.12);
}

.pick-results__action-btn--secondary {
  border: none;
  background: linear-gradient(135deg, var(--orange) 0%, #ea580c 100%);
  color: #fff;
  box-shadow: var(--shadow-pressable-orange);
}

.pick-results__action-btn--secondary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(255, 138, 61, 0.14), 0 2px 6px rgba(255, 138, 61, 0.12);
}

.pick-results__action-btn--ghost {
  border: 2px solid rgba(47, 128, 237, 0.22);
  background: var(--blue-light);
  color: var(--blue-dark);
  box-shadow: none;
}

.pick-results__action-btn--ghost:active {
  transform: translateY(1px);
  opacity: 0.92;
}

.pick-results__narrow-btn {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  color: #fff;
  font-size: clamp(0.98rem, 3.6vw, 1.12rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-pressable-blue);
  transition: var(--pressable-transition);
}

.pick-results__narrow-btn:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(47, 128, 237, 0.14), 0 2px 6px rgba(47, 128, 237, 0.12);
}

.pick-results__tags {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 0 0 1px rgba(47, 128, 237, 0.12);
}

.pick-results__tags.hidden {
  display: none;
}

.pick-results__tags-title {
  margin: 0;
  font-size: clamp(0.92rem, 3.2vw, 1.02rem);
  font-weight: 800;
  color: var(--hint);
}

.pick-results__tags-empty {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--hint);
}

.pick-results__tags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pick-results__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border: none;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue-dark);
  font: inherit;
  font-size: clamp(0.86rem, 3vw, 0.96rem);
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-pressable-blue);
  transition: var(--pressable-transition);
}

.pick-results__tag--active {
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: var(--shadow-pressable-blue);
}

.pick-results__tag-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.35rem;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  font-size: 0.82em;
  font-weight: 900;
  line-height: 1.4;
}

.pick-results__tag:not(.pick-results__tag--active) .pick-results__tag-count {
  background: rgba(47, 128, 237, 0.14);
  color: var(--blue-dark);
}

.pick-results__tag:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-pressable-active);
}

.pick-results__tags-summary {
  margin: 0;
  font-size: clamp(0.98rem, 3.5vw, 1.1rem);
  font-weight: 900;
  line-height: 1.35;
  color: var(--blue-dark);
}

.catalog-tag-panel-host {
  flex-shrink: 0;
  margin: 8px 0 4px;
}

.catalog-tag-panel-host.hidden {
  display: none;
}

.catalog-tag-games-host {
  flex-shrink: 0;
  margin: 4px 0 8px;
}

.catalog-tag-games-host.hidden {
  display: none;
}

.catalog-tag-games-host .pick-results__tags-empty {
  margin: 8px 0 0;
}

.pick-results__tags.hidden {
  display: none;
}

.pick-results__search-anchor {
  display: none;
}

.pick-results__subheading {
  margin: 6px 0 2px;
  font-size: clamp(0.98rem, 3.3vw, 1.08rem);
  font-weight: 800;
  color: var(--hint);
  line-height: 1.35;
}

.pick-results__filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(47, 128, 237, 0.08);
}

.pick-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.pick-filter-row__icon {
  flex-shrink: 0;
  width: 1.6rem;
  text-align: center;
  font-size: 1.15rem;
  line-height: 1;
}

.pick-results__featured.games-grid--pick {
  gap: 0;
}

.pick-results__more.games-grid--pick {
  gap: 12px;
}

/* Карточки подбора — главный экран приложения */
.pick-results .game-tile {
  border-radius: calc(var(--radius) + 2px);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pick-results .game-tile__head {
  align-items: center;
  gap: 12px;
  margin-bottom: 0;
}

.pick-results .game-tile__title {
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--blue-dark);
}

.pick-results .game-tile__slog {
  margin: 8px 0 0;
  padding-right: 4px;
  color: var(--orange);
  font-weight: 800;
  line-height: 1.35;
}

.game-tile__open {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(27, 43, 75, 0.08);
  font-size: clamp(0.92rem, 3.2vw, 1.02rem);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  color: var(--blue);
}

.pick-results__featured .game-tile__open {
  margin-top: 12px;
  padding-top: 12px;
  font-size: clamp(0.98rem, 3.4vw, 1.08rem);
  color: #ea580c;
}

.pick-results__more .game-tile__open {
  margin-top: 10px;
  color: var(--blue);
}

.pick-results .fav-btn {
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.12);
}

.pick-results__featured .game-tile {
  padding: 20px 18px 22px;
  border: 2px solid rgba(255, 138, 61, 0.5);
  background: linear-gradient(152deg, #fff4ea 0%, #ffffff 48%, #eef6ff 100%);
  box-shadow:
    0 14px 32px rgba(255, 138, 61, 0.2),
    0 4px 14px rgba(27, 43, 75, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.pick-results__featured .game-tile__title {
  font-size: clamp(1.42rem, 5.5vw, 1.72rem);
}

.pick-results__featured .game-tile__slog {
  font-size: clamp(1.02rem, 3.6vw, 1.14rem);
  margin-top: 10px;
}

.pick-results__more .game-tile {
  padding: 16px 16px 18px;
  border: 1px solid rgba(47, 128, 237, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
  box-shadow: 0 10px 22px rgba(27, 43, 75, 0.09);
}

.pick-results__more .game-tile__title {
  font-size: clamp(1.22rem, 4.4vw, 1.42rem);
}

.pick-results__more .game-tile__slog {
  font-size: clamp(0.96rem, 3.2vw, 1.06rem);
}

.pick-results .game-tile:active {
  transform: scale(0.985) translateY(1px);
}

.game-tile__slog {
  margin: 6px 0 0;
  color: var(--orange);
  font-size: clamp(0.92rem, 3vw, 1rem);
  font-weight: 800;
  line-height: 1.35;
}

.game-tile__open {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(27, 43, 75, 0.08);
  font-size: clamp(0.92rem, 3.2vw, 1.02rem);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-align: center;
  color: var(--blue);
}

.pick-results__featured .game-tile__open {
  margin-top: 12px;
  padding-top: 12px;
  font-size: clamp(0.98rem, 3.4vw, 1.08rem);
  color: #ea580c;
}

.pick-results__more .game-tile__open {
  margin-top: 10px;
}

.games-grid--pick-list .game-tile__open {
  color: var(--blue);
}

.games-grid--pick-list .game-tile__title {
  font-weight: 900;
  font-size: clamp(1.14rem, 4vw, 1.28rem);
  letter-spacing: -0.015em;
}

.games-grid--pick-list .game-tile {
  border: 1px solid rgba(47, 128, 237, 0.1);
  box-shadow: 0 8px 18px rgba(27, 43, 75, 0.07);
}

.game-tile--compact .game-tile__head {
  margin-bottom: 0;
}

.game-detail__scroll {
  overflow: hidden;
}

#game-rules-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 10px;
}

/* --- Мобильная вёрстка: 1 экран без прокрутки страницы --- */
@media (max-width: 520px) {
  html {
    height: 100%;
    overflow: hidden;
  }

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

  .app-shell {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    padding-bottom: 0;
    overflow: hidden;
  }

  .app-shell::before,
  .app-shell::after {
    display: none;
  }

  .topbar {
    flex-shrink: 0;
    padding: 8px 14px 4px;
    min-height: 48px;
  }

  .logo__brand {
    font-size: 1.75rem;
  }

  .logo__tag {
    font-size: 0.82rem;
  }

  .help-hint-btn {
    left: 12px;
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .plan-badge {
    top: 10px;
    right: 12px;
    padding: 7px 12px;
    font-size: 0.78rem;
  }

  .plan-toggle__btn {
    padding: 7px 8px;
    font-size: 0.58rem;
  }

  .app {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0 14px 8px;
    display: flex;
    flex-direction: column;
  }

  .screen {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .bottom-nav {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    flex-shrink: 0;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  }

  .bottom-nav__item {
    min-height: 54px;
    border-radius: 16px;
  }

  .bottom-nav__icon {
    font-size: 1.85rem;
  }

  /* Главная */
  #screen-home {
    gap: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .home-above-fold {
    min-height: 0;
    padding-bottom: 0;
    gap: 4px;
  }

  .hero--home {
    margin-bottom: 4px;
    padding: 0;
    gap: 6px;
  }

  .hero--home .hero__art {
    width: clamp(80px, 26vw, 112px);
  }

  .hero__title--home {
    font-size: clamp(1.9rem, 8vw, 2.55rem);
  }

  .hero__lead {
    font-size: clamp(1.12rem, 4.6vw, 1.34rem);
  }

  .home-pick-btn {
    margin-bottom: 6px;
    padding: 14px 16px;
    font-size: clamp(1.1rem, 4.4vw, 1.34rem);
  }

  .hero--banner {
    min-height: 88px;
    margin-bottom: 8px;
  }

  .hero--banner .hero__text {
    padding: 10px 8px;
  }

  .hero--banner .hero__title {
    font-size: clamp(0.82rem, 3vw, 1.15rem);
  }

  .hero__art-btn {
    flex-basis: 34%;
    max-width: 120px;
    min-width: 76px;
  }

  .menu-card--primary {
    padding: 12px;
  }

  .menu-card--primary .menu-card__body strong {
    font-size: clamp(1.05rem, 3.8vw, 1.45rem);
  }

  .menu-card--primary .menu-card__body span {
    font-size: clamp(0.41rem, 1.4vw, 0.525rem);
  }

  .menu-card__picture--choose {
    width: clamp(56px, 18vw, 72px);
    height: clamp(56px, 18vw, 72px);
  }

  .menu-card--square {
    min-height: 132px;
    padding: 10px 8px;
  }

  .menu-card--square strong {
    font-size: 0.72rem;
  }

  .home-scroll-hint__title {
    font-size: 0.95rem;
  }

  .menu-cards {
    flex-shrink: 0;
    gap: 8px;
    margin-bottom: 0;
  }

  .menu-cards-row {
    gap: 8px;
  }

  .menu-card {
    padding: 11px 12px;
    gap: 10px;
  }

  .menu-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: 1.5rem;
  }

  .menu-card__icon--sliders svg {
    width: 30px;
    height: 30px;
  }

  .menu-card__body strong {
    font-size: 0.92rem;
    margin-bottom: 4px;
  }

  .menu-card__body span {
    font-size: 0.76rem;
    line-height: 1.35;
  }

  .hero {
    flex-shrink: 0;
    padding: 10px 12px;
    margin-bottom: 6px;
    gap: 10px;
  }

  .hero__text h1 {
    font-size: 0.92rem;
    margin-bottom: 4px;
  }

  .hero__text p {
    font-size: 0.78rem;
  }

  .hero__dice {
    width: 56px;
    height: 56px;
  }

  .dice {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
  }

  #screen-catalog {
    gap: 8px;
    overflow: hidden;
    min-height: 0;
  }

  #screen-catalog .picker-screen {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 4px;
  }

  .picker-grid {
    gap: 8px;
  }

  .picker-panel {
    padding: 8px;
  }

  .picker-chip {
    min-height: 52px;
  }

  .catalog-filters {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .filter-section {
    height: 100%;
    margin-bottom: 0;
    padding: 12px;
    overflow: hidden;
    display: none;
    min-height: 0;
  }

  .filter-section--active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .filter-section__head {
    margin-bottom: 10px;
    gap: 10px;
  }

  .filter-section__icon {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  .filter-section__head h3 {
    font-size: 0.92rem;
  }

  .filter-section__head p {
    font-size: 0.72rem;
  }

  .option-grid--filter {
    flex: 1;
    min-height: 140px;
    overflow-y: auto;
    align-content: start;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #screen-catalog .option-grid--filter .option-card {
    min-height: 118px;
    padding: 14px 10px;
    gap: 10px;
  }

  #screen-catalog .option-grid--filter .option-card__icon {
    font-size: clamp(2.8rem, 12vw, 3.6rem);
  }

  #screen-catalog .option-grid--filter .option-card__label {
    font-size: clamp(0.95rem, 3.8vw, 1.15rem);
  }

  .catalog-top {
    flex-shrink: 0;
    margin-bottom: 0;
  }

  .catalog-title {
    font-size: clamp(1.05rem, 3.8vw, 1.45rem);
    margin-bottom: 8px;
  }

  .filter-tab {
    padding: 10px 6px;
    font-size: calc(clamp(1.1rem, 4vw, 1.8rem) - 10px);
  }

  .filter-subsection__label--lg {
    font-size: clamp(1rem, 3.2vw, 1.35rem);
  }

  .player-count-btn {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    font-size: 1.15rem;
  }

  .option-card {
    padding: 10px 8px;
    gap: 6px;
    border-radius: 12px;
  }

  .option-card__icon {
    font-size: 1.2rem;
  }

  .option-card__label {
    font-size: 0.72rem;
  }

  .picker-actions {
    flex-shrink: 0;
    margin: 0;
    gap: 8px;
  }

  .picker-actions .ghost-btn,
  .picker-actions .primary-btn {
    padding: 14px;
    font-size: 1.8rem;
  }

  .ghost-btn,
  .primary-btn {
    padding: 12px;
  }

  #screen-catalog.catalog--results #catalog-picker {
    display: none;
  }

  #screen-catalog.catalog--results .catalog-results {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }

  #screen-catalog.catalog--results .section-head {
    flex-shrink: 0;
    margin-bottom: 8px;
  }

  #screen-catalog.catalog--results .section-head h2 {
    font-size: 1rem;
  }

  #catalog-games-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    gap: 8px;
    align-content: start;
  }

  #catalog-games-grid.pick-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  #catalog-games-grid:not(.pick-results) {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Избранное */
  #screen-favorites {
    gap: 8px;
  }

  #screen-favorites .section-head {
    flex-shrink: 0;
    margin-bottom: 0;
  }

  #screen-favorites .section-head h2 {
    font-size: 1rem;
  }

  #status-favorites {
    flex-shrink: 0;
    padding: 12px 8px;
    font-size: 0.85rem;
  }

  #favorites-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    align-content: start;
  }

  #favorites-choose-other {
    flex-shrink: 0;
    margin-top: 8px;
  }

  /* Игра дня */
  #screen-game-of-day {
    gap: 8px;
  }

  #screen-game-of-day .section-head {
    flex-shrink: 0;
    margin-bottom: 0;
  }

  #screen-game-of-day .section-head h2 {
    font-size: 1rem;
  }

  #status-game-of-day {
    flex-shrink: 0;
    padding: 12px 8px;
    font-size: 0.85rem;
  }

  #game-of-day-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    align-content: start;
  }

  #game-of-day-start {
    flex-shrink: 0;
    width: 100%;
    margin-top: 8px;
    font-size: 2rem;
  }

  #game-of-day-choose-other {
    flex-shrink: 0;
    margin-top: 0;
  }

  /* Экран игры */
  #screen-game {
    gap: 8px;
    padding-bottom: 0;
  }

  #game-rules-view {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    gap: 8px;
  }

  .level-bar {
    flex-shrink: 0;
    margin-bottom: 0;
    padding: 8px 10px;
    gap: 8px;
  }

  .game-detail > .level-bar {
    margin-top: 8px;
    padding: 0;
    gap: 8px;
  }

  .game-detail > .level-bar .level-check {
    min-height: 32px;
    padding: 4px 0;
    gap: 8px;
  }

  .game-detail > .level-bar .level-check__box {
    width: 18px;
    height: 18px;
  }

  .game-detail > .level-bar .level-check__stars {
    font-size: 0.72rem;
  }

  .game-detail > .level-bar .level-check__label {
    font-size: 0.78rem;
  }

  .level-bar__label {
    font-size: 0.68rem;
  }

  .level-option {
    width: 36px;
    height: 32px;
  }

  .level-option__stars {
    font-size: 0.62rem;
  }

  .game-detail {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 12px;
    padding-right: 48px;
    margin-bottom: 0;
  }

  .game-detail__title {
    font-size: calc(1.28rem + 10px);
    margin-bottom: 6px;
  }

  .game-detail__param-label {
    font-size: 1rem;
  }

  .game-detail__param-check,
  .game-detail__param-cross {
    width: 36px;
    height: 36px;
    font-size: 1.43rem;
  }

  .game-detail__param-icon {
    width: 36px;
    height: 36px;
  }

  .game-detail__param-age {
    font-size: 1.23rem;
  }

  .game-detail__param-inv-icon {
    font-size: 1.7rem;
  }

  .game-detail__mascot {
    width: var(--mascot-size);
    height: var(--mascot-size);
  }

  .game-detail__rules-title {
    font-size: 1.45rem;
  }

  .game-detail__badges {
    margin: 6px 0;
    gap: 6px;
  }

  .game-badge {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  .game-detail__scroll {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .game-detail__scroll p {
    margin: 0 0 4px;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .game-detail__rules-block,
  .game-detail__benefits {
    margin-top: 6px;
    padding-top: 6px;
  }

  .game-detail__benefits {
    padding: 0;
  }

  .game-detail__tags .tag {
    font-size: 0.82rem;
    padding: 6px 10px;
  }

  .game-detail__section-title {
    margin-bottom: 4px !important;
    font-size: 0.78rem !important;
  }

  .game-detail__rules {
    margin-top: 0 !important;
    padding-top: 0;
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
  }

  .fav-btn--corner {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 1rem;
  }

  .game-start-bar {
    flex-shrink: 0;
    margin-top: 0;
  }

  .game-start-bar .primary-btn {
    padding: 14px;
    font-size: 1.8rem;
  }

  #game-play-view {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    gap: 8px;
  }

  .play-intro {
    padding: 12px 14px;
  }

  .play-intro__title {
    font-size: calc(1rem + 5px);
  }

  .play-intro__fav {
    width: 56px;
    height: 56px;
    font-size: 2rem;
  }

  .play-timer-ring {
    width: 76px;
    height: 76px;
  }

  .play-letter-card__value {
    font-size: 1.7rem;
  }

  .play-letter-card {
    min-width: calc(88px + 10px);
    min-height: auto;
    padding: calc(12px + 10px) calc(18px + 10px);
  }

  .play-card--game .play-card__single,
  .play-card--topic .play-card__single {
    font-size: 1.7rem;
  }

  .play-game-card__surface {
    padding: 12px;
  }

  .play-card__answer-form {
    gap: 6px;
  }

  .play-card__answer-input {
    padding: 10px 12px;
    font-size: 0.86rem;
  }

  .play-card__answer-check {
    padding: 10px 12px;
    font-size: 0.78rem;
  }

  .victory-overlay__message {
    padding: 14px 22px;
    font-size: 1.2rem;
  }

  .game-screen-actions {
    flex-shrink: 0;
    margin-top: 0;
    gap: 8px;
  }

  .game-action-btn {
    min-height: 56px;
    padding: 12px 10px;
    font-size: 0.78rem;
    border-radius: 14px;
  }

  .game-screen-actions .game-action-btn {
    min-height: 70px;
    font-size: 1.08rem;
  }

  #screen-game:has(#game-play-view:not(.hidden)) .game-action-btn {
    min-height: 66px;
    font-size: 1.76rem;
  }

  #screen-game:has(#game-play-view:not(.hidden)) .game-action-btn__icon {
    font-size: 1.3rem;
  }

  #screen-game:has(#game-play-view:not(.hidden)) .back-btn {
    font-size: 1rem;
  }
}
