/* Collection and Supply: fluid cards, readable detail, and comfortable controls.
   Shared page geometry and campaign styles live in layout-ui.css. */
#arsenalView .collection-summary { gap: 20px; flex-wrap: wrap; }
#arsenalView .collection-summary b { font-size: 38px; }
#arsenalView .collection-summary small { font-size: var(--ui-meta, 12px); color: var(--ui-muted, #b7cedf); letter-spacing: .05em; }
#arsenalView .loadout-builder { padding: 24px; }
#arsenalView .loadout-builder-heading { gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
#arsenalView .loadout-builder-heading h2 { font-size: 30px; max-width: none; }
#arsenalView .loadout-builder-heading .eyebrow { display: block; font-size: 12px; }
#arsenalView .loadout-builder-heading h2 > span { font-size: 14px; padding: 6px 10px; }
#arsenalView .loadout-builder-heading .text-button { min-height: 44px; padding: 10px 0; font-size: 13px; }
#arsenalView .loadout-builder > p { margin-top: 18px; font-size: 14px; line-height: 1.6; color: var(--ui-muted, #b7cedf); }
#arsenalView .loadout-slots { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
#arsenalView .equipped-slot, #arsenalView .empty-slot { min-width: 0; min-height: 184px; }
#arsenalView .slot-inspect { flex-direction: column; justify-content: center; gap: 8px; padding: 30px 12px 16px; text-align: center; }
#arsenalView .slot-inspect > img { width: 100%; height: 104px; max-width: 150px; }
#arsenalView .slot-inspect > span { min-width: 0; }
#arsenalView .slot-inspect b { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
#arsenalView .slot-inspect small { font-size: 12px; line-height: 1.5; color: var(--ui-muted, #b7cedf); }
#arsenalView .slot-remove { width: 44px; height: 44px; right: 4px; top: 4px; font-size: 24px; line-height: 1; color: #d7e9f6; }
#arsenalView .slot-number { top: 12px; left: 12px; font-size: 12px; color: #a8c6dc; }
#arsenalView .empty-slot small { font-size: 14px; line-height: 1.5; color: var(--ui-muted, #b7cedf); }
#arsenalView .empty-slot b { font-size: 12px; }

#arsenalView .supply-banner { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 16px 24px; padding: 24px; margin: 24px 0; }
#arsenalView .chest-art { width: 140px; height: 140px; margin: 0; }
#arsenalView .supply-copy { min-width: 0; }
#arsenalView .supply-copy .eyebrow { font-size: 12px; }
#arsenalView .supply-copy h2 { font-size: 34px; line-height: 1.15; }
#arsenalView .supply-copy p { font-size: 16px; line-height: 1.6; max-width: 65ch; color: var(--ui-muted, #b7cedf); }
#arsenalView .supply-banner > .primary-button { min-height: 48px; min-width: 196px; padding: 14px 20px; font-size: 14px; }
#arsenalView .chest-odds { position: relative; grid-column: 2 / -1; justify-self: end; align-self: center; bottom: auto; right: auto; transform: none; font-size: 13px; color: #c8dce9; letter-spacing: .03em; }
#arsenalView .chest-odds summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
#arsenalView .chest-odds[open] > div { top: calc(100% + 8px); right: 0; transform: none; width: min(320px, calc(100vw - 64px)); min-width: 0; padding: 20px; font-size: 14px; line-height: 1.6; }
#arsenalView .chest-odds .odd-item { gap: 18px; padding: 5px 0; }
#arsenalView .chest-odds .odd-item, #arsenalView .chest-odds .odd-item > * { font-size: 14px; }
#arsenalView .is-locked .unit-rarity { color: var(--ui-muted, #b7cedf); }

