/* Monarch 47: a compact, themed sorting disclosure. */
.inventory-v3 .inventory-sort-control{display:block;position:relative;flex:0 1 auto;font-size:14px;max-width:100%;color:#dce7ef}
.inventory-v3 .sort-menu{position:relative;min-width:218px;max-width:100%}
.inventory-v3 .sort-menu summary{list-style:none;cursor:pointer;user-select:none}
.inventory-v3 .sort-menu summary::-webkit-details-marker{display:none}
.inventory-v3 .sort-trigger{display:flex;align-items:center;gap:12px;min-height:42px;padding:10px 12px;border:1px solid #355066;border-radius:9px;background:#172b3b;color:#dce7ef;box-shadow:0 2px 6px #06101b30}
.inventory-v3 .sort-trigger-label{display:inline-flex;align-items:center;gap:8px;white-space:nowrap;font-weight:500}
.inventory-v3 .sort-trigger-label>.icon{width:16px;height:16px;color:#a1b9cb}
.inventory-v3 .sort-current{margin-left:auto;font-size:12px;line-height:1.3;color:#b4d597;white-space:nowrap}
.inventory-v3 .sort-chevron{width:14px;height:14px;flex:none;margin-left:auto;color:#92aebf;transition:transform .15s ease}
.inventory-v3 .sort-trigger>.sort-chevron{margin-left:0;transform:rotate(90deg)}
.inventory-v3 .sort-menu[open]>.sort-trigger{border-color:#709263;background:#1d322b}
.inventory-v3 .sort-menu[open]>.sort-trigger>.sort-chevron{transform:rotate(-90deg);color:#b8e79b}
.inventory-v3 .sort-trigger:hover{border-color:#58788c;background:#1e3446}
.inventory-v3 .sort-popover{position:absolute;top:calc(100% + 8px);right:0;z-index:20;width:248px;max-width:calc(100vw - 40px);padding:7px;border:1px solid #375166;border-radius:12px;background:#122331;box-shadow:0 12px 32px #030a12a6,0 2px 5px #030a1270}
.inventory-v3 .sort-section{margin:0}
.inventory-v3 .sort-section-heading,.inventory-v3 .sort-direct{display:flex;align-items:center;gap:10px;width:100%;min-height:43px;padding:10px;border:0;border-radius:7px;background:transparent;color:#dce7ef;font:inherit;font-size:14px;line-height:1.3;text-align:left}
.inventory-v3 .sort-section-heading>.icon:first-child,.inventory-v3 .sort-letter{width:18px;height:18px;flex:none;color:#9ab6c9}
.inventory-v3 .sort-letter{display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:600}
.inventory-v3 .sort-section-heading:hover,.inventory-v3 .sort-direct:hover{background:#20374a}
.inventory-v3 .sort-section[open]>.sort-section-heading{background:#1b3041}
.inventory-v3 .sort-section[open]>.sort-section-heading>.sort-chevron{transform:rotate(90deg)}
.inventory-v3 .sort-submenu{display:grid;gap:3px;margin:5px 3px 7px 18px;padding-left:9px;border-left:1px solid #375366}
.inventory-v3 .sort-choice{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:37px;padding:9px 10px;border:0;border-radius:6px;background:transparent;color:#aebfcd;text-align:left;font:inherit;font-size:13px;line-height:1.3}
.inventory-v3 .sort-choice:hover{background:#20374a;color:#edf5f9}
.inventory-v3 .sort-choice.is-selected,.inventory-v3 .sort-direct.is-selected{background:#253b2d;color:#b8ee98}
.inventory-v3 .sort-choice-check{display:flex;align-items:center;justify-content:center;width:16px;height:16px;flex:none;margin-left:auto;color:#adf07f}
.inventory-v3 .sort-choice-check>.icon{width:16px;height:16px}
.inventory-v3 .sort-menu summary:focus-visible,.inventory-v3 .sort-menu button:focus-visible{outline:2px solid #a6ff72;outline-offset:2px}
/* Restore the pre-46 label typography and its single soft shadow; retain the brighter white. */
.purchase-v3 .district{font-size:12px;font-weight:400;letter-spacing:.2em;text-shadow:0 1px 7px #000;color:#e3ededd9}
@media(max-width:760px){
 .purchase-v3 .district{font-size:7px}
 .purchase-v3 .district-downtown{font-size:8px}
 .inventory-v3 .inventory-sort-control{flex:0 1 auto;margin-left:auto}
 .inventory-v3 .sort-menu{min-width:210px}
}
@media(prefers-reduced-motion:reduce){.inventory-v3 .sort-chevron{transition:none}}
/* Share one height and one gap across the level, profile and balance controls. */
.header .header-right{--account-height:47px;--account-gap:16px;column-gap:var(--account-gap);justify-content:flex-end}
.header .header-right .rank-badge{height:var(--account-height)}
.header .header-right .account-controls{column-gap:var(--account-gap)}
.header .profile-sound{flex:none}
.header .profile-sound .profile-button{width:var(--account-height);height:var(--account-height);padding:10px;flex:none}
.header .profile-sound .profile-button .icon{width:27px;height:27px}
@media(max-width:1150px){.header .header-right{--account-gap:12px}}
@media(max-width:760px){
 .header .header-right{--account-height:42px;--account-gap:8px}
 .header .profile-sound .profile-button{padding:9px}
 .header .profile-sound .profile-button .icon{width:24px;height:24px}
}
@media(max-width:370px){.header .header-right{--account-gap:6px}}
