/* Страница персонажа /game/hero (колесо v4, WHEEL-V4-SPEC §6.3). Поверх game.css: те же токены, латунь, Playfair Display SC
   + Jost. Разделы: Персонаж · Снаряжение · Прокачка · Босс · Карточки · История. Цвет — роль: оранжевый — Оружие, зелёный —
   Живучесть, фиолетовый — Дух (цвета веток — в game.css), бирюза — души, кровь — удар. Движение — только transform и
   opacity; prefers-reduced-motion — сразу конечное состояние. */
:root {
  --weapon-deep: #7a3f12; --weapon-soft: rgba(224,137,46,.15);
  --vitality-deep: #345c22; --vitality-soft: rgba(106,168,79,.15);
  --spirit-deep: #4e3375; --spirit-soft: rgba(167,123,217,.15);
  --rar-brass: #c9a45c; --rar-silver: #cfd5dd; --rar-gold: #f5c84c; --rar-chaos: #a77bff;
}
.herop { background: var(--bg-page); }
.hwrap { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }
svg.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.weapon { --c: var(--weapon); --cd: var(--weapon-deep); --cs: var(--weapon-soft); }
.vitality { --c: var(--vitality); --cd: var(--vitality-deep); --cs: var(--vitality-soft); }
.spirit { --c: var(--spirit); --cd: var(--spirit-deep); --cs: var(--spirit-soft); }
a.btn { text-decoration: none; }
.about { margin: 6px 0 0; font-size: 13px; color: var(--text-dim); }
.max { font: 600 11px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--brass-hi); white-space: nowrap; }

