/* Menu tidy-ups (menu-tidy.js). Loaded after ui-review.css. */

/* ---------- One badge style: teal count, dark text ---------- */
.hx-badge,
html body #lobby.home-menu :is(#chest-action,#phone-rewards-open,#rank-road-open,#season-pass-open).claim-notice::after,
html body .wardrobe-menu-new,
html body #lobby .guild-launcher>.guild-notification{
 display:inline-grid!important;place-items:center;min-width:20px!important;height:20px!important;padding:0 6px!important;box-sizing:border-box;
 border-radius:999px!important;background:#7fe3d3!important;color:#0f2a27!important;border:1.5px solid #e6fffa!important;
 font:800 11px/1 system-ui,sans-serif!important;box-shadow:0 0 10px #7fe3d388!important;text-shadow:none!important}
.hx-badge{position:absolute;top:-7px;right:-7px;z-index:6;pointer-events:none}
html body #whats-new-open.news-unread::after{background:#7fe3d3!important;border-color:#1b1426!important;box-shadow:0 0 8px #7fe3d3aa}

/* Chests → Buy chests: the shop's own tabs give way to My chests / Buy chests. */
html body .academy-shop.as-chests>.shop-tabs,html body .academy-shop.as-chests .shop-section-heading{display:none!important}
.chest-switch{display:flex;gap:8px;margin:0 0 8px}
html body #hub-dialog .academy-shop .chest-switch>button{flex:1 1 0!important;height:42px!important;border-radius:12px!important;border:1.5px solid #b79a6a88!important;background:linear-gradient(#3b2a52,#271b38)!important;color:#e8dcf3!important;font:700 15px/1 Georgia,serif!important;box-shadow:none!important}
html body #hub-dialog .academy-shop .chest-switch>button.is-active{background:linear-gradient(135deg,#ffe5a0,#c49b5d)!important;color:#2d213e!important;border-color:#fff0c4!important;box-shadow:0 3px #735938!important}
.chest-switch>button{flex:1 1 0;height:42px;border-radius:12px;border:1.5px solid #b79a6a88;background:linear-gradient(#3b2a52,#271b38);color:#e8dcf3;font:700 15px/1 Georgia,serif;cursor:pointer}
.chest-switch>button.is-active{background:linear-gradient(135deg,#ffe5a0,#c49b5d);color:#2d213e;border-color:#fff0c4;cursor:default}

@media (orientation:landscape) and (max-height:500px){
 .chest-switch>button{height:36px;font-size:14px}
 html body #hub-dialog .academy-shop .chest-switch>button{height:36px!important;font-size:14px!important}
}

/* ---------- Home groups: the styled tiles sit in panels like the Rewards panel ---------- */
html body.hex-desktop-screens #lobby.home-menu.home-grouped .lobby-tools>nav.hub-nav{border:1px solid #b49a68;border-bottom:4px solid #665039;border-radius:24px 24px 12px 12px;
 background:linear-gradient(#211a3299,#211a32bb),url('art/academy-honors.svg') center/100% 100% no-repeat;box-shadow:inset 0 0 0 3px #1c172880,inset 0 0 0 4px #d1b98633,0 7px 18px #100a2255;
 padding:8px 10px 10px!important;box-sizing:border-box;height:auto!important}
html body.hex-desktop-screens #lobby.home-menu.home-grouped .home-group-title{display:block;margin:0 0 8px!important;font:700 13px/18px Georgia,serif!important;letter-spacing:.1em;text-transform:uppercase;color:#f0d8a4;text-align:center;border-bottom:1px solid #bda47755;padding-bottom:4px}
html body.hex-desktop-screens #lobby.home-menu.home-grouped .lobby-tools>nav.hub-nav>.menu-group:not(:has(#wizard-menu-links)){display:none!important}
html body.hex-desktop-screens #lobby.home-menu.home-grouped .lobby-tools{gap:10px!important}
/* Rewards panel now holds Your chests and the Season Pass banner. */
html body.hex-desktop-screens #lobby.home-menu.home-grouped:not(.home-phone-fit) .lobby-tools>.home-rewards{grid-template-rows:18px auto auto!important;gap:8px!important;padding:8px 10px 10px!important;height:auto!important}
html body.hex-desktop-screens #lobby.home-menu.home-grouped:not(.home-phone-fit) .home-rewards>#season-pass-open{width:100%!important;margin:0!important;min-height:0!important;height:76px!important}
/* Phones: no room for panel headings; the tiles keep their own labels. */
html body #lobby.home-menu.home-grouped.home-phone-fit .home-group-title{display:none!important}
html body.hex-desktop-screens #lobby.home-menu.home-grouped.home-phone-fit .lobby-tools>nav.hub-nav{padding:5px!important;border-radius:16px 16px 10px 10px;border-bottom-width:3px}

/* ---------- Links between related screens ---------- */
/* Research heading: a Wardrobe chip next to "collected" (same pill style). */
html body #hub-dialog .lr-heading>.tidy-to-wardrobe{display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px;border-radius:999px;cursor:pointer;
 border:1px solid #b79a6a99;background:linear-gradient(#3b2a52,#271b38);color:#f2d998;font:700 13px/1 Georgia,serif;box-shadow:inset 0 1px #ffffff1a}
html body #hub-dialog .lr-heading>.tidy-to-wardrobe:hover{border-color:#f2d998}
html body #hub-dialog .lr-heading>.tidy-to-wardrobe img{width:18px;height:18px}
/* Phone "Your Chests" card: chest art instead of the sparkle. */
html body #lobby#lobby #phone-rewards-open#phone-rewards-open>img.phone-rewards-art{grid-row:1/3;width:72px!important;height:72px!important;min-width:72px;margin-left:-10px;max-width:none!important;max-height:none!important;object-fit:contain;filter:drop-shadow(0 3px 5px #0008);align-self:center;justify-self:center}
html body #lobby#lobby.home-phone-fit #phone-rewards-open#phone-rewards-open{grid-template-columns:62px 1fr!important}

/* ---------- "Hexbound was updated" notice (refresh-notice.js) ---------- */
.refresh-notice{position:fixed;left:50%;bottom:18px;transform:translateX(-50%);z-index:2147483000;display:flex;align-items:center;gap:12px;max-width:min(560px,calc(100vw - 32px));padding:10px 12px 10px 14px;box-sizing:border-box;
 border:1px solid #b49a68;border-bottom:4px solid #665039;border-radius:18px;background:linear-gradient(#2b2040f2,#1b142bf2);box-shadow:inset 0 0 0 3px #1c172880,inset 0 0 0 4px #d1b98633,0 10px 30px #05020e99;color:#eee0c8}
.refresh-notice[hidden]{display:none}
.refresh-notice[popover]{margin:0;inset:auto auto 18px 50%;overflow:visible}
.refresh-notice[popover]::backdrop{display:none}
.refresh-notice>img{width:46px;height:46px;flex:0 0 auto;filter:drop-shadow(0 3px 5px #0008)}
.refresh-notice>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.refresh-notice strong{font:700 17px/1.1 Georgia,"Times New Roman",serif;color:#f2ddaf}
.refresh-notice small{font:600 12.5px/1.3 system-ui,sans-serif;color:#d8cbe6}
.refresh-notice .update-refresh{flex:0 0 auto;height:42px;padding:0 18px;border-radius:12px;cursor:pointer;border:1px solid #fff0c4;border-bottom:3px solid #8a6a3c;
 background:linear-gradient(135deg,#ffe5a0,#c49b5d);color:#2d213e;font:800 15px/1 Georgia,serif;box-shadow:0 0 14px #edc97144}
.refresh-notice .update-refresh:hover{filter:brightness(1.08)}
.refresh-notice .update-later{flex:0 0 auto;width:34px;height:34px;border-radius:50%;cursor:pointer;border:1px solid #b79a6a88;background:#271b38;color:#e8dcf3;font:700 18px/1 system-ui}
.loot-unknown-art{width:72%;height:72%;object-fit:contain;filter:drop-shadow(0 4px 8px #0008)}
@media (orientation:landscape) and (max-height:500px){.refresh-notice{bottom:8px;padding:6px 8px 6px 10px;gap:8px}.refresh-notice>img{width:34px;height:34px}.refresh-notice strong{font-size:15px}.refresh-notice small{font-size:11px}.refresh-notice .update-refresh{height:36px;padding:0 12px;font-size:14px}}
