/* Zmeyacoolcoos x1 — мини-приложение.
   Визуальный язык — окна клиента Lineage 2 Interlude: прямые углы (радиус 0 везде), тонкая бронзовая рамка
   с тёмной внешней линией и светлой фаской сверху, тёмные тёплые панели, золото только акцентом.
   Без пилюль, свечений, размытий и градиентного текста. */
:root {
  --bg: #0e0d0b;
  --panel: #181612;
  --panel2: #221f1a;
  --edge: #3a3227;
  --edge-hi: #5a4c37;
  --text: #ebe5d8;
  --dim: #9b927f;
  --dim2: #665e50;
  --acc: #d1aa5a;
  --acc2: #e8c87e;
  --acc-ink: #1b1308;
  --acc-bg: rgba(209, 170, 90, .10);
  --hp: #b8322b;
  --mp: #2f62b8;
  --cp: #c2932b;
  --ok: #6fbf5a;
  --bad: #d65040;
  --tabh: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* цвета каналов чата как в клиенте */
  --ch-all: #e6e1d6;
  --ch-shout: #ff8c3a;
  --ch-trade: #ea7bd0;
  --ch-clan: #a98cff;
  --ch-party: #4fcf63;
  --ch-ally: #9fe07f;
  --ch-hero: #5aaaf5;
  --ch-tell: #ff6fa0;
  /* рамка «окна»: тёмный контур + фаска */
  --frame: 0 0 0 1px #050404, inset 0 1px 0 rgba(255, 236, 200, .06);
  /* шрифты: заголовки и ники — Forum (римские капители, как заставка L2), текст — Fira Sans, цифры — Oswald */
  --f-title: "Forum", "Times New Roman", serif;
  --f-ui: "Fira Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --f-num: "Oswald", "Fira Sans Condensed", "Arial Narrow", sans-serif;
  /* металлическое золото, как цифры уровня в клиенте */
  --gold-metal: linear-gradient(180deg, #fff3c4 0%, #f1cf7a 22%, #b8862f 48%, #7a5418 52%, #c99a43 70%, #f6dc94 100%);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; border-radius: 0; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.38 var(--f-ui);
  -webkit-font-smoothing: antialiased; overscroll-behavior: none; user-select: none;
}
input, textarea, button { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }
/* надпись рядом со значком: строка подрезана по заглавным (у .lc — по строчным), flex центрирует буквы */
.lbl { display: block; line-height: 1; text-box: trim-both cap alphabetic; }
.lc .lbl { text-box: trim-both ex alphabetic; }
svg { display: block; flex: none; }
.num, .bar b, .stats .v, .price, .kv b, .badge, .cnt, .it .q, .it .en, .eff .t, .pill.num { font-family: var(--f-num); letter-spacing: .2px; }

#app { min-height: 100dvh; padding: 10px 12px calc(var(--tabh) + var(--safe-b) + 16px); max-width: 520px; margin: 0 auto; }

/* верхняя строка */
.top { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; background: var(--panel);
  border: 1px solid var(--edge); box-shadow: var(--frame); font-weight: 600; font-size: 14px; white-space: nowrap; }
.pill .chev { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--dim); margin-left: 1px; }
.chev-l { width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: 0 1px 0 3px; }
.pill img { width: 18px; height: 18px; }
.pill svg { width: 15px; height: 15px; flex: none; color: var(--acc); }
.pill:active, .ico-btn:active { background: var(--panel2); }
.top .grow { flex: 1; }
.back { color: var(--dim); }
.ico-btn { width: 32px; height: 32px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--edge);
  box-shadow: var(--frame); position: relative; color: var(--acc); }
