/* Opening layout owns its sizing; legacy percentage rows must not constrain it. */
.home .home-header{position:static;min-height:28px}
.home .service-links{position:static;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;margin:0 0 12px;width:100%;max-width:100%}
.home .hero.galaxy-opening{
 display:grid;grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr);
 grid-template-areas:"intro map";grid-template-rows:auto;aspect-ratio:auto;
 gap:24px;align-items:center;min-height:0;height:auto;margin:10px 0 18px;
 padding:clamp(18px,2.2vw,32px);overflow:hidden;border:1px solid #ead9d3;
 border-radius:28px;background:#fffaf3 url("assets/opening-cloud-backdrop-v1.png") center/cover no-repeat;
 box-shadow:0 8px 0 #e9d8df55,0 16px 36px #8774ab19;
}
.dragon-machine-opening .home .hero.galaxy-opening{background-image:url("assets/opening-cloud-backdrop-v1.png")}
.home .galaxy-intro.hero-copy{
 display:flex;grid-area:intro;flex-direction:column;justify-content:center;align-items:center;
 align-content:normal;min-width:0;min-height:0;width:100%;height:auto;padding:0;gap:12px;background:transparent;
}
.home .galaxy-intro:after{display:none}
.home .galaxy-intro h1.galaxy-painted-title{
 display:block;width:min(100%,350px);max-width:350px;height:auto;min-height:0;
 flex:none;align-self:center;margin:0;font-size:0;line-height:0;text-shadow:none;
}
.home .galaxy-painted-title:before,.home .galaxy-painted-title:after{display:none}
.home .galaxy-painted-title img{display:block;width:100%;max-width:100%;height:auto;object-fit:contain}
.home .galaxy-heroes{
 flex:none;width:min(100%,340px);max-width:340px;height:auto;min-height:0;
 aspect-ratio:3/2;align-self:center;margin:0;position:relative;z-index:1;
}
.home .galaxy-heroes img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 8px #9a5d7220)}
.home .galaxy-intro .answer-mode-picker{width:100%;max-width:420px;height:auto;min-height:0;padding:0;margin:0;flex:none}
.home .galaxy-intro .answer-mode-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));height:auto;gap:10px}
.home .galaxy-intro .answer-mode-options button{width:100%;min-width:0;min-height:64px;height:auto;padding:10px 6px;gap:5px;border-radius:20px}
.home .galaxy-intro .answer-mode-options button b{font-size:clamp(17px,1.5vw,23px)}
.home .galaxy-intro .answer-mode-options button small{font-size:9px;white-space:normal;line-height:1.4}
.home .galaxy-intro .home-spirit-picker{width:100%;max-width:420px;min-height:0;height:auto;gap:5px;margin:2px 0 0;flex:none}
.home .home-spirit-picker label{font-size:11px;line-height:1.5}
.home .home-spirit-picker select{min-height:38px;font-size:12px;padding:7px 28px 7px 10px}
.home .galaxy-intro .galaxy-quick{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px 18px;height:auto;margin:0;flex:none}
.home .galaxy-quick button{min-height:32px;font-size:11px;padding:4px 0}
/* Crop the cloud-only left portion. Artwork, overlays and era hit targets share
   the same 4:3 rectangle, without letterboxing or a second painted map. */
.home .hero.galaxy-opening>.galaxy-map{
 grid-area:map;position:relative;width:100%;min-width:0;min-height:0;height:auto;
 aspect-ratio:4/3;align-self:center;overflow:hidden;margin:0;mask-image:none;
 border:1px solid #ffffffb8;border-radius:24px;background:#5e72ad;
 box-shadow:0 10px 26px #42317823,0 0 0 5px #fff7;
}
.home .galaxy-map .galaxy-world{
 position:absolute;left:0;top:0;display:block;opacity:1;width:152%;max-width:none;
 height:100%;object-fit:fill;transform:translateX(-34.210526%);
}
@media(max-width:1000px){
 .home .hero.galaxy-opening{grid-template-columns:minmax(0,1fr);grid-template-areas:"intro" "map";gap:24px;padding:22px 18px}
 .home .galaxy-intro.hero-copy{max-width:440px;justify-self:center}
 .home .galaxy-intro h1.galaxy-painted-title{width:min(100%,330px)}
 .home .galaxy-heroes{width:min(100%,320px)}
 .home .hero.galaxy-opening>.galaxy-map{max-width:700px;justify-self:center}
}
@media(max-width:760px){
 .home .service-links{justify-content:center;gap:7px;margin:5px 0 13px}
 .home .service-links a,.home .service-links button{min-height:36px;padding:7px 9px;font-size:10px}
 .home .service-links a.srplay-home-link{min-height:40px;font-size:12px}
 .home .hero.galaxy-opening{padding:18px 14px;border-radius:22px;margin:8px 0 14px}
 .home .galaxy-intro.hero-copy{gap:12px;margin:0}
 .home .galaxy-intro h1.galaxy-painted-title{width:min(100%,330px);margin:0;max-width:330px}
 .home .galaxy-heroes{width:min(100%,310px);margin:0}
 .home .galaxy-heroes img{animation:none}
 .home .hero.galaxy-opening>.galaxy-map{border-radius:18px;aspect-ratio:4/3}
 .home .tabs{flex-wrap:wrap;gap:0 15px;padding-inline:12px}
 .home .tabs button{padding:12px 0;min-height:42px}
}
@media(prefers-reduced-motion:reduce){.home .galaxy-heroes img{animation:none}}
