/* Dark Gate title screen — exact approved splash, native controls aligned to its painted buttons.
   The fallback/mobile layout has independent visible labels and the official standalone crest. */
#front:has(#homeView:not([hidden])){padding:0;place-items:center;background:#090d13;overflow:auto}
#front:has(#homeView:not([hidden])):before{display:none}
#homeView.dark-gate{position:relative;width:min(100%,1100px);margin:auto;box-sizing:border-box;isolation:isolate;text-align:center;padding:20px 16px;color:#f2ddae}
#homeView .gate-splash{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:-2;pointer-events:none}
#homeView .gate-content{position:relative;display:flex;flex-direction:column;align-items:center;gap:12px}
#homeView:not(.art-ready) .gate-splash{display:none}
#homeView .gate-title{margin:0;width:min(660px,100%);font:900 40px/1 Georgia,serif}
#homeView .official-logo{display:block;width:100%;height:auto;max-height:260px;object-fit:contain}
#homeView .official-logo[hidden],.game-brand .official-logo[hidden]{display:none}
#homeView .gate-actions{display:grid;gap:8px;width:min(360px,100%)}
#homeView .gate-button.btn,#homeView .gate-leaderboard.btn{font:700 18px/1.25 Georgia,serif;color:#ffe7bd;border:1px solid #ad8555!important;border-radius:4px;min-height:43px;padding:7px 12px;background:linear-gradient(#30252a,#161822);box-shadow:inset 0 0 0 2px #161018,0 3px 7px #0009;cursor:pointer;text-shadow:0 2px 3px #000;white-space:normal}
#homeView .gate-button .gate-label{display:flex;align-items:center;justify-content:center;gap:12px}
#homeView .gate-button:not(:disabled):hover,#homeView .gate-leaderboard:hover{border-color:#ffe0a0!important;filter:brightness(1.2)}
#homeView .gate-button:disabled{opacity:.5;cursor:default}
#homeView .gate-button:focus-visible,#homeView .gate-leaderboard:focus-visible{outline:3px solid #f8d38d;outline-offset:2px}
#homeView.has-save .gate-continue,#homeView:not(.has-save) .gate-new{background:linear-gradient(#a64c19,#451c16);border-color:#ffc263!important;box-shadow:0 0 16px #ff8f3c60,inset 0 0 0 1px #e39a50}
#homeView .gate-save,#homeView .gate-progress{max-width:360px;padding:4px 8px;background:#0e121ce8;border:1px solid #795b3b;border-radius:4px}
#homeView .gate-save p,#homeView .gate-progress p{margin:0;color:#e1cdb3;font:11px/1.35 system-ui,sans-serif}
#homeView #homeError:empty{display:none}
#homeView #homeError{color:#ffc8a8}
#homeView .gate-progress{font:11px/1.4 system-ui,sans-serif;color:#e1cdb3;text-align:left}
#homeView .gate-progress summary{cursor:pointer}
#homeView .gate-footer{display:flex;gap:12px;font:11px Georgia,serif;color:#e1c5a0;text-shadow:0 2px 3px #000}
#homeView .hero-cast{display:none!important}
.wrap>header .game-brand{flex:0 0 auto;margin:0 10px 0 0;width:clamp(176px,15vw,224px);height:auto;aspect-ratio:1000/563;min-width:0;display:grid;align-items:center;line-height:1;letter-spacing:0;text-shadow:none}
.wrap>header .game-brand .official-logo{display:block;width:100%;height:auto;max-height:none;object-fit:contain;filter:drop-shadow(0 2px 5px #0008);image-rendering:auto}.wrap>header .game-brand .official-logo[hidden]{display:none}
.wrap>header .game-brand span{font:700 18px Georgia,serif;color:#f1d39a}
@media(min-width:851px) and (min-height:521px) and (min-aspect-ratio: 13/10){
 #homeView.dark-gate.art-ready{width:min(100vw,calc(100dvh * 1.776833));aspect-ratio:1672/941;padding:0;container-type:inline-size}
 #homeView.art-ready .gate-content{position:absolute;inset:0;display:block}
 #homeView.art-ready .gate-splash{object-fit:fill}
 #homeView.art-ready .gate-title{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);padding:0;margin:0}
 #homeView.art-ready .gate-actions{position:absolute;inset:0;width:100%;display:block;pointer-events:none}
 #homeView.art-ready .gate-button.btn{position:absolute;left:37.9%;width:24.2%;height:6.05%;min-height:0;padding:0;border:1px solid transparent!important;border-radius:6px;background:transparent;box-shadow:none;pointer-events:auto}
 #homeView.art-ready .gate-button .gate-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 #homeView.art-ready .gate-continue{top:36.6%;left:36.4%;width:27.1%;height:8.1%}
 #homeView.art-ready .gate-new{top:45.2%}
 #homeView.art-ready .gate-grimoire{top:51.9%}
 #homeView.art-ready .gate-talents{top:58.5%}
 #homeView.art-ready .gate-sandbox{top:65.2%}
 #homeView.art-ready .gate-settings{top:71.9%}
 #homeView.art-ready .gate-credits{top:78.6%}
 #homeView.art-ready .gate-button:disabled{opacity:1;background:#090b13a8;box-shadow:inset 0 0 10px #000b}
 #homeView.art-ready:not(.has-save) .gate-new{border-color:#f7bc73!important;box-shadow:0 0 12px #ff853a, inset 0 0 13px #ff913a55}
 #homeView.art-ready .gate-button:not(:disabled):hover,#homeView.art-ready .gate-button:focus-visible{border-color:#ffdb9b!important;box-shadow:0 0 14px #ffb14f,inset 0 0 10px #ffd07b38;outline:none}
 #homeView.art-ready .gate-leaderboard{position:absolute;right:2.5%;bottom:3.5%;font-size:clamp(11px,1.25cqw,20px);min-height:34px;background:#17151de8}
 #homeView.art-ready .gate-save{position:absolute;right:2.5%;top:2%;max-width:23%;background:#10141bdf;text-align:right}
 #homeView.art-ready .gate-progress{position:absolute;left:2.5%;bottom:3.5%;max-width:25%;background:#10141bdf}
 #homeView.art-ready .gate-footer{position:absolute;right:2.5%;top:8%;font-size:clamp(9px,.85cqw,13px);flex-direction:column;gap:3px;text-align:right}
}
@media(max-width:850px),(max-height:520px),(max-aspect-ratio:13/10){
 #homeView.dark-gate{min-height:100%;background:#10141b}
 #homeView .gate-splash{opacity:.34;object-fit:cover}
 #homeView.dark-gate:after{content:"";position:absolute;inset:0;background:linear-gradient(#10121b88,#0c1019e8);z-index:-1}
 #homeView .gate-title{width:min(530px,100%)}
 #homeView .official-logo{max-height:200px}
 #homeView .gate-button.btn{font-size:16px}
}

/* Compact header on phones; preserve full logo aspect ratio. */
@media(max-width:620px){.wrap>header .game-brand{width:156px;margin-right:6px}}
