/* Экраны прототипа. Координаты — px эталонного кадра 1080×2340. */

/* ================= общий верх матча: ресурсы, волна, портреты ================= */
.m-hud { position: absolute; left: 0; top: 162px; width: 1080px; height: 100px; z-index: 2; pointer-events: none; }   /* плашки поверх поля: шапки нет, врагов видно сквозь панель */
.m-hud .pills { position: absolute; left: 30px; top: 11px; display: flex; gap: 16px; }
.m-wave { position: absolute; display: grid; justify-items: end; grid-template-rows: auto 1fr; right: 30px; top: 2px; width: 240px; height: 96px; text-align: right; }
.m-wave .w { font-size: 36px; font-weight: 800; color: var(--muted); }
.m-wave .w b { color: var(--text); }
.m-wave .timer { font-size: 52px; font-weight: 900; font-variant-numeric: tabular-nums; display: inline-block; transform-origin: 100% 50%; }
.m-wave .timer, .m-wave .round-clock { grid-area: 2 / 1; align-self: start; transition: opacity 240ms ease-in-out; }
.battle .m-wave .timer { opacity: 0; }
.battle .round-clock { opacity: 1; }
.round-clock { opacity: 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 4px; padding: 2px 15px 3px; border-radius: 22px;
  background: #342b38dc; color: #ffe5b6; font-size: 32px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15; }
.round-clock .gi { width: 27px; height: 27px; flex: none; }

.m-ports { position: absolute; left: 30px; top: 274px; z-index: 2; display: flex; gap: 16px; }
.port { position: relative; width: 80px; height: 80px; border-radius: 50%; border: 4px solid #000; background: #35506b; box-shadow: 0 0 0 3px var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 900; color: #dfe9f5; }
.port.me { box-shadow: 0 0 0 4px var(--ember); }
.port .wv { position: absolute; right: -10px; bottom: -8px; min-width: 36px; height: 36px; border-radius: 18px; background: #000; border: 2px solid var(--line); font-size: 22px; line-height: 32px; text-align: center; color: var(--text); }
.port.out { filter: grayscale(1) brightness(.45); }
.m-biome { position: absolute; right: 30px; top: 274px; z-index: 2; height: 80px; display: flex; align-items: center; gap: 14px; padding: 0 26px 0 8px; border-radius: 40px; background: rgba(0,0,0,.55); border: 3px solid var(--line); }
.m-biome .bi { width: 64px; height: 64px; border-radius: 50%; border: 3px solid #000; }
.m-biome b { font-size: 30px; display: block; } .m-biome span { font-size: 22px; color: var(--muted); display: block; }

/* ================= поле боя ================= */
.m-bf { position: absolute; left: 0; top: 0; width: 1080px; height: 1058px; overflow: hidden; transition: height var(--morph, 500ms) cubic-bezier(.45,0,.28,1); }
.battle .m-bf { height: 2082px; }
.m-bf canvas { position: absolute; left: 0; bottom: 0; width: 1080px; height: 2082px; touch-action: none; }
/* полоса здоровья героя 440×44 под героем: заливка, щит 10 px поверх, числа */
.m-vitals { position: absolute; left: 50%; bottom: 24px; width: 440px; transform: translateX(-50%); display: grid; gap: 6px; pointer-events: none; }
.m-life { position: relative; width: 100%; height: 44px; border-radius: 22px; background: rgba(12, 11, 16, .82); border: 4px solid #000; box-shadow: 0 0 0 3px rgba(111, 208, 140, .7); overflow: hidden; }
.m-life .hp { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#8fe07a, #3f9a4a); }
.m-life .sh { position: absolute; left: 0; top: 0; height: 10px; background: var(--souls); }
.m-life .tx { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; text-shadow: 0 2px 0 #000, 0 0 6px #000; white-space: nowrap; font-variant-numeric: tabular-nums; }
.m-life.low .hp { background: linear-gradient(#ff8a7a, #c2302c); }
.m-life.low { box-shadow: 0 0 0 3px var(--bad); }
.m-life.shielded { box-shadow: 0 0 0 3px var(--souls); }
.s-match:not(.battle) .m-life { transition: box-shadow 240ms ease-in-out; }
.s-match:not(.battle) .m-life :is(.hp, .sh) { transition: width 240ms ease-in-out; }
/* От стоп героя до верхней кромки здоровья 56 px. Средние 44 px занимает ряд проклятий. */
.m-status { height: 44px; display: flex; justify-content: flex-start; align-items: center; gap: 6px; }
.st-chip { flex: 0 1 44px; aspect-ratio: 1; min-width: 0; border-radius: 50%; display: grid; place-items: center; color: #171321;
  background: conic-gradient(var(--c) calc(var(--p, 1) * 360deg), #3a3648 0); border: 3px solid #302435; }
.st-chip .gi { width: 74%; height: 74%; }
.m-bf .hud-btns { position: absolute; left: 30px; top: 372px; display: flex; flex-direction: column; gap: 20px; }
.m-bf .hud-btns .only-battle { opacity: 0; pointer-events: none; transition: opacity 300ms; }
.battle .m-bf .hud-btns .only-battle { opacity: 1; pointer-events: auto; }
.m-elite { position: absolute; left: 220px; top: 286px; width: 640px; opacity: 0; transition: opacity 200ms; pointer-events: none; }
.m-elite.on { opacity: 1; }
.m-elite .nm { text-align: center; font-size: 30px; font-weight: 800; margin-bottom: 6px; text-shadow: 0 2px 0 #000; }
.m-elite .bar { height: 30px; border-radius: 15px; background: rgba(0,0,0,.75); border: 3px solid #000; overflow: hidden; }
.m-elite .bar i { display: block; height: 100%; background: linear-gradient(#ff7a6a, #c2302c); }
.m-stone { position: absolute; right: 30px; bottom: 26px; width: 150px; height: 150px; }

/* ================= плита Круга: одна строка слотов 120×120, от 4 до 8 ================= */
.m-circle { position: absolute; left: 0; top: 1068px; width: 1080px; height: 160px; background: linear-gradient(#24212f, #1b1924); border-top: 4px solid #000; border-bottom: 4px solid #000;
  transition: top var(--morph, 500ms) cubic-bezier(.45,0,.28,1); z-index: 3; }
.battle .m-circle { top: 2082px; }                     /* строка Круга кончается на 2242 — выше полосы жестов */
.grid { position: absolute; display: grid; }
.grid.circle { left: 0; top: 20px; width: 1080px; display: flex; justify-content: center; gap: 12px; }
.grid.reserve { left: 55px; top: 20px; grid-template-columns: repeat(6, 150px); gap: 14px; }

/* ================= плита Запаса и кнопки ================= */
.m-reserve { position: absolute; left: 0; top: 1248px; width: 1080px; height: 846px; background: #15131c; transition: transform var(--morph, 500ms) cubic-bezier(.45,0,.28,1); }
.m-actions { position: absolute; left: 0; top: 2098px; width: 1080px; height: 130px; transition: transform var(--morph, 500ms) cubic-bezier(.45,0,.28,1); }
.battle .m-reserve, .battle .m-actions { transform: translateY(1024px); pointer-events: none; }
.m-actions .btn { position: absolute; top: 0; }
.m-actions .b-summon { left: 20px; } .m-actions .b-cleanse { left: 340px; }
.m-actions .b-fight { left: 680px; width: 380px; height: 120px; font-size: 56px; }
.m-actions .b-cleanse.armed { outline: 6px solid var(--good); outline-offset: 4px; }
.m-actions .btn .sub { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.m-actions .btn .sub.lack { color: var(--bad); }
.m-actions .b-fight { display: grid; place-items: center; }
.b-fight .lbl, .b-fight .dispel-label { grid-area: 1 / 1; transition: opacity 220ms ease-in-out; }
.b-fight .dispel-label { opacity: 0; color: #fff1e4; }
.dragging .b-fight .lbl { opacity: 0; }
.dragging .b-fight .dispel-label { opacity: 1; }
.b-fight::before { transition: filter 320ms ease-in-out; }
.dragging .b-fight::before { filter: hue-rotate(-52deg) saturate(.62) brightness(.77); }
.dragging .b-fight.over::before { filter: hue-rotate(-52deg) saturate(.83) brightness(.94); }

/* ================= клетки и руны ================= */
.cell { position: relative; width: 150px; height: 150px; border-radius: 26px; background: rgba(255,255,255,.045); border: 3px solid rgba(255,255,255,.1); }
.cell.locked { border-style: dashed; border-color: rgba(182,140,255,.45); background: rgba(0,0,0,.35); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.cell.locked .lock { font-size: 40px; opacity: .7; }
.cell.locked .price { font-size: 30px; }
.cell.over { border-color: #fff; background: rgba(255,255,255,.14); }
.cell.stone-slot { border-radius: 20px; border-color: rgba(200,106,106,.6); background: rgba(0,0,0,.5); }
/* доска слияния: туман, руна под скверной, тайник */
.cell.fog { border-color: transparent; }
.cell.web { border-color: rgba(122, 79, 168, .7); background: rgba(40, 22, 60, .55); }
.rune.webbed { cursor: pointer; box-shadow: none; }
.cleansing:not(.dragging) .rune.webbed { outline: 6px solid var(--good); outline-offset: 2px; }
.cell.cache { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 5px solid var(--ether); background: rgba(50, 36, 80, .7); cursor: pointer; }
.cell.cache .q { font-size: 64px; font-weight: 900; line-height: 1; color: var(--ether); }
/* слот Круга под запретом: заклинание молчит */
.cell.silenced::after { content: ''; position: absolute; inset: -4px; border-radius: 24px; border: 6px solid #c77dff; background: repeating-linear-gradient(45deg, rgba(199, 125, 255, .55) 0 10px, rgba(20, 12, 30, .7) 10px 20px); z-index: 4; }
/* слот Круга 120×120: руна 128×128 показана в масштабе 0,8 (свойство scale не мешает анимациям transform) */
.cell.c-slot { width: 120px; height: 120px; border-radius: 22px; flex: none; }
.cell.c-slot .rune { left: -4px; top: -4px; scale: .8; }
.cell.c-slot .rune .nm { display: none; }
.cell.c-slot .rune .g { font-size: 60px; }
.cell.c-slot.locked { gap: 2px; }
.cell.c-slot.locked .lock { font-size: 34px; font-weight: 800; line-height: 1; color: var(--ether); opacity: .9; }
.cell.c-slot.locked .price { font-size: 26px; height: 36px; padding: 0 10px 0 2px; }
.rune { position: absolute; left: 11px; top: 11px; width: 128px; height: 128px; border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.rune .g { font-size: 50px; font-weight: 900; line-height: 1; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.6); }
.rune .nm { font-size: 16px; font-weight: 700; color: rgba(255,255,255,.8); margin-top: 4px; max-width: 116px; text-align: center; line-height: 1.05; }
.rune .lv { position: absolute; right: -12px; top: -12px; z-index: 2; width: 46px; height: 46px; border-radius: 50%; background: #0c0b10; border: 3px solid var(--rar, #8d99a6); font-size: 28px; font-weight: 900; line-height: 40px; text-align: center; }
.rune.ghosted { visibility: hidden; pointer-events: none; }
.price { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px 0 4px; border-radius: 20px; background: rgba(0,0,0,.78); font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.price.lack { color: var(--bad); }
.drag-ghost { position: absolute; pointer-events: none; left: 0; top: 0; filter: drop-shadow(0 12px 9px #17131f66); }
.drag-ghost .rune { position: static; }
.drag-ghost .rune > .g { transform: scale(1.12); }
.income-float { left: 50%; top: 22px; font-size: 36px; z-index: 5; pointer-events: none; }

/* ================= выбор усиления (M-03, M-06) ================= */
.pick-title { position: absolute; left: 0; top: 500px; width: 1080px; text-align: center; font-size: 76px; font-weight: 900; }
.pick-sub { position: absolute; left: 0; top: 600px; width: 1080px; text-align: center; font-size: 40px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.pick-cards { position: absolute; left: 60px; top: 700px; display: flex; gap: 30px; perspective: 1600px; }
.pcard { position: relative; width: 300px; height: 520px; border-radius: 30px; background: var(--panel); border: 6px solid var(--rar); box-shadow: 0 0 0 4px #000, 0 16px 40px rgba(0,0,0,.6);
  display: flex; flex-direction: column; align-items: center; padding: 0 16px 16px; cursor: pointer; }
.pcard .rar { width: calc(100% + 32px); height: 44px; background: var(--rar); color: #0b0a10; font-size: 24px; font-weight: 900; line-height: 44px; text-align: center; border-radius: 22px 22px 0 0; letter-spacing: .04em; }
.pcard .art { position: relative; flex: none; width: 200px; height: 200px; margin-top: 12px; display: grid; place-items: center; font-size: 84px; font-weight: 900; color: #fff; }
.pcard .rar { flex: none; }
.pcard .ttl, .pcard .txt { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; text-align: center; }
.pcard .ttl { flex: none; margin-top: 13px; font-size: 34px; font-weight: 900; line-height: 1.1; -webkit-line-clamp: 2; }
.pcard .card-description { flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }
.pcard .txt { font-size: 27px; color: var(--muted); line-height: 1.2; -webkit-line-clamp: 4; }
.pick-btns { position: absolute; left: 90px; top: 1290px; width: 900px; display: flex; justify-content: space-between; }
.pick-timer { position: absolute; left: 0; top: 1450px; width: 1080px; text-align: center; font-size: 28px; color: var(--muted); }

/* ================= H-01 Поход ================= */
.s-result .bg, .s-startpick .bg { position: absolute; left: 0; top: 0; }
.h-top { position: absolute; left: 30px; top: 172px; right: 30px; display: flex; align-items: center; gap: 16px; }
.h-top .sp { flex: 1; }
.h-title { position: absolute; left: 0; top: 310px; width: 1080px; text-align: center; }
.h-title .ch { font-size: 84px; font-weight: 900; }
.h-title .ty { display: inline-block; margin-top: 8px; padding: 6px 28px; border-radius: 30px; background: var(--ember); color: #160c04; font-size: 34px; font-weight: 800; }
.h-title .pw { margin-top: 16px; font-size: 34px; color: var(--muted); } .h-title .pw b { color: var(--good); }
.h-side { position: absolute; top: 520px; display: flex; flex-direction: column; gap: 26px; }
.h-side.l { left: 30px; } .h-side.r { right: 30px; }
.h-side .it { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 22px; color: var(--muted); cursor: pointer; }
.h-chests { position: absolute; left: 140px; top: 1640px; width: 800px; height: 170px; }
.h-chests .line { position: absolute; left: 65px; right: 65px; top: 56px; height: 18px; border-radius: 9px; background: #0c0b10; border: 3px solid #000; overflow: hidden; }
.h-chests .line i { display: block; height: 100%; background: var(--gold); }
.h-chests .ch { position: absolute; top: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 24px; color: var(--muted); }
.h-chests .ch.got .ph { filter: brightness(1.5) saturate(1.4); border-color: var(--gold); }
.h-fight { position: absolute; left: 110px; top: 1850px; width: 420px; }
.h-fight.h-serp { left: 550px; }                         /* второй вход: бой со змеем */
.h-cost { position: absolute; left: 0; top: 2030px; width: 1080px; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 32px; color: var(--muted); }
.h-nav { position: absolute; left: 0; top: 2100px; width: 1080px; height: 240px; padding-bottom: 93px; background: #111016; border-top: 4px solid #000; display: flex; }
.h-nav .tab { width: 216px; height: 150px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 26px; font-weight: 700; color: var(--muted); cursor: pointer; }
.h-nav .tab.on { color: var(--text); background: linear-gradient(#2c2939, #1b1924); box-shadow: 0 -6px 0 var(--ember) inset; }
.h-nav .tab .ph { width: 96px; height: 96px; font-size: 40px; }

/* ================= M-01 Подбор ================= */
.party-panel { position: absolute; top: 242px; left: 50%; translate: -50% 0; width: 606px; padding: 25px 43px 30px;
  color: #f7e9cc; border: 3px solid #9e8062; border-bottom-color: #6c594e; border-radius: 34px 12px;
  background: linear-gradient(155deg,#38433e,#222d2e 68%,#262b2c); box-shadow: inset 0 2px 0 #e4c69735, 0 9px 18px #37222b55; }
.party-heading, .party-seats { display: flex; align-items: center; justify-content: space-between; }
.party-heading { gap: 20px; margin-bottom: 20px; }
.party-heading .mt-title { margin: 0; font-size: 50px; line-height: 1.1; font-weight: 850; }
.party-heading .mt-timer { color: #e1be85; font-size: 36px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.party-seats { position: relative; padding-inline: 10px; }
.party-seats::before { content: ''; position: absolute; left: 44px; right: 44px; top: 50%; height: 3px; background: #756855; }
.party-seat { position: relative; display: grid; place-items: center; width: 69px; height: 69px; border-radius: 50%; overflow: hidden;
  background: #20292a; border: 3px solid #605d52; transition: border-color 320ms ease; }
.party-seat::before { content: ''; width: 12px; height: 12px; rotate: 45deg; background: #817865; }
.party-seat .gi { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 360ms ease-out; }
.party-seat.arrived { border-color: #b7a27a; }
.party-seat.mine, .party-panel.complete .party-seat { border-color: #e3b864; }
.party-seat.arrived .gi { opacity: 1; }
.sc-hud::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 480ms ease;
  background: radial-gradient(ellipse at 50% 54%,transparent 30%,#4e283114 62%,#3926305c 100%); }
.ph-match .sc-hud::before { opacity: 1; }

/* ================= M-02 Забег к порталам ================= */
/* карта 2400×3600 двигается под экраном: герой игрока всегда в точке (540, 1240) */
/* общая сцена хаба, подбора и забега: карта масштабируется и сдвигается камерой */
.pt-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.sc-hud { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.h-top, .h-title, .h-side, .h-chests, .h-fight, .h-cost, .h-nav { z-index: 3; }
.pt-ground { position: absolute; left: 0; top: 0; border-radius: 0; }
.pt-decor { position: absolute; border-radius: 40px; background-color: #2a2738; font-size: 22px; color: rgba(255,255,255,.35); }
.portal-prompt, .portal-instruction { position: absolute; display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-radius: 35px; background: #203032ed; color: #fff1d2; box-shadow: 0 3px 10px #271a2480, inset 0 0 0 2px #a68661; white-space: nowrap; font-size: 34px; font-weight: 800; pointer-events: none; }
.portal-prompt { top: 160px; left: 46px; }
.portal-prompt .gi { width: 35px; height: 35px; color: #dfbd82; }
.portal-instruction { bottom: 105px; left: 50%; transform: translateX(-50%); transition: opacity 200ms ease-in-out; }
.sc-hud:has(.portal-preview.visible) .portal-instruction, .phase-changing .portal-instruction { opacity: 0; }
.pt-timer { position: relative; font-variant-numeric: tabular-nums; color: #f6d598; line-height: 1; }
.pt-mark { position: absolute; width: 120px; height: 60px; border-radius: 50%; background: radial-gradient(ellipse, transparent 16%, #f0ce9f85 22%, transparent 38%); pointer-events: none; }
.pt-arrow { position: absolute; left: 0; top: 0; width: 74px; height: 74px; display: grid; place-items: center; pointer-events: none; border-radius: 50%; background: color-mix(in srgb, var(--bc) 27%, #29242a); box-shadow: inset 0 0 0 3px #d6b582ab, 0 3px 10px #30212c90; }
.pt-arrow > .gi { width: 44px; height: 44px; color: #f4dfb7; }
.pt-arrow .direction { position: absolute; inset: 0; }
.pt-arrow .direction::after { content: ''; position: absolute; top: 28px; right: -12px; width: 18px; height: 18px; border-top: 5px solid #eed3a0; border-right: 5px solid #eed3a0; rotate: 45deg; }
.portal { position: absolute; width: 300px; display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none; }
.portal .gate { position: relative; width: 288px; height: 304px; isolation: isolate; }
.portal .gate::before { content: ''; position: absolute; left: -9%; right: -9%; bottom: -6%; height: 19%; background: radial-gradient(ellipse at 22% 53%, #24182394, transparent 31%), radial-gradient(ellipse at 79% 53%, #24182394, transparent 31%), radial-gradient(ellipse at 49% 38%, color-mix(in srgb, var(--bc) 46%, transparent), transparent 40%), radial-gradient(ellipse, #2d1d2d66, transparent 68%); }
.portal .swirl { position: absolute; left: 20%; right: 24%; top: 20%; bottom: 3%; overflow: hidden; isolation: isolate; border-radius: 52% 52% 8% 8% / 34% 34% 5% 5%; background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--bc) 68%, #4b665e), transparent 64%), linear-gradient(#251d33, #302a3c 65%, #3e3940); }
.portal-current { position: absolute; inset: -12%; background: radial-gradient(ellipse at 41% 86%, color-mix(in srgb, var(--bc) 43%, #efdeb9) 0%, transparent 12%), radial-gradient(ellipse at 57% 57%, color-mix(in srgb, var(--bc) 70%, #e6ddca) 0%, transparent 8%), radial-gradient(ellipse at 34% 19%, color-mix(in srgb, var(--bc) 65%, #b4a9c9), transparent 41%), radial-gradient(ellipse at 74% 76%, var(--bc), transparent 37%); }
.portal-current::before { content: ''; position: absolute; inset: 15% 22% 4% 23%; border-radius: 62% 38% 60% 40%; transform: rotate(16deg); box-shadow: inset 5px -2px 7px -3px color-mix(in srgb, var(--bc) 42%, #ead8b9), inset -3px 4px 10px -5px var(--bc); }
.portal .swirl::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 12px 21px #17111b90, inset 0 -6px 18px color-mix(in srgb, var(--bc) 65%, transparent); }
.portal .gate::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: url(../assets/art/portal.webp) center / contain no-repeat; }
.portal .own { position: absolute; z-index: 1; left: 50%; top: 56%; translate: -50% -50%; width: 76px; height: 76px; opacity: 0; }
.portal.closed .own { opacity: 1; }
.gate-flash { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 62%, #f2d79d99, transparent 67%); pointer-events: none; }
.gate-name { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 22px; color: #f6e5c6; background: #28252ce6; font-size: 29px; font-weight: 750; white-space: nowrap; box-shadow: 0 3px 7px #2c212755; transition: opacity 220ms ease-in-out; }
.gate-name .gi { width: 34px; height: 34px; color: color-mix(in srgb, var(--bc) 40%, #fff0ce); }
.portal.focused .gate-name, .portal.taken .gate-name, .ph-home .gate-name, .ph-match .gate-name { opacity: 0; }
.portal-preview { position: absolute; left: 80px; right: 80px; bottom: 105px; display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: center; padding: 25px 36px; border-radius: 25px; background: linear-gradient(100deg, #203535f5, #29272ef0); box-shadow: inset 0 2px color-mix(in srgb, var(--bc) 55%, #dcc499), 0 5px 22px #281e2b66; color: #f9e9cc; opacity: 0; transition: opacity 230ms ease-in-out; pointer-events: none; }
.portal-preview.visible { opacity: 1; }
.portal-preview > b { display: flex; align-items: center; gap: 13px; font-size: 40px; }
.portal-preview > b .gi { width: 46px; height: 46px; color: color-mix(in srgb, var(--bc) 40%, #f4e2bc); }
.gate-traits { grid-column: 1; font-size: 33px; line-height: 1.18; display: flex; flex-wrap: wrap; gap: 5px 20px; color: #c9e4c6; }
.gate-traits span + span { color: #f1b69b; }
.gate-reward { grid-column: 2; grid-row: 1 / 3; display: grid; justify-items: center; color: #f5ce86; font-size: 31px; font-weight: 800; }
.gate-reward .gi { width: 66px; height: 66px; }
.pt-beam { position: absolute; height: 26px; border-radius: 50%; transform-origin: 0 50%; pointer-events: none; background: radial-gradient(ellipse, color-mix(in srgb, var(--bc) 56%, #fae5c2), transparent 71%); opacity: .70; }
.runner { position: absolute; left: 0; top: 0; width: 200px; height: 250px; pointer-events: none; }
.runner .nm { position: absolute; left: 0; right: 0; top: -6px; text-align: center; font-size: 26px; font-weight: 800; text-shadow: 0 2px 0 #000; transition: opacity 150ms; }
.ph-match .runner .nm { left: 50%; right: auto; top: -11px; translate: -50% 0; padding: 4px 12px; border-radius: 17px;
  background: #302a2ed9; color: #f2dfbb; font-size: 23px; line-height: 1.1; text-shadow: none; }
/* свой герой отмечен кольцом под ногами, без подписи */
.runner.in .nm { opacity: 0; }
.runner .r-body { position: relative; width: 200px; height: 250px; transform-origin: 100px 130px; }   /* вращение вокруг центра тела */
.runner .r-body canvas { position: absolute; bottom: 0; left: 50%; translate: -50% 0; }
.battle .cell.c-slot.locked { opacity: .35; pointer-events: none; }

/* ================= M-15 Итог ================= */
.rs-title { position: absolute; left: 90px; top: 200px; width: 900px; height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rs-title .t { font-size: 120px; font-weight: 900; letter-spacing: .03em; }
.rs-title.win .t { color: var(--gold); } .rs-title.lose .t { color: var(--bad); }
.rs-title .s { font-size: 40px; color: var(--muted); }
.rs-hero { position: absolute; left: 360px; top: 435px; }
.rs-table { position: absolute; left: 140px; top: 935px; width: 800px; display: flex; flex-direction: column; gap: 10px; }
.rs-row { display: flex; align-items: center; gap: 20px; height: 76px; padding: 0 26px; border-radius: 20px; background: rgba(0,0,0,.5); border: 3px solid var(--line); font-size: 34px; }
.rs-row.me { border-color: var(--ember); background: rgba(224,118,58,.16); font-weight: 800; }
.rs-row .pl { width: 50px; font-weight: 900; color: var(--gold); } .rs-row .nm { flex: 1; } .rs-row .wv { color: var(--muted); }
.rs-row.lost { background: #351f26ee; border-color: #86505b; }
.rs-row.lost .wv { color: #ffb3aa; }
.rs-row.lost.me { border-color: #f2bd72; box-shadow: inset 8px 0 #c86b63; }
.rs-row.won .wv { color: #c1e8be; }
.rs-rewards { position: absolute; left: 0; top: 1450px; width: 1080px; }
.rs-rewards .cap { text-align: center; font-size: 44px; font-weight: 800; margin-bottom: 20px; }
.rs-rewards .list { display: flex; justify-content: center; gap: 30px; }
.rw { width: 190px; height: 230px; border-radius: 26px; background: var(--panel); border: 4px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 36px; font-weight: 900; }
.rw .ico { width: 110px; height: 110px; font-size: 60px; }
.rs-bonus { text-align: center; font-size: 30px; color: var(--muted); margin-top: 18px; }
.rs-btns { position: absolute; left: 0; top: 1900px; width: 1080px; display: flex; flex-direction: column; align-items: center; gap: 40px; }

/* ---------- значки набора в элементах экранов ---------- */
.rune .g { display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; filter: drop-shadow(0 3px 0 rgba(0,0,0,.55)); }
.rune .g .gi { width: 100%; height: 100%; }
.cell.c-slot .rune .g { width: 96px; height: 96px; }
.pcard .art .gi { width: 60%; height: 60%; }
.m-biome .bi { display: flex; align-items: center; justify-content: center; color: #fff; }
.m-biome .bi .gi { width: 66%; height: 66%; }
.btn-round .lbl .gi { width: 56px; height: 56px; }
.h-nav .tab .ph .gi, .h-side .ph .gi { width: 60%; height: 60%; }
.h-chests .ch .ph .gi { width: 62%; height: 62%; }
.h-chests .ch.got .ph .gi { color: var(--gold); }

/* ---------- бой: в HUD только ресурсы и волна; портреты соперников, плашка биома и кнопки боя скрыты ---------- */
.m-ports, .m-biome, .m-bf .hud-btns { transition: opacity 250ms; }
.battle .m-ports, .battle .m-biome, .battle .m-bf .hud-btns { opacity: 0; pointer-events: none; }
.battle .m-bf .hud-btns .btn { pointer-events: none; }
