/* The header uses content-sized groups so the wallet can never sit under Account. */
html body #lobby.home-menu .home-header{display:flex!important;flex-wrap:nowrap!important;gap:14px!important;padding:0 12px!important;align-items:center;box-sizing:border-box}
html body #lobby.home-menu .home-header .game-title{flex:0 1 220px!important;min-width:170px!important;width:220px!important;margin:0!important}
html body #lobby.home-menu .home-header #whats-new-open{flex:0 0 auto!important;width:auto!important;min-width:0!important;margin:0!important;padding:8px 14px!important;font:700 17px Georgia,serif!important;white-space:nowrap}
html body #lobby.home-menu .home-header .game-top{flex:1 1 auto!important;min-width:0!important;width:auto!important;margin:0!important}
html body #lobby.home-menu .home-header .game-profile{display:flex!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;gap:10px!important;align-items:center!important;justify-content:flex-end!important;margin:0!important}
html body #lobby.home-menu .home-header #wallet{display:flex!important;flex:0 1 auto!important;width:auto!important;min-width:0!important;gap:8px!important;align-items:center!important;margin:0!important}
html body #lobby.home-menu .home-header #wallet .currency{display:flex!important;flex:0 1 auto!important;min-width:0!important;gap:6px!important;padding:5px 6px 5px 10px!important;white-space:nowrap;box-sizing:border-box;height:var(--header-control);min-height:var(--header-control)!important;border:1px solid #a98cbd55!important;background:#20162f!important}
html body #lobby.home-menu .home-header{--header-control:var(--home-control-height,52px)}
html body #lobby.home-menu .home-header #wallet .currency>b{font-size:16px!important}
html body #lobby.home-menu .home-header #wallet .wallet-plus{flex:0 0 32px!important;width:32px!important;min-width:32px!important;height:calc(var(--header-control) - 12px)!important;min-height:32px!important;padding:0!important;font-size:23px!important;color:#f4dfb2}
html body #lobby.home-menu .home-header #wallet .wallet-shop{flex:0 0 106px!important;width:106px!important;min-width:106px!important;height:var(--header-control)!important;min-height:var(--header-control)!important;padding:7px 12px!important;gap:7px!important}
html body #lobby.home-menu .home-header #wallet .wallet-shop-label{font-size:20px!important}
html body #lobby.home-menu .home-header :is(#account-open,#settings-button){flex:0 0 var(--header-control)!important;width:var(--header-control)!important;min-width:var(--header-control)!important;max-width:var(--header-control)!important;height:var(--header-control)!important;min-height:var(--header-control)!important;max-height:none!important;margin:0!important;padding:0!important;box-sizing:border-box}
/* Keep the existing accessible account name while presenting the wizard seal. */
html body #lobby.home-menu .home-header #account-open{font-size:0!important;text-shadow:none!important;color:transparent!important;overflow:hidden}
html body #lobby.home-menu .home-header #account-open:before{left:50%;top:50%;transform:translate(-50%,-50%);width:32px;height:32px}
html body #lobby.home-menu .home-header #whats-new-open{height:var(--header-control)!important;min-height:var(--header-control)!important;border:1px solid #b49a68!important;border-bottom:3px solid #665039!important;border-radius:12px;background:linear-gradient(#4b365d,#2a1e38)!important;color:#f2dba9!important;box-shadow:inset 0 0 0 3px #cbb37a22!important}
html body #lobby.home-menu .home-header button:focus-visible{outline:2px solid #ffe1a2!important;outline-offset:3px}
html body #lobby.home-menu.home-phone-fit .home-header{gap:10px!important}
html body #lobby.home-menu.home-phone-fit .home-header .game-title{flex-basis:185px!important;width:185px!important}

/* A larger primary action stays inside the center column, with room for its hat and wand. */
html body.hex-desktop-screens #lobby.home-menu .play-panel>#play-solo.enchanted-play{width:calc(100% - 24px)!important;max-width:430px!important;min-width:0!important;height:84px!important;min-height:84px!important;flex:0 0 84px!important;margin:12px 0 16px!important}
html body #lobby.home-menu #play-solo.enchanted-play #play-solo-label{font-size:40px;letter-spacing:.19em}
html body #lobby.home-menu .play-panel>.rename-scroll{bottom:203px}
html body #lobby.home-menu.home-phone-fit .play-panel>#play-solo.enchanted-play{height:76px!important;min-height:76px!important;flex-basis:76px!important;margin:8px 0 12px!important}
html body #lobby.home-menu.home-phone-fit .play-panel>.rename-scroll{bottom:190px}

