/* Hero gear «paper doll» (rpg/hero-gear.js): site tokens from site.css, 360px first. */
.hg { display: grid; gap: 14px; margin: 0 0 22px; }
.hg-doll { display: grid; grid-template-columns: minmax(0, 1fr) minmax(96px, 132px) minmax(0, 1fr); gap: 8px; align-items: stretch; }
.hg-col { display: grid; gap: 8px; align-content: start; }
.hg-slot {
  display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px; text-align: left;
  background: var(--ink-2); border: 1px solid var(--rule-2); border-radius: 4px; color: var(--bone);
  font: inherit; cursor: pointer; min-width: 0;
}
.hg-slot svg { flex: 0 0 24px; color: var(--light); }
.hg-slot > span { display: grid; min-width: 0; }
.hg-slot small { font: 500 12px/1.2 var(--mono); letter-spacing: .03em; color: var(--bone-faint); }
.hg-slot b { font: 500 14px/1.25 var(--sans); overflow-wrap: break-word; hyphens: auto; }
.hg-slot em { font: 400 12px/1.2 var(--sans); font-style: normal; color: var(--bone-dim); }
.hg-slot.empty { border-style: dashed; background: transparent; }
.hg-slot.empty svg, .hg-slot.empty b { color: var(--bone-faint); }
.hg-slot.ghost { cursor: default; border-style: dashed; background: transparent; }
.hg-slot.ghost b { color: var(--bone-faint); font-weight: 400; }
.hg-slot:not(.ghost):hover { border-color: var(--light); }
.hg-slot:focus-visible, .hg-card:focus-visible, .hg-opt:focus-visible, .hg-go:focus-visible, .hg-x:focus-visible { outline: 2px solid var(--light); outline-offset: 2px; }
.hg-face { margin: 0; display: grid; grid-template-rows: 1fr auto; gap: 6px; min-width: 0; }
.hg-face img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; object-position: 50% 20%; border-radius: 4px; border: 1px solid var(--rule-2); display: block; background: var(--ink-3); }
.hg-face figcaption { font: 400 16px/1.2 var(--disp); color: var(--bone); text-align: center; }
.hg-face figcaption small { display: block; font: 500 12px/1.2 var(--mono); color: var(--bone-faint); letter-spacing: .03em; }

.hg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 1px; margin: 0; background: var(--rule); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.hg-stats div { background: var(--ink-2); padding: 8px 10px; min-width: 0; }
.hg-stats dt { font: 500 12px/1.2 var(--mono); letter-spacing: .03em; color: var(--bone-faint); }
.hg-stats dd { margin: 2px 0 0; font: 500 18px/1.2 var(--sans); color: var(--gold-hi); }
.hg-stats dd small { display: block; font: 400 12px/1.2 var(--sans); color: var(--bone-dim); }

.hg-cards { display: grid; gap: 10px; }
.hg-grp, .hg-off { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.hg-cap { flex: 0 0 100%; font: 500 13px/1.2 var(--mono); letter-spacing: .03em; color: var(--bone-faint); }
.hg-card {
  min-height: 44px; padding: 6px 12px; border-radius: 3px; border: 1px solid var(--rule-2); border-left-width: 3px;
  background: var(--ink-2); color: var(--bone); font: 500 14px/1.2 var(--sans); cursor: pointer; text-align: left;
}
.hg-card:hover { border-color: var(--light); }
.hg-card.a-main { border-left-color: var(--light); }
.hg-card.a-bonus { border-left-color: var(--storm); }
.hg-card.a-react { border-left-color: var(--fallen); }
.hg-card.a-free, .hg-card.a-always { border-left-color: var(--bone-faint); }
.hg-card.off { color: var(--bone-faint); border-style: dashed; border-left-width: 1px; background: transparent; }

.hg-go {
  display: flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 4px;
  border: 1px solid var(--light); color: var(--light); font: 500 15px/1 var(--sans); text-decoration: none;
}
.hg-go:hover { background: var(--light-soft); }
.hg-note { margin: 0; font: 400 13px/1.4 var(--sans); color: var(--bone-faint); }

/* bottom sheet */
.hg-sheet { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; }
.hg-sheet::backdrop { background: rgba(5, 8, 12, .72); }
.hg-sh {
  position: fixed; left: 0; right: 0; bottom: 0; max-height: 82vh; display: grid; grid-template-rows: auto 1fr;
  background: var(--ink-2); border-top: 1px solid var(--rule-2); border-radius: 4px 4px 0 0; color: var(--bone);
  padding-bottom: env(safe-area-inset-bottom);
}
.hg-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--rule); }
.hg-hd b { font: 400 20px/1.2 var(--disp); }
.hg-x { width: 44px; height: 44px; border: 0; background: transparent; color: var(--bone-dim); font-size: 18px; cursor: pointer; border-radius: 4px; }
/* max-content rows: a long list squeezed its rows to the sheet height, and a two-line note ran out of its card (WebKit worst) */
.hg-bd { overflow-y: auto; padding: 12px 16px 18px; display: grid; gap: 8px; align-content: start; grid-auto-rows: max-content; }
.hg-hint { margin: 0; font: 400 14px/1.45 var(--sans); color: var(--bone-dim); }
.hg-txt { margin: 0; font: 400 15px/1.55 var(--sans); color: var(--bone); white-space: pre-line; }
.hg-opt {
  display: grid; gap: 3px; min-height: 48px; padding: 10px 12px; text-align: left; border-radius: 4px; cursor: pointer;
  background: var(--ink); border: 1px solid var(--rule-2); color: var(--bone); font: inherit;
}
.hg-opt b { font: 500 15px/1.25 var(--sans); }
.hg-opt span { font: 400 14px/1.4 var(--sans); color: var(--bone-dim); }
.hg-opt small { font: 400 13px/1.4 var(--sans); color: var(--bone-faint); }
.hg-opt.on { border-color: var(--light); background: var(--light-soft); }
.hg-opt.dead { cursor: default; opacity: .6; border-style: dashed; }
.hg-opt.sm { min-height: 44px; }
.hg-tag { font: 500 12px/1 var(--mono); color: var(--gold); letter-spacing: .03em; margin-left: 6px; }
.hg-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.hg-bd .hg-cap { margin-top: 6px; }

@media (min-width: 720px) {
  .hg-doll { grid-template-columns: minmax(0, 1fr) 180px minmax(0, 1fr); gap: 12px; }
  .hg-face img { min-height: 220px; }
  .hg-sh { left: 50%; right: auto; width: 520px; transform: translateX(-50%); bottom: 24px; border: 1px solid var(--rule-2); border-radius: 4px; max-height: 76vh; padding-bottom: 0; }
}
@media (max-width: 380px) {
  .hg-slot { gap: 6px; padding: 6px; }
  .hg-slot svg { display: none; }
}

/* forged items (kuznya): an item whose properties stay at the table is dimmed */
.hg-slot.table b { color: var(--bone-faint); }
