/* Header-only selectors keep shared chrome out of the Sim editor cascade. */
body>header .account-control{position:relative}
body>header #account-button.header-character-trigger{display:flex;align-items:center;gap:8px;max-width:230px;min-height:42px;padding:5px 9px}
body>header #account-button.header-character-trigger>.character-identity-portrait,body>header #account-button.header-character-trigger>.armory-class-icon{position:relative;display:block;width:30px;height:30px;flex:0 0 30px;object-fit:cover}
body>header #account-button.header-character-trigger .character-face{display:block;width:100%;height:100%;object-fit:cover;border:1px solid #9d80454d;border-radius:4px}
body>header #account-button.header-character-trigger .character-class-badge{position:absolute;right:-2px;bottom:-2px;width:13px;height:13px;border:1px solid #2a2116;border-radius:3px}
body>header .header-active-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:650}
body>header .header-character-chevron{display:flex;align-items:center;justify-content:center;width:16px;height:16px;flex:0 0 16px;color:#bfa67a}
body>header .header-character-chevron svg{display:block;width:16px;height:16px}
body>header #account-menu-toggle>svg{width:18px;height:18px;display:block;margin:auto}
body>header .account-control:has(#account-button.header-character-trigger)>:is(#account-button,#account-menu-toggle){box-sizing:border-box;height:44px;min-height:44px;align-self:center}
body>header .header-character-options{position:absolute;left:auto!important;right:0!important;top:calc(100% + 6px);box-sizing:border-box;width:320px;max-width:calc(100vw - 24px);max-height:min(420px,65vh);overflow:auto;overscroll-behavior:contain;z-index:80;padding:5px;border:1px solid #9c7d45;border-radius:5px;background:#242017;box-shadow:0 10px 25px #0008}
body>header .header-character-options .linked-switcher-option{box-sizing:border-box;display:flex;align-items:center;width:100%;min-height:57px;padding:10px!important;border:1px solid transparent;border-radius:3px;background:transparent;text-align:left;color:#e8cea0}
body>header .header-character-options .linked-switcher-option[aria-current=true]{border-color:#90703c;background:#d2ab5c0b}
body>header .header-character-options .armory-identity{display:flex;align-items:center;gap:9px;width:100%;min-width:0}
body>header .header-character-options .armory-identity>span:not(.character-identity-portrait){display:flex;flex-direction:column;min-width:0}
body>header .header-character-options .armory-identity strong{font-size:13px;line-height:1.4;color:#f1d196}
body>header .header-character-options .armory-identity small{font-size:11px;line-height:1.5;color:#bda77d}
body>header .header-character-options .character-identity-portrait,body>header .header-character-options .armory-class-icon{position:relative;display:block;width:34px;height:34px;flex:0 0 34px;object-fit:cover}
body>header .header-character-options .character-face{display:block;width:100%;height:100%;object-fit:cover;border-radius:4px}
body>header .header-character-options .character-class-badge{position:absolute;right:-3px;bottom:-3px;width:16px;height:16px;border:2px solid #242017;border-radius:3px}
body>header .header-character-options .armory-faction-mark{width:19px;height:25px;object-fit:contain;flex:none;margin-left:auto}
body>header .header-character-options .linked-all-characters{display:block;padding:10px;border-top:1px solid #77613c44;font-size:12px;text-align:left}
body>header .header-character-options .linked-switcher-option:disabled{opacity:.45;cursor:default}
body>header .header-character-options .linked-switcher-option{max-width:none!important;width:100%!important}
body>header .header-character-options .armory-identity{flex:1;min-width:0}
body>header .header-character-options .armory-identity>span:not(.character-identity-portrait){flex:1}
body>header .header-character-options .linked-switcher-option>small{display:none}
#armory-search-page .public-armory-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px;width:auto;flex-basis:auto}
#armory-search-page .public-armory-actions .public-armory-last-checked{margin:0;font-size:11px}
@media(max-width:759px){html body>header:has(.site-header-search) .account-control #account-button.header-character-trigger{width:40px;max-width:40px;height:40px;min-height:40px;padding:5px;gap:0}body>header .header-active-name,body>header .header-character-chevron{display:none}body>header .header-character-options{max-height:min(380px,60vh)}}
/* Refresh sits beside identity when space allows, with the same frame as Sim. */
#armory-search-page .gear-upgrades-view .upgrade-character-overview{grid-column:1;grid-row:1/3;display:flex;align-items:center;align-content:flex-start;flex-wrap:wrap;gap:18px 24px;min-width:0}
#armory-search-page .upgrade-character-overview>.public-character-view{flex:0 1 auto;width:max-content;min-width:0;max-width:100%}
#armory-search-page .gear-upgrades-view .upgrade-character-overview>.public-armory-actions{display:flex;width:auto;flex:0 0 auto;align-items:center;padding:0;margin:0}
#armory-search-page .upgrade-character-overview .upgrade-refresh-group{display:flex;align-items:center;gap:10px;margin:0}
#armory-search-page .upgrade-character-overview .upgrade-refresh-group>.public-armory-refresh{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:3px;border:1px solid #725a37;border-radius:5px;background:#292217;color:#e7c482;opacity:1}
#armory-search-page .upgrade-character-overview .upgrade-refresh-group>.public-armory-last-checked{white-space:nowrap;max-width:none;margin:0;font-size:11px;color:#b9a47d}
@media(max-width:1149px){#armory-search-page .gear-upgrades-view .upgrade-character-overview{grid-row:1/3}}
@media(max-width:720px){#armory-search-page .gear-upgrades-view .upgrade-character-overview{gap:14px}#armory-search-page .upgrade-character-overview>.public-character-view{flex-basis:100%}#armory-search-page .upgrade-character-overview .upgrade-refresh-group>.public-armory-last-checked{font-size:10px}}
@media(max-width:759px){body>header .account-control:has(#account-button.header-character-trigger)>:is(#account-button,#account-menu-toggle){height:40px;min-height:40px}}

/* Center identity and refresh beside the taller performance card on desktop. */
@media(min-width:1150px){#armory-search-page .gear-upgrades-view .upgrade-character-overview{align-self:center}}


/* Shared guest connection action, matching the main application header. */
body>header .account-control #account-button.account-connect-branded{position:relative;display:flex;align-items:center;gap:9px;min-height:44px;min-width:0;max-width:230px;padding:11px 16px 11px 46px;background:linear-gradient(135deg,#0877b6,#075784);border:1px solid #39a9df;color:#fff;font-size:12px;font-weight:600;line-height:1.3;box-shadow:0 3px 14px #008aca20;border-radius:4px}
body>header .account-control #account-button.account-connect-branded::before{content:'';position:absolute;left:13px;top:50%;transform:translateY(-50%);width:23px;height:23px;background:url('battlenet-mark.svg') center/contain no-repeat}
body>header .account-control #account-button.account-connect-branded:hover{background:linear-gradient(135deg,#168dcc,#0c6ba0);border-color:#6bcaff}
body>header .account-control #account-button.account-connect-branded:focus-visible{outline:3px solid #72cff2;outline-offset:3px}
@media(max-width:600px){body>header .account-control #account-button.account-connect-branded{max-width:140px;font-size:11px;padding-right:10px}}

@media(max-width:360px){body>header .account-control #account-button.account-connect-branded{max-width:125px;font-size:10px;padding-left:38px}body>header .account-control #account-button.account-connect-branded::before{left:10px;width:20px;height:20px}}
