/* ============================================================
   VPR Stars · ВПР 4 класс · русский язык
   Стиль: яркий «браво-стайл» гейм-UI. Только чистый CSS.
   ============================================================ */

:root{
  --ink:#14102a;
  --ink-2:#241a45;
  --panel:#2b1f5c;
  --panel-2:#3a2980;
  --line:#0d0a1c;

  --yellow:#ffd23f;
  --yellow-2:#ffa300;
  --orange:#ff7a1a;
  --pink:#ff4d9d;
  --cyan:#4de2ff;
  --cyan-2:#0aa9dd;
  --green:#5cf07a;
  --green-2:#12b862;
  --red:#ff4a5e;
  --purple:#8b5cf6;
  --blue:#4b7bff;

  --shadow-btn: 0 7px 0 rgba(0,0,0,.45);
  --font: "Segoe UI", "Trebuchet MS", system-ui, -apple-system, sans-serif;
  --font-black: "Segoe UI Black", "Segoe UI", "Arial Black", Impact, var(--font);
}

*{ box-sizing:border-box; }

html,body{ height:100%; margin:0; }

body{
  font-family: var(--font);
  color:#fff;
  background:#120b26;
  overflow:hidden;
  -webkit-tap-highlight-color: transparent;
}

.hidden{ display:none !important; }

