/* Экраны хаба: Герой и Древо (H-02), Гримуар (H-03), Реликвии (H-04), Лавка (H-05). Каркас: верхняя панель 172,
   заголовок 296, тело с прокруткой 400…2090, навигация 2100. Всё стоит между безопасными зонами. */
.screen.meta { background: var(--bg); }
.meta > .bg { position: absolute; left: 0; top: 0; opacity: .3; }
.mt-head { position: absolute; left: 0; top: 296px; width: 1080px; text-align: center; font-size: 64px; font-weight: 900; z-index: 3; pointer-events: none; }
.mt-body { position: absolute; left: 0; top: 400px; width: 1080px; height: 1690px; overflow-y: auto; overflow-x: hidden; padding: 0 30px 60px; touch-action: pan-y; scrollbar-width: none; z-index: 2; }
.mt-body::-webkit-scrollbar { display: none; }
.mt-sec { display: flex; align-items: center; gap: 16px; margin: 34px 0 18px; font-size: 42px; font-weight: 800; color: var(--ember2); }
.mt-sec > .gi { width: 48px; height: 48px; } .mt-sec > span { flex: 1; }
.mt-sec canvas { margin: -90px 0 -30px; }
.pill.lack { box-shadow: 0 0 0 4px var(--bad); }
.mt-body .bar, .sp-pop .bar { height: 22px; border-radius: 11px; background: #0c0b10; border: 3px solid #000; overflow: hidden; }
.mt-body .bar i, .sp-pop .bar i { display: block; height: 100%; background: var(--souls); }
.sub.lack, .pr.lack { color: var(--bad); }
.btn.dim { filter: saturate(.25) brightness(.8); }
.up { position: absolute; right: -12px; bottom: -12px; width: 60px; height: 60px; border-radius: 50%; background: var(--good); border: 4px solid #000; display: flex; align-items: center; justify-content: center; color: #0b0a10; }
.up .gi { width: 64%; height: 64%; }

/* ---------- H-02 Герой ---------- */
.hr-stage { position: relative; width: 1020px; height: 720px; border-radius: 36px; background: rgba(0,0,0,.35); border: 3px solid var(--line); }
.hr-stage .col { position: absolute; top: 24px; display: flex; flex-direction: column; gap: 16px; } .hr-stage .col.l { left: 40px; } .hr-stage .col.r { right: 40px; }
/* слот снаряжения 240×160: круг предмета 72×72, уровень заклинания-хозяина, характеристика и бонус, название предмета */
.gear-slot { position: relative; width: 240px; height: 160px; padding: 12px 14px; border-radius: 28px; background: var(--panel); border: 4px solid var(--c, #444); box-shadow: 0 0 0 3px #000; display: grid; grid-template-columns: 72px 1fr; grid-template-rows: 72px 1fr; gap: 6px 10px; cursor: pointer; }
.gear-slot .art { width: 72px; height: 72px; border-radius: 50%; background: color-mix(in srgb, var(--c, #444) 55%, #14121c); border: 4px solid #000; display: flex; align-items: center; justify-content: center; color: #fff; }
.gear-slot .art .gi { width: 62%; height: 62%; }
.gear-slot .lv { position: absolute; left: 60px; top: 54px; min-width: 36px; height: 36px; border-radius: 18px; background: #0c0b10; border: 3px solid var(--c, #444); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 900; }
.gear-slot .tx { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.gear-slot .tx span { display: flex; align-items: center; gap: 6px; font-size: 22px; color: var(--muted); white-space: nowrap; } .gear-slot .tx span .gi { flex: none; width: 26px; height: 26px; }
.gear-slot .tx b { display: flex; align-items: center; gap: 6px; font-size: 34px; line-height: 1.05; color: var(--good); } .gear-slot .tx b .gi { flex: none; width: 30px; height: 30px; color: var(--ember2); }
.gear-slot .nm { grid-column: 1 / 3; align-self: center; font-size: 23px; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gear-slot.none { border-style: dashed; } .gear-slot.none .tx b, .gear-slot.none .nm { color: var(--muted); }
/* сводка характеристик 240×512: четыре строки, сумма Древа, снаряжения и Реликвий */
.hr-stats { width: 240px; height: 512px; padding: 6px 0; border-radius: 28px; background: var(--panel); border: 3px solid var(--line); display: flex; flex-direction: column; }
.hr-stats .srow { flex: 1; display: grid; grid-template-columns: 52px 1fr; grid-template-rows: 1fr 1fr; align-items: center; gap: 0 14px; padding: 0 18px; cursor: pointer; }
.hr-stats .srow + .srow { border-top: 2px solid var(--line); }
.hr-stats .srow .gi { grid-row: 1 / 3; width: 52px; height: 52px; color: var(--ember2); }
.hr-stats .srow span { align-self: end; font-size: 24px; color: var(--muted); } .hr-stats .srow b { align-self: start; display: inline-block; justify-self: start; font-size: 38px; line-height: 1.1; }
/* H-02b карточка слота: соперники по слоту и закрытые до своих глав закалка и гнёзда */
.sp-pop.slot .rar { display: flex; align-items: center; justify-content: center; gap: 12px; } .sp-pop.slot .rar .gi { flex: none; width: 36px; height: 36px; }
.sp-pop .rivals { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.sp-pop .rv, .sp-pop .lk-row { display: flex; align-items: center; gap: 18px; width: 100%; height: 92px; padding: 0 20px; border-radius: 22px; background: var(--panel2); font-size: 26px; }
.sp-pop .rv .ic, .sp-pop .lk-row .ic { flex: none; width: 64px; height: 64px; border-radius: 50%; background: color-mix(in srgb, var(--c, #444) 55%, #14121c); border: 3px solid #000; display: flex; align-items: center; justify-content: center; color: #fff; }
.sp-pop .rv .ic .gi, .sp-pop .lk-row .ic .gi { width: 62%; height: 62%; }
.sp-pop .rv .tx, .sp-pop .lk-row .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; } .sp-pop .rv .tx b, .sp-pop .lk-row .tx b { font-size: 30px; } .sp-pop .rv .tx span, .sp-pop .lk-row .tx span { color: var(--muted); }
.sp-pop .rv .bn { font-weight: 700; color: var(--muted); } .sp-pop .rv em { font-style: normal; font-weight: 800; color: var(--good); }
.sp-pop .rv.on { box-shadow: 0 0 0 3px var(--good) inset; } .sp-pop .rv.on .bn { color: var(--text); }
.sp-pop .lk-row { background: rgba(0,0,0,.3); cursor: pointer; } .sp-pop .lk-row .ic { background: #14121c; color: var(--muted); } .sp-pop .lk-row .tx b { color: var(--muted); }
.sp-pop .lk-row .lk { display: flex; width: 40px; height: 40px; color: var(--muted); } .sp-pop .lk-row .lk .gi { width: 100%; height: 100%; }
.gear { position: relative; width: 150px; height: 150px; border-radius: 30px; background: var(--panel2); border: 4px solid #000; display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; }
.gear > .gi { width: 56%; height: 56%; opacity: .4; }
.gear .lk { position: absolute; right: -12px; bottom: -12px; width: 56px; height: 56px; border-radius: 50%; background: #0c0b10; border: 3px solid #000; display: flex; align-items: center; justify-content: center; }
.gear .lk .gi { width: 58%; height: 58%; color: var(--muted); }
.gear.pet { position: absolute; right: 85px; top: 552px; border-radius: 50%; }
.hr-pup { position: absolute; left: 300px; top: 0; width: 420px; height: 540px; pointer-events: none; }
.hr-power { position: absolute; left: 300px; top: 548px; width: 420px; height: 90px; border-radius: 45px; background: rgba(0,0,0,.6); border: 3px solid var(--ember); display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 38px; color: var(--muted); }
.hr-power b { font-size: 52px; color: var(--text); } .hr-power .gi { width: 48px; height: 48px; color: var(--ember2); }
.hr-class { position: absolute; left: 35px; top: 566px; width: 250px; height: 70px; border-radius: 35px; background: var(--panel2); border: 3px solid #000; display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 28px; font-weight: 700; cursor: pointer; }
.hr-class .gi { width: 40px; height: 40px; }
.tr-row { display: flex; align-items: center; gap: 26px; width: 1020px; height: 190px; margin-bottom: 18px; padding: 0 26px; border-radius: 34px; background: var(--panel); border: 3px solid var(--line); }
.tr-row .ic { width: 130px; height: 130px; flex: none; border-radius: 30px; background: var(--panel2); border: 4px solid #000; display: flex; align-items: center; justify-content: center; color: var(--ember2); }
.tr-row .inf { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.tr-row .nm { display: flex; align-items: baseline; gap: 18px; font-size: 40px; } .tr-row .nm .lv { font-size: 30px; color: var(--muted); display: inline-block; }
.tr-row .ef { font-size: 27px; color: var(--muted); } .tr-row .bar i { background: var(--ember); }

/* ---------- H-03 Гримуар ---------- */
.gr-deck, .gr-base { display: grid; grid-template-columns: repeat(4, 230px); gap: 30px 33px; width: 1020px; }
.gr-deck { touch-action: none; }
.sp-card { position: relative; width: 230px; height: 300px; border-radius: 30px; background: var(--panel); border: 5px solid var(--rar, #8d99a6); box-shadow: 0 8px 0 rgba(0,0,0,.5); display: flex; flex-direction: column; align-items: center; padding-top: 18px; gap: 8px; cursor: pointer; }
.sp-card .art { width: 130px; height: 130px; flex: none; border-radius: 28px; background: color-mix(in srgb, var(--c, #666) 48%, #14121c); border: 4px solid #000; display: flex; align-items: center; justify-content: center; color: #fff; }
.sp-card b { height: 54px; padding: 0 8px; display: flex; align-items: center; text-align: center; font-size: 24px; line-height: 1.1; }
.sp-card .lv { position: absolute; right: -12px; top: -12px; width: 56px; height: 56px; border-radius: 50%; background: #0c0b10; border: 4px solid var(--rar, #8d99a6); display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 900; }
.sp-card .bar { width: 190px; } .sp-card .cnt { font-size: 22px; color: var(--muted); }
.sp-card.can .bar i { background: var(--good); }
.sp-card .look { position: absolute; left: -12px; top: -12px; width: 36px; height: 36px; border-radius: 50%; border: 4px solid #000; }
.sp-card.drag { z-index: 10; box-shadow: 0 30px 40px rgba(0,0,0,.6); pointer-events: none; } .sp-card.over { outline: 6px solid #fff; outline-offset: 4px; }
.sp-card.base, .sp-card.none { height: 230px; --rar: #5a5568; }
.sp-card.none { opacity: .55; border-style: dashed; } .sp-card.none .art { background: #1c1a24; color: var(--muted); }
.sp-pop { position: relative; width: 920px; padding: 0 50px 44px; border-radius: 40px; background: var(--panel); border: 6px solid var(--rar, #c9a37a); box-shadow: 0 0 0 4px #000, 0 30px 80px rgba(0,0,0,.7); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.sp-pop .rar { width: calc(100% + 100px); height: 56px; line-height: 56px; text-align: center; background: var(--rar, #c9a37a); color: #0b0a10; font-size: 28px; font-weight: 900; border-radius: 32px 32px 0 0; }
.sp-pop .art { width: 200px; height: 200px; margin-top: 10px; border-radius: 50%; background: color-mix(in srgb, var(--c, #c9a37a) 48%, #14121c); border: 5px solid #000; display: flex; align-items: center; justify-content: center; color: #fff; }
.sp-pop h2 { margin: 0; font-size: 56px; text-align: center; } .sp-pop p { margin: 0; font-size: 30px; color: var(--muted); text-align: center; line-height: 1.25; }
.sp-pop .lvl { font-size: 34px; color: var(--muted); } .sp-pop .lvl b { display: inline-block; color: var(--text); font-size: 46px; }
.sp-pop .stats { width: 100%; display: flex; gap: 16px; }
.sp-pop .st { flex: 1; padding: 14px 22px; border-radius: 22px; background: var(--panel2); font-size: 28px; display: flex; flex-direction: column; gap: 2px; } .sp-pop .st span { color: var(--muted); } .sp-pop .st b { font-size: 38px; } .sp-pop .st i { font-style: normal; color: var(--good); }
.sp-pop .shards { width: 100%; display: flex; align-items: center; gap: 16px; } .sp-pop .shards .bar { flex: 1; height: 28px; border-radius: 14px; }
.sp-pop .cnt { display: inline-block; min-width: 170px; text-align: right; font-size: 30px; font-weight: 700; }
.sp-pop .perks { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.pk { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-radius: 18px; background: rgba(0,0,0,.3); font-size: 28px; color: var(--muted); }
.pk .n { width: 44px; height: 44px; flex: none; border-radius: 50%; background: #0c0b10; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.pk.on { color: var(--text); } .pk.on .n { background: var(--good); color: #0b0a10; } .pk.next { box-shadow: 0 0 0 3px var(--ember) inset; }
.sp-pop .btn-row { display: flex; gap: 24px; margin-top: 10px; }
.sp-pop.relic .eff { display: flex; align-items: baseline; gap: 16px; font-size: 36px; } .sp-pop.relic .eff i { font-style: normal; color: var(--good); }

/* ---------- H-04 Реликвии ---------- */
.rl-sum { display: flex; flex-wrap: wrap; gap: 14px; align-content: center; width: 1020px; min-height: 200px; padding: 24px; border-radius: 34px; background: var(--panel); border: 3px solid var(--line); }
.rl-sum .chip { display: flex; flex-direction: column; padding: 10px 24px; border-radius: 22px; background: var(--panel2); font-size: 26px; color: var(--muted); } .rl-sum .chip b { font-size: 38px; color: var(--good); }
.rl-set { width: 1020px; margin-top: 26px; padding-bottom: 24px; border-radius: 34px; background: rgba(0,0,0,.3); border: 3px solid var(--line); }
.rl-set .hd { display: flex; align-items: center; gap: 20px; height: 90px; padding: 0 28px; font-size: 34px; }
.rl-set .hd .bn { flex: 1; color: var(--muted); font-size: 28px; } .rl-set .hd .pg { font-weight: 800; color: var(--muted); }
.rl-set.done { border-color: var(--gold); } .rl-set.done .hd .bn { color: var(--good); } .rl-set.done .hd .pg { color: var(--gold); }
.rl-set .row { display: flex; gap: 12px; padding: 0 12px; }
.rl-card { position: relative; width: 240px; height: 310px; border-radius: 28px; background: var(--panel); border: 4px solid #000; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 16px; cursor: pointer; }
.rl-card .art { width: 150px; height: 150px; flex: none; border-radius: 50%; background: #3a3126; border: 4px solid #000; display: flex; align-items: center; justify-content: center; color: #f0dcb0; }
.rl-card.empty .art { filter: grayscale(1) brightness(.6); } .rl-card .bar { width: 190px; } .rl-card .cnt { font-size: 22px; color: var(--muted); } .rl-card.can .bar i { background: var(--good); }
.stars { display: flex; gap: 6px; justify-content: center; }
.stars i { width: 28px; height: 28px; background: #2c2939; clip-path: polygon(50% 0, 62% 36%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 36%); } .stars i.on { background: var(--gold); }
.sp-pop .stars i { width: 52px; height: 52px; }

/* ---------- H-05 Лавка ---------- */
.sh-row { display: flex; gap: 21px; } .sh-grid { display: grid; grid-template-columns: repeat(3, 326px); gap: 21px; }
.sh-chest, .sh-good { position: relative; width: 326px; border-radius: 34px; background: var(--panel); border: 4px solid #000; display: flex; flex-direction: column; align-items: center; gap: 8px; padding-top: 20px; cursor: pointer; }
.sh-chest { height: 450px; } .sh-good { height: 340px; }
.sh-chest .art { width: 220px; height: 220px; border-radius: 30px; background: var(--panel2); display: flex; align-items: center; justify-content: center; color: var(--gold); } .sh-chest.big .art { color: var(--orb); } .sh-chest.spell .art { color: var(--ether); }
.sh-good .art, .sh-ex .art { width: 150px; height: 150px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--c) 48%, #14121c); border: 4px solid #000; display: flex; align-items: center; justify-content: center; color: #fff; }
.sh-chest b { font-size: 28px; text-align: center; } .sh-chest .n, .sh-good span { font-size: 24px; color: var(--muted); text-align: center; } .sh-good .amt { font-size: 36px; }
.pr-box { margin-top: auto; width: 100%; height: 80px; border-radius: 0 0 30px 30px; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.pr-box .gi { width: 44px; height: 44px; } .pr { display: flex; align-items: center; gap: 10px; font-size: 34px; font-weight: 800; color: var(--text); }
.sh-chest.off, .sh-good.sold { filter: saturate(.2) brightness(.55); }
.sh-ex { display: flex; align-items: center; gap: 30px; width: 1020px; height: 150px; margin-bottom: 18px; padding: 0 40px; border-radius: 34px; background: var(--panel); border: 4px solid #000; cursor: pointer; }
.sh-ex .from { display: flex; align-items: center; gap: 14px; font-size: 44px; } .sh-ex .arr { flex: 1; text-align: center; font-style: normal; font-size: 50px; color: var(--muted); } .sh-ex .art { width: 110px; height: 110px; } .sh-ex .amt { font-size: 44px; min-width: 190px; }
.sh-closed { display: flex; align-items: center; justify-content: center; gap: 20px; width: 1020px; height: 170px; margin-top: 20px; border-radius: 34px; border: 4px dashed var(--line); color: var(--muted); font-size: 40px; } .sh-closed .gi { width: 64px; height: 64px; }
.mt-sec .tm { flex: none; display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px; border-radius: 28px; background: rgba(0,0,0,.45); font-size: 28px; color: var(--muted); font-variant-numeric: tabular-nums; } .mt-sec .tm .gi { width: 32px; height: 32px; }
/* H-05a Открытие сундука */
.ch-open { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 30px; padding-top: 330px; }
.ch-name { font-size: 60px; font-weight: 900; } .ch-big { width: 360px; height: 360px; color: var(--gold); } .ch-big .gi { width: 100%; height: 100%; }
.ch-loot { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; width: 1000px; min-height: 280px; }
.loot { width: 200px; height: 260px; border-radius: 26px; background: var(--panel); border: 4px solid var(--c); box-shadow: 0 0 0 3px #000; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 16px; }
.loot .art { width: 120px; height: 120px; border-radius: 50%; background: color-mix(in srgb, var(--c) 48%, #14121c); display: flex; align-items: center; justify-content: center; color: #fff; } .loot b { font-size: 34px; } .loot span { font-size: 22px; color: var(--muted); text-align: center; padding: 0 8px; }
.ch-open .btn { position: absolute; left: 260px; top: 1960px; }

/* ---------- H-03: крупный герой по центру и вещи, которые красят заклинания ---------- */
.gr-hero { position: relative; width: 1020px; height: 560px; border-radius: 36px; background: rgba(0,0,0,.35); border: 3px solid var(--line); }
.gr-hero .hr-pup { top: 10px; }
.gr-hero .col { position: absolute; top: 20px; display: flex; flex-direction: column; gap: 20px; } .gr-hero .col.l { left: 34px; } .gr-hero .col.r { right: 34px; }
.garb-chip { position: relative; width: 240px; height: 250px; border-radius: 28px; background: var(--panel); border: 4px solid var(--c, #000); box-shadow: 0 0 0 3px #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.garb-chip .pc { display: flex; align-items: center; gap: 10px; height: 50px; font-style: normal; font-size: 26px; font-weight: 800; color: var(--text); } .garb-chip .pc .gi { width: 46px; height: 46px; } .garb-chip .pc span { color: var(--good); }
.garb-chip .art { width: 110px; height: 110px; border-radius: 50%; background: color-mix(in srgb, var(--c, #444) 55%, #14121c); border: 4px solid #000; display: flex; align-items: center; justify-content: center; color: #fff; }
.garb-chip .lv { position: absolute; right: 34px; top: 136px; min-width: 44px; height: 44px; border-radius: 22px; background: #0c0b10; border: 3px solid var(--c, #444); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 900; }
.garb-chip .lv:empty { display: none; }
.garb-chip .wn { font-size: 24px; text-align: center; line-height: 1.1; padding: 0 8px; min-height: 28px; }
.garb-chip.pw { cursor: default; color: var(--ember2); border-color: var(--ember); } .garb-chip.pw > .gi { width: 56px; height: 56px; } .garb-chip.pw b { font-size: 50px; color: var(--text); }
.sp-pop .item { display: flex; align-items: center; gap: 16px; width: 100%; height: 70px; padding: 0 22px; border-radius: 22px; background: rgba(0,0,0,.3); font-size: 28px; color: var(--muted); }
.sp-pop .item .gi { width: 44px; height: 44px; } .sp-pop .item b { color: var(--text); flex: 1; } .sp-pop .item .bn { color: var(--text); font-weight: 700; } .sp-pop .item.on { box-shadow: 0 0 0 3px var(--good) inset; } .sp-pop .item.on span { color: var(--good); }
.sp-card .garb { position: absolute; left: -12px; top: -12px; width: 48px; height: 48px; border-radius: 50%; background: #0c0b10; border: 4px solid #000; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.sp-card .garb.on { color: #0b0a10; } .sp-card .garb .gi { width: 66%; height: 66%; }
