/* Подземелье: все стили игры (вынесены из index.html 11.11 — рефакторинг). Картинки — относительно css/: ../assets/ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body {
  width: 100%; height: 100%; overflow: hidden; background: #0a090e;
  font-family: 'Segoe UI', Roboto, Arial, sans-serif; color: #e8eaf0;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
#game { position: fixed; inset: 0; }
#vignette {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0,0,0,.55) 100%);
}
#ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#ui button { pointer-events: auto; cursor: pointer; font-family: inherit; }
.hidden { display: none !important; }
.muted { color: #737a88; font-size: 11px; }

/* ---------- рамка игрока ---------- */
.player-frame {
  position: absolute; top: 8px; left: 8px;
  background: rgba(14,16,22,.85); border: 1px solid #343a48; border-radius: 12px;
  padding: 8px; min-width: 210px;
}
.pf-top { display: flex; gap: 8px; align-items: center; }
.pf-level {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: linear-gradient(160deg,#f0d060,#a07818); color: #1a1408;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; border: 2px solid #ffe79a;
}
.pf-bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.bar { position: relative; background: #101218; border: 1px solid #2c3038; border-radius: 5px; overflow: hidden; height: 15px; }
.bar.mp { height: 14px; } .bar.xp { height: 13px; }   /* рецензия 12.11: цифры 9px с телефона не читались */
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transition: width .15s; }
.bar.hp .fill { background: linear-gradient(180deg,#e85555,#a12727); }
.bar.mp .fill { background: linear-gradient(180deg,#5b7fe8,#2b47a1); }
.bar.xp .fill { background: linear-gradient(180deg,#e8c455,#a1831f); }
.bar span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000;
}
.bar.big { height: 16px; } .bar.big span { font-size: 11px; }
.pf-buffs { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; min-height: 0; }
.buff-chip {
  background: #1c2029; border: 1px solid #3a4152; border-radius: 6px;
  font-size: 14px; padding: 1px 4px; display: flex; align-items: center; gap: 2px;
}
.buff-chip i { font-style: normal; font-size: 9px; color: #9fb6d8; }

/* ---------- верх справа ---------- */
.top-right { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; align-items: center; }
.info-chip {
  background: rgba(14,16,22,.85); border: 1px solid #343a48; border-radius: 10px;
  padding: 8px 10px; font-size: 14px; font-weight: 700;
}
.icon-btn {
  width: 46px; height: 46px; border-radius: 12px; font-size: 21px; position: relative;
  background: rgba(20,23,31,.9); border: 1px solid #3a4152; color: #fff;
}
.icon-btn:active { transform: scale(.93); }
.icon-btn .badge {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 10px;
  background: #f0d060; color: #1a1408; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
  border: 1px solid #fff2c0;
}
.icon-btn.flash { animation: flash .6s; }
@keyframes flash { 0%,100% { box-shadow: none; } 50% { box-shadow: 0 0 14px 4px #f0d060; } }

/* ---------- цель ---------- */
.target-frame {
  position: absolute; top: 62px; left: 50%;   /* под верхним рядом: на планшете на 8px налезала на серебро и время (12.11) */ transform: translateX(-50%);
  background: rgba(14,16,22,.88); border: 1px solid #4a3a3a; border-radius: 12px;
  padding: 6px 10px; min-width: 220px;
}
.tf-name { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.tf-lvl { color: #9aa1b0; font-weight: 400; font-size: 12px; }
#tf-close {
  margin-left: auto; background: none; border: none; color: #8a8f9c; font-size: 14px; padding: 2px 4px;
}

/* ---------- паровоз ---------- */
.train {
  position: absolute; top: 116px; left: 50%; transform: translateX(-50%);
  background: rgba(40,16,16,.9); border: 1px solid #7a3a2a; border-radius: 10px;
  padding: 5px 12px; font-size: 14px;
}
.train.hot { animation: trainhot .5s infinite alternate; }
@keyframes trainhot { from { box-shadow: 0 0 4px #ff5533; } to { box-shadow: 0 0 16px #ff5533; } }

/* ---------- каст ---------- */
.cast-bar {
  position: absolute; bottom: calc(120px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  width: 240px; text-align: center;
}
.cast-name { font-size: 12px; color: #cfd6e4; text-shadow: 0 1px 2px #000; margin-bottom: 3px; }
.cast-track { height: 10px; background: #101218; border: 1px solid #3a4152; border-radius: 5px; overflow: hidden; }
.cast-fill { height: 100%; width: 0; background: linear-gradient(90deg,#7a5fd0,#b090ff); transition: width .1s linear; }

/* ---------- вопрос на лестнице ---------- */
.stairs-ask {
  position: absolute; bottom: calc(185px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  background: rgba(14,16,22,.95); border: 1px solid #d4af37; border-radius: 14px;
  padding: 12px 18px; text-align: center; pointer-events: auto; z-index: 15;
  box-shadow: 0 8px 30px rgba(0,0,0,.6);
}
.sa-text { font-size: 15px; font-weight: 700; margin-bottom: 10px; white-space: pre-line; }
.sa-btns { display: flex; gap: 10px; justify-content: center; }
.sa-btn {
  min-width: 110px; padding: 11px 16px; border-radius: 10px; font-size: 15px; font-weight: 700;
  background: #2a2e3a; border: 1px solid #3a4152; color: #e8eaf0;
}
.sa-btn.yes { background: linear-gradient(160deg,#f0d060,#b08a20); border-color: #ffe79a; color: #241c06; }
.sa-btn:active { transform: scale(.95); }

/* ---------- тосты ---------- */
.toasts {
  position: absolute; bottom: calc(150px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: max-content; max-width: 92vw;
}
.toast {
  background: rgba(12,14,19,.92); border: 1px solid #4a4432; border-radius: 9px;
  padding: 7px 14px; font-size: 13px; animation: toastin .25s; text-align: center;
}
.toast.out { opacity: 0; transform: translateY(-8px); transition: all .4s; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- скиллбар ---------- */
#skillbar {
  position: absolute; bottom: calc(10px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px; pointer-events: auto; padding: 0 8px;
  max-width: 100vw; flex-wrap: wrap; justify-content: center;
}
.slot {
  width: 54px; height: 54px; border-radius: 12px; position: relative; flex: none;
  background: rgba(18,21,28,.92); border: 2px solid #3a4152;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,.5); cursor: pointer;
}
.slot:active { transform: scale(.92); }
.slot .s-icon { font-size: 26px; line-height: 1; }
.slot .s-lvl {
  position: absolute; bottom: 2px; right: 5px; font-size: 10px; font-weight: 800; color: #f0d060;
  text-shadow: 0 1px 2px #000;
}
.slot .s-cnt {
  position: absolute; top: 2px; right: 5px; font-size: 11px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 2px #000;
}
.slot .s-cd {
  position: absolute; left: 0; right: 0; top: 0; height: 0%;
  background: rgba(0,0,0,.72); transition: height .1s linear; pointer-events: none;
}
.slot.dis { filter: grayscale(.8); opacity: .55; }
.slot.potion { border-color: #4a3a52; }
.slot.auto { border-color: #4a4436; }
.slot.auto .s-auto {
  position: absolute; bottom: 2px; left: 0; right: 0; text-align: center;
  font-size: 11px; font-weight: 800; color: #8a8470; letter-spacing: 0;
}
.slot.auto.on { border-color: #f0d060; box-shadow: 0 0 12px rgba(240,208,96,.45); }
.slot.auto.on .s-auto { color: #f0d060; }
.sb-hint {
  background: rgba(18,21,28,.92); border: 1px dashed #4a5162; border-radius: 12px;
  display: flex; align-items: center; padding: 0 14px; font-size: 13px; color: #aab2c4;
}

/* ---------- панели ---------- */
#panel-root {
  position: fixed; inset: 0; z-index: 20; background: rgba(4,5,8,.6);
  display: flex; align-items: center; justify-content: center; pointer-events: auto;
}
.panel {
  width: min(760px, 94vw); max-height: 88vh; display: flex; flex-direction: column;
  background: #14161df5; border: 1px solid #3a4152; border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.6);
}
.panel.wide { width: min(1100px, 96vw); }

.death-book { width: 150px; margin: 0 auto; display: block; }
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid #2a2e3a;
  font-size: 17px; font-weight: 800; color: #f0d060;
}
.p-close { width: 44px; height: 44px; flex: none; border-radius: 10px; background: #23262f; border: 1px solid #3a4152; color: #cfd3dd; font-size: 19px; }   /* палец: от 44 */
.panel-body { overflow: auto; padding: 14px; }

/* дерево навыков: вкладки веток + ярусы сверху вниз */
.tree-panel { height: 92vh; }
.tree-panel .panel-body { display: flex; flex-direction: column; overflow: hidden; flex: 1; min-height: 0; padding: 10px 12px; }
.sk-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sk-sp { font-size: 16px; font-weight: 700; }
.sk-sp.has b { color: #8ff08a; text-shadow: 0 0 8px rgba(120,240,120,.6); }
.sk-top .mini-btn { margin-left: auto; }
.sk-tabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin-bottom: 8px; }
.sk-tabs button {
  position: relative; height: 48px; border-radius: 10px; border: 2px solid #2c3140;
  background: #171a22; font-size: 24px; display: flex; align-items: center; justify-content: center; padding: 0;
}
.sk-tabs button.on { border-color: var(--bc); background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--bc) 40%, #171a22), #171a22 75%); box-shadow: 0 0 10px color-mix(in srgb, var(--bc) 60%, transparent); }
.sk-tabs button i {
  position: absolute; right: 3px; bottom: 1px; font-style: normal; font-size: 12px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 2px #000;
}
.sk-branch {
  flex: 1; min-height: 0; overflow-y: auto; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--bc) 45%, #2c3038);
  background:
    radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--bc) 22%, transparent), transparent 60%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.015) 0 6px, transparent 6px 12px),
    #12141b;
  padding: 10px 10px 14px;
}
.sk-bhead { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.sk-bhead b { font-size: 19px; color: var(--bc); text-shadow: 0 1px 6px #000; }
.sk-bhead span { font-size: 14px; color: #c8cbd6; line-height: 1.35; }
.sk-bhead em { font-style: normal; font-size: 13px; color: #8d96a8; }
.sk-tiers { position: relative; }
.sk-tiers::before, .sk-tiers::after {
  content: ''; position: absolute; left: 50%; top: 30px; width: 6px; margin-left: -3px; border-radius: 3px;
}
.sk-tiers::before { bottom: 30px; background: #232733; }
.sk-tiers::after { height: calc((100% - 60px) * var(--fill) / 100); background: linear-gradient(var(--bc), color-mix(in srgb, var(--bc) 50%, #000)); box-shadow: 0 0 8px var(--bc); }
.sk-tier { position: relative; z-index: 1; margin-bottom: 12px; }
.sk-tnum {
  position: absolute; left: 50%; top: 22px; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%;
  background: #1b1f29; border: 2px solid var(--bc); color: #f2ead2; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.sk-tier.locked .sk-tnum { border-color: #3a4152; color: #6d7484; }
.sk-nodes { display: grid; grid-template-columns: 1fr 1fr; column-gap: 46px; }
.sk-node { display: flex; flex-direction: column; align-items: center; cursor: pointer; padding: 4px 0; border-radius: 12px; }
.sk-node.sel { background: rgba(255,255,255,.06); outline: 2px solid color-mix(in srgb, var(--bc) 70%, transparent); }
.sk-gem {
  position: relative; width: 62px; height: 62px; border-radius: 50%;
  border: 3px solid #3a4152; background: radial-gradient(circle at 35% 30%, #2c3140, #13151c 70%);
  display: flex; align-items: center; justify-content: center; font-size: 29px; line-height: 1;
}
.sk-gem em {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); font-style: normal;
  font-size: 11px; font-weight: 800; padding: 0 5px; border-radius: 7px; background: #1b1f29; color: #9fd68a; border: 1px solid #3c5a3a;
}
.sk-node.locked .sk-gem { filter: grayscale(1) brightness(.55); }
.sk-node.available .sk-gem { border-color: color-mix(in srgb, var(--bc) 60%, #3a4152); }
.sk-node.unlocked .sk-gem {
  border-color: var(--bc);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--bc) 55%, #2c3140), #13151c 75%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--bc) 55%, transparent);
}
.sk-node.maxed .sk-gem { border-color: #f0d060; box-shadow: 0 0 16px rgba(240,208,96,.7); }
.sk-node.can .sk-gem { animation: skpulse 1.1s infinite alternate; }
@keyframes skpulse { from { box-shadow: 0 0 3px rgba(130,240,130,.4); } to { box-shadow: 0 0 18px rgba(130,240,130,.95); } }
.sk-name { margin-top: 7px; font-size: 13px; font-weight: 700; color: #e2dac2; text-align: center; line-height: 1.2; text-shadow: 0 1px 3px #000; }
.sk-node.locked .sk-name { color: #7d8494; }
.sk-pips { display: flex; gap: 3px; margin-top: 4px; }
.sk-pips i { width: 8px; height: 8px; border-radius: 50%; background: #2a2e3a; border: 1px solid #454c5e; }
.sk-pips i.on { background: var(--bc); border-color: #fff8; box-shadow: 0 0 4px var(--bc); }
.sk-tier.ult .sk-nodes { grid-template-columns: 1fr; }
.sk-tier.ult .sk-gem { width: 72px; height: 72px; font-size: 34px; }
.sk-tier.ult { padding-top: 6px; }
.sk-tier.ult .sk-tnum { top: -8px; }
.sk-lock { text-align: center; font-size: 13px; color: #9aa1b0; margin-top: 2px; }
.ni-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.ni-head b { font-size: 17px; }
.ni-desc { margin: 4px 0; color: #e2dac2; }
.ni-stat { color: #b8c4d8; font-size: 14px; }
.ni-next { color: #9fd68a; font-size: 14px; }
.ni-req { margin-top: 4px; font-size: 14px; }
.node-owned { color: #86e06e; font-weight: 700; margin-top: 6px; }
.learn-btn {
  margin-top: 8px; padding: 11px 22px; border-radius: 10px; font-size: 16px; font-weight: 800;
  background: #2e5d36; border: 1px solid #4a8f55; color: #dfffe4;
}
.learn-btn:disabled { opacity: .45; }
.learn-btn:active { transform: scale(.97); }
.slot.skill-auto .s-autotag {
  position: absolute; bottom: 1px; left: 0; right: 0; text-align: center;
  font-size: 7px; font-weight: 800; color: #7d9a6a; letter-spacing: .5px;
}

.l2-doll { display: grid; grid-template-columns: repeat(3, 62px); gap: 8px 10px; }
/* сумка 10.11: кукла + сводка героя рядом, карточка вещи поверх окна */
.inv-top {
  display: flex; flex-wrap: wrap; gap: 12px 18px; justify-content: center; align-items: stretch;
  padding: 12px; background: #12151c; border: 1px solid #2c3038; border-radius: 12px;
}
.inv-top .l2-doll { grid-template-columns: repeat(3, 66px); gap: 18px 10px; padding-bottom: 14px; }
.inv-top .eqcell { width: 66px; height: 66px; }
.inv-top .eqcell .cell-icon { width: 56px; height: 56px; }
.inv-top .eqcell .cell-ghost { font-size: 12px; font-weight: 700; color: #8a93a6; text-align: center; line-height: 1.15; }
.inv-top .eqcell .cell-label {
  bottom: -17px; font-size: 12px; font-weight: 700; color: #c9cfdc; text-shadow: 0 1px 2px #000;
}
.inv-sum {
  flex: 1 1 200px; max-width: 330px; display: flex; flex-direction: column; gap: 4px;
  background: #171a22; border: 1px solid #2c3140; border-radius: 10px; padding: 10px 12px;
}
.inv-sum > div:not(.inv-sum-head):not(.inv-sum-foot) { display: flex; justify-content: space-between; font-size: 15px; color: #c9cfdc; }
.inv-sum > div b { color: #fff; }
.inv-sum-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.inv-sum-head img { width: 48px; height: 60px; image-rendering: pixelated; }
.inv-sum-head span { font-size: 36px; }
.inv-sum-head b { display: block; font-size: 17px; color: #f0d060; }
.inv-sum-head i { font-style: normal; font-size: 14px; color: #c9cfdc; }
.inv-sum-foot { margin-top: auto; padding-top: 6px; border-top: 1px solid #2c3140; font-size: 15px; font-weight: 700; color: #d9dce6; }
.bagcell .cell-cmp {
  position: absolute; left: 3px; bottom: 2px; font-size: 11px; font-weight: 800; text-shadow: 0 1px 2px #000;
}
.bagcell .cell-cmp.up { color: #5fe07a; }
.bagcell .cell-cmp.down { color: #ff6b5a; font-size: 13px; }
.bagcell .cell-cmp.lock { font-size: 12px; }
.inv-pop {
  position: fixed; inset: 0; z-index: 40; background: rgba(4,5,8,.55);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.inv-card {
  position: relative; width: min(440px, 100%); max-height: 86vh; overflow: auto;
  background: #1a1d26; border: 1px solid #4a5162; border-radius: 14px; padding: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.7); display: flex; flex-direction: column; gap: 10px;
}
.inv-card .pop-x { position: absolute; top: 10px; right: 10px; }
.pop-head { display: flex; align-items: center; gap: 12px; padding-right: 40px; }
.pop-icon { width: 72px; height: 72px; flex: 0 0 72px; font-size: 40px; display: flex; align-items: center; justify-content: center;
  background: #12141b; border: 1px solid #2c3140; border-radius: 10px; }
.pop-icon img { width: 100%; height: 100%; object-fit: contain; }
.pop-head b { display: block; font-size: 18px; }
.pop-head i { font-style: normal; font-size: 14px; color: #aab2c4; }
.pop-stats { font-size: 15px; color: #e3e7f0; background: #12141b; border-radius: 9px; padding: 8px 10px; }
.inv-card .cmp { margin-top: 0; }
.pop-acts { display: flex; gap: 8px; justify-content: center; }
.pop-acts .big-btn { margin: 0; }
.pop-lock { font-size: 15px; font-weight: 700; color: #ffb35a; }
.big-btn.gray { background: #3a4152; }
.l2-grid.inv-grid { grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); }
.inv-grid .bagcell { max-width: 72px; }
@media (max-width: 520px) {
  .inv-top { padding: 10px 8px; gap: 10px; }
  .inv-top .l2-doll { grid-template-columns: repeat(3, 60px); gap: 16px 12px; }
  .inv-top .eqcell { width: 60px; height: 60px; }
  .inv-top .eqcell .cell-icon { width: 50px; height: 50px; }
  .inv-sum { flex-basis: 100%; max-width: none; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; padding: 8px 10px; }
  .inv-sum-head, .inv-sum-foot { grid-column: 1 / -1; }
  .inv-sum-head img { width: 32px; height: 40px; }
  .inv-sum-head b { display: inline; font-size: 16px; margin-right: 8px; }
  .inv-sum > div:not(.inv-sum-head):not(.inv-sum-foot) { font-size: 14px; }
  .l2-grid.inv-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 4px; }
}

.eqcell {
  width: 62px; height: 62px; position: relative; cursor: pointer;
  background: #171a22; border: 2px solid #3a4152; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.eqcell .cell-icon { width: 52px; height: 52px; font-size: 28px; }
.cell-icon, .it-icon { display: flex; align-items: center; justify-content: center; }
.cell-icon img, .it-icon img { width: 100%; height: 100%; object-fit: contain; }
.eqcell .cell-ghost { font-size: 12px; color: #4d5461; }
.eqcell .cell-label {
  position: absolute; bottom: -13px; left: 0; right: 0; text-align: center;
  font-size: 9px; color: #7d8494; pointer-events: none;
}
.eqcell.locked { opacity: .4; cursor: default; }
.eqcell.sel, .bagcell.sel { outline: 2px solid #f0d060; outline-offset: 1px; }
.l2-baghead {
  display: flex; justify-content: space-between; align-items: center;
  margin: 12px 2px 6px; font-size: 14px; color: #d9dce6;
}
.l2-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.bagcell {
  aspect-ratio: 1; position: relative;
  background: #14171f; border: 2px solid #262b36; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.bagcell.filled { background: #1a1e29; cursor: pointer; }
.bagcell.filled:active { transform: scale(.94); }
.bagcell .cell-icon { width: 78%; height: 78%; font-size: 26px; }
.bagcell .cell-grade {
  position: absolute; top: 2px; right: 4px; font-size: 10px; font-weight: 800;
  text-shadow: 0 1px 2px #000;
}
.l2-info {
  display: flex; align-items: center; gap: 10px; min-height: 58px;
  margin-top: 9px; padding: 8px 12px;
  background: #1a1d26; border: 1px solid #2c3038; border-radius: 10px;
}

.it-icon { width: 44px; height: 44px; flex: 0 0 44px; font-size: 24px; }
.it-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.it-info b { font-size: 13px; }
.it-info i { font-style: normal; font-size: 11px; color: #8f95a3; }
.it-actions { display: flex; gap: 6px; }
.mini-btn {
  padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: #2a2e3a; border: 1px solid #3a4152; color: #dfe3ec;
}
.mini-btn.eq { background: #2e4d5d; border-color: #4a7f8f; }
.mini-btn.sell { background: #453722; border-color: #6f5a35; }

/* персонаж (11.11) */
.ch-hero { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, #232838, #171a22);
  border: 1px solid #343a48; border-radius: 14px; padding: 10px 14px; }
.ch-por { width: 84px; height: 104px; flex: none; border-radius: 12px; background: radial-gradient(circle at 50% 70%, #3a4260, #151821);
  border: 2px solid #d4af37; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; }
.ch-por img { width: 80px; height: 100px; object-fit: contain; image-rendering: auto; }
.ch-who { flex: 1; min-width: 0; }
.ch-lvl { font-size: 15px; color: #c9ced8; } .ch-lvl b { font-size: 24px; color: #ffe79a; }
.bar.ch-xp { height: 14px; margin: 4px 0 8px; } .bar.ch-xp span { font-size: 10px; }
.ch-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ch-tags span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; background: #12141b; border: 1px solid #2c3140;
  border-radius: 9px; padding: 3px 8px; }
.ch-tags img { width: 20px; height: 20px; object-fit: contain; }
.ch-sec { font-weight: 800; color: #f0d060; font-size: 15px; margin: 14px 0 7px; }
.ch-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ch-stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; background: #171a22;
  border: 1px solid #2c3038; border-radius: 12px; padding: 8px 4px; }
.ch-stat img { width: 44px; height: 44px; object-fit: contain; }
.ch-stat b { display: block; font-size: 22px; color: #fff; line-height: 1.1; }
.ch-stat span { display: block; font-size: 13px; font-weight: 700; color: #e3e7f0; }
.ch-stat i { display: block; font-style: normal; font-size: 11px; color: #8f97a8; }
.ch-pars { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.ch-par { display: flex; justify-content: space-between; align-items: center; gap: 6px; background: #171a22;
  border: 1px solid #2c3038; border-radius: 9px; padding: 6px 10px; font-size: 14px; }
.ch-par i { display: block; font-style: normal; font-size: 11px; color: #8f97a8; }
.ch-par b { color: #ffe79a; white-space: nowrap; }
.ch-foot { margin-top: 12px; font-size: 13px; color: #9aa3b2; text-align: center; }
@media (max-width: 700px) {
  .ch-stats { grid-template-columns: repeat(3, 1fr); }
  .ch-pars { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .ch-pars { grid-template-columns: 1fr; }
  .ch-por { width: 70px; height: 88px; } .ch-por img { width: 66px; height: 84px; }
}

/* смерть */
.death-box { text-align: center; padding: 8px 6px 4px; }

.death-title { font-size: 21px; font-weight: 800; color: #e86a5a; margin: 8px 0 12px; }
.death-rows { width: 270px; margin: 0 auto 10px; }
.death-rows div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; border-bottom: 1px solid #23262f; }
.death-rows span { color: #9aa1b0; }
.big-btn {
  margin-top: 14px; padding: 13px 30px; font-size: 18px; font-weight: 800; border-radius: 13px;
  background: linear-gradient(160deg,#f0d060,#b08a20); border: 2px solid #ffe79a; color: #241c06;
}
.big-btn:active { transform: scale(.96); }

/* ---------- дебаг ---------- */
#debug-drawer {
  position: fixed; top: 62px; right: 8px; width: 280px; z-index: 30;
  max-height: calc(100vh - 90px); overflow: auto; pointer-events: auto;
  background: rgba(15,17,23,.97); border: 1px solid #3a4152; border-radius: 14px; padding: 12px;
}
.dbg-head { font-size: 15px; font-weight: 800; color: #f0d060; }
.dbg-note { font-size: 11px; color: #8a90a0; margin: 6px 0 10px; line-height: 1.4; }
.dbg-note code { background: #22252f; padding: 1px 4px; border-radius: 4px; font-size: 10px; }
.dbg-stat { margin: 9px 0; }
.dbg-label { font-size: 13px; font-weight: 600; }
.dbg-label i { font-style: normal; font-size: 10px; color: #7d8494; display: block; }
.dbg-controls { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.dbg-controls input[type=range] { flex: 1; accent-color: #f0d060; height: 26px; }
.dbg-controls input[type=number] {
  width: 56px; background: #1d2029; border: 1px solid #3a4152; color: #fff;
  border-radius: 7px; padding: 5px 6px; font-size: 14px;
}
.dbg-controls select {
  flex: 1; min-height: 40px; background: #1d2029; border: 1px solid #3a4152; color: #fff;
  border-radius: 7px; padding: 5px 6px; font-size: 14px;
}
.dbg-derived { font-size: 11px; color: #98a5bd; line-height: 1.55; margin: 10px 0; background: #171a22; border-radius: 8px; padding: 7px 9px; }
.dbg-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dbg-btns button {
  padding: 9px 4px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: #262a35; border: 1px solid #3a4152; color: #e2e6ef;
}
.dbg-btns button:active { transform: scale(.95); }
.dbg-btns .danger { background: #4d2323; border-color: #7a3a3a; }
.dbg-btns .on { background: #1f4a2a; border-color: #4f9a5a; color: #b8f0a0; }
#dbg-floor-n { flex: 1; }
#dbg-floor-go { padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 700; background: #3a2f10; border: 1px solid #d4af37; color: #ffe79a; }

/* ---------- лагерь: лавка, кузнец, портал, испытание; время; свиток возврата ---------- */
.info-chip.low { color: #ff8a6a; border-color: #7a3a3a; }
.return-btn { position: absolute; right: 10px; bottom: 150px; width: 52px; height: 52px; border-radius: 14px;
  background: rgba(20,40,60,.92); border: 1px solid #4a7aa0; color: #fff; font-size: 24px; pointer-events: auto; }
.return-btn i { position: absolute; right: 3px; bottom: 1px; font-style: normal; font-size: 11px; font-weight: 800; }
.time-over { position: fixed; inset: 0; z-index: 50; background: rgba(5,6,10,.88); display: flex;
  align-items: center; justify-content: center; pointer-events: auto; padding: 16px; }
.to-box { max-width: 360px; text-align: center; background: #151821; border: 1px solid #3a4152;
  border-radius: 14px; padding: 22px 18px; color: #e8e0c8; line-height: 1.45; }
.to-box b { font-size: 18px; } .to-big { font-size: 46px; margin-bottom: 6px; }
.cell-qty { position: absolute; right: 2px; bottom: 0; font-size: 10px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px #000; }
.cell-ench { position: absolute; left: 2px; top: 0; font-size: 10px; font-weight: 800; color: #ffd24a; text-shadow: 0 1px 2px #000; }
.l2-baghead b.full { color: #ff7a5a; }
.warn { color: #ff8a6a; } .ok { color: #86e06e; }
.shop-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.shop-silver { font-size: 15px; }
.seg { display: flex; gap: 4px; background: #11141b; border-radius: 10px; padding: 3px; }
.seg button { flex: 1; min-height: 38px; border: 0; border-radius: 8px; background: transparent; color: #aab3c5; font-weight: 700; font-size: 13px; }
.seg button.on { background: #2a3142; color: #ffe79a; }
.seg.small button { min-height: 40px; font-size: 12px; }
.grade-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 8px 0; }
.grade-row button { min-height: 40px; border-radius: 8px; border: 1px solid #343a48; background: #171a22;
  color: var(--gc); font-weight: 800; font-size: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.grade-row button i { font-style: normal; font-size: 9px; color: #737a88; font-weight: 600; }
.grade-row button.on { border-color: var(--gc); background: #222838; }
.shop-list, .smith-list { display: flex; flex-direction: column; gap: 6px; max-height: 48vh; overflow-y: auto; }
.shop-row { display: flex; align-items: center; gap: 8px; background: #171a22; border: 1px solid #2c3140; border-radius: 10px; padding: 6px 8px; }
.shop-row.sel { border-color: #f0d060; } .shop-row.poor .sr-buy span { color: #a05a4a; }
.sr-icon .cell-icon { font-size: 22px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; }
.sr-icon img { width: 30px; height: 30px; image-rendering: pixelated; }
.sr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sr-info b { font-size: 13px; } .sr-info i { font-style: normal; font-size: 11px; color: #8d96a8; }
.sr-buy { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; font-size: 12px; font-weight: 700; }
.sr-buy .mini-btn { min-height: 32px; }
.sell-all { width: 100%; margin: 4px 0 10px; }
.sell-all[disabled] { opacity: .45; }
.smith-intro { font-size: 12px; color: #aab3c5; line-height: 1.45; margin-bottom: 8px; }
.smith-box { margin-top: 10px; background: #171a22; border: 1px solid #3a4152; border-radius: 10px; padding: 10px; font-size: 13px; line-height: 1.5; }
.smith-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.smith-btns .mini-btn { min-height: 42px; flex: 1; }
.floor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.floor-btn { min-height: 54px; border-radius: 10px; border: 1px solid #3a5a78; background: #16222e; color: #dff2ff;
  font-weight: 800; font-size: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.floor-btn i { font-style: normal; font-size: 10px; color: #8fb4cc; font-weight: 600; }
.floor-btn.boss { border-color: #a0603a; background: #2a1c16; }
.trial-head { font-size: 11px; color: #8d96a8; margin-bottom: 8px; }
.trial-q { font-size: 16px; font-weight: 700; line-height: 1.4; margin-bottom: 12px; color: #f2ead2; }
.trial-opts { display: flex; flex-direction: column; gap: 8px; }
.trial-opt { min-height: 48px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid #3a4152;
  background: #1b1f29; color: #e8e0c8; font-size: 14px; }
.trial-opt:active { background: #2a3142; }
.chat-btn { position: absolute; right: 10px; bottom: 210px; width: 52px; height: 52px; border-radius: 14px;
  background: rgba(20,23,31,.92); border: 1px solid #3a4152; color: #fff; font-size: 22px; pointer-events: auto; }
.chat-btn i { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; border-radius: 10px;
  background: #e85555; font-style: normal; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.chat-btn b { position: absolute; left: 3px; bottom: 1px; font-size: 12px; color: #8fb4cc; }
.chat-head { font-size: 12px; color: #8d96a8; margin-bottom: 6px; }
.chat-list { height: 42vh; overflow-y: auto; background: #11141b; border-radius: 10px; padding: 8px; }
.chat-msg { font-size: 14px; line-height: 1.4; margin-bottom: 4px; color: #e2dac2; word-break: break-word; }
.chat-msg b { color: #9fdcff; }
.chat-form { display: flex; gap: 6px; margin-top: 8px; }
.chat-form input { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid #3a4152; background: #1b1f29;
  color: #fff; padding: 0 10px; font-size: 16px; }
.chat-form .mini-btn { min-width: 52px; min-height: 44px; font-size: 18px; }
.quest { background: #171a22; border: 1px solid #2c3140; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.quest.done { border-color: #86e06e; } .quest.claimed { opacity: .55; }
.q-name { font-weight: 700; font-size: 14px; color: #f2ead2; margin-bottom: 6px; }
.q-bar { position: relative; height: 16px; background: #101218; border-radius: 6px; overflow: hidden; }
.q-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(180deg,#e8c455,#a1831f); }
.q-bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.q-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: #aab3c5; }
.q-foot .mini-btn { min-height: 38px; }
.help-list p { margin: 0 0 10px; font-size: 14px; line-height: 1.45; color: #e2dac2; }
.help-list b { color: #ffe79a; }

/* ---------- крупнее текст в окнах (10.11: на телефоне мелко) ---------- */
#panel-root .panel { font-size: 15px; }
#panel-root .muted { font-size: 13px; }
#panel-root .mini-btn { font-size: 15px; padding: 9px 13px; }
#panel-root .seg button { font-size: 15px; }
#panel-root .seg.small button { font-size: 14px; }
#panel-root .grade-row button { font-size: 16px; }
#panel-root .grade-row button i { font-size: 11px; }
#panel-root .sr-info b { font-size: 15px; }
#panel-root .sr-info i { font-size: 13px; }
#panel-root .sr-buy { font-size: 14px; }
#panel-root .it-info b { font-size: 15px; }
#panel-root .it-info i { font-size: 13px; }
#panel-root .smith-intro { font-size: 14px; }
#panel-root .smith-box { font-size: 15px; }
#panel-root .trial-head { font-size: 13px; }
#panel-root .trial-q { font-size: 18px; }
#panel-root .trial-opt { font-size: 16px; }
#panel-root .q-name { font-size: 16px; }
#panel-root .q-foot { font-size: 14px; }
#panel-root .chat-msg { font-size: 15px; }
#panel-root .help-list p { font-size: 15px; }

#panel-root .l2-baghead { font-size: 15px; }

#panel-root .floor-btn { font-size: 19px; }
#panel-root .floor-btn i { font-size: 12px; }
#panel-root .death-rows div { font-size: 15px; }
.panel-head { font-size: 19px; }

/* ---------- сравнение с надетым ---------- */
.l2-info { flex-wrap: wrap; }
.cmp { flex-basis: 100%; margin-top: 6px; padding: 8px 10px; border-radius: 9px; background: #12141b; border: 1px solid #2c3140; }
.cmp-now { font-size: 14px; color: #aab3c5; }
.cmp-head { font-size: 16px; font-weight: 800; margin: 3px 0; }
.cmp-head.up { color: #7cf07a; } .cmp-head.down { color: #ff7a6a; } .cmp-head.eq { color: #c8cbd6; }
.cmp-rows { display: flex; flex-wrap: wrap; gap: 3px 14px; font-size: 14px; color: #c8cbd6; }
.cmp-rows b.up { color: #7cf07a; } .cmp-rows b.down { color: #ff7a6a; }
.cmp-badge { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 8px; font-size: 13px; font-weight: 800; width: max-content; }
.cmp-badge.up { background: #1d3a22; color: #8ff08a; }
.cmp-badge.down { background: #3a1d1d; color: #ff8a7a; }
.cmp-badge.eq { background: #262a35; color: #c8cbd6; }
.shop-row { flex-wrap: wrap; }
.shop-row.cmp-able { cursor: pointer; }
.shop-row.sel { border-color: #6a7a9a; background: #1c2130; }
.worn { display: flex; align-items: center; gap: 10px; margin: 8px 0; padding: 8px 10px; border-radius: 10px;
  background: linear-gradient(90deg, #1d2333, #151821); border: 1px solid #34405a; }
.worn .cell-icon { width: 38px; height: 38px; font-size: 24px; display: flex; align-items: center; justify-content: center; }
.worn .cell-icon img { max-width: 100%; max-height: 100%; }
.worn > div { display: flex; flex-direction: column; min-width: 0; }
.worn b { font-size: 15px; } .worn i { font-style: normal; font-size: 13px; color: #8d96a8; }
.worn-label { font-size: 12px; font-weight: 800; color: #8fb4cc; text-transform: uppercase; writing-mode: vertical-rl; transform: rotate(180deg); }
.worn > .worn-row { display: flex; flex-direction: row; flex-wrap: wrap; gap: 5px; }
.shop-top .seg { flex: 1; }
.worn-cell { position: relative; width: 44px; height: 44px; border-radius: 8px; border: 2px solid #2c3140; background: #12141b;
  display: flex; align-items: center; justify-content: center; }
.worn-cell em { font-style: normal; font-size: 9px; color: #5d6577; text-align: center; }
.worn-cell b { position: absolute; left: 2px; top: 0; font-size: 11px; color: #ffd24a; }

/* ---------- бесплатный сундук ---------- */
.gift-btn { position: absolute; right: 10px; bottom: 270px; width: 52px; height: 52px; border-radius: 14px;
  background: rgba(40,28,10,.92); border: 1px solid #a0782a; color: #fff; font-size: 26px; pointer-events: auto; }
.gift-btn.ready { animation: giftpulse 1s infinite alternate; border-color: #ffd24a; }
.gift-btn.done { opacity: .55; }
@keyframes giftpulse { from { box-shadow: 0 0 2px #ffd24a; transform: scale(1); } to { box-shadow: 0 0 18px #ffd24a; transform: scale(1.07); } }
.gift-btn i { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 11px;
  background: #2a8a3a; font-style: normal; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.gift-btn:not(.ready) i { background: #3a4152; }
.wheel-box { position: relative; width: 270px; height: 270px; margin: 4px auto 10px; }
.wheel-ptr { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); z-index: 3; font-size: 28px; color: #ffd24a;
  text-shadow: 0 2px 4px #000; }
.wheel { position: absolute; inset: 0; border-radius: 50%; border: 6px solid #d4af37;
  box-shadow: 0 0 0 3px #3a2a0a, 0 0 24px rgba(240,200,80,.45), inset 0 0 30px rgba(0,0,0,.45);
  transition: transform 4.2s cubic-bezier(.15,.75,.12,1); }
.wl { position: absolute; inset: 0; pointer-events: none; }
.wl span { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center;
  font-size: 26px; line-height: 1; text-shadow: 0 1px 3px #000; }
.wl span img { width: 30px; height: 30px; object-fit: contain; }
.wl b { font-size: 12px; font-weight: 800; color: #fff; margin-top: 3px; white-space: nowrap; }
.wheel-hub { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe79a, #b08a20); border: 3px solid #3a2a0a; display: flex; align-items: center;
  justify-content: center; font-size: 28px; }
.lt-title { font-size: 16px; font-weight: 800; color: #f0d060; margin: 6px 0; }
.lp-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.lp-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 9px; background: #171a22; font-size: 15px; }
.lp-row b { flex: 1; font-weight: 600; }
.lp-row i { font-style: normal; font-size: 13px; color: #8d96a8; }
.lp-row.jack { background: linear-gradient(90deg, #3a2a0a, #171a22); border: 1px solid #d4af37; }
.lp-row.jack b { color: #ffd24a; font-weight: 800; }
.lp-icon { width: 30px; text-align: center; font-size: 22px; }
.lp-icon img { width: 28px; height: 28px; object-fit: contain; }
.lt-wait { margin-top: 12px; text-align: center; font-size: 16px; color: #c8cbd6; }
.center { text-align: center; }
#panel-root .big-btn { display: block; margin-left: auto; margin-right: auto; }
.ad-box { text-align: center; }
.ad-tag { font-size: 14px; font-weight: 800; color: #8fd0ff; margin-bottom: 8px; }
.ad-card { background: radial-gradient(ellipse at 50% 0%, #22324a, #12141b 70%); border: 1px solid #34506a; border-radius: 14px; padding: 12px; }
.ad-video { width: 100%; max-height: 42vh; border-radius: 10px; background: #000; }
.ad-art { font-size: 72px; margin: 6px 0; }
.ad-name { font-size: 24px; font-weight: 800; color: #ffe79a; margin-top: 8px; line-height: 1.2; }
.ad-jp { font-size: 16px; color: #aab3c5; margin-top: 2px; }
.ad-rows { font-size: 15px; color: #c8cbd6; margin-top: 8px; line-height: 1.6; }
.ad-rows b { color: #fff; }
.ad-num { font-size: 12px; color: #6d7484; margin-top: 6px; }
.ad-bar { height: 10px; border-radius: 5px; background: #23262f; margin: 12px 0 8px; overflow: hidden; }
.ad-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4a9fd8, #ffd24a); transition: width .25s linear; }
.ad-left { font-size: 16px; color: #c8cbd6; min-height: 30px; }
.lt-result { text-align: center; font-size: 17px; margin-top: 6px; }
.lt-result b { color: #ffe79a; }
.lt-result.jack { color: #ffd24a; font-size: 20px; font-weight: 800; }
.lt-win-icon { font-size: 54px; line-height: 1.1; }
.lt-win-icon img { width: 60px; height: 60px; object-fit: contain; }
.buff-chip .sk-img { width: 18px; height: 18px; }
.sk-hint { text-align: center; margin-top: 6px; }
.sk-card { width: min(460px, 100%); font-size: 15px; line-height: 1.4; }
.sk-card .ni-head { padding-right: 40px; }
.sk-card .ni-icon, .sk-card .ni-icon .sk-img { width: 56px; height: 56px; }
.sk-card .learn-btn { width: 100%; margin-top: 4px; }
.br-img { width: 30px; height: 30px; object-fit: contain; vertical-align: middle; }
.sk-bhead .br-img { width: 34px; height: 34px; margin-right: 2px; }
.wp-img { width: 18px; height: 18px; object-fit: contain; vertical-align: middle; }
.sk-weapon .wp-img { width: 22px; height: 22px; }
/* участок и дом */
.plot-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.plot-head img { width: 110px; height: 110px; object-fit: contain; }
.plot-head > div { display: flex; flex-direction: column; gap: 3px; }
.plot-head b { font-size: 18px; color: #ffe79a; } .plot-head span { font-size: 16px; }
.next-house { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.next-house img { width: 72px; height: 72px; object-fit: contain; }
.next-house > div { display: flex; flex-direction: column; } .next-house i { font-style: normal; color: #aab3c5; font-size: 14px; }
.need { display: flex; justify-content: space-between; align-items: center; padding: 4px 2px; border-bottom: 1px solid #262a35; color: #ffb0a0; }
.need.ok { color: #9fe08a; }
.need b em { font-style: normal; color: #9fe08a; } .ok { color: #86e06e; }
.need span { display: flex; align-items: center; gap: 6px; color: #e2dac2; }
.need-ic { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; }
.need-ic img { width: 26px; height: 26px; object-fit: contain; }
.big-btn:disabled { filter: grayscale(.8); opacity: .6; }
.future { display: flex; flex-direction: column; gap: 4px; }
.fh { padding: 6px 10px; border-radius: 8px; background: #171a22; display: flex; flex-direction: column; }
.fh.soon { opacity: .6; } .fh i { font-style: normal; font-size: 13px; color: #8d96a8; }
/* значки интерфейса (assets/icons/ui_*) */
.ui-ico { width: 30px; height: 30px; object-fit: contain; pointer-events: none; vertical-align: middle; }
.info-chip .ui-ico { width: 20px; height: 20px; }
.chat-btn .ui-ico, .gift-btn .ui-ico, .return-btn .ui-ico { width: 36px; height: 36px; }
.slot .s-icon .ui-ico { width: 34px; height: 34px; }
@media (max-width: 480px) { .top-right .icon-btn .ui-ico { width: 26px; height: 26px; } }
/* дерево: оружие, «не работает», замены */
.sk-img { width: 82%; height: 82%; object-fit: contain; }
.sk-gem > span { font-size: 29px; }
.sk-wb { position: absolute; top: -6px; left: -6px; width: 24px; height: 24px; border-radius: 50%; background: #1b1f29;
  border: 1px solid #4a5468; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.sk-wb.bad { border-color: #ff6a5a; background: #3a1d1d; }
.sk-flag { position: absolute; top: -6px; right: -6px; text-decoration: none; font-size: 18px; filter: drop-shadow(0 1px 2px #000); }
.sk-node.off .sk-gem { border-color: #ff5a4a !important; box-shadow: 0 0 12px rgba(255,80,60,.55) !important; }
.sk-node.off .sk-gem .sk-img { filter: grayscale(.7) brightness(.7); }
.sk-node.gone .sk-gem { opacity: .5; border-style: dashed; }
.sk-lvtxt { margin-top: 4px; font-size: 13px; font-weight: 800; color: var(--bc); }
.sk-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: #9aa1b0; margin-bottom: 6px; }
.sk-weapon { font-size: 14px; margin-top: 4px; padding: 6px 8px; border-radius: 8px; line-height: 1.35; }
.sk-weapon.ok { background: rgba(60,120,70,.18); color: #bfe8c0; }
.sk-weapon.bad { background: rgba(160,50,40,.25); color: #ffc0b0; border: 1px solid #a04a3a; }
.sk-evo { text-align: center; font-size: 13px; color: #ffd27a; margin: 0 0 6px; }
.sk-tabs button.bad::after { content: '⛔'; position: absolute; top: -6px; left: -4px; font-size: 13px; }
.ni-head { align-items: center; }
.ni-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; }
.ni-icon .sk-img { width: 34px; height: 34px; }
.ni-state { margin: 4px 0; font-size: 14px; padding: 4px 8px; border-radius: 7px; }
.ni-state.ok { color: #9fe08a; } .ni-state.bad { color: #ffb0a0; background: rgba(160,50,40,.25); }
.ni-state.gone { color: #c8cbd6; background: #262a35; }
.ni-when { font-size: 14px; color: #d8dce8; margin: 2px 0; }
.style-tag { display: inline-block; width: max-content; margin: 2px 0; padding: 0 7px; border-radius: 7px; font-size: 12px; font-weight: 700; }
.style-tag.st-mage { background: #2e2350; color: #c9b0ff; }
.style-tag.st-warrior { background: #3e2222; color: #ffb7a8; }
.style-tag.st-archer { background: #1f3a26; color: #a8f0b0; }
.slot .s-icon .sk-img { width: 34px; height: 34px; }
.slot.noweap::after { content: '⛔'; position: absolute; top: -4px; left: -4px; font-size: 14px; }
/* дорога в деревню */
.home-opts { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 10px; }
.home-opt { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; align-items: center; text-align: left;
  padding: 10px 12px; border-radius: 12px; border: 1px solid #3a4152; background: #1b1f29; color: #e8e0c8; }
.home-opt span { grid-row: 1 / 3; font-size: 28px; }
.home-opt b { font-size: 16px; }
.home-opt i { font-style: normal; font-size: 13px; color: #8d96a8; }
.home-opt.free { border-color: #3c6a4a; background: linear-gradient(90deg, #1d3324, #1b1f29); }
.home-opt.free i { color: #8fe08a; }
.home-opt.poor { opacity: .55; }
.home-opt:active { transform: scale(.98); }

/* ---------- мобильная адаптация ---------- */

/* джойстик (телефон): слева внизу, навыки и зелья — справа от него, ряды растут вверх */
#joy {
  position: absolute; left: calc(12px + env(safe-area-inset-left)); bottom: calc(12px + env(safe-area-inset-bottom));
  width: 128px; height: 128px; border-radius: 50%; pointer-events: auto; touch-action: none; z-index: 6;
  background: radial-gradient(circle, rgba(32,36,48,.5) 0 52%, rgba(14,16,22,.72) 53%);
  border: 2px solid rgba(240,208,96,.5); box-shadow: 0 2px 10px rgba(0,0,0,.5);
}
#joy.on { border-color: #f0d060; }
.joy-arrows {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 13px; line-height: 2.6; color: rgba(240,208,96,.55); pointer-events: none;
}
.joy-knob {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1b8, #d4af37 58%, #7d5d14); box-shadow: 0 3px 10px rgba(0,0,0,.6);
  transition: transform .12s ease-out; pointer-events: none;
}
#joy.on .joy-knob { transition: none; }
body.has-joy #skillbar {
  left: calc(152px + env(safe-area-inset-left)); right: calc(8px + env(safe-area-inset-right)); transform: none;
  max-width: none; padding: 0; justify-content: flex-end; flex-wrap: wrap-reverse; align-content: flex-start;
}
body.has-joy .sb-hint { order: 99; flex: 1 1 100%; padding: 6px 10px; font-size: 12px; justify-content: center; min-height: 34px; }
/* ---------- бестиарий ---------- */
.best-btn { position: absolute; right: 10px; bottom: 330px; width: 52px; height: 52px; border-radius: 14px; pointer-events: auto;
  background: rgba(14,16,22,.85); border: 1px solid #4a3a5a; display: flex; align-items: center; justify-content: center; padding: 0; }
.best-btn img { width: 42px; height: 42px; object-fit: contain; }
.bs-intro { font-size: 13px; color: #c9ced8; margin-bottom: 10px; line-height: 1.4; }
.bs-zone { border: 1px solid #343a48; border-radius: 12px; padding: 10px; margin-bottom: 12px; background: rgba(255,255,255,.02); }
.bs-zone.here { border-color: #d4af37; box-shadow: 0 0 0 1px rgba(212,175,55,.35) inset; }
.bs-zone.soon { opacity: .6; }
.bs-zhead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 17px; }
.bs-zhead span { font-size: 12px; color: #9aa3b2; }
.bs-you { font-style: normal; font-size: 11px; background: #d4af37; color: #241c06; border-radius: 8px; padding: 1px 7px; }
.bs-soon { font-style: normal; font-size: 11px; background: #3a4152; color: #c9ced8; border-radius: 8px; padding: 1px 7px; }
.bs-zdesc { font-size: 12px; color: #9aa3b2; margin: 4px 0 8px; }
.bs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.bs-mob { display: flex; gap: 10px; align-items: flex-start; background: rgba(0,0,0,.25); border-radius: 10px; padding: 8px; }
.bs-boss { margin-top: 8px; border: 1px solid #8a3a3a; background: rgba(90,20,20,.25); }
.bs-pic { flex: none; display: flex; align-items: flex-end; justify-content: center; }
.bs-pic > div { background-repeat: no-repeat; background-position: 0 0; }
.bs-nopic { align-items: center; font-size: 28px; }
.bs-info { min-width: 0; flex: 1; }
.bs-name { font-weight: 700; font-size: 15px; color: #ffe79a; }
.bs-raid { font-size: 11px; background: #a12727; color: #fff; border-radius: 8px; padding: 1px 6px; vertical-align: middle; }
.bs-meta { font-size: 11px; color: #9aa3b2; margin: 1px 0 4px; }
.bs-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.bs-tag { font-size: 11px; background: #232836; border: 1px solid #343a48; border-radius: 7px; padding: 1px 6px; }
.bs-about { font-size: 12px; color: #d8dce4; margin-top: 5px; line-height: 1.35; }
.bs-loot, .bs-drop { font-size: 11px; color: #c9b27a; margin-top: 6px; }

/* ---------- группа (party) ---------- */
.party-frame { position: absolute; left: 8px; top: 96px; width: 170px; pointer-events: auto;
  background: rgba(14,16,22,.82); border: 1px solid #2f5a3a; border-radius: 10px; padding: 5px 6px; }
.pt-head { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: #8dff9a; margin-bottom: 3px; }
.pt-leave { margin-left: auto; font-size: 11px; padding: 2px 7px; border-radius: 6px;
  background: #2a2e3a; border: 1px solid #3a4152; color: #c9ced8; }
.pt-row { padding: 3px 0; border-top: 1px solid #22303a; cursor: pointer; }
.pt-row.away { opacity: .55; }
.pt-name { font-size: 13px; font-weight: 700; color: #e8f6ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-name i { font-style: normal; color: #ffe79a; font-size: 11px; }
.bar.pt-bar { height: 6px; border-radius: 3px; margin-top: 2px; }
.bar.mp.pt-bar { height: 4px; }
.pt-where { font-size: 10px; color: #9aa3b2; margin-top: 1px; }
.pt-pop { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); z-index: 30; pointer-events: auto;
  background: rgba(14,16,22,.96); border: 1px solid #5fbf7a; border-radius: 14px; padding: 14px 16px;
  text-align: center; min-width: 240px; max-width: calc(100vw - 32px); box-shadow: 0 8px 30px rgba(0,0,0,.6); }
.pt-pop-text { font-size: 15px; margin-bottom: 10px; line-height: 1.35; }
.pt-pop-text .muted { font-size: 12px; margin-top: 4px; }
.pt-pop-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.pt-pop-sec { font-size: 11px; color: #8a92a2; margin-top: 8px; }
@media (max-width: 700px) {
  .player-frame { min-width: 180px; padding: 6px; }
  .pf-level { width: 32px; height: 32px; font-size: 14px; }
  .info-chip { padding: 6px 8px; font-size: 12px; }
  .icon-btn { width: 42px; height: 42px; font-size: 19px; }

  .l2-grid { grid-template-columns: repeat(6, 1fr); }
  .l2-doll { grid-template-columns: repeat(3, 54px); }
  .eqcell { width: 54px; height: 54px; }
  .slot { width: 50px; height: 50px; }
  .target-frame { min-width: 180px; top: 60px; }
  .train { top: 112px; }
}
/* телефон: кнопки в ряд, этаж и адена — строкой ниже, чтобы не наезжали на полоски HP */
@media (max-width: 480px) {
  .player-frame { min-width: 0; width: calc(100vw - 238px); max-width: 190px; }
  .top-right { flex-wrap: wrap; justify-content: flex-end; max-width: 214px; gap: 5px; }
  .top-right .icon-btn { width: 38px; height: 38px; font-size: 17px; order: 1; }
  .top-right .info-chip { order: 2; padding: 4px 8px; }
  /* рамка цели — справа, рядом со списком группы (слева 8..178), а не поверх него (рецензия 12.11) */
  .target-frame { top: 104px; left: auto; right: 8px; transform: none; min-width: 0; width: calc(100vw - 194px); padding: 6px 8px; }
  .tf-name { font-size: 13px; flex-wrap: wrap; gap: 2px 6px; }
  .train { top: 168px; }
}
@media (max-width: 430px) {

  .slot { width: 46px; height: 46px; border-radius: 10px; }
  .slot .s-icon { font-size: 22px; }
}
/* ---------- доска лидеров (рекорд глубины) ---------- */
.lead-btn { position: absolute; right: 10px; bottom: 390px; width: 52px; height: 52px; border-radius: 14px; pointer-events: auto;
  background: rgba(14,16,22,.85); border: 1px solid #6a5a2a; font-size: 30px; line-height: 1; padding: 0;
  display: flex; align-items: center; justify-content: center; }
.lb-intro { font-size: 13px; color: #c9ced8; margin-bottom: 10px; line-height: 1.4; }
.lb-empty { font-size: 14px; color: #c9ced8; text-align: center; padding: 14px 6px; }
.lb-list { display: flex; flex-direction: column; gap: 6px; }
.lb-gap { text-align: center; color: #6a7282; margin: 4px 0; }
.lb-row { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,.25); border: 1px solid #2c3240;
  border-radius: 10px; padding: 8px 10px; }
.lb-row.top { background: rgba(212,175,55,.08); border-color: #5a4a20; }
.lb-row.me { border-color: #d4af37; box-shadow: 0 0 0 1px rgba(212,175,55,.4) inset; }
.lb-row.lord { background: linear-gradient(90deg, rgba(150,90,220,.18), rgba(212,175,55,.10)); border-color: #8a60c0; }
/* концовка: Владыка повержен (leaders.js showEnding) */
#ending { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(60,30,90,.85), rgba(0,0,0,.92)); padding: 16px; animation: endIn .8s ease-out; }
@keyframes endIn { from { opacity: 0; } to { opacity: 1; } }
.end-box { max-width: 420px; text-align: center; color: #e8e2f2; background: rgba(20,14,30,.9); border: 2px solid #d4af37;
  border-radius: 16px; padding: 20px 18px; box-shadow: 0 0 40px rgba(212,175,55,.35); }
.end-crown { font-size: 64px; line-height: 1; animation: endCrown 2s ease-in-out infinite; }
@keyframes endCrown { 50% { transform: translateY(-6px) scale(1.06); } }
.end-box h2 { color: #ffe79a; margin: 8px 0 12px; font-size: 24px; }
.end-box p { font-size: 15px; line-height: 1.45; margin: 0 0 10px; }
.end-place b { color: #ffe79a; }
.end-small { font-size: 12px !important; color: #a99cbc; }
.end-ok { margin-top: 6px; font-size: 17px; font-weight: 800; padding: 10px 28px; border-radius: 12px; border: 0;
  background: #d4af37; color: #241c06; cursor: pointer; }
.lb-place { flex: none; width: 36px; text-align: center; }
.lb-medal { font-size: 26px; }
.lb-num { font-size: 17px; font-weight: 800; color: #9aa3b2; }
.lb-who { flex: 1; min-width: 0; }
.lb-who b { font-size: 15px; color: #ffe79a; }
.lb-who span { display: block; font-size: 11px; color: #9aa3b2; margin-top: 2px; }
.lb-you { font-style: normal; font-size: 11px; background: #d4af37; color: #241c06; border-radius: 8px; padding: 1px 7px; }
.lb-floor { flex: none; text-align: center; min-width: 52px; }
.lb-floor b { display: block; font-size: 22px; color: #fff; line-height: 1; }
.lb-floor span { display: block; font-size: 10px; color: #9aa3b2; }
.lb-floor em { display: block; font-style: normal; font-size: 10px; color: #6a7282; margin-top: 2px; }
/* бестиарий: сводка, жители «чужих» ярусов, запас (DEV) */
.bs-sum { border: 1px solid #343a48; border-radius: 12px; padding: 10px; margin-bottom: 12px; background: rgba(212,175,55,.05); }
.bs-sum-h { font-size: 15px; margin-bottom: 8px; }
.bs-sum-miss, .bs-miss { font-size: 13px; color: #ffb27a; margin: 8px 0 6px; }
.bs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.bs-chip { display: flex; align-items: center; gap: 6px; background: rgba(0,0,0,.3); border: 1px solid #2c3240; border-radius: 9px;
  padding: 3px 9px 3px 4px; }
.bs-chip b { display: block; font-size: 13px; color: #ffe79a; }
.bs-chip span { display: block; font-size: 11px; color: #9aa3b2; }
.bs-stock { border-style: dashed; border-color: #5a6070; }
.bs-sgroup { font-size: 15px; font-weight: 700; margin: 10px 0 6px; }
.bs-sgroup span { font-size: 12px; color: #9aa3b2; font-weight: 400; }
.bs-slist { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 6px; }
.bs-scard { display: flex; flex-direction: column; align-items: center; text-align: center; background: rgba(0,0,0,.25);
  border-radius: 10px; padding: 6px 4px; }
.bs-scard img { max-width: 100%; object-fit: contain; margin-bottom: 4px; }
.bs-scard b { font-size: 12px; color: #e8ecf3; line-height: 1.2; }
.bs-scard span { font-size: 10px; color: #8fd18f; margin-top: 2px; }
.bs-scard i { font-style: normal; font-size: 10px; color: #6a7282; margin-top: 2px; }

/* бестиарий: вкладки, режим админа, свернутые ярусы, неизвестные монстры (12.11 вечер) */
.bs-mode { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; color: #9aa3b2; }
.bs-mbtn, .bs-tab { border: 1px solid #343a48; background: rgba(0,0,0,.3); color: #c9ced8; border-radius: 10px; padding: 6px 12px;
  font-size: 14px; cursor: pointer; min-height: 40px; }
.bs-mbtn.on { background: #3a2f10; border-color: #d4af37; color: #ffe79a; }
.bs-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; position: sticky; top: -2px; z-index: 2;
  background: #12141b; padding: 4px 0 6px; }
.bs-tab.on { background: #d4af37; border-color: #d4af37; color: #241c06; font-weight: 700; }
details.bs-zone > summary { cursor: pointer; list-style: none; padding: 2px 0; }
details.bs-zone > summary::-webkit-details-marker { display: none; }
details.bs-zone > summary::before { content: '▸'; color: #d4af37; margin-right: 2px; transition: transform .15s; display: inline-block; }
details.bs-zone[open] > summary::before { transform: rotate(90deg); }
details.bs-zone[open] > summary { margin-bottom: 4px; }
details.bs-zone { padding: 8px 10px; margin-bottom: 8px; }
.bs-zone.locked { opacity: .55; }
.bs-cnt { margin-left: auto; font-size: 12px !important; font-style: normal; background: #232836; border: 1px solid #343a48;
  border-radius: 8px; padding: 1px 8px; color: #c9ced8 !important; }
.bs-cnt.all { background: #24401c; border-color: #4f8a2c; color: #b8f0a0 !important; }
.bs-unknown .bs-name { color: #6a7282; }
.bs-unknown .bs-about { color: #7a8292; font-style: italic; }
.bs-bossrow { margin-top: 8px; }
.bs-bossrow .bs-boss { margin-top: 0; }

/* телефон в альбомной ориентации (высота ~390): столбик справа (150…442 снизу) уходил под верхний ряд —
   «Бестиарий» и 🏆 налезали на кнопку звука (рецензия 12.11). Ставим их вторым столбиком левее. */
@media (max-height: 500px) {
  .best-btn { right: 70px; bottom: 150px; }
  .lead-btn { right: 70px; bottom: 210px; }
}

/* «Как стать сильнее» (src/ui/upgrade.js): 4 ступени оружия картинками */
.up-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.up-tabs button { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 4px 10px; border-radius: 10px;
  border: 1px solid #3a4152; background: #171a22; color: #dfe6f2; font-size: 13px; }
.up-tabs button.on { border-color: #ffd24a; background: #2a2618; }
.up-tabs.grades button { min-width: 44px; justify-content: center; font-weight: bold; }
.up-tab-ic { width: 30px; height: 30px; display: inline-flex; } .up-tab-ic img { width: 100%; height: 100%; object-fit: contain; }
.up-step { display: flex; gap: 10px; align-items: center; background: #171a22; border: 1px solid #2c3140; border-radius: 10px;
  padding: 8px; margin-top: 6px; }
.up-step.have { border-color: #86e06e; }
.up-step .up-ic .cell-icon { width: 52px; height: 52px; flex: 0 0 52px; background: #2b2533; border-radius: 8px; }
.up-txt { font-size: 13px; line-height: 1.4; } .up-txt i { display: block; font-style: normal; color: #aab3c5; font-size: 12px; margin-top: 2px; }
#panel-root .up-txt { font-size: 14px; } #panel-root .up-txt i { font-size: 13px; }
.up-link { margin-top: 6px; min-height: 40px; width: 100%; }

/* награда задания вещью (camp.js renderQuests) и подтверждение «Выбросить» (panels.js) — 14.11 */
.q-item { display: inline-flex; align-items: center; gap: 4px; }
.q-item.weapon { color: #ffd24a; font-weight: bold; }
.q-item-ic { width: 32px; height: 32px; display: inline-flex; } .q-item-ic img { width: 100%; height: 100%; object-fit: contain; }
.pop-confirm { background: #2a1a1a; border: 1px solid #a04a3a; border-radius: 10px; padding: 10px; font-size: 14px; line-height: 1.45; }
.pop-confirm .pop-acts { margin-top: 10px; }
.big-btn.sell { background: #8a3a2e; }

/* ступень оружия в углу значка (panels.js itemIconHTML): М — мастера, Г — героя, ★ — именное */
.has-var { position: relative; }
.var-badge { position: absolute; right: -2px; bottom: -2px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px;
  font: bold 11px/16px Arial, sans-serif; font-style: normal; text-align: center; color: #10131a; pointer-events: none;
  box-shadow: 0 0 0 1.5px #10131a; }
.var-badge.v-m { background: #c9d3e0; } .var-badge.v-h { background: #6ec8ff; } .var-badge.v-l { background: #ffd24a; }
