:root {
  --ink: #0F172A;
  --paper: #F6F5F0;
  --pencil: #78869A;
  --rule: #DAD8CF;
  --leaf: #2E9E4F;
  --leaf-ink: #1E7A3B;
  --warn: #E0A126;
  --bad: #D9483B;
  --font: 'Manrope', system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --stage-h: 640px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
kbd {
  font: 700 11px/1 var(--font);
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 6px;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  background: #fff;
  color: var(--ink);
}

/* ---------- HUD ---------- */
.hud {
  display: flex; align-items: center; gap: 22px;
  padding: 12px 20px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 18px; letter-spacing: -.01em;
  color: var(--ink); text-decoration: none;
  margin-right: auto;
}
.brand b { color: var(--leaf); font-weight: 800; }
.meter { flex: 0 1 380px; }
.meter__label {
  display: flex; justify-content: space-between;
  font-size: 12px; font-weight: 700; color: var(--pencil);
  margin-bottom: 6px;
}
.meter__label span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; }
.meter__bar { height: 10px; border-radius: 99px; background: #E6E3D9; overflow: hidden; }
.meter__fill {
  height: 100%; width: 100%;
  background: var(--leaf);
  border-radius: inherit;
  transition: width .2s linear, background-color .4s;
}
.meter.low .meter__fill { animation: pulse .7s ease-in-out infinite; }
.stat {
  display: flex; flex-direction: column;
  font-size: 11px; font-weight: 700; color: var(--pencil);
  text-transform: uppercase; letter-spacing: .06em;
  min-width: 56px;
}
.stat b { font-size: 20px; color: var(--ink); letter-spacing: 0; font-variant-numeric: tabular-nums; line-height: 1.2; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--rule); cursor: pointer;
}
.icon-btn:hover { border-color: var(--pencil); }
.snd-off { display: none; }
.muted .snd-on { display: none; }
.muted .snd-off { display: block; }

