/* Armario RPG: flujo natural, navegación accesible y materiales oscuros. */
/* La ficha completa queda por encima del HUD (1150) y del objetivo activo. */
html .character-status { z-index: 1250; }
html .status-book.gear-wide {
  --gear-surface: #181a18;
  --gear-inset: #101210;
  --gear-edge: #514b3d;
  --gear-text: #eee5d3;
  --gear-muted: #bdb5a5;
  --gear-accent: #c3a36b;
  width: min(1360px, calc(100vw - 48px));
  height: calc(100dvh - 48px);
  max-height: 960px;
  border-color: #66583c;
  background: #141614;
  box-shadow: 0 24px 90px #000b, inset 0 1px #fff1;
}
html .status-book.gear-wide .status-right-page { padding: 24px; }
html .status-book.gear-wide .page-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 52px 12px 0;
  background: #141614 !important;
  border-bottom: 1px solid #514b3d;
  backdrop-filter: none;
}
html .status-book.gear-wide .page-btn {
  min-width: 0;
  min-height: 44px;
  padding: 10px 8px;
  background: transparent !important;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #bdb5a5;
  box-shadow: none;
  font-size: 14px;
}
html .status-book.gear-wide .page-btn.active { color: #eee5d3; border-bottom-color: #c3a36b; }
html .status-book.gear-wide .page-btn:focus-visible { outline: 2px solid #dfbd7e; outline-offset: -3px; }
html .status-book.gear-wide .status-section-scroll { overflow: auto; padding: 16px 0 0; }
html .status-book.gear-wide .gear-panel {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  overflow: visible;
  grid-auto-rows: min-content;
  align-content: start;
  gap: 20px;
}
html .status-book.gear-wide .gear-column { flex: none; overflow: visible; }
html .status-book.gear-wide .gear-column,
html .status-book.gear-wide .gear-item-detail {
  background: #181a18;
  border-color: #3d3e35;
  border-radius: 4px;
  box-shadow: none;
}
html .status-book.gear-wide .gear-column-title { font-weight: 500; font-size: 20px; letter-spacing: .055em; }
html .status-book.gear-wide .gear-jump-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  color: #dfbd7e;
  font: 13px var(--codex-font-body, system-ui, sans-serif);
  letter-spacing: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
html .status-book.gear-wide .gear-jump-link:focus-visible { outline: 2px solid #dfbd7e; outline-offset: 2px; }
html .status-book.gear-wide .gear-doll-grid { align-items: stretch; grid-template-columns: 78px minmax(0, 1fr) 78px; }
html .status-book.gear-wide .gear-slot-column { align-content: start; gap: 8px; }
html .status-book.gear-wide .gear-slot {
  min-height: 82px;
  height: auto;
  border-color: #514b3d !important;
  padding: 5px 4px;
}
html .status-book.gear-wide .gear-inspect-slot { min-height: 60px; }
html .status-book.gear-wide .gear-slot-name { font-size: 11px; line-height: 1.3; }
html .status-book.gear-wide .gear-slot-glyph { color: #c3a36b; }
html .status-book.gear-wide .gear-doll-figure { min-height: 340px; border-color: #3d3e35; }
html .status-book.gear-wide .gear-doll-figure .avatar-preview-canvas {
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 2 / 3;
  background: transparent !important;
  box-shadow: none;
  border: 0;
}
html .status-book.gear-wide .gear-bag-filters { flex: none; gap: 6px; margin-bottom: 12px; }
html .status-book.gear-wide .gear-filter { min-height: 44px; padding: 8px 10px; font-size: 13px; }
html .status-book.gear-wide .gear-grid {
  flex: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: min-content;
  align-content: start;
  gap: 6px;
  height: auto;
  min-height: 0;
}
html .status-book.gear-wide .gear-grid .gear-cell { min-height: 88px; aspect-ratio: 1; }
html .status-book.gear-wide .gear-grid .gear-cell.empty:nth-child(n+16) { display: none; }
html .status-book.gear-wide .gear-item-label { font-size: 12px; font-weight: 400; line-height: 1.3; }
html .status-book.gear-wide .gear-item-detail { border-left: 2px solid #9c8051; }
html .status-book.gear-wide .gear-item-detail p { color: #c4bdad; line-height: 1.55; }
html .status-book.gear-wide .gear-item-detail h3 { margin: 0 0 8px; font-weight: 500; }
html .status-book.gear-wide .gear-item-detail button { min-width: 140px; }
html .status-book.gear-wide .gear-hint { font-size: 13px; line-height: 1.5; margin: 14px 0 0; }
@media (max-width: 900px), (orientation: portrait) {
  html .status-book.gear-wide { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: none; }
  html .status-book.gear-wide .status-right-page { padding: 12px; }
  html .status-book.gear-wide .page-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; padding-right: 48px; }
  html .status-book.gear-wide .page-btn { font-size: 13px; }
  html .status-book.gear-wide .gear-panel { display: flex; flex: 0 0 auto; min-height: 0; height: auto; overflow: visible; gap: 14px; }
  html .status-book.gear-wide .gear-column,
  html .status-book.gear-wide .gear-item-detail { flex: none; padding: 10px; }
  html .status-book.gear-wide .gear-doll-grid { grid-template-columns: 62px minmax(0, 1fr) 62px; gap: 6px; }
  html .status-book.gear-wide .gear-slot { min-height: 82px; }
  html .status-book.gear-wide .gear-doll-figure { min-height: 300px; }
  html .status-book.gear-wide .gear-doll-figure .avatar-preview-canvas { max-width: 240px; }
  html .status-book.gear-wide .gear-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html .status-book.gear-wide .gear-grid .gear-cell { min-height: 96px; }
  html .status-book.gear-wide .gear-grid .gear-cell.empty { display: none; }
}
@media (max-width: 360px) {
  html .status-book.gear-wide .gear-doll-grid { grid-template-columns: 58px minmax(0, 1fr) 58px; gap: 4px; }
  html .status-book.gear-wide .gear-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  html .status-book.gear-wide *, html .status-book.gear-wide *::before, html .status-book.gear-wide *::after { animation: none !important; transition: none !important; }
}

/* Comparación en el inspector; hereda los materiales del armario vigente. */
html .status-book.gear-wide .gear-item-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-block: 16px;
}
html .status-book.gear-wide .gear-compare-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--gear-edge);
  border-radius: 4px;
  background: var(--gear-inset);
}
html .status-book.gear-wide .gear-compare-choice { border-color: var(--gear-accent); }
html .status-book.gear-wide .gear-compare-label {
  color: var(--gear-muted);
  font-size: .8125rem;
  line-height: 1.4;
}
html .status-book.gear-wide .gear-compare-card strong {
  color: var(--gear-text);
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.4;
}
html .status-book.gear-wide .gear-compare-card .gear-item-visual { width: 80px; height: 80px; }
html .status-book.gear-wide .gear-swap-note {
  padding-inline-start: 12px;
  border-inline-start: 2px solid var(--gear-accent);
}
@media (max-width: 360px) {
  html .status-book.gear-wide .gear-item-comparison { grid-template-columns: minmax(0, 1fr); }
}
