/* =====================================================================
   WAR ROBOT 7 — DESIGN SYSTEM (см. docs/DESIGN_SYSTEM.md)
   Токены → базовые элементы → компоненты → экраны → анимации
   ===================================================================== */
:root {
  /* цвет */
  --bg-top: #2B3A8C; --bg-bot: #14194F; --surface: #3A4BB0; --surface-2: #2D3B97; --surface-dark: #222C7A;
  --outline: #0E1235; --text: #FFFFFF; --text-dim: #B9C3FF;
  --cta: #3FD65A; --cta-shade: #1E9A38; --cta2: #FFC83D; --cta2-shade: #C98A00;
  --blue: #3FA9FF; --blue-shade: #1E6FC4; --premium: #FFB300; --premium-shade: #B86E00;
  --ad: #9B5CFF; --ad-shade: #6A2FD1; --danger: #FF4D5E; --danger-shade: #B8213A;
  --r-common: #A9B4C8; --r-rare: #3FA9FF; --r-epic: #B05CFF; --r-legendary: #FFB300;
  /* типографика */
  --font-display: 'Russo One', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* форма */
  --r-pill: 999px; --r-card: 20px; --r-modal: 28px; --r-tile: 16px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --lip: 5px; --stroke: 3px;
  --e1: 0 3px 0 var(--outline); --e3: 0 14px 36px rgba(0,0,0,.45);
  /* движение */
  --ease-out: cubic-bezier(.22,1,.36,1); --ease-back: cubic-bezier(.34,1.56,.64,1);
  --t-press: 90ms; --t-modal: 280ms;
  --touch: 48px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #070A24; color: var(--text); font: 600 15px/1.35 var(--font-body); overscroll-behavior: none; }
#app { max-width: 440px; height: 100%; margin: 0 auto; position: relative; overflow: hidden; user-select: none; -webkit-user-select: none;
  background: radial-gradient(120% 60% at 50% 0%, #3F55C9 0%, transparent 60%), linear-gradient(180deg, var(--bg-top), var(--bg-bot));
  display: flex; flex-direction: column; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
a { color: var(--cta2); }
.hidden { display: none !important; }
.center { text-align: center; } .block { display: block; }
.muted { color: var(--text-dim); font-size: 13px; }
.legal { color: var(--text-dim); font-size: 12px; margin: var(--sp-3) var(--sp-1); font-weight: 600; }
h2, h3, h4 { font-family: var(--font-display); font-weight: 400; margin: 0; letter-spacing: .02em; }
.t-out, h2, h3, .sec-h, .btn, .pill b, .oc-title, .amt {
  text-shadow: 0 2px 0 var(--outline), 2px 0 0 var(--outline), -2px 0 0 var(--outline), 0 -2px 0 var(--outline), 1.5px 1.5px 0 var(--outline), -1.5px 1.5px 0 var(--outline), 1.5px -1.5px 0 var(--outline), -1.5px -1.5px 0 var(--outline); }
.ico { display: inline-block; vertical-align: middle; flex: none; }

/* ---------- HUD ---------- */
#topbar { display: flex; gap: 4px; align-items: center; padding: 8px 8px 6px; padding-top: max(8px, env(safe-area-inset-top)); z-index: 5; }
.pill { flex: 1 1 auto; min-width: max-content; height: 44px; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 5px; position: relative;
  background: rgba(14,18,53,.55); border: var(--stroke) solid var(--outline); border-radius: var(--r-pill); }
.pill > .ico:first-child { filter: drop-shadow(0 2px 0 var(--outline)); }
.pill .pv { display: flex; flex-direction: column; justify-content: center; line-height: 1; }
.pill b { font: 400 16px/1 var(--font-display); }
.pill small { margin-top: 2px; font: 800 10px/1 var(--font-body); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.pill .plus { margin-left: auto; margin-right: -5px; display: flex; }
#topbar .icon-btn { width: 44px; height: 44px; }
.icon-btn { width: var(--touch); height: var(--touch); display: grid; place-items: center; flex: none; border-radius: 14px;
  background: var(--surface); border: var(--stroke) solid var(--outline); box-shadow: 0 4px 0 var(--outline); }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--outline); }
#screen { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 6px 12px 20px; scrollbar-width: none; }
#screen::-webkit-scrollbar { display: none; }
#screen.enter > * { animation: screenIn 240ms var(--ease-out); }

#nav { display: flex; align-items: flex-end; gap: 2px; padding: 6px 6px max(6px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #24308A, #161D5C); border-top: var(--stroke) solid var(--outline); position: relative; z-index: 5; }
#nav button { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; border-radius: 14px; padding-bottom: 2px; }
#nav .nav-t { font-size: 11px; font-weight: 800; color: var(--text-dim); }
#nav button.active { background: rgba(255,255,255,.08); }
#nav button.active .nav-t { color: #fff; }
#nav button.active .nav-ic { transform: translateY(-3px) scale(1.08); }
.nav-ic { transition: transform 160ms var(--ease-back); filter: drop-shadow(0 2px 0 var(--outline)); }
#nav button.center { flex: 1.25; }
#nav button.center .nav-t { margin-top: 6px; }
#nav button.center .nav-ic { margin-top: -30px; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #5BE878, var(--cta-shade)); border: var(--stroke) solid var(--outline); box-shadow: 0 4px 0 var(--outline); }
#nav button.locked { opacity: .55; } #nav button.locked .nav-ic { filter: grayscale(1) drop-shadow(0 2px 0 var(--outline)); }
.nav-lock { position: absolute; top: 4px; right: 18%; }
.badge { position: absolute; top: 2px; right: 20%; width: 14px; height: 14px; border-radius: 50%; background: var(--danger); border: 2px solid var(--outline); animation: pulse 1.6s infinite; }

/* ---------- кнопки ---------- */
.btn { --b: var(--cta); --bs: var(--cta-shade);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--touch); padding: 0 18px;
  font: 400 17px var(--font-display); color: #fff; border-radius: var(--r-pill); position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--b) 75%, #fff) 0%, var(--b) 45%, var(--b) 100%);
  border: var(--stroke) solid var(--outline); box-shadow: inset 0 -4px 0 var(--bs), 0 var(--lip) 0 var(--outline);
  transition: transform var(--t-press) ease-out, box-shadow var(--t-press) ease-out; white-space: nowrap; }
