/* An etched equipment figure, framed by the eight slots. Tier colors label loot,
   not the whole panel; names and stats remain readable without color vision. */
.gear-item { --tier: #c4c0ba; min-width: 0; }
.gear-item[data-tier="uncommon"] { --tier: #80c78a; }
.gear-item[data-tier="rare"] { --tier: #79b6ed; }
.gear-item[data-tier="epic"] { --tier: #c29be7; }
.gear-item[data-tier="legendary"] { --tier: #edb16c; }
.gear-item[data-tier="empty"] { --tier: #a4a09c; }
.gear-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gear-pair .gear-item { padding: 12px 8px; border-top: 2px solid var(--tier); background: var(--night); }
.gear-item .stat-label { margin: 0 0 10px; }
.gear-icon { display: block; width: 36px; height: 36px; margin-bottom: 10px; color: var(--tier); }
.gear-icon svg { width: 100%; height: 100%; }
/* The painted pieces cut from gear.png, one row of five cells. Slots the sheet
   does not cover keep their etched line art. */
.gear-icon[data-art] { width: 64px; height: 64px; background: url("./gear-atlas.png") no-repeat;
  background-size: 500% 100%; image-rendering: pixelated; filter: drop-shadow(0 2px 3px #00000099); }
.gear-icon[data-art="head"] { background-position-x: 0%; }
.gear-icon[data-art="shoulders"] { background-position-x: 25%; }
.gear-icon[data-art="chest"] { background-position-x: 50%; }
.gear-icon[data-art="legs"] { background-position-x: 75%; }
.gear-icon[data-art="feet"] { background-position-x: 100%; }
.gear-name { display: block; font: 500 13px/1.5 var(--display); color: var(--tier); overflow-wrap: anywhere; }
.gear-tier { display: block; color: var(--tier); font-size: 11px; margin-top: 4px; }
.gear-slot-label { margin: 0 0 12px; font: 500 15px/1.4 var(--display); color: var(--ink); }
.gear-stats { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 11px; }
.gear-stats th, .gear-stats td { padding: 9px 3px; border-bottom: 1px solid var(--line); text-align: right; }
.gear-stats th { font-weight: 400; color: var(--muted); }
.gear-stats th:first-child { text-align: left; }
.gear-stats td { white-space: nowrap; }
.gear-gain { color: #80c78a; }
.gear-loss { color: var(--danger); }
.gear-note { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 18px 0; }
dialog[data-mode="character"] { width: min(940px, calc(100% - 28px)); padding: 32px; }
dialog[data-mode="character"] .dialog-copy { max-width: none; }
.equipment-layout { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 28px; }
.equipment-doll { display: grid; grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr); gap: 10px; }
.equipment-figure { grid-area: 1 / 2 / 5 / 3; display: grid; align-items: center; color: #8c7375; }
.equipment-figure svg { width: 100%; height: auto; }
.equipment-slot { border: 1px solid var(--line); border-left: 2px solid var(--tier); padding: 12px; background: #08080980; }
.equipment-slot .gear-icon { float: right; width: 27px; height: 27px; margin: 0 0 6px 6px; }
.equipment-slot .gear-icon[data-art] { width: 46px; height: 46px; }
.equipment-slot .gear-name { font-size: 11px; }
.equipment-slot .gear-tier { margin-bottom: 6px; }
.equipment-bonus { display: block; color: var(--silver); font-size: 10px; line-height: 1.6; }
.equipment-totals { border-left: 1px solid var(--line); padding-left: 24px; }
.equipment-totals .gear-note { margin: 0 0 20px; }
.equipment-totals dl { display: grid; grid-template-columns: 1fr auto; gap: 15px 10px; font-size: 12px; }
.equipment-totals dt { color: var(--muted); }
.equipment-totals dd { margin: 0; text-align: right; }
#character-close, #pause-character { width: 100%; }
#pause-character { margin-top: 12px; }
@media (max-width: 680px) {
  dialog[data-mode="character"] { padding: 24px 18px; }
  .equipment-layout { grid-template-columns: 1fr; gap: 22px; }
  .equipment-doll { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 7px; }
  .equipment-slot { padding: 9px; }
  .equipment-slot .gear-icon { width: 22px; height: 22px; }
  .equipment-slot .gear-icon[data-art] { width: 34px; height: 34px; }
  .gear-icon[data-art] { width: 48px; height: 48px; }
  .equipment-totals { border-left: 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
  .gear-stats { font-size: 10px; }
}
