/* Hero Gear V7 rework — Chief Gear / Chief Charms flow, 2026-10-03 */
body.tool-hero-gear .hero-gear-v7{max-width:1760px!important}
body.tool-hero-gear .hero-gear-hero{height:270px!important;margin-bottom:16px!important}
body.tool-hero-gear .hero-gear-hero .hero-copy{width:min(1040px,78%)!important}
body.tool-hero-gear .hg-eyebrow{display:block;color:#6fe5ff;font-size:.66rem;font-weight:950;letter-spacing:.12em;text-transform:uppercase}
body.tool-hero-gear .hg-section-heading-row{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
body.tool-hero-gear .hg-section-heading-row h2,
body.tool-hero-gear .hg-state-explainer h2,
body.tool-hero-gear .hg-summary-heading h2{margin:3px 0 5px;color:#edfaff;font-size:1.28rem;line-height:1.1;font-weight:950;letter-spacing:-.02em}
body.tool-hero-gear .hg-section-heading-row p,
body.tool-hero-gear .hg-state-explainer p,
body.tool-hero-gear .hg-summary-heading p{margin:0;color:#8ca8b8;font-size:.76rem;line-height:1.45}

body.tool-hero-gear .hg-stock-container,
body.tool-hero-gear .hg-planner-workbench,
body.tool-hero-gear .hg-custom-panel,
body.tool-hero-gear .hg-state-explainer,
body.tool-hero-gear .hg-bottom-summary{border:1px solid rgba(77,180,222,.28);border-radius:21px;background:linear-gradient(145deg,rgba(6,25,38,.96),rgba(7,31,46,.94));box-shadow:0 16px 38px rgba(0,0,0,.24);backdrop-filter:blur(13px)}
body.tool-hero-gear .hg-stock-container{padding:17px 18px;margin-bottom:14px}
body.tool-hero-gear .hg-live-pill{flex:0 0 auto;padding:5px 9px;border:1px solid rgba(74,222,128,.26);border-radius:999px;background:rgba(22,101,52,.16);color:#86efac;font-size:.58rem;font-weight:950;letter-spacing:.08em}
body.tool-hero-gear .hg-stock-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:13px}
body.tool-hero-gear .hg-stock-card{min-width:0;display:grid;grid-template-columns:50px minmax(0,1fr);grid-template-areas:"icon copy" "icon stepper";column-gap:10px;row-gap:6px;align-items:center;padding:10px 11px;border:1px solid rgba(93,178,211,.20);border-radius:13px;background:rgba(4,18,29,.55)}
body.tool-hero-gear .hg-stock-card>img{grid-area:icon;width:46px;height:46px;object-fit:contain;filter:drop-shadow(0 5px 10px rgba(0,0,0,.28))}
body.tool-hero-gear .hg-stock-copy{grid-area:copy;display:flex;justify-content:space-between;align-items:baseline;gap:8px;min-width:0}
body.tool-hero-gear .hg-stock-copy b{font-size:.76rem;color:#e9f7fc}.hg-stock-copy small{font-size:.58rem;color:#6f8e9e;text-transform:uppercase;font-weight:900;letter-spacing:.06em}
body.tool-hero-gear .hg-stock-stepper{grid-area:stepper;display:grid;grid-template-columns:32px minmax(0,1fr) 32px;gap:5px;align-items:center}
body.tool-hero-gear .hg-stock-stepper button{height:31px;border:1px solid rgba(94,208,239,.28);border-radius:8px;background:#0b2a3c;color:#dff9ff;font-weight:950;cursor:pointer}
body.tool-hero-gear .hg-stock-stepper button:hover{border-color:#65e6ff;background:#10394f}
body.tool-hero-gear .hg-stock-stepper input{width:100%;height:31px;border:1px solid rgba(111,151,172,.30);border-radius:8px;background:#071923;color:#ffe59e;text-align:center;font-weight:950;outline:none}

body.tool-hero-gear .hg-planner-workbench{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(310px,.62fr);gap:12px;padding:14px;margin-bottom:14px}
body.tool-hero-gear .hg-planner-main,
body.tool-hero-gear .hg-profile-card{border:1px solid rgba(93,202,236,.18);border-radius:16px;background:rgba(4,17,29,.48)}
body.tool-hero-gear .hg-planner-main{padding:14px}
body.tool-hero-gear .hg-workbench-heading{align-items:center}
body.tool-hero-gear .hg-settings-btn{min-height:40px;display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid rgba(95,221,246,.28);border-radius:10px;background:#0b2940;color:#dffaff;cursor:pointer;font-size:.69rem;font-weight:900}
body.tool-hero-gear .hg-settings-btn:hover,body.tool-hero-gear .hg-settings-btn.active{border-color:#67e8f9;background:#123c55}
body.tool-hero-gear .hg-strategy-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:12px}
body.tool-hero-gear .hg-strategy{min-height:72px;display:grid;grid-template-columns:34px minmax(0,1fr);grid-template-rows:auto auto;column-gap:8px;align-items:center;padding:9px;border:1px solid rgba(94,184,218,.22);border-radius:11px;background:linear-gradient(145deg,rgba(8,36,53,.78),rgba(8,27,43,.76));color:#ecfaff;text-align:left;cursor:pointer;transition:.15s ease}
body.tool-hero-gear .hg-strategy:hover{transform:translateY(-1px);border-color:#6ddff5;background:linear-gradient(145deg,rgba(12,58,77,.92),rgba(9,36,55,.92))}
body.tool-hero-gear .hg-strategy>span{grid-row:1/3;display:grid;place-items:center;width:34px;height:34px;border:1px solid rgba(111,223,245,.24);border-radius:9px;background:rgba(69,180,214,.10);color:#8feeff;font-size:.86rem;font-weight:950}
body.tool-hero-gear .hg-strategy.primary{border-color:rgba(91,232,255,.54);background:linear-gradient(135deg,#0b87a7,#1764b5)}
body.tool-hero-gear .hg-strategy.primary>span{color:#ffe08a;border-color:rgba(255,224,138,.42);background:rgba(255,208,72,.10)}
body.tool-hero-gear .hg-strategy b{align-self:end;font-size:.72rem}.hg-strategy small{align-self:start;color:#8db2c2;font-size:.57rem;line-height:1.25}.hg-strategy.primary small{color:#d2f5fb}
body.tool-hero-gear .hg-profile-card{padding:14px;display:flex;flex-direction:column;gap:10px}
body.tool-hero-gear .hg-profile-head h3{margin:2px 0 3px;color:#f2fbff;font-size:1rem}.hg-profile-head p{margin:0;color:#809dad;font-size:.67rem;line-height:1.4}
body.tool-hero-gear .hero-gear-profile-slot-buttons{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:5px!important;margin:2px 0!important}
body.tool-hero-gear .hero-gear-profile-slot-btn{min-width:0!important;height:34px!important;border-radius:8px!important}
body.tool-hero-gear #heroGearProfileSlotHint{min-height:31px;color:#7997a8;font-size:.61rem;line-height:1.35}
body.tool-hero-gear .hg-profile-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:auto}
body.tool-hero-gear .hg-profile-load,body.tool-hero-gear .hg-profile-save{min-height:38px;border-radius:9px!important;font-size:.66rem!important;font-weight:950!important}
body.tool-hero-gear .hg-profile-load{border:1px solid rgba(247,197,83,.54)!important;background:linear-gradient(135deg,rgba(247,197,83,.16),rgba(16,91,121,.58))!important;color:#f6fbff!important}
body.tool-hero-gear .hg-profile-save{border:1px solid rgba(90,210,240,.28)!important;background:#0c2a3d!important;color:#e5faff!important}

body.tool-hero-gear .hg-custom-panel{padding:16px!important;margin:0 0 14px!important}
body.tool-hero-gear .hg-detail-actions{margin-top:12px}

body.tool-hero-gear .hg-state-explainer{display:grid;grid-template-columns:50px minmax(0,1fr) auto;align-items:center;gap:14px;padding:13px 16px;margin:0 0 13px}
body.tool-hero-gear .hg-state-explainer-icon{width:44px;height:44px;display:grid;place-items:center;border:1px solid rgba(100,225,247,.30);border-radius:50%;background:radial-gradient(circle,rgba(89,211,239,.14),transparent 70%);color:#7cecff;font-size:1.35rem}
body.tool-hero-gear .hg-state-legend{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
body.tool-hero-gear .hg-state-legend span{padding:5px 8px;border-radius:999px;font-size:.58rem;font-weight:950;white-space:nowrap;border:1px solid}
body.tool-hero-gear .hg-state-legend .off{color:#cbd5e1;border-color:#64748b;background:rgba(71,85,105,.20)}
body.tool-hero-gear .hg-state-legend .mythic{color:#fed7aa;border-color:#f59e0b;background:rgba(245,158,11,.13)}
body.tool-hero-gear .hg-state-legend .legendary{color:#fecaca;border-color:#ef4444;background:rgba(239,68,68,.13)}

body.tool-hero-gear .hg-troops-container{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;overflow:visible!important;padding:0 0 15px!important;align-items:start!important}
body.tool-hero-gear .hg-troops-container .troop-panel{width:auto!important;max-width:none!important;min-width:0!important;flex:initial!important;padding:13px!important;gap:9px!important}
body.tool-hero-gear .troop-panel-head{align-items:flex-start!important}
body.tool-hero-gear .troop-panel-title-wrap strong{font-size:1.05rem!important}
body.tool-hero-gear .troop-panel-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;width:100%!important;margin-top:8px!important}
body.tool-hero-gear .troop-panel-actions button{min-width:0!important;min-height:34px!important;padding:5px 6px!important;font-size:.56rem!important;line-height:1.2!important}
body.tool-hero-gear .gear-direction-labels{display:grid!important;grid-template-columns:1fr 32px 1fr!important;gap:6px!important;margin:0!important;padding:0 4px!important;color:#809cad!important;font-size:.58rem!important;font-weight:950!important;text-transform:uppercase!important;letter-spacing:.07em!important;text-align:center!important}
body.tool-hero-gear .gear-grid-2x2{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
body.tool-hero-gear .gear-box{position:relative;min-width:0!important;padding:9px!important;border:1px solid rgba(91,164,194,.22)!important;border-radius:13px!important;background:rgba(4,17,27,.55)!important;overflow:visible!important}
body.tool-hero-gear .gear-box.hg-stage-mythic{border-color:rgba(245,158,11,.38)!important;background:linear-gradient(145deg,rgba(120,71,9,.10),rgba(4,17,27,.64))!important}
body.tool-hero-gear .gear-box.hg-stage-red{border-color:rgba(239,68,68,.42)!important;background:linear-gradient(145deg,rgba(127,29,29,.13),rgba(4,17,27,.64))!important}
body.tool-hero-gear .gear-card-head{display:flex!important;align-items:center!important;justify-content:space-between!important;margin-bottom:7px!important}
body.tool-hero-gear .gear-card-head>span{font-size:.78rem!important;font-weight:950!important;color:#edfaff!important}
body.tool-hero-gear .hg-piece-state-btn{display:flex;align-items:center;gap:8px;width:100%;min-height:60px;padding:6px 8px;margin-bottom:8px;border:1px solid rgba(100,116,139,.32);border-radius:10px;background:rgba(15,23,42,.45);color:#d9e7ef;cursor:pointer;text-align:left}
body.tool-hero-gear .hg-piece-state-btn img{width:48px;height:48px;object-fit:contain;flex:0 0 48px;filter:grayscale(1) saturate(.1) opacity(.48)}
body.tool-hero-gear .hg-piece-state-copy{display:flex;flex-direction:column;gap:1px;min-width:0}.hg-piece-state-copy b{font-size:.69rem}.hg-piece-state-copy small{font-size:.56rem;color:#7f97a6;line-height:1.25}
body.tool-hero-gear .gear-box.hg-stage-mythic .hg-piece-state-btn{border-color:rgba(245,158,11,.40);background:rgba(120,72,10,.13)}
body.tool-hero-gear .gear-box.hg-stage-mythic .hg-piece-state-btn img{filter:none}
body.tool-hero-gear .gear-box.hg-stage-mythic .hg-piece-state-copy b{color:#fed7aa}
body.tool-hero-gear .gear-box.hg-stage-red .hg-piece-state-btn{border-color:rgba(248,113,113,.45);background:rgba(127,29,29,.16)}
body.tool-hero-gear .gear-box.hg-stage-red .hg-piece-state-btn img{filter:none}
body.tool-hero-gear .gear-box.hg-stage-red .hg-piece-state-copy b{color:#fecaca}
body.tool-hero-gear .hg-piece-columns{display:grid;grid-template-columns:minmax(0,1fr) 26px minmax(0,1fr);gap:6px;align-items:start}
body.tool-hero-gear .hg-piece-arrow{display:grid;place-items:center;min-height:138px;color:#5fa8c6;font-weight:950}
body.tool-hero-gear .hg-side-card{position:relative;min-width:0;padding:7px;border:1px solid rgba(91,151,177,.20);border-radius:10px;background:rgba(5,21,32,.52)}
body.tool-hero-gear .hg-side-head{display:flex;align-items:center;justify-content:space-between;gap:5px;margin-bottom:6px}
body.tool-hero-gear .hg-side-head>span{color:#8ca6b5;font-size:.54rem;font-weight:950;letter-spacing:.06em;text-transform:uppercase}
body.tool-hero-gear .hg-tier-chip{min-height:24px;padding:3px 7px;border:1px solid #d97706;border-radius:999px;background:rgba(180,83,9,.14);color:#fed7aa;font-size:.52rem;font-weight:950;cursor:pointer}
body.tool-hero-gear .hg-tier-chip.red{border-color:#ef4444;background:rgba(153,27,27,.17);color:#fecaca}
body.tool-hero-gear .hg-tier-chip:disabled{cursor:default;opacity:.45}
body.tool-hero-gear .hg-control-label{display:block;margin:6px 0 3px;color:#7795a5;font-size:.51rem;font-weight:900;text-transform:uppercase;letter-spacing:.05em}
body.tool-hero-gear .hg-level-row{display:grid;grid-template-columns:28px minmax(0,1fr) 28px;gap:4px}
body.tool-hero-gear .hg-level-row button,
body.tool-hero-gear .hg-mastery-stepper>button{height:29px;border:1px solid rgba(91,182,215,.25);border-radius:7px;background:#0c293b;color:#dff8ff;font-weight:950;cursor:pointer}
body.tool-hero-gear .hg-level-row button:hover,
body.tool-hero-gear .hg-mastery-stepper>button:hover{border-color:#6de4f9;background:#123b51}
body.tool-hero-gear .hg-level-readout{display:grid;place-items:center;min-width:0;height:29px;padding:0 3px;border:1px solid rgba(115,155,175,.25);border-radius:7px;background:#071a26;color:#f5f9fb;font-size:.61rem;font-weight:950;white-space:nowrap}
body.tool-hero-gear .hg-level-readout.mythic{color:#fdba74;border-color:rgba(245,158,11,.30)}
body.tool-hero-gear .hg-level-readout.red{color:#fca5a5;border-color:rgba(239,68,68,.34)}
body.tool-hero-gear .hg-quick-cycle{width:100%;height:27px;margin-top:4px;border:1px solid #d97706;border-radius:7px;background:rgba(180,83,9,.12);color:#fed7aa;font-size:.57rem;font-weight:950;cursor:pointer}
body.tool-hero-gear .hg-quick-cycle.red{border-color:#ef4444;background:rgba(153,27,27,.14);color:#fecaca}
body.tool-hero-gear .hg-quick-cycle:disabled{opacity:.36;cursor:default}
body.tool-hero-gear .hg-mastery-stepper{position:relative;display:grid;grid-template-columns:28px minmax(0,1fr) 28px;gap:4px}
body.tool-hero-gear .hg-mastery-open{height:29px;border:1px solid rgba(165,132,57,.46);border-radius:7px;background:#111c24;color:#ffe19a;font-size:.61rem;font-weight:950;cursor:pointer}
body.tool-hero-gear .hg-mastery-open:disabled{opacity:.40;cursor:default}
body.tool-hero-gear .hg-mastery-grid{position:absolute;left:50%;top:calc(100% + 5px);z-index:160;width:230px;transform:translateX(-50%);display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;padding:7px;border:1px solid #8b6924;border-radius:10px;background:#071522;box-shadow:0 18px 44px rgba(0,0,0,.62)}
body.tool-hero-gear .hg-mastery-grid[hidden]{display:none}
body.tool-hero-gear .hg-mastery-grid button{min-height:29px;border:1px solid #405369;border-radius:7px;background:#102033;color:#dce9f4;font-size:.62rem;font-weight:900;cursor:pointer}
body.tool-hero-gear .hg-mastery-grid button:hover{background:#17324d;border-color:#6d91b2}.hg-mastery-grid button.active{background:linear-gradient(135deg,#e2a525,#f5c64e)!important;border-color:#ffe28b!important;color:#201405!important}
body.tool-hero-gear .gear-box.hg-stage-grey .hg-side-card{opacity:.48}
body.tool-hero-gear .gear-box.hg-stage-grey .hg-level-row button,
body.tool-hero-gear .gear-box.hg-stage-grey .hg-mastery-stepper>button{pointer-events:none}
body.tool-hero-gear .hg-hidden-control{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important}
body.tool-hero-gear .gear-subtotal-box{margin-top:7px!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;padding:6px!important;border-radius:9px!important}
body.tool-hero-gear .gear-subtotal-box>div{min-width:0!important;gap:3px!important;font-size:.53rem!important}.gear-subtotal-box .resource-icon{width:18px!important;height:18px!important}
body.tool-hero-gear .error-alert{font-size:.58rem!important;margin:5px 0 0!important}
body.tool-hero-gear .troop-total-box{margin-top:3px!important;padding:8px!important;border-radius:10px!important}.troop-total-title{font-size:.62rem!important}.troop-total-values{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important}.troop-total-values>div{font-size:.56rem!important}.troop-total-values .resource-icon{width:20px!important;height:20px!important}

body.tool-hero-gear .hg-bottom-summary{padding:17px 18px;margin-top:0}
body.tool-hero-gear .hg-summary-heading{margin-bottom:12px}
body.tool-hero-gear .hg-summary-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) 230px;gap:10px;align-items:stretch}
body.tool-hero-gear .hg-summary-panel,.hg-prep-card{border:1px solid rgba(87,170,203,.20);border-radius:13px;background:rgba(4,17,28,.52);padding:10px}
body.tool-hero-gear .hg-summary-panel-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:8px}.hg-summary-panel-head b{color:#eaf7fc;font-size:.75rem}.hg-summary-panel-head small{color:#718c9b;font-size:.56rem}
body.tool-hero-gear .hg-bottom-totals{grid-template-columns:repeat(2,minmax(0,1fr))!important}.hg-bottom-totals .total-card{min-height:67px!important}.hg-bottom-totals .total-label .resource-icon{width:34px!important;height:34px!important}
body.tool-hero-gear .hg-stat-gain-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.hg-stat-gain-card{padding:8px;border:1px solid rgba(79,149,178,.18);border-radius:9px;background:rgba(8,31,45,.45)}.hg-stat-gain-card h3{margin:0 0 6px;color:#e8f7fc;font-size:.68rem}.hg-stat-gain-values{display:grid;gap:4px}.hg-stat-gain-values span{display:flex;justify-content:space-between;gap:5px;color:#7794a4;font-size:.55rem}.hg-stat-gain-values b{color:#7ce8a4;font-size:.57rem}.hg-stat-gain-values b.negative{color:#fca5a5}
body.tool-hero-gear .hg-prep-card{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.hg-prep-card>img{width:100%;max-width:190px;height:66px;object-fit:cover;border:1px solid #9b7931;border-radius:9px}.hg-prep-main>span{display:block;margin-top:6px;color:#c8a855;font-size:.55rem;font-weight:950;letter-spacing:.07em}.hg-prep-main>strong{display:block;color:#ffe08a;font-size:1.2rem}.hg-valeria-row{display:flex;align-items:center;justify-content:center;gap:5px;margin-top:5px}.hg-valeria-row img{width:24px;height:24px;object-fit:cover;border-radius:50%;border:1px solid #c69b38}.hg-valeria-row span{color:#bba873;font-size:.55rem;font-weight:900}.hg-valeria-row select{height:27px;border:1px solid #9b7931;border-radius:6px;background:#16150d;color:#ffe08a;font-size:.62rem;font-weight:900}

body.tool-hero-gear.light-theme .hg-stock-container,
body.tool-hero-gear.light-theme .hg-planner-workbench,
body.tool-hero-gear.light-theme .hg-custom-panel,
body.tool-hero-gear.light-theme .hg-state-explainer,
body.tool-hero-gear.light-theme .hg-bottom-summary{background:linear-gradient(145deg,rgba(248,252,255,.97),rgba(235,246,252,.96));border-color:#bfd9e6;color:#173047}
body.tool-hero-gear.light-theme .hg-section-heading-row h2,body.tool-hero-gear.light-theme .hg-state-explainer h2,body.tool-hero-gear.light-theme .hg-summary-heading h2{color:#173047}
body.tool-hero-gear.light-theme .hg-section-heading-row p,body.tool-hero-gear.light-theme .hg-state-explainer p,body.tool-hero-gear.light-theme .hg-summary-heading p{color:#5f7888}
body.tool-hero-gear.light-theme .hg-live-pill{background:#dff7e8!important;border-color:#70b88b!important;color:#125c36!important;box-shadow:inset 0 0 0 1px rgba(18,92,54,.04)!important}
body.tool-hero-gear.light-theme .hg-stock-card,body.tool-hero-gear.light-theme .hg-planner-main,body.tool-hero-gear.light-theme .hg-profile-card,body.tool-hero-gear.light-theme .gear-box,body.tool-hero-gear.light-theme .hg-side-card,body.tool-hero-gear.light-theme .hg-summary-panel,body.tool-hero-gear.light-theme .hg-prep-card{background:#fff!important;border-color:#cfdee6!important}
body.tool-hero-gear.light-theme .hg-stock-copy b,body.tool-hero-gear.light-theme .hg-profile-head h3,body.tool-hero-gear.light-theme .gear-card-head>span,body.tool-hero-gear.light-theme .hg-summary-panel-head b,body.tool-hero-gear.light-theme .hg-stat-gain-card h3{color:#20384a!important}
body.tool-hero-gear.light-theme .hg-stock-stepper input,body.tool-hero-gear.light-theme .hg-level-readout{background:#fff;color:#20384a;border-color:#cbd8df}
body.tool-hero-gear.light-theme .hg-stock-stepper button,body.tool-hero-gear.light-theme .hg-level-row button,body.tool-hero-gear.light-theme .hg-mastery-stepper>button{background:#eef7fb;color:#24465c;border-color:#c4d9e4}
body.tool-hero-gear.light-theme .hg-piece-state-btn{background:#f7fafc;color:#294154;border-color:#d4dce2}
body.tool-hero-gear.light-theme .hg-mastery-open{background:#fff9e9;color:#76550d;border-color:#ddc37b}
body.tool-hero-gear.light-theme .hg-mastery-grid{background:#fff;border-color:#c9a953;box-shadow:0 18px 42px rgba(50,65,82,.18)}
body.tool-hero-gear.light-theme .hg-mastery-grid button{background:#f5f8fb;color:#2b435a;border-color:#d5dfe7}
body.tool-hero-gear.light-theme .hg-stat-gain-card{background:#f7fbfd;border-color:#d5e3ea}

@media(max-width:1420px){
 body.tool-hero-gear .hg-stock-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.tool-hero-gear .hg-strategy-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.tool-hero-gear .hg-troops-container{grid-template-columns:1fr!important}
 body.tool-hero-gear .hg-troops-container .troop-panel{width:100%!important}
 body.tool-hero-gear .gear-grid-2x2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.tool-hero-gear .hg-summary-layout{grid-template-columns:1fr 1fr}
 body.tool-hero-gear .hg-prep-card{grid-column:1/-1;display:grid;grid-template-columns:190px 1fr;gap:12px;text-align:left}
}
@media(max-width:980px){
 body.tool-hero-gear .hg-planner-workbench{grid-template-columns:1fr}
 body.tool-hero-gear .hg-state-explainer{grid-template-columns:42px 1fr}.hg-state-legend{grid-column:1/-1!important;justify-content:flex-start!important}
 body.tool-hero-gear .hg-summary-layout{grid-template-columns:1fr}
 body.tool-hero-gear .hg-prep-card{grid-column:auto}
 body.tool-hero-gear .hg-stat-gain-grid{grid-template-columns:1fr}
}
@media(max-width:720px){
 body.tool-hero-gear .hero-gear-hero{height:330px!important}
 body.tool-hero-gear .hero-gear-hero .hero-copy{width:100%!important;padding:28px 20px!important}
 body.tool-hero-gear .hg-stock-grid,body.tool-hero-gear .hg-strategy-grid{grid-template-columns:1fr}
 body.tool-hero-gear .gear-grid-2x2{grid-template-columns:1fr!important}
 body.tool-hero-gear .hg-piece-columns{grid-template-columns:1fr}
 body.tool-hero-gear .hg-piece-arrow{min-height:20px;transform:rotate(90deg)}
 body.tool-hero-gear .hg-profile-actions{grid-template-columns:1fr}
 body.tool-hero-gear .hg-bottom-totals{grid-template-columns:1fr!important}
 body.tool-hero-gear .hg-prep-card{grid-template-columns:1fr;text-align:center}.hg-prep-card>img{margin:auto}
}
/* The directional cue is decorative only; it must never steal clicks from the compact
   Current/Target controls when the two sides stack on narrow screens. */
body.tool-hero-gear .hg-piece-arrow{pointer-events:none}
body.tool-hero-gear [data-hg-action]{scroll-margin-top:calc(var(--omni-topbar-h, 76px) + 18px)}

/* 2026-10-03 owner refinement: readable 2x2 troop boards + single-flow Quick-Build. */
body.tool-hero-gear .hg-section-heading-row h2,
body.tool-hero-gear .hg-state-explainer h2,
body.tool-hero-gear .hg-summary-heading h2{font-size:1.42rem!important}
body.tool-hero-gear .hg-section-heading-row p,
body.tool-hero-gear .hg-state-explainer p,
body.tool-hero-gear .hg-summary-heading p{font-size:.86rem!important;line-height:1.5!important}
body.tool-hero-gear .hg-eyebrow{font-size:.72rem!important}
body.tool-hero-gear .hg-stock-copy b{font-size:.84rem!important}
body.tool-hero-gear .hg-stock-copy small{font-size:.64rem!important}
body.tool-hero-gear .hg-profile-head h3{font-size:1.08rem!important}
body.tool-hero-gear .hg-profile-head p{font-size:.75rem!important}
body.tool-hero-gear #heroGearProfileSlotHint{font-size:.69rem!important}

body.tool-hero-gear .hg-workbench-heading{align-items:flex-start!important}
body.tool-hero-gear .hg-workbench-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
body.tool-hero-gear .hg-activate-all,
body.tool-hero-gear .hg-settings-btn{min-height:42px!important;padding:8px 13px!important;font-size:.74rem!important}
body.tool-hero-gear .hg-activate-all{border:1px solid rgba(87,220,241,.34)!important;border-radius:10px!important;background:rgba(12,73,96,.72)!important;color:#e8fbff!important;font-weight:950!important;cursor:pointer}
body.tool-hero-gear .hg-activate-all:hover{background:#12566f!important;border-color:#71e5f7!important}
body.tool-hero-gear .hg-strategy{min-height:84px!important;padding:11px!important}
body.tool-hero-gear .hg-strategy b{font-size:.82rem!important}
body.tool-hero-gear .hg-strategy small{font-size:.66rem!important;line-height:1.3!important}
body.tool-hero-gear .hg-strategy>span{width:38px!important;height:38px!important;font-size:.94rem!important}
body.tool-hero-gear .hg-main-coverage{margin:11px 0 8px!important}
body.tool-hero-gear .hg-main-results{margin-top:10px!important;padding:12px!important;border:1px solid rgba(85,177,210,.25)!important;border-radius:13px!important;background:rgba(4,17,28,.62)!important}
body.tool-hero-gear .quick-custom-empty{min-height:74px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;border:1px dashed rgba(92,170,201,.28)!important;border-radius:10px!important;color:#8da9b8!important;text-align:center!important}
body.tool-hero-gear .quick-custom-empty strong{color:#e8f7fc!important;font-size:.84rem!important}
body.tool-hero-gear .quick-custom-empty span{font-size:.72rem!important;line-height:1.4!important}
body.tool-hero-gear .hg-result-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:9px;padding-bottom:9px;border-bottom:1px solid rgba(83,164,194,.22)}
body.tool-hero-gear .hg-result-head>div>strong{display:block;margin-top:2px;color:#effaff;font-size:1rem;font-weight:950}
body.tool-hero-gear .hg-apply-targets{min-height:37px;padding:7px 12px;border:1px solid rgba(74,222,128,.42);border-radius:9px;background:rgba(22,101,52,.20);color:#a7f3c0;font-size:.69rem;font-weight:950;cursor:pointer;white-space:nowrap}
body.tool-hero-gear .hg-apply-targets:hover{background:rgba(22,101,52,.34);border-color:#86efac}
body.tool-hero-gear .quick-material-summary-title{font-size:.78rem!important}
body.tool-hero-gear .quick-material-chip{padding:8px 9px!important;border-color:rgba(74,222,128,.26)!important;background:linear-gradient(145deg,rgba(16,90,57,.20),rgba(7,28,35,.72))!important}
body.tool-hero-gear .quick-material-chip.short{border-color:rgba(248,113,113,.42)!important;background:linear-gradient(145deg,rgba(127,29,29,.24),rgba(38,13,18,.72))!important}
body.tool-hero-gear .quick-material-chip span{font-size:.68rem!important}
body.tool-hero-gear .quick-material-chip strong{font-size:.86rem!important}
body.tool-hero-gear .quick-material-chip small{font-size:.75rem!important;color:#86efac!important}
body.tool-hero-gear .quick-material-chip.short small{color:#fca5a5!important}
body.tool-hero-gear .quick-budget-card,
body.tool-hero-gear .quick-bottleneck-card{font-size:.75rem!important;line-height:1.45!important}
body.tool-hero-gear .quick-view-tab{font-size:.80rem!important;color:#9ab5c4!important}
body.tool-hero-gear .quick-view-tab.active{color:#f0fbff!important;background:#123d55!important}
body.tool-hero-gear .quick-view-tab span{background:#d5f4ff!important;color:#083247!important;font-size:.68rem!important;font-weight:950!important}
body.tool-hero-gear .quick-piece-summary-copy strong{font-size:.88rem!important}
body.tool-hero-gear .quick-piece-change{font-size:.75rem!important}
body.tool-hero-gear .quick-step-number{display:grid!important;place-items:center!important;min-width:28px!important;height:28px!important;border-radius:999px!important;background:#bfefff!important;color:#06283a!important;font-size:.73rem!important;font-weight:950!important}
body.tool-hero-gear .quick-step-copy strong{font-size:.90rem!important}
body.tool-hero-gear .quick-step-copy span{font-size:.77rem!important}
body.tool-hero-gear .quick-cost-icon{font-size:.70rem!important}

body.tool-hero-gear .hg-custom-panel{padding:16px 18px!important}
body.tool-hero-gear .hg-custom-settings-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:11px;border-bottom:1px solid rgba(87,168,198,.22)}
body.tool-hero-gear .hg-custom-settings-head h2{margin:3px 0 5px;color:#edfaff;font-size:1.25rem;font-weight:950}
body.tool-hero-gear .hg-custom-settings-head p{margin:0;color:#8ca8b8;font-size:.80rem;line-height:1.45}
body.tool-hero-gear .hg-settings-done{min-width:82px;min-height:38px;border:1px solid rgba(96,210,239,.30);border-radius:9px;background:#0b2a3d;color:#e6faff;font-size:.72rem;font-weight:950;cursor:pointer}
body.tool-hero-gear .hg-settings-toolbar{margin-top:11px!important;padding:0!important;border:0!important;background:transparent!important}
body.tool-hero-gear .quick-toolbar-label{font-size:.69rem!important}
body.tool-hero-gear .quick-troop-filter{min-width:126px!important;padding:8px 10px!important;font-size:.80rem!important}
body.tool-hero-gear .quick-troop-filter small{font-size:.68rem!important}
body.tool-hero-gear .quick-priority-panel{margin-top:11px!important;padding:11px!important}
body.tool-hero-gear .quick-priority-copy strong{font-size:.82rem!important}
body.tool-hero-gear .quick-priority-copy span{display:block;margin-top:2px;color:#7896a6;font-size:.68rem;line-height:1.35}
body.tool-hero-gear .quick-priority-slot select{font-size:.75rem!important}

body.tool-hero-gear .hg-state-explainer{grid-template-columns:minmax(0,1fr) auto!important;gap:18px!important;padding:16px 18px!important}
body.tool-hero-gear .hg-state-explainer-copy{min-width:0}
body.tool-hero-gear .hg-state-legend-cards{display:grid!important;grid-template-columns:repeat(3,150px)!important;gap:8px!important}
body.tool-hero-gear .hg-state-sample{display:grid!important;grid-template-columns:52px minmax(0,1fr)!important;align-items:center!important;gap:8px!important;min-height:62px!important;padding:7px 9px!important;border:1px solid!important;border-radius:11px!important;white-space:normal!important}
body.tool-hero-gear .hg-state-sample .hg-sample-gear{display:grid;place-items:center;width:48px;height:48px;border-radius:9px;border:1px solid}
body.tool-hero-gear .hg-state-sample img{width:42px;height:42px;object-fit:contain}
body.tool-hero-gear .hg-state-sample>span:last-child{display:flex;flex-direction:column;gap:2px}
body.tool-hero-gear .hg-state-sample b{font-size:.76rem}.hg-state-sample small{font-size:.63rem;font-weight:850}
body.tool-hero-gear .hg-state-sample.off{color:#d7e1e8!important;border-color:#64748b!important;background:linear-gradient(145deg,rgba(71,85,105,.28),rgba(26,35,45,.52))!important}
body.tool-hero-gear .hg-state-sample.off .hg-sample-gear{border-color:#64748b;background:#334155}.hg-state-sample.off img{filter:grayscale(1) saturate(.1) opacity(.52)}
body.tool-hero-gear .hg-state-sample.mythic{color:#fed7aa!important;border-color:#d97706!important;background:linear-gradient(145deg,rgba(180,83,9,.24),rgba(59,35,9,.52))!important}
body.tool-hero-gear .hg-state-sample.mythic .hg-sample-gear{border-color:#f59e0b;background:#4e2a08}
body.tool-hero-gear .hg-state-sample.legendary{color:#fecaca!important;border-color:#ef4444!important;background:linear-gradient(145deg,rgba(153,27,27,.26),rgba(58,18,22,.54))!important}
body.tool-hero-gear .hg-state-sample.legendary .hg-sample-gear{border-color:#ef4444;background:#4b161b}

/* Each troop becomes a full-width board so its four pieces can stay a readable 2x2 grid. */
body.tool-hero-gear .hg-troops-container{grid-template-columns:1fr!important;gap:15px!important}
body.tool-hero-gear .hg-troops-container .troop-panel{width:100%!important;padding:17px!important;gap:12px!important}
body.tool-hero-gear .troop-panel-title-wrap span{font-size:.66rem!important}
body.tool-hero-gear .troop-panel-title-wrap strong{font-size:1.22rem!important}
body.tool-hero-gear .troop-panel-actions{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important}
body.tool-hero-gear .troop-panel-actions button{min-height:39px!important;padding:7px 10px!important;font-size:.68rem!important}
body.tool-hero-gear .troop-panel-actions .troop-activate-btn{border-color:rgba(94,234,212,.42)!important;background:rgba(13,89,80,.22)!important;color:#b8fff1!important}
body.tool-hero-gear .gear-direction-labels{font-size:.68rem!important}
body.tool-hero-gear .gear-grid-2x2{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
body.tool-hero-gear .gear-box{padding:12px!important;border-radius:15px!important}
body.tool-hero-gear .gear-card-head>span{font-size:.94rem!important}
body.tool-hero-gear .hg-piece-state-btn{min-height:70px!important;padding:8px 10px!important}
body.tool-hero-gear .hg-piece-state-btn img{width:56px!important;height:56px!important;flex-basis:56px!important}
body.tool-hero-gear .hg-piece-state-copy b{font-size:.80rem!important}
body.tool-hero-gear .hg-piece-state-copy small{font-size:.67rem!important;line-height:1.3!important}
body.tool-hero-gear .hg-piece-columns{grid-template-columns:minmax(0,1fr) 30px minmax(0,1fr)!important;gap:8px!important}
body.tool-hero-gear .hg-piece-arrow{min-height:156px!important;font-size:1.05rem!important}
body.tool-hero-gear .hg-side-card{padding:10px!important}
body.tool-hero-gear .hg-side-head>span{font-size:.64rem!important}
body.tool-hero-gear .hg-tier-chip{min-height:27px!important;font-size:.60rem!important}
body.tool-hero-gear .hg-control-label{margin:7px 0 4px!important;font-size:.61rem!important}
body.tool-hero-gear .hg-level-row{grid-template-columns:34px minmax(0,1fr) 34px 44px!important;gap:5px!important;align-items:center!important}
body.tool-hero-gear .hg-level-row button,
body.tool-hero-gear .hg-mastery-stepper>button{height:34px!important;font-size:.88rem!important}
body.tool-hero-gear .hg-level-readout{height:34px!important;font-size:.75rem!important}
body.tool-hero-gear .hg-quick-cycle{grid-column:4;width:42px!important;height:42px!important;margin:0!important;border-radius:50%!important;font-size:.66rem!important;line-height:1!important;padding:0!important;align-self:center!important}
body.tool-hero-gear .hg-mastery-stepper{grid-template-columns:34px minmax(0,1fr) 34px!important;gap:5px!important;clear:both!important}
body.tool-hero-gear .hg-mastery-open{height:34px!important;font-size:.73rem!important}
/* Inline expansion cannot be clipped by the piece or neighboring cards. */
body.tool-hero-gear .hg-mastery-grid{position:relative!important;left:auto!important;top:auto!important;z-index:10!important;width:100%!important;transform:none!important;grid-column:1/-1!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:5px!important;margin-top:5px!important;padding:8px!important;box-sizing:border-box!important}
body.tool-hero-gear .hg-mastery-grid button{min-height:34px!important;font-size:.72rem!important}
body.tool-hero-gear .gear-subtotal-box{margin-top:10px!important;padding:9px!important;gap:7px!important}
body.tool-hero-gear .gear-subtotal-box>div{font-size:.68rem!important;gap:5px!important}
body.tool-hero-gear .gear-subtotal-box .resource-icon{width:24px!important;height:24px!important}
body.tool-hero-gear .error-alert{font-size:.70rem!important}
body.tool-hero-gear .troop-total-box{padding:11px!important}
body.tool-hero-gear .troop-total-title{font-size:.76rem!important}
body.tool-hero-gear .troop-total-values>div{font-size:.71rem!important;padding:7px!important}
body.tool-hero-gear .troop-total-values .resource-icon{width:25px!important;height:25px!important}

/* Explicit light-theme palette for every new/reused interaction surface. */
body.tool-hero-gear.light-theme .hg-planner-main,
body.tool-hero-gear.light-theme .hg-profile-card,
body.tool-hero-gear.light-theme .hg-main-results{background:rgba(255,255,255,.96)!important;border-color:#bfd4df!important;color:#173247!important}
body.tool-hero-gear.light-theme .hg-settings-btn,
body.tool-hero-gear.light-theme .hg-activate-all,
body.tool-hero-gear.light-theme .hg-settings-done{background:#eaf6fb!important;color:#19485f!important;border-color:#9fc7d8!important}
body.tool-hero-gear.light-theme .hg-strategy{background:linear-gradient(145deg,#edf5f9,#dfeaf0)!important;border-color:#afc7d3!important;color:#173247!important}
body.tool-hero-gear.light-theme .hg-strategy b{color:#173247!important}
body.tool-hero-gear.light-theme .hg-strategy small{color:#5f7888!important}
body.tool-hero-gear.light-theme .hg-strategy>span{background:#d9edf5!important;border-color:#9fc6d7!important;color:#17627f!important}
body.tool-hero-gear.light-theme .hg-strategy.primary{background:linear-gradient(135deg,#0a9dc0,#246fc0)!important;color:#fff!important;border-color:#1688ac!important}
body.tool-hero-gear.light-theme .hg-strategy.primary b{color:#fff!important}
body.tool-hero-gear.light-theme .hg-strategy.primary small{color:#e5faff!important}
body.tool-hero-gear.light-theme .hg-strategy.primary>span{background:rgba(255,255,255,.16)!important;color:#fff1a8!important;border-color:rgba(255,255,255,.34)!important}
body.tool-hero-gear.light-theme .quick-status-card{background:#f5fafc!important;border-color:#bed4df!important;color:#29495d!important}
body.tool-hero-gear.light-theme .quick-status-card strong{color:#173247!important}
body.tool-hero-gear.light-theme .quick-status-card span{color:#5d7787!important}
body.tool-hero-gear.light-theme .quick-custom-empty{background:#f7fbfd!important;border-color:#b9ced9!important;color:#607b8c!important}
body.tool-hero-gear.light-theme .quick-custom-empty strong,
body.tool-hero-gear.light-theme .hg-result-head>div>strong{color:#173247!important}
body.tool-hero-gear.light-theme .hg-apply-targets{background:#eaf8ef!important;color:#17633c!important;border-color:#90c8a6!important}
body.tool-hero-gear.light-theme .quick-material-chip{background:linear-gradient(145deg,#effaf4,#f8fdfb)!important;border-color:#a3d2b4!important}
body.tool-hero-gear.light-theme .quick-material-chip.short{background:linear-gradient(145deg,#fff0ef,#fff8f7)!important;border-color:#dfa5a0!important}
body.tool-hero-gear.light-theme .quick-material-chip span{color:#527565!important}
body.tool-hero-gear.light-theme .quick-material-chip strong{color:#173247!important}
body.tool-hero-gear.light-theme .quick-material-chip small{color:#167148!important}
body.tool-hero-gear.light-theme .quick-material-chip.short small{color:#b33d35!important}
body.tool-hero-gear.light-theme .quick-view-tabs{background:#f0f6f9!important;border-color:#bdd1dc!important}
body.tool-hero-gear.light-theme .quick-view-tab{color:#5f7888!important}
body.tool-hero-gear.light-theme .quick-view-tab.active{background:#cfeaf5!important;color:#124f69!important}
body.tool-hero-gear.light-theme .quick-view-tab span{background:#123b51!important;color:#effbff!important}
body.tool-hero-gear.light-theme .quick-step-number{background:#17627f!important;color:#fff!important}
body.tool-hero-gear.light-theme .hg-custom-settings-head{border-color:#bfd4df!important}
body.tool-hero-gear.light-theme .hg-custom-settings-head h2{color:#173247!important}
body.tool-hero-gear.light-theme .hg-custom-settings-head p,
body.tool-hero-gear.light-theme .quick-priority-copy span{color:#607b8c!important}
body.tool-hero-gear.light-theme .quick-priority-panel{background:#f7fbfd!important;border-color:#bfd4df!important}
body.tool-hero-gear.light-theme .quick-priority-copy strong{color:#173247!important}
body.tool-hero-gear.light-theme .quick-priority-slot{background:#fff!important;border-color:#b7ced9!important}
body.tool-hero-gear.light-theme .quick-priority-slot select{background:#fff!important;color:#173247!important;border-color:#a9c4d2!important}
body.tool-hero-gear.light-theme .quick-priority-arrow{color:#367b97!important}
body.tool-hero-gear.light-theme .troop-panel-actions .troop-activate-btn{background:#eaf8f5!important;color:#176457!important;border-color:#8fc9bd!important}
body.tool-hero-gear.light-theme .gear-box.hg-stage-grey{background:#eef2f5!important;border-color:#aebbc4!important}
body.tool-hero-gear.light-theme .gear-box.hg-stage-grey .hg-piece-state-btn{background:#dfe6eb!important;border-color:#aab7c1!important;color:#405665!important}
body.tool-hero-gear.light-theme .gear-box.hg-stage-mythic{background:linear-gradient(145deg,#fff9eb,#fffdf8)!important;border-color:#d9ab51!important}
body.tool-hero-gear.light-theme .gear-box.hg-stage-mythic .hg-piece-state-btn{background:#fff0ce!important;border-color:#d99b33!important;color:#68440b!important}
body.tool-hero-gear.light-theme .gear-box.hg-stage-mythic .hg-piece-state-copy b{color:#9a5b05!important}
body.tool-hero-gear.light-theme .gear-box.hg-stage-red{background:linear-gradient(145deg,#fff0ef,#fffafa)!important;border-color:#d98c88!important}
body.tool-hero-gear.light-theme .gear-box.hg-stage-red .hg-piece-state-btn{background:#ffe0dd!important;border-color:#d97670!important;color:#742d29!important}
body.tool-hero-gear.light-theme .gear-box.hg-stage-red .hg-piece-state-copy b{color:#a6342e!important}
body.tool-hero-gear.light-theme .hg-piece-state-copy small{color:#607888!important}
body.tool-hero-gear.light-theme .hg-side-head>span,
body.tool-hero-gear.light-theme .hg-control-label{color:#567485!important}
body.tool-hero-gear.light-theme .hg-tier-chip{background:#fff1d6!important;color:#8a5707!important;border-color:#d6a447!important}
body.tool-hero-gear.light-theme .hg-tier-chip.red{background:#ffe4e1!important;color:#a13630!important;border-color:#dc7771!important}
body.tool-hero-gear.light-theme .hg-level-readout.mythic{color:#985f08!important;background:#fffaf0!important}
body.tool-hero-gear.light-theme .hg-level-readout.red{color:#a43731!important;background:#fff2f1!important}
body.tool-hero-gear.light-theme .hg-quick-cycle{background:#fff0d2!important;color:#8e5705!important;border-color:#d79a32!important}
body.tool-hero-gear.light-theme .hg-quick-cycle.red{background:#ffe2df!important;color:#a32f29!important;border-color:#d96d67!important}
body.tool-hero-gear.light-theme .gear-subtotal-box{background:#f5fafc!important;border-color:#c2d5de!important}
body.tool-hero-gear.light-theme .gear-subtotal-box>div{color:#304f61!important}
body.tool-hero-gear.light-theme .gear-subtotal-box>div span{color:#765100!important}
body.tool-hero-gear.light-theme .troop-total-title{color:#6d500d!important}

@media(max-width:1180px){
 body.tool-hero-gear .hg-state-explainer{grid-template-columns:1fr!important}
 body.tool-hero-gear .hg-state-legend-cards{grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important}
 body.tool-hero-gear .gear-grid-2x2{grid-template-columns:1fr!important}
}
@media(max-width:720px){
 body.tool-hero-gear .hg-workbench-controls{width:100%;justify-content:stretch}
 body.tool-hero-gear .hg-workbench-controls>button{flex:1}
 body.tool-hero-gear .hg-state-legend-cards{grid-template-columns:1fr!important}
 body.tool-hero-gear .troop-panel-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.tool-hero-gear .hg-piece-columns{grid-template-columns:1fr!important}
 body.tool-hero-gear .hg-piece-arrow{min-height:22px!important;transform:rotate(90deg)}
 body.tool-hero-gear .hg-result-head{align-items:flex-start;flex-direction:column}
 body.tool-hero-gear .hg-apply-targets{width:100%}
}
/* Frozen tool shell sets -webkit-text-fill-color on active tabs; explicitly own it here. */
body.tool-hero-gear .quick-view-tab.active{color:#f0fbff!important;-webkit-text-fill-color:#f0fbff!important}
body.tool-hero-gear .quick-view-tab.active :is(span,b,strong,small){color:inherit!important;-webkit-text-fill-color:inherit!important}
body.tool-hero-gear.light-theme .quick-view-tab.active{color:#fff!important;-webkit-text-fill-color:#fff!important;background:#176f91!important}
body.tool-hero-gear.light-theme .quick-view-tab.active :is(span,b,strong,small){color:inherit!important;-webkit-text-fill-color:inherit!important}

/* 2026-10-03 owner correction pass: restore compact state explainer, modal Customize,
   cumulative preview-only Quick-Build, three-column troop boards, and hold-repeat steppers. */
body.tool-hero-gear .hg-planner-workbench{align-items:start!important}
body.tool-hero-gear .hg-profile-card{align-self:start!important;height:auto!important;min-height:0!important}
body.tool-hero-gear .hg-profile-actions{margin-top:5px!important}

/* Restore the accepted compact Gear State strip. Inline state words reuse the same pill language. */
body.tool-hero-gear .hg-state-explainer{display:grid!important;grid-template-columns:50px minmax(0,1fr) auto!important;align-items:center!important;gap:14px!important;padding:13px 16px!important;margin:0 0 13px!important}
body.tool-hero-gear .hg-state-explainer-icon{width:44px!important;height:44px!important;display:grid!important;place-items:center!important;border:1px solid rgba(100,225,247,.30)!important;border-radius:50%!important;background:radial-gradient(circle,rgba(89,211,239,.14),transparent 70%)!important;color:#7cecff!important;font-size:1.35rem!important}
body.tool-hero-gear .hg-state-legend{display:flex!important;gap:6px!important;flex-wrap:wrap!important;justify-content:flex-end!important}
body.tool-hero-gear .hg-state-legend>span,
body.tool-hero-gear .hg-inline-state{display:inline-flex!important;align-items:center!important;padding:4px 8px!important;border-radius:999px!important;font-size:.66rem!important;font-weight:950!important;line-height:1.1!important;white-space:nowrap!important;border:1px solid!important;vertical-align:baseline!important}
body.tool-hero-gear .hg-inline-state{margin:0 2px!important;transform:translateY(-1px)}
body.tool-hero-gear .hg-state-legend .off,body.tool-hero-gear .hg-inline-state.off{color:#cbd5e1!important;border-color:#64748b!important;background:rgba(71,85,105,.20)!important}
body.tool-hero-gear .hg-state-legend .mythic,body.tool-hero-gear .hg-inline-state.mythic{color:#fed7aa!important;border-color:#f59e0b!important;background:rgba(245,158,11,.13)!important}
body.tool-hero-gear .hg-state-legend .legendary,body.tool-hero-gear .hg-inline-state.legendary{color:#fecaca!important;border-color:#ef4444!important;background:rgba(239,68,68,.13)!important}
body.tool-hero-gear.light-theme .hg-state-legend .off,body.tool-hero-gear.light-theme .hg-inline-state.off{color:#455866!important;background:#e6ebef!important;border-color:#9aa8b2!important}
body.tool-hero-gear.light-theme .hg-state-legend .mythic,body.tool-hero-gear.light-theme .hg-inline-state.mythic{color:#875205!important;background:#fff2d5!important;border-color:#d79a32!important}
body.tool-hero-gear.light-theme .hg-state-legend .legendary,body.tool-hero-gear.light-theme .hg-inline-state.legendary{color:#a2322c!important;background:#ffe4e1!important;border-color:#d96d67!important}

/* Customize is a compact modal window, not another section in page flow. */
body.frozen-tool-page.tool-hero-gear #quickBuildCustomPanel.hg-custom-panel.quick-build-custom-panel{position:fixed!important;left:50%!important;top:50%!important;right:auto!important;bottom:auto!important;transform:translate(-50%,-50%)!important;z-index:2147482500!important;width:min(680px,calc(100vw - 34px))!important;max-height:min(640px,calc(100vh - 120px))!important;overflow:auto!important;margin:0!important;padding:18px!important;border-radius:18px!important;box-shadow:0 0 0 100vmax rgba(0,8,16,.64),0 28px 80px rgba(0,0,0,.62)!important}
body.frozen-tool-page.tool-hero-gear #quickBuildCustomPanel.hg-custom-panel.quick-build-custom-panel[hidden]{display:none!important}
body.tool-hero-gear.hg-custom-modal-open{overflow:hidden!important}
body.tool-hero-gear .hg-custom-settings-head h2{font-size:1.28rem!important}
body.tool-hero-gear .hg-custom-settings-head p{font-size:.78rem!important}

/* Recommendation actions intentionally live below Complete / Step-by-step. */
body.tool-hero-gear .hg-result-actions{display:flex;justify-content:flex-end;align-items:center;gap:9px;margin-top:11px;padding-top:11px;border-top:1px solid rgba(83,164,194,.22)}
body.tool-hero-gear .hg-reset-recommendations,
body.tool-hero-gear .hg-apply-targets{min-height:40px!important;padding:8px 14px!important;border-radius:9px!important;font-size:.72rem!important;font-weight:950!important;cursor:pointer!important}
body.tool-hero-gear .hg-reset-recommendations{border:1px solid rgba(148,163,184,.35)!important;background:rgba(51,65,85,.26)!important;color:#d7e2e9!important}
body.tool-hero-gear .hg-reset-recommendations:hover{border-color:#9fb2bf!important;background:rgba(71,85,105,.42)!important}
body.tool-hero-gear .hg-apply-targets{border:1px solid rgba(74,222,128,.42)!important;background:rgba(22,101,52,.20)!important;color:#a7f3c0!important}
body.tool-hero-gear .hg-apply-targets.applied{background:rgba(22,101,52,.34)!important;border-color:#86efac!important}
body.tool-hero-gear.light-theme .hg-reset-recommendations{background:#eef3f6!important;color:#425a69!important;border-color:#b8c8d1!important}
body.tool-hero-gear.light-theme .hg-apply-targets{background:#eaf8ef!important;color:#17633c!important;border-color:#90c8a6!important}

/* Dark-mode count badges and step numbers own their fill explicitly. */
body.tool-hero-gear #quickStepCountBadge{background:#08293d!important;color:#f4fbff!important;-webkit-text-fill-color:#f4fbff!important;border:1px solid rgba(126,226,255,.38)!important}
body.tool-hero-gear .quick-view-tab.active #quickStepCountBadge{background:#071f30!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
body.tool-hero-gear .quick-step-number{background:#bfefff!important;color:#06283a!important;-webkit-text-fill-color:#06283a!important}
body.tool-hero-gear.light-theme #quickStepCountBadge{background:#123b51!important;color:#fff!important;-webkit-text-fill-color:#fff!important}
body.tool-hero-gear.light-theme .quick-step-number{background:#17627f!important;color:#fff!important;-webkit-text-fill-color:#fff!important}

/* Desktop: Infantry / Lancer / Marksman are side-by-side; each keeps its own 2x2 piece board. */
@media(min-width:1181px){
 body.frozen-tool-page.tool-hero-gear .dashboard-container.hero-gear-v7{width:min(1900px,calc(100vw - 48px))!important;max-width:none!important}
 body.tool-hero-gear .hero-gear-v7{max-width:1960px!important}
 body.tool-hero-gear .hg-troops-container{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important;align-items:start!important}
 body.tool-hero-gear .hg-troops-container .troop-panel{width:auto!important;max-width:none!important;min-width:0!important;padding:13px!important;gap:9px!important}
 body.tool-hero-gear .gear-grid-2x2{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 body.tool-hero-gear .troop-panel-actions{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:5px!important}
 body.tool-hero-gear .troop-panel-actions button{min-height:35px!important;padding:5px!important;font-size:.60rem!important}
 body.tool-hero-gear .gear-box{padding:8px!important}
 body.tool-hero-gear .gear-card-head>span{font-size:.72rem!important}
 body.tool-hero-gear .hg-piece-columns{gap:4px!important;grid-template-columns:minmax(0,1fr) 18px minmax(0,1fr)!important}
 body.tool-hero-gear .hg-side-card{padding:7px!important}
 body.tool-hero-gear .hg-control-label{font-size:.57rem!important}
 body.tool-hero-gear .hg-level-row{grid-template-columns:31px minmax(0,1fr) 31px!important;gap:4px!important}
 body.tool-hero-gear .hg-quick-cycle{grid-column:1/-1!important;width:38px!important;height:38px!important;justify-self:center!important;margin-top:3px!important}
 body.tool-hero-gear .hg-mastery-stepper{grid-template-columns:31px minmax(0,1fr) 31px!important}
 body.tool-hero-gear .hg-mastery-grid{grid-template-columns:repeat(7,minmax(0,1fr))!important;padding:6px!important;gap:3px!important}
 body.tool-hero-gear .hg-mastery-grid button{min-height:30px!important;font-size:.64rem!important;padding:0!important}
 body.tool-hero-gear .gear-subtotal-box{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.tool-hero-gear .troop-total-values{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:1180px){
 body.tool-hero-gear .hg-troops-container{grid-template-columns:1fr!important}
 body.tool-hero-gear .gear-grid-2x2{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.tool-hero-gear .hg-state-explainer{grid-template-columns:42px 1fr!important}
 body.tool-hero-gear .hg-state-legend{grid-column:1/-1!important;justify-content:flex-start!important}
}
@media(max-width:720px){
 body.tool-hero-gear .gear-grid-2x2{grid-template-columns:1fr!important}
 body.tool-hero-gear .hg-result-actions{flex-direction:column-reverse!important;align-items:stretch!important}
 body.tool-hero-gear .hg-result-actions>button{width:100%!important}
}

/* Every +/- control supports press-and-hold repeat; disable browser gesture stealing. */
body.tool-hero-gear [data-hg-action="stock-adjust"],
body.tool-hero-gear [data-hg-action="level-adjust"],
body.tool-hero-gear [data-hg-action="mastery-adjust"]{touch-action:none!important;user-select:none!important;-webkit-user-select:none!important}

/* 2026-10-03 mastery popover + compact stat matrix refinement. */
body.tool-hero-gear .hg-mastery-stepper{position:relative!important;overflow:visible!important;z-index:30!important}
body.tool-hero-gear .hg-mastery-open{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;padding:0 7px!important;line-height:1!important}
/* Mastery is a floating chooser, not an expanding card-within-card. */
body.tool-hero-gear .hg-mastery-grid{
  position:absolute!important;top:calc(100% + 8px)!important;z-index:5000!important;
  width:340px!important;max-width:min(340px,calc(100vw - 32px))!important;
  grid-template-columns:repeat(7,minmax(38px,1fr))!important;gap:7px!important;
  margin:0!important;padding:10px!important;box-sizing:border-box!important;
  border:1px solid rgba(229,178,65,.78)!important;border-radius:13px!important;
  background:linear-gradient(155deg,#071725,#0b1f31)!important;
  box-shadow:0 22px 58px rgba(0,0,0,.70),0 0 0 1px rgba(255,221,132,.06) inset!important;
  transform:none!important;
}
body.tool-hero-gear .hg-mastery-grid[data-hg-mastery-grid="start"]{left:0!important;right:auto!important}
body.tool-hero-gear .hg-mastery-grid[data-hg-mastery-grid="target"]{left:auto!important;right:0!important}
body.tool-hero-gear .hg-mastery-grid button{
  min-width:38px!important;min-height:42px!important;padding:0 4px!important;
  border-radius:9px!important;font-size:.86rem!important;line-height:1!important;font-weight:950!important;
}
body.tool-hero-gear .hg-mastery-grid button.active{box-shadow:0 0 0 2px rgba(255,226,139,.18),0 5px 14px rgba(220,155,30,.22)!important}
body.tool-hero-gear.light-theme .hg-mastery-grid{
  background:linear-gradient(155deg,#ffffff,#f3f8fb)!important;
  border-color:#c79a32!important;box-shadow:0 18px 46px rgba(43,61,77,.24)!important;
}
body.tool-hero-gear.light-theme .hg-mastery-grid button{background:#f4f8fb!important;color:#263e52!important;border-color:#c9d8e2!important}
body.tool-hero-gear.light-theme .hg-mastery-grid button:hover{background:#e8f3f8!important;border-color:#8bb4c8!important}

/* Prevent labels/chips/readouts from escaping compact gear cards. */
body.tool-hero-gear .gear-card-head,
body.tool-hero-gear .hg-piece-state-btn,
body.tool-hero-gear .hg-piece-state-copy,
body.tool-hero-gear .hg-side-card,
body.tool-hero-gear .hg-side-head,
body.tool-hero-gear .hg-level-row,
body.tool-hero-gear .hg-mastery-stepper,
body.tool-hero-gear .gear-subtotal-box>div,
body.tool-hero-gear .troop-total-values>div{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
body.tool-hero-gear .hg-piece-state-copy b,
body.tool-hero-gear .hg-piece-state-copy small,
body.tool-hero-gear .troop-panel-actions button{overflow-wrap:anywhere!important;word-break:normal!important}
body.tool-hero-gear .hg-side-head{flex-wrap:wrap!important;align-content:center!important}
body.tool-hero-gear .hg-side-head>span,
body.tool-hero-gear .hg-tier-chip,
body.tool-hero-gear .hg-level-readout{white-space:nowrap!important;max-width:100%!important}
body.tool-hero-gear .hg-tier-chip{overflow:hidden!important;text-overflow:ellipsis!important}
body.tool-hero-gear .gear-subtotal-box>div,
body.tool-hero-gear .troop-total-values>div{overflow:hidden!important}
body.tool-hero-gear .gear-subtotal-box>div>*:last-child,
body.tool-hero-gear .troop-total-values>div>*:last-child{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important}

/* One shared stat-name column; troop columns contain values only. */
body.tool-hero-gear .hg-stat-gain-matrix{
  display:grid;grid-template-columns:minmax(92px,.76fr) repeat(3,minmax(92px,1fr));
  border:1px solid rgba(79,149,178,.20);border-radius:11px;overflow:hidden;
  background:rgba(8,31,45,.42);
}
body.tool-hero-gear .hg-stat-gain-head,
body.tool-hero-gear .hg-stat-gain-label,
body.tool-hero-gear .hg-stat-gain-value{
  min-width:0;padding:9px 10px;border-right:1px solid rgba(79,149,178,.14);border-bottom:1px solid rgba(79,149,178,.14);
}
body.tool-hero-gear .hg-stat-gain-head{color:#eefaff;font-size:.78rem;font-weight:950;text-align:right}
body.tool-hero-gear .hg-stat-gain-label-head{text-align:left;color:#7f9cac}
body.tool-hero-gear .hg-stat-gain-label{color:#91aab8;font-size:.72rem;font-weight:850}
body.tool-hero-gear .hg-stat-gain-value{color:#8df0ad;font-size:.82rem;font-weight:950;text-align:right;white-space:nowrap}
body.tool-hero-gear .hg-stat-gain-value.negative{color:#fca5a5}
body.tool-hero-gear .hg-stat-gain-matrix>*:nth-child(4n){border-right:0}
body.tool-hero-gear .hg-stat-gain-matrix>*:nth-last-child(-n+4){border-bottom:0}
body.tool-hero-gear.light-theme .hg-stat-gain-matrix{background:#f7fbfd;border-color:#d5e3ea}
body.tool-hero-gear.light-theme .hg-stat-gain-head{color:#20384a}
body.tool-hero-gear.light-theme .hg-stat-gain-label-head,body.tool-hero-gear.light-theme .hg-stat-gain-label{color:#607a8a}
body.tool-hero-gear.light-theme .hg-stat-gain-value{color:#157347}
body.tool-hero-gear.light-theme .hg-stat-gain-value.negative{color:#c24141}

@media(max-width:720px){
  body.tool-hero-gear .hg-mastery-grid{width:min(322px,calc(100vw - 28px))!important;grid-template-columns:repeat(7,minmax(35px,1fr))!important;gap:5px!important;padding:8px!important}
  body.tool-hero-gear .hg-mastery-grid button{min-width:35px!important;min-height:40px!important;font-size:.80rem!important}
  body.tool-hero-gear .hg-stat-gain-matrix{grid-template-columns:minmax(76px,.8fr) repeat(3,minmax(68px,1fr))}
  body.tool-hero-gear .hg-stat-gain-head,body.tool-hero-gear .hg-stat-gain-label,body.tool-hero-gear .hg-stat-gain-value{padding:8px 6px!important}
  body.tool-hero-gear .hg-stat-gain-head{font-size:.69rem!important}
  body.tool-hero-gear .hg-stat-gain-label{font-size:.65rem!important}
  body.tool-hero-gear .hg-stat-gain-value{font-size:.70rem!important}
}

/* Keep compact three-column desktop cards collision-free without sacrificing the 2x2 piece board. */
@media(min-width:1181px){
  body.tool-hero-gear .hg-piece-columns{grid-template-columns:minmax(0,1fr) 10px minmax(0,1fr)!important;gap:2px!important}
  body.tool-hero-gear .hg-side-card{padding:4px!important}
  body.tool-hero-gear .hg-piece-arrow{font-size:.78rem!important}
  body.tool-hero-gear .hg-level-row,
  body.tool-hero-gear .hg-mastery-stepper{grid-template-columns:24px minmax(0,1fr) 24px!important;gap:3px!important}
  body.tool-hero-gear .hg-level-row>button,
  body.tool-hero-gear .hg-mastery-stepper>button{min-width:0!important;padding-left:0!important;padding-right:0!important}
  body.tool-hero-gear .hg-mastery-open{font-size:.67rem!important;padding:0 2px!important}
}
body.tool-hero-gear .gear-box.hg-mastery-popover-open{z-index:250!important}

/* Native top-layer mastery chooser: large, readable and never buried under neighboring gear cards. */
body.tool-hero-gear .hg-mastery-grid[popover]{
  position:fixed!important;
  inset:auto!important;
  left:var(--hg-mastery-popover-left,12px)!important;
  top:var(--hg-mastery-popover-top,12px)!important;
  right:auto!important;
  bottom:auto!important;
  width:var(--hg-mastery-popover-width,340px)!important;
  max-width:calc(100vw - 24px)!important;
  margin:0!important;
  z-index:2147481500!important;
  grid-column:auto!important;
  transform:none!important;
}
body.tool-hero-gear .hg-mastery-grid[popover]:not(:popover-open){display:none!important}
body.tool-hero-gear .hg-mastery-open{font-size:.78rem!important;font-weight:950!important}
body.tool-hero-gear .hg-stat-gain-head{font-size:.82rem!important}
body.tool-hero-gear .hg-stat-gain-label{font-size:.78rem!important}
body.tool-hero-gear .hg-stat-gain-value{font-size:.88rem!important}
@media(min-width:1181px){body.tool-hero-gear .hg-mastery-open{font-size:.74rem!important}}