#app{
  position:fixed;
  inset:0;
  display:flex;
  flex-direction:column;
  background:
    radial-gradient(1200px 700px at 15% -10%, #6a2ecf 0%, rgba(106,46,207,0) 60%),
    radial-gradient(900px 600px at 100% 0%, #1b6ad0 0%, rgba(27,106,208,0) 55%),
    radial-gradient(1000px 800px at 50% 120%, #2b1065 0%, rgba(43,16,101,0) 65%),
    linear-gradient(160deg, #1b1040 0%, #241153 45%, #150a33 100%);
  overflow:hidden;
}

#app::after{
  content:"";
  position:absolute; inset:-20%;
  background:
    repeating-linear-gradient(115deg, rgba(255,255,255,.035) 0 2px, rgba(255,255,255,0) 2px 26px);
  pointer-events:none;
  animation: slide 18s linear infinite;
}
@keyframes slide{ to{ transform:translate3d(120px,120px,0); } }

/* ---------- экраны ---------- */
.screen{
  position:relative;
  z-index:1;
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
}

.screen--start{ align-items:center; justify-content:flex-start; padding:clamp(10px, 1vw, 16px); overflow-y:auto; }
/* авто-отступы: содержимое по центру, но при нехватке места всё доступно прокруткой */
.screen--start > .brand{ margin-top:auto; }
.screen--start > .menu{ margin-bottom:auto; }
.screen--game{ padding:clamp(9px, 1vw, 16px) clamp(10px, 1.4vw, 20px) clamp(12px, 1.2vw, 18px); gap:clamp(8px, .9vw, 14px); }

/* ============================================================
   ФОН-УКРАШЕНИЯ МЕНЮ
   ============================================================ */
.bg-deco{ position:fixed; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.blob{ position:absolute; border-radius:50%; filter:blur(2px); opacity:.35; }
.blob--1{ width:260px;height:260px; left:-70px; top:8%;  background:radial-gradient(circle at 35% 30%, #ff9ad5, #a0217c); animation: float1 11s ease-in-out infinite; }
.blob--2{ width:200px;height:200px; right:-60px; top:22%; background:radial-gradient(circle at 35% 30%, #8be9ff, #1565c0); animation: float2 13s ease-in-out infinite; }
.blob--3{ width:320px;height:320px; right:8%; bottom:-140px; background:radial-gradient(circle at 35% 30%, #ffe98a, #e07000); animation: float1 15s ease-in-out infinite reverse; }
@keyframes float1{ 50%{ transform:translate(24px,-26px) scale(1.06); } }
@keyframes float2{ 50%{ transform:translate(-30px,20px) scale(1.08); } }

.spark{ position:absolute; color:#fff8b0; font-size:26px; opacity:.8; text-shadow:0 0 12px #ffd23f; animation: twinkle 3.4s ease-in-out infinite; }
.spark--1{ left:12%; top:16%; }
.spark--2{ left:84%; top:12%; animation-delay:.6s; }
.spark--3{ left:20%; bottom:14%; animation-delay:1.1s; }
.spark--4{ left:74%; bottom:20%; animation-delay:1.7s; }
@keyframes twinkle{ 0%,100%{ transform:scale(.7) rotate(0); opacity:.35; } 50%{ transform:scale(1.15) rotate(18deg); opacity:1; } }

/* ============================================================
   ЛОГОТИП
   ============================================================ */
.brand{
  position:relative; z-index:2;
  display:flex; align-items:center; gap:clamp(12px, 1.4vw, 18px);
  margin-bottom:clamp(11px, 1.4vh, 18px);
  animation: pop .5s cubic-bezier(.2,1.4,.4,1) both;
}
.brand__logo{
  width:clamp(64px, 6.4vw, 90px); height:clamp(64px, 6.4vw, 90px); flex:0 0 auto;
  display:grid; place-items:center;
  border-radius:clamp(18px, 1.8vw, 26px);
  background:linear-gradient(180deg, var(--yellow) 0%, var(--orange) 100%);
  border:4px solid var(--line);
  box-shadow: 0 6px 0 rgba(0,0,0,.45), inset 0 6px 0 rgba(255,255,255,.35);
  transform: rotate(-6deg);
}
.brand__logo .brand__star{
  width:74%; height:74%;
  filter:drop-shadow(0 2px 0 rgba(0,0,0,.35));
  animation: starTwinkle 3.2s ease-in-out infinite;
}
.brand__star-shape{
  fill:url(#brandStar);
  stroke:var(--line); stroke-width:7;
  stroke-linejoin:round; stroke-linecap:round;
}
.brand__sparkle{ fill:var(--line); opacity:.5; }
@keyframes starTwinkle{
  0%, 100%{ transform:rotate(0deg) scale(1); }
  50%{ transform:rotate(6deg) scale(1.06); }
}
@media (prefers-reduced-motion: reduce){
  .brand__logo .brand__star{ animation:none; }
}
.brand__title{
  margin:0;
  font-family:var(--font-black);
  font-size:clamp(29px, 4.7vw, 64px);
  line-height:.95;
  letter-spacing:.015em;
  font-style:italic;
  color:#fff;
  text-shadow:
    0 3px 0 #b02a7a, 0 6px 0 rgba(0,0,0,.45),
    0 0 22px rgba(255,210,63,.45);
}
.brand__sub{
  margin:5px 0 0;
  font-size:clamp(12px, 1.25vw, 17px);
  font-weight:700;
  letter-spacing:.04em;
  color:#c9b8ff;
  text-transform:uppercase;
}

/* ============================================================
   МЕНЮ
   ============================================================ */
.menu{
  position:relative; z-index:2;
  width:min(1190px, 100%);
  display:grid; gap:clamp(12px, 1.45vw, 22px);
  grid-template-columns:minmax(175px,1fr) minmax(420px,590px) minmax(175px,1fr);
  grid-template-areas:"answers card controls";
  align-items:center;
  animation: pop .55s cubic-bezier(.2,1.3,.4,1) .05s both;
}
@keyframes pop{ from{ transform:scale(.85) translateY(14px); opacity:0; } to{ transform:none; opacity:1; } }

.card{
  position:relative;
  border-radius:clamp(24px, 2.2vw, 32px);
  border:4px solid var(--line);
  background:linear-gradient(180deg, var(--panel-2) 0%, var(--panel) 55%, #1d1442 100%);
  box-shadow:
    0 12px 0 rgba(0,0,0,.45),
    inset 0 6px 0 rgba(255,255,255,.12),
    inset 0 -10px 0 rgba(0,0,0,.22);
  padding:clamp(17px, 2vw, 28px) clamp(17px, 2.1vw, 30px) clamp(15px, 1.7vw, 24px);
}
.menu__card{ grid-area:card; display:flex; flex-direction:column; gap:clamp(10px, 1.2vw, 16px); }

.menu__hero{ display:flex; align-items:center; justify-content:center; gap:clamp(9px, 1.3vw, 16px); }
.hero-chip, .monster-chip{
  display:flex; align-items:center; gap:clamp(6px, .7vw, 10px);
  padding:clamp(5px, .6vw, 8px) clamp(10px, 1vw, 14px) clamp(5px, .6vw, 8px) clamp(5px, .6vw, 8px);
  border-radius:999px;
  border:3px solid var(--line);
  background:rgba(0,0,0,.28);
  font-weight:800; font-size:clamp(13px, 1.2vw, 17px);
}
.monster-chip{ padding:clamp(5px, .6vw, 8px) clamp(5px, .6vw, 8px) clamp(5px, .6vw, 8px) clamp(10px, 1vw, 14px); flex-direction:row-reverse; }
.hero-chip__face{
  width:clamp(34px, 3.3vw, 44px); height:clamp(34px, 3.3vw, 44px); border-radius:50%;
  border:3px solid var(--line);
  background:radial-gradient(circle at 35% 30%, #fff3b0, var(--yellow) 45%, var(--orange));
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.22);
  display:block; flex:0 0 auto;
  overflow:hidden;
}
.monster-chip__face{
  width:clamp(32px, 3vw, 42px); height:clamp(32px, 3vw, 42px); border-radius:clamp(11px, 1vw, 14px);
  border:3px solid var(--line);
  background:radial-gradient(circle at 35% 30%, #c9a6ff, var(--purple) 45%, #5b21c9);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.22);
}
.menu__vs{
  font-family:var(--font-black); font-style:italic; font-size:clamp(12px, 1.1vw, 16px);
  color:#ffd8ee; text-transform:uppercase;
  transform:rotate(-4deg);
}

.menu__tagline{
  margin:0; text-align:center;
  font-size:clamp(15px, 1.42vw, 19px); line-height:1.55; color:#e6ddff;
}
.menu__tagline b{ color:var(--yellow); }

.menu__stats{
  display:grid; grid-template-columns:repeat(3, 1fr); gap:clamp(8px, 1vw, 12px);
}
.stat{
  display:flex; flex-direction:column; align-items:center; gap:3px;
  padding:clamp(10px, 1.2vw, 15px) clamp(6px, .8vw, 10px); border-radius:18px;
  background:rgba(0,0,0,.3);
  border:3px solid rgba(0,0,0,.4);
  box-shadow: inset 0 4px 0 rgba(255,255,255,.08);
}
.stat__value{ font-family:var(--font-black); font-size:clamp(22px, 1.9vw, 30px); font-style:italic; color:var(--yellow); }
.stat__label{ font-size:clamp(10px, .88vw, 12.5px); text-transform:uppercase; letter-spacing:.04em; color:#bcaef0; text-align:center; font-weight:700; }
.stat__icon{ font-size:clamp(18px, 1.65vw, 24px); }

.menu__actions{ display:flex; flex-direction:column; gap:clamp(9px, 1vw, 13px); }
.menu__row{ display:flex; gap:clamp(7px, .8vw, 11px); flex-wrap:wrap; justify-content:center; }
.menu__power{
  margin:0; padding:7px 12px; border-radius:12px;
  color:#e8dcff; background:#1a123d8c;
  font-size:clamp(12px, 1vw, 14px); line-height:1.4; text-align:center;
}
.menu__power strong{ color:var(--yellow); }

.menu-guide{
  min-width:0; padding:clamp(12px, 1.4vw, 20px);
  border:2px solid #bba7ff34; border-radius:20px;
  background:linear-gradient(165deg,#3a2980e6,#23184dea);
  box-shadow:0 6px 0 #120b2b80, inset 0 2px 0 #ffffff0e;
}
.menu-guide--answers{ grid-area:answers; }
.menu-guide--controls{ grid-area:controls; }
.menu-guide__title{
  display:flex; align-items:center; gap:8px;
  margin:0 0 12px; color:#fff; font-family:var(--font-black); font-style:italic;
  font-size:clamp(16px, 1.42vw, 21px); line-height:1.2;
}
.menu-guide__list{
  list-style:none; margin:0; padding:0; display:grid; gap:6px;
  font-size:clamp(12px, 1.04vw, 14px); line-height:1.4; color:#ede5ff;
}
.menu-guide__list li{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  min-width:0; padding:6px 8px; border-radius:8px; background:#140d32a0;
}
.menu-guide--answers li{ flex-wrap:nowrap; }
.menu-guide--controls li{ justify-content:space-between; }
.menu-guide__list strong{
  min-width:30px; font-family:var(--font-black); font-style:italic; font-size:20px;
}
.menu-guide__reward{ color:var(--yellow); }
.menu-guide__penalty{ color:#ff9db8; }
kbd{
  display:inline-block; padding:1px 4px; border:1px solid #d0c1ff50; border-radius:4px;
  background:#ffffff13; color:#fff; font:700 .85em var(--font); white-space:nowrap;
}
.menu-guide p{
  margin:9px 0 0; color:#d9ccff;
  font-size:clamp(12px, 1vw, 14px); line-height:1.45;
}
.touch-hint{ display:none; }
body.touch .touch-hint{ display:block; }

@media (max-width: 1019px){
  .menu{
    width:min(830px,100%); grid-template-columns:minmax(0,1fr) minmax(175px,225px);
    grid-template-areas:"card answers" "card controls"; align-items:start;
  }
}
@media (max-width: 720px){
  .menu{
    width:min(580px,100%); grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-areas:"card card" "answers controls";
  }
  .brand__sub{ line-height:1.35; }
}
@media (max-width: 370px){
  .menu{ grid-template-columns:minmax(0,1fr); grid-template-areas:"card" "answers" "controls"; }
}

/* ============================================================
   КНОПКИ
   ============================================================ */
.btn{
  position:relative;
  font-family:var(--font-black);
  font-style:italic;
  letter-spacing:.5px;
  font-size:clamp(16px, 1.5vw, 21px);
  color:#fff;
  padding:clamp(12px, 1.4vw, 17px) clamp(18px, 2vw, 28px);
  border-radius:20px;
  border:4px solid var(--line);
  background:linear-gradient(180deg, #6f5bd6, #4b33a8);
  box-shadow: var(--shadow-btn), inset 0 5px 0 rgba(255,255,255,.25), inset 0 -7px 0 rgba(0,0,0,.22);
  cursor:pointer;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
  text-shadow:0 2px 0 rgba(0,0,0,.35);
}
.btn:hover{ filter:brightness(1.07); transform:translateY(-2px); box-shadow:0 9px 0 rgba(0,0,0,.45), inset 0 5px 0 rgba(255,255,255,.25), inset 0 -7px 0 rgba(0,0,0,.22); }
.btn:active{ transform:translateY(4px); box-shadow:0 3px 0 rgba(0,0,0,.45), inset 0 5px 0 rgba(255,255,255,.2), inset 0 -4px 0 rgba(0,0,0,.22); }
.btn:focus-visible{ outline:3px solid #fff; outline-offset:3px; }

.btn--play{
  font-size:clamp(25px, 2.4vw, 33px);
  padding:clamp(15px, 1.5vw, 21px) clamp(24px, 2.2vw, 32px);
  background:linear-gradient(180deg, var(--yellow) 0%, var(--yellow-2) 52%, var(--orange) 100%);
  color:#3b2200;
  text-shadow:0 2px 0 rgba(255,255,255,.45);
  box-shadow: 0 8px 0 #a04b00, inset 0 6px 0 rgba(255,255,255,.5), inset 0 -9px 0 rgba(160,75,0,.35);
  animation: pulsePlay 2.6s ease-in-out infinite;
}
.btn--play:hover{ animation-play-state:paused; }
@keyframes pulsePlay{ 50%{ transform:translateY(-2px) scale(1.015); } }

.btn--secondary{
  background:linear-gradient(180deg, #4de2ff, #0aa9dd);
  color:#04313f;
  text-shadow:0 2px 0 rgba(255,255,255,.4);
  box-shadow: 0 7px 0 #086a8c, inset 0 5px 0 rgba(255,255,255,.45), inset 0 -7px 0 rgba(0,0,0,.18);
}

/* ---------- кнопка магазина в меню ---------- */
.btn--shop{
  display:flex; align-items:center; justify-content:center; gap:clamp(8px, .9vw, 12px);
  font-size:clamp(17px, 1.6vw, 23px); padding:clamp(12px, 1.3vw, 17px) clamp(16px, 1.8vw, 24px);
  background:linear-gradient(180deg, #ff9ad5 0%, #f13d9b 52%, #c2156d 100%);
  color:#fff;
  text-shadow:0 2px 0 rgba(102,0,48,.5);
  box-shadow: 0 7px 0 #8d0c4c, inset 0 5px 0 rgba(255,255,255,.42), inset 0 -7px 0 rgba(0,0,0,.2);
  overflow:hidden;
}
.btn--shop::before{
  content:"";
  position:absolute; top:-60%; left:-30%;
  width:42%; height:220%;
  background:linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.3), rgba(255,255,255,0));
  transform:rotate(18deg);
  animation: shopShine 4.2s ease-in-out infinite;
  pointer-events:none;
}
@keyframes shopShine{
  0%, 62%{ left:-45%; }
  86%, 100%{ left:120%; }
}
.btn-shop__paw{ font-size:clamp(22px, 2.1vw, 28px); font-style:normal; filter:drop-shadow(0 2px 0 rgba(0,0,0,.28)); }
.btn-shop__label{ letter-spacing:.3px; }
.btn-shop__count{
  font-style:normal; font-family:var(--font); font-size:clamp(11px, .95vw, 13px); font-weight:900;
  letter-spacing:0; padding:4px 9px; border-radius:999px;
  color:#ffe8f6; background:rgba(0,0,0,.32);
  border:2px solid rgba(0,0,0,.3);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.14);
}
.btn--shop.is-complete .btn-shop__count{
  color:#7a3b00; background:linear-gradient(180deg,#fff7c2,#ffd23f);
  animation: countGlow 1.8s ease-in-out infinite;
}
@keyframes countGlow{ 50%{ box-shadow:0 0 12px rgba(255,230,120,.9); } }

/* ============================================================
   МАГАЗИН ГЕРОЕВ
   ============================================================ */
.modal--shop{ align-items:flex-start; padding:clamp(12px, 1.5vw, 24px); }
.shop{
  position:relative;
  width:min(1280px, 100%);
  margin:auto;
  padding:clamp(16px, 1.9vw, 28px);
  border-radius:28px;
  border:5px solid var(--line);
  background:
    radial-gradient(700px 320px at 12% -6%, rgba(255,120,200,.2), rgba(255,120,200,0) 70%),
    radial-gradient(800px 420px at 100% 0%, rgba(77,226,255,.16), rgba(77,226,255,0) 65%),
    linear-gradient(180deg, #372680 0%, #281c5c 42%, #190f3f 100%);
  box-shadow: 0 16px 0 rgba(0,0,0,.45), inset 0 6px 0 rgba(255,255,255,.14), inset 0 -12px 0 rgba(0,0,0,.26);
  animation: qIn .32s cubic-bezier(.2,1.4,.4,1) both;
}
.shop__head{ display:flex; align-items:center; gap:clamp(10px, 1.1vw, 16px); }
.shop__heading{ flex:1; min-width:0; }
.shop__title{
  margin:0;
  font-family:var(--font-black); font-style:italic;
  font-size:clamp(25px, 3.1vw, 42px); line-height:1;
  text-shadow:0 3px 0 rgba(0,0,0,.45), 0 0 20px rgba(255,141,205,.3);
}
.shop__wallet{
  display:flex; align-items:center; gap:clamp(7px, .7vw, 10px); flex:0 0 auto;
  padding:clamp(8px, .8vw, 12px) clamp(13px, 1.2vw, 18px) clamp(8px, .8vw, 12px) clamp(10px, .9vw, 14px);
  border-radius:16px; border:3px solid var(--line);
  background:linear-gradient(180deg, #0f4f78, #0a3355);
  box-shadow:0 4px 0 rgba(0,0,0,.42), inset 0 4px 0 rgba(255,255,255,.18);
}
.shop__wallet .gem-ico{ width:clamp(17px, 1.5vw, 22px); height:clamp(19px, 1.7vw, 25px); }
.shop__wallet-value{
  font-family:var(--font-black); font-style:italic; font-size:clamp(21px, 1.8vw, 27px);
  color:#dffaff; min-width:32px; text-align:right;
}
.shop__wallet.pop{ animation: gemPop .45s ease; }
.shop__close{
  flex:0 0 auto; width:clamp(42px, 3.6vw, 52px); height:clamp(42px, 3.6vw, 52px);
  display:grid; place-items:center;
  border-radius:clamp(14px, 1.2vw, 17px); border:3px solid var(--line);
  background:linear-gradient(180deg,#ff7a89,#d21f38);
  color:#fff; font-size:clamp(18px, 1.55vw, 23px); font-weight:900; cursor:pointer;
  box-shadow:0 4px 0 #821023, inset 0 3px 0 rgba(255,255,255,.3);
  transition:transform .08s ease, filter .15s ease;
}
.shop__close:hover{ filter:brightness(1.1); }
.shop__close:active{ transform:translateY(3px); box-shadow:0 1px 0 #821023; }
.shop__lead{
  margin:clamp(10px, 1vw, 14px) 0 clamp(13px, 1.2vw, 19px); max-width:900px;
  font-size:clamp(13px, 1.15vw, 17px); line-height:1.5; color:#d5c9ff; font-weight:600;
}
.shop__lead b{ color:var(--yellow); }

.shop__grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:clamp(12px, 1.4vw, 20px);
}

/* ---------- карточка героя ---------- */
.hero-card{
  position:relative;
  display:flex; flex-direction:column;
  min-width:0;
  border-radius:22px;
  border:4px solid var(--line);
  background:linear-gradient(180deg, #4a379c 0%, #302268 58%, #241852 100%);
  box-shadow:0 8px 0 rgba(0,0,0,.38), inset 0 4px 0 rgba(255,255,255,.12);
  overflow:hidden;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.hero-card:hover{
  transform:translateY(-3px);
  box-shadow:0 11px 0 rgba(0,0,0,.38), inset 0 4px 0 rgba(255,255,255,.16), 0 0 26px rgba(150,110,255,.25);
}
.hero-card.is-selected{
  border-color:#2a7a42;
  box-shadow:0 8px 0 rgba(0,0,0,.38), inset 0 4px 0 rgba(255,255,255,.16), 0 0 24px rgba(92,240,122,.35);
}
.hero-card.shake{ animation: heroCardDeny .4s ease; }
@keyframes heroCardDeny{
  20%{ transform:translateX(-6px) rotate(-.4deg); }
  45%{ transform:translateX(6px) rotate(.4deg); }
  70%{ transform:translateX(-3px); }
  90%{ transform:translateX(2px); }
}
.hero-card__art{ position:relative; aspect-ratio:4 / 3; background:#1d1245; overflow:hidden; }
.hero-card__canvas{ display:block; width:100%; height:100%; object-fit:contain; }
.hero-card__tier{
  position:absolute; left:clamp(8px, .8vw, 12px); top:clamp(8px, .8vw, 12px); z-index:2;
  font-family:var(--font-black); font-style:italic; font-size:clamp(9.5px, .85vw, 11.5px);
  letter-spacing:.08em; text-transform:uppercase;
  padding:4px 10px; border-radius:999px; border:2px solid rgba(13,10,28,.85);
  background:linear-gradient(180deg,#b7a5ff,#7357d6);
  color:#fff; text-shadow:0 1px 0 rgba(0,0,0,.4);
  box-shadow:0 3px 0 rgba(0,0,0,.32);
}
.hero-card--legend .hero-card__tier{ background:linear-gradient(180deg,#fff3a8,#ffb703); color:#4a2600; text-shadow:0 1px 0 rgba(255,255,255,.5); }
.hero-card__owned{
  position:absolute; right:clamp(8px, .8vw, 12px); top:clamp(8px, .8vw, 12px); z-index:2;
  display:flex; align-items:center; gap:4px;
  font-size:clamp(10px, .88vw, 12px); font-weight:900; letter-spacing:.02em;
  padding:4px 9px; border-radius:999px; border:2px solid rgba(13,10,28,.8);
  background:linear-gradient(180deg,#74ff9e,#16b45f); color:#02310f;
  box-shadow:0 3px 0 rgba(0,0,0,.3);
}
.hero-card__body{
  display:flex; flex-direction:column; gap:clamp(6px, .6vw, 9px); flex:1;
  padding:clamp(11px, 1.1vw, 16px) clamp(13px, 1.2vw, 18px) clamp(13px, 1.2vw, 18px);
}
.hero-card__title{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.hero-card__name{
  margin:0;
  font-family:var(--font-black); font-style:italic;
  font-size:clamp(22px, 1.95vw, 28px); line-height:1.05; letter-spacing:.2px;
  text-shadow:0 2px 0 rgba(0,0,0,.4);
}
.hero-card__breed{
  flex:0 0 auto; font-size:clamp(9px, .8vw, 11px); font-weight:900; text-transform:uppercase; letter-spacing:.04em;
  color:#d8ccff; background:rgba(0,0,0,.3); border:2px solid rgba(0,0,0,.25);
  border-radius:999px; padding:3px 8px; white-space:nowrap;
}
.hero-card__desc{
  margin:0; flex:1;
  font-size:clamp(12px, 1.02vw, 14.5px); line-height:1.42; font-weight:600; color:#c9bdf2;
}
.hero-card__costume{
  margin:0; color:#e8d8fc; font-size:12px; font-weight:700;
}
.hero-card__power{
  display:grid; gap:4px; margin:2px 0; padding:9px 10px;
  border-radius:11px; border-left:3px solid var(--hero-accent, var(--yellow));
  background:#171031a6; font-size:13px; line-height:1.4; color:#eee7ff;
}
.hero-card__power strong{ color:#fff; }
.hero-card__power-type{
  display:block; color:#d9c7fb; font-size:10px; letter-spacing:.045em; text-transform:uppercase;
}
.hero-card__power--active{ background:#34247c; }
.hero-card__btn{
  width:100%;
  display:flex; align-items:center; justify-content:center; gap:7px;
  padding:clamp(10px, .95vw, 14px) 10px; margin-top:2px;
  border-radius:14px; border:3px solid var(--line);
  font-family:var(--font-black); font-style:italic; font-size:clamp(15px, 1.3vw, 18px); letter-spacing:.3px;
  cursor:pointer; text-shadow:0 2px 0 rgba(0,0,0,.22);
  box-shadow:0 5px 0 rgba(0,0,0,.38), inset 0 4px 0 rgba(255,255,255,.2);
  transition:transform .08s ease, filter .14s ease;
}
.hero-card__btn:hover{ filter:brightness(1.08); }
.hero-card__btn:active{ transform:translateY(3px); box-shadow:0 2px 0 rgba(0,0,0,.38); }
.hero-card__btn .gem-ico{ width:clamp(12px, 1.05vw, 15px); height:clamp(13px, 1.15vw, 16px); filter:drop-shadow(0 0 3px rgba(77,226,255,.7)); }
.hero-card__btn.is-buy{
  background:linear-gradient(180deg,#ffe375,#ffb703 55%,#f89100);
  color:#3f2400;
}
.hero-card__btn.is-short{
  background:linear-gradient(180deg,#6f6592,#4a3f6d);
  color:#d7cfe9;
}
.hero-card__btn.is-owned{
  background:linear-gradient(180deg,#63e8ff,#0aa9dd);
  color:#04313f;
  text-shadow:0 2px 0 rgba(255,255,255,.35);
}
.hero-card__btn.is-selected{
  background:linear-gradient(180deg,#83ffa6,#16b45f);
  color:#02310f; text-shadow:0 2px 0 rgba(255,255,255,.35);
  cursor:default;
}
.hero-card__btn:disabled{ cursor:default; filter:none; }
.hero-card__btn.is-selected:active{ transform:none; box-shadow:0 5px 0 rgba(0,0,0,.38); }
.hero-card__short{
  min-height:15px; text-align:center;
  font-size:clamp(10.5px, .9vw, 12.5px); font-weight:800; color:#ffb3bf;
}
.hero-card__short:empty{ display:none; }

/* особая карточка Джулианы */
.hero-card--legend{
  border-color:#5b3a00;
  box-shadow:0 8px 0 #5a3d00, inset 0 4px 0 rgba(255,255,255,.2), 0 0 34px rgba(255,204,80,.32);
}
.hero-card--legend:hover{
  box-shadow:0 11px 0 #5a3d00, inset 0 4px 0 rgba(255,255,255,.22), 0 0 40px rgba(255,210,90,.45);
}
.hero-card--legend .hero-card__art::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.45) 0 2px, transparent 3px),
    radial-gradient(circle at 16% 72%, rgba(255,255,255,.35) 0 1.5px, transparent 3px),
    radial-gradient(circle at 72% 78%, rgba(255,244,160,.4) 0 2px, transparent 3px);
  animation: legendTwinkle 3s ease-in-out infinite;
}
@keyframes legendTwinkle{ 50%{ opacity:.35; } }
.hero-card--legend .hero-card__name{
  font-size:clamp(25px, 2.1vw, 31px);
  background:linear-gradient(180deg,#fff7c0,#ffd23f 55%,#ff9d00);
  -webkit-background-clip:text; background-clip:text; color:transparent;
  -webkit-text-stroke:.6px rgba(88,48,0,.65);
  filter:drop-shadow(0 2px 0 rgba(0,0,0,.35));
}
.hero-card--legend .hero-card__desc{ color:#efe2b8; }
.hero-card--legend .hero-card__btn.is-buy{
  background:linear-gradient(180deg,#fff6a8,#ffcf3a 48%,#ff9b00);
  box-shadow:0 5px 0 #915300, inset 0 4px 0 rgba(255,255,255,.55);
}

@media (min-width: 900px){
  .hero-card--legend{ grid-column:1 / -1; flex-direction:row; align-items:stretch; }
  .hero-card--legend .hero-card__art{ flex:0 0 47%; aspect-ratio:auto; min-height:clamp(300px, 25vw, 360px); }
  .hero-card--legend .hero-card__body{ flex:1; padding:clamp(26px, 2.4vw, 38px); justify-content:center; gap:clamp(9px, .9vw, 13px); }
  .hero-card--legend .hero-card__name{ font-size:clamp(34px, 3.1vw, 46px); }
  .hero-card--legend .hero-card__breed{ font-size:clamp(11px, 1vw, 13px); padding:4px 11px; }
  .hero-card--legend .hero-card__desc{ flex:0 1 auto; font-size:clamp(15px, 1.3vw, 18px); line-height:1.55; max-width:620px; }
  .hero-card--legend .hero-card__btn{ max-width:360px; margin-top:8px; font-size:clamp(16px, 1.4vw, 19px); padding:12px; }
}

.shop-starter{
  display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center;
  gap:12px; padding:12px; margin:0 0 16px;
  border:2px solid #d8c3ff38; border-radius:17px; background:#211448a8;
}
.shop-starter canvas{ width:54px; height:54px; border:2px solid var(--line); border-radius:13px; }
.shop-starter h3{ margin:0; font-size:18px; }
.shop-starter h3 span{ color:#d7caff; margin-inline-start:6px; font-size:12px; font-weight:650; }
.shop-starter p{ margin:4px 0 0; color:#eee7ff; font-size:13px; line-height:1.4; }
.shop-starter p strong{ color:var(--yellow); }
.shop-starter p.shop-starter__costume{ color:#d7caff; font-size:12px; }
.shop-starter .btn{ font-size:13px; }
.shop-starter .btn:disabled{
  opacity:.68; cursor:default; filter:none; transform:none;
  box-shadow:0 4px 0 rgba(0,0,0,.35), inset 0 4px 0 rgba(255,255,255,.12);
}

.shop-toast{
  position:fixed; left:50%; bottom:26px; z-index:80;
  transform:translateX(-50%);
  pointer-events:none;
  max-width:min(480px, calc(100vw - 32px));
  padding:clamp(11px, 1vw, 15px) clamp(18px, 1.6vw, 24px);
  border-radius:16px; border:4px solid var(--line);
  background:linear-gradient(180deg,#6df58a,#12b862);
  color:#03330f; font-weight:900; font-size:clamp(14px, 1.2vw, 17px); text-align:center;
  text-shadow:0 1px 0 rgba(255,255,255,.4);
  box-shadow:0 7px 0 rgba(0,0,0,.4), inset 0 3px 0 rgba(255,255,255,.35);
  animation: toastIn .28s cubic-bezier(.2,1.4,.4,1) both;
}
.shop-toast.is-error{
  background:linear-gradient(180deg,#ff8b97,#e02b40);
  color:#fff; text-shadow:0 2px 0 rgba(0,0,0,.3);
}
.shop-toast.is-gold{
  background:linear-gradient(180deg,#fff5a8,#ffc21a);
  color:#4a2600; text-shadow:0 1px 0 rgba(255,255,255,.5);
}
@keyframes toastIn{
  from{ transform:translate(-50%, 18px) scale(.94); opacity:0; }
  to{ transform:translate(-50%, 0) scale(1); opacity:1; }
}
.btn--ghost{
  font-size:clamp(14.5px, 1.15vw, 18px); padding:clamp(10px, 1.1vw, 14px) clamp(16px, 1.5vw, 22px); border-radius:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  box-shadow: 0 5px 0 rgba(0,0,0,.4), inset 0 4px 0 rgba(255,255,255,.14);
  font-style:normal;
}
.btn--ghost:hover{ background:linear-gradient(180deg, rgba(255,255,255,.24), rgba(255,255,255,.1)); }
.btn--green{ background:linear-gradient(180deg, var(--green), var(--green-2)); color:#03330f; text-shadow:0 2px 0 rgba(255,255,255,.4); box-shadow:0 7px 0 #0a6b39, inset 0 5px 0 rgba(255,255,255,.4), inset 0 -7px 0 rgba(0,0,0,.2); }
.btn--red{ background:linear-gradient(180deg, #ff7a89, var(--red)); color:#40060d; text-shadow:0 2px 0 rgba(255,255,255,.4); box-shadow:0 7px 0 #8f1727, inset 0 5px 0 rgba(255,255,255,.35), inset 0 -7px 0 rgba(0,0,0,.2); }
.btn--sm{ font-size:clamp(14.5px, 1.15vw, 18px); padding:clamp(10px, 1.1vw, 14px) clamp(16px, 1.5vw, 22px); border-radius:16px; }

/* ============================================================
   HUD
   ============================================================ */
.hud{
  display:flex; align-items:center; justify-content:space-between; gap:clamp(8px, .9vw, 14px);
  flex-wrap:wrap;
}
.hud__group{ display:flex; align-items:center; gap:clamp(7px, .8vw, 12px); }

.hud__badge{
  display:flex; align-items:baseline; gap:clamp(5px, .55vw, 8px);
  padding:clamp(6px, .65vw, 9px) clamp(13px, 1.2vw, 18px); border-radius:15px;
  border:3px solid var(--line);
  background:linear-gradient(180deg, #6f5bd6, #3d2a91);
  box-shadow:0 4px 0 rgba(0,0,0,.42), inset 0 4px 0 rgba(255,255,255,.2);
}
.hud__badge-label{ font-size:clamp(10px, .9vw, 12.5px); font-weight:800; letter-spacing:.08em; color:#d7caff; }
.hud__badge-value{ font-family:var(--font-black); font-style:italic; font-size:clamp(20px, 1.75vw, 26px); color:var(--yellow); }

.hud__lives{ display:flex; gap:clamp(5px, .5vw, 7px); padding:clamp(6px, .6vw, 9px) clamp(10px, .9vw, 14px); border-radius:15px; background:rgba(0,0,0,.32); border:3px solid rgba(0,0,0,.42); }
.life{ width:clamp(20px, 1.8vw, 26px); height:clamp(18px, 1.6vw, 23px); display:grid; place-items:center; }
.heart{
  display:block; width:clamp(16px, 1.45vw, 21px); height:clamp(14px, 1.3vw, 19px); position:relative;
  background:var(--red);
  transform:rotate(-45deg);
  border-radius:3px 0 3px 3px;
  box-shadow:0 0 8px rgba(255,74,94,.6);
  transition:.2s;
}
.heart::before, .heart::after{
  content:""; position:absolute; background:inherit; border-radius:50%;
}
.heart::before{ width:100%; height:var(--heart-h, 100%); top:-50%; left:0; }
.heart::after{ width:100%; height:var(--heart-h, 100%); top:0; left:50%; }
.life.empty .heart{ background:#3d3566; box-shadow:none; transform:rotate(-45deg) scale(.85); }
.life.break .heart{ animation: heartBreak .7s ease; }
@keyframes heartBreak{
  0%{ transform:rotate(-45deg) scale(1); background:#ff4a5e; }
  35%{ transform:rotate(-45deg) scale(1.55); background:#fff; box-shadow:0 0 16px #ff4a5e; }
  100%{ transform:rotate(-45deg) scale(.85); background:#3d3566; box-shadow:none; }
}

/* ---------- мячи атаки ---------- */
.hud__balls{
  display:flex; align-items:center; gap:clamp(4px, .42vw, 6px);
  padding:clamp(6px, .6vw, 9px) clamp(9px, .8vw, 13px); border-radius:15px;
  background:rgba(0,0,0,.32); border:3px solid rgba(0,0,0,.42);
  transition:border-color .2s, box-shadow .2s;
}
.hud__balls.pop{ animation: ballsPop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes ballsPop{
  35%{ transform:scale(1.14); border-color:rgba(190,255,90,.8); box-shadow:0 0 18px rgba(170,255,80,.65); }
}
.hud__balls.deny{ animation: ballsDeny .35s ease; }
@keyframes ballsDeny{
  25%{ transform:translateX(-4px); border-color:rgba(255,74,94,.65); }
  55%{ transform:translateX(4px); }
  80%{ transform:translateX(-2px); }
}
.ball-ico{
  position:relative; width:clamp(15px, 1.35vw, 19px); height:clamp(15px, 1.35vw, 19px); border-radius:50%;
  background:radial-gradient(circle at 34% 27%, #f5ffb0 0 15%, #d4fa5d 16% 45%, #8edc36 46% 75%, #45a51d 76% 100%);
  box-shadow:0 0 7px rgba(190,255,90,.6), inset -1px -2px 0 rgba(15,72,16,.35);
  overflow:hidden; flex:0 0 auto;
  transition:opacity .2s, background .2s, box-shadow .2s;
}
.ball-ico::before, .ball-ico::after{
  content:""; position:absolute; top:1.5px; width:clamp(7px, .6vw, 9px); height:clamp(11px, .95vw, 14px);
  border:1.5px solid rgba(255,255,255,.9); border-radius:50%;
}
.ball-ico::before{ left:-3px; border-right-color:transparent; border-top-color:transparent; border-bottom-color:transparent; transform:rotate(14deg); }
.ball-ico::after{ right:-3px; border-left-color:transparent; border-top-color:transparent; border-bottom-color:transparent; transform:rotate(-14deg); }
.ball-ico.empty{
  background:radial-gradient(circle at 34% 27%, #4c456f 0 15%, #3a335c 16% 75%, #292343 76% 100%);
  box-shadow:none; opacity:.55;
}
.ball-ico.empty::before, .ball-ico.empty::after{ border-color:transparent; }
.hud__balls-count{
  min-width:28px; text-align:center;
  font-family:var(--font-black); font-style:italic; font-size:clamp(15px, 1.3vw, 19px);
  color:#d8ff8f; letter-spacing:-.02em;
}
.hud__balls.is-empty .hud__balls-count{ color:#ff8c99; }

.hud__gems{
  display:flex; align-items:center; gap:clamp(7px, .7vw, 10px);
  padding:clamp(6px, .6vw, 9px) clamp(13px, 1.2vw, 18px) clamp(6px, .6vw, 9px) clamp(10px, .9vw, 14px); border-radius:15px;
  border:3px solid var(--line);
  background:linear-gradient(180deg, #0f4f78, #0a3355);
  box-shadow:0 4px 0 rgba(0,0,0,.42), inset 0 4px 0 rgba(255,255,255,.18);
}
.hud__gems-value{ font-family:var(--font-black); font-style:italic; font-size:clamp(20px, 1.75vw, 26px); color:#dffaff; min-width:36px; text-align:right; }
.hud__gems.pop{ animation: gemPop .45s ease; }
@keyframes gemPop{ 40%{ transform:scale(1.16); } }

.gem-ico{
  width:clamp(18px, 1.55vw, 22px); height:clamp(20px, 1.75vw, 25px); display:inline-block;
  background:linear-gradient(180deg, #b8f6ff 0%, var(--cyan) 35%, var(--cyan-2) 70%, #075e93 100%);
  clip-path:polygon(50% 0%, 100% 34%, 50% 100%, 0% 34%);
  filter:drop-shadow(0 0 5px rgba(77,226,255,.75));
}
.gem-ico--big{ width:clamp(26px, 2.2vw, 32px); height:clamp(29px, 2.45vw, 36px); }

.icon-btn{
  width:clamp(44px, 3.9vw, 54px); height:clamp(44px, 3.9vw, 54px);
  display:grid; place-items:center;
  font-size:clamp(19px, 1.7vw, 23px);
  cursor:pointer;
  border-radius:15px;
  border:3px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.06));
  box-shadow:0 4px 0 rgba(0,0,0,.42), inset 0 4px 0 rgba(255,255,255,.14);
  color:#fff;
  transition:transform .08s ease;
}
.icon-btn:hover{ transform:translateY(-2px); }
.icon-btn:active{ transform:translateY(2px); }
.icon-btn:focus-visible{ outline:3px solid #fff; outline-offset:2px; }

.goal-bar{
  display:flex; align-items:center; column-gap:clamp(12px, 1.4vw, 20px); row-gap:6px;
  flex-wrap:wrap; justify-content:center;
  font-size:clamp(12px, 1.05vw, 15px); font-weight:700; color:#cdbffa;
}
.goal-bar b{ color:var(--yellow); }
.goal-bar__item--extra b{ color:#ff9aa6; }
@media (max-width: 1040px){ .goal-bar__item--extra{ display:none; } }
.hud-power{
  min-width:0; display:flex; align-items:center; justify-content:center; gap:6px;
  padding:4px 8px; border:1px solid #c9afff61; border-radius:10px;
  background:#1e154a; color:#f5eaff; font-size:clamp(11px, 1vw, 14px);
}
.hud-power > span:first-child{ color:var(--yellow); }
#hud-power-state:not(:empty){ color:#d6c7ff; font-variant-numeric:tabular-nums; }
.hud-power__cast{
  border:1px solid #b6a7ff; border-radius:7px; padding:5px 7px;
  font:inherit; font-weight:800;
  color:#fff; background:#6845ca; cursor:pointer;
}
.hud-power__cast:disabled{ background:#352861; color:#beb0e5; cursor:default; }
.hud-power__cast:focus-visible{ outline:2px solid #fff; outline-offset:2px; }

/* ============================================================
   ИГРОВОЕ ПОЛЕ
   ============================================================ */
.stage{
  flex:1; min-height:0;
  display:flex; align-items:center; justify-content:center;
  padding:4px;
}
#game{
  display:block;
  width:720px; height:528px; max-width:100%;
  border-radius:18px;
  border:5px solid var(--line);
  background:#241a45;
  box-shadow: 0 12px 0 rgba(0,0,0,.4), 0 0 40px rgba(139,92,246,.35);
  touch-action:none;
}


/* ---------- сенсорное управление ---------- */
.joystick, .touch-actions, .overview{ display:none; }
body.touch .keyboard-hint{ display:none; }
body.touch .screen--game{
  display:grid;
  grid-template:
    "hud hud hud" auto
    "power power power" auto
    "arena arena arena" minmax(0,1fr)
    "stick overview actions" auto / auto minmax(0,1fr) auto;
}
body.touch .hud{ grid-area:hud; }
body.touch .goal-bar{ grid-area:power; }
body.touch .stage{ grid-area:arena; min-width:0; }
body.touch .joystick{
  --stick-size:clamp(84px, 23vw, 108px);
  grid-area:stick; display:grid; place-items:center; place-self:center start;
  width:var(--stick-size); height:var(--stick-size); position:relative;
  border-radius:50%; border:3px solid #130c2f;
  background:
    radial-gradient(circle, transparent 45%, #ac91ff44 46% 47%, transparent 48%),
    radial-gradient(circle, #3f307c, #241850 72%);
  box-shadow:inset 0 4px 0 #ffffff20, 0 4px 0 #100922cc;
  touch-action:none; user-select:none; cursor:grab;
}
.joystick::before, .joystick::after{
  content:""; position:absolute; inset:8% 47%; border-block:3px solid #bda8ff8c;
}
.joystick::after{ inset:47% 8%; border:0; border-inline:3px solid #bda8ff8c; }
.joystick__knob{
  width:46%; aspect-ratio:1; border:3px solid #24154b; border-radius:50%; z-index:1;
  background:radial-gradient(circle at 36% 29%, #c9b7ff, #8871e6 50%, #5037a8 76%);
  box-shadow:inset 0 3px 0 #ffffff42, 0 3px 0 #120a2ed9;
  pointer-events:none;
  transform:translate(var(--stick-x,0), var(--stick-y,0));
}
.joystick.is-held .joystick__knob{
  box-shadow:inset 0 3px 0 #ffffff42, 0 0 12px #ac89ff76;
}
body.touch .touch-actions{
  grid-area:actions; display:flex; align-items:center; justify-content:flex-end;
  gap:7px; align-self:center;
}
.touch-actions button{ touch-action:manipulation; user-select:none; }
.touch-actions .touch-throw{
  position:relative; display:grid; place-items:center;
  width:clamp(57px, 14vw, 70px); height:clamp(57px, 14vw, 70px); padding:0;
  border-radius:20px; font-size:clamp(25px, 5vw, 33px);
  background:linear-gradient(180deg,#d0ff78,#52b428);
  color:#17350b;
  text-shadow:none;
  box-shadow:0 5px 0 #2e7a15, inset 0 4px 0 #ffffff66;
}
.touch-throw.is-empty{ filter:grayscale(.8); opacity:.72; }
.touch-throw__count{
  position:absolute; right:4px; bottom:3px; min-width:19px; padding:1px 4px;
  border-radius:7px; color:#f3ffe0; background:#203a1b;
  font-family:var(--font-black); font-size:12px; line-height:1.25;
}
.touch-actions .hud-power__cast{ min-height:44px; padding:7px; font-size:12px; }
.overview{
  grid-area:overview; width:min(100%, 106px); place-self:center;
  padding:4px 4px 2px; border:2px solid #aa92fa64; border-radius:11px;
  background:#231748; line-height:1;
}
body.touch .is-camera .overview{ display:grid; justify-items:center; gap:3px; }
.overview canvas{ display:block; width:100%; height:auto; border-radius:4px; }
.overview span{ font-size:10px; color:#d9caff; font-weight:750; padding-bottom:2px; }

.modal--rotate{ z-index:70; }
.rotate-card{ width:min(100%, 350px); text-align:center; }
.rotate-card h2{
  margin:11px 0 7px; font:italic 900 clamp(24px,6vw,33px)/1.1 var(--font-black);
}
.rotate-card h2:focus{ outline:none; }
.rotate-card p{ margin:0 0 15px; color:#e3d8ff; line-height:1.5; }
.rotate-card__icon{
  width:100px; height:82px; margin:auto; display:flex; align-items:center; justify-content:center; gap:8px;
}
.rotate-card__phone{
  width:41px; height:62px; transform:rotate(-24deg);
  border:4px solid #160f32; border-radius:10px;
  background:
    radial-gradient(circle at 63% 61%, #caff85 0 4px, transparent 5px),
    repeating-linear-gradient(0deg, transparent 0 9px, #a397ff42 9px 10px),
    repeating-linear-gradient(90deg, #3b2b81 0 9px, #9687ee 9px 10px);
  box-shadow:0 0 0 2px #bbaaff, 0 5px 0 #160f32;
}
.rotate-card__arrow{
  align-self:flex-start; font:900 44px/1 var(--font-black); color:var(--yellow);
  text-shadow:0 3px 0 #38254c;
}

/* ============================================================
   МОДАЛЬНЫЕ ОКНА
   ============================================================ */
.modal{
  position:fixed; inset:0; z-index:50;
  display:grid; place-items:safe center;
  padding:16px;
  background:radial-gradient(circle at 50% 40%, rgba(35,15,80,.72), rgba(8,4,20,.88));
  backdrop-filter: blur(3px);
  animation: fadeIn .18s ease both;
  overflow-y:auto;
}
@keyframes fadeIn{ from{ opacity:0; } to{ opacity:1; } }

/* ---------- карточка вопроса ---------- */
.q-card{
  width:min(700px, 100%);
  border-radius:28px;
  border:5px solid var(--line);
  background:linear-gradient(180deg, #3a2980 0%, #2b1f5c 40%, #1c1342 100%);
  box-shadow: 0 14px 0 rgba(0,0,0,.45), inset 0 6px 0 rgba(255,255,255,.14), inset 0 -12px 0 rgba(0,0,0,.25);
  padding:clamp(16px, 1.8vw, 24px);
  animation: qIn .3s cubic-bezier(.2,1.4,.4,1) both;
}
@keyframes qIn{ from{ transform:scale(.9) translateY(20px); opacity:0; } to{ transform:none; opacity:1; } }

.q-card__top{ display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:clamp(10px, 1vw, 14px); }
.q-reason{
  font-family:var(--font-black); font-style:italic; font-size:clamp(13px, 1.15vw, 16px);
  text-transform:uppercase; letter-spacing:.04em;
  padding:5px 13px; border-radius:999px;
  background:linear-gradient(180deg, var(--pink), #c2185b);
  border:3px solid var(--line);
  box-shadow:0 4px 0 rgba(0,0,0,.4);
}
.q-topic{
  font-family:var(--font-black); font-style:italic;
  font-size:clamp(12px, 1.05vw, 15px); color:var(--ink);
  padding:5px 13px; border-radius:999px;
  background:linear-gradient(180deg, var(--cyan), var(--cyan-2));
  border:3px solid var(--line);
  box-shadow:0 4px 0 rgba(0,0,0,.4);
  text-transform:uppercase; letter-spacing:.03em;
}

.q-timer{
  position:relative; height:clamp(26px, 2.3vw, 34px); border-radius:999px; overflow:hidden;
  border:3px solid var(--line); background:rgba(0,0,0,.42);
  margin-bottom:clamp(12px, 1.1vw, 16px);
}
.q-timer__fill{
  position:absolute; inset:0; width:100%;
  background:linear-gradient(180deg, var(--green), var(--green-2));
  transition: width .25s linear, background .3s;
}
.q-timer__num{
  position:absolute; inset:0; display:grid; place-items:center;
  font-family:var(--font-black); font-style:italic; font-size:clamp(14px, 1.2vw, 17px);
  text-shadow:0 2px 0 rgba(0,0,0,.55);
}
.q-timer.warn .q-timer__fill{ background:linear-gradient(180deg, var(--yellow), var(--orange)); }
.q-timer.danger .q-timer__fill{ background:linear-gradient(180deg, #ff7a89, var(--red)); }

.q-text{
  margin:0 0 clamp(14px, 1.3vw, 20px);
  font-size:clamp(18px, 2.5vw, 27px);
  line-height:1.4;
  font-weight:800;
  text-shadow:0 2px 0 rgba(0,0,0,.4);
}
.q-text:focus{ outline:none; }

/* ---------- «на кону сердце» (вопрос после атаки монстра) ---------- */
.q-stake{
  display:flex; align-items:center; gap:clamp(10px, .9vw, 14px);
  margin:0 0 12px;
  padding:clamp(9px, .9vw, 13px) clamp(13px, 1.2vw, 18px);
  border-radius:15px;
  border:3px solid rgba(255,74,94,.55);
  background:linear-gradient(180deg, rgba(255,74,94,.22), rgba(150,16,38,.2));
  box-shadow: inset 0 3px 0 rgba(255,255,255,.08);
  font-size:clamp(13.5px, 1.2vw, 16.5px); font-weight:800; color:#ffd5db; line-height:1.35;
}
.q-stake__heart{ flex:0 0 auto; width:clamp(20px, 1.8vw, 25px); height:clamp(18px, 1.6vw, 23px); display:grid; place-items:center; }
.q-stake--danger{ animation: stakePulse 1.4s ease-in-out infinite; }
@keyframes stakePulse{
  50%{ border-color:#ff4a5e; box-shadow:0 0 18px rgba(255,74,94,.55), inset 0 3px 0 rgba(255,255,255,.12); }
}

.q-options{ display:grid; gap:clamp(9px, .9vw, 13px); }
.q-opt{
  display:flex; align-items:center; gap:clamp(11px, 1vw, 15px);
  text-align:left;
  font-family:var(--font); font-size:clamp(16px, 1.4vw, 19px); font-weight:700; color:#fff;
  padding:clamp(12px, 1.15vw, 17px) clamp(13px, 1.2vw, 18px);
  border-radius:17px; border:4px solid var(--line);
  background:linear-gradient(180deg, #57439f, #3a2a7a);
  box-shadow:0 6px 0 rgba(0,0,0,.4), inset 0 4px 0 rgba(255,255,255,.14);
  cursor:pointer;
  transition:transform .08s ease, filter .15s ease;
}
.q-opt:hover{ filter:brightness(1.1); transform:translateY(-2px); }
.q-opt:active{ transform:translateY(3px); box-shadow:0 2px 0 rgba(0,0,0,.4); }
.q-opt:disabled{ cursor:default; }
.q-opt__key{
  flex:0 0 auto;
  width:clamp(30px, 2.7vw, 37px); height:clamp(30px, 2.7vw, 37px); display:grid; place-items:center;
  border-radius:11px; border:3px solid var(--line);
  background:linear-gradient(180deg, var(--yellow), var(--yellow-2));
  color:#3b2200; font-family:var(--font-black); font-size:clamp(15px, 1.3vw, 18px);
}
.q-opt--right{
  background:linear-gradient(180deg, #6df58a, #16b45f);
  color:#03300f;
  box-shadow:0 6px 0 #0a6b39, inset 0 4px 0 rgba(255,255,255,.4);
  animation: bump .35s ease;
}
.q-opt--right .q-opt__key{ background:#fff; color:#0a6b39; }
.q-opt--wrong{
  background:linear-gradient(180deg, #ff8b97, #e02b40);
  box-shadow:0 6px 0 #8f1727, inset 0 4px 0 rgba(255,255,255,.3);
  animation: shakeX .35s ease;
}
@keyframes bump{ 50%{ transform:scale(1.035); } }
@keyframes shakeX{ 25%{ transform:translateX(-7px); } 75%{ transform:translateX(7px); } }

.q-feedback{ margin-top:clamp(14px, 1.3vw, 19px); display:flex; flex-direction:column; gap:clamp(9px, .9vw, 13px); align-items:center; }
.q-verdict{
  font-family:var(--font-black); font-style:italic; font-size:clamp(24px, 2.1vw, 30px);
  text-shadow:0 3px 0 rgba(0,0,0,.45);
}
.q-verdict.is-right{ color:#8dffab; }
.q-verdict.is-wrong{ color:#ff9aa6; }
.q-tip{
  margin:0; text-align:center; font-size:clamp(14px, 1.2vw, 17px); line-height:1.5;
  color:#e3d9ff; background:rgba(0,0,0,.3); border:3px solid rgba(0,0,0,.35);
  border-radius:15px; padding:clamp(10px, .95vw, 14px) clamp(14px, 1.3vw, 19px); width:100%;
}
.q-feedback .btn{ width:100%; }

/* ---------- карточка сообщений ---------- */
.m-card{
  position:relative;
  width:min(620px, 100%);
  border-radius:28px;
  border:5px solid var(--line);
  background:linear-gradient(180deg, #3a2980 0%, #2b1f5c 45%, #1c1342 100%);
  box-shadow:0 14px 0 rgba(0,0,0,.45), inset 0 6px 0 rgba(255,255,255,.14), inset 0 -12px 0 rgba(0,0,0,.25);
  padding:clamp(22px, 2vw, 30px) clamp(18px, 1.8vw, 26px) clamp(18px, 1.8vw, 26px);
  text-align:center;
  animation: qIn .3s cubic-bezier(.2,1.4,.4,1) both;
}
.m-card__ribbon{
  position:absolute; top:-16px; left:50%; transform:translateX(-50%) rotate(-3deg);
  font-family:var(--font-black); font-style:italic; font-size:clamp(13px, 1.1vw, 16px); letter-spacing:.06em;
  text-transform:uppercase; white-space:nowrap;
  padding:6px 17px; border-radius:999px; border:3px solid var(--line);
  background:linear-gradient(180deg, var(--yellow), var(--orange));
  color:#3b2200; text-shadow:0 2px 0 rgba(255,255,255,.4);
  box-shadow:0 4px 0 rgba(0,0,0,.4);
}
.m-card__ribbon.hidden{ display:none; }
.m-title{
  margin:8px 0 8px;
  font-family:var(--font-black); font-style:italic;
  font-size:clamp(26px, 3.4vw, 40px); line-height:1.05;
  text-shadow:0 3px 0 rgba(0,0,0,.45);
}
.m-title.is-win{ color:#8dffab; }
.m-title.is-lose{ color:#ff9aa6; }
.m-text{ margin:0 0 clamp(14px, 1.3vw, 19px); font-size:clamp(15px, 1.3vw, 18px); line-height:1.55; color:#e0d6ff; }
.m-text b{ color:var(--yellow); }

.m-stats{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(clamp(110px, 10vw, 150px), 1fr));
  gap:clamp(8px, .8vw, 12px); margin-bottom:clamp(16px, 1.4vw, 22px);
}
.m-stats .stat{ background:rgba(0,0,0,.32); }

.m-actions{ display:flex; flex-direction:column; gap:clamp(9px, .9vw, 13px); }
.m-actions .btn{ width:100%; }
.m-actions__row{ display:flex; gap:clamp(9px, .9vw, 13px); }
.m-actions__row .btn{ flex:1 1 0; }

/* ---------- справка / темы ---------- */
.help-list{
  text-align:left; margin:0 0 clamp(16px, 1.4vw, 22px); padding:0; list-style:none;
  display:flex; flex-direction:column; gap:clamp(8px, .8vw, 12px);
  font-size:clamp(14px, 1.25vw, 17px); line-height:1.45; color:#e2d8ff;
}
.help-list li{
  background:rgba(0,0,0,.28); border:3px solid rgba(0,0,0,.35);
  border-radius:15px; padding:clamp(9px, .9vw, 13px) clamp(12px, 1.1vw, 17px);
}
.help-list b{ color:var(--yellow); }
.tag-cloud{ display:flex; flex-wrap:wrap; gap:clamp(7px, .7vw, 10px); justify-content:center; margin-bottom:clamp(16px, 1.4vw, 22px); }
.tag{
  font-size:clamp(12px, 1.05vw, 15px); font-weight:800;
  padding:6px 12px; border-radius:999px;
  border:3px solid var(--line);
  background:linear-gradient(180deg, #6f5bd6, #3d2a91);
  box-shadow:0 4px 0 rgba(0,0,0,.4);
}

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 980px){
  .shop__grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .hero-card--legend{ grid-column:1 / -1; }
  .hero-card--legend .hero-card__art{ aspect-ratio:16 / 7; }
  .hero-card--legend .hero-card__body{ padding:14px 16px 16px; }
}

@media (max-width: 760px){
  .brand__logo{ width:60px; height:60px; border-radius:19px; }
  .menu__stats{ grid-template-columns:repeat(3, 1fr); }
  .stat__value{ font-size:22px; }
  .q-opt{ font-size:16px; padding:11px 12px; }
  .goal-bar{ font-size:12.5px; gap:9px; }
  .icon-btn{ width:46px; height:46px; font-size:20px; }
  .hud__group{ gap:6px; }
  .hud__lives{ gap:4px; padding:5px 8px; }
  .life{ width:20px; height:18px; }
  .heart{ width:16px; height:14px; }
  .hud__balls{ padding:5px 8px; gap:4px; }
  .ball-ico{ width:15px; height:15px; }
  .ball-ico::before, .ball-ico::after{ top:1.5px; width:7px; height:11px; }
  .hud__balls-count{ min-width:24px; font-size:15px; }

  .btn--shop{ font-size:18px; padding:12px 15px; gap:8px; }
  .btn-shop__paw{ font-size:22px; }
  .modal--shop{ padding:10px; }
  .shop{ padding:14px; border-width:4px; border-radius:23px; }
  .shop__head{ flex-wrap:wrap; gap:9px; }
  .shop__heading{ flex:1 1 100%; }
  .shop__title{ font-size:27px; }
  .shop__wallet{ order:1; padding:7px 12px 7px 9px; }
  .shop__wallet-value{ font-size:20px; }
  .shop__close{ order:2; margin-left:auto; width:42px; height:42px; }
  .shop__lead{ margin:9px 0 12px; font-size:13.5px; }
  .shop__grid{ gap:10px; }
  .hero-card__body{ padding:10px 11px 12px; }
  .hero-card__name{ font-size:21px; }
  .hero-card__breed{ font-size:9px; padding:2px 7px; }
  .hero-card__desc{ font-size:12.5px; }
  .hero-card__btn{ font-size:15px; padding:10px 8px; }
  .shop-toast{ bottom:16px; font-size:14.5px; padding:10px 15px; }
}

@media (max-width: 520px){
  .shop__grid{ grid-template-columns:1fr; }
  .hero-card--legend{ grid-column:auto; }
  .hero-card__art{ aspect-ratio:16 / 10; }
  .hero-card--legend .hero-card__art{ aspect-ratio:16 / 10; min-height:0; }
  .hero-card__body{ padding:11px 13px 13px; }
  .hero-card__name{ font-size:23px; }
  .hero-card--legend .hero-card__name{ font-size:28px; }
  .hero-card__desc{ font-size:13px; }
  .hero-card__btn{ font-size:15px; }
  .menu__hero{ gap:7px; }
  .hero-chip, .monster-chip{ font-size:13.5px; gap:6px; padding:5px 10px 5px 5px; }
  .monster-chip{ padding:5px 5px 5px 10px; }
  .hero-chip__face{ width:32px; height:32px; }
  .hero-card__tier{ font-size:10px; }
  .hero-card__owned{ font-size:10.5px; }
  .shop-starter{ gap:8px; grid-template-columns:auto minmax(0,1fr); }
  .shop-starter .btn{ grid-column:1 / -1; }
  .q-card{ padding:14px; border-radius:24px; }
  .q-reason{ font-size:13px; }
  .q-topic{ font-size:12px; }
  .q-text{ font-size:18px; }
  .q-opt{ font-size:16px; }
  .m-card{ padding:22px 14px 16px; }
  .help-list{ font-size:14px; }
  .tag{ font-size:12px; }
}

@media (max-width: 370px){
  .hud__group{ gap:5px; }
  .hud__badge{ padding-inline:7px; }
  .hud__lives{ padding-inline:6px; gap:3px; }
  .life{ width:16px; }
  .hud__lives .heart{ width:13px; height:12px; }
  .hud__balls{ padding-inline:6px; gap:3px; }
  .hud__balls .ball-ico{ width:13px; height:13px; }
}

@media (max-height: 620px){
  .brand{ margin-bottom:8px; }
  .brand__logo{ width:48px; height:48px; }
  .brand__title{ font-size:clamp(28px, 5vw, 38px); }
  .menu__tagline{ display:none; }
  .screen--start{ padding:10px; }
}

@media (min-width: 721px) and (max-height: 800px){
  .brand__logo{ width:clamp(48px, 5vw, 64px); height:clamp(48px, 5vw, 64px); }
  .brand__title{ font-size:clamp(31px, 4.1vw, 49px); }
  .menu__card{ gap:10px; padding:16px 20px 18px; }
  .menu__stats .stat{ padding:7px 6px; }
  .menu__actions .btn{ padding-block:10px; }
  .menu__actions .btn--play{ font-size:clamp(24px, 2.2vw, 30px); }
  .menu__row .btn{ padding-block:8px; }
}

@media (min-width: 840px){
  .menu__actions:has(#btn-continue:not(.hidden)){
    display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.18fr);
  }
  .menu__actions #btn-shop{ grid-column:1 / -1; }
  .menu__actions #btn-continue{ font-size:clamp(15px, 1.42vw, 19px); padding-inline:10px; }
}


/* ---------- телефон и планшет ---------- */
body.touch-phone .is-camera .stage{
  overflow:hidden; padding:0; border:3px solid var(--line); border-radius:14px;
  background:#1d1638; box-shadow:0 4px 0 #100922ae;
}
body.touch-phone .is-camera #game{
  width:100%; height:100%; max-width:none; border:0; border-radius:0; box-shadow:none;
}
body.touch-tablet .is-camera #game{ border:0; outline:3px solid var(--line); }
body.touch .goal-bar__item, body.touch .hud__balls{ display:none; }
body.touch .hud-power{
  text-align:center; flex-wrap:wrap; gap:2px 5px; line-height:1.25;
}

body.touch-phone .screen--game{ padding:7px 8px 10px; gap:6px; }
body.touch-phone .hud{ gap:5px; min-width:0; }
body.touch-phone .hud__group{ gap:5px; }
body.touch-phone .hud__badge, body.touch-phone .hud__gems{ padding:3px 7px; }
body.touch-phone .hud__gems-value{ min-width:0; }
body.touch-phone .hud__lives{ padding:4px 6px; gap:3px; }
body.touch-phone .hud__lives .life{ width:16px; }
body.touch-phone .hud__lives .heart{ width:13px; height:12px; }
body.touch-phone .icon-btn{ width:38px; height:38px; font-size:17px; }
body.touch-phone .hud-power{ font-size:11px; }

body.touch-phone .screen--start{ padding:8px 10px 12px; }
body.touch-phone .brand{ gap:9px; margin-bottom:9px; }
body.touch-phone .brand__logo{ width:46px; height:46px; border-radius:14px; }
body.touch-phone .brand__title{ font-size:clamp(25px, 5vw, 38px); }
body.touch-phone .brand__sub{ margin-top:4px; font-size:clamp(10px,1.45vw,12px); }
body.touch-phone .menu{ gap:8px; }
body.touch-phone .menu__card{ padding:12px 13px; gap:8px; border-radius:23px; }
body.touch-phone .menu__power{ font-size:12px; padding:5px 8px; }
body.touch-phone .menu__stats .stat{
  display:grid; grid-template-columns:auto auto; justify-content:center;
  gap:2px 5px; padding:5px; border-radius:11px;
}
body.touch-phone .menu__stats .stat__icon{ font-size:16px; }
body.touch-phone .menu__stats .gem-ico{ width:16px; height:18px; }
body.touch-phone .menu__stats .stat__value{ font-size:20px; line-height:1.1; }
body.touch-phone .menu__stats .stat__label{ grid-column:1 / -1; font-size:9px; line-height:1.2; }
body.touch-phone .menu__actions{ gap:7px; }
body.touch-phone .menu__actions .btn{ padding-block:7px; padding-inline:8px; min-height:41px; }
body.touch-phone .menu__actions .btn--play{ font-size:22px; }
body.touch-phone .menu__actions .btn--secondary{ font-size:14px; line-height:1.25; }
body.touch-phone .menu__actions .btn--shop{ font-size:16px; }
body.touch-phone .menu__actions .btn-shop__paw{ font-size:18px; }
body.touch-phone .menu__row{ gap:5px; }
body.touch-phone .menu__row .btn{ font-size:12px; padding:5px 8px; min-height:34px; }
body.touch-phone .menu-guide{ padding:8px 10px; border-radius:14px; }
body.touch-phone .menu-guide__title{ font-size:15px; margin-bottom:6px; }
body.touch-phone .menu-guide__list{ font-size:11px; gap:3px; }
body.touch-phone .menu-guide__list li{ padding:3px 5px; gap:5px; }
body.touch-phone .menu-guide__list strong{ font-size:16px; min-width:24px; }
body.touch-phone .menu-guide p{ margin-top:5px; font-size:11px; }

body.touch-tablet .screen--game{ padding:12px 14px 16px; }
body.touch-tablet .joystick{ --stick-size:clamp(102px, 13vw, 142px); }
body.touch-tablet .touch-actions .touch-throw{
  width:clamp(65px, 7.5vw, 86px); height:clamp(65px, 7.5vw, 86px); font-size:33px;
}
body.touch-tablet .touch-actions .hud-power__cast{ padding:8px 13px; font-size:14px; }
body.touch-tablet .overview{ width:min(100%, 134px); }

@media (orientation: portrait){
  body.touch-phone .menu{
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-areas:"card card" "answers controls";
  }
  body.touch-tablet .menu{
    width:min(100%, 704px);
    grid-template-columns:repeat(2,minmax(0,1fr));
    grid-template-areas:"card card" "answers controls";
    align-items:stretch;
  }
}

@media (max-height: 720px) and (orientation: portrait){
  body.touch-phone .menu__tagline{ display:none; }
  body.touch-phone .menu__actions:has(#btn-continue:not(.hidden)){
    display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.22fr);
  }
  body.touch-phone .menu__actions #btn-shop{ grid-column:1 / -1; }
}

@media (orientation: landscape){
  body.touch .screen--game{
    grid-template:
      "hud hud hud" auto
      "power arena overview" minmax(0,1fr)
      "stick arena actions" auto / var(--stick-rail) minmax(0,1fr) var(--action-rail);
  }
  body.touch .goal-bar{ align-self:start; }
  body.touch .overview{ align-self:start; }
  body.touch .joystick{
    place-self:end center; margin-bottom:16px;
  }
  body.touch .touch-actions{
    flex-direction:column-reverse; justify-content:center; margin-bottom:10px;
  }
  body.touch-phone .screen--game{
    --stick-rail:clamp(86px,14vw,128px);
    --action-rail:clamp(85px,13vw,114px);
  }
  body.touch-tablet .screen--game{
    --stick-rail:clamp(106px,12vw,158px);
    --action-rail:clamp(104px,11vw,145px);
  }
  body.touch-phone .joystick{ --stick-size:clamp(76px, min(13vw,27vh),114px); }
  body.touch-phone .touch-actions .touch-throw{ width:61px; height:61px; }

  body.touch-phone .menu{
    width:min(100%, 1040px);
    grid-template-columns:minmax(0,1fr) minmax(132px,26%);
    grid-template-areas:"card answers" "card controls";
    grid-template-rows:auto auto;
    align-items:center;
  }
  body.touch-phone .brand{ margin-bottom:7px; }
  body.touch-phone .brand__logo{ width:40px; height:40px; }
  body.touch-phone .brand__title{ font-size:clamp(24px, 4.2vw, 34px); }
  body.touch-phone .brand__sub{ margin-top:2px; line-height:1.2; }
  body.touch-phone .menu__card{
    display:grid; align-self:center; align-items:center;
    grid-template:
      "hero stats"
      "ability ability"
      "actions actions"
      "secondary secondary" / auto minmax(0,1fr);
    gap:7px 9px; padding:9px 10px;
  }
  body.touch-phone .menu__tagline{ display:none; }
  body.touch-phone .menu__hero{ grid-area:hero; justify-content:flex-start; gap:5px; }
  body.touch-phone .menu__power{ grid-area:ability; }
  body.touch-phone .menu__stats{ grid-area:stats; gap:4px; }
  body.touch-phone .menu__stats .stat{ min-width:0; padding:3px; }
  body.touch-phone .menu__stats .stat__label{ letter-spacing:0; }
  body.touch-phone .menu__stats .stat__value{ font-size:18px; }
  body.touch-phone .menu__actions{ grid-area:actions; }
  body.touch-phone .menu__actions .btn{ line-height:1; padding-block:6px; }
  body.touch-phone .menu__actions .btn--play{ font-size:21px; }
  body.touch-phone .menu__actions .btn-shop__count{ padding:2px 6px; line-height:1.1; }
  body.touch-phone .menu__row{ grid-area:secondary; }
  body.touch-phone .menu__hero .hero-chip,
  body.touch-phone .menu__hero .monster-chip{
    gap:5px; padding:3px 7px; font-size:12px; border-width:2px;
  }
  body.touch-phone .menu__hero canvas{ width:27px; height:27px; border-width:2px; }
  body.touch-phone .menu__actions:has(#btn-continue:not(.hidden)){
    display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.22fr);
  }
  body.touch-phone .menu__actions #btn-shop{ grid-column:1 / -1; }

  body.touch .q-options{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.touch-phone .q-card{ padding:12px; }
  body.touch-phone .q-card__top{ margin-bottom:7px; }
  body.touch-phone .q-timer{ height:23px; margin-bottom:8px; }
  body.touch-phone .q-stake{ margin-bottom:8px; padding:5px 9px; }
  body.touch-phone .q-text{ font-size:clamp(16px,2.5vw,21px); margin-bottom:10px; }
  body.touch-phone .q-options{ gap:7px; }
  body.touch-phone .q-opt{ min-height:44px; padding:5px 8px; border-width:3px; font-size:15px; }
  body.touch-phone .q-opt__key{ width:27px; height:27px; }
}

@media (max-width: 799px) and (orientation: landscape){
  body.touch-phone .menu__hero .menu__vs,
  body.touch-phone .menu__hero .monster-chip{ display:none; }
  body.touch-phone .menu-guide{ padding:6px 8px; }
  body.touch-phone .menu-guide__list,
  body.touch-phone .menu-guide p{ line-height:1.25; }
}

@media (max-height: 350px) and (orientation: landscape){
  body.touch-phone .menu__power .power-description,
  body.touch-phone .menu-guide--answers p{ display:none; }
}

@media (min-width: 800px) and (orientation: landscape){
  body.touch-phone .menu{
    grid-template-columns:minmax(130px,1fr) minmax(0,3.5fr) minmax(130px,1fr);
    grid-template-areas:"answers card controls";
    grid-template-rows:auto;
  }
}

@media (max-width: 360px) and (orientation: portrait){
  body.touch-phone .touch-actions{ flex-direction:column-reverse; gap:5px; }
  body.touch-phone .touch-actions .touch-throw{ width:51px; height:51px; }
  body.touch-phone .touch-actions .hud-power__cast{ min-height:39px; }
  body.touch-phone .hud__badge-label{ display:none; }
  body.touch-phone .hud__gems .gem-ico{ width:17px; height:19px; }
  body.touch-phone .hud__gems-value{ font-size:18px; }
}


@media (prefers-reduced-motion: reduce){
  .modal--rotate, .rotate-card{ animation:none; }
}