#arsenalView .arsenal-toolbar { gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
#arsenalView .tower-search { max-width: none; flex: 1 1 340px; min-height: 52px; padding: 10px 16px; }
#arsenalView .tower-search input { font-size: 16px; line-height: 1.5; }
#arsenalView .tower-search input::placeholder { color: #a8c0d3; }
#arsenalView .tower-search:focus-within { outline: 2px solid #62dcff; outline-offset: 3px; }
#arsenalView .ownership-filters { gap: 8px; flex-wrap: wrap; margin-left: 0; }
#arsenalView .ownership-filters > button { min-height: 44px; padding: 10px 14px; font-size: 14px; color: var(--ui-muted, #b7cedf); }
#arsenalView .ownership-filters > button.active { color: #ffe5a1; border-color: #a68a46; background: #3b3525; }
#arsenalView .role-filters { flex-wrap: wrap; overflow: visible; gap: 8px; padding-bottom: 20px; }
#arsenalView .role-filters button { min-height: 44px; padding: 10px 14px; font-size: 16px; color: var(--ui-muted, #b7cedf); }
#arsenalView .role-filters button > span { font-size: 13px; }
#arsenalView .role-filters button.active { color: #c5f3ef; border-color: #3c8194; background: #153e50; }
#arsenalView .roster-toolbar { gap: 16px; flex-wrap: wrap; padding: 18px 0; font-size: 14px; color: var(--ui-muted, #b7cedf); }
#arsenalView .roster-toolbar label { display: flex; align-items: center; gap: 8px; }
#arsenalView .roster-toolbar select { min-height: 44px; font-size: 16px; padding: 8px; }
#arsenalView .arsenal-workspace { grid-template-columns: minmax(0, 1fr) clamp(340px, 23vw, 400px); gap: var(--ui-panel-gap, 20px); }
#arsenalView .arsenal-library { min-width: 0; }
#arsenalView .collection-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 20px; }
#arsenalView .unit-card { min-width: 0; display: flex; flex-direction: column; }
#arsenalView .unit-inspect { flex: 1; }
#arsenalView .unit-card-top { padding: 16px 16px 0; gap: 12px; }
#arsenalView .unit-family, #arsenalView .unit-index, #arsenalView .unit-level { font-size: 12px; color: var(--ui-muted, #b7cedf); }
#arsenalView .unit-portrait { height: clamp(180px, 13vw, 240px); margin-top: 0; }
#arsenalView .unit-portrait img { width: 100%; height: 100%; object-fit: contain; }
#arsenalView .unit-level { left: 16px; padding: 5px 8px; }
#arsenalView .unit-card-copy { padding: 16px; }
#arsenalView .unit-rarity { font-size: 12px; letter-spacing: .04em; line-height: 1.5; }
#arsenalView .unit-card h3 { font-size: 30px; line-height: 1.15; overflow-wrap: anywhere; }
#arsenalView .unit-card-copy > p { font-size: 15px; line-height: 1.5; min-height: 0; color: var(--ui-muted, #b7cedf); }
#arsenalView .unit-card-bottom { gap: 12px; flex-wrap: wrap; margin-top: 18px; }
#arsenalView .unit-card-bottom > span:first-child { font-size: 16px; }
#arsenalView .unit-card-bottom small, #arsenalView .unit-card-bottom > span:last-child { font-size: 12px; color: var(--ui-muted, #b7cedf); }
#arsenalView .fusion-ready { font-size: 12px; line-height: 1.4; padding: 4px 6px; }
#arsenalView .equip-button { width: 100%; min-height: 46px; padding: 12px; font-size: 13px; line-height: 1.4; }
#arsenalView .equip-button:disabled { color: #b5c8d8; opacity: .7; }

