/* Стили игры, часть «hud»: экран игры по раскладке BG3: портреты, панель действий, окна, лист героя, журнал, лавка. Порядок подключения частей (index.html) важен: поздние правила перекрывают ранние. */
/* ───────────── Интерфейс экрана игры по раскладке BG3 (hud.js) ─────────────
   Портреты отряда слева, панель действий поверх карты внизу по центру, место и мини-карта справа вверху,
   окна и меню справа внизу, чат слева внизу. Рамки и значки — свои (CSS и HUD_IC), без верхней полосы */
.map-col { position: relative; }
#map-wrap { --cards-w: 140px; }

/* портреты отряда слева: картинка, недостающее здоровье — красным снизу, число внизу, состояния — значками справа */
.party-cards { top: 10px; left: 10px; width: auto; padding: 0 4px 4px 0; gap: 8px; overflow-x: visible; }
.map-col.chat-on .party-cards { max-height: calc(100% - var(--chat-top, 250px) - 24px); }
.pcard { position: relative; align-items: flex-start; gap: 4px; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.pcard:hover, .pcard.cur { transform: none; box-shadow: none; }
.pcard .pc-face {
  width: 84px; height: 106px; overflow: hidden; font-size: 40px;
  transition: border-color .15s, box-shadow .2s;
}
.pc-face .face-img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.pc-face .pc-ic { font-size: 38px; }
.pcard.me .pc-face { border-color: var(--hud-gold2); }
.pcard:hover .pc-face { border-color: var(--hud-gold); }
.pcard.cur .pc-face { border-color: #f6dc8c; }
.pcard.team .pc-face { border-color: var(--tc); }
.pcard.rel { border-left: 0; }
.pcard.rel .pc-face, .pcard.rel.focus .pc-face { border-color: var(--rel); }
.pcard.down .pc-face { filter: grayscale(.9) brightness(.7); }
.pcard.down { filter: none; }
.pc-dmg { position: absolute; pointer-events: none; transition: height .4s; }
.pc-hp { position: absolute; text-align: center; line-height: 1; color: #fff; text-shadow: 0 0 3px #000, 0 1px 2px #000; pointer-events: none; }
.pc-hp em { font-style: normal; color: #bfe8ff; }
.pc-mp { position: absolute; height: 4px; background: rgba(0,0,0,.65); }
.pc-mp b { display: block; height: 100%; background: linear-gradient(90deg, #2a5ad0, #5a9aff); }
.pcard .pc-lvl { top: 3px; left: 3px; bottom: auto; min-width: 20px; height: 20px; font-size: 11px; }
.pcard .pc-face .dot { top: 4px; right: 4px; }

.pcard .pc-lead { position: absolute; right: 2px; bottom: 16px; margin: 0; font-size: 12px; }
.pcard.pet { margin-left: 16px; }
.pcard.pet .pc-face { width: 58px; height: 74px; font-size: 28px; }
.pcard.pet .pc-hp { font-size: 9.5px; bottom: 3px; }
.pcard .pc-st { flex-direction: column; flex-wrap: nowrap; gap: 3px; margin: 0; }
.pc-sti { position: relative; width: 22px; height: 22px; display: grid; place-items: center; font-size: 13px; cursor: help;
  border: 1px solid #5a4a32; }
.pc-sti.cc { border-color: #ff6a4a; }
.pc-sti.bad { border-color: #e09040; }
.pc-sti.good { border-color: #5ab8e8; }
.pc-sti b { position: absolute; right: -4px; bottom: -5px; font-size: 9px; font-weight: 800; color: #fff; text-shadow: 0 0 2px #000, 0 0 3px #000; }
.pcard .pc-follow { position: static; align-self: flex-start; }
.pcard .pc-busy { left: 3px; top: 26px; }

/* панель действий: круглый портрет, сетка ячеек в два ряда с разделами, вкладки, ресурсы хода, «Конец хода» */
#actionbar.hud {
  position: absolute; left: 230px; right: 230px; bottom: 10px; z-index: 5; min-height: 0; padding: 0; gap: 0;
  border: 0; background: none; box-shadow: none; display: flex; justify-content: center; flex-wrap: nowrap; pointer-events: none;
}
#actionbar.hud > * { pointer-events: auto; }
.hb { position: relative; display: flex; align-items: flex-end; }
.hb-port {
  position: relative; z-index: 2; flex: none; width: 98px; height: 98px; margin: 0 -16px 8px 0; border-radius: 50%; cursor: var(--cur-hand);

}
.hb-face {
  position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; display: grid; place-items: center; font-size: 46px;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 70%, #fff 30%), var(--c) 55%, color-mix(in srgb, var(--c) 50%, #000 50%));
}
.hb-face .face-img, .hb-face img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.hb-port.down .hb-face { filter: grayscale(1) brightness(.6); }
.hb-dmg { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, rgba(150,18,12,.72), rgba(196,36,26,.5)); pointer-events: none; transition: height .4s; }
.hb-hp {
  position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); z-index: 1; padding: 1px 9px; white-space: nowrap;
  font-size: 12px; font-weight: 700; color: #fff; border: 1px solid var(--hud-gold); text-shadow: 0 1px 2px #000;
}
.hb-hp em { font-style: normal; color: #bfe8ff; }
.hb-lvl { position: absolute; top: -3px; left: -3px; width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; border: 2px solid var(--hud-gold); }
.hb-mp { position: absolute; left: 18px; right: 18px; bottom: -17px; height: 4px; border-radius: 2px; overflow: hidden; background: #0a0806; box-shadow: 0 0 0 1px #3a2c1c; }
.hb-mp b { display: block; height: 100%; background: linear-gradient(90deg, #2a5ad0, #5a9aff); }
.hb-panel {
  position: relative; display: flex; flex-direction: column; align-items: center; min-height: 106px; padding: 10px 14px 0 26px;

  border: 1px solid var(--hud-line); box-shadow: 0 0 0 1px #000, inset 0 1px 0 rgba(236,210,154,.16), 0 10px 26px rgba(0,0,0,.65);
}
.hb-panel::before { content: ''; position: absolute; }
.hb-res {
  position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; 
  background: #100c09; border: 1px solid var(--hud-line); box-shadow: 0 0 0 1px #000;
}
.hr-grp { display: flex; gap: 3px; align-items: center; }
.hr-act { width: 14px; height: 14px; border-radius: 50%; background: #1d241a; border: 1px solid #3d5a35; }
.hr-act.on { background: radial-gradient(circle at 35% 30%, #c8f8aa, #46b040 60%, #1f5a1c); border-color: #8adf6e; box-shadow: 0 0 7px rgba(120,230,90,.75); }
.hr-bon { width: 16px; height: 14px; background: #3a2a16; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.hr-bon.on { background: linear-gradient(180deg, #ffd88a, #e0861a); filter: drop-shadow(0 0 4px rgba(255,170,60,.85)); }
.hr-move { position: relative; width: 92px; height: 12px; border-radius: var(--radius); overflow: hidden; background: #1a140c; border: 1px solid #5a4626; }
.hr-move i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #b88a24, #f2d06a); transition: width .3s; }
.hr-move b { position: relative; display: block; text-align: center; font-size: 9.5px; line-height: 11px; color: #fff; text-shadow: 0 0 2px #000, 0 0 3px #000; }
.hb-grid { display: flex; align-items: flex-start; gap: 8px; }
.hb-sec { display: grid; grid-auto-flow: row; grid-template-columns: repeat(var(--n, 1), 46px); grid-template-rows: repeat(2, 46px); gap: 4px; }
.hb-sec + .hb-sec { padding-left: 8px; }
.hb-grid[data-tab="all"] .hb-sec[data-sec="passive"] { display: none; }
.hb-grid[data-tab="common"] .hb-sec:not([data-sec="common"]), .hb-grid[data-tab="class"] .hb-sec:not([data-sec="class"]),
.hb-grid[data-tab="items"] .hb-sec:not([data-sec="items"]), .hb-grid[data-tab="passive"] .hb-sec:not([data-sec="passive"]) { display: none; }
.hb-grid:not([data-tab="all"]) .hb-sec { padding-left: 0; border-left: 0; }
.hb .slot { width: 46px; height: 46px; margin: 0; }
.hb .slot .slot-ic { border-radius: 3px; }
.hb .slot-key { top: 1px; left: 3px; right: auto; font-size: 10px; }
.hb .slot-mp { top: 1px; right: 3px; bottom: auto; font-size: 10px; }
.hb .slot-n { bottom: 1px; right: 3px; font-size: 11px; }
.hb .slot-val { top: auto; bottom: 0; left: 0; right: 0; transform: none; margin: 0; text-align: center; font-size: 9.5px; line-height: 12px; border-radius: 0 0 3px 3px; background: linear-gradient(0deg, rgba(0,0,0,.88), rgba(0,0,0,0)); }
.hb .slot-val.none, .hb .slot-val.potion { display: none; }
.hb-glyph { display: grid !important; place-items: center; }
.hb-glyph .hud-ic { width: 68%; height: 68%; }
.tt-ic.hb-glyph { display: inline-grid !important; }
.hb .slot.idle:hover { border-color: #b8a070; }
.hb .slot.hb-pas { cursor: help; }
.hb-tabs { display: flex; justify-content: center; }
.hb-tab { line-height: 1.3; border-bottom: 0; box-shadow: none; }
.hb-tab.on { border-color: var(--hud-gold); }
.hb-msg { max-width: 620px; padding: 8px 4px 14px; font-size: 13px; line-height: 1.45; }
.hb-msg button { margin-left: 6px; padding: 2px 10px; }
.hb-end {
  position: relative; z-index: 2; flex: none; width: 80px; height: 80px; margin: 0 0 14px -14px; padding: 0; border-radius: 50%; display: grid; place-items: center;

  transition: transform .12s, filter .12s;
}
.hb-end:hover:not(.off) { transform: scale(1.05); }
.hb-end .he-ic { width: 48%; height: 48%; }
.hb-end kbd { position: absolute; right: 0; bottom: -2px; padding: 0 4px; font-size: 9px; font-weight: 700; border: 1px solid var(--hud-gold); }
.hb-end.off { cursor: var(--cur); border-color: #0a0806; }
.hb-hint {
  position: absolute; bottom: calc(100% + 18px); left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; padding: 3px 12px;
  font-size: 12.5px; background: rgba(16,12,9,.93); border: 1px solid var(--hud-line); box-shadow: 0 4px 12px rgba(0,0,0,.5);
}
.hb-hint.taunt { color: #ffb0a0; border-color: #a0402a; }
.hb-hint .wb-hint { white-space: normal; }

/* справа вверху: мини-карта в рамке, место, цель сюжета, кнопки камеры */
.hud-tr { position: absolute; top: 10px; right: 10px; z-index: 5; width: 250px; display: flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none; }
.hud-tr > * { pointer-events: auto; }
.hud-mini { display: block; width: 184px; height: 184px; border-radius: 50%; cursor: var(--cur-hand); background: #15120e;
  box-shadow: 0 0 0 2px #0a0806, 0 0 0 5px var(--hud-gold), 0 0 0 7px #120e0a, 0 0 0 8px #4a3c28, 0 8px 20px rgba(0,0,0,.75); margin: 8px 0 4px; }
.hud-loc { max-width: 250px; text-align: center; border: 1px solid var(--hud-line); box-shadow: 0 0 0 1px #000; }
.hud-loc b { display: block; font-family: var(--font-display); text-transform: uppercase; color: var(--hud-gold2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-loc span { display: block; font-size: 11px; line-height: 1.3; }
.hud-loc span:empty { display: none; }
.hud-tr .story-bar { position: static; width: 250px; max-width: none; margin: 0; text-align: left; border-color: var(--hud-line); }
.hud-tr .sb-ch { font-size: 13px; }
.hud-tr .sb-obj { font-size: 12px; line-height: 1.35; }
.hud-tr .sb-place { font-size: 11.5px; }
.hud-tr .sb-npcs { justify-content: flex-start; }
.hud-tr .map-ctl { position: relative; right: auto; bottom: auto; justify-content: center; flex-wrap: wrap; }
.hud-tr .map-ctl button { width: 28px; height: 28px; font-size: 13px; border-radius: 50%; }
.hud-tr .map-hint { position: absolute; top: 100%; right: 0; width: 250px; margin-top: 6px; white-space: normal; }

/* справа внизу: окна и меню */
.hud-menu { position: absolute; right: 10px; bottom: 10px; z-index: 6; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.hm-row { display: flex; flex-wrap: wrap; justify-content: flex-end; max-width: 206px; background: rgba(16,12,9,.88); border: 1px solid #4a3c28; box-shadow: 0 6px 16px rgba(0,0,0,.5); }
.hm-btn { position: relative; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.hm-btn .hud-ic { width: 58%; height: 58%; }
.hm-btn:hover:not(:disabled) { border-color: var(--hud-gold2); }
.hm-btn.active { border-color: var(--hud-gold2); }
.hm-btn .pts-badge { position: absolute; top: -6px; right: -7px; margin: 0; }
.hm-btn:disabled { opacity: .45; }
.hud-menu .local-bar { justify-content: flex-end; }

/* чат и журнал событий — окно слева внизу поверх карты */
.hud-chat { position: absolute; left: 10px; bottom: 10px; z-index: 6; width: 340px; height: 230px; display: flex; flex-direction: column;
  background: rgba(14,11,8,.9); border: 1px solid var(--hud-line); box-shadow: 0 0 0 1px #000, 0 8px 20px rgba(0,0,0,.55); overflow: hidden; }
.hud-chat .chat-slot { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hud-chat .chat-resizer { height: 6px; border-top: 0; background: transparent; }
@media (max-width: 1599px) { .hud-chat { bottom: 146px; } }

/* ───────────── Окна игры по раскладке BG3 (лист героя, таланты, журнал, лавка, соперники, мануал…) ─────────────
   Общая рамка: тёмный камень, двойная золотая кайма, заголовок над золотой чертой, круглая ✕ в углу.
   Рисунок свой (CSS) */
.talent-win { backdrop-filter: blur(2px); }
.tw-box {
  padding: 16px 20px 18px; border: 1px solid #8a6e40;

}
.tw-head {
  position: relative; min-height: 46px; padding: 0 44px 12px 0; margin-bottom: 14px;

}
.tw-head .sheet-name, .tw-head .trade-who b { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; color: #ecd29a; text-shadow: 0 1px 0 #000, 0 0 12px rgba(236,210,154,.25); }
.tw-head .muted, .tw-head small { letter-spacing: .3px; }
/* закрыть — круглая кнопка в правом верхнем углу */
.tw-head > button.ghost:last-child {
  position: absolute; top: -4px; right: -6px; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border-radius: 50%;
  font-size: 15px; 
}
.tw-head > button.ghost:last-child:hover { border-color: #ecd29a; }
.tw-box h4 { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; 
  }
/* полосы прокрутки в окнах — тонкие, под камень */
.tw-box, .tw-box * { scrollbar-width: thin; scrollbar-color: #6b5636 transparent; }

/* ── Лист героя: три колонки, герой в центре ── */
.cw-box { width: min(1280px, 100%); }
/* .cw-box занят и экраном победителей чемпионата (выравнивание по центру) — у листа героя своё */
#char-win .cw-box { max-width: none; text-align: left; }
#char-win .chs-title, #char-win .chs-l .stats, #char-win .chs-l > .hint, #char-win .chs-r h4 { text-align: center; }
.cw-box .tw-head { display: flex; align-items: center; justify-content: center; gap: 14px; }
.chs-title { text-align: center; }
.cw-box .tw-head .spacer { display: none; }
.chs-party { position: absolute; left: 0; top: 0; display: flex; gap: 5px; }
.chs-pt { width: 38px; height: 46px; padding: 0; overflow: hidden; border: 1px solid #4a3f30; background: var(--c); opacity: .7; }
.chs-pt .face-img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.chs-pt.on, .chs-pt:hover:not(:disabled) { opacity: 1; border-color: #ecd29a; background: var(--c); }
.cw-body { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(330px, 1.1fr) minmax(280px, 1.15fr); gap: 18px; align-items: start; }
.cw-col { min-width: 0; max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 4px; }
.cw-col h4:first-child { margin-top: 0; }
.chs-l .stats { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.chs-l .stats div { display: flex; flex-direction: column; align-items: center; font-size: 12px; color: #a8977b;
  box-shadow: inset 0 1px 0 rgba(236,210,154,.06); }
.chs-l .stats div span { font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; }
.chs-l .stats div b { font-family: var(--font-display); font-size: 24px; font-weight: 400; line-height: 1.15; }
.chs-l .stats div.main { border-color: #c9a463; }
.chs-l .stat-secs:not(.compact) { grid-template-columns: 1fr; }
.cw-box .stat-sec { border-radius: 4px; border-color: #3a2e20; background: rgba(0,0,0,.25); }
.chs-mid { display: grid; grid-template-columns: 58px 1fr 58px; gap: 10px; align-items: start; }
.chs-gear { display: flex; flex-direction: column; gap: 8px; padding-top: 30px; }
.chs-slot { position: relative; width: 58px; height: 58px; border-radius: 4px; overflow: hidden; display: grid; place-items: center; cursor: help;
  background: radial-gradient(circle at 50% 40%, #2a2219, #0e0b08 80%); border: 1px solid #6b5636; box-shadow: 0 0 0 1px #000, inset 0 0 8px rgba(0,0,0,.7); }
.chs-slot .item-ic { width: 100%; height: 100%; }
.chs-slot.empty { cursor: default; border-color: #3a2e20; }
.chs-slot.empty span { font-size: 22px; opacity: .22; filter: grayscale(1); }
.chs-hero { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.chs-3d { position: relative; height: min(52vh, 470px); overflow: hidden; display: grid; place-items: center; font-size: 90px;
  border: 1px solid #3a2e20; box-shadow: inset 0 0 40px rgba(0,0,0,.8); }
.chs-3d .hero-3d-cv { position: absolute; inset: 0; width: 100% !important; height: 100% !important; cursor: grab; }
.chs-3d > .face-img { width: 70%; height: auto; border-radius: var(--radius); }
.chs-bars { display: flex; flex-direction: column; gap: 5px; }
.chs-bag { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 6px; }
.chs-cell { position: relative; aspect-ratio: 1; border-radius: 3px; overflow: hidden; display: grid; place-items: center; cursor: help;
  background: radial-gradient(circle at 50% 40%, #241d16, #0e0b08 80%); border: 1px solid #4a3c28; }
.chs-cell.empty { cursor: default; border-color: #2a2219; background: #0e0b08; }
.chs-cell .item-ic { width: 100%; height: 100%; }
.chs-cell b { position: absolute; right: 3px; bottom: 1px; font-size: 11px; color: #fff; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
.cw-box .abr { border-radius: 4px; border-color: #3a2e20; background: rgba(0,0,0,.25); }
.cw-box .cw-tal > div { border-radius: 4px; border-color: #3a2e20; background: rgba(0,0,0,.25); }

/* ── Журнал ── */
.jw-box { width: min(1180px, 100%); }
.jw-box .jw-icon { background: radial-gradient(circle at 50% 35%, #352b21, #15110d 75%); border: 1px solid #6b5636; }
.jw-sec { border-radius: 4px; border-color: #3a2e20; background: linear-gradient(180deg, rgba(36,29,22,.6), rgba(14,11,8,.6)); }
.jw-goal { background: radial-gradient(ellipse at 0% 0%, rgba(201,164,99,.14), transparent 60%), linear-gradient(180deg, rgba(36,29,22,.7), rgba(14,11,8,.7)); }
.jw-col h4 { color: #c9a463; }
.jw-chapter { letter-spacing: .6px; color: #ecd29a; }
.jw-ch { border-left-color: #3a2e20; border-radius: 0 4px 4px 0; background: rgba(0,0,0,.22); }
.jw-ch.cur { border-left-color: #ecd29a; }

/* ── Таланты ── */
.tw-tree { border-radius: 4px; border-color: #3a2e20; background: linear-gradient(180deg, rgba(36,29,22,.55), rgba(12,10,8,.7)); }
.tw-stats { border-radius: 4px; border-color: #3a2e20; background: rgba(0,0,0,.28); }
.tw-stat { border-radius: 4px; border-color: #4a3c28; background: linear-gradient(180deg, #1d1712, #120e0b); }
.tw-stat.main { border-color: #c9a463; }
.tw-pts { border-radius: 4px; border-color: #4a3c28; background: rgba(0,0,0,.3); }
.tw-pts.has { border-color: #c9a463; box-shadow: 0 0 10px rgba(201,164,99,.25); }

/* ── Лавка ── */
.trade-box .tw-head { display: flex; align-items: center; }
.trade-box .am-cats button { border-radius: 4px 4px 0 0; }
.trade-box .shop-card, .trade-box .inv-row { border-radius: 4px; }
.trade-greet { font-size: 15px; color: #c9b48a; }

/* ── Лавка: две сумки рядом (товар и вещи героя), описание выбранной вещи внизу ── */
.trade-box { width: min(1180px, 96vw); }
.trd-bags { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.trd-bag { min-width: 0; border-radius: 4px; border: 1px solid #3a2e20; background: linear-gradient(180deg, rgba(36,29,22,.55), rgba(12,10,8,.75)); }
.trd-bh { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; min-height: 40px; }
.trd-bh .dlg-face { width: 38px; height: 38px; font-size: 20px; flex: none; border-width: 1px; }
.trd-bh > b { font-family: var(--font-display); font-weight: 400; font-size: 15px; letter-spacing: 1.2px; text-transform: uppercase; color: #ecd29a; }
.trd-tabs { display: flex; gap: 2px; }
.trd-tabs button { padding: 2px 10px; font-size: 12px; border-radius: 4px; color: #a8977b; background: #15110d; border: 1px solid #4a3c28; box-shadow: none; }
.trd-tabs button.on { color: #ecd29a; border-color: #c9a463; background: #2a2118; }
.trd-gold { font-size: 14px; color: #e8cf98; }
.trd-gold b { font-size: 18px; }
.trd-cap { display: flex; gap: 14px; flex-wrap: wrap; margin: -2px 0 8px; font-size: 11.5px; color: #a8977b; }
.trd-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.trd-cell { position: relative; aspect-ratio: 1; border-radius: 3px; overflow: hidden; display: grid; place-items: center; cursor: var(--cur-hand);
  background: radial-gradient(circle at 50% 40%, #241d16, #0e0b08 80%); 
  box-shadow: inset 0 0 6px rgba(0,0,0,.7); transition: border-color .12s, box-shadow .12s, transform .08s; }
.trd-cell .item-ic { width: 100%; height: 100%; }
.trd-cell.empty { cursor: default; border-color: #241d16; background: #0e0b08; box-shadow: none; }
.trd-cell.no .item-ic { filter: grayscale(.8) brightness(.55); }
.trd-cell.quest { cursor: help; }
.trd-p { position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 3px; text-align: right; font-size: 11px; 
  background: linear-gradient(0deg, rgba(0,0,0,.88), rgba(0,0,0,0)); text-shadow: 0 1px 2px #000; pointer-events: none; }
.trd-p::before { content: '💰'; font-size: 9px; margin-right: 2px; }
.trd-p.poor { color: #ff8a70; }
.trd-own, .trd-n { position: absolute; top: 2px; right: 3px; font-style: normal; font-size: 11px; font-weight: 700; color: #8af08a; text-shadow: 0 0 3px #000, 0 1px 2px #000; pointer-events: none; }
.trd-n { color: #e8f0ff; }
.trd-detail { display: flex; align-items: flex-start; gap: 14px; min-height: 112px; margin-top: 14px; padding: 12px 14px; 
  border: 1px solid #6b5636; }
.trd-empty { align-self: center; width: 100%; text-align: center; color: #a8977b; font-style: italic; }
.trd-ic { flex: none; width: 74px; height: 74px; overflow: hidden; border: 1px solid var(--tc); box-shadow: 0 0 0 1px #000, 0 0 12px color-mix(in srgb, var(--tc) 40%, transparent); }
.trd-ic .item-ic { width: 100%; height: 100%; }
.trd-main { flex: 1; min-width: 0; }
.trd-main > b { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 400; color: #f3e6c8; }
.trd-main > small { display: block; margin-bottom: 4px; font-size: 12px; }
.trd-desc { font-size: 13.5px; line-height: 1.45; }
.trd-act { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; align-self: center; }
.trd-act .primary { padding: 8px 18px; font-size: 14px; }
.trd-why { font-size: 12.5px; color: #ff9a80; max-width: 220px; text-align: right; }
.trd-price { font-size: 14px; color: #e8cf98; }
@media (max-width: 900px) { .trd-bags { grid-template-columns: 1fr; } .trd-detail { flex-wrap: wrap; } }
