/* The home screen is landscape from first paint, even before its module starts.
   The shared game shell still owns rotation once it mounts; never rotate twice. */
.phone-home-dock{display:none}
#phone-more-dialog{width:min(540px,90vw);max-height:90dvh;padding:16px 20px;border:1px solid #627568;border-radius:6px;background:#15241b;color:#f3f4ed}
#phone-more-dialog::backdrop{background:#050d0bcc}
.phone-more-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.phone-more-heading h2{font:24px Georgia,serif;margin:0}
.phone-more-heading button{width:44px;height:44px;border:1px solid #627568;border-radius:4px;background:#202e27;color:#efd291}
#phone-more-dialog nav{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#phone-more-dialog nav a{display:flex;align-items:center;min-height:52px;padding:8px 12px;background:#20352b;border:1px solid #405748;font-size:13px}
@media (any-pointer:coarse) and (max-width:600px), (any-pointer:coarse) and (max-height:600px), (any-pointer:coarse) and (max-device-width:600px){
:root:not(.phone-game-shell){--home-height:100dvh}
:root:not(.phone-game-shell),:root:not(.phone-game-shell) body{height:var(--home-height);overflow:hidden;overscroll-behavior:none}
/* A complete first-screen menu in the same landscape viewport as the battle. */
:root:not(.phone-game-shell) .site-header{height:calc(44px + var(--game-safe-top,0px));min-height:0;padding:var(--game-safe-top,0px) max(12px,var(--game-safe-right,0px)) 0 max(12px,var(--game-safe-left,0px));gap:12px}
:root:not(.phone-game-shell) .brand{min-height:44px;gap:7px;font-size:15px;flex-shrink:0}
:root:not(.phone-game-shell) .brand small{font-size:10px;margin-top:2px}
:root:not(.phone-game-shell) .brand img{width:20px;height:20px}
:root:not(.phone-game-shell) .site-header nav{display:flex;align-items:center;gap:16px;font-size:12px}
:root:not(.phone-game-shell) .site-header nav a{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0 2px;white-space:nowrap}
:root:not(.phone-game-shell) .account-link{min-height:44px;min-width:0;max-width:130px;font-size:12px;gap:6px}
:root:not(.phone-game-shell) .account-link img{flex-shrink:0}
:root:not(.phone-game-shell) .intro-page{height:calc(var(--home-height) - 88px - var(--game-safe-top,0px) - var(--game-safe-bottom,0px));min-height:0;max-height:none;padding:12px max(16px,var(--game-safe-right,0px)) 8px max(16px,var(--game-safe-left,0px));align-items:flex-end}
:root:not(.phone-game-shell) .intro-artwork img{object-position:center 38%}
:root:not(.phone-game-shell) .intro-page:before{background:linear-gradient(180deg,#06101000 8%,#08120e33 30%,#091410bb 61%,#101614 100%)}
:root:not(.phone-game-shell) .realm-label{top:12px;left:max(20px,var(--game-safe-left,0px));right:max(20px,var(--game-safe-right,0px));font-size:12px}
:root:not(.phone-game-shell) .realm-label span{min-width:64px;padding-top:6px}
:root:not(.phone-game-shell) .entrance-center{max-width:660px}
:root:not(.phone-game-shell) .entrance-center .eyebrow{font-size:10px;margin:0 0 5px}
:root:not(.phone-game-shell) .entrance-center h1{font-size:clamp(32px,calc(var(--home-height)*.11),48px);line-height:1.05}
:root:not(.phone-game-shell) .entrance-center h1 span{display:inline;font-size:inherit;margin:0}
:root:not(.phone-game-shell) .intro-subtitle{font-size:13px;line-height:1.3;margin:6px 0 10px}
:root:not(.phone-game-shell) .intro-actions{flex-direction:row;flex-wrap:nowrap;gap:10px;max-width:none;margin:0}
:root:not(.phone-game-shell) .intro-actions .primary-button,:root:not(.phone-game-shell) .intro-actions .secondary-button{width:auto;min-width:156px;min-height:44px;padding:8px 16px;font-size:14px}
:root:not(.phone-game-shell) .home-player-links{display:flex;justify-content:center;flex-wrap:nowrap;gap:6px;margin:2px 0 0;font-size:12px}
:root:not(.phone-game-shell) .home-player-links a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 10px;white-space:nowrap}
:root:not(.phone-game-shell) .welcome{max-width:none;margin:0;font-size:11px;line-height:1.3}
:root:not(.phone-game-shell) .intro-bottom{display:none}
/* Secondary destinations stay one tap away, not below a scrolling home page. */
:root:not(.phone-game-shell) .home-community,:root:not(.phone-game-shell) .site-footer{display:none}
:root:not(.phone-game-shell) .phone-home-dock{height:calc(44px + var(--game-safe-bottom,0px));padding:0 max(16px,var(--game-safe-right,0px)) var(--game-safe-bottom,0px) max(16px,var(--game-safe-left,0px));display:flex;justify-content:center;gap:20px;border-top:1px solid #526449;background:#101b17}
.phone-home-dock a,.phone-home-dock button{display:flex;align-items:center;justify-content:center;min-width:80px;min-height:44px;padding:0 12px;font-size:12px;color:#e6d49f;background:none;border:0}
@media (orientation:portrait){
  :root:not(.phone-game-shell):not(.phone-game){
    --home-height:100vw;
    --game-safe-top:var(--phone-safe-right,0px);--game-safe-right:var(--phone-safe-bottom,0px);
    --game-safe-bottom:var(--phone-safe-left,0px);--game-safe-left:var(--phone-safe-top,0px);
    height:100dvh;overflow:hidden;overscroll-behavior:none;
  }
  :root:not(.phone-game-shell):not(.phone-game) body{
    position:fixed;left:0;top:0;width:100dvh;height:100vw;
    overflow:hidden;overscroll-behavior:none;
    transform-origin:0 0;transform:translateX(100vw) rotate(90deg);
    -webkit-overflow-scrolling:touch;
  }
}
}