/* Mode plaque is a separate keyboard/touch target, attached below Play. */
html body #lobby.home-menu #change-play-mode{order:2;flex:0 0 42px;width:calc(100% - 24px);max-width:430px;min-height:42px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 16px;margin:-17px 0 16px;border:1px solid #c7a66e;border-top-color:#b28acc66;border-bottom:3px solid #614531;border-radius:0 0 12px 12px;background:linear-gradient(#382445,#261b35);color:#eed8aa;font:700 13px Georgia,serif;position:relative;z-index:3}
html body #lobby.home-menu #change-play-mode .quick-play-current{color:#e2ccef;white-space:nowrap}
html body #lobby.home-menu #change-play-mode .quick-play-change{white-space:nowrap}
html body #lobby.home-menu #change-play-mode b{font:700 19px system-ui;margin-left:5px}
html body #lobby.home-menu #change-play-mode:hover{background:linear-gradient(#50315f,#30203e)}
html body #lobby.home-menu #change-play-mode:focus-visible{outline:2px solid #ffe2a6;outline-offset:3px}
html body #lobby.home-menu .play-panel>#play-solo.enchanted-play{border-radius:13px 13px 0 0;}
html body #lobby.home-menu .play-panel>.rename-scroll{bottom:225px}
html body #lobby.home-menu.home-phone-fit .play-panel>.rename-scroll{bottom:212px}
html body #lobby.home-menu.home-phone-fit #change-play-mode{margin-top:-13px;font-size:12px;padding-inline:10px}
html body #lobby.home-menu #change-play-mode{margin-top:-25px}
html body #lobby.home-menu.home-phone-fit #change-play-mode{margin-top:-21px}
html body #lobby.home-menu .play-panel>.rename-scroll{bottom:258px}
html body #lobby.home-menu.home-phone-fit .play-panel>.rename-scroll{bottom:245px}
html body.hex-desktop-screens #lobby.home-menu .play-panel>.center-wizard-stage{bottom:275px!important}
html body.hex-desktop-screens #lobby.home-menu.home-phone-fit .play-panel>.center-wizard-stage{bottom:285px!important}

/* Icon-only account control: account updates can change its accessible text, never its visual width. */
html body #lobby.home-menu .home-header #account-open#account-open{font-size:0!important;line-height:0!important;text-indent:-9999px!important;text-shadow:none!important;color:transparent!important;position:relative;overflow:hidden!important}
html body #lobby.home-menu .home-header #account-open#account-open::before{text-indent:0!important;content:''!important;display:block!important;position:absolute!important;left:50%!important;top:50%!important;width:34px!important;height:34px!important;transform:translate(-50%,-50%)!important;background:url('art/ui-wizard.svg?v=unframed-2') center/contain no-repeat!important;border:0!important;box-shadow:none!important;border-radius:0!important}

/* Short landscape screens keep the secondary actions inside the stage. */
html body #lobby.home-menu .home-header #wallet .wallet-shop-label{white-space:nowrap!important}
html body #lobby.home-menu .home-header #wallet .wallet-shop{padding-inline:5px!important;gap:3px!important}
@media(max-height:360px){
 html body #lobby.home-menu.home-phone-fit .play-panel{translate:0 -44px}
 html body #lobby.home-menu.home-phone-fit .rank-progress-box{padding:3px 6px!important}
 html body #lobby.home-menu.home-phone-fit #rank-next{font-size:18px!important;line-height:1!important;white-space:nowrap!important}
 html body #lobby.home-menu.home-phone-fit #rank-gap{display:none!important}
}

/* Anchor the complete action stack inside the grid, including the mode plaque. */
html body.hex-desktop-screens #lobby.home-menu .play-panel{align-self:stretch!important;height:100%!important;min-height:0!important;box-sizing:border-box!important;padding:0 0 14px!important;justify-content:flex-end!important;translate:none!important}
html body.hex-desktop-screens #lobby.home-menu .play-panel>.pc-battle-utilities{flex-shrink:0!important;margin-bottom:0!important}

html body.hex-desktop-screens #lobby.home-menu .home-battle>.title-content,html body.hex-desktop-screens #lobby.home-menu .home-battle .game-menu{height:100%!important;min-height:0!important;box-sizing:border-box!important}

/* The wallet and account remain one right-aligned group; news is a quiet shortcut. */
html body #lobby.home-menu .home-header #whats-new-open{font-size:14px!important;padding:6px 10px!important;height:42px!important;min-height:42px!important;border-bottom-width:2px!important;position:relative}
html body #lobby.home-menu .home-header #whats-new-open svg{width:18px!important;height:18px!important}
#whats-new-open.news-unread::after{content:'';position:absolute;right:4px;top:4px;width:8px;height:8px;border-radius:50%;background:#ffe19b;border:2px solid #44304f}
html body #lobby.home-menu .home-header .game-profile{gap:8px!important}
html body #lobby.home-menu .pc-battle-utilities{gap:12px!important;margin-top:8px!important}
html body #lobby.home-menu .pc-battle-utilities :is(.discord-link,#watch-background){background:linear-gradient(#30233dcc,#21192c)!important;box-shadow:inset 0 0 0 2px #b7996633!important;border-color:#897354!important;color:#ddc9a2!important}
html body #lobby.home-menu .play-panel>.center-wizard-stage::before{content:'';position:absolute;inset:-20px -35px -5px;border-radius:50%;background:radial-gradient(ellipse,#c7a0ef22 0%,#ae83d414 35%,transparent 70%);pointer-events:none;z-index:-1}
#lobby.home-menu :is(#chest-action,#phone-rewards-open,#rank-road-open,#season-pass-open).claim-notice::after{content:attr(data-claim-count);position:absolute;right:8px;top:5px;min-width:20px;height:20px;padding:0 4px;box-sizing:border-box;display:grid;place-items:center;border-radius:10px;background:#f0ce83;color:#35233e;border:1px solid #fff0c0;font:700 12px/1 system-ui;box-shadow:0 2px 6px #140a23;z-index:6}

