#mercenaryRoster .mercenary-entry[hidden] { display:none; }
.mercenary-tabs { display:flex; gap:4px; border-bottom:1px solid #647586; margin:20px 0 16px; }
.mercenary-tabs [role="tab"] { flex:1; min-width:0; min-height:48px; padding:10px 6px; border:0; border-bottom:3px solid transparent; border-radius:0; background:transparent; color:#e2dac9; font:700 max(var(--desktop-text-min, 0px), calc(16px * var(--desktop-text-scale, 1)))/1.25 'Barlow Condensed',sans-serif; overflow-wrap:anywhere; cursor:pointer; }
.mercenary-tabs [aria-selected="true"] { color:#ffe1a0; border-bottom-color:#e8bc64; background:#263849; }
.mercenary-tabs button:focus-visible, #mercenaryPicker button:focus-visible, [data-ally-change]:focus-visible { outline:3px solid #f2cd6c; outline-offset:2px; }
[data-ally-change] { display:none; }
#mercenaryPicker { box-sizing:border-box; width:min(480px,calc(100vw - 24px)); max-height:calc(100dvh - 32px); padding:20px; overflow-y:auto; border:1px solid #b6a16e; border-radius:12px; background:#192a3b; color:#fff0ce; box-shadow:0 16px 48px #0008; }
#mercenaryPicker::backdrop { background:#060d17bd; }
#mercenaryPicker header { display:flex; justify-content:space-between; align-items:center; gap:12px; }
#mercenaryPicker h3 { margin:0; font:700 max(var(--desktop-text-min, 0px), calc(24px * var(--desktop-text-scale, 1)))/1.2 'Barlow Condensed',sans-serif; }
#mercenaryPicker p { color:#e2dac9; font-size:max(var(--desktop-text-min, 0px), calc(14px * var(--desktop-text-scale, 1))); }
#mercenaryPicker [data-ally-close], #mercenaryDeployment [data-ally-change] { min-height:44px; padding:8px 14px; border:1px solid #b6a16e; border-radius:6px; background:#263849; color:#fff0ce; cursor:pointer; }
#mercenaryPicker .ally-icon-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
#mercenaryPicker .ally-icon-grid button { display:flex; flex-direction:column; align-items:center; gap:6px; min-width:0; min-height:120px; padding:12px 6px; border:1px solid #82909a; border-radius:8px; background:#102131; color:#fff0ce; cursor:pointer; }
#mercenaryPicker .ally-icon-grid .formation-art { width:64px; height:64px; }
#mercenaryPicker .ally-icon-grid strong { font:700 max(var(--desktop-text-min, 0px), calc(16px * var(--desktop-text-scale, 1)))/1.25 'Barlow Condensed',sans-serif; overflow-wrap:anywhere; }
#mercenaryPicker .ally-icon-grid small { margin-top:auto; color:#dfd8c8; }
#mercenaryPicker .ally-icon-grid [aria-pressed="true"] { border-color:#f2cd6c; background:#314152; }
#mercenaryPicker .ally-icon-grid button:disabled { opacity:.55; cursor:default; }
#mercenaryPicker .ally-icon-grid button:hover:enabled { background:#31495d; }
@media(max-width:600px) {
  #mercenaryDeployment .formation-slots { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  #mercenaryDeployment .ally-slot { padding:10px; }
  #mercenaryDeployment .ally-icon-grid { display:none; }
  #mercenaryDeployment [data-ally-change] { display:block; margin-top:auto; width:100%; }
  #mercenaryDeployment [data-ally-change]:disabled { opacity:.5; cursor:default; }
  #profilesDrawer #mercenaryDeployment .formation-slots .ally-preview { flex-direction:column; padding:4px 0 12px; gap:8px; }
  #profilesDrawer #mercenaryDeployment .formation-slots .ally-preview .formation-art { width:88px; height:88px; flex:0 0 88px; }
  #profilesDrawer #mercenaryDeployment .formation-slots .ally-preview .formation-name { font-size:max(var(--desktop-text-min, 0px), calc(18px * var(--desktop-text-scale, 1))); min-height:2.6em; }
}


/* Portrait tabs retain names for assistive technology and hover discovery. */
#mercenaryRoster .mercenary-tabs { gap:8px; padding-bottom:8px; }
#mercenaryRoster .mercenary-tabs [role="tab"] { display:flex; justify-content:center; padding:4px; border:1px solid #465b6c; border-radius:8px; }
#mercenaryRoster .mercenary-tabs [aria-selected="true"] { border-color:#e8bc64; background:#263849; }
#mercenaryRoster .mercenary-tabs .mercenary-portrait { width:64px; height:72px; flex:0 0 64px; border-radius:4px; box-shadow:none; }
#mercenaryRoster .mercenary-tabs .mercenary-portrait i { background-size:300% auto; filter:none; }
