/* Preserve the shared portal chrome and dock while composing games directly. */
html[data-native-game]{--native-header:var(--chrome-height,38px);--native-rail:76px;--header-h:0px;background:#0b1020;color-scheme:dark}
html[data-native-game] body{margin:0;min-height:100dvh}
.native-game-header{display:none!important}
body>.native-topbar{position:sticky;top:0;z-index:100;display:flex;align-items:center;box-shadow:none;backdrop-filter:none;min-height:var(--chrome-height,38px)}
body>.native-topbar::before,body>.native-topbar::after{display:none!important}
body>.native-topbar .brand{padding:0;position:relative;line-height:1.2;text-decoration:none;color:#edf1ff;white-space:nowrap}
body>.native-topbar nav a{text-decoration:none}
body>.native-topbar.topbar .top-actions button{min-height:0;box-shadow:none;transform:none}
body>.native-topbar.topbar .top-actions .site-mute,body>.native-topbar.topbar .top-actions .lang-trigger,body>.native-topbar.topbar .top-actions .chrome-account{height:24px;min-height:0}
body>.native-topbar.topbar .top-actions .lang-trigger{padding:0 5px;border:1px solid #46518a;background:#1b254a;border-radius:var(--chrome-radius);font-size:11px}
body>.native-topbar.topbar .top-actions .lang-trigger:hover{border-color:#a8b8ff;background:#25325a}
body>.native-topbar.topbar .top-actions .chrome-account:hover{background:#3a4b91;border-color:#9db0ff}
body>.native-topbar .brand:hover{transform:translateY(-1px);text-shadow:0 0 18px #a8b8ff80}
body>.native-topbar .brand:hover .brand-mark{transform:rotate(90deg) scale(1.15);color:#fff;text-shadow:0 0 18px #b0c2ff}
html[data-locale="en"] .native-zh,html[data-locale="zh"] .native-en{display:none!important}
/* Legacy light-theme sheets (visual-v2/v3) style every <aside> with
   border-left:2px solid #fff and, on narrow screens, border-top:2px solid
   #fff. On the dark native shell that reads as a stray white line at x=0.
   The class selector outranks those element selectors, so one explicit
   reset here removes the line at every viewport width. */
html[data-native-game] aside{border-left:0;border-top:0}
.native-rail{position:fixed;z-index:90;left:0;top:var(--native-header);bottom:0;width:132px;padding:14px 9px;overflow-x:hidden;overflow-y:auto;background:transparent;border:0;box-shadow:none;scrollbar-width:none;pointer-events:none}
/* Hide the WebKit scrollbar too: scrollbar-width alone does not cover older Chrome. */
.native-rail::-webkit-scrollbar{display:none;width:0;height:0}
.native-rail #rail-items{position:relative;display:grid;gap:12px;width:54px;padding-top:10px;padding-bottom:66px;pointer-events:auto}
.native-rail-game{position:relative;display:block;width:54px;height:54px;border-radius:13px;text-decoration:none;transform:translateY(var(--dock-shift,0px)) scale(var(--dock-scale,1));transform-origin:left center;transition:transform 120ms ease-out;z-index:var(--dock-layer,1);pointer-events:auto}
.native-rail-game img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.native-rail-game[aria-current="page"]{outline:2px solid #b5c2ff;outline-offset:3px}
.native-rail-name{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#native-game-stage{position:relative;margin-left:var(--native-rail);width:calc(100% - var(--native-rail));min-height:calc(100dvh - var(--native-header));isolation:isolate}
html[data-native-game="flight"] #native-game-stage>.welcome{min-height:calc(100dvh - var(--native-header))}
#native-game-stage.native-expanded{position:fixed;inset:0;z-index:200;width:100vw;height:100dvh;min-height:0;margin:0;overflow:auto;background:#0b1020}
#native-game-stage:fullscreen{width:100vw;height:100dvh;margin:0;overflow:auto;background:#0b1020}
html[data-native-game] #native-game-stage>.screen{min-height:calc(100dvh - var(--native-header))}
html[data-native-game] .native-expanded>.screen{min-height:100dvh!important}
html[data-native-game] .native-expanded>#play,html[data-native-game] #native-game-stage:fullscreen>#play{height:100dvh!important;min-height:100dvh!important}
@media(max-width:600px){html[data-native-game]{--native-rail:0px}.native-rail{position:relative;top:auto;bottom:auto;width:100%;height:56px;padding:5px 12px;overflow-x:auto;overflow-y:hidden;pointer-events:auto}.native-rail #rail-items{display:flex;width:max-content;padding:0;gap:12px}.native-rail-game{width:36px;height:36px;flex:none;border-radius:9px}}
@media(prefers-reduced-motion:reduce){.native-rail-game{transition:none}}
