[hidden] { display: none !important; }
.loadout-view { display: grid; gap: 1rem; }
.loadout-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1.4rem 0 .3rem; }
.loadout-heading h1 { margin: .35rem 0 .65rem; font-size: clamp(2.5rem, 6vw, 5rem); line-height: .95; letter-spacing: -.06em; }
.loadout-heading .hero-text { margin-bottom: 0; }
.loadout-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; }
.loadout-progress { color: var(--muted); }
.loadout-progress strong { color: var(--text); }
.loadout-progress span { margin-left: .25rem; color: var(--green); font-size: .72rem; font-weight: 900; letter-spacing: .1em; }
.loadout-status { min-height: 1.2rem; margin: 0; color: var(--muted); font-size: .82rem; }
.loadout-status[data-tone="success"] { color: var(--green); }
.loadout-status[data-tone="warning"] { color: #facc15; }
.loadout-status[data-tone="error"] { color: var(--danger); }
.loadout-empty { display: grid; gap: .35rem; padding: 1.2rem; color: var(--muted); }
.loadout-empty strong { color: var(--text); }
.loadout-content { display: grid; gap: 1rem; }
.loadout-roster-panel, .loadout-pool-panel { padding: 1rem; }
.loadout-section-heading { display: flex; align-items: end; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; }
.loadout-section-heading h2 { margin: .3rem 0 0; letter-spacing: -.03em; }
.loadout-section-heading small { color: var(--muted); }
.loadout-slot-grid { display: grid; gap: .7rem; }
.loadout-slot-grid.starters { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.loadout-slot-grid.reserves { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: .7rem; }
.loadout-slot { position: relative; min-width: 0; min-height: 8.4rem; display: grid; grid-template-columns: 4.8rem minmax(0, 1fr); align-items: center; gap: .7rem; overflow: hidden; padding: .6rem; border: 1px solid var(--border); border-radius: 1rem; background: rgba(5,8,14,.72); }
.loadout-slot.is-empty { grid-template-columns: auto 1fr; border-style: dashed; color: var(--muted); }
.loadout-slot.is-empty strong, .loadout-slot.is-empty small { display: block; }
.loadout-slot.is-empty small { margin-top: .18rem; color: var(--muted); }
.loadout-slot img { width: 4.8rem; height: 6.2rem; border-radius: .72rem; object-fit: cover; background: #05080e; }
.slot-label { position: absolute; z-index: 2; top: .45rem; left: .45rem; min-width: 1.9rem; padding: .22rem .38rem; border-radius: .5rem; color: #071018; background: var(--cyan); font-size: .65rem; font-weight: 900; text-align: center; }
.slot-copy { min-width: 0; display: grid; gap: .2rem; }
.slot-copy strong, .slot-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-copy small { color: var(--muted); font-size: .68rem; }
.slot-remove { position: absolute; top: .45rem; right: .45rem; width: 1.7rem; height: 1.7rem; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; background: rgba(5,8,14,.86); }
.loadout-slot.rarity-rare { border-color: rgba(96,165,250,.36); }
.loadout-slot.rarity-epic { border-color: rgba(192,132,252,.42); }
.loadout-slot.rarity-legend { border-color: rgba(250,204,21,.48); }
.loadout-pool-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; }
.loadout-pool-toolbar input { width: min(100%, 32rem); border: 1px solid var(--border); border-radius: .8rem; padding: .75rem .9rem; outline: none; background: rgba(2,6,23,.72); color: var(--text); }
.loadout-pool-toolbar input:focus { border-color: rgba(57,213,255,.7); box-shadow: 0 0 0 3px rgba(57,213,255,.09); }
.loadout-pool-toolbar small { color: var(--muted); }
.loadout-pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; max-height: 42rem; overflow: auto; padding-right: .2rem; }
.loadout-pool-card { min-width: 0; display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: .7rem; overflow: hidden; padding: .55rem; border: 1px solid var(--border); border-radius: .9rem; background: rgba(5,8,14,.72); }
.loadout-pool-card img { width: 5rem; height: 6.8rem; border-radius: .65rem; object-fit: cover; background: #05080e; }
.loadout-pool-card.is-selected { border-color: rgba(89,240,168,.62); background: rgba(89,240,168,.055); }
.loadout-pool-card.is-agent-blocked { opacity: .55; }
.loadout-pool-card.rarity-rare { border-color: rgba(96,165,250,.3); }
.loadout-pool-card.rarity-epic { border-color: rgba(192,132,252,.34); }
.loadout-pool-card.rarity-legend { border-color: rgba(250,204,21,.36); }
.loadout-pool-copy { min-width: 0; display: grid; align-content: start; gap: .2rem; }
.loadout-pool-copy > strong, .loadout-pool-copy > small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loadout-pool-copy > small { color: var(--muted); font-size: .68rem; }
.loadout-pool-top { display: flex; justify-content: space-between; gap: .5rem; color: var(--muted); font-size: .61rem; font-weight: 800; letter-spacing: .06em; }
.loadout-pool-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin-top: .35rem; }
.loadout-pool-actions button { border: 1px solid var(--border); border-radius: .55rem; padding: .42rem .48rem; cursor: pointer; background: rgba(15,23,42,.82); color: #dbeafe; font-size: .68rem; font-weight: 800; }
.loadout-pool-actions button:hover:not(:disabled) { border-color: rgba(57,213,255,.5); }
.loadout-pool-actions button:disabled { cursor: not-allowed; opacity: .38; }
.loadout-no-results { grid-column: 1 / -1; padding: 1rem; color: var(--muted); }
@media (max-width: 1050px) {
  .loadout-slot-grid.starters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loadout-slot-grid.reserves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .loadout-heading, .loadout-summary, .loadout-pool-toolbar { align-items: stretch; flex-direction: column; }
  .loadout-slot-grid.starters, .loadout-slot-grid.reserves { grid-template-columns: 1fr; }
  .loadout-pool { grid-template-columns: 1fr; max-height: none; }
}