/* ---------- Сцена ---------- */
.arena {
  flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 0 16px;
}
.stage-box { position: relative; }
.stage {
  position: absolute; left: 0; top: 0;
  width: 1000px; height: 640px;
  transform-origin: 0 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .35), 0 0 0 1px rgba(15, 23, 42, .08);
  touch-action: none;
  transition: box-shadow .3s;
}
.stage.danger { animation: danger 1s ease-in-out infinite; }
@keyframes danger {
  50% { box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .35), 0 0 0 4px rgba(217, 72, 59, .55); }
}
.browser-bar {
  height: 40px;
  display: flex; align-items: center; gap: 14px;
  padding: 0 14px;
  background: #EDEBE4;
  border-bottom: 1px solid #DCD9CF;
}
.dots { display: flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #D3CFC4; }
.dots i:first-child { background: #E8776B; }
.dots i:nth-child(2) { background: #E9BE5A; }
.dots i:nth-child(3) { background: #6CC07F; }
.url {
  flex: 1; max-width: 420px; margin: 0 auto;
  height: 26px; border-radius: 8px;
  background: #fff;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: #5B6575;
}
.bar-refresh { color: #7B8494; display: grid; place-items: center; }
.bar-refresh.spin svg { animation: spin .6s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Сайт-жертва ---------- */
.site {
  --s-bg: #FBF6EE; --s-ink: #2B2118; --s-mut: #7A6858;
  --s-acc: #C8553D; --s-acc2: #E9B872; --s-card: #fff; --s-line: #EADFCF;
  position: absolute; inset: 40px 0 0;
  background: var(--s-bg);
  color: var(--s-ink);
  padding: 0 36px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  grid-template-rows: 68px auto auto 1fr 52px;
  column-gap: 32px;
  grid-template-areas: "head head" "hero img" "cta img" "cards cards" "foot foot";
}
.site a { cursor: inherit; }
.z { position: relative; transition: filter .35s; }
.z.has-top { z-index: 4; }
.s-head { grid-area: head; display: flex; align-items: center; gap: 28px; border-bottom: 1px solid var(--s-line); }
.s-logo { display: flex; align-items: center; gap: 10px; font: 600 23px/1 'Playfair Display', serif; margin-right: auto; }
.s-logo i {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--s-acc); color: #fff;
  display: grid; place-items: center;
  font: 600 16px/1 'Playfair Display', serif; font-style: normal;
}
.s-nav { display: flex; gap: 24px; font-size: 14px; font-weight: 600; color: var(--s-mut); }
.s-nav a.on { color: var(--s-ink); }
.s-phone { font-weight: 700; font-size: 14px; }
.s-burger { display: none; }
.s-hero { grid-area: hero; align-self: end; padding: 30px 0 4px; }
.s-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--s-acc); margin: 0 0 12px; }
.s-hero h1 { font: 600 46px/1.04 'Playfair Display', serif; margin: 0 0 16px; letter-spacing: -.015em; }
.s-lead { margin: 0; font-size: 16px; line-height: 1.5; color: var(--s-mut); max-width: 430px; }
.s-cta { grid-area: cta; display: flex; align-items: center; gap: 20px; padding: 20px 0 6px; align-self: start; }
.s-btn { background: var(--s-ink); color: #fff; padding: 14px 24px; border-radius: 999px; font-weight: 700; font-size: 15px; }
.s-link { font-weight: 700; font-size: 15px; color: var(--s-ink); border-bottom: 2px solid var(--s-acc2); padding-bottom: 2px; }
.s-img { grid-area: img; margin: 26px 0 0; border-radius: 22px; min-height: 0; }
.s-img__pic { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; transition: filter .35s; }
.s-img svg { width: 100%; height: 100%; display: block; }
.s-cards { grid-area: cards; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 24px 0 20px; min-height: 0; }
.s-card { background: var(--s-card); border: 1px solid var(--s-line); border-radius: 18px; padding: 20px; }
.s-card .ic { width: 38px; height: 38px; border-radius: 11px; background: #F6EBDD; color: var(--s-acc); display: grid; place-items: center; margin-bottom: 14px; }
.s-card h3 { font: 600 19px/1.2 'Playfair Display', serif; margin: 0 0 6px; }
.s-card p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--s-mut); }
.s-foot { grid-area: foot; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--s-line); font-size: 12.5px; color: var(--s-mut); }

/* Узкая раскладка — телефон */
.stage.narrow { --stage-h: 760px; }
.stage.narrow .site {
  padding: 0 18px;
  grid-template-columns: 1fr;
  grid-template-rows: 56px auto auto 128px 1fr 44px;
  grid-template-areas: "head" "hero" "cta" "img" "cards" "foot";
}
.stage.narrow .s-nav, .stage.narrow .s-phone { display: none; }
.stage.narrow .s-burger { display: grid; gap: 4px; width: 22px; }
.stage.narrow .s-burger i { height: 2px; background: var(--s-ink); border-radius: 2px; }
.stage.narrow .s-hero { padding-top: 18px; }
.stage.narrow .s-eyebrow { margin-bottom: 8px; }
.stage.narrow .s-hero h1 { font-size: 32px; margin-bottom: 10px; }
.stage.narrow .s-lead { font-size: 15px; }
.stage.narrow .s-cta { padding: 16px 0 14px; }
.stage.narrow .s-img { margin: 0; border-radius: 18px; }
.stage.narrow .s-cards { grid-template-columns: 1fr; gap: 10px; padding: 16px 0 14px; }
.stage.narrow .s-card { display: flex; gap: 14px; align-items: center; padding: 10px 14px; border-radius: 14px; }
.stage.narrow .s-card .ic { margin: 0; flex: none; }
.stage.narrow .s-card h3 { font-size: 16px; margin-bottom: 2px; }
.stage.narrow .s-card p { font-size: 12.5px; }
.stage.narrow .s-foot { font-size: 11.5px; }

/* ---------- Слои угроз ---------- */
.fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: inherit; z-index: 5; }
.fx-top { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.tui { pointer-events: auto; }
.out { transition: opacity .4s, transform .4s !important; opacity: 0 !important; }

.z.scrub { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'%3E%3Cpath d='M30 3L17 16' stroke='%235b3a1e' stroke-width='3.5' stroke-linecap='round'/%3E%3Cpath d='M15 13l6 6-6 9C11 32 3 31 2 30s-2-9 2-13z' fill='%23e9b84d' stroke='%230F172A' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M5 26l6-6M8 29l6-6M3 22l6-6' stroke='%23a07a24' stroke-width='1.2'/%3E%3C/svg%3E") 4 30, grab; }

/* Пыль */
.dust { position: absolute; inset: 0; background-size: 220px 220px; opacity: 0; transition: opacity .15s linear; }

/* Паук и паутина */
.web { position: absolute; left: 50%; top: 0; transform-origin: 50% 50%; opacity: 0; }
.web svg { width: 100%; height: 100%; display: block; overflow: visible; }
.thread { position: absolute; top: 0; width: 1px; background: rgba(43, 33, 24, .55); transition: opacity .3s; }
.spider {
  position: absolute; width: 44px; height: 44px; margin: -14px 0 0 -22px;
  display: grid; place-items: center; cursor: pointer;
  transition: top .5s var(--ease);
}
.spider svg { overflow: visible; }
.spider .legs { animation: legs .35s ease-in-out infinite alternate; transform-origin: 0 0; }
.spider.weaving svg { animation: weave 1.1s ease-in-out infinite; }
.spider.flee { top: -40% !important; transition: top .45s ease-in; }
@keyframes legs { to { transform: rotate(6deg); } }
@keyframes weave { 50% { transform: rotate(-14deg) translateY(2px); } }

/* Часы — устаревание */
.clock {
  position: absolute; height: 46px;
  display: flex; align-items: center; gap: 3px;
  cursor: pointer; touch-action: none;
}
.clock svg { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .25)); overflow: visible; }
.clock .ring-bg { fill: none; stroke: rgba(15, 23, 42, .15); stroke-width: 4; }
.clock .ring { fill: none; stroke: var(--leaf); stroke-width: 4; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transform: rotate(-90deg); stroke-linecap: round; }
.clock .year {
  padding: 2px 6px; border-radius: 6px;
  background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.clock.holding svg { transform: scale(1.12); transition: transform .15s; }
.clock:hover svg { transform: scale(1.06); }

.z.old1, .z.old1 * { font-family: "Times New Roman", Times, serif !important; letter-spacing: 0 !important; }
.z.old1 h1 { color: #000080; font-weight: 700; }
.z.old1 .s-btn { background: #D4D0C8; color: #000; border-radius: 0; border: 2px outset #fff; padding: 6px 14px; font-weight: 400; }
.z.old1 .s-link, .z.old1 .s-nav a { color: #0000EE; border: 0; text-decoration: underline; }
.z.old1.s-card, .z.old1.s-img, .z.old1 .s-img__pic, .z.old1 .ic, .z.old1 .s-logo i { border-radius: 0 !important; }
.z.old1.s-card { border: 2px groove #C0C0C0; box-shadow: none; }
.z.old2, .z.old2 * { font-family: "Comic Neue", "Comic Sans MS", cursive !important; }
.z.old2 { background: linear-gradient(#FFFFCC, #FFD966) !important; outline: 3px ridge #C0C0C0; outline-offset: -3px; }
.z.old2 h1, .z.old2 h3, .z.old2 .s-logo { color: #CC0000 !important; text-shadow: 2px 2px 0 #FFCC00; }
.z.old2 p, .z.old2 .s-foot span { color: #003399 !important; }
.z.old2 .s-btn { background: linear-gradient(#66CC33, #339900); color: #FFFF00; text-shadow: 1px 1px 0 #000; }
.z.old2 .s-img__pic { filter: sepia(.5) saturate(2.2) contrast(1.2); }
.z.old3 { overflow: hidden; background: repeating-conic-gradient(#FF9BDC 0 25%, #9BFBFF 0 50%) 0 0 / 16px 16px !important; }
.z.old3 h1, .z.old3 h3, .z.old3 .s-logo, .z.old3 .s-btn { animation: blink 1s steps(1) infinite; color: #FF0000 !important; }
.z.old3 p, .z.old3 .s-nav, .z.old3 .s-foot span { animation: marq 5s linear infinite; white-space: nowrap; }
.z.old3 .s-img__pic { filter: sepia(.8) hue-rotate(-30deg) saturate(3) contrast(1.4) blur(.8px); }
@keyframes blink { 50% { opacity: .15; } }
@keyframes marq { from { transform: translateX(60%); } to { transform: translateX(-100%); } }
.uc {
  position: absolute; left: -10%; right: -10%; top: 50%; height: 24px;
  transform: translateY(-50%) rotate(-5deg);
  background: repeating-linear-gradient(45deg, #111 0 12px, #FFD400 0 24px);
  display: grid; place-items: center;
  animation: pop-in .3s var(--ease);
}
.uc b { background: #FFD400; color: #111; font: 800 11px/1 var(--font); padding: 4px 8px; letter-spacing: .08em; }
.new-badge {
  position: absolute; right: 6px; top: 6px;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  background: #FF2D2D; color: #FFFF00;
  font: 800 13px/1 var(--font);
  clip-path: polygon(50% 0, 61% 18%, 82% 10%, 80% 32%, 100% 40%, 85% 56%, 96% 76%, 74% 78%, 68% 100%, 50% 86%, 32% 100%, 26% 78%, 4% 76%, 15% 56%, 0 40%, 20% 32%, 18% 10%, 39% 18%);
  animation: wobble .6s ease-in-out infinite alternate;
}
@keyframes wobble { to { transform: rotate(14deg) scale(1.08); } }

/* Моль */
.moth {
  position: absolute; left: 0; top: 0; width: 40px; height: 36px;
  display: grid; place-items: center; cursor: crosshair;
}
.moth .wing { animation: flap .12s ease-in-out infinite alternate; transform-origin: 0 0; }
.moth.dead { transition: transform .5s ease-in, opacity .5s; opacity: 0; }
@keyframes flap { to { transform: scaleX(.35); } }
.hole {
  position: absolute;
  background: radial-gradient(circle at 40% 40%, #2A2420, #120E0B);
  box-shadow: 0 0 0 2px rgba(255, 248, 236, .6);
  animation: pop-in .25s var(--ease);
  transition: opacity .6s, transform .6s;
}
.hole.out { transform: scale(.2); }

/* Всплывашки */
.win {
  position: absolute; width: 214px;
  background: #D4D0C8;
  border: 2px outset #fff;
  box-shadow: 4px 6px 0 rgba(0, 0, 0, .3);
  font: 13px/1.3 Tahoma, Verdana, sans-serif;
  color: #000;
  animation: win-in .3s var(--ease);
}
.win__bar {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, #0A246A, #A6CAF0);
  color: #fff; font-weight: 700; font-size: 12px;
  padding: 3px 3px 3px 7px;
}
.win__x {
  width: 20px; height: 18px; padding: 0;
  background: #D4D0C8; border: 2px outset #fff; color: #000;
  font: 700 13px/1 Tahoma, sans-serif; cursor: pointer;
}
.win__x:active { border-style: inset; }
.win__body { padding: 10px 10px 12px; display: grid; gap: 10px; justify-items: center; text-align: center; }
.win__body p { margin: 0; }
.win__ok { padding: 3px 16px; background: #D4D0C8; border: 2px outset #fff; color: #000; font: 13px Tahoma, sans-serif; cursor: pointer; }
.win.shake { animation: shake .3s; }
@keyframes win-in { from { transform: scale(.3); opacity: 0; } }
@keyframes shake { 25% { translate: -6px 0; } 75% { translate: 6px 0; } }

/* Кракозябры */
.z.glitchy { text-shadow: calc(var(--gl, 0) * 3px) 0 rgba(255, 0, 60, .55), calc(var(--gl, 0) * -3px) 0 rgba(0, 190, 255, .55); }
.enc {
  position: absolute;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 9px 5px 5px; border-radius: 10px;
  background: #111; color: #FFF; border: 0;
  font-size: 11px; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .3);
  animation: jitter .18s steps(2) infinite;
  transition: left .2s var(--ease), top .2s var(--ease);
}
.enc b { width: 22px; height: 22px; border-radius: 6px; background: #FF2D55; display: grid; place-items: center; font-size: 15px; }
@keyframes jitter { 50% { translate: 1px -1px; } }

/* Подсказка у первой угрозы */
.hint {
  position: absolute; left: 50%; bottom: calc(100% + 6px);
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--ink); color: #fff;
  font: 700 12px/1 var(--font) !important;
  padding: 6px 10px; border-radius: 8px;
  pointer-events: none !important;
  animation: hint-bob 1s ease-in-out infinite alternate;
}
.hint::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -5px; border: 5px solid transparent; border-top-color: var(--ink); }
.z.s-head .hint { bottom: auto; top: calc(100% + 6px); }
.z.s-head .hint::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--ink); }
@keyframes hint-bob { to { translate: 0 -4px; } }

/* Кэш-щит */
.shield {
  position: absolute; inset: -5px;
  border-radius: 14px;
  border: 2px solid var(--leaf);
  background: linear-gradient(115deg, rgba(46, 158, 79, .07), rgba(255, 255, 255, .5) 45%, rgba(46, 158, 79, .07) 60%);
  background-size: 300% 100%;
  animation: shimmer 2s linear infinite, pop-in .3s var(--ease);
  pointer-events: none;
}
.shield span {
  position: absolute; right: 8px; top: -11px;
  background: var(--leaf); color: #fff;
  font: 800 11px/1 var(--font) !important;
  padding: 5px 7px; border-radius: 6px;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.stage.targeting .z { outline: 2px dashed rgba(46, 158, 79, .45); outline-offset: 3px; cursor: crosshair !important; }
.stage.targeting .z:hover { outline: 3px solid var(--leaf); background-color: rgba(46, 158, 79, .07); }

/* Заморозка */
.frost {
  position: absolute; inset: 40px 0 0;
  pointer-events: none; opacity: 0; transition: opacity .4s;
  box-shadow: inset 0 0 90px 10px rgba(140, 200, 255, .75);
  background: radial-gradient(ellipse at center, transparent 55%, rgba(200, 230, 255, .35));
  z-index: 30;
}
.stage.frozen .frost { opacity: 1; }
.stage.frozen .moth .wing, .stage.frozen .spider .legs, .stage.frozen .spider svg, .stage.frozen .enc { animation-play-state: paused; }

/* Обновление: волна сверху вниз */
.sweep {
  position: absolute; left: 0; right: 0; top: 40px; height: 140px;
  pointer-events: none; opacity: 0; z-index: 31;
  background: linear-gradient(to bottom, rgba(46, 158, 79, 0), rgba(46, 158, 79, .2) 85%, #2E9E4F 100%);
  transform: translateY(-140px);
}
.sweep.go { animation: sweep .75s ease-in forwards; }
@keyframes sweep {
  0% { opacity: 1; transform: translateY(-140px); }
  92% { opacity: 1; }
  100% { opacity: 0; transform: translateY(calc(var(--stage-h) - 40px)); }
}

/* Частицы */
.fx-stage { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.pt { position: absolute; left: 0; top: 0; pointer-events: none; }
.pt.puff { width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: rgba(160, 148, 128, .55); animation: puff .6s ease-out forwards; }
.pt.strand { width: 18px; height: 1.5px; margin: -1px -9px; background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .25); animation: puff .5s ease-out forwards; }
.pt.spark { width: 8px; height: 8px; margin: -4px; background: var(--leaf); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: spark .7s ease-out forwards; }
.pt.score { font: 800 16px/1 var(--font); color: var(--leaf-ink); text-shadow: 0 1px 0 #fff, 0 0 6px #fff; transform: translate(-50%, -50%); animation: rise .9s ease-out forwards; white-space: nowrap; }
.pt.score.minus { color: var(--bad); }
@keyframes puff { to { transform: translate(var(--dx), var(--dy)) scale(2.2); opacity: 0; } }
@keyframes spark { 0% { transform: scale(.4); } 100% { transform: translate(var(--dx), var(--dy)) scale(1.3) rotate(90deg); opacity: 0; } }
@keyframes rise { to { transform: translate(-50%, -150%); opacity: 0; } }
@keyframes pop-in { from { transform: scale(.4); opacity: 0; } }
@keyframes pulse { 50% { opacity: .55; } }

/* Подсказки по ходу игры: что сделала способность, как правильно убрать атаку */
.tip {
  position: absolute; z-index: 46;
  transform: translate(-50%, -100%);
  width: max-content; max-width: 260px;
  background: var(--ink); color: #fff;
  font: 700 13px/1.3 var(--font); text-align: center;
  padding: 7px 11px; border-radius: 9px;
  box-shadow: 0 10px 24px -12px rgba(15, 23, 42, .6);
  pointer-events: none;
  animation: tip-in .25s var(--ease), tip-out .35s ease-in forwards var(--life, 1.8s);
}
.tip--say { left: 50% !important; top: auto !important; bottom: 18px; transform: translateX(-50%); max-width: calc(100% - 32px); font-size: 14px; padding: 9px 14px; }
.tip--good { background: var(--leaf-ink); }
.tip--ice { background: #1E5A8C; }
@keyframes tip-in { from { opacity: 0; translate: 0 6px; } }
@keyframes tip-out { to { opacity: 0; translate: 0 -6px; } }

/* Тост уровня */
.toast {
  position: absolute; left: 50%; top: 54px; z-index: 45;
  transform: translate(-50%, -20px); opacity: 0;
  width: max-content; max-width: min(520px, calc(100% - 32px));
  background: var(--ink); color: #fff;
  border-radius: 14px; padding: 12px 16px;
  display: flex; gap: 12px; align-items: center;
  box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .6);
  transition: opacity .3s, transform .3s var(--ease);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast__ic { width: 38px; height: 38px; flex: none; border-radius: 10px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; }
.toast b { display: block; font-size: 15px; margin-bottom: 2px; }
.toast span { font-size: 13px; line-height: 1.4; color: #C9D1DD; }

/* Оверлеи */
.ov {
  position: absolute; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: rgba(246, 245, 240, .78);
  backdrop-filter: blur(6px);
  padding: 20px;
}
.ov[hidden] { display: none; }
.ov__card {
  width: 100%; max-width: 640px;
  background: #fff; border-radius: 22px;
  padding: 30px 34px;
  box-shadow: 0 30px 60px -30px rgba(15, 23, 42, .45), 0 0 0 1px rgba(15, 23, 42, .06);
  animation: pop-in .35s var(--ease);
}
.ov__card--small { max-width: 380px; text-align: center; }
.ov__kicker { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--leaf); }
.ov h2 { margin: 0 0 10px; font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.ov__lead { margin: 0 0 24px; font-size: 15px; line-height: 1.5; color: #4A5568; }
.btn-main {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 180px; height: 50px; padding: 0 28px;
  border: 0; border-radius: 14px;
  background: var(--leaf); color: #fff;
  font-size: 16px; font-weight: 800; cursor: pointer;
  box-shadow: 0 10px 22px -10px rgba(46, 158, 79, .8);
  transition: transform .15s, background .2s;
}
.btn-main:hover { background: var(--leaf-ink); }
.btn-main:active { transform: scale(.97); }
.results { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 8px 0 22px; }
.results div { background: #F6F5F0; border-radius: 12px; padding: 12px; }
.results small { display: block; font-size: 11px; font-weight: 700; color: var(--pencil); text-transform: uppercase; letter-spacing: .06em; }
.results b { font-size: 22px; font-variant-numeric: tabular-nums; }
.results .rec { grid-column: 1 / -1; background: rgba(46, 158, 79, .1); color: var(--leaf-ink); font-weight: 800; text-align: center; font-size: 14px; }
.cta-real { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rule); }
.cta-real p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: #4A5568; }
.cta-real p b { color: var(--ink); }
.cta-real__links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.cta-real a { font-weight: 800; font-size: 14px; color: var(--leaf-ink); text-decoration: none; border-bottom: 2px solid rgba(46, 158, 79, .3); }
.stage.narrow .ov__card { padding: 22px 20px; }
.stage.narrow .ov h2 { font-size: 28px; }
.stage.narrow .results { grid-template-columns: 1fr 1fr; }

/* ---------- Способности ---------- */
.dock { display: flex; justify-content: center; gap: 12px; padding: 12px 16px 16px; }
.ab {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px 9px 10px; min-width: 200px;
  background: #fff; border: 1px solid var(--rule); border-radius: 14px;
  cursor: pointer; text-align: left;
  transition: border-color .2s, transform .15s, opacity .2s;
}
.ab:hover:not(.off) { border-color: var(--leaf); }
.ab:active:not(.off) { transform: scale(.97); }
.ab::before {
  content: ""; position: absolute; inset: 0;
  background: conic-gradient(rgba(15, 23, 42, .1) calc(var(--cd, 0) * 360deg), transparent 0);
  pointer-events: none;
}
.ab__ic { width: 38px; height: 38px; flex: none; border-radius: 10px; background: rgba(46, 158, 79, .12); color: var(--leaf-ink); display: grid; place-items: center; }
.ab__txt { display: grid; line-height: 1.2; margin-right: auto; }
.ab__txt b { font-size: 14px; font-weight: 800; }
.ab__txt small { font-size: 12px; color: var(--pencil); font-weight: 600; }
.ab__count {
  position: absolute; left: 36px; top: 5px;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px;
  background: var(--leaf); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}
.ab__lock { display: none; position: absolute; inset: 0; background: #F1EFE8; font-size: 12px; font-weight: 800; color: var(--pencil); place-items: center; }
.ab.locked .ab__lock { display: grid; }
.ab.off { cursor: default; }
.ab.cooling .ab__ic { background: #EEECE5; color: var(--pencil); }
.ab.active { border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(46, 158, 79, .25); }
.ab.ready-flash { animation: ready .5s; }
@keyframes ready { 50% { transform: scale(1.05); border-color: var(--leaf); } }

@media (max-width: 760px) {
  .hud { gap: 10px; padding: 8px 10px; }
  .brand span, .stat--best, .stat:has(#time) { display: none; }
  .brand { margin-right: 0; }
  .brand img { width: 26px; height: 26px; }
  .meter { flex: 1 1 auto; }
  .meter__label { font-size: 11px; margin-bottom: 4px; }
  .stat { min-width: 0; font-size: 10px; }
  .stat b { font-size: 16px; }
  .icon-btn { width: 34px; height: 34px; border-radius: 10px; }
  .arena { padding: 0 6px; }
  .dock { gap: 6px; padding: 8px 8px max(10px, env(safe-area-inset-bottom)); }
  .ab { min-width: 0; flex: 1; flex-direction: column; gap: 4px; padding: 8px 4px 7px; text-align: center; }
  .ab__txt { margin: 0; }
  .ab__txt small, .ab kbd { display: none; }
  .ab__txt b { font-size: 12px; }
  .ab__ic { width: 34px; height: 34px; }
  .ab__count { left: calc(50% + 8px); top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .z.old3 h1, .z.old3 h3, .z.old3 .s-logo, .z.old3 .s-btn { animation: none; }
}

/* Интерфейс угроз не наследует «устаревшие» шрифты блока */
.z .tui:not(.win), .z .tui:not(.win) *, .z .uc b, .z .new-badge { font-family: var(--font) !important; letter-spacing: normal !important; }
.z .win, .z .win * { font-family: Tahoma, Verdana, sans-serif !important; letter-spacing: normal !important; }
.z .clock { z-index: 2; }

/* Телефон: крупнее области касания */
body { -webkit-touch-callout: none; }
.stage.narrow .moth { width: 56px; height: 56px; }
.stage.narrow .spider { width: 56px; height: 56px; margin: -18px 0 0 -28px; }
.stage.narrow .win { width: 196px; }
.stage.narrow .win__x { width: 34px; height: 28px; font-size: 18px; }
.stage.narrow .clock { transform: scale(1.12); transform-origin: 0 0; }
.stage.narrow .enc { padding: 8px 12px 8px 8px; }
.stage.narrow .toast { top: 48px; }