/* липкая строка разделов */
.hnav { position: sticky; top: 0; z-index: 6; background: rgba(18,21,16,.96); box-shadow: 0 1px 0 var(--brass-lo), 0 8px 24px rgba(0,0,0,.35); }
.hnav .hwrap { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 6px 0; }
.hnav .hwrap::-webkit-scrollbar { display: none; }
.hnav a { position: relative; flex: none; padding: 10px 12px; border-radius: var(--r-2); color: var(--text-dim); text-decoration: none; font: 600 13px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.hnav a:hover { color: var(--text); }
.hnav a.on { color: var(--brass-hi); box-shadow: inset 0 -2px 0 var(--brass); }
.hnav a.back { display: inline-flex; align-items: center; gap: 6px; padding-left: 0; color: var(--brass); }
.hnav a.back svg { width: 14px; height: 14px; }
.hnav .sep { flex: none; width: 1px; height: 18px; margin: 0 8px 0 6px; background: var(--brass-lo); }
.anon .hnav [data-sec]:not([data-sec="album"]) { display: none; }

/* вход и «выключено» */
.gate { position: relative; z-index: 1; padding: 40px 0 10px; }
.gate-in { max-width: 620px; margin: 0 auto; display: grid; justify-items: center; gap: 12px; text-align: center; padding: 28px 24px; }
.gate-in h1 { margin: 0; font: 900 30px/1.1 var(--display); color: var(--text); }
.gate-in p { margin: 0; color: var(--text-dim); max-width: 46ch; }
.gate-in .ghost { width: 64px; filter: drop-shadow(0 0 16px rgba(127,224,191,.5)); }

/* таблички: тёмное стекло с латунной двойной рамкой */
.plate { position: relative; border-radius: var(--r-3); padding: 14px 16px 16px;
  background: linear-gradient(180deg, rgba(26,31,23,.92), rgba(13,16,12,.94));
  box-shadow: inset 0 0 0 1px var(--line-brass), inset 0 0 0 4px rgba(13,16,12,.9), inset 0 0 0 5px rgba(201,164,92,.22), 0 14px 34px rgba(0,0,0,.5); }
.ph3 { margin: 0 0 10px; font: 900 13px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ph3 small { font: 500 12px/1.2 var(--ui); text-transform: none; letter-spacing: .02em; }
.hboard { position: relative; z-index: 1; display: grid; gap: var(--gap); padding: 18px 0 18px; }
#board2 { padding-top: 0; padding-bottom: 30px; }
.card { scroll-margin-top: 60px; }

/* ================================================================ 1. Персонаж: портрет в раме на постаменте + характеристики */
.hband { position: relative; z-index: 1; overflow: hidden; padding: 28px 0 30px; scroll-margin-top: 50px; }
.hgrid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.pcol { position: relative; }
/* оружейная (char-bg): постамент картинки — под рамой портрета */
.pcol .room { position: absolute; left: 50%; top: -60px; width: 1290px; height: 726px; transform: translateX(-50%); pointer-events: none;
  background: linear-gradient(90deg, var(--bg-page) 0, rgba(18,21,16,.55) 24%, rgba(18,21,16,0) 38%, rgba(18,21,16,0) 62%, rgba(18,21,16,.62) 76%, var(--bg-page) 96%),
              linear-gradient(180deg, rgba(18,21,16,.55) 0, rgba(18,21,16,0) 18%, rgba(18,21,16,0) 70%, var(--bg-page) 100%),
              url("/art/char-bg.webp") center / cover no-repeat, linear-gradient(#1a1f17, var(--bg-page)); }
.pframe { position: relative; z-index: 1; width: 226px; aspect-ratio: 591 / 960; margin: 0 auto; }
.pframe .fart { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 18px 30px rgba(0,0,0,.65)); }
.pframe .fwin { position: absolute; left: 16.75%; top: 17.4%; width: 66.5%; height: 71.9%; overflow: hidden; background: #1c2118; }
.pframe.cssframe .fwin { inset: 4%; width: auto; height: auto; box-shadow: 0 0 0 6px #b48c45, 0 0 0 8px #2a1d08; }
.pframe .hpic { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
.pframe .hpic.none { visibility: hidden; }
.pframe .nohero { width: 100%; height: 100%; display: grid; place-items: end center; }
.pframe .nohero svg { width: 80%; fill: rgba(201,164,92,.18); }
.pframe .rki { position: absolute; left: 6px; top: 6px; width: 26px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.8)); }
.pframe .em { position: absolute; right: 6px; bottom: 6px; width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.8)); }
.pframe .nameplate { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); z-index: 2; width: 190px; padding: 9px 10px 7px; text-align: center; border-radius: 4px;
  background: linear-gradient(#2c3627, #161b14); box-shadow: inset 0 0 0 1px var(--brass), inset 0 0 0 3px #161b14, inset 0 0 0 4px rgba(201,164,92,.35), 0 6px 16px rgba(0,0,0,.6); }
.pframe .nameplate b { display: block; font: 900 18px/1.1 var(--display); letter-spacing: .12em; color: var(--brass-hi); text-transform: uppercase; }
.pframe .nameplate span { display: block; margin-top: 3px; font: 600 10px/1.1 var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--text-dim); }
.pframe .pick { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); z-index: 2; }
.pedestal-gap { height: 120px; }
.idplate { display: grid; gap: 11px; }
.idplate .idtop { position: relative; display: grid; gap: 8px; justify-items: start; }
.idplate .rest { position: relative; display: grid; gap: 10px; }
.idplate h1 { margin: 0; font: 900 32px/1.02 var(--display); color: var(--text); overflow-wrap: anywhere; }
/* .nick.gold-frame и .ntitle — в game.css (общие с /game) */
.tag.title { color: var(--rar-gold); box-shadow: inset 0 0 0 1px rgba(245,200,76,.5); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 5px; border-radius: 14px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; color: var(--text); white-space: nowrap; }
.tag img { width: 22px; height: 22px; object-fit: contain; }
.tag.amber { color: var(--amber); box-shadow: inset 0 0 0 1px rgba(217,164,65,.45); } .tag.sapphire { color: var(--sapphire); }
.tag.place { padding-left: 10px; color: var(--text-dim); } .tag.place b { color: var(--text); font-weight: 600; }
/* значки сезонов войны фракций (rpg/season.py): звание сезона — латунь, победа — цвет фракции, «Сезон N» — тихо */
.tag.badge { padding-left: 10px; color: var(--text-dim); }
.tag.badge.mvp { color: var(--brass-hi); box-shadow: inset 0 0 0 1px var(--brass); }
.tag.badge.win { color: var(--text); } .tag.badge.win.amber { box-shadow: inset 0 0 0 1px var(--amber); } .tag.badge.win.sapphire { box-shadow: inset 0 0 0 1px var(--sapphire); }
.idrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.wallet { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 2px 10px; align-items: center; padding: 8px 10px; border-radius: var(--r-3);
  background: linear-gradient(90deg, rgba(127,224,191,.12), rgba(127,224,191,.02)); box-shadow: inset 0 0 0 1px rgba(127,224,191,.28); }
.wallet img { grid-row: 1 / span 2; width: 36px; filter: drop-shadow(0 0 10px rgba(127,224,191,.5)); }
.wallet .n { display: flex; align-items: baseline; gap: 6px; }
.wallet .n b { font: 900 28px/1 var(--display); color: var(--soul); text-shadow: 0 0 22px rgba(127,224,191,.35); font-variant-numeric: tabular-nums; }
.wallet .n i { font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.wallet small, .rankrow small { font-size: 11.5px; line-height: 1.3; color: var(--text-dim); } .wallet small em, .rankrow small em { font-style: normal; color: var(--text); }
.rankrow { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 0 10px; align-items: center; padding: 6px 8px; border-radius: var(--r-3); background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
.rankrow .rkb { position: relative; width: 46px; height: 46px; }
.rankrow .rkb svg { width: 46px; height: 46px; transform: rotate(-90deg); }
.rankrow .rkb circle { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 5; }
.rankrow .rkb circle.f { stroke: var(--brass-hi); stroke-linecap: round; stroke-dasharray: 100; }
.rankrow .rkb img { position: absolute; left: 7px; top: 7px; width: 32px; height: 32px; object-fit: contain; }
.rankrow b { display: block; font: 700 12px/1.15 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--brass-hi); }

.scol { display: grid; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tl { --c: var(--brass); position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-areas: "ic t" "v v" "s s"; gap: 4px 8px; align-content: start;
  padding: 9px 10px 10px; border-radius: var(--r-2); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 9%, transparent), rgba(255,255,255,.02)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, #2f3829); min-width: 0; }
.tl .ic { grid-area: ic; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--c); background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.tl .ic svg { width: 15px; height: 15px; }
.tl b { grid-area: t; align-self: center; font: 600 12px/1.15 var(--ui); color: var(--text-dim); letter-spacing: .02em; }
.tl .vrow { grid-area: v; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 8px; min-width: 0; }
.tl em { font: 900 24px/1 var(--display); font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl em small { font: 600 12px var(--ui); color: var(--text-dim); margin-left: 3px; }
.tl > span { grid-area: s; font-size: 11.5px; line-height: 1.3; color: var(--text-dim); }
.tl .btn { min-height: 26px; padding: 2px 8px; font-size: 10px; letter-spacing: .04em; }
.tl.soul { --c: var(--soul); } .tl.soul em { color: var(--soul); }
.tl.blood { --c: var(--danger); } .tl.blood em { color: #ff9c8c; }
.fighter2 { display: grid; gap: 10px; }
.fighter2 .ph3 { margin: 0; }
.fighter2 .xpbar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.fighter2 .xpbar i { display: block; height: 100%; background: var(--brass); transform-origin: left; }
.fighter2 .stats { margin-top: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fighter2 .rk-equal { font-size: 12px; }
.ranks2 { display: flex; flex-wrap: wrap; gap: 8px; }
.ranks2 span { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; color: var(--text-dim); }
.ranks2 img { width: 24px; height: 24px; object-fit: contain; } .ranks2 b { color: var(--text); font-weight: 600; }
.fighter2 .foot2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-top: 10px; border-top: 1px solid rgba(110,83,38,.5); font-size: 12.5px; color: var(--text-dim); }
.fighter2 .foot2 em { font-style: normal; color: var(--text); }
.fighter2 .foot2 .row { margin-left: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.fighter2 .foot2 .btn { min-height: 30px; padding: 4px 10px; font-size: 11px; white-space: nowrap; }

/* ================================================================ 1½. Скины героев (rpg/skins.py): сундук, коллекция, открытие */
:is(.skt, .spop, .snow, .rv, .srec li, .cb, .nameplate, .mrows li, .mout).silver { --rc: var(--rar-silver); --rs: rgba(207,213,221,.13); }
:is(.skt, .spop, .snow, .rv, .srec li, .cb, .nameplate, .mrows li, .mout).gold { --rc: var(--rar-gold); --rs: rgba(245,200,76,.14); }
:is(.skt, .spop, .snow, .rv, .srec li, .cb, .nameplate, .mrows li, .mout).chaos { --rc: var(--rar-chaos); --rs: rgba(167,123,255,.18); }
.sbox { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.sbx { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px 18px 16px; border-radius: var(--r-3);
  background: radial-gradient(120% 110% at 0 0, rgba(167,123,255,.15), transparent 55%), radial-gradient(90% 90% at 100% 100%, rgba(245,200,76,.1), transparent 60%), var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-brass), inset 0 0 0 4px rgba(13,16,12,.85), inset 0 0 0 5px rgba(201,164,92,.18), 0 10px 26px rgba(0,0,0,.3); }
/* сундук: веер из трёх тёмных скинов (серебро, хаос, золото) и латунный замок */
.chest { position: relative; width: 172px; height: 176px; }
.chest .cb { position: absolute; left: 50%; bottom: 14px; width: 92px; aspect-ratio: 320 / 420; margin-left: -46px; border-radius: 6px; overflow: hidden;
  background: #0d0b09; transform-origin: 50% 100%; box-shadow: inset 0 0 0 2px var(--rc), 0 0 18px color-mix(in srgb, var(--rc) 50%, transparent), 0 8px 16px rgba(0,0,0,.6); }
.chest .cb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; filter: brightness(.3) saturate(.5) blur(.6px); }
.chest .c0 { transform: translateX(-28px) rotate(-13deg); }
.chest .c1 { z-index: 1; transform: translateY(-12px); }
.chest .c2 { transform: translateX(28px) rotate(13deg); }
.chest .lid { position: absolute; z-index: 2; left: 50%; bottom: 0; width: 54px; height: 54px; margin-left: -27px; border-radius: 50%; display: grid; place-items: center;
  color: var(--on-brass); background: radial-gradient(circle at 40% 30%, #fff1c2, #e0b45a 45%, #8a6a2c); box-shadow: 0 0 0 3px #2a1d08, 0 0 0 4px rgba(236,208,138,.4), 0 6px 14px rgba(0,0,0,.6); }
.chest .lid svg { width: 26px; height: 26px; stroke-width: 2.1; }
.sbt { display: grid; gap: 8px; align-content: center; min-width: 0; }
.sbt .bt { font: 900 23px/1.05 var(--display); color: var(--text); }
.sbt .odds { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--text-dim); }
.sbt .odds span { font-weight: 600; } .sbt .odds .silver { color: var(--rar-silver); } .sbt .odds .gold { color: var(--rar-gold); } .sbt .odds .chaos { color: var(--rar-chaos); }
.sbt .btn.big { justify-self: start; min-height: 50px; padding: 8px 24px; font-size: 15px; letter-spacing: .1em; }
.sbt .btn svg { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }
.sbt small { font-size: 12px; line-height: 1.4; }
/* цена следующего сундука: у каждого своя и растёт с каждым купленным */
.sbt .snext { margin: -2px 0 0; font-size: 13px; color: var(--text-dim); } .sbt .snext b { color: var(--brass-hi); font-weight: 700; }
.sside { display: grid; gap: 10px; align-content: start; min-width: 0; }
.snow { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-3); background: var(--surface-2);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc, var(--brass)) 45%, #2f3829); }
.snow > img { width: 52px; aspect-ratio: 320 / 420; object-fit: cover; object-position: 50% 12%; border-radius: 4px; box-shadow: 0 0 0 2px var(--rc, var(--brass-lo)); }
.snow > img.dim { filter: grayscale(.85) brightness(.5); }
.snow > img.none { visibility: hidden; }
.snow .sn-i { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass-lo); }
.snow .sn-i svg { width: 24px; height: 24px; }
.snow b { display: block; font: 900 15px/1.15 var(--display); color: var(--text); overflow-wrap: anywhere; }
.snow small { display: block; margin-top: 3px; font-size: 12px; line-height: 1.3; }
.snow .btn { min-height: 36px; white-space: nowrap; }
.shave { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; padding: 10px 12px; border-radius: var(--r-3); background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
.shave > b { font: 900 28px/1 var(--display); color: var(--text); white-space: nowrap; } .shave > b small { font-size: 14px; color: var(--text-dim); }
.rcs3 { display: flex; flex-wrap: wrap; gap: 6px; }
.rcs3 .rc { padding: 6px 10px; min-width: 64px; }
.rcs3 .rc b small { font-size: 12px; color: var(--text-dim); }
/* переплавка: повторки N из need, полоска и кнопка «Переплавить need → 1» */
.smelt { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-3);
  background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); }
.smelt.ready { background: radial-gradient(120% 140% at 0 50%, rgba(255,140,60,.12), transparent 60%), rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px rgba(236,160,90,.45); }
.smelt .sm-i { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #f0a35a; box-shadow: inset 0 0 0 1px rgba(236,160,90,.4); }
.smelt .sm-i svg { width: 20px; height: 20px; }
.smelt .sm-t { display: grid; gap: 4px; min-width: 0; }
.smelt .sm-t b { font: 900 15px/1.1 var(--display); color: var(--text); }
.smelt .sm-n { font: 700 12px/1.1 var(--ui); letter-spacing: .06em; color: var(--text); }
.smelt .sm-bar { display: block; height: 5px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.smelt .sm-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #c9a45c, #f0a35a); }
.smelt small { font-size: 11.5px; line-height: 1.3; }
.smelt .btn { grid-column: 1 / -1; min-height: 42px; white-space: nowrap; }
.smelt .btn svg { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }
#skins .fchip.own i { background: radial-gradient(circle at 40% 35%, #c9f7e6, var(--soul)); transform: none; border-radius: 50%; }
/* коллекция: свой скин — в цвете с рамкой редкости, чужой — тусклый под замком, имя и редкость видны всегда */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 16px 12px; }
.skt { position: relative; display: grid; align-content: start; gap: 7px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.skt .sx-p { position: relative; display: block; aspect-ratio: 320 / 420; border-radius: 6px; overflow: hidden; background: #0d100c;
  box-shadow: inset 0 0 0 1px var(--line), 0 6px 14px rgba(0,0,0,.4); transition: transform .2s ease, filter .2s ease; }
.skt .sx-p img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
.skt .sx-p img.none { visibility: hidden; }
.skt.own .sx-p { box-shadow: 0 0 0 2px var(--rc), 0 0 0 4px #0d100c, 0 0 0 5px color-mix(in srgb, var(--rc) 50%, transparent), 0 8px 18px rgba(0,0,0,.45); }
.skt.own.gold .sx-p { filter: drop-shadow(0 0 10px rgba(245,200,76,.35)); } .skt.own.chaos .sx-p { filter: drop-shadow(0 0 12px rgba(167,123,255,.5)); }
.skt.lock .sx-p img { filter: grayscale(.92) brightness(.3) contrast(.95); }
.skt .sx-l { position: absolute; left: 50%; top: 44%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; display: grid; place-items: center;
  color: var(--text-dim); background: rgba(13,16,12,.72); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 45%, var(--line)); }
.skt .sx-l svg { width: 16px; height: 16px; }
.skt .sx-r { position: absolute; left: 6px; top: 6px; padding: 3px 6px 2px; border-radius: 3px; font: 700 9px/1.1 var(--ui); letter-spacing: .12em; text-transform: uppercase;
  color: #12160f; background: var(--rc); box-shadow: 0 2px 4px rgba(0,0,0,.45); }
.skt.lock .sx-r { color: var(--rc); background: rgba(13,16,12,.86); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 55%, transparent); }
.skt .sx-s { position: absolute; right: 6px; top: 6px; padding: 3px 6px 2px; border-radius: 3px; font: 700 9px/1.1 var(--ui); letter-spacing: .12em; text-transform: uppercase;
  color: var(--text); background: rgba(13,16,12,.86); box-shadow: inset 0 0 0 1px var(--line); }
.skt .sx-s.on { color: var(--on-brass); background: linear-gradient(#ffe9a8, #c9a45c); box-shadow: 0 2px 4px rgba(0,0,0,.45); }
.skt .sx-d { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); padding: 3px 6px 2px; border-radius: 3px; white-space: nowrap; font: 700 9px/1.1 var(--ui);
  letter-spacing: .08em; text-transform: uppercase; color: var(--text); background: rgba(13,16,12,.88); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 60%, transparent); }
.skt .sx-me { position: absolute; left: 50%; top: -9px; z-index: 1; transform: translateX(-50%); padding: 3px 7px; border-radius: 3px; white-space: nowrap; font: 700 9.5px/1 var(--ui);
  letter-spacing: .1em; text-transform: uppercase; color: var(--on-soul); background: linear-gradient(#a8f0da, #7fe0bf); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.skt .sx-n { display: grid; gap: 1px; min-width: 0; padding: 0 2px; }
.skt .sx-n b { font: 900 12.5px/1.15 var(--display); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skt .sx-n small { font-size: 11.5px; line-height: 1.25; color: var(--rc); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skt.lock .sx-n b { color: var(--text-dim); } .skt.lock .sx-n small { color: color-mix(in srgb, var(--rc) 55%, var(--text-dim)); }
.skt:hover .sx-p { transform: translateY(-3px); }
.skt.sel .sx-p { transform: translateY(-4px); }
.skt.sel .sx-n b { color: var(--brass-hi); }
.skt:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 4px; border-radius: 6px; }
.spop { position: relative; margin-top: 16px; display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 18px; align-items: start; padding: 14px 44px 16px 16px;
  border-radius: var(--r-3); background: linear-gradient(135deg, var(--rs), transparent 60%), var(--surface-2);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 55%, transparent), 0 12px 30px rgba(0,0,0,.4); }
.spop .sp-pic { display: block; aspect-ratio: 640 / 840; border-radius: 6px; overflow: hidden; background: #0d0b09;
  box-shadow: 0 0 0 2px var(--rc), 0 0 22px color-mix(in srgb, var(--rc) 40%, transparent); }
.spop .sp-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spop .sp-t { display: grid; gap: 6px; align-content: start; min-width: 0; }
.spop .eyebrow { font: 700 10.5px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--rc); }
.spop .sp-t b { font: 900 26px/1.05 var(--display); color: var(--text); overflow-wrap: anywhere; }
.spop .sp-t small { font-size: 12.5px; }
.spop .do { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.spop .do .btn { min-height: 46px; padding: 8px 22px; font-size: 14px; letter-spacing: .1em; }
.spop .do .btn svg { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }
.spop .do small { flex: 1 1 220px; font-size: 12px; line-height: 1.35; }
.spop .x { position: absolute; right: 6px; top: 6px; min-width: 36px; min-height: 36px; border: 0; background: none; color: var(--text-dim); cursor: pointer; }
.srec { margin-top: 16px; }
.srec ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.srec li { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 6px; background: rgba(255,255,255,.035); box-shadow: inset 2px 0 0 var(--rc); }
.srec img { width: 30px; aspect-ratio: 320 / 420; object-fit: cover; object-position: 50% 12%; border-radius: 3px; }
.srec b { display: block; font: 900 12px/1.15 var(--display); } .srec small { font-size: 11px; }
/* надетый скин — подпись на табличке под портретом */
.pframe .nameplate .skn { display: block; margin-top: 4px; font: 600 11px/1.15 var(--ui); letter-spacing: .02em; color: var(--rc, var(--brass-hi)); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* открытие сундука: рубашка переворачивается в скин, лучи и искры цвета редкости — один раз */
dialog.reveal { border: 0; padding: 0; width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; background: transparent; color: var(--text); }
dialog.reveal::backdrop { background: radial-gradient(circle at 50% 40%, rgba(24,18,34,.6), rgba(0,0,0,.88)); }
.rv { position: relative; display: grid; justify-items: center; gap: 12px; padding: 22px 16px 18px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(90% 60% at 50% 32%, color-mix(in srgb, var(--rc) 20%, #15140f), #0d0f0b 75%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 55%, transparent), inset 0 0 0 4px rgba(13,15,11,.9), inset 0 0 0 5px color-mix(in srgb, var(--rc) 25%, transparent), 0 24px 60px rgba(0,0,0,.7); }
.rv-stage { position: relative; width: min(250px, 62vw); aspect-ratio: 640 / 840; perspective: 1100px; }
.rv-rays { position: absolute; left: 50%; top: 50%; width: 230%; aspect-ratio: 1; margin: -115% 0 0 -115%; border-radius: 50%; opacity: .3; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 70%, transparent) 0deg 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 16%, transparent 62%); mask: radial-gradient(circle, #000 16%, transparent 62%);
  animation: rvrays 1.6s cubic-bezier(.2,.7,.2,1) 1.05s both; }
@keyframes rvrays { from { opacity: 0; transform: scale(.3) rotate(-35deg); } 35% { opacity: 1; } to { opacity: .3; transform: none; } }
.rv-flash { position: absolute; inset: -25%; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, #fff 0, color-mix(in srgb, var(--rc) 55%, #fff) 28%, transparent 64%); animation: rvflash .7s ease-out 1.05s both; }
@keyframes rvflash { 0% { opacity: 0; } 25% { opacity: .8; } 100% { opacity: 0; } }
.rv.silver .rv-flash { animation-name: rvflash2; }
@keyframes rvflash2 { 0% { opacity: 0; } 30% { opacity: .35; } 100% { opacity: 0; } }
.rv-card { position: absolute; inset: 0; animation: rvpop .55s cubic-bezier(.2,1.3,.4,1) both; }
@keyframes rvpop { 0% { opacity: 0; transform: scale(.55) translateY(30px); } 55% { opacity: 1; transform: scale(1.03); } 72% { transform: rotate(-2.5deg); }
  86% { transform: rotate(2deg); } 100% { transform: none; } }
.rv-in { position: absolute; inset: 0; transform-style: preserve-3d; animation: rvflip .75s cubic-bezier(.3,.6,.2,1) .55s both; }
@keyframes rvflip { from { transform: rotateY(180deg); } to { transform: none; } }
.rv-back, .rv-front { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.rv-back { transform: rotateY(180deg); background: #120e08; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.rv-back img { width: 100%; height: 100%; object-fit: cover; }
.rv-front { background: #0d0b09; animation: rvglow 1.5s ease-out 1.1s both;
  box-shadow: 0 0 0 3px var(--rc), 0 0 0 6px #0d0b09, 0 0 0 7px color-mix(in srgb, var(--rc) 55%, transparent), 0 0 34px color-mix(in srgb, var(--rc) 40%, transparent), 0 16px 40px rgba(0,0,0,.6); }
@keyframes rvglow { from { box-shadow: 0 0 0 3px var(--rc), 0 0 0 6px #0d0b09, 0 0 0 7px var(--rc), 0 0 110px var(--rc), 0 16px 40px rgba(0,0,0,.6); } }
.rv-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-front img.none { visibility: hidden; }
.rv-fr { position: absolute; inset: 7px; border-radius: 6px; pointer-events: none; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rc) 70%, transparent); }
.rv-sparks { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; }
.rv-sparks i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; opacity: 0; background: var(--rc); box-shadow: 0 0 10px var(--rc);
  animation: rvspark .95s ease-out 1.08s forwards; }
.rv.chaos .rv-sparks i:nth-child(3n) { background: #fff; }
.rv.gold .rv-sparks i:nth-child(3n) { background: #fff6cf; }
@keyframes rvspark { from { opacity: 1; transform: rotate(var(--a)) translateY(-40px) scale(1.2); } to { opacity: 0; transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(.3); } }
.rv-t { display: grid; justify-items: center; gap: 4px; text-align: center; animation: rvup .45s ease-out 1.25s both; }
@keyframes rvup { from { opacity: 0; transform: translateY(10px); } }
.rv-t .eyebrow { font: 700 11px/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--rc); }
.rv-t h3 { margin: 0; font: 900 28px/1.05 var(--display); color: var(--text); }
.rv.gold .rv-t h3 { color: #ffe9a8; text-shadow: 0 0 16px rgba(245,200,76,.45); }
.rv.chaos .rv-t h3 { color: #efe2ff; text-shadow: 0 0 18px rgba(167,123,255,.6); }
.rv-t p { margin: 0; font-size: 13px; color: var(--text-dim); }
.rv.dupe .rv-t p { color: var(--brass-hi); }
.rv-t .burnt { font-size: 12px; color: #f0a35a; }
.rv-do { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; animation: rvup .45s ease-out 1.4s both; }
.rv-do .btn { min-height: 44px; white-space: nowrap; }
.rv-do .btn svg { width: 18px; height: 18px; margin-right: 6px; vertical-align: -3px; }
.rv-do .done3 { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; color: var(--soul); font-weight: 600; }
.rv-do .done3 svg { width: 18px; height: 18px; }
.rv-do .hint { flex: 1 0 100%; font-size: 12px; color: var(--text-dim); text-align: center; }
/* подтверждение переплавки: что сгорит (по умолчанию — план сервера), шаги −/+ и какой редкости выйдет новый скин */
.rv.mconf { --rc: #f0a35a; justify-items: stretch; }
.rv.mconf .rv-t, .rv.mconf .rv-do { animation: none; }
.rv.mconf .rv-t p { font-size: 12.5px; line-height: 1.4; }
.mrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: min(46vh, 360px); overflow: auto; }
.mrows li { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 8px 5px 5px; border-radius: 6px;
  background: rgba(255,255,255,.03); box-shadow: inset 2px 0 0 var(--rc); }
.mrows li.on { background: color-mix(in srgb, var(--rc) 13%, rgba(255,255,255,.03)); box-shadow: inset 2px 0 0 var(--rc), inset 0 0 0 1px color-mix(in srgb, var(--rc) 45%, transparent); }
.mrows img { width: 30px; aspect-ratio: 320 / 420; object-fit: cover; object-position: 50% 12%; border-radius: 3px; }
.mrows .mr-t { min-width: 0; } .mrows .mr-t b { display: block; font: 900 12.5px/1.15 var(--display); overflow-wrap: anywhere; }
.mrows .mr-t small { font-size: 11px; color: var(--rc); }
.mrows .mr-k { display: flex; align-items: center; gap: 4px; }
.mrows .mr-k b { min-width: 22px; text-align: center; font: 900 16px/1 var(--display); color: var(--text); }
.mrows .mr-k button { width: 36px; height: 36px; border-radius: 6px; border: 0; cursor: pointer; font: 700 18px/1 var(--ui); color: var(--text); background: rgba(255,255,255,.07);
  box-shadow: inset 0 0 0 1px var(--line); }
.mrows .mr-k button:disabled { opacity: .35; cursor: default; }
.mrows .mr-k button:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 2px; }
.mout { margin: 0; padding: 8px 10px; border-radius: 6px; text-align: center; font-size: 13px; color: var(--text-dim); background: rgba(255,255,255,.03); }
.mout b { color: var(--rc, var(--text)); }

/* ================================================================ 2. Снаряжение: кукла, выбранное гнездо, магазин */
.gearg { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 18px; align-items: start; }
.doll { position: relative; width: 420px; height: 560px; border-radius: var(--r-3); overflow: hidden; background: #0d100c;
  box-shadow: inset 0 0 0 1px var(--line-brass), inset 0 0 0 4px rgba(13,16,12,.9), inset 0 0 0 5px rgba(201,164,92,.2); }
.doll .dbg { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13,16,12,.2), rgba(13,16,12,0) 30%, rgba(13,16,12,0) 62%, rgba(13,16,12,.85)),
  url("/art/char-bg-doll.webp") 50% 20% / auto 100% no-repeat, radial-gradient(60% 50% at 50% 40%, #2c3627, #0d100c); }
.doll .dform { position: absolute; left: 50%; top: 4%; height: 82%; transform: translateX(-50%); filter: drop-shadow(0 12px 22px rgba(0,0,0,.7)); pointer-events: none; }
.doll .dhint { position: absolute; left: 12px; top: 10px; font: 600 10px/1.2 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.doll.nodoll { display: grid; }
.sk { --s: 78px; --c: var(--brass); position: absolute; left: var(--x); top: var(--y); width: var(--s); transform: translate(-50%, -50%); text-align: center;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.sk .fr { position: relative; display: block; width: var(--s); height: calc(var(--s) * 200 / 196); filter: drop-shadow(0 8px 12px rgba(0,0,0,.6)); }
.sk .plate2 { position: absolute; left: 20.9%; top: 20%; width: 58.2%; height: 60%; border-radius: 3px;
  background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--c) 55%, #2a3324), color-mix(in srgb, var(--c) 18%, #10140d) 80%); }
.sk .pic { position: absolute; left: 20.9%; top: 20%; width: 58.2%; height: 60%; display: grid; place-items: center; }
.sk .pic img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.7)); }
.sk .frart { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sk .pl { position: absolute; inset: 0; display: grid; place-items: center; color: var(--brass); }
.sk .pl svg, .sk.lockd svg { width: 24px; height: 24px; }
.sk .dots { position: absolute; left: 50%; top: calc(var(--s) * 200 / 196 - 13px); transform: translateX(-50%); display: flex; gap: 3px; padding: 3px 5px; border-radius: 8px; background: #12160f; box-shadow: inset 0 0 0 1px var(--brass-lo), 0 2px 6px rgba(0,0,0,.6); }
.sk .dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.12); }
.sk .dots i.on { background: radial-gradient(circle at 35% 30%, #fff1c2, #e0b45a 55%, #a9843e); box-shadow: 0 0 6px rgba(245,200,76,.6); }
.sk .nm { display: block; margin: 8px -24px 0; font: 600 11.5px/1.15 var(--ui); color: var(--text); text-shadow: 0 1px 4px rgba(0,0,0,.95), 0 0 10px rgba(0,0,0,.9); }
.sk .nm small { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); }
.sk.empty .plate2 { background: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 6px, transparent 6px 12px), #10140d; }
.sk.lockd .fr { display: grid; place-items: center; color: var(--text-dim); }
.sk.lockd .lockart { position: absolute; inset: 0; width: 100%; height: 100%; }
.sk.lockd .lockart + svg { display: none; }
.sk.sel .fr { filter: drop-shadow(0 0 12px color-mix(in srgb, var(--c) 85%, transparent)) drop-shadow(0 8px 12px rgba(0,0,0,.6)); }
.sk.sel::before { content: ""; position: absolute; left: -6px; top: -6px; width: calc(var(--s) + 12px); height: calc(var(--s) * 200 / 196 + 12px); box-sizing: border-box; border: 2px solid var(--c); border-radius: 10px; opacity: .8; }
.sk.pk { --s: 50px; cursor: default; }
.sk.pk .fr { height: var(--s); border-radius: 50%; background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--c) 30%, #2a3324), #10140d 78%);
  box-shadow: inset 0 0 0 3px #b48c45, inset 0 0 0 5px #2a1d08; }
.sk.pk .pic { inset: 14%; width: auto; height: auto; }
.sk.pk.used .pic img { opacity: .45; filter: grayscale(.5); }
.sk.pk .x { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); padding: 2px 5px; border-radius: 8px; font: 700 9px/1 var(--ui); letter-spacing: .06em; color: var(--text-dim); background: #12160f; box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.pockets-l { position: absolute; left: 0; right: 0; bottom: 64px; text-align: center; font: 600 9.5px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
/* предмет влетает в гнездо, улучшение — вспышка рамки цветом ветки */
.sk.flyin .fr { animation: flyin .6s cubic-bezier(.2,.9,.3,1.2); }
@keyframes flyin { from { transform: translateY(-80px) scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.sk.upflash::after { content: ""; position: absolute; left: -8px; top: -8px; width: calc(var(--s) + 16px); height: calc(var(--s) + 16px); border-radius: 12px; box-shadow: 0 0 0 3px var(--c), 0 0 24px var(--c); opacity: 0; animation: upflash .9s ease-out; pointer-events: none; }
@keyframes upflash { 30% { opacity: 1; } to { opacity: 0; transform: scale(1.15); } }

.gside { display: grid; gap: 14px; min-width: 0; }
.idet { --c: var(--brass); display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px 18px; padding: 16px 18px; border-radius: var(--r-3);
  background: linear-gradient(135deg, var(--cs, rgba(201,164,92,.1)), rgba(26,31,23,.4) 55%), var(--surface-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, transparent), 0 10px 26px rgba(0,0,0,.3); }
.idet.empty { grid-template-columns: 1fr; }
.idet .sk { position: relative; left: auto; top: auto; transform: none; --s: 112px; cursor: default; }
.idet .hd { display: grid; gap: 7px; align-content: start; min-width: 0; }
.idet .hd b { font: 900 24px/1.05 var(--display); color: var(--text); }
.idet .hd .meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12px; color: var(--text-dim); }
.brp { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 3px; font: 700 10.5px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #120c08;
  background: linear-gradient(color-mix(in srgb, var(--c) 55%, #fff), var(--c) 60%, var(--cd, #5e4520)); }
.brp svg { width: 12px; height: 12px; stroke: #120c08; stroke-width: 2.4; }
.lvl3 { display: inline-flex; gap: 3px; }
.lvl3 i { min-width: 24px; padding: 3px 0; border-radius: 3px; text-align: center; font: 900 10px/1 var(--display); font-style: normal; letter-spacing: .06em; color: var(--text-dim); background: rgba(255,255,255,.06); }
.lvl3 i.on { color: var(--on-brass); background: linear-gradient(#ffe9a8, #c9a45c); }
.lvl3 i.nx { color: var(--soul); box-shadow: inset 0 0 0 1px var(--soul); background: rgba(127,224,191,.08); }
.idet .lines { grid-column: 1 / -1; display: grid; gap: 6px; }
.idet .ln { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: var(--r-2); background: rgba(0,0,0,.2); font-size: 13px; color: var(--text); }
.idet .ln b { font: 600 10.5px/1.2 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.idet .ln.nx { background: rgba(127,224,191,.07); box-shadow: inset 0 0 0 1px rgba(127,224,191,.3); } .idet .ln.nx b { color: var(--soul); }
.idet .ln.done, .idet .ln.far { opacity: .7; }
.idet .do { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.idet .do .btn { min-height: 46px; padding: 8px 20px; font-size: 14px; letter-spacing: .1em; }
.idet .do small { font-size: 12px; }
.inslots { display: grid; gap: 6px; }
.inslots .ph3 { margin-bottom: 4px; }
.ilist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.irow { --c: var(--brass); display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 0 10px; align-items: center; padding: 5px 8px 5px 6px; border-radius: var(--r-2);
  background: rgba(255,255,255,.035); box-shadow: inset 2px 0 0 var(--c); cursor: pointer; }
.irow.sel { background: color-mix(in srgb, var(--c) 10%, transparent); box-shadow: inset 2px 0 0 var(--c), inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.irow .ii { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--c) 28%, #232b1f), #0d100c 80%); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 70%, transparent); color: var(--brass); }
.irow .ii img { width: 32px; height: 32px; object-fit: contain; }
.irow .ii svg { width: 18px; height: 18px; }
.iw { min-width: 0; display: grid; gap: 1px; } .iw b { font: 900 13px/1.15 var(--display); color: var(--text); } .iw small { font-size: 11.5px; line-height: 1.3; color: var(--text-dim); }
.irow .btn { min-height: 30px; padding: 3px 10px; font-size: 11px; letter-spacing: .04em; white-space: nowrap; }
.irow.free, .irow.shut { box-shadow: inset 2px 0 0 var(--brass-lo); } .irow.free .iw b, .irow.shut .iw b { font: 600 13px/1.2 var(--ui); color: var(--text-dim); }
.irow.shut { opacity: .6; cursor: default; }

/* магазин по ярусам */
.shop { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(110,83,38,.45); display: grid; gap: 10px; }
.shop .ph3 { margin: 0; }
.tierrow { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: start; }
.tierrow > b { display: grid; gap: 3px; padding-top: 8px; font: 900 17px/1 var(--display); color: var(--brass-hi); font-variant-numeric: tabular-nums; }
.tierrow > b small { font: 600 10px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.tierrow .list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.it2 { --c: var(--brass); position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto 1fr auto; grid-template-areas: "pic name" "pic st" "btn btn"; gap: 2px 9px; align-items: center;
  padding: 7px 8px 8px 10px; border-radius: var(--r-2); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1px var(--line); min-width: 0; }
.it2 .pic { grid-area: pic; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; color: var(--c);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c) 22%, #232b1f), #12160f 80%); }
.it2 .pic img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 3px 6px rgba(0,0,0,.6)); }
.it2 b { grid-area: name; align-self: end; font: 900 12px/1.1 var(--display); color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.it2 .st { grid-area: st; align-self: start; font-size: 11px; line-height: 1.25; color: var(--text-dim); min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.it2 .st .k { color: var(--brass); font-weight: 600; }
.it2 .st em { font-style: normal; color: var(--soul); font-weight: 600; }
.it2 .btn { grid-area: btn; margin-top: 5px; min-height: 30px; padding: 3px 4px; font-size: 10px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it2.have { box-shadow: inset 3px 0 0 var(--c), inset 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 9%, transparent), var(--surface-2) 70%); }
.it2 .tagr { position: absolute; left: 4px; top: -6px; z-index: 1; padding: 2px 5px; border-radius: 3px; font: 700 8.5px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; box-shadow: 0 2px 4px rgba(0,0,0,.5); }
.it2 .tagr.new { color: var(--on-soul); background: var(--soul); }

/* ================================================================ 3. Прокачка: мастерство 1–10 и три ветки */
.mtrack { position: relative; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); margin: 6px 0 4px; padding: 0 4px; }
.mtrack::before { content: ""; position: absolute; left: 5%; right: 5%; top: 24px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.07); }
.mtrack::after { content: ""; position: absolute; left: 5%; width: var(--done, 0%); top: 24px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--brass), var(--brass-hi)); box-shadow: 0 0 10px rgba(236,208,138,.4); }
.mnode { position: relative; z-index: 1; display: grid; justify-items: center; gap: 5px; text-align: center; }
.mnode .m { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; font: 900 18px/1 var(--display); color: var(--text-dim);
  background: radial-gradient(circle at 50% 35%, #2c3627, #12160f); box-shadow: inset 0 0 0 2px var(--line), 0 4px 10px rgba(0,0,0,.4); }
.mnode.done .m { color: var(--on-brass); background: radial-gradient(circle at 40% 30%, #fff1c2, #e0b45a 45%, #8a6a2c); box-shadow: inset 0 0 0 2px #fff1c2, 0 0 0 2px #6e5326, 0 4px 12px rgba(0,0,0,.5); }
.mnode.cur .m { box-shadow: inset 0 0 0 2px #fff1c2, 0 0 0 3px var(--brass-hi), 0 0 22px rgba(236,208,138,.6); }
.mnode.nx .m { color: var(--soul); background: radial-gradient(circle at 50% 35%, #1f3a32, #10140d); box-shadow: inset 0 0 0 2px var(--soul), 0 0 18px rgba(127,224,191,.35); }
.mnode small { font: 600 12px/1.1 var(--ui); color: var(--text-dim); font-variant-numeric: tabular-nums; }
.mnode.done small { color: var(--brass); } .mnode.nx small { color: var(--soul); font-weight: 700; }
.mnode .slotmark { position: absolute; top: -6px; right: calc(50% - 32px); width: 20px; height: 20px; border-radius: 4px; display: grid; place-items: center; background: #12160f; box-shadow: inset 0 0 0 1px var(--brass); color: var(--brass-hi); }
.mnode .slotmark svg { width: 12px; height: 12px; }
.mfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 10px; padding: 10px 12px; border-radius: var(--r-3); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.mfoot .mnow { flex: 1 1 380px; min-width: 0; font-size: 13px; color: var(--text-dim); }
.mfoot .mnow b { color: var(--text); font-weight: 600; }
.mfoot .mnow span { display: block; margin-top: 3px; } .mfoot .mnow span em { font-style: normal; color: var(--soul); }
.mfoot .btn { min-height: 46px; letter-spacing: .1em; }
.mdots { display: none; }
.btabs { display: none; }
.branches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.br { position: relative; border-radius: var(--r-3); padding: 0 0 12px; overflow: hidden;
  background: linear-gradient(180deg, var(--cs), rgba(26,31,23,.6) 130px, var(--surface-2)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, #3a4432); }
.br .bh { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-areas: "crest name count" "crest tot tot"; gap: 4px 12px; align-items: center; padding: 12px 14px 10px; border-bottom: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.br .crest { grid-area: crest; width: 46px; height: 46px; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 85%, #fff), var(--c) 45%, var(--cd)); }
.br .crest svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2.2; filter: drop-shadow(0 1px 1px rgba(0,0,0,.5)); }
.br .bh b { grid-area: name; font: 900 18px/1 var(--display); letter-spacing: .06em; color: var(--c); }
.br .bh b small { display: block; margin-top: 3px; font: 600 11px/1 var(--ui); letter-spacing: .04em; text-transform: none; color: var(--text-dim); }
.br .bh em { grid-area: count; font: 900 22px/1 var(--display); font-style: normal; color: var(--text); } .br .bh em small { font-size: 13px; color: var(--text-dim); }
.br .bh .tot { grid-area: tot; font-size: 12px; line-height: 1.3; color: var(--text); } .br .bh .tot i { font-style: normal; color: var(--text-dim); }
.steps { position: relative; list-style: none; margin: 0; padding: 8px 12px 0 12px; display: grid; }
/* линия ветки заливается до текущей ступени */
.steps::before { content: ""; position: absolute; left: 35px; top: 34px; bottom: 30px; width: 2px; background: rgba(255,255,255,.07); }
.steps::after { content: ""; position: absolute; left: 35px; top: 34px; width: 2px; height: calc(100% - 64px); background: var(--c); opacity: .85;
  transform: scaleY(var(--fill-n, 0)); transform-origin: top; transition: transform .45s ease; }
.step { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 6px 0; min-height: 58px; }
.step .k { position: relative; z-index: 1; width: 48px; height: 48px; border-radius: 50%; display: block; background: #10140d; box-shadow: 0 0 0 3px var(--surface-2); }
.step .k .bic { position: absolute; left: 14.5%; top: 14.5%; width: 71%; height: 71%; border-radius: 50%; object-fit: cover; filter: grayscale(.85) brightness(.55); }
.step .k .node { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.step .k i { position: absolute; z-index: 2; right: -5px; bottom: -4px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; font: 900 9px/1 var(--display); font-style: normal; color: var(--text-dim); background: #12160f; box-shadow: inset 0 0 0 1px var(--line); }
.step.done .k { box-shadow: 0 0 0 3px var(--surface-2), 0 0 16px color-mix(in srgb, var(--c) 55%, transparent); }
.step.done .k .bic { filter: none; }
.step.done .k i { color: #120c08; background: linear-gradient(#ffe9a8, #c9a45c); box-shadow: none; }
.step.nx .k { box-shadow: 0 0 0 3px var(--surface-2), 0 0 0 5px var(--c), 0 0 18px color-mix(in srgb, var(--c) 45%, transparent); }
.step.nx .k .bic { filter: grayscale(.2) brightness(.85); }
.step .t { min-width: 0; font-size: 12px; line-height: 1.3; color: var(--text-dim); }
.step .t b { display: block; font: 900 13.5px/1.15 var(--display); color: var(--text-dim); letter-spacing: .02em; }
.step.done .t b, .step.nx .t b { color: var(--text); } .step.done .t { color: color-mix(in srgb, var(--text) 75%, transparent); }
.step:not(.done):not(.nx) { opacity: .62; }
.step .p { font: 600 12px/1 var(--ui); color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.step.done .p { color: var(--c); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.step.nx { margin: 3px -6px; padding: 7px 6px; border-radius: var(--r-2); background: color-mix(in srgb, var(--c) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.btn.br-buy { min-height: 32px; padding: 4px 10px; font-size: 11.5px; letter-spacing: .05em; white-space: nowrap; color: #140d06;
  background: linear-gradient(color-mix(in srgb, var(--c) 55%, #fff), var(--c) 55%, var(--cd)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 0 var(--cd), 0 6px 14px rgba(0,0,0,.35); }
/* купленная ступень загорается: 0,9 → 1,06 → 1 за 450 мс */
.step.lit .k { animation: lit .45s ease-out; }
@keyframes lit { 0% { transform: scale(.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ================================================================ 4. Босс и Испытание */
.fight { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; }
.bosshalf { position: relative; padding: 14px 16px 16px; border-radius: var(--r-3); background: linear-gradient(180deg, rgba(229,83,61,.14), var(--surface-2) 60%); box-shadow: inset 0 0 0 2px var(--danger); }
.bosshalf.off { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.bosshalf.off .bhead { grid-template-columns: 54px minmax(0, 1fr); }
.bhead { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.bhead .pic { width: 54px; height: 70px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.bhead b { font: 900 20px/1.1 var(--display); letter-spacing: .04em; color: var(--text); }
.bhead .sub { margin-top: 4px; font-size: 12.5px; color: var(--text-dim); }
.live2 { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 12px; background: rgba(229,83,61,.16); font: 700 11px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: #ffb3a8; white-space: nowrap; }
.live2 i { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.hpbar { position: relative; height: 16px; margin-top: 12px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.4); }
.hpbar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #ff8a7a, var(--danger)); }
.hpbar u { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.6) 0 4px, rgba(255,255,255,.22) 4px 8px); text-decoration: none; }
.hpbar span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 10.5px/1 var(--ui); letter-spacing: .08em; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.hpl { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; font-size: 11.5px; color: var(--text-dim); }
.hpl b { font-weight: 600; } .hpl .amber { color: var(--amber); } .hpl .sapphire { color: var(--sapphire); }
.ph2 { display: flex; gap: 6px; margin-top: 10px; }
.ph2 div { flex: 1; padding: 6px; border-radius: 3px; text-align: center; font: 600 11px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); background: rgba(255,255,255,.05); }
.ph2 div.on { color: #1d1030; background: linear-gradient(#e6c9ff, var(--spirit)); font-weight: 700; }
.ph2 div.on.gun { color: #2a1406; background: linear-gradient(#ffd3a3, var(--weapon)); }
.mine { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.mine div { display: grid; gap: 4px; padding: 8px 9px; border-radius: 4px; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.mine b { font: 600 10px/1.1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.mine em { font: 900 22px/1 var(--display); font-style: normal; color: var(--text); font-variant-numeric: tabular-nums; }
.mine em small { font: 600 11px var(--ui); color: var(--text-dim); }
.mine .hot { box-shadow: inset 0 0 0 1px rgba(229,83,61,.6); background: rgba(229,83,61,.1); } .mine .hot em { color: #ff9c8c; }
.notes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.notes span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 10px 3px 8px; border-radius: 10px; background: var(--weapon-soft); color: #ffc794; }
.notes span svg { width: 13px; height: 13px; }
.bosshalf .do { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.bosshalf .do .btn { min-height: 48px; padding: 8px 28px; font-size: 17px; letter-spacing: .14em; }
.bosshalf .do small { font-size: 12px; }
.bosshalf .done2 { font: 700 15px/1.2 var(--ui); color: #ff9c8c; }
.trial { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 8px 12px; align-content: start; padding: 14px 16px 16px; border-radius: var(--r-3); overflow: hidden;
  background: radial-gradient(120% 80% at 100% 0, rgba(127,224,191,.08), transparent 60%), var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.trial > *:not(.dummyw) { grid-column: 1; }
.trial .dummyw { position: relative; grid-column: 2; grid-row: 1 / span 5; align-self: start; width: 118px; height: 190px; }
.trial .dummy { width: 100%; height: 100%; object-fit: contain; object-position: bottom; transform-origin: 50% 100%; }
.trial .dummy.hit { animation: jolt .3s ease-out; }
@keyframes jolt { 30% { transform: rotate(-6deg) translateX(-4px); } 60% { transform: rotate(3deg); } }
.trial .tt { font: 900 20px/1.1 var(--display); color: var(--text); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.trial .tt small { font: 600 11px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.trial p { margin: 0; font-size: 12.5px; color: var(--text-dim); line-height: 1.45; } .trial p em { font-style: normal; color: var(--text); }
.trial .tbar { position: relative; height: 12px; border-radius: 6px; background: rgba(255,255,255,.07); overflow: hidden; }
.trial .tbar i { position: absolute; inset: 0; background: linear-gradient(90deg, #c4a874, #8a7046); transform-origin: left; transition: transform .35s ease; }
.trial .tbar span { position: absolute; inset: 0; display: grid; place-items: center; font: 700 9.5px/1 var(--ui); letter-spacing: .08em; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.trial .rew { display: flex; flex-wrap: wrap; gap: 6px; }
.trial .rew span { font-size: 12px; padding: 3px 9px; border-radius: 10px; background: rgba(255,255,255,.05); color: var(--text-dim); } .trial .rew span.s { background: rgba(127,224,191,.1); color: var(--soul); }
.trial .tres { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--r-2); background: rgba(127,224,191,.07); box-shadow: inset 0 0 0 1px rgba(127,224,191,.25); }
.trial .tres b { font-size: 13px; } .trial .tres span { font-size: 12px; color: var(--soul); }
.trial .lock { grid-column: 1 / -1 !important; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 4px; font-size: 12px; color: var(--text-dim); }
.trial .lock .btn { min-height: 46px; padding: 8px 22px; font-size: 14px; letter-spacing: .1em; }
.trial.off { display: block; }
/* всплывающие числа ударов */
.pop { position: absolute; left: 50%; top: 30%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.bosshalf .do .pop { left: auto; right: 40px; top: 0; }
.fl { position: absolute; left: 0; top: 0; transform: translateX(-50%); white-space: nowrap; font: 900 22px/1 var(--display); color: var(--text); text-shadow: 0 2px 8px rgba(0,0,0,.9); animation: floatup 1.3s ease-out forwards; }
.fl.hot { color: #ff9c8c; } .fl.soul { color: var(--soul); } .fl.big { font-size: 26px; color: var(--brass-hi); letter-spacing: .08em; }
@keyframes floatup { from { opacity: 0; transform: translate(-50%, 10px); } 15% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -60px); } }

/* ================================================================ 5. Карточки: альбом */
.ahead { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 16px; align-items: start; }
.aid { display: grid; gap: 6px; }
.aid > b { font: 900 22px/1.1 var(--display); color: var(--text); }
.rcs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 4px; }
.rc { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border-radius: var(--r-2); background: rgba(255,255,255,.035); box-shadow: inset 0 0 0 1px var(--line); }
.rc img { height: 30px; width: auto; object-fit: contain; }
.rc i { width: 22px; height: 30px; border-radius: 3px; background: #0d100c; box-shadow: inset 0 0 0 1px var(--line); }
.rc b { font: 900 18px/1 var(--display); } .rc small { font: 600 9.5px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.rc.chaos b { color: var(--rar-chaos); } .rc.gold b { color: var(--rar-gold); } .rc.silver b { color: var(--rar-silver); } .rc.brass b { color: var(--rar-brass); }
.goals { display: grid; gap: 8px; }
.agoal { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 0 12px; align-items: center; padding: 8px 12px; border-radius: var(--r-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.agoal .gi { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--brass); box-shadow: inset 0 0 0 1px var(--brass-lo); }
.agoal .gw { display: grid; gap: 4px; min-width: 0; }
.agoal .gw b { font: 900 13px/1.1 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--text); } .agoal .gw b small { text-transform: none; letter-spacing: 0; font-size: 11px; }
.agoal .gbar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.agoal .gbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brass), var(--brass-hi)); }
.agoal.silver .gbar i { background: linear-gradient(90deg, #8e97a3, #fff); } .agoal.gold .gbar i { background: linear-gradient(90deg, #e0a52a, #fff1b0); }
.agoal .gw small { font-size: 11.5px; }
.agoal em { font: 900 20px/1 var(--display); font-style: normal; } .agoal em small { font-size: 12px; }
.agoal.done { box-shadow: inset 0 0 0 1px var(--brass); }
.melted { margin-top: 10px; padding: 8px 12px; border-radius: var(--r-2); background: linear-gradient(90deg, rgba(201,164,92,.12), transparent); box-shadow: inset 0 0 0 1px var(--brass-lo); }
.melted b { font: 900 13px/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--brass-hi); } .melted small { display: block; margin-top: 3px; font-size: 12px; }
.afl { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 10px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border: 0; border-radius: 14px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-dim); font: 600 12px/1 var(--ui); cursor: pointer; }
.fchip i { width: 9px; height: 9px; transform: rotate(45deg); border-radius: 2px; background: #3a4432; }
.fchip.brass i { background: linear-gradient(135deg, #f3d98f, #8a6a2c); } .fchip.silver i { background: linear-gradient(135deg, #fff, #8e97a3); }
.fchip.gold i { background: linear-gradient(135deg, #fff1b0, #e0a52a); } .fchip.chaos i { background: linear-gradient(135deg, #e3ccff, #7a3fe0); } .fchip.all i { display: none; }
.fchip b { color: var(--text); } .fchip.on { color: var(--on-brass); background: linear-gradient(#ffe9a8, #c9a45c); box-shadow: none; } .fchip.on b { color: var(--on-brass); }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 14px; }
.acell { position: relative; display: grid; gap: 4px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-align: center; min-width: 0; }
.acell .an { font: 600 11.5px/1.15 var(--ui); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acell.miss .an { color: var(--text-dim); }
.acell.sel .cardx { transform: translateY(-4px); filter: drop-shadow(0 0 12px rgba(236,208,138,.55)); }
.cardx { position: relative; aspect-ratio: var(--ar, 360 / 490); transition: transform .2s ease; container-type: inline-size; }
.cardx .nmp { position: absolute; left: var(--px); top: var(--py); width: var(--pw); height: var(--ph); z-index: 1; display: grid; place-items: center;
  padding: 0 4%; font: 900 8.4cqw/1 var(--display); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cardx .nmp.dark { color: #2a1d08; text-shadow: 0 1px 0 rgba(255,236,190,.45); } .cardx .nmp.steel { color: #1e252e; text-shadow: 0 1px 0 rgba(255,255,255,.45); }
.cardx .nmp.glow { color: #f0e2ff; text-shadow: 0 0 6px rgba(167,123,255,.9); }
.cardx.none .nmp { color: #6b6352; text-shadow: none; }
.cardx .win { position: absolute; left: var(--wx, 20%); top: var(--wy, 16%); width: var(--ww, 60%); height: var(--wh, 64%); overflow: hidden; background: #1c2118; }
.cardx .win img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cardx > img.fr { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; filter: drop-shadow(0 8px 14px rgba(0,0,0,.55)); }
.cardx.gold { filter: drop-shadow(0 0 12px rgba(245,200,76,.35)); } .cardx.chaos { filter: drop-shadow(0 0 12px rgba(167,123,255,.45)); }
.cardx.none > img.fr { filter: grayscale(1) brightness(.35); }
.cardx.none .win { background: #050605; }
.cardx .lk { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); color: var(--brass); }
.cardx .lk svg { width: 22px; height: 22px; }
.cardx .xn { position: absolute; right: 4px; bottom: 8%; padding: 2px 5px; border-radius: 8px; font: 700 10px/1 var(--ui); color: var(--text); background: rgba(13,16,12,.85); box-shadow: inset 0 0 0 1px var(--line); }
.cardx .mlt { position: absolute; left: 50%; top: -8px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 3px; font: 700 9.5px/1 var(--ui); color: var(--on-brass); background: linear-gradient(#ffd3a3, #f0b57a); white-space: nowrap; }
.cardx .mlt svg { width: 10px; height: 10px; }
.cardx .new { position: absolute; left: 50%; top: -9px; transform: translateX(-50%); z-index: 2; padding: 3px 8px; border-radius: 3px; font: 700 10px/1 var(--ui); letter-spacing: .14em; color: var(--on-soul); background: linear-gradient(#a8f0da, #7fe0bf); box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.apop { margin-top: 12px; display: grid; gap: 10px; padding: 12px 14px; border-radius: var(--r-3); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--brass-lo), 0 12px 30px rgba(0,0,0,.4); }
.ap-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.ap-h b { font: 900 20px/1 var(--display); } .ap-h em { font-style: normal; } .ap-h .x { margin-left: auto; border: 0; background: none; color: var(--text-dim); cursor: pointer; min-height: 32px; }
.ap-h .brass { color: var(--rar-brass); } .ap-h .silver { color: var(--rar-silver); } .ap-h .gold { color: var(--rar-gold); } .ap-h .chaos { color: var(--rar-chaos); }
.ap-n { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ap-n div { display: grid; justify-items: center; gap: 3px; padding: 6px; border-radius: var(--r-2); background: rgba(0,0,0,.25); opacity: .55; }
.ap-n div.has { opacity: 1; box-shadow: inset 0 0 0 1px var(--brass-lo); }
.ap-n b { font: 900 20px/1 var(--display); } .ap-n small { font: 600 9.5px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.ap-do { display: flex; flex-wrap: wrap; gap: 8px; }
.abot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.aact { display: flex; flex-wrap: wrap; gap: 8px; }
.lastc { display: grid; grid-template-columns: 76px auto; gap: 12px; align-items: center; }
.lc-in { position: relative; width: 76px; aspect-ratio: 360 / 503; transform-style: preserve-3d; transition: transform .7s ease; }
.lastc.flip .lc-in { transform: rotateY(180deg); }
.lastc.flip.shown .lc-in { transform: none; }
.lc-back, .lc-front { position: absolute; inset: 0; backface-visibility: hidden; }
.lc-back { transform: rotateY(180deg); } .lc-back img { width: 100%; height: 100%; object-fit: contain; }
.lc-t { display: grid; gap: 2px; } .lc-t b { font: 900 18px/1 var(--display); }
.lc-t .eyebrow { font: 700 10px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.lc-t .eyebrow.chaos { color: var(--rar-chaos); } .lc-t .eyebrow.gold { color: var(--rar-gold); } .lc-t .eyebrow.silver { color: var(--rar-silver); }
.nickf { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(110,83,38,.45); }
.nickf label { display: grid; gap: 4px; font: 600 10.5px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); flex: 1 1 220px; max-width: 360px; }
.nickf input { min-height: 40px; padding: 8px 10px; border-radius: var(--r-2); border: 1px solid var(--line); background: #0d100c; color: var(--text); font: 15px var(--ui); text-transform: none; letter-spacing: 0; }
.nickf .btn { min-height: 40px; }
.coll { margin-top: 16px; }
.ctab { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.ctab li { display: grid; grid-template-columns: 30px minmax(0, 1fr) 150px 70px 56px 44px; gap: 8px; align-items: center; padding: 5px 10px 5px 6px; border-radius: var(--r-2); background: rgba(255,255,255,.03); font-size: 13px; }
.ctab li small { display: none; }
.ctab li.hd { background: none; font: 600 10px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.ctab li.self { background: rgba(127,224,191,.07); box-shadow: inset 2px 0 0 var(--soul); }
.ctab .pl { font-style: normal; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 3px; font: 700 12px/1 var(--ui); background: rgba(255,255,255,.05); }
.ctab .p1 { color: var(--on-brass); background: linear-gradient(#ffe9a8, #c9a45c); } .ctab .p2 { color: #1a1d22; background: linear-gradient(#fff, #9aa3ad); } .ctab .p3 { color: #2a1406; background: linear-gradient(#f0b57a, #9b5c2a); }
.ctab a.nick { color: var(--text); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; justify-self: start; max-width: 100%; }
.ctab .hb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); } .ctab .hb b { color: var(--text); }
.ctab .hb u { flex: 1; height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; text-decoration: none; } .ctab .hb u i { display: block; height: 100%; background: var(--brass); }
.ctab li > span { text-align: right; font-variant-numeric: tabular-nums; } .ctab li.hd > span:first-of-type { text-align: left; } .ctab li > span.g { color: var(--rar-gold); } .ctab li > span.c { color: var(--rar-chaos); }

/* ================================================================ 6. История: строки и итоги по дням */
.histg { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hist .day { margin: 8px 0 2px; font: 900 11px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.hist .day:first-child { margin-top: 0; }
.hist .empty { color: var(--text-dim); font-size: 13px; }
.hrow { display: grid; grid-template-columns: 28px 52px minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 6px 10px 6px 6px; border-radius: 4px; background: rgba(255,255,255,.035); font-size: 13px; }
.hrow .ic { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.05); color: var(--text-dim); }
.hrow .ic svg { width: 14px; height: 14px; }
.hrow time { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.hrow .w { min-width: 0; display: flex; align-items: baseline; gap: 8px; } .hrow .w b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .w small { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .w .n { flex: none; padding: 1px 6px; border-radius: 8px; font-size: 11px; color: var(--text-dim); background: rgba(255,255,255,.06); }
.hrow em { font: 900 15px/1 var(--display); font-style: normal; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hrow .m { display: none; }
.hrow.in em { color: var(--soul); } .hrow.out em { color: var(--text-dim); } .hrow.loss em { color: var(--danger); } .hrow.back em { color: var(--text); }
.hrow.folded { background: rgba(255,255,255,.02); }
.dsum { display: grid; gap: 10px; }
.dsum .box { padding: 10px 12px; border-radius: var(--r-2); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.dsum .ph3 { margin: 0; }
.dsum ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; }
.dsum li { display: grid; grid-template-columns: 44px minmax(0, 1fr) 62px 62px; gap: 8px; align-items: center; font-size: 12.5px; }
.dsum li span { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.dsum li .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.06); overflow: hidden; display: flex; }
.dsum li .bar i { display: block; height: 100%; } .dsum li .bar .p { background: var(--soul); } .dsum li .bar .m { background: rgba(189,179,154,.45); }
.dsum li b { font: 700 12px/1 var(--ui); color: var(--soul); font-variant-numeric: tabular-nums; text-align: right; } .dsum li em { font: 600 12px/1 var(--ui); font-style: normal; color: var(--text-dim); text-align: right; font-variant-numeric: tabular-nums; }
.srcbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin: 8px 0 6px; }
.srcbar i { display: block; height: 100%; }
.srcl { display: grid; gap: 3px; font-size: 12px; color: var(--text-dim); }
.srcl span { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 8px; align-items: center; } .srcl span i { width: 9px; height: 9px; border-radius: 2px; } .srcl b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hist-more { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: var(--text-dim); }

/* нижний лист с карточкой гнезда (телефон) */
dialog.sheetd { border: 0; margin: auto auto 0; width: 100%; max-width: 520px; padding: 12px 12px 18px; border-radius: 12px 12px 0 0; background: var(--surface-1); color: var(--text); box-shadow: 0 -10px 40px rgba(0,0,0,.6); }
dialog.sheetd::backdrop { background: rgba(0,0,0,.55); }
dialog.sheetd > .btn { width: 100%; margin-top: 10px; min-height: 48px; }

/* ================================================================ узко */
@media (max-width: 1100px) {
  .sbox { grid-template-columns: 1fr; }
  .gearg { grid-template-columns: 1fr; justify-items: center; }
  .gearg > .gside { width: 100%; }
  .histg { grid-template-columns: 1fr; }
  .fight { grid-template-columns: 1fr; }
  .ahead { grid-template-columns: 1fr; }
  .tierrow .list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hgrid { grid-template-columns: 1fr; }
  .branches { grid-template-columns: 1fr; }
}
/* телефон, 375: одна колонка, поля 16 px, без горизонтальной прокрутки, кнопки 48 px */
@media (max-width: 600px) {
  .topbar { padding: 0 16px; } .topbar .live { display: none; }
  .hnav a { padding: 12px 8px; letter-spacing: .06em; font-size: 12px; }
  .hnav .sep { margin: 0 4px; }
  .hband { padding: 16px 0 18px; }
  .pcol { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; }
  .pcol .room { top: -16px; width: 760px; height: 424px; opacity: .55; }
  .pedestal-gap { display: none; }
  .pframe { width: 120px; aspect-ratio: auto; height: 158px; margin: 0; }
  .pframe .fart { display: none; }
  .pframe .fwin { inset: 0; width: 100%; height: 100%; border-radius: 4px; box-shadow: inset 0 0 0 2px #b48c45; }
  .pframe .em { width: 24px; height: 24px; }
  .pframe .rki { width: 18px; height: 28px; }
  .pframe .nameplate { width: 108px; bottom: -10px; padding: 5px 4px 4px; }
  .pframe .nameplate b { font-size: 13px; letter-spacing: .08em; }
  .pframe .nameplate span { font-size: 8px; letter-spacing: .1em; }
  .idplate.plate { display: contents; }
  .idplate .idtop { grid-column: 2; grid-row: 1; align-self: center; }
  .idplate h1 { font-size: 24px; }
  .idplate .rest { grid-column: 1 / -1; margin-top: 10px; padding: 12px; border-radius: var(--r-3); background: linear-gradient(180deg, rgba(26,31,23,.94), rgba(13,16,12,.96)); box-shadow: inset 0 0 0 1px var(--line-brass); }
  .idrow { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl em { font-size: 19px; }
  .tl .btn { min-height: 32px; }
  .fighter2 .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fighter2 .foot2 .row { margin-left: 0; }
  .btn, .fighter2 .foot2 .btn, .irow .btn, .it2 .btn { min-height: 48px; }
  .doll { width: 343px; height: 457px; }
  .sk { --s: clamp(48px, 14vw, 64px); }
  .sk .nm { font-size: 10px; margin-top: 6px; }
  .sk .nm small { display: none; }
  .sk.pk { --s: 42px; }
  .pockets-l { bottom: 52px; }
  .gside #idet { display: none; }
  .idet { grid-template-columns: 84px minmax(0, 1fr); padding: 12px; gap: 10px 12px; }
  .idet .sk { --s: 84px; }
  .idet .hd b { font-size: 20px; }
  .idet .ln { grid-template-columns: 1fr; gap: 3px; }
  .idet .do .btn { width: 100%; }
  .tierrow { grid-template-columns: 1fr; gap: 6px; }
  .tierrow > b { display: flex; align-items: baseline; gap: 8px; padding-top: 0; }
  .tierrow .list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .it2 { grid-template-columns: 32px minmax(0, 1fr); padding: 6px 6px 7px 8px; gap: 2px 7px; }
  .it2 .pic, .it2 .pic img { width: 32px; height: 32px; }
  .it2 b { font-size: 11.5px; }
  .it2 .st { font-size: 10px; }
  .it2 .btn { font-size: 9.5px; letter-spacing: 0; padding: 3px 3px; }
  .irow { grid-template-columns: 40px minmax(0, 1fr) auto; } .irow .lvl3 { display: none; }
  .mtrack { display: none; }
  .mdots { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; }
  .mdots .dd { display: flex; gap: 3px; flex: 1; min-width: 0; }
  .mdots .dd i { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 900 10px/1 var(--display); font-style: normal; color: var(--text-dim); background: #12160f; box-shadow: inset 0 0 0 1px var(--line); }
  .mdots .dd i.on { color: var(--on-brass); background: radial-gradient(circle at 40% 30%, #fff1c2, #e0b45a 45%, #8a6a2c); box-shadow: none; }
  .mdots .dd i.nx { color: var(--soul); box-shadow: inset 0 0 0 2px var(--soul); }
  .mdots > b { font: 900 22px/1 var(--display); color: var(--text); } .mdots > b small { font-size: 13px; color: var(--text-dim); }
  .mfoot .btn { width: 100%; }
  .btabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
  .btabs button { display: grid; justify-items: center; gap: 3px; min-height: 48px; padding: 8px 4px; border: 0; border-radius: var(--r-2); background: var(--surface-2); color: var(--text-dim); box-shadow: inset 0 0 0 1px var(--line); font: 600 11px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
  .btabs button b { font: 900 15px/1 var(--display); color: var(--text); letter-spacing: 0; }
  .btabs button.on { color: var(--c); background: var(--cs); box-shadow: inset 0 0 0 2px var(--c); }
  .branches { margin-top: 8px; }
  .branches .br:not(.on) { display: none; }
  .btn.br-buy { min-height: 40px; }
  .mine { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bhead { grid-template-columns: 46px minmax(0, 1fr); }
  .bhead .pic { width: 46px; height: 60px; }
  .bhead .live2 { grid-column: 1 / -1; justify-self: start; }
  .bosshalf .do .btn { width: 100%; }
  .trial { grid-template-columns: minmax(0, 1fr) 84px; }
  .trial .dummyw { width: 84px; height: 136px; }
  .trial .lock .btn { width: 100%; }
  .rcs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .agrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 6px; }
  .acell .an { font-size: 10px; }
  .ctab li { grid-template-columns: 26px minmax(0, 1fr) 64px 42px 34px; gap: 6px; }
  .ctab li.hd { font-size: 9px; letter-spacing: .04em; }
  .ctab li > .sv { display: none; }
  .ctab .hb u { display: none; }
  .hrow { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .hrow time { display: none; }
  .hrow .w { display: grid; gap: 1px; }
  .hrow .w .n { justify-self: start; }
  .agoal { grid-template-columns: 30px minmax(0, 1fr); } .agoal em { grid-column: 2; }
  .sbx { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 12px 12px 14px; gap: 10px; }
  .chest { width: 156px; height: 160px; } .chest .cb { width: 84px; margin-left: -42px; }
  .sbt .btn.big { justify-self: stretch; }
  .snow { grid-template-columns: 44px minmax(0, 1fr); } .snow > img, .snow .sn-i { width: 44px; } .snow .sn-i { height: 44px; }
  .snow .btn { grid-column: 1 / -1; width: 100%; }
  .sgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; }
  .skt .sx-r, .skt .sx-s { font-size: 8px; padding: 2px 4px; }
  .skt .sx-n b { font-size: 11.5px; } .skt .sx-n small { font-size: 10.5px; }
  .spop { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px 40px 14px 12px; }
  .spop .sp-t b { font-size: 20px; }
  .spop .do .btn { width: 100%; }
  .rv-t h3 { font-size: 24px; }
  .rv-do .btn { flex: 1 1 140px; }
  .skt .sx-d { font-size: 8px; padding: 2px 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .sk.flyin .fr, .sk.upflash::after, .step.lit .k, .trial .dummy.hit, .fl { animation: none; }
  .lc-in, .trial .tbar i, .cardx, .steps::after { transition: none; }
  .rv-card, .rv-in, .rv-rays, .rv-flash, .rv-front, .rv-t, .rv-do, .rv-sparks i { animation: none !important; }
  .rv-sparks { display: none; }
  .skt .sx-p { transition: none; }
}

/* личная карточка Deadlock (playercard.py) */
#pcard .pc-wrap { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
#pcard .pc-img { flex: 0 0 auto; width: min(320px, 100%); line-height: 0; border-radius: 10px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(184,137,58,.5); }
#pcard .pc-img img { width: 100%; height: auto; display: block; }
#pcard .pc-side { flex: 1 1 220px; min-width: 0; }
#pcard .pc-meta { line-height: 1.5; margin: 0 0 14px; }
#pcard .pc-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
#pcard .pc-how { opacity: .8; line-height: 1.5; max-width: 60ch; }