#arsenalView .tower-inspector { top: 100px; max-height: calc(100dvh - 120px); overflow: auto; }
#arsenalView .inspector-heading { padding: 20px; gap: 12px; font-size: 12px; color: var(--ui-muted, #b7cedf); }
#arsenalView .inspector-model { height: 260px; }
#arsenalView .inspector-intro { padding: 0 22px 20px; }
#arsenalView .inspector-intro h2 { font-size: 38px; line-height: 1.1; overflow-wrap: anywhere; }
#arsenalView .role-pill { font-size: 12px; line-height: 1.5; padding: 6px 9px; }
#arsenalView .inspector-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; padding: 20px; }
#arsenalView .inspector-stats small { font-size: 12px; line-height: 1.4; color: var(--ui-muted, #b7cedf); }
#arsenalView .inspector-stats b { font-size: 29px; line-height: 1.15; }
#arsenalView .inspector-stats em { font-size: 14px; color: #bed4e3; }
#arsenalView .ability-note { margin: 20px; padding: 16px; gap: 12px; }
#arsenalView .ability-note b { font-size: 16px; }
#arsenalView .ability-note p { font-size: 15px; line-height: 1.6; color: var(--ui-muted, #b7cedf); }
#arsenalView .permanent-upgrade { padding: 4px 20px 20px; }
#arsenalView .permanent-upgrade > div:first-child { font-size: 16px; gap: 12px; }
#arsenalView .permanent-upgrade > div:first-child > span { font-size: 26px; }
#arsenalView .permanent-upgrade small { font-size: 14px; color: var(--ui-muted, #b7cedf); }
#arsenalView .permanent-upgrade > p { font-size: 14px; line-height: 1.5; color: var(--ui-muted, #b7cedf); }
#arsenalView .permanent-upgrade .primary-button, #arsenalView .inspector-equip { min-height: 48px; padding: 12px 14px; font-size: 13px; line-height: 1.5; }
#arsenalView .fusion-section { padding: 20px; }
#arsenalView .detail-section-title { gap: 12px; flex-wrap: wrap; }
#arsenalView .detail-section-title b { font-size: 16px; }
#arsenalView .detail-section-title > span { font-size: 12px; color: var(--ui-muted, #b7cedf); }
#arsenalView .fusion-row { min-height: 54px; gap: 10px; font-size: 14px; }
#arsenalView .fusion-row > b { font-size: 14px; }
#arsenalView .fusion-row > button { min-width: 82px; min-height: 44px; padding: 10px; font-size: 12px; }
#arsenalView .fusion-row > button:disabled { color: #aac1d3; opacity: .65; }
#arsenalView .locked-explainer { margin: 20px; padding: 20px; }
#arsenalView .locked-explainer > b { font-size: 16px; }
#arsenalView .locked-explainer p { font-size: 15px; line-height: 1.6; color: var(--ui-muted, #b7cedf); }
#arsenalView .rarity-reference { margin-top: 32px; padding: 24px 0; }
#arsenalView .rarity-reference > span { font-size: 12px; color: var(--ui-muted, #b7cedf); }
#arsenalView .rarity-ladder { gap: 10px; }
#arsenalView .rarity-ladder > span { font-size: 13px; padding: 10px 12px; }
#arsenalView .rarity-reference > p { font-size: 15px; line-height: 1.6; color: var(--ui-muted, #b7cedf); }

#earnView .earn-grid { grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr); gap: var(--ui-panel-gap, 20px); align-items: stretch; }
#earnView .faucet-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(24px, 3vw, 48px); }
#earnView .faucet-card > .eyebrow { font-size: 12px; }
#earnView .faucet-coin { width: clamp(130px, 12vw, 210px); height: clamp(130px, 12vw, 210px); margin: 20px 0 12px; }
#earnView .faucet-card h2 { font-size: clamp(54px, 5vw, 78px); }
#earnView .faucet-card h2 small { font-size: 24px; }
#earnView .faucet-card > p { font-size: 16px; line-height: 1.7; color: var(--ui-muted, #b7cedf); }
#earnView .faucet-card > .primary-button { min-height: 52px; min-width: min(100%, 260px); font-size: 16px; padding: 14px 24px; }
#earnView .faucet-card > small { font-size: 13px; line-height: 1.6; color: #bfd8c8; }
#earnView .partner-grid { gap: 16px; }
#earnView .partner-card { min-width: 0; gap: 20px; padding: 28px; flex-wrap: wrap; }
#earnView .partner-icon { width: 64px; height: 64px; }
#earnView .partner-icon .resource-art { width: 64px; height: 64px; }
#earnView .partner-card > div { flex: 1 1 220px; min-width: 0; }
#earnView .partner-card h3 { font-size: 30px; line-height: 1.2; }
#earnView .partner-card p { font-size: 16px; line-height: 1.6; color: var(--ui-muted, #b7cedf); }
#earnView .partner-card .status-pill { margin: 0; max-width: none; padding: 7px 10px; font-size: 12px; line-height: 1.5; }
#earnView .earned-pool-balance { padding: 28px; gap: 28px; flex-wrap: wrap; }
#earnView .earned-pool-balance > div { flex: 1 1 400px; min-width: 0; }
#earnView .earned-pool-balance small { font-size: 12px; line-height: 1.5; color: var(--ui-muted, #b7cedf); }
#earnView .earned-pool-balance b { font-size: 42px; }
#earnView .earned-pool-balance p { font-size: 16px; line-height: 1.7; max-width: 75ch; color: var(--ui-muted, #b7cedf); }
#earnView .earned-pool-balance > button { min-height: 48px; font-size: 12px; padding: 12px 16px; white-space: normal; }
#earnView .reward-design { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 72px); padding: clamp(24px, 3vw, 44px); }
#earnView .reward-design h2 { font-size: 44px; line-height: 1.1; }
#earnView .reward-design p { font-size: 16px; line-height: 1.7; max-width: 70ch; color: var(--ui-muted, #b7cedf); }
#earnView .reward-design .status-pill { font-size: 12px; padding: 7px 10px; }
#earnView .funding-flow { gap: 24px; }
#earnView .funding-flow > div { gap: 20px; }
#earnView .funding-flow > div > b { flex: 0 0 46px; padding: 10px; font-size: 27px; text-align: center; }
#earnView .funding-flow strong { font-size: 18px; line-height: 1.4; }
#earnView .funding-flow span { font-size: 16px; line-height: 1.6; color: var(--ui-muted, #b7cedf); }
#earnView .funding-flow > small { font-size: 14px; line-height: 1.6; color: var(--ui-muted, #b7cedf); }

