/* Responsive menu only: content determines card height, never a fixed aspect ratio. */
body.royal-menu{margin:0;min-width:0;background:#192e3d;overflow-x:clip}
body.royal-menu::before{inset:-24px;background-position:center;filter:blur(9px);animation:none;transform:none}
.royal-menu main{box-sizing:border-box;width:100%;max-width:1320px;padding:12px 18px 0;min-height:0}
.royal-menu #home{isolation:isolate;width:100%;max-width:none;min-height:0;padding:20px 36px 54px;background:none;overflow:hidden}
.royal-menu #home::after{display:block;content:"";position:absolute;inset:-10px;z-index:-1;background:linear-gradient(#10305018,#10283d22),url('/assets/menu/castle.webp') center 48%/cover no-repeat;filter:none;pointer-events:none}
.royal-home-heading{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:0;gap:24px;max-width:1000px;margin:0 auto 18px}
.royal-menu #home .royal-logo{width:clamp(320px,40vw,500px);margin:0;flex:0 1 500px}
.royal-menu #home .account-nav{flex:0 0 auto;width:auto;max-width:260px;padding:3px 5px;background:linear-gradient(90deg,#0a2039e8,#112d47cd);border:1px solid #ac956359;border-radius:3px;gap:7px}
.royal-menu #home .profile-trigger{flex:0 1 auto;min-height:40px;gap:8px;padding:0 3px;max-width:200px;width:auto}
.royal-menu #home .profile-trigger img{width:34px;height:34px;flex-shrink:0}
.royal-menu #home .profile-trigger strong{font-size:13px;max-width:125px;font-weight:400}
.royal-menu #home .profile-chevron{display:block;flex:0 0 10px;width:10px;height:7px;transition:transform .15s}
.royal-menu #home .profile-trigger[aria-expanded="true"] .profile-chevron{transform:rotate(180deg)}
.royal-menu #home #openMenuSettings{width:32px;min-width:32px;min-height:40px;font-size:23px}
.royal-menu #home .profile-dropdown{z-index:10}
.royal-menu #home .join-ways{width:80%;max-width:850px;gap:18px;grid-auto-rows:auto;align-items:stretch}
.royal-menu #home .join-panel.menu-card{aspect-ratio:auto;min-height:0;display:grid;grid-template-rows:auto 1fr;overflow:visible}
.royal-menu #home .menu-card-art{height:clamp(135px,13vw,180px);width:100%;object-fit:cover;object-position:center;mask-image:linear-gradient(#000 75%,transparent);-webkit-mask-image:linear-gradient(#000 75%,transparent)}
.royal-menu #home .menu-card-content{position:relative;z-index:auto;min-height:0;display:flex;gap:10px;padding:0 18px 16px;margin-top:-8px}
.royal-menu #home .menu-card h2,.royal-menu #home .tutorial-entry-panel h2{font-size:clamp(22px,2.1vw,28px);line-height:1.15;min-height:0;margin:0;letter-spacing:-.025em;overflow-wrap:normal;text-shadow:0 2px 3px #000}
.royal-menu #home .menu-card p{font-size:16px;line-height:1.35;min-height:0;margin:0 auto;max-width:260px;font-weight:400;text-shadow:none}
.royal-menu #home .menu-card-actions{margin-top:auto;gap:10px}
.royal-menu #home .menu-card button:not(.card-hit-target){min-height:42px;font-size:15px;padding:9px 7px;white-space:normal}
.royal-menu #home .text-button{margin:0!important;min-height:30px!important;padding:3px!important}
.royal-menu #home .menu-card-symbol{top:-52px;width:44px;height:44px;line-height:40px;font-size:36px}
.royal-menu #home .menu-card:has(.menu-card-symbol) .menu-card-content{padding-top:5px}
.royal-menu #home .menu-card .card-hit-target{position:static;width:0;height:0;min-height:0;padding:0;border:0;margin:0}
.royal-menu #home .menu-card .card-hit-target::after{content:"";position:absolute;inset:0;z-index:4;cursor:pointer}
.royal-menu #home .menu-card:has(.card-hit-target) .menu-card-content{position:static}
.royal-menu #home .menu-card:has(.card-hit-target) .menu-card-symbol{top:calc(clamp(135px,13vw,180px) - 58px)}
.royal-menu #home .card-hit-target:focus-visible{outline:0}.royal-menu #home .card-hit-target:focus-visible::after{outline:3px solid #ffe2a2;outline-offset:5px}
.royal-menu #home .card-hit-target:disabled::after{cursor:wait;background:#10243d66}
.royal-menu #home .tutorial-entry-panel .primary{margin-top:auto;flex-shrink:0}
.royal-menu .site-footer{margin:16px auto;padding:6px 14px;background:#07152b99}
@media(min-width:1400px){.royal-menu main{padding-top:20px}.royal-menu #home .join-ways{max-width:880px}.royal-menu #home{padding-bottom:44px}}
@media(min-width:701px) and (max-width:1100px){.royal-menu main{padding:10px 12px 0}.royal-menu #home{padding:16px 26px 38px}.royal-menu #home .royal-logo{width:52%;flex-basis:52%}.royal-menu #home .join-ways{width:94%;max-width:820px}.royal-menu #home .menu-card-art{height:160px}.royal-menu #home .menu-card:has(.card-hit-target) .menu-card-symbol{top:102px}}
@media(max-width:700px){.royal-menu main{padding:8px 8px 0}.royal-menu #home{padding:10px 12px 24px;min-height:calc(100svh - 110px)}.royal-home-heading{flex-direction:column;gap:3px;margin-bottom:18px}.royal-menu #home .royal-logo{width:min(86%,350px);flex:0 0 auto}.royal-menu #home .account-nav{max-width:240px;align-self:center}.royal-menu #home .profile-trigger{max-width:185px;min-height:36px}.royal-menu #home .profile-trigger img{width:30px;height:30px}.royal-menu #home .profile-trigger strong{font-size:12px;max-width:125px}.royal-menu #home #openMenuSettings{min-height:36px}.royal-menu #home .join-ways{width:100%;gap:13px;grid-template-columns:repeat(2,minmax(0,1fr))}.royal-menu #home .menu-card-art{height:clamp(105px,26vw,165px)}.royal-menu #home .menu-card-content{gap:9px;padding:0 10px 12px;margin-top:-4px}.royal-menu #home .menu-card h2,.royal-menu #home .tutorial-entry-panel h2{font-size:clamp(17px,3.8vw,23px);line-height:1.17}.royal-menu #home .menu-card p{font-size:14px;line-height:1.3}.royal-menu #home .menu-card button:not(.card-hit-target){min-height:42px;font-size:13px;padding:8px 5px}.royal-menu #home .menu-card-actions{gap:6px}.royal-menu #home .menu-card-symbol{width:36px;height:36px;font-size:30px}.royal-menu #home .menu-card:has(.card-hit-target) .menu-card-symbol{top:calc(clamp(105px,26vw,165px) - 47px)}.royal-menu #home .menu-card:has(.card-hit-target) .menu-card-content{padding-top:4px}.royal-menu #home .text-button{font-size:13px!important}.royal-menu .site-footer{font-size:11px;margin:12px auto}.royal-menu #home::after{background-position:50% 45%;filter:none}}
@media(max-width:380px){.royal-menu #home{padding-inline:8px}.royal-menu #home .join-ways{gap:10px}.royal-menu #home .menu-card-content{padding-inline:7px}.royal-menu #home .menu-card-actions{grid-template-columns:1fr;gap:5px}.royal-menu #home .menu-card button:not(.card-hit-target){font-size:13px}.royal-menu #home .menu-card p{font-size:13px}.royal-menu #home .menu-card h2,.royal-menu #home .tutorial-entry-panel h2{font-size:17px}}
@media(prefers-reduced-motion:reduce){.royal-menu #home .profile-chevron{transition:none}}
/* 3.8.10: opaque inner scenery; inherited pseudo-element opacity must not
   expose the blurred page backdrop. */
.royal-menu #home{background:#123352 url('/assets/menu/castle.webp') center top/100% auto repeat-y;filter:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.royal-menu #home::after{display:none;background:none;filter:none;opacity:1}
.royal-menu #home .account-nav{width:320px;max-width:100%;box-sizing:border-box;flex:0 1 320px;justify-content:space-between}
.royal-menu #home .profile-trigger{flex:1 1 auto;width:auto;max-width:none;min-width:0}
.royal-menu #home .profile-trigger strong{flex:1 1 auto;max-width:none;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.35;text-align:left}
.royal-menu #home #openMenuSettings{flex:0 0 40px;width:40px}
.royal-menu #home .menu-card .card-hit-target{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
@media(max-width:700px){
 .royal-menu #home{min-height:0;padding:12px 16px 24px}
 .royal-menu #home .join-ways{grid-template-columns:minmax(0,1fr);width:100%;max-width:480px;gap:18px}
 .royal-home-heading{gap:12px;margin-bottom:22px}
 .royal-menu #home .account-nav{width:100%;max-width:480px;flex:0 0 auto;padding:6px 8px}
 .royal-menu #home .profile-trigger{flex:1 1 auto;max-width:none;min-height:44px;gap:10px}
 .royal-menu #home .profile-trigger strong{max-width:none;font-size:15px}
 .royal-menu #home .profile-trigger img{width:38px;height:38px}
 .royal-menu #home #openMenuSettings{min-height:44px}
 .royal-menu #home .menu-card-art{height:clamp(160px,48vw,230px)}
 .royal-menu #home .menu-card-content{padding:0 18px 18px;gap:12px}
 .royal-menu #home .menu-card h2,.royal-menu #home .tutorial-entry-panel h2{font-size:25px;line-height:1.2}
 .royal-menu #home .menu-card p{font-size:16px;max-width:350px}
 .royal-menu #home .menu-card-actions{grid-template-columns:1fr 1fr;gap:10px}
 .royal-menu #home .menu-card button:not(.card-hit-target){font-size:16px;min-height:46px}
 .royal-menu #home .menu-card:has(.card-hit-target) .menu-card-symbol{top:calc(clamp(160px,48vw,230px) - 54px);width:42px;height:42px}
 .royal-menu #home .text-button{font-size:15px!important;min-height:36px!important}
}

/* v3.8.12: readable faction selection on phones. */
@media (max-width: 700px) {
  .royal-menu #lobby .factions { grid-template-columns: minmax(0, 1fr); }
}
