/* Пиксельная графика и тема «Дикий Запад» раздела дуэлей (поверх style.css) */
.arena.px { height: auto; aspect-ratio: 4 / 3; padding: 0; background: #120a1c; border-radius: 12px; overflow: hidden; position: relative; }
.arena.px canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.arena.px .pop { top: 12%; font-family: ui-monospace, Consolas, monospace; text-shadow: 2px 0 #000, -2px 0 #000, 0 2px #000, 0 -2px #000; }
.arena.px .pop.dmg { color: #ff5a46; } .arena.px .pop.crit { color: #ffcf6a; } .arena.px .pop.blk { color: #e3d3b8; } .arena.px .pop.heal { color: #9be07f; }
.arena.px.shake { animation: pxshake .35s steps(5); }
@keyframes pxshake { 20% { transform: translate(-4px, 2px); } 40% { transform: translate(4px, -2px); } 60% { transform: translate(-2px, 2px); } 80% { transform: translate(2px, 0); } }
.arena.px .redfx { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(transparent 35%, rgba(170, 10, 5, .6)); }
.arena.px.shake .redfx { animation: pxred .5s steps(4); }
@keyframes pxred { from { opacity: 1; } to { opacity: 0; } }
.arena.px .scene-tag { position: absolute; left: 8px; top: 7px; font-size: 11px; color: #f2e6d4; background: rgba(10, 6, 12, .45); padding: 2px 7px; border-radius: 8px; pointer-events: none; }
.arena.px .scene-tag:empty { display: none; }
.wxline { font-size: 12px; line-height: 1.45; margin: 6px 2px 0; opacity: .85; }
.wxline:empty { display: none; }
.wxline .guard { color: #2ea043; font-weight: 600; }
/* ================== Тема «Дикий Запад» — только в разделе дуэлей ==================
   Своя палитра поверх цветов Telegram: тёмная кожа/дерево, пергаментный текст, ржавая медь.
   Фон: закатное свечение сверху, мелкая пиксельная фактура, внизу силуэт столовых гор и кактусов. */
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) {
  --bg: #1d130f; --bg2: #2e1f17; --text: #f1e3c8; --hint: #ab9374; --accent: #c4622d; --accent-text: #fff4e2;
  --line: rgba(232, 196, 146, .16); --step-empty: rgba(232, 196, 146, .14); --p1: #d98a3a; --p2: #b8382a;
  --brass: #e2ac62; --wood: rgba(255, 222, 170, .045);
  background: #1d130f; color-scheme: dark;
}
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) body {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 70' shape-rendering='crispEdges'%3E%3Cpath fill='%23140c09' d='M0 70V52h18v-4h10v-6h40v6h8v4h30v-8h6v-14h52v14h6v8h44v-4h10v-10h36v10h8v4h34v-6h10v-4h28v4h6v6h54v18z'/%3E%3Cpath fill='%23140c09' d='M300 52v-20h4v-6h4v26h4v-12h4v-4h2v16h-6v6h-8v-6h-2v-12h-4v14zM60 52v-14h3v-5h3v19h3v-8h3v-3h2v11h-5v4h-6v-4h-1v-8h-2v8z'/%3E%3C/svg%3E") bottom center / 100% auto no-repeat fixed,
    radial-gradient(130% 50% at 50% -8%, rgba(226, 112, 52, .30), rgba(150, 60, 40, .10) 45%, transparent 70%) fixed,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6' shape-rendering='crispEdges'%3E%3Crect width='1' height='1' fill='%23ffdcaa' fill-opacity='.05'/%3E%3Crect x='3' y='3' width='1' height='1' fill='%23000' fill-opacity='.12'/%3E%3C/svg%3E"),
    #1d130f;
  min-height: 100vh;
}
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .head:not(.part) { background: rgba(26, 17, 13, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(196, 98, 45, .45); box-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) #section-title { font-family: Georgia, "Times New Roman", serif; letter-spacing: .06em; text-transform: uppercase; font-size: 15px; color: var(--brass); }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .tab[aria-selected="true"] { background: linear-gradient(#3a271c, #2a1b14); color: var(--brass); box-shadow: inset 0 0 0 1px rgba(226, 172, 98, .25); }
/* блоки — как деревянные таблички */
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .view .block {
  margin-top: 14px; padding: 12px 12px 10px; border-radius: 14px; border: 1px solid rgba(232, 196, 146, .14);
  background: linear-gradient(180deg, rgba(255, 222, 170, .06), rgba(255, 222, 170, .025)), repeating-linear-gradient(90deg, transparent 0 22px, rgba(0, 0, 0, .05) 22px 23px);
  box-shadow: inset 0 1px 0 rgba(255, 230, 190, .06), 0 2px 8px rgba(0, 0, 0, .25);
}
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .view .block > h2 { font-family: Georgia, "Times New Roman", serif; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--brass); }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .view .block > h2::before { content: "✦ "; color: var(--accent); }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .facts div { border-color: var(--line); }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .r-rare { color: #5fa2ec; } :is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .r-epic { color: #c08af0; } :is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .r-legend { color: #f0b23a; }
/* кнопки: медная табличка */
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .go:not(.ghost):not(.danger) { background: linear-gradient(#d4743a, #a94c22); color: #fff4e2; text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
  box-shadow: inset 0 1px 0 rgba(255, 210, 160, .45), inset 0 -2px 0 rgba(0, 0, 0, .25), 0 2px 6px rgba(0, 0, 0, .35); letter-spacing: .03em; }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .mini.primary { background: linear-gradient(#d0703a, #a94c22); border-color: #8a3c1a; }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .round-line b, :is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .coins-line b { color: var(--brass); }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .arena.px { box-shadow: 0 0 0 1px rgba(226, 172, 98, .25), 0 6px 18px rgba(0, 0, 0, .45); }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .fig, :is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .acts-ic .act:not([aria-pressed="true"]) { background: rgba(255, 222, 170, .04); }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .acts-ic .act[aria-pressed="true"] { background: linear-gradient(#d4743a, #a94c22); border-color: #8a3c1a; }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .fig .part:not([aria-pressed="true"]) { background: rgba(232, 196, 146, .22); }
/* стрелок в профиле */
.hero-fighter { grid-template-columns: 150px 1fr; }
.preview.px { padding: 0; background: linear-gradient(#24112a, #62192c 50%, #ad3a28 72%, #432616 72%, #1c0f07); border-radius: 12px; overflow: hidden; }
.preview.px canvas { display: block; width: 150px; height: 195px; image-rendering: pixelated; image-rendering: crisp-edges; }
/* иконки вещей */
.icon.px { background: radial-gradient(circle at 50% 45%, #4f3828, #1b120c); }
.icon.px img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; image-rendering: crisp-edges; }
/* компактная панель хода: иконки действий, два силуэта зон, расходники рядом с кнопкой */
.pick.compact h2 { display: none; }
.acts-ic { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: 2px 0 8px; }
.acts-ic .act { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 2px 5px; border: 1px solid var(--line); border-radius: 12px;
  background: none; color: inherit; font: inherit; cursor: pointer; }
.acts-ic .act .ic { font-size: 20px; line-height: 1.1; }
.acts-ic .act .cap { font-size: 11px; opacity: .75; white-space: nowrap; }
.acts-ic .act[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.acts-ic .act[aria-pressed="true"] .cap { opacity: 1; }
.acts-ic .act[disabled] { opacity: .3; cursor: default; }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fig { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px 8px; border: 1px solid var(--line); border-radius: 12px; }
.fig .ft { font-size: 12px; opacity: .8; margin-bottom: 2px; }
.fig.off { opacity: .35; }
.fig .part { position: relative; border: 0; padding: 0; cursor: pointer; background: rgba(127, 127, 127, .28); transition: background .12s; }
.fig .part.head { width: 30px; height: 30px; border-radius: 50%; }
.fig .part.body { width: 54px; height: 40px; border-radius: 12px 12px 6px 6px; }
.fig .part.legs { width: 42px; height: 36px; border-radius: 4px 4px 6px 6px;
  -webkit-mask: linear-gradient(90deg, #000 0 44%, transparent 44% 56%, #000 56%); mask: linear-gradient(90deg, #000 0 44%, transparent 44% 56%, #000 56%); }
.fig .part:not([disabled]):hover { background: rgba(127, 127, 127, .45); }
.fig.fig-attack .part[aria-pressed="true"] { background: #d0453a; }
.fig.fig-block .part[aria-pressed="true"] { background: #3d7fd4; }
.fig .part[aria-pressed="true"]::after { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; color: #fff; }
.fig.fig-attack .part[aria-pressed="true"]::after { content: "✛"; font-size: 18px; }
.fig.fig-block .part[aria-pressed="true"]::after { content: "🛡"; }
.fig .part[disabled] { cursor: default; }
.hint-1 { font-size: 12px; line-height: 1.35; opacity: .8; margin: 6px 2px 0; }
.gorow { display: flex; gap: 6px; align-items: stretch; margin-top: 8px; }
.gorow .go { flex: 1; margin: 0; }
.sups-ic { display: flex; gap: 6px; }
.sups-ic .sup { position: relative; width: 46px; height: 46px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: rgba(127, 127, 127, .08); cursor: pointer; }
.sups-ic .sup img { width: 100%; height: 100%; image-rendering: pixelated; display: block; }
.sups-ic .sup i { position: absolute; right: 2px; bottom: 0; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
.sups-ic .sup[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
/* новые механики: действие хода, состояния бойцов, луки */
.zones.actpick { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.zones.actpick .zone { font-size: 13px; padding: 11px 2px; line-height: 1.15; }
.zone.act[disabled] { opacity: .35; cursor: default; }
.fxs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; min-height: 18px; }
.fxs span { font-size: 11px; padding: 1px 6px; border-radius: 8px; background: rgba(176, 40, 30, .18); color: #e0705a; white-space: nowrap; }
.fxs span.aim { background: rgba(208, 166, 60, .2); color: #c08a1a; }
.side.p2 .fxs { justify-content: flex-end; }
.ammo .quiver { font-size: 11px; font-style: normal; opacity: .7; }
.log .wound { color: #c0503a; font-weight: 600; }
/* лавка: вкладки по разделам */
.shoptabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 4px 0 10px; padding-bottom: 2px; }
.shoptabs::-webkit-scrollbar { display: none; }
.shoptabs button { flex: 1 0 auto; border: 1px solid var(--line); background: none; color: inherit; border-radius: 10px; padding: 9px 12px;
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.shoptabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.shoptabs button i { font-style: normal; font-size: 11px; min-width: 16px; padding: 0 4px; border-radius: 8px; background: rgba(46, 160, 67, .18); color: #2ea043; line-height: 16px; }
.shoptabs button[aria-selected="true"] i { background: rgba(255, 255, 255, .25); color: #fff; }
/* описание и характеристики вещей */
.item-row.inv { align-items: flex-start; }
.item-row.inv .info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item-row .desc, .baginfo .desc { font-size: 12px; line-height: 1.35; opacity: .75; font-style: italic; }
.item-row .sub { font-size: 12px; opacity: .7; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.chips span { font-size: 11px; line-height: 1.3; padding: 2px 7px; border-radius: 8px; background: rgba(127, 127, 127, .14); white-space: nowrap; }
.chips span.up { background: rgba(46, 160, 67, .16); color: #2ea043; }
.chips span.down { background: rgba(176, 40, 30, .16); color: #d0583f; }
.chips span.wx { background: rgba(70, 130, 200, .15); color: #4a8fd8; white-space: normal; }
.item-row.inv.on { background: rgba(46, 160, 67, .07); border-radius: 10px; }
/* профиль: стрелок слева, слоты столбиком справа; внешность — отдельным экраном */
.hero-fighter.nopv { grid-template-columns: 1fr; }
.doll { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px; align-items: start; }
.dollside { display: flex; flex-direction: column; gap: 6px; }
.doll .preview.px canvas { width: 132px; height: 172px; }
.doll .editlook { width: 100%; padding: 6px 4px; font-size: 12px; line-height: 1.2; white-space: normal; }
#view-duel-me:not(.editing) > .chars, #view-duel-me:not(.editing) > .look, #view-duel-me:not(.editing) > .edit-head { display: none; }
#view-duel-me.editing > :not(.chars):not(.look):not(.edit-head) { display: none; }
.edit-head { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.edit-head > .mini { align-self: flex-start; }
.edit-head .preview.big { width: 180px; height: 234px; flex: none; }
.edit-head .preview.big canvas { width: 180px; height: 234px; }
.doll .preview.px { width: 132px; height: 172px; }
/* инвентарь: слоты снаряжения */
.slots { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.doll .slot { min-height: 0; padding: 5px 7px; grid-template-columns: 36px minmax(0, 1fr); }
.doll .slot .icon { width: 36px; height: 36px; }
.slot { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  text-align: left; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: none; color: inherit; font: inherit; cursor: pointer; min-height: 60px; }
.slot .icon { grid-row: 1 / 3; width: 44px; height: 44px; margin: 0; border-radius: 8px; }
.slot .icon.ghost { background: repeating-linear-gradient(45deg, rgba(127,127,127,.12) 0 4px, transparent 4px 8px); border: 1px dashed var(--line); }
.slot .sl { font-size: 11px; opacity: .6; text-transform: uppercase; letter-spacing: .04em; align-self: end; }
.slot b { font-size: 13px; font-weight: 600; line-height: 1.2; align-self: start; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.slot.empty b { opacity: .5; font-weight: 400; }
.slot.open { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.slot .spare { position: absolute; top: 6px; right: 7px; font-style: normal; font-size: 11px; padding: 0 5px; border-radius: 8px; background: rgba(46, 160, 67, .18); color: #2ea043; }
.slotpanel { margin-top: 10px; padding-top: 4px; border-top: 1px dashed var(--line); }
/* сумка: сетка ячеек */
.bag { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; max-width: 420px; }
.bag .cell { position: relative; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background: rgba(127, 127, 127, .06); padding: 4px; cursor: pointer; color: inherit; }
.bag .cell.free { border-style: dashed; background: none; cursor: default; opacity: .5; }
.bag .cell .icon { width: 100%; height: 100%; margin: 0; border-radius: 6px; }
.bag .cell i { position: absolute; right: 3px; bottom: 2px; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
.bag .cell.pick { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.baginfo { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; }
.baginfo .icon { width: 44px; height: 44px; flex: none; }
.baginfo .info { display: flex; flex-direction: column; gap: 2px; }
/* вывески разделов лавки: 5 равных кнопок, ничего не уходит за край (на ПК прокрутки вбок нет) */
.shoptabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; overflow: visible; }
.shoptabs button { position: relative; flex-direction: column; gap: 1px; padding: 6px 2px 5px; min-width: 0; font-size: 11px; }
.shoptabs button .ic { display: block; width: 44px; height: 26px; }
/* плоский латунный силуэт вещи (как гравировка на вывеске); у выбранной — светлый */
.shoptabs button .ic img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; display: block; transform: scale(1.35);
  filter: brightness(0) invert(1) sepia(1) saturate(2.2) hue-rotate(-12deg) brightness(.82) drop-shadow(0 1px 0 rgba(0, 0, 0, .7)); }
.shoptabs button[aria-selected="true"] .ic img { filter: brightness(0) invert(1) sepia(.35) brightness(1.02) drop-shadow(0 1px 0 rgba(0, 0, 0, .45)); }
.shoptabs button .cap { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shoptabs button i { position: absolute; top: 3px; right: 3px; }
/* хабар и сумка */
.r-junk { color: #9a9590; }
:is(html:has(#tabs-duels:not([hidden])), html:has(#view-fighter:not([hidden]))) .r-junk { color: #a99d8c; }
.bagcount { float: right; font: 600 12px/1.6 var(--body); letter-spacing: 0; text-transform: none; color: var(--hint); }
.bagcount.full { color: #e0583f; }
.bagfull { margin: 0 0 8px; padding: 7px 10px; border-radius: 10px; font-size: 12px; line-height: 1.35; background: rgba(208, 69, 58, .14); color: #e57a62; }
.bag .cell.loot.r-common { border-color: rgba(200, 190, 170, .4); }
.bag .cell.loot.r-rare { border-color: rgba(95, 162, 236, .6); }
.bag .cell.loot.r-epic { border-color: rgba(192, 138, 240, .7); }
.bag .cell.loot.r-legend { border-color: rgba(240, 178, 58, .85); box-shadow: inset 0 0 6px rgba(240, 178, 58, .35); }
.bagsell { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sellbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin: 0 0 8px; font-size: 12px; color: var(--hint); }
.ptag.sellp { background: #c9e0a8; color: #24401a; }
.sellrow { display: flex; gap: 6px; }
.sellrow .go { flex: 1; }
/* лавка: стеллаж оружейного магазина */
.rack { padding: 10px 10px 2px; border-radius: 12px; border: 3px solid #4a2e1c; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5), inset 0 8px 18px rgba(0, 0, 0, .45), 0 3px 10px rgba(0, 0, 0, .35);
  background: repeating-linear-gradient(90deg, #3a2518 0 46px, #33200f 46px 47px, #3e281a 47px 94px, #2c1b10 94px 95px); touch-action: pan-y; }
.shelf { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 6px 2px 12px; margin-bottom: 10px; }
.shelf::after { content: ""; position: absolute; left: -10px; right: -10px; bottom: 0; height: 12px;   /* доска полки */
  background: linear-gradient(#a8703f, #7a4a26 35%, #5a3418 70%, #3a200e); box-shadow: 0 5px 6px rgba(0, 0, 0, .45); border-top: 1px solid #c48a52; }
.good { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-height: 92px;
  padding: 4px 2px 0; border: 0; border-radius: 10px 10px 0 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.good .icon { width: 74px; height: 58px; margin: 0; background: none; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .55)); }
.good.r-rare .icon { filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .55)) drop-shadow(0 0 5px rgba(80, 150, 230, .35)); }
.good.r-epic .icon { filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .55)) drop-shadow(0 0 6px rgba(180, 110, 240, .45)); }
.good.r-legend .icon { filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .55)) drop-shadow(0 0 7px rgba(240, 180, 60, .55)); }
.good[aria-pressed="true"] { background: radial-gradient(70% 60% at 50% 70%, rgba(255, 210, 140, .22), transparent 70%); }
.good[aria-pressed="true"]::before { content: ""; position: absolute; left: 50%; bottom: -10px; width: 46px; height: 3px; margin-left: -23px; border-radius: 2px; background: #ffd08a; box-shadow: 0 0 8px #ffb04a; z-index: 2; }
.good.empty { cursor: default; }
.good .have { position: absolute; top: 14px; left: calc(50% + 16px); font-style: normal; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
.ptag { position: relative; display: inline-block; margin-bottom: -4px; padding: 1px 6px; font-size: 11px; font-weight: 700; line-height: 1.4; white-space: nowrap; color: #3a2414;
  background: #e8d6b0; border-radius: 3px 3px 3px 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); transform: rotate(-3deg); }
.good:nth-child(2n) .ptag { transform: rotate(2.5deg); }
.ptag::before { content: ""; position: absolute; left: 50%; top: -7px; width: 1px; height: 7px; background: rgba(232, 214, 176, .7); }
.ptag.poor { color: #8a2a1a; }
.ptag.own { background: #b9d8a2; color: #20401a; }
.ptag.loot { background: #d8c08a; color: #5a3a10; font-weight: 600; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 8px 0 2px; font-variant-numeric: tabular-nums; color: var(--hint); }
.pager .pg { width: 40px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: none; color: inherit; font-size: 14px; cursor: pointer; }
.pager .pg:disabled { opacity: .3; cursor: default; }
.counter { margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px solid rgba(232, 196, 146, .18);
  background: linear-gradient(180deg, rgba(255, 222, 170, .07), rgba(255, 222, 170, .02)); box-shadow: inset 0 3px 0 rgba(168, 112, 63, .55); }
.counter .cnt-head { display: flex; gap: 10px; align-items: center; }
.counter .cnt-head .icon { width: 64px; height: 50px; flex: none; margin: 0; }
.counter .cnt-head b { display: block; font-size: 16px; font-weight: 700; }
.counter .sub { display: block; font-size: 12px; color: var(--hint); }
.counter .desc { margin: 8px 0 4px; font-size: 13px; line-height: 1.4; font-style: italic; opacity: .85; }
.counter .cnt-buy .go { margin-top: 10px; }
.counter .cnt-buy .tag-on { display: block; margin-top: 10px; text-align: center; }
/* выбор персонажа */
.chargrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.charbtn { padding: 0; border: 2px solid transparent; border-radius: 8px; background: linear-gradient(#43152d, #87242a 60%, #cf5a2a); cursor: pointer; aspect-ratio: 1; overflow: hidden; }
.charbtn img { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.charbtn[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
/* лицо-эмодзи в пиксельном стиле не рисуется — прячем его настройку */
.look h2 + .hint, .look .custom-face, .look .faces, .look .face-input, .look .hint.small { display: none; }

/* история дуэлей */
.hist-btn { margin-top: 10px; }
.hist-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; text-align: center; }
.hist-sum span { padding: 8px 2px; border-radius: 10px; background: rgba(127, 127, 127, .08); font-size: 20px; font-weight: 700; line-height: 1.1; }
.hist-sum span i { display: block; font-style: normal; font-size: 11px; font-weight: 500; color: var(--hint); margin-top: 2px; }
.hist-sum .w { color: #4caf50; } .hist-sum .l { color: #d0583f; } .hist-sum .d { color: var(--hint); }
.hist-list li + li { margin-top: 6px; }
.hist-row { display: flex; align-items: stretch; gap: 10px; width: 100%; padding: 8px 10px 8px 0; border: 1px solid var(--line); border-radius: 12px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; overflow: hidden; }
.hist-row .mark { flex: none; width: 5px; border-radius: 0 3px 3px 0; background: var(--hint); }
.hist-row.win .mark { background: #4caf50; } .hist-row.lose .mark { background: #d0583f; }
.hist-row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hist-row .info b { font-weight: 600; }
.hist-row .sub { font-size: 12px; color: var(--hint); line-height: 1.35; }
.hist-row .rw { font-size: 12px; font-weight: 600; }
.hist-row .go-arrow { align-self: center; font-size: 20px; color: var(--hint); }
.hist-row:hover { background: rgba(127, 127, 127, .06); }
/* «Стрелок»: сначала снаряжение и сумка, ниже уровень */
.hero-fighter.nopv { margin-top: 22px; }

/* кнопка «Сдаться» под панелью хода — неброская, чтобы не нажать случайно */
.giveup { display: block; margin: 10px auto 0; padding: 6px 14px; border: 0; background: none; color: var(--hint, #999); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; opacity: .8; }
.giveup:disabled { opacity: .4; }

/* вкладка «Стрелок»: стрелок в полный рост анфас (PX_FRONT) — холст 132×252 на высоких, 66×126 ×2 на средних, 33×63 ×4 на низких */
.preview.px:has(canvas.front) { width: auto !important; height: auto !important; display: flex; justify-content: center; }
.preview.px canvas.front { width: 132px !important; height: 252px !important; image-rendering: pixelated; }
