/* v4 — compact Hero Gear command layout */
body.tool-hero-gear .hero-gear-action-hub{
  width:100%!important;margin:14px 0!important;padding:12px 14px!important;
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important;
  background:linear-gradient(145deg,rgba(6,31,47,.92),rgba(8,55,73,.84))!important;border:1px solid rgba(96,218,245,.28)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.22)!important;
  clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px)!important;
}
body.tool-hero-gear .quick-build-launcher-section{margin:0!important;width:auto!important;min-width:0!important}
body.tool-hero-gear .quick-launch-center{display:flex!important;justify-content:flex-start!important;gap:8px!important;align-items:stretch!important}
body.tool-hero-gear .quick-build-launch-btn{width:auto!important;min-width:235px!important;min-height:54px!important;padding:8px 15px!important;margin:0!important}
body.tool-hero-gear .quick-customize-legacy{width:auto!important;min-width:145px!important;min-height:54px!important;padding:7px 12px!important;margin:0!important}
body.tool-hero-gear .quick-launch-copy b,body.tool-hero-gear .quick-option-copy b{font-size:.88rem!important}
body.tool-hero-gear .quick-launch-copy small,body.tool-hero-gear .quick-option-copy small{font-size:.61rem!important;white-space:nowrap!important}
body.tool-hero-gear .hero-gear-profile-actions{display:flex!important;gap:7px!important;align-items:center!important;justify-content:flex-end!important;margin:0!important}
body.tool-hero-gear .hero-gear-profile-actions button{min-height:42px!important;width:auto!important;padding:8px 13px!important;white-space:nowrap!important;font-size:.72rem!important}
body.tool-hero-gear .gear-set-toolbar{
  width:100%!important;margin:12px 0 8px!important;padding:9px 12px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;
  background:rgba(5,25,39,.72)!important;border:1px solid rgba(92,203,231,.23)!important;
  clip-path:polygon(9px 0,calc(100% - 9px) 0,100% 9px,100% calc(100% - 9px),calc(100% - 9px) 100%,9px 100%,0 calc(100% - 9px),0 9px)!important;
}
body.tool-hero-gear .gear-set-toolbar-copy{display:flex!important;flex-direction:column!important}.gear-set-toolbar-copy b{font-size:.78rem!important;text-transform:uppercase!important;letter-spacing:.07em!important}.gear-set-toolbar-copy small{font-size:.62rem!important;color:#84a7b8!important}
body.tool-hero-gear .hero-gear-add-troop,body.tool-hero-gear .gear-add-btn-compact{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:auto!important;min-width:0!important;min-height:38px!important;padding:7px 12px!important;border:1px solid rgba(93,220,247,.42)!important;background:linear-gradient(145deg,rgba(13,112,145,.82),rgba(11,71,98,.9))!important;color:#edfbff!important;font-weight:950!important;font-size:.72rem!important;cursor:pointer!important;box-shadow:none!important;clip-path:polygon(7px 0,calc(100% - 7px) 0,100% 7px,100% calc(100% - 7px),calc(100% - 7px) 100%,7px 100%,0 calc(100% - 7px),0 7px)!important}
body.tool-hero-gear #main-add-troop-btn[hidden],body.tool-hero-gear .gear-add-section-bar[hidden]{display:none!important}
body.tool-hero-gear .gear-add-section-bar{min-height:0!important;padding:7px 0 5px!important;margin:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
body.tool-hero-gear .gear-direction-labels{display:grid!important;grid-template-columns:1fr 36px 1fr!important;align-items:center!important;text-align:center!important;gap:7px!important;margin:2px 12px 7px!important;color:#89afbf!important;font-size:.62rem!important;font-weight:950!important;text-transform:uppercase!important;letter-spacing:.08em!important}
body.tool-hero-gear .gear-direction-labels i{font-style:normal!important;color:#f2ca69!important;font-size:1rem!important}
body.tool-hero-gear .troop-panel{overflow:visible!important;clip-path:none!important}
body.tool-hero-gear .troop-panel-head{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;padding-right:46px!important;min-height:76px!important}
body.tool-hero-gear .troop-panel-actions{display:flex!important;justify-content:flex-start!important;gap:6px!important;flex-wrap:wrap!important}
body.tool-hero-gear .troop-panel-actions button{min-height:34px!important;padding:6px 10px!important;font-size:.66rem!important}
body.tool-hero-gear .remove-troop-btn{top:12px!important;right:12px!important;z-index:70!important}
body.tool-hero-gear .gear-box{overflow:visible!important}
body.tool-hero-gear.light-theme .hero-gear-action-hub{background:linear-gradient(145deg,#fafdff,#e1f2f9)!important;border-color:#96c6d8!important;box-shadow:0 14px 34px rgba(45,91,113,.14)!important}
body.tool-hero-gear.light-theme .gear-set-toolbar{background:#edf8fc!important;border-color:#a4cbd9!important;color:#17384b!important}
body.tool-hero-gear.light-theme .gear-set-toolbar-copy small{color:#5d7a8c!important}
body.tool-hero-gear.light-theme .hero-gear-add-troop,body.tool-hero-gear.light-theme .gear-add-btn-compact{background:linear-gradient(145deg,#d7f2fb,#bce6f3)!important;color:#10516d!important;border-color:#75b8cf!important}
body.tool-hero-gear.light-theme .gear-direction-labels{color:#5e7e90!important}
@media(max-width:980px){body.tool-hero-gear .hero-gear-action-hub{grid-template-columns:1fr!important}.hero-gear-profile-actions{justify-content:flex-start!important}}
@media(max-width:650px){body.tool-hero-gear .quick-launch-center{flex-direction:column!important}.quick-build-launch-btn,.quick-customize-legacy{width:100%!important}.gear-set-toolbar{align-items:flex-start!important;flex-direction:column!important}}

/* v5 — stronger hierarchy: Load is obvious, Quick Build owns the center,
   Save/Customize stay compact, and Add Troop Type remains contextual. */
body.tool-hero-gear .hero-gear-action-hub.hero-gear-command-dock{
    width:100%!important;
    margin:13px 0 12px!important;
    padding:12px 14px!important;
    display:grid!important;
    grid-template-columns:minmax(205px,1fr) minmax(430px,680px) minmax(155px,1fr)!important;
    grid-template-areas:"load quick save"!important;
    gap:14px!important;
    align-items:start!important;
    background:linear-gradient(145deg,rgba(5,29,44,.94),rgba(7,48,65,.88))!important;
    border:1px solid rgba(96,218,245,.30)!important;
    box-shadow:0 14px 34px rgba(0,0,0,.22),inset 0 1px 0 rgba(191,241,255,.05)!important;
    clip-path:polygon(12px 0,calc(100% - 12px) 0,100% 12px,100% calc(100% - 12px),calc(100% - 12px) 100%,12px 100%,0 calc(100% - 12px),0 12px)!important;
}
body.tool-hero-gear .hero-gear-command-load{grid-area:load;display:flex;justify-content:flex-start;align-items:center;min-height:62px}
body.tool-hero-gear .hero-gear-command-save{grid-area:save;display:flex;justify-content:flex-end;align-items:center;min-height:62px}
body.tool-hero-gear .hero-gear-command-center{
    grid-area:quick!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    justify-self:center!important;
}
body.tool-hero-gear .hero-gear-command-center .quick-launch-center{
    display:flex!important;
    justify-content:center!important;
    align-items:stretch!important;
    gap:8px!important;
}
body.tool-hero-gear .quick-build-launch-btn{
    min-width:300px!important;
    min-height:62px!important;
    margin:0!important;
    padding:9px 22px!important;
    border:1px solid #92e7ff!important;
    border-radius:15px!important;
    background:radial-gradient(circle at 50% 0%,rgba(217,251,255,.34),transparent 46%),linear-gradient(135deg,#1aa6cf 0%,#147ea9 52%,#0d577c 100%)!important;
    color:#f2fcff!important;
    box-shadow:0 0 0 1px rgba(204,247,255,.13),0 0 27px rgba(55,194,231,.30),0 10px 24px rgba(0,0,0,.24)!important;
}
body.tool-hero-gear .quick-build-launch-btn:hover{
    transform:translateY(-2px) scale(1.01)!important;
    border-color:#d2f7ff!important;
    box-shadow:0 0 0 1px rgba(229,252,255,.20),0 0 34px rgba(73,210,245,.42),0 13px 28px rgba(0,0,0,.28)!important;
}
body.tool-hero-gear .quick-launch-icon{font-size:1.85rem!important;filter:drop-shadow(0 0 8px rgba(188,245,255,.72))!important}
body.tool-hero-gear .quick-launch-copy b{font-size:1.13rem!important;letter-spacing:-.01em!important}
body.tool-hero-gear .quick-launch-copy small{margin-top:5px!important;color:#c8f2ff!important;font-size:.66rem!important;white-space:nowrap!important}

body.tool-hero-gear .quick-option-card.quick-customize-legacy{
    min-width:126px!important;
    width:auto!important;
    min-height:62px!important;
    margin:0!important;
    padding:8px 11px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    border:1px solid #486f80!important;
    border-radius:13px!important;
    background:linear-gradient(145deg,#111f28,#0a151c)!important;
    color:#e8f6fb!important;
    box-shadow:0 8px 20px rgba(0,0,0,.20)!important;
}
body.tool-hero-gear .quick-option-card.quick-customize-legacy:hover,
body.tool-hero-gear .quick-option-card.quick-customize-legacy.active{
    border-color:#75c8e0!important;
    background:linear-gradient(145deg,#16303d,#0d202a)!important;
    box-shadow:0 10px 24px rgba(0,0,0,.24),0 0 18px rgba(89,194,224,.13)!important;
}
body.tool-hero-gear .quick-option-card.quick-customize-legacy .quick-option-icon{
    width:31px!important;height:31px!important;min-width:31px!important;display:grid!important;place-items:center!important;
    border:1px solid #416d80!important;border-radius:9px!important;background:#0d2a38!important;font-size:1rem!important;
}
body.tool-hero-gear .quick-option-card.quick-customize-legacy .quick-option-copy{display:flex!important;flex-direction:column!important;align-items:flex-start!important;line-height:1.05!important}
body.tool-hero-gear .quick-option-card.quick-customize-legacy b{font-size:.76rem!important}
body.tool-hero-gear .quick-option-card.quick-customize-legacy small{margin-top:4px!important;font-size:.57rem!important;color:#819dab!important;white-space:nowrap!important}

body.tool-hero-gear .hero-gear-load-primary,
body.tool-hero-gear .hero-gear-save-compact{
    width:auto!important;
    margin:0!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:9px!important;
    border-radius:13px!important;
    cursor:pointer!important;
    transition:.16s ease!important;
    white-space:nowrap!important;
}
body.tool-hero-gear .hero-gear-load-primary{
    min-width:214px!important;
    min-height:56px!important;
    padding:8px 14px!important;
    border:1px solid #ffdc7a!important;
    background:radial-gradient(circle at 50% 0%,rgba(255,247,198,.38),transparent 46%),linear-gradient(135deg,#f6c94e,#d79718 58%,#aa6f09)!important;
    color:#2d2106!important;
    box-shadow:0 0 22px rgba(247,183,49,.24),0 9px 22px rgba(0,0,0,.22)!important;
}
body.tool-hero-gear .hero-gear-load-primary:hover{transform:translateY(-1px)!important;border-color:#fff0ad!important;box-shadow:0 0 28px rgba(247,183,49,.32),0 12px 25px rgba(0,0,0,.25)!important}
body.tool-hero-gear .hero-gear-save-compact{
    min-width:158px!important;
    min-height:48px!important;
    padding:7px 12px!important;
    border:1px solid #416579!important;
    background:linear-gradient(145deg,#0d2836,#091c27)!important;
    color:#dcecf3!important;
    box-shadow:0 8px 19px rgba(0,0,0,.18)!important;
}
body.tool-hero-gear .hero-gear-save-compact:hover{transform:translateY(-1px)!important;border-color:#6ca8c1!important;background:linear-gradient(145deg,#123447,#0b2532)!important}
body.tool-hero-gear .hero-command-glyph{width:31px;height:31px;display:grid;place-items:center;border-radius:9px;background:rgba(255,255,255,.17);font-size:1.12rem;font-weight:950;line-height:1}
body.tool-hero-gear .hero-command-copy{display:flex;flex-direction:column;align-items:flex-start;line-height:1.08}
body.tool-hero-gear .hero-command-copy b{font-size:.77rem;font-weight:950}
body.tool-hero-gear .hero-command-copy small{margin-top:4px;font-size:.56rem;font-weight:800;opacity:.72}

body.tool-hero-gear .hero-gear-command-center .quick-fast-coverage{margin:5px auto 0!important;text-align:center!important}
body.tool-hero-gear .hero-gear-command-center .quick-fast-preview{width:100%!important;max-width:680px!important;margin:7px auto 0!important}

/* Keep Add Troop Type compact and attached to the Hero Gear Sets heading. */
body.tool-hero-gear .gear-set-toolbar{
    min-height:48px!important;
    margin:10px 0 8px!important;
    padding:7px 10px 7px 12px!important;
}
body.tool-hero-gear .hero-gear-add-troop{
    min-height:34px!important;
    padding:5px 10px!important;
    border-radius:9px!important;
    font-size:.67rem!important;
    box-shadow:0 6px 14px rgba(0,0,0,.12)!important;
}
body.tool-hero-gear .hero-gear-add-troop span{font-size:.95rem!important;line-height:1!important}

body.tool-hero-gear.light-theme .hero-gear-action-hub.hero-gear-command-dock{
    background:linear-gradient(145deg,#fafdff,#e4f3f9)!important;
    border-color:#92c5d8!important;
    box-shadow:0 14px 34px rgba(45,91,113,.13),inset 0 1px 0 rgba(255,255,255,.85)!important;
}
body.tool-hero-gear.light-theme .quick-build-launch-btn{
    border-color:#4aa7c8!important;
    background:linear-gradient(135deg,#85e5f4 0%,#4dc5e0 54%,#2d99c0 100%)!important;
    color:#07344a!important;
    box-shadow:0 0 22px rgba(53,169,205,.18),0 9px 21px rgba(72,121,143,.14)!important;
}
body.tool-hero-gear.light-theme .quick-launch-copy small{color:#155b74!important}
body.tool-hero-gear.light-theme .quick-option-card.quick-customize-legacy{background:#f7fbfd!important;color:#17384b!important;border-color:#a3c5d3!important;box-shadow:0 7px 17px rgba(65,103,122,.10)!important}
body.tool-hero-gear.light-theme .quick-option-card.quick-customize-legacy .quick-option-icon{background:#e2f3f9!important;border-color:#8ebdce!important;color:#155c78!important}
body.tool-hero-gear.light-theme .quick-option-card.quick-customize-legacy small{color:#5f7d8d!important}
body.tool-hero-gear.light-theme .hero-gear-load-primary{color:#432f05!important;border-color:#d5a83d!important;background:linear-gradient(135deg,#fff2b3,#f6c952 60%,#ddb03a)!important;box-shadow:0 8px 20px rgba(114,89,27,.14)!important}
body.tool-hero-gear.light-theme .hero-gear-save-compact{background:#f8fcfe!important;color:#234d60!important;border-color:#9fbfce!important;box-shadow:0 7px 17px rgba(60,95,113,.10)!important}

@media(max-width:1180px){
    body.tool-hero-gear .hero-gear-action-hub.hero-gear-command-dock{
        grid-template-columns:minmax(185px,1fr) minmax(380px,560px) minmax(145px,1fr)!important;
        gap:10px!important;
    }
    body.tool-hero-gear .quick-build-launch-btn{min-width:250px!important}
    body.tool-hero-gear .hero-gear-load-primary{min-width:190px!important}
}
@media(max-width:900px){
    body.tool-hero-gear .hero-gear-action-hub.hero-gear-command-dock{
        grid-template-columns:1fr auto!important;
        grid-template-areas:"quick quick" "load save"!important;
        align-items:center!important;
    }
    body.tool-hero-gear .hero-gear-command-load{justify-content:flex-end!important}
    body.tool-hero-gear .hero-gear-command-save{justify-content:flex-start!important}
    body.tool-hero-gear .hero-gear-command-center{max-width:680px!important}
}
@media(max-width:620px){
    body.tool-hero-gear .hero-gear-action-hub.hero-gear-command-dock{
        grid-template-columns:1fr!important;
        grid-template-areas:"quick" "load" "save"!important;
    }
    body.tool-hero-gear .hero-gear-command-load,
    body.tool-hero-gear .hero-gear-command-save{justify-content:center!important}
    body.tool-hero-gear .hero-gear-command-center .quick-launch-center{flex-direction:column!important}
    body.tool-hero-gear .quick-build-launch-btn,
    body.tool-hero-gear .quick-option-card.quick-customize-legacy,
    body.tool-hero-gear .hero-gear-load-primary,
    body.tool-hero-gear .hero-gear-save-compact{width:100%!important;min-width:0!important}
    body.tool-hero-gear .gear-set-toolbar{align-items:flex-start!important;flex-direction:column!important}
}

/* ==========================================================================
   V6 · CHIEF GEAR / CHIEF CHARMS INSPIRED ACTION SYSTEM
   - Quick Build is the dominant centered action.
   - Load is unmistakable but compact.
   - Customize + Save are secondary controls.
   - Add Troop Type is a genuinely small contextual control.
   - Add Gear Piece menu has separated choices in BOTH themes.
   ========================================================================== */
body.tool-hero-gear .hero-gear-action-hub.hero-gear-command-dock{
    width:100%!important;
    margin:14px 0 12px!important;
    padding:15px!important;
    display:grid!important;
    grid-template-columns:minmax(180px,.72fr) minmax(440px,1.7fr) minmax(145px,.58fr)!important;
    grid-template-areas:"load quick save"!important;
    gap:12px!important;
    align-items:stretch!important;
    border:1px solid rgba(88,216,243,.25)!important;
    border-radius:24px!important;
    clip-path:none!important;
    background:linear-gradient(135deg,rgba(6,27,46,.96),rgba(11,56,77,.92))!important;
    box-shadow:0 18px 42px rgba(0,0,0,.27),inset 0 1px 0 rgba(190,240,255,.05)!important;
}
body.tool-hero-gear .hero-gear-command-load,
body.tool-hero-gear .hero-gear-command-center,
body.tool-hero-gear .hero-gear-command-save{
    min-height:72px!important;
    border:1px solid rgba(88,216,243,.18)!important;
    border-radius:17px!important;
    background:rgba(5,18,34,.46)!important;
    box-shadow:none!important;
}
body.tool-hero-gear .hero-gear-command-load{
    grid-area:load!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:8px!important;
}
body.tool-hero-gear .hero-gear-command-center{
    grid-area:quick!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:8px 10px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
}
body.tool-hero-gear .hero-gear-command-save{
    grid-area:save!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:8px!important;
}
body.tool-hero-gear .hero-gear-command-center .quick-launch-center{
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(285px,1fr) 106px!important;
    gap:8px!important;
    align-items:stretch!important;
}

/* Chief Charms strategy-button language: clean cyan/blue primary, restrained secondary. */
body.tool-hero-gear .quick-build-launch-btn{
    width:100%!important;
    min-width:0!important;
    min-height:58px!important;
    margin:0!important;
    padding:8px 18px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:11px!important;
    border:1px solid #63efff!important;
    border-radius:12px!important;
    background:linear-gradient(135deg,#0e9fbe 0%,#168abf 48%,#2563eb 100%)!important;
    color:#fff!important;
    box-shadow:0 0 0 1px rgba(100,239,255,.13) inset,0 9px 21px rgba(0,0,0,.20)!important;
    transition:.18s ease!important;
}
body.tool-hero-gear .quick-build-launch-btn:hover{
    transform:translateY(-1px)!important;
    border-color:#b9f7ff!important;
    background:linear-gradient(135deg,#13b4d5 0%,#1999cb 48%,#2f71ee 100%)!important;
    box-shadow:0 0 0 1px rgba(190,250,255,.18) inset,0 11px 24px rgba(0,0,0,.24),0 0 20px rgba(76,222,246,.18)!important;
}
body.tool-hero-gear .quick-launch-icon{
    font-size:1.5rem!important;
    color:#f6c553!important;
    filter:drop-shadow(0 2px 5px rgba(0,0,0,.30))!important;
}
body.tool-hero-gear .quick-launch-copy b{font-size:1rem!important;line-height:1.05!important;color:#fff!important;text-shadow:none!important}
body.tool-hero-gear .quick-launch-copy small{margin-top:4px!important;font-size:.61rem!important;color:#c9f3fb!important;white-space:nowrap!important}

body.tool-hero-gear .quick-option-card.quick-customize-legacy{
    width:106px!important;
    min-width:106px!important;
    min-height:58px!important;
    margin:0!important;
    padding:7px 8px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:3px!important;
    border:1px solid rgba(93,219,246,.27)!important;
    border-radius:11px!important;
    background:rgba(11,28,50,.72)!important;
    color:#dff9ff!important;
    box-shadow:none!important;
}
body.tool-hero-gear .quick-option-card.quick-customize-legacy:hover,
body.tool-hero-gear .quick-option-card.quick-customize-legacy.active{
    transform:translateY(-1px)!important;
    border-color:#67e8f9!important;
    background:rgba(18,57,78,.90)!important;
    box-shadow:none!important;
}
body.tool-hero-gear .quick-option-card.quick-customize-legacy .quick-option-icon{
    width:auto!important;height:auto!important;min-width:0!important;
    border:0!important;border-radius:0!important;background:transparent!important;
    color:#f6c553!important;font-size:1.05rem!important;line-height:1!important;
}
body.tool-hero-gear .quick-option-card.quick-customize-legacy .quick-option-copy{
    align-items:center!important;text-align:center!important;
}
body.tool-hero-gear .quick-option-card.quick-customize-legacy b{font-size:.68rem!important;color:#eafcff!important}
body.tool-hero-gear .quick-option-card.quick-customize-legacy small{display:none!important}

/* Load is a clear profile action, visually equivalent to a Chief planner primary action. */
body.tool-hero-gear .hero-gear-load-primary{
    width:100%!important;
    min-width:0!important;
    min-height:54px!important;
    margin:0!important;
    padding:7px 10px!important;
    border:1px solid rgba(247,197,83,.55)!important;
    border-radius:11px!important;
    background:linear-gradient(135deg,rgba(247,197,83,.18),rgba(12,95,126,.55))!important;
    color:#eefcff!important;
    box-shadow:none!important;
}
body.tool-hero-gear .hero-gear-load-primary:hover{
    transform:translateY(-1px)!important;
    border-color:#f6d77e!important;
    background:linear-gradient(135deg,rgba(247,197,83,.25),rgba(14,117,151,.66))!important;
    box-shadow:0 0 18px rgba(247,197,83,.09)!important;
}
body.tool-hero-gear .hero-gear-load-primary .hero-command-glyph{color:#f6c553!important;background:rgba(247,197,83,.10)!important;border:1px solid rgba(247,197,83,.22)!important}
body.tool-hero-gear .hero-gear-load-primary .hero-command-copy b{font-size:.74rem!important;color:#fff!important}
body.tool-hero-gear .hero-gear-load-primary .hero-command-copy small{color:#afd4df!important;opacity:1!important}

body.tool-hero-gear .hero-gear-save-compact{
    width:100%!important;
    min-width:0!important;
    min-height:46px!important;
    margin:0!important;
    padding:6px 9px!important;
    border:1px solid rgba(93,219,246,.24)!important;
    border-radius:10px!important;
    background:rgba(13,28,47,.60)!important;
    color:#dff9ff!important;
    box-shadow:none!important;
}
body.tool-hero-gear .hero-gear-save-compact:hover{
    transform:translateY(-1px)!important;
    border-color:#67e8f9!important;
    background:rgba(15,51,70,.78)!important;
}
body.tool-hero-gear .hero-gear-save-compact .hero-command-glyph{
    width:26px!important;height:26px!important;border-radius:7px!important;font-size:.92rem!important;
    background:rgba(72,194,222,.10)!important;color:#8cecff!important;
}
body.tool-hero-gear .hero-gear-save-compact .hero-command-copy b{font-size:.67rem!important}
body.tool-hero-gear .hero-gear-save-compact .hero-command-copy small{display:none!important}

/* The coverage/preview belongs under the central Quick Build control only. */
body.tool-hero-gear .hero-gear-command-center .quick-fast-coverage{margin:5px auto 0!important;text-align:center!important}
body.tool-hero-gear .hero-gear-command-center .quick-fast-preview{width:100%!important;max-width:690px!important;margin:7px auto 0!important}

/* Small contextual Add Troop Type control. */
body.tool-hero-gear .gear-set-toolbar{
    min-height:40px!important;
    margin:10px 0 8px!important;
    padding:6px 8px 6px 11px!important;
    border-radius:13px!important;
    clip-path:none!important;
}
body.tool-hero-gear .hero-gear-add-troop{
    width:auto!important;
    min-width:0!important;
    min-height:27px!important;
    height:27px!important;
    padding:2px 8px!important;
    gap:4px!important;
    border:1px solid rgba(93,220,247,.33)!important;
    border-radius:8px!important;
    background:rgba(13,112,145,.32)!important;
    color:#dff8ff!important;
    font-size:.58rem!important;
    font-weight:900!important;
    line-height:1!important;
    box-shadow:none!important;
    clip-path:none!important;
}
body.tool-hero-gear .hero-gear-add-troop:hover{border-color:#67e8f9!important;background:rgba(18,132,166,.50)!important}
body.tool-hero-gear .hero-gear-add-troop span{font-size:.78rem!important;line-height:1!important}
body.tool-hero-gear .gear-set-toolbar-copy b{font-size:.72rem!important}
body.tool-hero-gear .gear-set-toolbar-copy small{font-size:.58rem!important}

/* Add Gear Piece menu: each choice reads as its own item, not one white slab. */
body.tool-hero-gear .gear-add-section-bar .popup-menu-box,
body.tool-hero-gear .gear-add-section-bar .gear-menu-active.popup-menu-box{
    width:100%!important;
    min-width:0!important;
    margin:6px 0 0!important;
    padding:8px 0 2px!important;
    gap:8px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    clip-path:none!important;
}
body.tool-hero-gear .gear-add-section-bar .popup-menu-title{
    padding:0 3px 5px!important;
    color:#84e7ff!important;
    font-size:.66rem!important;
    letter-spacing:.10em!important;
}
body.tool-hero-gear .gear-add-section-bar .popup-menu-options{
    width:100%!important;
    display:grid!important;
    gap:8px!important;
    padding:0!important;
    background:transparent!important;
}
body.tool-hero-gear .gear-add-section-bar .menu-option-btn{
    width:100%!important;
    min-height:42px!important;
    margin:0!important;
    padding:7px 10px!important;
    border:1px solid rgba(79,184,214,.40)!important;
    border-radius:9px!important;
    background:linear-gradient(145deg,rgba(12,55,72,.92),rgba(8,37,52,.96))!important;
    color:#eafaff!important;
    box-shadow:0 5px 12px rgba(0,0,0,.16)!important;
}
body.tool-hero-gear .gear-add-section-bar .menu-option-btn:hover{
    transform:translateY(-1px)!important;
    border-color:#69dff7!important;
    background:linear-gradient(145deg,rgba(18,84,106,.96),rgba(10,50,69,.98))!important;
}
body.tool-hero-gear .gear-add-section-bar .menu-cancel-btn{
    align-self:center!important;
    margin-top:1px!important;
    padding:4px 9px!important;
    border:1px solid rgba(114,167,188,.28)!important;
    border-radius:8px!important;
    background:rgba(7,27,39,.72)!important;
    color:#9ec3d0!important;
    font-size:.61rem!important;
    text-decoration:none!important;
}

/* Light theme keeps the SAME separation: transparent parent + distinct cards. */
body.tool-hero-gear.light-theme .hero-gear-action-hub.hero-gear-command-dock{
    background:linear-gradient(135deg,rgba(251,254,255,.97),rgba(229,247,252,.96))!important;
    border-color:rgba(34,153,184,.22)!important;
    box-shadow:0 16px 36px rgba(48,91,112,.13)!important;
}
body.tool-hero-gear.light-theme .hero-gear-command-load,
body.tool-hero-gear.light-theme .hero-gear-command-center,
body.tool-hero-gear.light-theme .hero-gear-command-save{
    background:rgba(255,255,255,.66)!important;
    border-color:rgba(36,150,180,.16)!important;
}
body.tool-hero-gear.light-theme .quick-build-launch-btn{
    border-color:#4cb9d3!important;
    background:linear-gradient(135deg,#0e9fbe 0%,#168abf 48%,#2563eb 100%)!important;
    color:#fff!important;
    box-shadow:0 7px 18px rgba(45,121,155,.16)!important;
}
body.tool-hero-gear.light-theme .quick-launch-copy b{color:#fff!important}
body.tool-hero-gear.light-theme .quick-launch-copy small{color:#d8f7ff!important}
body.tool-hero-gear.light-theme .quick-option-card.quick-customize-legacy{
    background:#f6fcff!important;color:#23485f!important;border-color:rgba(33,142,173,.20)!important;box-shadow:none!important;
}
body.tool-hero-gear.light-theme .quick-option-card.quick-customize-legacy .quick-option-icon{color:#b17a08!important}
body.tool-hero-gear.light-theme .quick-option-card.quick-customize-legacy b{color:#23485f!important}
body.tool-hero-gear.light-theme .hero-gear-load-primary{
    border-color:#d2b054!important;
    background:linear-gradient(135deg,#fff9e5,#e9f7fb)!important;
    color:#24465a!important;
}
body.tool-hero-gear.light-theme .hero-gear-load-primary .hero-command-copy b{color:#24465a!important}
body.tool-hero-gear.light-theme .hero-gear-load-primary .hero-command-copy small{color:#617f8f!important}
body.tool-hero-gear.light-theme .hero-gear-save-compact{
    background:#f6fcff!important;color:#23485f!important;border-color:rgba(33,142,173,.20)!important;
}
body.tool-hero-gear.light-theme .hero-gear-add-troop{
    background:#edf9fd!important;color:#17617c!important;border-color:#8fc4d5!important;
}
body.tool-hero-gear.light-theme .gear-add-section-bar .popup-menu-box,
body.tool-hero-gear.light-theme .gear-add-section-bar .gear-menu-active.popup-menu-box{
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
}
body.tool-hero-gear.light-theme .gear-add-section-bar .popup-menu-title{color:#176889!important}
body.tool-hero-gear.light-theme .gear-add-section-bar .menu-option-btn{
    background:linear-gradient(145deg,#fbfeff,#edf8fc)!important;
    color:#173f55!important;
    border-color:#9ec9d9!important;
    box-shadow:0 5px 12px rgba(49,91,110,.10)!important;
}
body.tool-hero-gear.light-theme .gear-add-section-bar .menu-option-btn:hover{
    background:linear-gradient(145deg,#f4fcff,#dff3fa)!important;
    border-color:#62adc7!important;
    color:#0f5874!important;
}
body.tool-hero-gear.light-theme .gear-add-section-bar .menu-cancel-btn{
    background:#f5fbfd!important;color:#4e7182!important;border-color:#b5d0dc!important;
}

@media(max-width:1050px){
    body.tool-hero-gear .hero-gear-action-hub.hero-gear-command-dock{
        grid-template-columns:minmax(165px,.7fr) minmax(390px,1.5fr) minmax(130px,.55fr)!important;
        gap:9px!important;
    }
    body.tool-hero-gear .hero-gear-command-center .quick-launch-center{grid-template-columns:minmax(245px,1fr) 96px!important}
}
@media(max-width:820px){
    body.tool-hero-gear .hero-gear-action-hub.hero-gear-command-dock{
        grid-template-columns:1fr 1fr!important;
        grid-template-areas:"quick quick" "load save"!important;
    }
    body.tool-hero-gear .hero-gear-command-center{grid-column:1/-1!important}
}
@media(max-width:560px){
    body.tool-hero-gear .hero-gear-action-hub.hero-gear-command-dock{
        grid-template-columns:1fr!important;
        grid-template-areas:"quick" "load" "save"!important;
    }
    body.tool-hero-gear .hero-gear-command-center .quick-launch-center{grid-template-columns:1fr!important}
    body.tool-hero-gear .quick-option-card.quick-customize-legacy{width:100%!important;min-width:0!important;flex-direction:row!important}
}

/* ==========================================================================
   V7 · compact Chief-style command dock
   ========================================================================== */
body.tool-hero-gear .hero-gear-action-hub.hero-gear-command-dock{
    width:min(720px,100%)!important;
    margin:12px auto 13px!important;
    padding:11px 13px!important;
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    grid-template-areas:"quick quick" "load save"!important;
    column-gap:6px!important;
    row-gap:7px!important;
    align-items:center!important;
    border:1px solid rgba(88,216,243,.24)!important;
    border-radius:18px!important;
    background:linear-gradient(135deg,rgba(6,27,46,.95),rgba(11,56,77,.90))!important;
    box-shadow:0 13px 31px rgba(0,0,0,.22)!important;
    clip-path:none!important;
}
body.tool-hero-gear .hero-gear-command-center{
    grid-area:quick!important;
    min-height:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
}
body.tool-hero-gear .hero-gear-command-center .quick-launch-center{
    width:100%!important;
    display:grid!important;
    grid-template-columns:minmax(310px,430px) 104px!important;
    justify-content:center!important;
    gap:7px!important;
}
body.tool-hero-gear .quick-build-launch-btn{
    min-height:54px!important;
    padding:7px 16px!important;
    border-radius:11px!important;
}
body.tool-hero-gear .quick-launch-icon{font-size:1.35rem!important}
body.tool-hero-gear .quick-launch-copy b{font-size:.96rem!important}
body.tool-hero-gear .quick-launch-copy small{font-size:.59rem!important}
body.tool-hero-gear .quick-option-card.quick-customize-legacy{
    width:104px!important;min-width:104px!important;min-height:54px!important;padding:5px 7px!important;border-radius:10px!important;
}
body.tool-hero-gear .hero-gear-command-load,
body.tool-hero-gear .hero-gear-command-save{
    min-height:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
}
body.tool-hero-gear .hero-gear-command-load{grid-area:load!important;justify-content:flex-end!important}
body.tool-hero-gear .hero-gear-command-save{grid-area:save!important;justify-content:flex-start!important}
body.tool-hero-gear .hero-gear-load-primary,
body.tool-hero-gear .hero-gear-save-compact{
    width:auto!important;
    min-width:145px!important;
    max-width:175px!important;
    min-height:34px!important;
    height:34px!important;
    padding:4px 9px!important;
    border-radius:9px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
}
body.tool-hero-gear .hero-gear-load-primary .hero-command-glyph,
body.tool-hero-gear .hero-gear-save-compact .hero-command-glyph{
    width:auto!important;height:auto!important;min-width:0!important;padding:0!important;border:0!important;background:transparent!important;font-size:.82rem!important;
}
body.tool-hero-gear .hero-gear-load-primary .hero-command-copy,
body.tool-hero-gear .hero-gear-save-compact .hero-command-copy{display:block!important;text-align:center!important}
body.tool-hero-gear .hero-gear-load-primary .hero-command-copy b,
body.tool-hero-gear .hero-gear-save-compact .hero-command-copy b{font-size:.64rem!important;white-space:nowrap!important}
body.tool-hero-gear .hero-gear-load-primary .hero-command-copy small,
body.tool-hero-gear .hero-gear-save-compact .hero-command-copy small{display:none!important}
body.tool-hero-gear .hero-gear-load-primary{
    border-color:rgba(247,197,83,.58)!important;
    background:linear-gradient(135deg,rgba(247,197,83,.16),rgba(14,94,124,.54))!important;
}
body.tool-hero-gear .hero-gear-save-compact{
    border-color:rgba(93,219,246,.30)!important;
    background:rgba(13,37,57,.82)!important;
}

/* Truly tiny contextual add buttons — both troop type and gear piece. */
body.tool-hero-gear .hero-gear-add-troop,
body.tool-hero-gear .gear-add-btn-compact{
    display:inline-flex!important;
    width:max-content!important;
    min-width:0!important;
    min-height:24px!important;
    height:24px!important;
    padding:2px 7px!important;
    gap:3px!important;
    border-radius:7px!important;
    font-size:.55rem!important;
    font-weight:900!important;
    line-height:1!important;
    box-shadow:none!important;
    clip-path:none!important;
}
body.tool-hero-gear .hero-gear-add-troop span,
body.tool-hero-gear .gear-add-btn-compact span{font-size:.68rem!important;line-height:1!important}
body.tool-hero-gear .gear-set-toolbar{min-height:34px!important;padding:4px 7px 4px 10px!important}
body.tool-hero-gear .gear-add-section-bar{
    min-height:0!important;
    margin:0!important;
    padding:5px 0 4px!important;
    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;
    border:0!important;
    outline:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    filter:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    clip-path:none!important;
    isolation:auto!important;
    align-items:flex-start!important;
}
body.tool-hero-gear .gear-add-section-bar::before,
body.tool-hero-gear .gear-add-section-bar::after,
body.tool-hero-gear.light-theme .gear-add-section-bar::before,
body.tool-hero-gear.light-theme .gear-add-section-bar::after{
    content:none!important;display:none!important;background:none!important;border:0!important;box-shadow:none!important;
}

/* Gear picker: no shared panel behind the choices in either theme. */
body.tool-hero-gear .gear-add-section-bar .popup-menu-box,
body.tool-hero-gear .gear-add-section-bar .gear-menu-active.popup-menu-box,
body.tool-hero-gear.light-theme .gear-add-section-bar .popup-menu-box,
body.tool-hero-gear.light-theme .gear-add-section-bar .gear-menu-active.popup-menu-box{
    position:relative!important;
    width:100%!important;
    min-width:0!important;
    margin:6px 0 0!important;
    padding:5px 0 1px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:7px!important;
    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;
    border:0!important;
    outline:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    filter:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    clip-path:none!important;
    isolation:auto!important;
}
body.tool-hero-gear .gear-add-section-bar .popup-menu-box::before,
body.tool-hero-gear .gear-add-section-bar .popup-menu-box::after,
body.tool-hero-gear.light-theme .gear-add-section-bar .popup-menu-box::before,
body.tool-hero-gear.light-theme .gear-add-section-bar .popup-menu-box::after{
    content:none!important;display:none!important;background:none!important;border:0!important;box-shadow:none!important;
}
body.tool-hero-gear .gear-add-section-bar .popup-menu-options{
    display:grid!important;grid-template-columns:1fr!important;gap:7px!important;padding:0!important;margin:0!important;background:transparent!important;border:0!important;box-shadow:none!important;
}
body.tool-hero-gear .gear-add-section-bar .menu-option-btn{
    width:100%!important;
    min-height:39px!important;
    margin:0!important;
    border-radius:8px!important;
    box-shadow:0 4px 10px rgba(0,0,0,.14)!important;
}
body.tool-hero-gear.light-theme .gear-add-section-bar .menu-option-btn{
    background:#f7fcff!important;
    border-color:#91c1d3!important;
    color:#163e54!important;
    box-shadow:0 4px 10px rgba(42,91,112,.10)!important;
}
body.tool-hero-gear.light-theme .gear-add-section-bar .menu-option-btn + .menu-option-btn{margin-top:0!important}
body.tool-hero-gear.light-theme .gear-add-section-bar .popup-menu-title{background:transparent!important;border:0!important;box-shadow:none!important}
body.tool-hero-gear.light-theme .gear-add-section-bar .menu-cancel-btn{background:#edf7fb!important}

/* Light command dock keeps the same compact geometry. */
body.tool-hero-gear.light-theme .hero-gear-command-center,
body.tool-hero-gear.light-theme .hero-gear-command-load,
body.tool-hero-gear.light-theme .hero-gear-command-save{background:transparent!important;border:0!important}
body.tool-hero-gear.light-theme .hero-gear-load-primary{background:linear-gradient(135deg,#fff7dc,#edf9fc)!important}
body.tool-hero-gear.light-theme .hero-gear-save-compact{background:#f5fbfd!important}

@media(max-width:760px){
    body.tool-hero-gear .hero-gear-action-hub.hero-gear-command-dock{width:100%!important}
    body.tool-hero-gear .hero-gear-command-center .quick-launch-center{grid-template-columns:1fr 94px!important}
    body.tool-hero-gear .hero-gear-load-primary,body.tool-hero-gear .hero-gear-save-compact{min-width:128px!important}
}

.profile-gear-sync{width:min(940px,calc(100% - 26px));margin:10px auto 18px;display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.profile-gear-load,.profile-gear-save{min-height:44px;padding:0 22px;border-radius:10px;font-weight:950;cursor:pointer}.profile-gear-load{position:relative;overflow:hidden;border:1px solid #ffd66d;background:linear-gradient(135deg,#fff0aa,#f2b633 45%,#fff2bb 62%,#d89212);color:#342207;box-shadow:0 0 22px rgba(247,183,49,.25)}.profile-gear-load:after{content:"";position:absolute;top:-80%;left:-32%;width:25%;height:260%;transform:rotate(22deg);background:linear-gradient(90deg,transparent,#fff9,transparent);transition:left .45s}.profile-gear-load:hover:after{left:112%}.profile-gear-save{border:1px solid #47758a;background:#0b2735;color:#eefbff}.light-theme .profile-gear-save{background:#f5fbfd;color:#214f62;border-color:#9dc2d1}

/* Multi-loadout Player Profile Hero Gear sets (Labyrinth-ready). */
.hero-gear-profile-slot{display:flex;flex-direction:column;gap:7px;min-width:260px;padding:10px 12px;border:1px solid rgba(122,211,255,.24);background:rgba(4,22,38,.68);border-radius:14px}.hero-gear-profile-slot-label{font-size:11px;font-weight:900;letter-spacing:.12em;text-transform:uppercase;color:#a7dfff}.hero-gear-profile-slot-buttons{display:grid;grid-template-columns:repeat(6,1fr);gap:5px}.hero-gear-profile-slot-btn{min-width:34px;height:34px;border:1px solid rgba(150,220,255,.34);border-radius:9px;background:rgba(7,37,58,.82);color:#dff8ff;font-weight:900;cursor:pointer;transition:.18s ease}.hero-gear-profile-slot-btn:hover,.hero-gear-profile-slot-btn.active{transform:translateY(-1px);border-color:#68e4ff;background:linear-gradient(180deg,rgba(39,164,201,.9),rgba(14,86,119,.92));box-shadow:0 0 18px rgba(65,211,255,.24)}.hero-gear-profile-slot-btn{position:relative}.hero-gear-profile-slot-btn.saved::after{content:'';position:absolute;right:4px;top:4px;width:6px;height:6px;border-radius:50%;background:#7fffd4;box-shadow:0 0 7px rgba(127,255,212,.8)}.hero-gear-profile-slot-btn.saved:not(.active){border-color:rgba(127,255,212,.48)}.hero-gear-profile-slot small{color:#8fb6c8;font-size:10px;line-height:1.35}@media(max-width:900px){.hero-gear-profile-slot{width:100%;min-width:0}.hero-gear-command-dock{flex-wrap:wrap}}