.ico-btn svg { width: 17px; height: 17px; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; background: var(--acc);
  color: var(--acc-ink); font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 1px solid #050404; }

h1 { font-family: var(--f-title); font-size: 26px; margin: 6px 0 2px; font-weight: 400; letter-spacing: .3px; color: #f2e6c9; }
.sub { color: var(--dim); font-size: 13.5px; margin: 0 0 12px; }
.sect { display: flex; align-items: center; gap: 10px; color: var(--acc2); font-family: var(--f-title); font-size: 16px; font-weight: 400; margin: 18px 0 8px; }
.sect::after { content: ""; flex: 1; height: 1px; background: var(--edge); }

.card { background: var(--panel); border: 1px solid var(--edge); box-shadow: var(--frame); }
.pad { padding: 12px; }

/* герой */
.hero { position: relative; overflow: hidden; padding: 10px 12px 12px; background: linear-gradient(180deg, #1d1a15, var(--panel) 60%); }
.hero .chips { display: flex; justify-content: space-between; gap: 8px; position: relative; z-index: 2; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 9px; font-size: 13px; font-weight: 500;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--edge); color: var(--dim); white-space: nowrap; overflow: hidden; }
.chip.on { color: var(--ok); }
.chip.on::before, .chip.off::before { content: ""; width: 7px; height: 7px; flex: none; background: var(--ok); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
.chip.off::before { background: var(--dim2); }
.chip.gold { color: var(--acc2); }
.hero .lvl { position: absolute; left: 0; right: 0; top: 22px; text-align: center; font-family: var(--f-num); font-size: 218px; font-weight: 700;
  line-height: 1; letter-spacing: 2px; color: transparent; background: var(--gold-metal); -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 1.5px rgba(40, 24, 6, .9); opacity: .9; }
.hero .emb { position: relative; z-index: 1; display: block; width: 88px; height: 88px; margin: 20px auto 6px; }
.hero .head-slot { position: relative; z-index: 1; display: flex; justify-content: center; min-height: 100px; margin-top: 2px; }
.hero .head3d { display: block; width: 230px; height: 200px; margin: 4px auto -4px;
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%); mask-image: linear-gradient(180deg, #000 80%, transparent 100%); }
.hero .name { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-family: var(--f-title); font-size: 28px; font-weight: 400; letter-spacing: .5px; color: #f6ecd2; }
.crest { display: inline-flex; gap: 0; flex: none; border: 1px solid #050404; }
.crest img { display: block; height: 18px; image-rendering: pixelated; }
.crest img.ally { width: 12px; } .crest img.clan { width: 24px; }
.crest.sm img { height: 12px; } .crest.sm img.ally { width: 8px; } .crest.sm img.clan { width: 16px; }
.hero .cls { position: relative; z-index: 1; text-align: center; color: var(--acc2); font-size: 13px; font-weight: 600; margin-top: 3px; }
.hero .cls span { color: var(--dim); font-weight: 500; }

.bar { position: relative; height: 18px; background: #0a0908; border: 1px solid #050404; box-shadow: inset 0 0 0 1px #2a251e; overflow: hidden; margin-top: 5px; }
.bar i { position: absolute; inset: 1px auto 1px 1px; }
.bar b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12.5px; line-height: 16px; font-weight: 500; text-shadow: 0 1px 1px #000, 0 0 3px rgba(0, 0, 0, .6); }
.bar.hp i { background: linear-gradient(180deg, #d4473e, var(--hp) 55%, #8c231d); }
.bar.mp i { background: linear-gradient(180deg, #4a7ed4, var(--mp) 55%, #1f4688); }
.bar.cp i { background: linear-gradient(180deg, #dcae47, var(--cp) 55%, #8f6a1c); }
.bar .tag { position: absolute; left: 6px; top: 0; bottom: 0; display: flex; align-items: center; font-family: var(--f-num); font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .6px; color: rgba(255, 255, 255, .8); z-index: 1; }
.bar.xp { height: 6px; margin-top: 10px; }
.bar.xp i { background: var(--acc); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 10px; border-top: 1px solid var(--edge); }
.stats > div { padding: 9px 4px 1px; text-align: center; }
.stats > div + div { border-left: 1px solid var(--edge); }
.stats .k { color: var(--dim); font-size: 12.5px; }
.stats .v { font-size: 19px; font-weight: 500; margin-top: 1px; }
.stats .v.gold { color: transparent; background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; }
.stats .v.red { color: var(--bad); }

.effs { display: grid; grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 4px; }
.eff { position: relative; aspect-ratio: 1; overflow: hidden; background: #000; border: 1px solid #050404; box-shadow: inset 0 0 0 1px var(--edge); }
.eff img { width: 100%; height: 100%; display: block; }
.eff.bad { border-color: #2a0705; box-shadow: inset 0 0 0 1px var(--bad); }
.eff.bad .t { color: #ffb4a8; }
.head .debuffs { font-style: normal; color: var(--bad); margin-left: 6px; }
.bar i { transition: width .45s ease-out; }
.it .box.flash { animation: zk-flash 1.1s ease-out; }
@keyframes zk-flash { 0% { box-shadow: inset 0 0 0 2px var(--acc2); background: #3a2c10; } 100% { box-shadow: inset 0 0 0 1px var(--edge); background: #050404; } }
.eff .t { position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; font-weight: 800; text-align: center; background: rgba(0, 0, 0, .7); line-height: 11px; }
.head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.head b { font-family: var(--f-title); font-size: 16px; font-weight: 400; color: var(--acc2); }
.head span { color: var(--dim); font-size: 12px; }

/* строки-меню */
.list { overflow: hidden; }
.row { display: flex; align-items: center; gap: 11px; padding: 10px 12px; min-height: 54px; width: 100%; text-align: left; }
.row + .row { border-top: 1px solid #2a251e; }
.row .ic { width: 32px; height: 32px; display: grid; place-items: center; background: var(--acc-bg); border: 1px solid var(--edge); color: var(--acc); flex: none; position: relative; }
.row .ic svg { width: 17px; height: 17px; }
.row .ic img { width: 32px; height: 32px; }
.row .tx { flex: 1; min-width: 0; }
.row .tx b { display: block; font-weight: 500; font-size: 15.5px; color: #f1ebdf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .tx small { display: block; color: var(--dim); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.row .rt { color: var(--dim); font-size: 13px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.row .rt .price { color: var(--acc2); font-weight: 700; }
.row .arr { width: 7px; height: 7px; flex: none; border-right: 1.5px solid var(--dim2); border-bottom: 1.5px solid var(--dim2); transform: rotate(-45deg); margin: 0 4px 0 4px; }
.row .cnt { background: var(--acc); color: var(--acc-ink); min-width: 20px; height: 20px; padding: 0 6px; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.row:active { background: var(--panel2); }

/* поиск и фильтры */
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px; background: #0b0a09; border: 1px solid var(--edge);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6); margin-bottom: 10px; }
.search svg { width: 15px; height: 15px; color: var(--dim); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; height: 100%; }
.search input::placeholder { color: var(--dim2); }
.search:focus-within { border-color: var(--acc); }
.sugg { display: none; margin: -4px 0 10px; border: 1px solid var(--edge); background: var(--panel); box-shadow: var(--frame); }
.sugg.on { display: block; }
.sugg button { display: block; width: 100%; text-align: left; padding: 9px 12px; font-size: 14px; color: var(--text); }
.sugg button + button { border-top: 1px solid #2a251e; }
.sugg button:active { background: var(--panel2); }
.note.fixed { margin: 0 0 8px; }
.note.other { display: block; width: 100%; text-align: left; color: var(--gold2); border: 1px solid var(--edge); background: var(--panel); padding: 12px; font-size: 14px; }
.note.other::after { content: " →"; }
.note.fixed b { color: var(--acc2); font-weight: 600; }
.tools { display: flex; justify-content: flex-end; margin: -2px 0 8px; }
.hrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sh-head .sortbtn { flex: none; }
.per { color: var(--dim); font-size: 12px; font-weight: 500; }
.searchrow { display: flex; gap: 6px; margin-bottom: 10px; }
.searchrow .search { flex: 1; margin-bottom: 0; }
.sortbtn { width: 38px; height: 38px; }
.sortbtn.on { border-color: var(--acc); color: var(--acc2); background: var(--acc-bg); }
.sortmenu { display: flex; flex-direction: column; min-width: 170px; margin: -4px -8px; }
.sortmenu button { text-align: left; padding: 8px 10px; font-size: 14px; color: var(--text); }
.sortmenu button + button { border-top: 1px solid #2a251e; }
.sortmenu button.on { color: var(--acc2); }
.sortmenu button.on::after { content: ""; float: right; width: 6px; height: 10px; border-right: 2px solid var(--acc2); border-bottom: 2px solid var(--acc2); transform: rotate(45deg); margin: 1px 2px 0 0; }
.seg { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 10px; padding: 0 12px; }
.seg::-webkit-scrollbar { display: none; }
.seg button { display: flex; align-items: center; height: 32px; padding: 0 12px; background: var(--panel); border: 1px solid var(--edge); color: var(--dim); font-weight: 600; font-size: 13px; white-space: nowrap; flex: none; }
.seg button.on { color: var(--acc2); border-color: var(--acc); background: var(--acc-bg); }
.tabs2 { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-bottom: 1px solid var(--edge); margin-bottom: 12px; }
.tabs2 button { height: 38px; font-weight: 600; color: var(--dim); font-size: 14px; position: relative; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs2 button.on { color: var(--acc2); border-bottom-color: var(--acc); background: linear-gradient(180deg, transparent, var(--acc-bg)); }
.tabs2 button { display: flex; align-items: center; justify-content: center; gap: 7px; }
.tabs2 .badge { position: static; }

.weight { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--dim); margin: 0 0 12px; }
.weight .bar { flex: 1; height: 8px; margin: 0; }
.weight .bar i { background: var(--ok); }
.weight .bar.warn i { background: var(--acc); }
.weight .bar.over i { background: var(--bad); }

/* сетка предметов */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 8px 6px; }
.it { text-align: center; min-width: 0; }
.it .box { position: relative; aspect-ratio: 1; background: #050404; border: 1px solid #050404; box-shadow: inset 0 0 0 1px var(--edge); overflow: hidden; }
.it .box img { width: 100%; height: 100%; display: block; }
.it .box .q { position: absolute; right: 3px; bottom: 1px; font-size: 10.5px; font-weight: 800; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.it .box .en { position: absolute; left: 3px; top: 1px; font-size: 10.5px; font-weight: 900; color: var(--acc2); text-shadow: 0 0 2px #000; }
.it .box.eq { box-shadow: inset 0 0 0 1px var(--acc); }
.it .box .gb { position: absolute; right: 2px; top: 2px; width: 11px; height: 12px; z-index: 1; display: block; }
.it .nm { font-size: 11px; color: #a89f8c; margin-top: 3px; line-height: 1.2; height: 25px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.g { display: inline-flex; align-items: center; font-family: var(--f-num); font-size: 11px; font-weight: 600; padding: 3px 4px; border: 1px solid var(--edge); color: #cfc8b8; vertical-align: middle; margin-left: 4px; }
/* грейд — игровой значок 11×12 (×4 в файле), в строке 1,25× */
.gr { display: inline-block; width: 13.75px; height: 15px; vertical-align: middle; margin: 0 0 0 2.5px; position: relative; top: -1px; }

/* рынок */
.lot .ic { width: 38px; height: 38px; background: #050404; border: 1px solid #050404; box-shadow: inset 0 0 0 1px var(--edge); }
.lot .ic img { width: 36px; height: 36px; }
.seller { font-size: 12.5px; color: var(--dim); }
.seller .sn { color: var(--text); font-weight: 600; }

/* чат — как окно чата в клиенте: строки, а не пузыри */
.chat { padding: 8px 10px 76px; font-size: 14px; line-height: 1.45; background: rgba(0, 0, 0, .25); border: 1px solid var(--edge); box-shadow: var(--frame); }
.msg { padding: 2px 0; font-size: 14.5px; word-break: break-word; user-select: text; }
.msg .ts { color: var(--dim2); font-size: 11.5px; margin-right: 6px; }
.msg .who { font-weight: 700; }
.msg.me .who { text-decoration: underline; text-decoration-color: rgba(209, 170, 90, .5); text-underline-offset: 3px; }
.ch-all { color: var(--ch-all); } .ch-shout { color: var(--ch-shout); } .ch-trade { color: var(--ch-trade); }
.ch-clan { color: var(--ch-clan); } .ch-party { color: var(--ch-party); } .ch-ally { color: var(--ch-ally); }
.ch-hero { color: var(--ch-hero); } .ch-tell { color: var(--ch-tell); }
.composer { position: fixed; left: 0; right: 0; bottom: calc(var(--tabh) + var(--safe-b)); padding: 8px 12px; background: var(--bg);
  border-top: 1px solid var(--edge); max-width: 520px; margin: 0 auto; }
.composer .in { display: flex; align-items: center; gap: 6px; background: #0b0a09; border: 1px solid var(--edge); padding: 3px 3px 3px 3px; }
.composer input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; height: 34px; }
.composer .chsel { display: flex; align-items: center; font-size: 13px; font-weight: 600; padding: 0 10px; height: 34px; background: var(--panel2); border-right: 1px solid var(--edge); }
.send { width: 34px; height: 34px; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; flex: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .25); }
.send svg { width: 17px; height: 17px; }

/* формы */
.field { margin-bottom: 10px; }
.field label { display: block; color: var(--dim); font-size: 12.5px; margin: 0 0 5px; }
.field input, .field textarea { width: 100%; background: #0b0a09; border: 1px solid var(--edge); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .6);
  padding: 10px 11px; outline: 0; }
.field textarea { min-height: 92px; resize: none; }
.field input:focus, .field textarea:focus { border-color: var(--acc); }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 46px;
  background: linear-gradient(180deg, #e4c173, #c39845 50%, #a97f33); color: var(--acc-ink); font-weight: 700; font-size: 15px; letter-spacing: .3px;
  border: 1px solid #6e5222; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -1px 0 rgba(0, 0, 0, .25), 0 0 0 1px #050404; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--panel2); color: var(--text); border-color: var(--edge); box-shadow: inset 0 1px 0 rgba(255, 236, 200, .06), 0 0 0 1px #050404; }
.btn[disabled] { opacity: .45; }
.btn + .btn { margin-top: 8px; }
.switch { width: 42px; height: 22px; background: #0b0a09; border: 1px solid var(--edge); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--dim2); transition: transform .12s, background .12s; }
.switch.on { border-color: var(--acc); }
.switch.on::after { transform: translateX(20px); background: var(--acc); }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; font-size: 14.5px; }
.kv + .kv { border-top: 1px solid #2a251e; }
.kv span { color: var(--dim); }
.kv b { font-weight: 500; font-size: 16px; text-align: right; }
.kv b.gold { color: var(--acc2); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 36px; height: 36px; background: var(--panel2); border: 1px solid var(--edge); font-size: 20px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.stepper input { width: 92px; height: 36px; text-align: center; background: #0b0a09; border: 1px solid var(--edge); outline: 0; font-weight: 700; }
.note { color: var(--dim); font-size: 12.5px; margin: 8px 0; }
.empty { text-align: center; color: var(--dim); padding: 32px 12px; border: 1px dashed var(--edge); }

/* нижняя панель */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; padding: 0 0 var(--safe-b); background: #12110e; border-top: 1px solid var(--edge);
  box-shadow: 0 -1px 0 #050404; z-index: 20; }
.tabbar .in { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--tabh); }
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--dim2);
  font-weight: 600; font-size: 11px; position: relative; border-top: 2px solid transparent; margin-top: -1px; }
.tabbar button svg { width: 21px; height: 21px; }
.tabbar button.on { color: var(--acc2); border-top-color: var(--acc); background: linear-gradient(180deg, var(--acc-bg), transparent); }
.tabbar button .badge { top: 6px; right: calc(50% - 20px); }

/* нижний лист */
#sheet { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
#sheet .dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .18s; }
#sheet .panel { position: absolute; left: 0; right: 0; bottom: 0; max-width: 520px; margin: 0 auto; background: var(--panel);
  border-top: 1px solid var(--edge-hi); box-shadow: 0 -1px 0 #050404; padding: 12px 14px calc(14px + var(--safe-b));
  transform: translateY(105%); transition: transform .2s cubic-bezier(.2, .8, .2, 1); max-height: 88vh; overflow-y: auto; }
#sheet.open { pointer-events: auto; }
#sheet.open .dim { opacity: 1; }
#sheet.open .panel { transform: none; }
.grab { display: none; }
.sh-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sh-head > img { width: 48px; height: 48px; background: #050404; border: 1px solid #050404; box-shadow: inset 0 0 0 1px var(--edge); }
.sh-head .tx { flex: 1; min-width: 0; }
.sh-head b { display: block; font-family: var(--f-title); font-size: 19px; font-weight: 400; }
.sh-head small { color: var(--dim); font-size: 13px; }
.tx b:has(> .nm) { display: flex; align-items: center; }
.tx b > .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx b > .gr { flex: none; top: -0.5px; }
.x { width: 30px; height: 30px; background: var(--panel2); border: 1px solid var(--edge); color: var(--dim); font-size: 18px; display: flex; align-items: center; justify-content: center; flex: none; }
.done { text-align: center; color: var(--ok); font-weight: 800; font-size: 16px; margin: 6px 0 2px; }
.done + .note { text-align: center; margin-top: 0; }

#pop { position: absolute; z-index: 50; background: var(--panel2); border: 1px solid var(--edge-hi); box-shadow: 0 0 0 1px #050404, 0 6px 18px rgba(0, 0, 0, .5);
  padding: 8px 12px; font-size: 14px; white-space: nowrap; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity .15s, transform .15s; }
#pop.on { opacity: 1; transform: none; pointer-events: auto; }
#pop b { font-family: var(--f-num); font-size: 17px; font-weight: 500; color: var(--acc2); }
#pop span { color: var(--dim); }
[hidden] { display: none !important; }
#toast { position: fixed; left: 50%; top: 12px; transform: translate(-50%, -160%); background: var(--panel2); border: 1px solid var(--edge-hi);
  box-shadow: 0 0 0 1px #050404; padding: 9px 14px; font-weight: 600; font-size: 14px; z-index: 60; transition: transform .2s; max-width: 92vw; }
#toast.on { transform: translate(-50%, 0); }
.skel { background: var(--panel); border: 1px solid var(--edge); }

/* иконки появляются и уходят мягко (эффекты, инвентарь, экипировка) */
.appear { animation: zk-in .36s cubic-bezier(.2, .8, .2, 1) both; }
.vanish { animation: zk-out .3s ease-in both; pointer-events: none; }
@keyframes zk-in { 0% { opacity: 0; transform: scale(.55); filter: brightness(1.8); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes zk-out { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(.55); } }
@media (prefers-reduced-motion: reduce) {
  .appear, .vanish { animation-duration: 1ms; }
  #sheet .panel, #sheet .dim, #toast, .switch::after, .bar i { transition: none; }
  .it .box.flash { animation: none; }
}
