/* One centered site frame across all ordinary pages. */
html:has(.app-shell) { scrollbar-gutter:stable; }
body.pt-refined { background:#f7f9fc !important; width:100%; min-width:0; }
body.pt-refined .app-shell:not(.nn-studio-mode) { width:100%; max-width:1560px; min-width:0; margin-inline:auto; }
body.pt-refined .app-shell:not(.nn-studio-mode) > .app-body { flex:1 1 0; width:auto; min-width:0; }
body.pt-refined .app-shell:not(.nn-studio-mode) > .app-body > .container { box-sizing:border-box; width:100%; max-width:1320px; min-width:0; margin:0 auto; padding:26px 32px 40px; }
body.pt-refined .app-shell:not(.nn-studio-mode) > .app-body > .container > .view { width:100%; max-width:1240px !important; min-width:0; margin:0 auto !important; }
body.pt-refined .app-shell:not(.nn-studio-mode) .topbar { background:#fff; border-bottom:1px solid #dce4ee; box-shadow:none; padding:10px 24px; gap:14px; }
body.pt-refined .app-shell:not(.nn-studio-mode) .topbar-title { font-size:16px; font-weight:750; color:#17233c; }
body.pt-refined .app-shell:not(.nn-studio-mode) .topbar-login { border-radius:8px; background:#12376f !important; box-shadow:none; }
body.pt-refined .main-tagline { width:100%; min-width:0; }
@media((max-width:900px) and (not ((hover: hover) and (pointer: fine)))) {
 body.pt-refined .app-shell:not(.nn-studio-mode) > .app-body > .container { padding:22px 20px calc(110px + env(safe-area-inset-bottom,0px)); }
 body.pt-refined .app-shell:not(.nn-studio-mode) .topbar { padding:10px 16px; gap:8px 12px; }
}
@media((max-width:640px) and (not ((hover: hover) and (pointer: fine)))) {
 body.pt-refined .app-shell:not(.nn-studio-mode) > .app-body > .container { padding:20px 16px calc(110px + env(safe-area-inset-bottom,0px)); }
 body.pt-refined .app-shell:not(.nn-studio-mode) .topbar { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 8px; padding:10px 12px; overflow:visible; }
 body.pt-refined .app-shell:not(.nn-studio-mode) .topbar-title { grid-column:1; grid-row:1; font-size:13px; line-height:1.3; min-width:0; white-space:normal; }
 body.pt-refined .app-shell:not(.nn-studio-mode) .topbar-title small, body.pt-refined .app-shell:not(.nn-studio-mode) .topbar-sp { display:none; }
 body.pt-refined .app-shell:not(.nn-studio-mode) .topbar-personal { grid-column:1; grid-row:2; gap:14px; }
 body.pt-refined .app-shell:not(.nn-studio-mode) .topbar-personal :is(button,a) { min-height:34px; padding:2px 0; font-size:12px; }
 body.pt-refined .app-shell:not(.nn-studio-mode) .topbar-bell { grid-column:2; grid-row:2; justify-self:end; }
 body.pt-refined .app-shell:not(.nn-studio-mode) :is(.acct-badge,.topbar-login) { grid-column:2; grid-row:1; }
 body.pt-refined .app-shell:not(.nn-studio-mode) .acct-badge { gap:5px; }
 body.pt-refined .app-shell:not(.nn-studio-mode) .acct-name { padding:0; }
 body.pt-refined .app-shell:not(.nn-studio-mode) .acct-nm { display:none; }
 body.pt-refined .app-shell:not(.nn-studio-mode) :is(.acct-cash,.acct-logout) { min-height:30px; padding:4px 5px; font-size:10px; }
 body.pt-refined .app-shell:not(.nn-studio-mode) .acct-set { width:30px; height:30px; }
}

/* Override old per-view ID offsets without changing inner tools or overlays. */
body.pt-refined #view-game .gh-hub { max-width:none; }

/* Desktop windows scroll across a full-width page below the design width. */
@media screen and (hover: hover) and (pointer: fine) {
  html:has(.app-shell) { overflow-x: auto; }
  body.pt-refined:has(.app-shell) { min-width: 1280px; }
  body.pt-refined .app-shell:not(.nn-studio-mode) .topbar { min-width:max-content; flex-wrap:nowrap; }
  body.pt-refined .app-shell:not(.nn-studio-mode) .topbar > :not(.topbar-sp) { flex-shrink:0; }
  body.pt-refined .app-shell:not(.nn-studio-mode) .topbar .topbar-title { flex:0 0 auto; }
  body.pt-refined .app-shell:not(.nn-studio-mode) .topbar :is(.topbar-title,.topbar-personal,.acct-badge,button,a) { white-space:nowrap; }
  body.pt-refined .app-shell:not(.nn-studio-mode) .topbar .acct-badge { flex-wrap:nowrap; }

}