.btn::after { content: ''; position: absolute; left: 14%; right: 14%; top: 4px; height: 26%; border-radius: var(--r-pill); background: rgba(255,255,255,.35); pointer-events: none; }
.btn:active { transform: translateY(3px) scale(.96); box-shadow: inset 0 -2px 0 var(--bs), 0 2px 0 var(--outline); }
.btn small { font: 800 11px var(--font-body); opacity: .9; }
.btn-green { --b: var(--cta); --bs: var(--cta-shade); }
.btn-yellow { --b: var(--cta2); --bs: var(--cta2-shade); color: #3a2300; text-shadow: none; }
.btn-blue { --b: var(--blue); --bs: var(--blue-shade); }
.btn-premium { --b: var(--premium); --bs: var(--premium-shade); }
.btn-ad { --b: var(--ad); --bs: var(--ad-shade); }
.btn-red { --b: var(--danger); --bs: var(--danger-shade); }
.btn-ghost { --b: #4A5AC0; --bs: #2F3C94; }
.btn-play { --b: #01875F; --bs: #016446; }
.btn[disabled], .btn.disabled { filter: grayscale(.9) brightness(.75); pointer-events: none; }
.btn.wide { display: flex; width: 100%; margin: 10px 0 0; }
.btn.sm { min-height: 40px; font-size: 14px; padding: 0 12px; }
.btn.price { min-width: 92px; }
.link { color: var(--cta2); font-weight: 800; text-decoration: underline; font-size: 13px; min-height: 32px; }
.tag { display: inline-flex; align-items: center; gap: 3px; font: 800 11px var(--font-body); padding: 2px 8px; border-radius: var(--r-pill); border: 2px solid var(--outline); color: #fff; vertical-align: middle; }
.tag-red { background: var(--danger); } .tag-green { background: var(--cta); } .tag-blue { background: var(--blue); } .tag-gold { background: var(--premium); color: #3a2300; }
.bar { position: relative; height: 18px; background: var(--outline); border-radius: var(--r-pill); overflow: hidden; border: 2px solid var(--outline); }
.bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #8CF0A0, var(--cta) 50%, var(--cta-shade)); border-radius: var(--r-pill); transition: width 400ms var(--ease-out); }
.bar span { position: absolute; inset: 0; font: 800 11px/14px var(--font-body); text-align: center; text-shadow: 0 1px 0 var(--outline); }

/* ---------- карточки ---------- */
.row-card, .offer-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; width: 100%; text-align: left;
  background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: var(--stroke) solid var(--outline); border-radius: var(--r-card); box-shadow: var(--e1); position: relative; overflow: hidden; }
.row-card[data-act] { cursor: pointer; }
.row-card[disabled] { opacity: .5; }
.oc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.oc-title { font: 400 15px/1.2 var(--font-display); }
.row-card .btn-ad.price { min-width: 0; padding: 0 10px; font-size: 14px; gap: 4px; }
.row-card > .ico:first-child { width: 52px; height: 52px; }
.items { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.it { display: inline-flex; align-items: center; gap: 3px; } .it b { font: 900 14px var(--font-body); }
.timer { display: inline-flex; align-items: center; gap: 4px; color: var(--cta2); font-weight: 900; font-size: 13px; }
.offer-card { background: linear-gradient(160deg, #6A3FD9 0%, #3A2C9A 60%, #2A2378 100%); border-color: var(--outline); }
.offer-card.big { flex-direction: column; text-align: center; padding: 16px; }
.offer-card.big .oc-art { filter: drop-shadow(0 6px 0 rgba(0,0,0,.3)); animation: float 3s ease-in-out infinite; }
.offer-card.big .items { justify-content: center; }
.offer-card.big .btn { min-width: 160px; }
.pass-hero { background: linear-gradient(160deg, #F2A007 0%, #B65F00 70%); }
.shine::before { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent); animation: shine 4.5s ease-in-out infinite; pointer-events: none; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 14px 4px 8px; min-height: 150px;
  background: linear-gradient(180deg, var(--surface), var(--surface-dark)); border: var(--stroke) solid var(--outline); border-radius: var(--r-tile); box-shadow: var(--e1); text-align: center; font-size: 12px; }
.tile:active, .row-card[data-act]:active { transform: scale(.97); transition: transform var(--t-press); }
.tile > .tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap; z-index: 1; }
.tile .btn { margin-top: auto; width: 100%; }
.tile.glow { box-shadow: 0 0 0 3px var(--cta), 0 0 18px rgba(63,214,90,.6); }
.tile .real, .price-col .real { font-size: 10px; color: var(--text-dim); font-weight: 800; }
.sold { opacity: .45; pointer-events: none; filter: grayscale(.6); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.deal-ic .it { flex-direction: column; } .deal-ic .it b { font-size: 13px; }
.gem-tile .amt { font: 400 18px var(--font-display); }
.gem-tile .bonus { font: 900 12px var(--font-body); color: var(--cta); } .gem-tile .bonus.ghost { color: var(--text-dim); }
.x2 { position: absolute; top: 30px; right: 4px; min-width: 30px; height: 22px; padding: 0 5px; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--danger); border: 2px solid var(--outline); font: 400 12px/1 var(--font-display); color: #fff; transform: rotate(8deg); }
.x2.inline { position: static; display: inline-grid; transform: none; vertical-align: middle; }
.gem-tile.t5 { background: linear-gradient(180deg, #6A3FD9, #2A2378); }
.price-col { display: flex; flex-direction: column; align-items: center; gap: 2px; } .price-col .real { margin-top: 6px; }
.odds-line { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; min-height: 30px; align-self: flex-start; }
.odd { font: 900 11px/1 var(--font-body); color: #fff; padding: 4px 5px; border-radius: 8px; background: color-mix(in srgb, var(--rc) 45%, var(--outline)); border: 1.5px solid var(--rc); }
.row-card .txt { font-size: 13px; font-weight: 700; line-height: 1.35; } .row-card .txt .ico { vertical-align: -3px; }
.disclosure { margin: 4px 0 0; font-size: 11.5px; color: #E6EAFF; font-weight: 700; line-height: 1.3; }
.links { text-align: center; color: var(--text-dim); margin: 6px 0; }
.ad-card { background: linear-gradient(180deg, #7B4AE0, #4F2FA8); }

/* ---------- магазин ---------- */
.shop-tabs { position: sticky; top: -6px; z-index: 3; display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px 8px; margin: -6px -12px 4px; background: #2A378C; box-shadow: 0 6px 10px -6px rgba(0,0,0,.5); scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent); mask-image: linear-gradient(90deg, #000 90%, transparent); }
.shop-tabs::-webkit-scrollbar { display: none; }
.shop-tabs button { flex: none; min-height: 36px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-dark); border: 2px solid var(--outline); font-weight: 800; font-size: 13px; }
.shop section { scroll-margin-top: 62px; margin-bottom: 8px; }
.sec-h { font-size: 18px; margin: 14px 2px 10px; }
.shop-foot { text-align: center; margin-top: 10px; }

/* ---------- главный экран ---------- */
.home { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 100%; padding-top: 2px; }
.chapter-banner { padding: 6px 22px 8px; background: linear-gradient(180deg, #FF8C1A, #D85F00); border: var(--stroke) solid var(--outline); border-radius: 14px; box-shadow: var(--e1);
  font-family: var(--font-display); display: flex; flex-direction: column; align-items: center; transform: perspective(200px) rotateX(8deg); }
.chapter-banner b { font-weight: 400; font-size: 15px; } .chapter-banner small { font: 800 11px var(--font-body); }
.side { position: absolute; top: 56px; display: flex; flex-direction: column; gap: 10px; z-index: 2; }
.side.left { left: 0; } .side.right { right: 0; }
.side-btn { width: 60px; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative;
  background: linear-gradient(180deg, var(--surface), var(--surface-dark)); border: var(--stroke) solid var(--outline); border-radius: 16px; box-shadow: var(--e1); }
.side-btn small { font: 900 10px var(--font-body); margin-top: -2px; text-shadow: 0 1px 0 var(--outline); }
.side-btn.offer-b { background: linear-gradient(180deg, #8E4BFF, #5A2BC4); animation: breathe 2s ease-in-out infinite; }
.side-btn.offer-b small { color: var(--cta2); }
.side-btn.gold { background: linear-gradient(180deg, #FFC83D, #C98A00); }
.dot { position: absolute; top: -5px; right: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--danger); border: 2px solid var(--outline); }
.holo { margin: 18px 0 4px; padding: 12px; border-radius: 26px; position: relative;
  background: radial-gradient(circle at 50% 40%, rgba(92,208,255,.25), rgba(14,18,53,.6) 70%); border: var(--stroke) solid var(--outline); box-shadow: inset 0 0 30px rgba(92,208,255,.25), var(--e1); }
.holo canvas { display: block; animation: float 4s ease-in-out infinite; }
.holo.boss { background: radial-gradient(circle at 50% 40%, rgba(255,77,94,.3), rgba(14,18,53,.6) 70%); box-shadow: inset 0 0 30px rgba(255,77,94,.35), var(--e1); }
.boss-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); }
.lvl-name { font: 400 20px var(--font-display); margin: 4px 0; text-shadow: 0 2px 0 var(--outline); }
/* путь главы: дорожка + узлы */
.path { position: relative; width: min(100%, 320px); display: flex; justify-content: space-between; align-items: center; margin: 14px 0 4px; padding: 0 2px; }
.path .track { position: absolute; left: 22px; right: 22px; top: 50%; height: 14px; transform: translateY(-50%); border-radius: var(--r-pill);
  background: radial-gradient(circle, rgba(185,195,255,.45) 2px, transparent 2.5px) 0 50% / 12px 100% repeat-x, #161D5C; border: var(--stroke) solid var(--outline); box-shadow: inset 0 3px 0 rgba(0,0,0,.35); }
.path .track i { position: absolute; left: -1px; top: -1px; bottom: -1px; width: var(--prog); border-radius: var(--r-pill); background: linear-gradient(180deg, #8CF0A0, var(--cta) 50%, var(--cta-shade)); }
.node { position: relative; z-index: 1; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(180deg, #4A5AC0, var(--surface-dark)); border: var(--stroke) solid var(--outline); box-shadow: 0 3px 0 var(--outline); font: 400 15px var(--font-display); color: var(--text-dim); }
.node b { font-weight: 400; line-height: 1; }
.node.done { background: linear-gradient(180deg, #5BE878, var(--cta-shade)); }
.node.cur { width: 46px; height: 46px; font-size: 19px; color: #3a2300; background: linear-gradient(180deg, #FFE08A, var(--cta2) 55%, var(--cta2-shade)); box-shadow: 0 3px 0 var(--outline), 0 0 0 4px rgba(255,200,61,.35), 0 0 18px rgba(255,200,61,.7); }
.node.boss { width: 46px; height: 46px; background: linear-gradient(180deg, #FF7A88, #A61E33); }
.node.boss.lock { filter: saturate(.7) brightness(.85); }
.node .here { position: absolute; top: -24px; left: 50%; transform: translateX(-50%) rotate(90deg); animation: bob 1s ease-in-out infinite; filter: drop-shadow(0 2px 0 var(--outline)); }
@keyframes bob { 50% { top: -20px; } }
.btn.play { margin: 14px 0 10px; min-width: 230px; min-height: 72px; font-size: 26px; flex-direction: column; gap: 0; line-height: 1.05; }
.btn.play small { font-size: 13px; }
.breathe { animation: breathe 1.8s ease-in-out infinite; }
.squad-mini { display: flex; gap: 10px; }
.squad-mini span { position: relative; width: 56px; height: 56px; border-radius: 16px; background: var(--surface-dark); border: var(--stroke) solid var(--outline); display: grid; place-items: center; overflow: hidden; }
.squad-mini b { position: absolute; bottom: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 4px; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--blue); border: 2px solid var(--outline); font: 400 12px/1 var(--font-display); }
.squad-mini span { overflow: visible; }

/* ---------- ангар ---------- */
.squad { display: flex; gap: 8px; }
.sq { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: var(--r-tile); background: linear-gradient(180deg, var(--surface), var(--surface-dark));
  border: var(--stroke) solid var(--outline); box-shadow: 0 0 0 2px var(--rc, transparent) inset, var(--e1); }
.sq b { font: 400 13px var(--font-display); } .sq small { font-size: 11px; color: var(--text-dim); }
.sq.e { justify-content: center; opacity: .6; border-style: dashed; }
.robots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.robot .btn.sm { font-size: 13px; padding: 0 8px; gap: 3px; }
.robot { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 8px; text-align: center;
  background: linear-gradient(180deg, var(--surface), var(--surface-dark)); border: var(--stroke) solid var(--outline); border-top: 6px solid var(--rc); border-radius: var(--r-card); box-shadow: var(--e1); }
.robot b { font: 400 15px var(--font-display); }
.robot p { margin: 0; font-size: 12px; color: #E3E8FF; min-height: 32px; }
.robot .bar { width: 100%; } .robot .btn { width: 100%; }
.robot.in { box-shadow: 0 0 0 3px var(--cta), var(--e1); }
.robot.locked { opacity: .7; justify-content: center; }
.r-portrait { position: relative; }
.r-portrait .lvl { position: absolute; bottom: 0; right: -6px; min-width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--rc); border: 2px solid var(--outline); font: 400 13px var(--font-display); color: #fff; text-shadow: 0 1px 0 var(--outline); }

/* ---------- пропуск ---------- */
.pass-h { padding: 12px; border-radius: var(--r-card); background: linear-gradient(160deg, #6A3FD9, #2A2378); border: var(--stroke) solid var(--outline); box-shadow: var(--e1); margin-bottom: 10px; }
.pass-title { display: flex; gap: 8px; align-items: center; } .pass-title b { font: 400 16px var(--font-display); display: block; }
.pass-lvl { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; } .pass-lvl .bar { flex: 1; }
.lvl-badge { width: 42px; height: 42px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--cta2); color: #3a2300; border: var(--stroke) solid var(--outline); font: 400 18px var(--font-display); }
.prem-on { text-align: center; color: var(--cta2); font-weight: 900; margin-top: 8px; }
.pass-cols { display: grid; grid-template-columns: 1fr 42px 1fr; font-weight: 900; font-size: 12px; color: var(--text-dim); text-align: center; }
.prow { display: grid; grid-template-columns: 1fr 42px 1fr; gap: 6px; align-items: center; margin: 6px 0; }
.pnum { width: 36px; height: 36px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--surface-dark); border: var(--stroke) solid var(--outline); font: 400 13px var(--font-display); }
.prow.reached .pnum { background: var(--cta); }
.pcell { min-height: 60px; position: relative; display: grid; place-items: center; padding: 6px 4px; border-radius: var(--r-tile); background: linear-gradient(180deg, var(--surface), var(--surface-dark)); border: var(--stroke) solid var(--outline); }
.pcell .items { justify-content: center; }
.pcell.prem { background: linear-gradient(180deg, #8E5BFF, #4B2AA8); }
.pcell.ready { box-shadow: 0 0 0 3px var(--cta), 0 0 16px rgba(63,214,90,.6); animation: breathe 1.6s infinite; }
.pcell.claimed { opacity: .45; } .pcell.locked { filter: saturate(.5) brightness(.8); }
.pcell .ok { position: absolute; top: -8px; right: -6px; }

/* ---------- задания ---------- */
.cal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cday { position: relative; min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px 2px; border-radius: var(--r-tile);
  background: linear-gradient(180deg, var(--surface), var(--surface-dark)); border: var(--stroke) solid var(--outline); box-shadow: var(--e1); }
.cday small { font-weight: 900; font-size: 11px; color: var(--text-dim); } .cday .items { justify-content: center; flex-direction: column; gap: 0; }
.cday.big { grid-column: span 2; background: linear-gradient(180deg, #FFC83D, #C98A00); } .cday.big small { color: #3a2300; }
.cday.done { opacity: .5; } .cday.ready { box-shadow: 0 0 0 3px var(--cta), 0 0 18px rgba(63,214,90,.6); animation: breathe 1.6s infinite; }
.cday .ok { position: absolute; top: -8px; right: -6px; }
.quest { display: flex; gap: 10px; align-items: center; padding: 10px 12px; margin-bottom: 8px; border-radius: var(--r-card); background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: var(--stroke) solid var(--outline); box-shadow: var(--e1); }
.q-body { flex: 1; display: flex; flex-direction: column; gap: 6px; } .quest.claimed { opacity: .5; }

/* ---------- настройки ---------- */
.back-btn { margin-bottom: 4px; }
.set-group { border-radius: var(--r-card); overflow: hidden; border: var(--stroke) solid var(--outline); background: var(--surface-dark); box-shadow: var(--e1); }
.set-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 6px 12px; text-align: left; border-bottom: 2px solid rgba(14,18,53,.6); position: relative; cursor: pointer; }
.set-row:last-child { border-bottom: 0; } .set-row span { flex: 1; } .set-row small { color: var(--text-dim); }
.set-row input { position: absolute; opacity: 0; pointer-events: none; }
.sw { width: 52px; height: 30px; border-radius: var(--r-pill); background: #555E99; border: 2px solid var(--outline); position: relative; transition: background 150ms; flex: none; }
.sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--outline); transition: transform 180ms var(--ease-back); }
.set-row input:checked + .sw { background: var(--cta); } .set-row input:checked + .sw::after { transform: translateX(22px); }
.select { width: 100%; min-height: var(--touch); border-radius: 14px; border: var(--stroke) solid var(--outline); background: #fff; color: #111; font: 800 16px var(--font-body); padding: 0 12px; margin: 8px 0; }

/* ---------- бой ---------- */
body[data-screen=battle] #nav, body[data-screen=battle] #topbar { display: none; }
body[data-screen=battle] #screen { padding: 6px 8px 10px; padding-top: max(6px, env(safe-area-inset-top)); }
.b-hud { display: flex; align-items: center; gap: 6px; }
.b-hud .icon-btn { width: 44px; height: 44px; }
.b-title { flex: 1; min-width: 0; } .b-name { font: 400 13px var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 var(--outline); }
.b-title .bar { height: 12px; margin-top: 4px; }
.b-chip { display: flex; align-items: center; gap: 2px; height: 36px; padding: 0 8px 0 4px; border-radius: var(--r-pill); background: rgba(14,18,53,.6); border: 2px solid var(--outline); }
.b-chip b { font: 400 14px var(--font-display); } .b-chip.zero { background: var(--danger); animation: pulse 1s infinite; }
.b-canvas-wrap { position: relative; margin: 6px 0 4px; }
.b-canvas-wrap.boss canvas { filter: drop-shadow(0 0 10px rgba(255,77,94,.55)); }
canvas#b-canvas { display: block; touch-action: none; }
#b-target-hint { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: var(--cta2); color: #3a2300; font-weight: 900; font-size: 13px; padding: 4px 12px; border-radius: var(--r-pill); border: 2px solid var(--outline); animation: breathe 1.2s infinite; }
.b-label { font-size: 11px; font-weight: 800; color: var(--text-dim); margin: 2px 4px 3px; display: flex; align-items: center; gap: 3px; }
.b-bench { display: grid; justify-content: center; gap: 8px; padding: 8px; border-radius: var(--r-tile); background: rgba(14,18,53,.55); border: var(--stroke) solid var(--outline); }
.slot { width: 100%; aspect-ratio: 1; border-radius: 12px; background: rgba(0,0,0,.25); display: grid; place-items: center; padding: 3px; }
.b-deck { display: flex; gap: 8px; justify-content: center; margin: 8px 0; }
.col { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 6px 2px; min-width: 64px; border-radius: var(--r-tile);
  background: linear-gradient(180deg, var(--surface), var(--surface-dark)); border: var(--stroke) solid var(--outline); box-shadow: var(--e1); }
.col.done { opacity: .3; } .col .cnt { font: 900 11px var(--font-body); color: var(--text-dim); min-height: 14px; }
.drone { --c: #888; position: relative; width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c) 40%);
  border: var(--stroke) solid var(--outline); box-shadow: inset 0 -4px 0 rgba(0,0,0,.22); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.drone .visor { position: absolute; top: 8px; left: 8px; right: 8px; height: 11px; border-radius: 5px; background: var(--outline); display: flex; justify-content: space-around; align-items: center; }
.drone .visor b { width: 6px; height: 5px; border-radius: 1px; background: #7DF9FF; }
.drone .sym { position: absolute; bottom: 4px; display: flex; }
.drone .ammo { position: absolute; top: -9px; right: -9px; min-width: 24px; height: 24px; padding: 0 4px; border-radius: var(--r-pill); background: #fff; color: var(--outline); border: 2px solid var(--outline); font: 900 13px/20px var(--font-body); text-align: center; }
.drone.front { animation: breathe 1.6s ease-in-out infinite; box-shadow: 0 0 0 2px #fff, inset 0 -4px 0 rgba(0,0,0,.22); }
.drone.back { width: 36px; height: 36px; opacity: .7; border-radius: 10px; } .drone.back .visor { top: 5px; left: 5px; right: 5px; height: 8px; } .drone.back .sym { transform: scale(.8); bottom: 1px; } .drone.back .ammo { transform: scale(.8); top: -10px; right: -12px; }
.drone.skin-neon { background: #151B4A; border-color: var(--outline); box-shadow: inset 0 0 0 3px var(--c), 0 0 10px var(--c); color: #fff; }
.drone.skin-chrome { background: linear-gradient(180deg, #F4F6FF, #9AA3C7 50%, #D9DEF2); box-shadow: inset 0 -14px 0 -8px var(--c); }
.drone.skin-camo { background: radial-gradient(circle at 25% 60%, color-mix(in srgb, var(--c) 70%, #000) 18%, transparent 19%), radial-gradient(circle at 72% 78%, color-mix(in srgb, var(--c) 70%, #000) 14%, transparent 15%), var(--c); }
.drone.empty, .drone.empty[class*=skin] { background: none; box-shadow: none; border: 2px dashed rgba(185,195,255,.35); }
.slot .drone { width: 100%; height: 100%; }
.b-abil { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.abil { width: 66px; min-height: 66px; padding: 4px 2px 2px; display: flex; flex-direction: column; align-items: center; position: relative; border-radius: var(--r-tile);
  background: linear-gradient(180deg, var(--surface), var(--surface-dark)); border: var(--stroke) solid var(--outline); box-shadow: var(--e1); }
.abil b { position: absolute; top: -9px; right: -7px; min-width: 24px; height: 24px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--blue); border: 2px solid var(--outline); font: 400 12px var(--font-display); }
.abil b.buy { background: var(--cta); }
.abil small { font: 800 9.5px var(--font-body); color: var(--text-dim); }
.abil.booster { background: linear-gradient(180deg, #4C5BC8, #2A3488); }
.abil.off { opacity: .35; pointer-events: none; }
.abil:active, .col:active, .slot:active { transform: scale(.94); }

/* ---------- модалки ---------- */
#modal-root { position: absolute; inset: 0; pointer-events: none; z-index: 50; }
.modal-bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; pointer-events: auto;
  background: rgba(7,10,36,.72); backdrop-filter: blur(2px); animation: fade 200ms ease-out; }
.modal { position: relative; width: 100%; max-height: 86%; display: flex; flex-direction: column;
  background: linear-gradient(180deg, #4357C4, #2A3690); border: var(--stroke) solid var(--outline); border-radius: var(--r-modal); box-shadow: var(--e3), inset 0 3px 0 rgba(255,255,255,.2);
  animation: pop var(--t-modal) var(--ease-back); scrollbar-width: none; }
.modal-bg.out { animation: fade 170ms ease-in reverse forwards; } .modal-bg.out .modal { animation: popOut 170ms ease-in forwards; }
.m-body { overflow-y: auto; padding: 22px 16px 16px; scrollbar-width: none; border-radius: var(--r-modal); }
.modal.has-title .m-body { padding-top: 34px; }
.m-ribbon { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 96px); z-index: 2; pointer-events: none; display: flex; }
.m-ribbon span { font: 400 20px/1.15 var(--font-display); padding: 8px 22px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(180deg, #FF8C1A, #D85F00); border: var(--stroke) solid var(--outline); border-radius: 14px; box-shadow: var(--e1);
  text-shadow: 0 2px 0 var(--outline), 2px 0 0 var(--outline), -2px 0 0 var(--outline), 0 -2px 0 var(--outline); }
.m-ribbon.long span { font-size: 16px; padding: 10px 16px 11px; }
.modal-bg { padding-top: 40px; }
.m-close { position: absolute; top: -16px; right: -10px; width: var(--touch); height: var(--touch); display: grid; place-items: center; z-index: 3; filter: drop-shadow(0 3px 0 var(--outline)); }
.m-text { text-align: center; color: #EEF1FF; font-weight: 700; margin: 8px 0; } .m-text.small { font-size: 13px; }
.modal .row { display: flex; gap: 10px; margin-top: 12px; } .modal .row .btn { flex: 1; }
.modal h2 { text-align: center; margin-bottom: 6px; }
.rew { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0; }
.rew-burst { text-align: center; animation: spin 6s linear infinite; height: 64px; }
.chip { min-width: 78px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 8px 6px; border-radius: var(--r-tile);
  background: linear-gradient(180deg, var(--surface), var(--surface-dark)); border: var(--stroke) solid var(--outline); box-shadow: var(--e1); }
.chip b { font: 400 15px var(--font-display); text-shadow: 0 2px 0 var(--outline), 1px 0 0 var(--outline), -1px 0 0 var(--outline); } .chip small { font-size: 11px; color: var(--text-dim); font-weight: 800; }
.chip.big b { font-size: 24px; }
.chip.rare { box-shadow: 0 0 0 3px var(--r-rare), var(--e1); } .chip.epic { box-shadow: 0 0 0 3px var(--r-epic), 0 0 18px rgba(176,92,255,.7); } .chip.legendary { box-shadow: 0 0 0 3px var(--r-legendary), 0 0 24px rgba(255,179,0,.85); }
.pop-in { animation: pop 380ms var(--ease-back) both; }
.win { text-align: center; } .win-trophy { animation: pop 500ms var(--ease-back); filter: drop-shadow(0 8px 0 rgba(0,0,0,.25)); }
.odds { width: 100%; border-collapse: collapse; } .odds td { padding: 8px 4px; border-bottom: 2px solid rgba(14,18,53,.5); } .odds .pct { font: 400 16px var(--font-display); text-align: right; padding-right: 10px; }
.chain .step { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 14px; background: var(--surface-dark); border: 2px solid var(--outline); margin: 6px 0; opacity: .6; }
.chain .step > b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--outline); font-family: var(--font-display); font-weight: 400; }
.chain .step .items { flex: 1; } .chain .step.cur { opacity: 1; box-shadow: 0 0 0 3px var(--cta2); } .chain .step.done { opacity: .4; }
/* ящик */
.chest-stage { position: relative; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; }
.chest-ic.shake { animation: chestShake 900ms ease-in infinite; }
.chest-stage.opened .chest-ic { animation: chestOut 300ms ease-out forwards; position: absolute; }
.chest-flash { position: absolute; inset: 20% 25%; border-radius: 50%; background: radial-gradient(circle, #fff, rgba(255,255,255,0) 70%); opacity: 0; pointer-events: none; }
.chest-stage.opened .chest-flash { animation: flash 450ms ease-out; }
.chest-cards { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.card-reveal { animation: cardIn 420ms var(--ease-back) both; }
.card-reveal.legendary { animation-duration: 700ms; }
.tap-hint { margin-top: 8px; } .chest-stage.opened .tap-hint { display: none; }
/* mock store sheet (Google Play-подобный) */
.modal-bg.sheet { align-items: flex-end; padding: 0; }
.modal-bg.sheet .modal { border-radius: 24px 24px 0 0; background: #fff; color: #202124; border: 0; animation: sheetUp 260ms var(--ease-out); }
.modal-bg.sheet .m-body { padding: 18px 18px max(18px, env(safe-area-inset-bottom)); }
.store-sheet { font-family: Roboto, var(--font-body); font-weight: 500; text-align: center; }
.ss-top { display: flex; gap: 10px; align-items: center; text-align: left; } .ss-top small { display: block; color: #5f6368; font-size: 12px; }
.ss-app { width: 48px; height: 48px; border-radius: 12px; background: #2B3A8C; display: grid; place-items: center; }
.ss-p { color: #5f6368; font-size: 12px; margin-top: 12px; } .ss-d { margin: 8px 0; display: flex; justify-content: center; } .ss-d .it b { color: #202124; }
.ss-price { font-size: 28px; font-weight: 700; margin: 6px 0; } .ss-legal { font-size: 12px; color: #3c4043; text-align: left; line-height: 1.35; }
.store-sheet .btn { text-shadow: none; font-family: Roboto, var(--font-body); font-weight: 700; border: 0; box-shadow: none; } .store-sheet .btn::after { display: none; }
.store-sheet .btn-ghost { background: #F1F3F4; color: #01875F; } .store-sheet .muted { color: #80868b; font-size: 11px; display: block; margin-top: 8px; }
/* реклама mock */
.ad-overlay { position: fixed; inset: 0; background: #000; z-index: 100; display: grid; place-items: center; }
.ad-box { text-align: center; } .ad-tag { display: inline-block; background: var(--cta2); color: #000; font-weight: 900; padding: 2px 10px; border-radius: 6px; } .ad-c { font: 400 64px var(--font-display); margin: 20px; }
/* тосты, debug */
#toast-root { position: absolute; inset: 0; pointer-events: none; z-index: 60; }
.toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: var(--r-pill);
  background: rgba(14,18,53,.92); border: 2px solid #4A5AC0; white-space: nowrap; font-weight: 800; animation: toast 2.3s ease forwards; }
.kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 11px; } .kpi div { background: var(--surface-dark); border-radius: 10px; padding: 6px; border: 2px solid var(--outline); } .kpi b { display: block; font: 400 15px var(--font-display); }
.dbg-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.log { word-break: break-all; font: 10px/1.4 ui-monospace, monospace; max-height: 200px; overflow: auto; background: #050810; border-radius: 8px; padding: 6px; } .log i { color: var(--text-dim); } .log b { color: var(--blue); }
/* полёт наград, конфетти */
.fly { position: absolute; left: 0; top: 0; z-index: 90; pointer-events: none; }
.confetti { position: absolute; top: -10px; width: 8px; height: 12px; border-radius: 2px; z-index: 80; pointer-events: none; }

/* ---------- туториал ---------- */
.tut { position: absolute; inset: 0; z-index: 70; pointer-events: none; }
.tut.tapall { pointer-events: auto; }
.tut-hole { position: absolute; border-radius: 18px; box-shadow: 0 0 0 3px var(--cta2), 0 0 0 9999px rgba(7,10,36,.25); transition: all 200ms var(--ease-out); }
.tut.dim .tut-hole, .tut.forced .tut-hole { box-shadow: 0 0 0 3px var(--cta2), 0 0 0 9999px rgba(7,10,36,.7); }
.tut-hole::after { content: ''; position: absolute; inset: -6px; border-radius: 22px; border: 3px solid var(--cta2); animation: ring 1.4s ease-out infinite; }
.tut-hand { position: absolute; transform: rotate(-90deg); animation: tap 1.1s ease-in-out infinite; filter: drop-shadow(0 3px 0 var(--outline)); }
.tut-bubble { position: absolute; left: 16px; right: 16px; padding: 12px 14px; border-radius: 18px; background: #fff; color: #1b2350; border: var(--stroke) solid var(--outline); box-shadow: var(--e3);
  text-align: center; pointer-events: auto; animation: pop 280ms var(--ease-back); }
.tut-bubble p { margin: 0; font: 800 16px var(--font-body); } .tut-bubble small { color: #6b74a8; font-weight: 700; font-size: 12px; }
.tut-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.tut-foot:has(> span:only-child) { display: none; }
.tut-skip { pointer-events: auto; min-height: 40px; padding: 0 12px; margin-right: -6px; border-radius: var(--r-pill); background: #EEF1FF; border: 2px solid #C9D0F5; color: #4A5AC0; font-weight: 800; font-size: 12px; white-space: nowrap; }

/* ---------- анимации ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.85); opacity: 0; } }
@keyframes popOut { to { transform: scale(.9); opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes screenIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes breathe { 50% { transform: scale(1.04); } }
@keyframes pulse { 50% { transform: scale(1.15); } }
@keyframes float { 50% { transform: translateY(-6px); } }
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 10px); } 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
@keyframes chestShake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg) scale(1.02); } 40% { transform: rotate(6deg) scale(1.04); } 60% { transform: rotate(-8deg) scale(1.06); } 80% { transform: rotate(8deg) scale(1.08); } }
@keyframes chestOut { to { transform: scale(1.6); opacity: 0; } }
@keyframes flash { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: scale(2.4); } }
@keyframes cardIn { from { transform: translateY(30px) scale(.4) rotate(-8deg); opacity: 0; } }
@keyframes ring { from { transform: scale(1); opacity: 1; } to { transform: scale(1.18); opacity: 0; } }
@keyframes tap { 0%, 100% { translate: 0 0; } 50% { translate: 0 10px; } }

/* «Меньше анимаций»: системная настройка */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; } }
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }

/* ---------- магазин: выходные, скины ---------- */
.weekend { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 10px; border-radius: var(--r-card); background: linear-gradient(90deg, #FF8C1A, #E0529C); border: var(--stroke) solid var(--outline); font-weight: 900; }
.weekend .timer { color: #fff; margin-left: auto; }
.gem-tile .wk { font: 900 11px var(--font-body); color: var(--cta2); }
.skin-tile .drone { width: 56px; height: 56px; margin: 4px 0; }
.skin-tile.on { box-shadow: 0 0 0 3px var(--cta), var(--e1); }

/* =====================================================================
   v0.3 — UI PASS: крупнее иконки (стандарт жанра: HUD 30–32, навигация 36,
   центральная «Бой» 76, плитки магазина 64+), заметная кнопка боя, «сок»
   ===================================================================== */
/* HUD */
.pill { height: 48px; padding: 0 9px 0 5px; }
.pill > .ico:first-child { width: 32px; height: 32px; }
.pill b { font-size: 18px; }
#topbar .icon-btn { width: 48px; height: 48px; }
#topbar .icon-btn .ico { width: 30px; height: 30px; }
.pill .plus .ico { width: 26px; height: 26px; }

/* Навигация: иконки 36, центральная «Бой» — крупная, светится, «дышит» */
#nav { padding-top: 4px; }
#nav button { min-height: 62px; }
#nav .nav-ic .ico { width: 36px; height: 36px; }
#nav .nav-t { font-size: 12px; }
#nav button.center { flex: 1.45; }
#nav button.center .nav-ic { margin-top: -44px; width: 78px; height: 78px; position: relative;
  background: radial-gradient(circle at 50% 30%, #8CF59E 0%, #3FD65A 45%, #1E9A38 100%); border: 4px solid var(--outline);
  box-shadow: 0 5px 0 var(--outline), 0 0 0 5px rgba(63,214,90,.25), 0 0 26px rgba(63,214,90,.65); animation: battleGlow 2.2s ease-in-out infinite; }
#nav button.center .nav-ic .ico { width: 50px; height: 50px; filter: drop-shadow(0 3px 0 rgba(14,18,53,.6)); }
#nav button.center .nav-ic::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid rgba(140,245,158,.7); animation: ringOut 2.2s ease-out infinite; pointer-events: none; }
#nav button.center .nav-ic::after { content: ''; position: absolute; left: 18%; right: 18%; top: 7%; height: 26%; border-radius: 50%; background: rgba(255,255,255,.45); pointer-events: none; }
#nav button.center .nav-t { margin-top: 4px; font: 400 15px var(--font-display); color: #fff; text-shadow: 0 2px 0 var(--outline), 1px 0 0 var(--outline), -1px 0 0 var(--outline); }
#nav button.center.active { background: none; }
#nav button.center.active .nav-ic { transform: none; }
#nav button.bounce .nav-ic { animation: navBounce 420ms var(--ease-back); }
#nav button.center.bounce .nav-ic { animation: navBounce 420ms var(--ease-back), battleGlow 2.2s ease-in-out infinite; }
@keyframes battleGlow { 50% { box-shadow: 0 5px 0 var(--outline), 0 0 0 8px rgba(63,214,90,.2), 0 0 38px rgba(63,214,90,.9); transform: scale(1.04); } }
@keyframes ringOut { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes navBounce { 0% { transform: scale(1); } 40% { transform: translateY(-8px) scale(1.15); } 100% { transform: translateY(-3px) scale(1.08); } }

/* Главный экран */
.side-btn { width: 66px; min-height: 74px; }
.side-btn > .ico { width: 48px; height: 48px; filter: drop-shadow(0 2px 0 var(--outline)); }
.side-btn small { font-size: 11px; }
.side-btn:has(.dot) > .ico { animation: wiggle 2.6s ease-in-out infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-10deg); } 88% { transform: rotate(10deg); } 92% { transform: rotate(-6deg); } 96% { transform: rotate(4deg); } }
.holo::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(92,208,255,.2), transparent) no-repeat 0 -40% / 100% 30%; animation: scan 3.5s linear infinite; }
@keyframes scan { to { background-position: 0 140%; } }
.chapter-banner { animation: sway 5s ease-in-out infinite; }
@keyframes sway { 50% { transform: perspective(200px) rotateX(8deg) rotate(-1.2deg); } }
.btn.play { position: relative; overflow: hidden; }
.btn.play::before, .btn-premium::before, .offer-card .btn.price::before { content: ''; position: absolute; top: 0; bottom: 0; width: 35%; left: -50%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); animation: shine 3.2s ease-in-out infinite; pointer-events: none; }
.btn-premium, .offer-card .btn.price { overflow: hidden; }
.squad-mini span { width: 62px; height: 62px; }
.squad-mini span .ico { width: 54px; height: 54px; }

/* Карточки, плитки, чипы — крупнее иконки */
.row-card > .ico:first-child, .row-card > .ico { width: 60px; height: 60px; flex: none; filter: drop-shadow(0 3px 0 rgba(14,18,53,.5)); }
.tile > .ico { width: 64px; height: 64px; filter: drop-shadow(0 3px 0 rgba(14,18,53,.5)); }
.gem-tile > .ico { width: auto; height: auto; }
.chip > .ico { width: 52px; height: 52px; }
.chip { min-width: 84px; }
.cday .it .ico { width: 30px; height: 30px; } .cday.big .it .ico { width: 38px; height: 38px; }
.pcell .it .ico { width: 30px; height: 30px; }
.quest .it .ico { width: 22px; height: 22px; }
.set-row > .ico:first-child { width: 32px; height: 32px; }
.robot .r-portrait .ico { width: 92px; height: 92px; }
.sq .ico { width: 76px; height: 76px; }

/* Появление контента экрана (каскад) */
#screen.enter .tile, #screen.enter .row-card, #screen.enter .offer-card, #screen.enter .robot, #screen.enter .quest, #screen.enter .prow, #screen.enter .cday, #screen.enter .set-group, #screen.enter .sq {
  animation: rise 360ms var(--ease-back) both; }
#screen.enter :is(.grid3, .robots, .quests, .pass-list, .cal, .squad) > :nth-child(1) { animation-delay: 20ms; }
#screen.enter :is(.grid3, .robots, .quests, .pass-list, .cal, .squad) > :nth-child(2) { animation-delay: 60ms; }
#screen.enter :is(.grid3, .robots, .quests, .pass-list, .cal, .squad) > :nth-child(3) { animation-delay: 100ms; }
#screen.enter :is(.grid3, .robots, .quests, .pass-list, .cal, .squad) > :nth-child(4) { animation-delay: 140ms; }
#screen.enter :is(.grid3, .robots, .quests, .pass-list, .cal, .squad) > :nth-child(5) { animation-delay: 180ms; }
#screen.enter :is(.grid3, .robots, .quests, .pass-list, .cal, .squad) > :nth-child(n+6) { animation-delay: 220ms; }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.96); } }

/* Прокачка робота: вспышка */
.robot.levelup { animation: levelUp 700ms var(--ease-back); }
.robot.levelup .r-portrait::after { content: ''; position: absolute; inset: -16px; border-radius: 50%; background: radial-gradient(circle, rgba(255,230,120,.9), transparent 65%); animation: flash 700ms ease-out forwards; pointer-events: none; }
@keyframes levelUp { 0% { transform: scale(1); } 30% { transform: scale(1.08); box-shadow: 0 0 0 4px var(--cta2), 0 0 30px rgba(255,200,61,.9); } 100% { transform: scale(1); } }

/* HUD: счётчик «подпрыгивает» при изменении */
.pill.tick b { animation: tickUp 380ms var(--ease-back); color: #FFF3B0; }
@keyframes tickUp { 40% { transform: scale(1.25); } }

/* Бой */
.abil { width: 72px; min-height: 74px; }
.abil > .ico { width: 46px; height: 46px; }
.b-chip .ico { width: 28px; height: 28px; }
.b-hud .icon-btn .ico { width: 34px; height: 34px; }
.b-bench.warn { animation: benchWarn 1s ease-in-out infinite; }
@keyframes benchWarn { 50% { box-shadow: 0 0 0 3px var(--danger), 0 0 18px rgba(255,77,94,.7); } }
.b-title .bar i { background: linear-gradient(90deg, #8CF0A0, var(--cta), #8CF0A0); background-size: 200% 100%; animation: barShimmer 2s linear infinite; }
@keyframes barShimmer { to { background-position: -200% 0; } }
.slot.arrive .drone { animation: arrive 360ms var(--ease-back); }
@keyframes arrive { from { transform: translateY(-16px) scale(.6); opacity: .3; } }
.float-txt { position: absolute; z-index: 5; pointer-events: none; font: 400 18px var(--font-display); color: #fff; text-shadow: 0 2px 0 var(--outline), 1px 0 0 var(--outline), -1px 0 0 var(--outline); animation: floatUp 900ms ease-out forwards; }
@keyframes floatUp { 0% { transform: translate(-50%, 0) scale(.6); opacity: 0; } 20% { transform: translate(-50%, -8px) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -46px) scale(1); opacity: 0; } }

/* Модалки: лента «падает» */
.m-ribbon { animation: ribbonIn 420ms var(--ease-back) both; animation-delay: 80ms; }
@keyframes ribbonIn { from { transform: translate(-50%, -24px) scale(.7); opacity: 0; } }

/* Узкие телефоны (≤ 370 px): HUD компактнее, чтобы всё помещалось */
@media (max-width: 370px) {
  #topbar { gap: 3px; padding: 8px 6px 6px; }
  .pill { height: 46px; padding: 0 7px 0 4px; gap: 3px; }
  .pill > .ico:first-child { width: 28px; height: 28px; }
  .pill b { font-size: 16px; }
  .pill .plus .ico { width: 24px; height: 24px; }
  #topbar .icon-btn { width: 44px; height: 44px; }
  #topbar .icon-btn .ico { width: 28px; height: 28px; }
}

/* =====================================================================
   v0.3 — ФОНЫ ЭКРАНОВ И БЛОКОВ, ОФОРМЛЕНИЕ БОЕВОЙ СЦЕНЫ
   ===================================================================== */
:root {
  --pat-hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='48' viewBox='0 0 28 48'%3E%3Cpath d='M14 0l14 8v16l-14 8L0 24V8z M14 32l14 8v16 M14 32L0 40' fill='none' stroke='%23ffffff' stroke-opacity='.045' stroke-width='1.2'/%3E%3C/svg%3E");
  --pat-city: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='440' height='140' viewBox='0 0 440 140'%3E%3Cg fill='%230E1235' fill-opacity='.55'%3E%3Crect x='0' y='70' width='40' height='70'/%3E%3Crect x='44' y='40' width='28' height='100'/%3E%3Crect x='76' y='86' width='50' height='54'/%3E%3Cpath d='M130 140V60h10l30-40 6 4-26 36h10v80z'/%3E%3Crect x='190' y='30' width='34' height='110'/%3E%3Crect x='198' y='14' width='4' height='16'/%3E%3Crect x='228' y='76' width='44' height='64'/%3E%3Ccircle cx='300' cy='92' r='26'/%3E%3Crect x='296' y='92' width='8' height='48'/%3E%3Crect x='330' y='50' width='30' height='90'/%3E%3Crect x='364' y='80' width='76' height='60'/%3E%3C/g%3E%3Cg fill='%23FFD23F' fill-opacity='.35'%3E%3Crect x='50' y='50' width='4' height='4'/%3E%3Crect x='60' y='64' width='4' height='4'/%3E%3Crect x='198' y='44' width='4' height='4'/%3E%3Crect x='210' y='60' width='4' height='4'/%3E%3Crect x='338' y='62' width='4' height='4'/%3E%3C/g%3E%3C/svg%3E");
  --rivets: radial-gradient(circle at 9px 9px, rgba(255,255,255,.28) 1.8px, transparent 2.4px), radial-gradient(circle at calc(100% - 9px) 9px, rgba(255,255,255,.28) 1.8px, transparent 2.4px);
}
/* Фоны экранов: у каждого раздела свой характер, но одна палитра */
body[data-screen] #app { background-repeat: no-repeat, repeat, no-repeat; }
body[data-screen=home] #app { background: #14194F; }
body[data-screen=shop] #app { background: var(--pat-hex), radial-gradient(90% 50% at 50% 0%, #7A4BD9 0%, transparent 65%), linear-gradient(180deg, #33308E, #17154F); }
body[data-screen=hangar] #app { background: linear-gradient(rgba(140,190,255,.07) 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, rgba(140,190,255,.07) 1px, transparent 1px) 0 0 / 24px 24px, radial-gradient(100% 50% at 50% 0%, #2E6FB8 0%, transparent 60%), linear-gradient(180deg, #1F4C8C, #10204F); }
body[data-screen=pass] #app { background: repeating-conic-gradient(from 0deg at 50% 0%, rgba(255,200,61,.06) 0 6deg, transparent 6deg 18deg), var(--pat-hex), linear-gradient(180deg, #4B2E9A, #1B1552); }
body[data-screen=quests] #app { background: var(--pat-hex), radial-gradient(100% 50% at 50% 0%, #2A9D8F 0%, transparent 60%), linear-gradient(180deg, #1F5C7A, #12204F); }
body[data-screen=settings] #app { background: var(--pat-hex), linear-gradient(180deg, #2B3A8C, #14194F); }
body[data-screen=battle] #app { background: repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 14px), radial-gradient(100% 45% at 50% 30%, #26307A 0%, transparent 70%), linear-gradient(180deg, #161C55, #0A0D2E); }

/* Блоки: верхний блик, заклёпки, мягкая внутренняя тень — «металлопластик» */
.row-card, .tile, .robot, .quest, .cday, .sq, .col, .abil, .side-btn, .chip, .set-group, .pass-h {
  background-image: var(--rivets), linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0) 40%), var(--bg-card, linear-gradient(180deg, var(--surface), var(--surface-dark)));
  box-shadow: inset 0 2px 0 rgba(255,255,255,.14), inset 0 -3px 0 rgba(0,0,0,.18), var(--e1); }
.offer-card { --bg-card: linear-gradient(160deg, #6A3FD9 0%, #3A2C9A 60%, #2A2378 100%); background-image: var(--rivets), var(--pat-hex), var(--bg-card); }
.ad-card { --bg-card: linear-gradient(180deg, #7B4AE0, #4F2FA8); }
.gem-tile.t5 { --bg-card: linear-gradient(180deg, #6A3FD9, #2A2378); }
.cday.big { --bg-card: linear-gradient(180deg, #FFC83D, #C98A00); }
.side-btn.offer-b { --bg-card: linear-gradient(180deg, #8E4BFF, #5A2BC4); }
.side-btn.gold { --bg-card: linear-gradient(180deg, #FFC83D, #C98A00); }
.abil.booster { --bg-card: linear-gradient(180deg, #4C5BC8, #2A3488); }
.pass-h { --bg-card: linear-gradient(160deg, #6A3FD9, #2A2378); }
.sec-h { display: flex; align-items: center; gap: 8px; }
.sec-h::before { content: ''; width: 10px; height: 18px; border-radius: 3px; background: linear-gradient(180deg, var(--cta2), #FF8C1A); box-shadow: 0 2px 0 var(--outline); }
.sec-h::after { content: ''; flex: 1; height: 2px; background: linear-gradient(90deg, rgba(255,255,255,.25), transparent); }

/* Боевая сцена: металлическая рама поля, плашки, пусковые шахты */
.b-canvas-wrap { padding: 6px; border-radius: 24px; background: linear-gradient(180deg, #5562B5, #2B3685); border: var(--stroke) solid var(--outline);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 4px 0 var(--outline), 0 10px 24px rgba(0,0,0,.35); background-image: radial-gradient(circle at 12px 12px, rgba(255,255,255,.35) 2px, transparent 2.6px), radial-gradient(circle at calc(100% - 12px) 12px, rgba(255,255,255,.35) 2px, transparent 2.6px), radial-gradient(circle at 12px calc(100% - 12px), rgba(255,255,255,.35) 2px, transparent 2.6px), radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), rgba(255,255,255,.35) 2px, transparent 2.6px), linear-gradient(180deg, #5562B5, #2B3685); }
.b-canvas-wrap.boss { background-image: repeating-linear-gradient(135deg, #FF4D5E 0 10px, #0E1235 10px 20px); animation: bossAlarm 1.6s ease-in-out infinite; }
@keyframes bossAlarm { 50% { box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 4px 0 var(--outline), 0 0 26px rgba(255,77,94,.6); } }
.b-canvas-wrap.boss canvas { filter: none; }
.b-label .plate { font: 400 12px var(--font-display); color: #fff; padding: 2px 10px; border-radius: 6px; background: linear-gradient(180deg, #FF8C1A, #D85F00); border: 2px solid var(--outline); margin-right: 4px; }
.b-bench { background-image: repeating-linear-gradient(180deg, rgba(255,255,255,.04) 0 3px, transparent 3px 9px); }
.slot { background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.15)); box-shadow: inset 0 3px 6px rgba(0,0,0,.4); }
.col { --bg-card: linear-gradient(90deg, #3A4699, #5664C2 45%, #2B3685); position: relative; }
.col::before { content: ''; position: absolute; top: -6px; left: 8px; right: 8px; height: 8px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #FFD23F, #C98A00); border: 2px solid var(--outline); border-bottom: 0; }
.col.done::before { background: #555E99; }
.b-hud { padding: 2px 2px 4px; }
.pass-hero { --bg-card: linear-gradient(160deg, #F2A007 0%, #B65F00 70%); }
.skin-tile .ico { filter: drop-shadow(0 3px 0 rgba(14,18,53,.5)); }
.tag-gold.small { font-size: 10px; }

/* =====================================================================
   v0.4 — ЖИВОЙ ФОН ГЛАВНОГО: кибер-город, параллакс, «Ковчег-7» в пути
   ===================================================================== */
#topbar, #screen, #nav { position: relative; }
#screen { z-index: 1; }
#scenery { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; display: none; }
#scenery.on { display: block; }
.sc-sky { position: absolute; inset: 0; background: linear-gradient(180deg, #120E3F 0%, #2A1A6E 38%, #5B2486 62%, #B8407E 82%, #FF7A6B 100%); }
.sc-stars { position: absolute; left: 0; right: 0; top: 0; height: 55%; opacity: .8; animation: twinkle 4s ease-in-out infinite;
  background: radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 8%, #fff, transparent), radial-gradient(1.5px 1.5px at 47% 22%, #cfe6ff, transparent), radial-gradient(1px 1px at 63% 12%, #fff, transparent), radial-gradient(1.5px 1.5px at 78% 28%, #ffd6f0, transparent), radial-gradient(1px 1px at 90% 6%, #fff, transparent), radial-gradient(1px 1px at 8% 40%, #fff, transparent), radial-gradient(1px 1px at 55% 38%, #fff, transparent); }
@keyframes twinkle { 50% { opacity: .45; } }
.sc-moon { position: absolute; width: 230px; height: 230px; left: 50%; bottom: 210px; transform: translateX(-50%); border-radius: 50%; opacity: .85;
  background: linear-gradient(180deg, #FFE58A 0%, #FF9F6B 55%, #FF5E8A 100%);
  -webkit-mask: repeating-linear-gradient(180deg, #000 0 12px, transparent 12px 16px); mask: linear-gradient(#000 45%, transparent 45%) top / 100% 100% no-repeat, repeating-linear-gradient(180deg, #000 0 10px, transparent 10px 15px);
  box-shadow: 0 0 60px rgba(255,120,140,.6); }
.sc-layer { position: absolute; left: 0; right: 0; background-repeat: repeat-x; background-size: auto 100%; }
.sc-far { bottom: 190px; height: 220px; opacity: .9; }
.sc-mid { bottom: 150px; height: 170px; }
.sc-near { bottom: 92px; height: 150px; }
.sc-rail { position: absolute; left: 0; right: 0; bottom: 118px; height: 5px; background: repeating-linear-gradient(90deg, #8C9BFF 0 18px, transparent 18px 48px); opacity: .7; }
.sc-fog { position: absolute; left: 0; right: 0; bottom: 0; height: 180px; background: linear-gradient(180deg, transparent, rgba(20,25,79,.75) 55%, #14194F); }
.sc-cars .car { position: absolute; left: 110%; width: 16px; height: 4px; border-radius: 3px; background: #3FF4FF; box-shadow: 0 0 10px #3FF4FF, -10px 0 12px rgba(63,244,255,.35); animation: carFly 9s linear infinite; }
.sc-cars .c0 { bottom: 420px; animation-duration: 11s; } .sc-cars .c1 { bottom: 380px; animation-duration: 7s; animation-delay: -3s; background: #FF4FD8; box-shadow: 0 0 10px #FF4FD8; }
.sc-cars .c2 { bottom: 460px; animation-duration: 14s; animation-delay: -8s; } .sc-cars .c3 { bottom: 340px; animation-duration: 6s; animation-delay: -1s; background: #FFD23F; box-shadow: 0 0 10px #FFD23F; }
.sc-cars .c4 { bottom: 400px; animation-duration: 10s; animation-delay: -6s; animation-direction: reverse; background: #FF4FD8; box-shadow: 0 0 10px #FF4FD8; }
.sc-cars .c5 { bottom: 300px; animation-duration: 8s; animation-delay: -5s; animation-direction: reverse; }
@keyframes carFly { from { transform: translateX(0); } to { transform: translateX(calc(-1 * (100vw + 140%) - 500px)); } }
#scenery.still .car { animation: none; display: none; }
/* Главный экран поверх города: голограмма и плашки чуть плотнее */
body[data-screen=home] .holo { background: radial-gradient(circle at 50% 40%, rgba(92,208,255,.25), rgba(14,18,53,.82) 70%); }
.chapter-banner small.route { display: flex; align-items: center; gap: 4px; font: 800 11px var(--font-body); opacity: .95; }

/* =====================================================================
   v0.4 — КОПИЛКА 3/4, ЯРКИЕ ОФФЕРЫ, КРУПНЕЕ НИЖНИЙ БАР И ИКОНКИ
   ===================================================================== */
/* виджет копилки на главном */
.piggy-w { position: relative; width: 86px; padding: 4px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 18px;
  background: radial-gradient(circle at 50% 35%, rgba(255,127,180,.35), transparent 70%), linear-gradient(180deg, #5A3FB8, #2E237A); border: var(--stroke) solid var(--outline); box-shadow: inset 0 2px 0 rgba(255,255,255,.18), var(--e1); }
.piggy-w .piggy3d { animation: pigBob 2.4s ease-in-out infinite; filter: drop-shadow(0 3px 0 rgba(14,18,53,.5)); }
.piggy-w small { font: 900 10px var(--font-body); text-shadow: 0 1px 0 var(--outline); }
.pw-bar { width: 70px; height: 9px; border-radius: 6px; background: var(--outline); overflow: hidden; border: 1.5px solid var(--outline); }
.pw-bar i { display: block; height: 100%; background: linear-gradient(90deg, #5CE1FF, #B98CFF); }
.piggy-w.ready { box-shadow: 0 0 0 3px var(--cta2), 0 0 22px rgba(255,200,61,.7), var(--e1); animation: breathe 1.6s ease-in-out infinite; }
.pw-badge { position: absolute; top: -12px; right: -14px; font: 400 13px var(--font-display); padding: 3px 7px; border-radius: 10px; background: linear-gradient(180deg, #FF6B7D, #D8203A); border: 2px solid var(--outline); transform: rotate(10deg); animation: badgePop 1.4s ease-in-out infinite; text-shadow: 0 1px 0 var(--outline); }
.piggy-w.drop .pg-coin { animation: coinDrop 900ms cubic-bezier(.5,0,.75,0) 300ms both; }
@keyframes coinDrop { 0% { transform: translateY(-40px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(22px); opacity: 0; } }
@keyframes pigBob { 50% { transform: translateY(-3px) rotate(-1.5deg); } }
@keyframes badgePop { 50% { transform: rotate(10deg) scale(1.12); } }
.pg-bulb { animation: blink 1.2s steps(2) infinite; } @keyframes blink { 50% { fill: #FF4D5E; } }
.side.left { width: 86px; align-items: center; }

/* сцена копилки в модалке */
.pg-stage { position: relative; height: 190px; display: grid; place-items: center; margin: -4px 0 4px; }
.pg-rays, .oc-rays { position: absolute; width: 260px; height: 260px; left: 50%; top: 50%; margin: -130px 0 0 -130px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(255,230,140,.32) 0 10deg, transparent 10deg 24deg); -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%); mask: radial-gradient(circle, #000 25%, transparent 70%); animation: spin 14s linear infinite; }
.pg-art { position: relative; z-index: 1; }
.pg-art .piggy3d.idle { animation: pigBob 2s ease-in-out infinite; }
.pg-art.breaking .piggy3d { animation: chestShake 650ms ease-in infinite; }
.pg-art.cracked::after { content: ''; position: absolute; inset: 10% 15%; background:
  linear-gradient(60deg, transparent 47%, #0E1235 48%, #0E1235 51%, transparent 52%), linear-gradient(-35deg, transparent 47%, #0E1235 48%, #0E1235 50%, transparent 51%), linear-gradient(100deg, transparent 49%, #0E1235 50%, #0E1235 52%, transparent 53%); }
.pg-art.burst { animation: pigBurst 600ms ease-out forwards; }
@keyframes pigBurst { 30% { transform: scale(1.2); filter: brightness(2); } 100% { transform: scale(.2); opacity: 0; } }
.spark { position: absolute; width: 14px; height: 14px; pointer-events: none; z-index: 2; background: radial-gradient(circle, #fff 20%, transparent 21%), linear-gradient(0deg, transparent 42%, #fff 43%, #fff 57%, transparent 58%), linear-gradient(90deg, transparent 42%, #fff 43%, #fff 57%, transparent 58%); animation: sparkle 1.8s ease-in-out infinite; }
.spark.s1 { top: 14%; left: 18%; } .spark.s2 { top: 22%; right: 16%; animation-delay: .6s; } .spark.s3 { bottom: 18%; left: 26%; animation-delay: 1.2s; }
@keyframes sparkle { 0%, 100% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1.2) rotate(45deg); opacity: 1; } }
.burst-badge { position: absolute; z-index: 3; right: 8%; top: 6%; width: 86px; height: 86px; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotate(-12deg);
  background: radial-gradient(circle, #FF6B7D 55%, #D8203A 56%); clip-path: polygon(50% 0, 61% 12%, 77% 6%, 80% 22%, 96% 25%, 90% 40%, 100% 52%, 88% 62%, 93% 78%, 76% 79%, 70% 95%, 56% 87%, 44% 100%, 35% 86%, 19% 93%, 17% 77%, 2% 72%, 10% 58%, 0 45%, 13% 36%, 8% 20%, 25% 18%, 30% 3%, 43% 12%);
  animation: badgeWobble 1.6s ease-in-out infinite; filter: drop-shadow(0 3px 0 rgba(14,18,53,.6)); }
.burst-badge b { font: 400 22px/1 var(--font-display); text-shadow: 0 2px 0 var(--outline), 1px 0 0 var(--outline), -1px 0 0 var(--outline); }
.burst-badge small { font: 900 10px/1 var(--font-body); letter-spacing: .04em; }
.burst-badge.sm { width: 56px; height: 56px; right: -10px; top: -10px; } .burst-badge.sm b { font-size: 15px; } .burst-badge.sm small { font-size: 7px; }
@keyframes badgeWobble { 50% { transform: rotate(-4deg) scale(1.08); } }
.pg-facts { display: flex; gap: 8px; justify-content: center; margin: 6px 0; }
.pg-fact { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 14px; background: rgba(14,18,53,.45); border: 2px solid rgba(255,255,255,.12); }
.pg-fact b { font: 400 18px var(--font-display); } .pg-fact b.worth { color: var(--cta2); } .pg-fact small { font-size: 11px; color: var(--text-dim); font-weight: 800; }
.pg-meter { position: relative; margin: 8px 0; } .pg-meter em { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--cta2); border-radius: 2px; box-shadow: 0 0 6px var(--cta2); }
.pulse-cta { animation: breathe 1.3s ease-in-out infinite; }

/* офферы: лучи, искры, звезда-«ВЫГОДА», плашка «Только 1 раз», подсветка наград */
.offer-card .oc-art { position: relative; }
.offer-card.big .oc-art { width: 150px; height: 130px; display: grid; place-items: center; }
.offer-card .burst-badge.sm { right: -14px; top: -12px; }
.offer-card.big .burst-badge { right: -40px; top: -8px; width: 74px; height: 74px; } .offer-card.big .burst-badge b { font-size: 20px; }
.once { position: absolute; top: 12px; left: -34px; width: 140px; text-align: center; transform: rotate(-35deg); background: linear-gradient(180deg, #FFD23F, #FF8C1A); color: #3a2300; font: 900 11px var(--font-body); padding: 3px 0; border-top: 2px solid var(--outline); border-bottom: 2px solid var(--outline); z-index: 2; }
.glow-items .it { padding: 4px 8px; border-radius: 12px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 2px rgba(255,255,255,.18), 0 0 12px rgba(255,210,63,.25); }
.glow-items .it b { font-size: 17px; color: #FFF3B0; }
.offer-card.big .btn.price { min-width: 190px; min-height: 56px; font-size: 22px; animation: breathe 1.5s ease-in-out infinite; }

/* нижний бар — крупнее */
#nav { padding-top: 6px; }
#nav button { min-height: 74px; }
#nav .nav-ic .ico { width: 44px; height: 44px; }
#nav .nav-t { font-size: 13px; }
#nav button.center .nav-ic { margin-top: -50px; width: 90px; height: 90px; }
#nav button.center .nav-ic .ico { width: 58px; height: 58px; }
#nav button.center .nav-t { font-size: 17px; }

/* календарь и дневные плитки — крупнее награды */
.cday { min-height: 104px; } .cday .items .it .ico { width: 40px; height: 40px; } .cday.big .items .it .ico { width: 56px; height: 56px; }
.cday .it b { font-size: 16px; } .cday.big .it b { font-size: 20px; }
.tile .deal-ic .it .ico { width: 64px; height: 64px; } .tile .deal-ic .it b { font-size: 16px; }
.tile > .ico { width: 72px; height: 72px; }

/* ===== v0.5: районы города по главам, метки механик ===== */
#scenery { transition: filter 1.2s ease; }
#scenery[data-district="2"] { filter: hue-rotate(150deg) saturate(1.1); }          /* Литейная — раскалённый металл */
#scenery[data-district="3"] { filter: hue-rotate(-45deg) saturate(1.15); }         /* Цитадель — багровый */
#scenery[data-district="4"] { filter: hue-rotate(55deg) saturate(1.35); }          /* Неоновый рынок — розовый неон */
#scenery[data-district="5"] { filter: hue-rotate(-110deg) saturate(1.2); }         /* Энергоузел — кислотно-зелёный */
#scenery[data-district="6"] { filter: hue-rotate(-20deg) saturate(.85) brightness(.92); } /* Доки — холодный туман */
.tag-orange { background: #FF6A1A; } .tag-grey { background: #4A4F80; } .tag-cyan { background: #1FA9D6; }

/* ===== v0.5: пилоты с характером (реплики, настроение) ===== */
.pilot-say { display: flex; align-items: center; gap: 10px; margin: 6px auto 10px; max-width: 320px; text-align: left; animation: pop 420ms var(--ease-back) 200ms both; }
.pilot-say .ps-face { flex: 0 0 auto; filter: drop-shadow(0 4px 0 rgba(0,0,0,.25)); }
.pilot-say.happy .ps-face { animation: ps-hop 900ms ease-in-out 600ms 2; }
.ps-bubble { position: relative; flex: 1; background: #fff; color: #141B52; border: 3px solid var(--outline); border-radius: 16px; padding: 8px 12px; display: flex; flex-direction: column; gap: 1px; }
.ps-bubble::before { content: ''; position: absolute; left: -10px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-right: 10px solid var(--outline); border-left: 0; }
.ps-bubble b { font: 800 12px var(--font-body); color: #5A66B8; text-transform: uppercase; letter-spacing: .04em; }
.ps-bubble span { font: 800 16px var(--font-body); line-height: 1.2; }
.ps-bubble small { font: 700 12px var(--font-body); color: #6B76A8; }
.win-trophy.with-pilot .ps-sad { position: relative; display: inline-block; animation: ps-shiver 1.6s ease-in-out infinite; }
.win-trophy.with-pilot .ps-sad i { position: absolute; right: -10px; bottom: -4px; }
.ps-quote { font: 800 15px var(--font-body); margin: 2px 0 4px; } .ps-quote b { color: var(--blue-light, #7DB3FF); }
.toast-pilot { gap: 8px; } .toast-pilot .ico-robot { flex: 0 0 auto; }
@keyframes ps-hop { 0%, 100% { transform: translateY(0) } 30% { transform: translateY(-8px) rotate(-4deg) } 60% { transform: translateY(0) rotate(3deg) } }
@keyframes ps-shiver { 0%, 100% { transform: rotate(0) } 25% { transform: rotate(-3deg) } 75% { transform: rotate(3deg) } }
@media (prefers-reduced-motion: reduce) { .pilot-say, .pilot-say .ps-face, .ps-sad { animation: none !important; } }

/* v0.6: длинные имена (финальный босс) + значки механик переносятся, не уезжают под виджеты */
.lvl-name { max-width: min(250px, calc(100vw - 190px)); margin-inline: auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 4px; line-height: 1.15; text-align: center; }