/* The guide occupies a header slot, never overlays a reward control. */
html body #lobby.home-menu .home-header #menu-tour-help{position:relative!important;inset:auto!important;transform:none!important;flex:0 0 var(--header-control)!important;width:var(--header-control)!important;min-width:var(--header-control)!important;height:var(--header-control)!important;min-height:var(--header-control)!important;margin:0!important;padding:0!important;font:700 23px Georgia!important;border-radius:12px!important}

/* Size contents along with their accessible control boxes. */
html body #lobby.home-menu .home-header{--header-icon:calc(var(--header-control)*.48)}
html body #lobby.home-menu .home-header #whats-new-open{height:var(--header-control)!important;min-height:var(--header-control)!important;font-size:calc(var(--header-control)*.29)!important}
html body #lobby.home-menu .home-header #whats-new-open svg{width:calc(var(--header-control)*.36)!important;height:calc(var(--header-control)*.36)!important}
html body #lobby.home-menu .home-header #wallet .currency{height:var(--header-control)!important;gap:5px!important;padding:4px 5px!important}
html body #lobby.home-menu .home-header #wallet .currency>b{font-size:calc(var(--header-control)*.34)!important}
html body #lobby.home-menu .home-header #wallet .currency>:is(img,svg,.currency-icon){width:calc(var(--header-control)*.36)!important;height:calc(var(--header-control)*.36)!important;flex-shrink:0}
html body #lobby.home-menu .home-header #wallet .wallet-plus{height:calc(var(--header-control)*.72)!important;min-height:0!important;width:calc(var(--header-control)*.58)!important;min-width:0!important;flex-basis:calc(var(--header-control)*.58)!important;font-size:calc(var(--header-control)*.4)!important;border-radius:8px!important}
html body #lobby.home-menu .home-header #wallet .wallet-shop-label{font-size:calc(var(--header-control)*.34)!important}
html body #lobby.home-menu .home-header #account-open#account-open::before,html body #lobby.home-menu .home-header #settings-button img{width:var(--header-icon)!important;height:var(--header-icon)!important}
html body #lobby.home-menu .home-header #menu-tour-help{font-size:calc(var(--header-control)*.48)!important}

/* Quiet secondary controls leave the shop as the header's primary action. */
html body #lobby.home-menu .home-header #wallet .currency{border:0!important;background:transparent!important;box-shadow:none!important;padding:0 3px!important;gap:6px!important}
html body #lobby.home-menu .home-header #wallet .wallet-plus{height:calc(var(--header-control)*.58)!important;width:calc(var(--header-control)*.48)!important;flex-basis:calc(var(--header-control)*.48)!important;font-size:calc(var(--header-control)*.33)!important;border:1px solid #bfa0ce66!important;border-radius:7px!important;box-shadow:none!important;background:#493553!important;display:grid!important;place-items:center!important;line-height:1!important}
html body #lobby.home-menu .home-header :is(#account-open,#settings-button){position:relative!important;display:grid!important;place-items:center!important;border:1px solid #b49a68!important;border-bottom:4px solid #665039!important;border-radius:12px!important;background:linear-gradient(135deg,#493553c9,#211a32dd),url('art/academy-honors.svg') center/cover!important;box-shadow:inset 0 0 0 3px #211a3280,inset 0 0 0 4px #d1b98644!important;overflow:hidden!important}
html body #lobby.home-menu .home-header #settings-button img{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;margin:0!important;object-fit:contain!important}
html body #lobby.home-menu .home-header :is(#account-open,#settings-button)::after{display:none!important}
.settings-menu-guide{justify-self:end;padding:7px 12px;border:1px solid #b69b6a;border-radius:8px;background:#3e2c4c;color:#efdaa8;font:700 13px Georgia;cursor:pointer}
[data-pass-purchase] button{display:flex!important;align-items:center!important;justify-content:center!important;gap:12px!important}
[data-pass-purchase] .pass-shard-cost{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
[data-pass-purchase] .pass-shard-cost img{width:1.2em!important;height:1.2em!important;object-fit:contain;display:block}