@media (max-width: 1500px) {
  #arsenalView .loadout-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  #arsenalView .arsenal-workspace { grid-template-columns: minmax(0, 1fr); }
  #arsenalView .tower-inspector.mobile-open { display: block; position: fixed; top: 92px; right: 16px; bottom: 20px; width: min(420px, calc(100% - 32px)); max-height: none; overflow-y: auto; }
  #arsenalView .inspector-dismiss { width: 44px; height: 44px; top: 8px; right: 8px; font-size: 28px; }
  #arsenalView .inspector-heading { padding-right: 64px; }
  #arsenalView .supply-banner { grid-template-columns: 110px minmax(0, 1fr); }
  #arsenalView .chest-art { width: 110px; height: 110px; }
  #arsenalView .supply-banner > .primary-button { grid-column: 2; justify-self: start; }
  #arsenalView .chest-odds { grid-column: 1 / -1; }
  #earnView .earn-grid, #earnView .reward-design { grid-template-columns: minmax(0, 1fr); }
  #earnView .partner-card > div { flex-basis: 280px; }
}

@media (max-width: 700px) {
  #arsenalView .loadout-builder, #arsenalView .supply-banner { padding: 20px; }
  #arsenalView .loadout-builder-heading h2 { font-size: 28px; }
  #arsenalView .loadout-builder-heading .text-button { width: 100%; text-align: left; }
  #arsenalView .collection-summary { gap: 16px; }
  #arsenalView .ownership-filters { width: 100%; }
  #arsenalView .ownership-filters > button { flex: 1 1 140px; white-space: normal; }
  #arsenalView .tower-search { flex-basis: 100%; }
  #arsenalView .tower-inspector.mobile-open { top: 80px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  #arsenalView .inspector-model { height: 230px; }
  #arsenalView .unit-portrait { height: 210px; }
  #arsenalView .supply-copy h2 { font-size: 30px; }
  #arsenalView .supply-copy p { font-size: 15px; }
  #earnView .partner-card, #earnView .earned-pool-balance { padding: 22px; }
  #earnView .partner-card { gap: 14px; }
  #earnView .partner-card > div { flex-basis: 180px; }
  #earnView .partner-card .status-pill { margin-left: 78px; }
  #earnView .earned-pool-balance > button { width: 100%; }
  #earnView .reward-design h2 { font-size: 38px; }
}

@media (max-width: 520px) {
  #arsenalView .loadout-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #arsenalView .collection-grid { grid-template-columns: minmax(0, 1fr); }
  #arsenalView .unit-portrait { height: 240px; }
  #arsenalView .unit-card h3 { font-size: 32px; }
  #arsenalView .role-filters button { flex: 1 1 130px; justify-content: center; }
  #arsenalView .supply-banner { grid-template-columns: 84px minmax(0, 1fr); gap: 16px; }
  #arsenalView .chest-art { width: 84px; height: 100px; }
  #arsenalView .supply-banner > .primary-button { grid-column: 1 / -1; justify-self: stretch; width: 100%; min-width: 0; margin: 0; }
  #arsenalView .chest-odds { justify-self: stretch; }
  #arsenalView .chest-odds[open] > div { left: 0; right: auto; width: 100%; }
  #arsenalView .inspector-intro h2 { font-size: 34px; }
  #earnView .partner-card > div { flex-basis: calc(100% - 78px); }
  #earnView .partner-card .status-pill { margin-left: 0; }
  #earnView .faucet-card h2 { font-size: 58px; }
  #earnView .funding-flow > div { gap: 14px; }
}
