/* JTforME V77 — final flagship UX repair
   Eliminates dialog auto-scroll, compacts the first-run menu, and makes
   the direct route behave as one deliberate full-browser game surface. */

body.psg76-game-page .psg65-page-wrap{height:calc(100svh - 56px)!important}
.psg76-direct-host .psg65-overlay{scroll-behavior:auto!important}
.psg76-direct-host .psg65-panel{outline:none!important}

/* The title screen must look like a flagship, not a cropped poster in a box. */
.psg76-direct-host .psg66-menu-head{
  align-items:flex-start!important;
  gap:clamp(12px,2vw,28px)!important;
}
.psg76-direct-host .psg66-menu-head h2{
  font-size:clamp(2.2rem,4.1vw,4.65rem)!important;
  line-height:.96!important;
  letter-spacing:-.045em!important;
  text-wrap:balance!important;
  max-width:850px!important;
}
.psg76-direct-host .psg65-panel-kicker{font-size:.72rem!important;line-height:1.25!important}
.psg76-direct-host .psg65-tagline{font-size:clamp(.92rem,1.05vw,1.1rem)!important;margin:.35rem 0 .7rem!important}
.psg76-direct-host .psg68-storybook{margin:10px 0!important;padding:10px 13px!important}
.psg76-direct-host .psg71-trilogy{margin:10px 0!important;gap:8px!important}
.psg76-direct-host .psg71-trilogy span{min-height:56px!important;padding:9px 10px!important}
.psg76-direct-host .psg66-dashboard{gap:8px!important;margin:10px 0!important}
.psg76-direct-host .psg66-dashboard>span,.psg76-direct-host .psg66-dashboard>div{min-height:58px!important;padding:9px 10px!important}
.psg76-direct-host .psg68-quickstart{margin:10px 0!important;padding:11px 13px!important}
.psg76-direct-host .psg66-mode-grid{gap:10px!important;margin-top:10px!important}
.psg76-direct-host .psg66-mode-card,.psg76-direct-host .psg66-mode-card.featured,.psg76-direct-host .psg66-mode-card.mobile{min-height:126px!important;padding:13px!important}
.psg76-direct-host .psg66-mode-card strong{font-size:1rem!important}.psg76-direct-host .psg66-mode-card>span:not(.psg66-card-badge){font-size:.78rem!important;line-height:1.36!important}.psg76-direct-host .psg66-mode-card small{margin-top:7px!important}
.psg76-direct-host .psg65-panel-actions{gap:8px!important;margin-top:10px!important}

/* Direct desktop menu should show the actual menu without nested scrollbars. */
@media(min-width:1100px) and (min-height:760px){
  .psg76-direct-host .psg65-panel{padding:clamp(18px,1.7vw,28px)!important;margin:14px auto!important;width:min(1180px,calc(100% - 56px))!important}
  .psg76-direct-host .psg66-menu-head h2{font-size:clamp(2.75rem,3.6vw,4.7rem)!important}
  .psg76-direct-host .psg66-mode-grid{grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .psg76-direct-host .psg66-mode-card,.psg76-direct-host .psg66-mode-card.featured,.psg76-direct-host .psg66-mode-card.mobile{min-height:118px!important}
}
@media(min-width:1600px) and (min-height:900px){
  .psg76-direct-host .psg65-panel{width:min(1280px,calc(100% - 80px))!important;margin:18px auto!important}
  .psg76-direct-host .psg66-menu-head h2{font-size:clamp(3rem,3.25vw,5rem)!important}
}

/* Mobile title/menu starts at the top and keeps actions reachable without hiding the content above them. */
@media(max-width:760px){
  body.psg76-game-page .psg65-page-wrap{height:calc(100svh - 52px)!important}
  .psg76-direct-host .psg65-overlay{display:block!important;overflow-y:auto!important;overflow-x:hidden!important;padding:0!important}
  .psg76-direct-host .psg65-panel{width:calc(100% - 12px)!important;margin:6px auto 74px!important;padding:12px!important;max-height:none!important;overflow:visible!important}
  .psg76-direct-host .psg66-menu-head h2{font-size:clamp(1.62rem,8.2vw,2.35rem)!important;line-height:1!important;letter-spacing:-.035em!important}
  .psg76-direct-host .psg66-seal{width:74px!important;height:74px!important;margin:8px auto!important}
  .psg76-direct-host .psg68-storybook{font-size:.84rem!important}
  .psg76-direct-host .psg71-trilogy span{min-height:48px!important;font-size:.76rem!important}
  .psg76-direct-host .psg66-dashboard{grid-template-columns:1fr 1fr!important}
  .psg76-direct-host .psg68-quickstart{display:grid!important;grid-template-columns:1fr!important;gap:10px!important}
  .psg76-direct-host .psg68-quickstart>div:last-child{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  .psg76-direct-host .psg68-quickstart .psg65-button{width:100%!important;min-height:50px!important}
  .psg76-direct-host .psg65-panel-actions{position:static!important;display:grid!important;grid-template-columns:1fr 1fr!important;background:transparent!important;padding:0!important;margin:12px 0 0!important}
  .psg76-direct-host .psg65-panel-actions .psg65-button{min-width:0!important;width:100%!important}
  .psg76-direct-host .psg66-mode-grid{grid-template-columns:1fr!important}.psg76-direct-host .psg66-mode-card{min-height:0!important}
}
@media(max-width:430px){
  body.psg76-game-page .psg65-page-nav a:nth-child(2){display:none!important}
  body.psg76-game-page .psg65-page-nav{max-width:48vw!important}
  .psg76-direct-host .psg65-panel{padding:10px!important}
  .psg76-direct-host .psg66-menu-head h2{font-size:clamp(1.48rem,7.8vw,2.05rem)!important}
  .psg76-direct-host .psg68-quickstart>div:last-child{grid-template-columns:1fr!important}
}

/* Live play: no document scroll, no page/footer intrusion, no hidden bottom controls. */
body.psg76-live .psg65-page-wrap{inset:56px 0 0 0!important;height:calc(100svh - 56px)!important}
.psg76-direct-host.psg76-live .psg65-game{height:100%!important}.psg76-direct-host.psg76-live .psg65-stage-wrap{min-height:0!important;overflow:hidden!important}
@media(max-width:760px){body.psg76-live .psg65-page-wrap{inset-top:52px!important;height:calc(100svh - 52px)!important}.psg76-direct-host.psg76-live .psg65-game{padding-bottom:calc(112px + env(safe-area-inset-bottom,0px))!important}.psg76-direct-host.psg76-live .psg65-touch-controls{position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:2147482000!important}}
