/* Fire Emblem Awakening weapon & item browser. Builds on planner.css (windows, pills) and classes.css (two-column
   layout, sticky detail, facts, search). Item icons are 16px cells of the game's atlas (icons.webp, 256px wide),
   scaled with nearest-neighbour so the pixel art stays sharp. */
.fei { width: min(1180px, 100% - 32px); margin: 22px auto 0; color: var(--fe-text); }
.fei-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.fei-filters .fep-pill { padding: 4px 12px; font-size: .84rem; }
.fei-search { flex: 1 1 220px; width: auto; margin: 0; }
.fei .fec-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

.fei-icon { display: inline-block; flex: none; width: var(--is, 24px); height: var(--is, 24px); background-repeat: no-repeat; background-size: calc(var(--is, 24px) * 16) auto; background-position: calc(var(--is, 24px) * var(--x) * -1) calc(var(--is, 24px) * var(--y) * -1); image-rendering: pixelated; }

.fei-scroll { max-height: 70vh; overflow: auto; border-radius: 5px; }
.fei-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.fei-table th { position: sticky; top: 0; z-index: 1; padding: 0; background: #2b2529; text-align: left; }
.fei-sort { width: 100%; padding: 6px 8px; border: 0; border-bottom: 1px solid var(--fe-gold-dark); background: none; color: var(--fe-gold-light); font: inherit; font-family: var(--fe-serif); font-size: .8rem; text-align: left; cursor: pointer; white-space: nowrap; }
.fei-sort:hover { color: #fff; }
.fei-table td { padding: 3px 8px; border-bottom: 1px solid rgba(210, 172, 94, .12); white-space: nowrap; }
.fei-table tbody tr { cursor: pointer; }
.fei-table tbody tr:hover { background: rgba(210, 172, 94, .08); }
.fei-table tbody tr[aria-current] { background: rgba(90, 168, 240, .18); box-shadow: inset 3px 0 0 var(--fe-blue-hi); }
.fei-name { display: inline-flex; align-items: center; gap: 8px; padding: 2px 0; border: 0; background: none; color: var(--fe-text); font: inherit; font-family: var(--fe-serif); text-align: left; cursor: pointer; }
.fei-name:hover span { color: var(--fe-gold-light); }

.fei-head { display: flex; gap: 14px; align-items: flex-start; }
.fei-head .fei-icon { border: 1px solid var(--fe-gold-dark); border-radius: 6px; background-color: #121014; }

.fei-note { margin-top: 8px; padding: 6px 10px; border-left: 3px solid var(--fe-gold); background: rgba(210, 172, 94, .08); font-style: normal; }
.fei button:focus-visible, .fei input:focus-visible { outline: 2px solid var(--fe-gold-light); outline-offset: 2px; }

@media (max-width: 860px) {
  .fei .fec-main { grid-template-columns: minmax(0, 1fr); } /* lets the wide table scroll inside its box */
  .fei-scroll { max-height: 60vh; }
}
