/* Web-only window geometry. Native app must retain its own window system. */
html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{border:1px solid var(--cosmic-line)!important;border-radius:14px!important;padding:clamp(22px,3vw,34px)!important}
@media(min-width:1100px){
 html[data-ui-runtime=web] #online-screen:not(.welcome-screen){justify-items:end;padding:32px max(32px,4vw)}
 html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{width:min(880px,72vw)}
}
.entry-navigation{display:none}
@media(min-width:1100px){
 html[data-ui-runtime=web] #online-screen:not(.welcome-screen) .entry-navigation{display:flex;position:fixed;left:4vw;top:clamp(32px,14dvh,150px);width:25vw;max-width:350px;flex-direction:column;gap:0;color:#f6ebd6}
 .entry-navigation-logo{width:min(100%,270px);height:auto;margin-bottom:45px}
 html[data-ui-runtime=web] body.faithful-target #online-screen .entry-navigation button{display:grid;grid-template-columns:30px minmax(0,1fr) 22px;gap:14px;align-items:center;width:100%;min-height:84px;padding:16px 0;margin:0;border:0;border-bottom:1px solid #caac7250!important;border-radius:0;background:transparent!important;text-align:left;font:400 clamp(21px,2vw,30px)/1.2 Georgia,serif;box-shadow:none!important}
 .entry-navigation button img{width:30px;height:30px}
 html[data-ui-runtime=web] body.faithful-target #online-screen .entry-navigation button:hover{color:#e0bf82!important;background:transparent!important}
 html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{width:min(880px,63vw)}
 html[data-ui-runtime=web] #online-screen.local-entry-screen>.online-card{visibility:hidden;pointer-events:none}
 html[data-ui-runtime=web] body.faithful-target dialog#modal.local-entry-dialog{position:fixed!important;inset:32px 4vw auto auto!important;margin:0!important;transform:none!important;width:min(880px,63vw)!important;max-width:63vw!important;max-height:calc(100dvh - 64px)!important;box-sizing:border-box!important;padding:34px!important;border:1px solid var(--cosmic-line)!important;border-radius:14px!important;background:var(--cosmic-panel)!important;color:var(--cosmic-ink)!important;z-index:201;overflow:auto!important}
 html[data-ui-runtime=web] body.faithful-target dialog#modal.local-entry-dialog .close{position:absolute!important;top:14px!important;right:14px!important;color:var(--cosmic-ink)!important}
 html[data-ui-runtime=web] body.faithful-target dialog#modal.local-entry-dialog :is(label,h2,p){color:inherit}
 html[data-ui-runtime=web] body.faithful-target dialog#modal.local-entry-dialog :is(input,select,button:not(.close)){background:var(--cosmic-field)!important;color:var(--cosmic-ink)!important;border-color:var(--cosmic-line)!important}
}

html[data-ui-runtime=web] #online-screen.local-entry-screen>.online-card{visibility:hidden;pointer-events:none}
html[data-ui-runtime=web] dialog#modal.local-entry-dialog{z-index:201}
@media(min-width:1100px){
 html[data-ui-runtime=web] #online-screen .entry-navigation{background:transparent;padding:0;overflow:visible}
 html[data-ui-runtime=web] dialog#modal.local-entry-dialog{animation:none!important}
}
html[data-ui-runtime=web] body.faithful-target dialog#modal.local-entry-dialog{background:var(--cosmic-panel)!important;color:var(--cosmic-ink)!important}
@media(min-width:1100px) and (max-height:560px){
 html[data-ui-runtime=web] #online-screen:not(.welcome-screen) .entry-navigation{top:32px;max-height:calc(100dvh - 64px);overflow:auto}
 .entry-navigation-logo{width:200px;margin-bottom:16px}
 html[data-ui-runtime=web] body.faithful-target #online-screen .entry-navigation button{min-height:64px}
}
/* Keep the actual landing anchors; place the window beside the choices. */
@media(min-width:1100px){
 html[data-ui-runtime=web] #online-screen:not(.welcome-screen){justify-items:start;padding-left:var(--entry-panel-left,calc(6vw + 484px));padding-right:4vw}
 html[data-ui-runtime=web] #online-screen:not(.welcome-screen) .entry-navigation{left:var(--entry-choice-left,6vw);top:min(var(--entry-choice-top,50dvh),calc(100dvh - 210px));width:var(--entry-choice-width,420px);max-width:none;overflow:visible}
 html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{width:min(880px,100%);container-type:inline-size}
 html[data-ui-runtime=web] body.faithful-target dialog#modal.local-entry-dialog{left:var(--entry-panel-left,calc(6vw + 484px))!important;right:auto!important;width:min(880px,calc(96vw - var(--entry-panel-left,calc(6vw + 484px))))!important;max-width:calc(96vw - var(--entry-panel-left,calc(6vw + 484px)))!important}
}
@container(max-width:700px){
 #online-screen.setup-screen .setup-columns{grid-template-columns:1fr}
 #online-screen.setup-screen .setup-players{border-left:0;padding-left:0;border-top:1px solid var(--cosmic-line);padding-top:20px}
}

.entry-connection{display:none;position:fixed;inset:0;width:100vw;height:100dvh;pointer-events:none;z-index:202;overflow:visible}
.entry-connection path{stroke:#d2b477;stroke-width:1.5;stroke-dasharray:3 6;filter:drop-shadow(0 0 3px #d2b47780)}
@media(min-width:1100px){
 html[data-ui-runtime=web] #online-screen:not(.welcome-screen){padding-top:var(--entry-panel-top,32px)}
 html[data-ui-runtime=web] body.faithful-target dialog#modal.local-entry-dialog{top:var(--entry-panel-top,32px)!important}
}
@media(prefers-reduced-motion:no-preference){.entry-connection path{animation:entry-signal 4s linear infinite}@keyframes entry-signal{to{stroke-dashoffset:-36}}}

@media(min-width:1100px){
 html[data-ui-runtime=web] body #online-screen:not(.welcome-screen){background:linear-gradient(90deg,#111522e8 0%,#111522a8 38%,#11152215 76%),linear-gradient(180deg,#15172370,transparent 45%,#111522a8),url(visuals/welcome/cosmos.webp?v=detail1) 73% center/cover no-repeat!important;background-color:#151723!important}
}

.entry-navigation .atlas-arrow svg{display:block;width:25px;height:32px;overflow:visible;fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
.entry-navigation .atlas-arrow .entry-arrow-tip{fill:transparent;stroke:none}

/* Distinct vertical regions for the two entry choices; content stays scrollable. */
@media(min-width:1100px){
 html[data-ui-runtime=web] body.faithful-target #online-screen:not(.welcome-screen)>.online-card{max-height:var(--entry-panel-height,calc(100dvh - 64px));overflow-y:auto;overscroll-behavior:contain}
 html[data-ui-runtime=web] body.faithful-target dialog#modal.local-entry-dialog{max-height:var(--entry-panel-height,calc(100dvh - 64px))!important;overscroll-behavior:contain}
}
