/* The shipping Greentower touch layout is the single geometry/color source. */
body[data-shared-greentower-ui]{--shared-stick-size:clamp(112px,16vw,190px);--shared-action-size:clamp(62px,8vw,94px);--shared-action-x-gap:clamp(28px,8vw,100px);--shared-action-y-gap:clamp(20px,5vh,64px);--shared-left:max(5vw,env(safe-area-inset-left));--shared-right:max(6vw,env(safe-area-inset-right));--shared-bottom:max(4vh,env(safe-area-inset-bottom));--shared-menu-top:max(12px,env(safe-area-inset-top));font-family:system-ui,"Microsoft JhengHei",sans-serif}
body[data-shared-greentower-ui] [data-shared-ui-role="status"]{position:fixed!important;left:max(12px,env(safe-area-inset-left))!important;top:var(--shared-menu-top)!important;right:auto!important;bottom:auto!important;box-sizing:border-box;z-index:90;max-width:calc(100vw - 156px - env(safe-area-inset-left) - env(safe-area-inset-right));padding:5px 8px;border-radius:8px;background:#142f37e6;color:#fff;font:12px/1.5 system-ui;white-space:normal;overflow-wrap:anywhere;pointer-events:none}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"],body[data-shared-greentower-ui] [data-shared-ui-role="menu-toggle"]{position:fixed!important;inset:auto!important;right:max(12px,env(safe-area-inset-right))!important;top:var(--shared-menu-top)!important;z-index:1500!important;color:white;pointer-events:auto}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"]{box-sizing:border-box;max-width:min(360px,calc(100vw - 24px));max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;touch-action:pan-y;border:0;background:transparent;border-radius:12px}
body[data-shared-greentower-ui] details[data-shared-ui-role="menu"]{display:block!important}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"]>summary,body[data-shared-greentower-ui] [data-shared-ui-role="menu-toggle"]{display:flex!important;align-items:center;justify-content:center;min-width:62px;min-height:52px;padding:0 14px;box-sizing:border-box;list-style:none;border:0;border-radius:10px;background:#142533e6;color:#fff;font:14px system-ui;cursor:pointer;touch-action:manipulation}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"]>summary::-webkit-details-marker{display:none}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"]>:not(summary){box-sizing:border-box;max-width:100%;color:#fff;background:#142533ed;border-radius:10px;padding:8px}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] button,body[data-shared-greentower-ui] [data-shared-ui-role="menu"] a,body[data-shared-greentower-ui] [data-shared-ui-role="menu"] summary{box-sizing:border-box;min-height:44px;min-width:44px;border-radius:10px;color:#fff;font:14px/1.4 system-ui;touch-action:manipulation}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] button{border:0;background:#ffffff16}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] a{display:inline-flex;align-items:center;padding:8px;text-decoration:none;background:#ffffff16}
body[data-shared-greentower-ui] [data-shared-ui-role="menu-tools"]:empty{display:none}
body[data-shared-greentower-ui] [data-shared-ui-role="menu-tools"]>*,body[data-shared-greentower-ui] [data-shared-ui-role="menu"] #player-account-panel{position:static!important;inset:auto!important;max-width:100%!important;width:auto!important;transform:none!important}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] .original-menu-shell{position:static!important;inset:auto!important;width:auto!important;height:auto!important;min-height:0!important;display:block!important;transform:none!important}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] .original-menu-shell aside{position:static!important;width:auto!important;display:block!important}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] .original-menu-shell nav{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] .original-menu-content{position:static!important;max-height:none!important;min-height:0!important;width:auto!important}
body[data-shared-greentower-ui] [data-shared-ui-role="pause"]{position:fixed!important;inset:auto!important;right:max(88px,calc(env(safe-area-inset-right) + 76px))!important;top:var(--shared-menu-top)!important;z-index:1500!important;width:52px!important;height:52px!important;min-width:52px!important;min-height:52px!important;border:2px solid #ffffff70!important;border-radius:50%!important;background:#202631a6!important;color:#fff!important;font:600 16px system-ui!important;pointer-events:auto;touch-action:manipulation}
body[data-shared-greentower-ui] [data-shared-ui-role="actions"]{position:fixed!important;inset:auto!important;right:var(--shared-right)!important;bottom:var(--shared-bottom)!important;z-index:90;display:grid!important;grid-template-columns:repeat(2,var(--shared-action-size))!important;grid-template-rows:repeat(2,var(--shared-action-size))!important;column-gap:var(--shared-action-x-gap)!important;row-gap:var(--shared-action-y-gap)!important;pointer-events:none}
body[data-shared-greentower-ui] [data-shared-ui-role="action-group"]{position:static!important;inset:auto!important;display:contents!important;transform:none!important;padding:0!important;background:none!important;border:0!important}
body[data-shared-greentower-ui] [data-shared-ui-role="action"]{position:static!important;inset:auto!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;padding:0 3px!important;margin:0!important;border:2px solid #ffffff70!important;border-radius:50%!important;background:#20263155!important;color:#fff!important;box-shadow:0 1px 8px #0004!important;font:600 clamp(12px,1.8vw,16px)/1.3 system-ui!important;text-shadow:0 1px 3px #000b;display:flex;flex-direction:column;align-items:center;justify-content:center;white-space:normal;pointer-events:auto;touch-action:none}
body[data-shared-greentower-ui] [data-shared-slot="1"]{grid-column:1!important;grid-row:1!important}body[data-shared-greentower-ui] [data-shared-slot="2"]{grid-column:2!important;grid-row:1!important}body[data-shared-greentower-ui] [data-shared-slot="3"]{grid-column:1!important;grid-row:2!important}body[data-shared-greentower-ui] [data-shared-slot="4"]{grid-column:2!important;grid-row:2!important}
body[data-shared-greentower-ui] [data-shared-ui-role="action"][data-shared-slot^="aux"]{position:absolute!important;right:calc(100% + 12px)!important;width:clamp(44px,5vw,60px)!important;height:clamp(44px,5vw,60px)!important;font-size:12px!important}
body[data-shared-greentower-ui] [data-shared-slot="aux1"]{bottom:0!important}body[data-shared-greentower-ui] [data-shared-slot="aux2"]{bottom:calc(clamp(44px,5vw,60px) + 10px)!important}
body[data-shared-greentower-ui] [data-shared-ui-role="action-extra"]{min-width:44px;min-height:44px;pointer-events:auto;touch-action:manipulation}
body[data-shared-greentower-ui] [data-shared-ui-role="movement"]{position:fixed!important;inset:auto!important;left:var(--shared-left)!important;bottom:max(6vh,env(safe-area-inset-bottom))!important;z-index:90;width:var(--shared-stick-size)!important;height:var(--shared-stick-size)!important;box-sizing:border-box!important;border-radius:50%!important;background:#18202b42!important;border:2px solid #ffffff6b!important;box-shadow:inset 0 0 0 1px #ffffff19!important;pointer-events:auto;touch-action:none;display:grid!important;place-items:center}
body[data-shared-greentower-ui] [data-shared-ui-role="movement"]::before{display:none!important}
body[data-shared-greentower-ui] [data-shared-ui-role="movement-knob"]{position:absolute!important;left:50%!important;top:50%!important;width:44%!important;height:44%!important;box-sizing:border-box;border-radius:50%!important;background:#e6e9eda8!important;box-shadow:none!important;pointer-events:none}
body[data-shared-greentower-ui] #walk-stick>[data-shared-ui-role="movement-knob"],body[data-shared-greentower-ui] [data-shared-ui-role="movement"]>span[data-shared-ui-role="movement-knob"]{margin-left:-22%;margin-top:-22%}
body[data-shared-greentower-ui] [data-shared-ui-role="action"]:active{background:#ffffff55!important;transform:scale(.96)}
body[data-shared-greentower-ui] [data-shared-ui-role="action"]:disabled{opacity:.38;cursor:not-allowed}
body[data-shared-greentower-ui] [data-shared-ui-role]:focus-visible,body[data-shared-greentower-ui] [data-shared-ui-role="menu"] :focus-visible{outline:3px solid #f8d15a;outline-offset:2px}
body[data-shared-greentower-ui] [data-shared-in-menu="true"]{position:static!important;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto!important;gap:6px!important;pointer-events:auto}
body[data-shared-greentower-ui] [data-shared-in-menu="true"] [data-shared-ui-role="action"]{position:static!important;grid-area:auto!important;width:auto!important;height:auto!important;min-height:44px!important;border-radius:10px!important;font-size:13px!important}
body[data-shared-greentower-ui] [data-shared-ui-controller]{pointer-events:none}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] [data-shared-ui-controller]{position:static!important;inset:auto!important;display:block!important;pointer-events:auto}
body[data-shared-greentower-ui] [data-shared-active="false"],body[data-shared-greentower-ui] [data-shared-ui-role][hidden]{display:none!important}
@media(pointer:fine){body[data-shared-greentower-ui] [data-shared-ui-role="movement"]{display:none!important}}
@media(max-width:600px){body[data-shared-greentower-ui]{--shared-right:max(12px,env(safe-area-inset-right));--shared-left:max(12px,env(safe-area-inset-left));--shared-action-x-gap:12px;--shared-action-y-gap:12px}}

body[data-shared-greentower-ui] [data-shared-ui-role="menu-tools"]>*:not([hidden]){display:block!important}
/* Borrowed scenic options flow inside the menu; their old upward popup must
   not cover the original menu summary or escape its scrollable contents. */
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] #destination-options-content{position:static!important;inset:auto!important;max-height:none!important;overflow:visible}
body[data-shared-greentower-ui] [data-shared-ui-role="action-group"]>.maglev-driver-actions{display:contents!important}
body[data-shared-greentower-ui] #maglev-driver-controls[data-shared-ui-role="action-group"]>p,body[data-shared-greentower-ui] #maglev-driver-controls[data-shared-ui-role="action-group"]>span{display:none}
body[data-shared-greentower-ui] #touch-drive-controls[data-shared-ui-controller]{display:block!important}
body[data-shared-greentower-ui="destinations"] #walk-controls[data-shared-ui-controller]{position:static!important;inset:auto!important;background:none!important;padding:0!important}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] #destination-tools,body[data-shared-greentower-ui] [data-shared-ui-role="menu"] header{position:static!important;inset:auto!important}
body[data-shared-greentower-ui="story"] main{padding-top:82px}
@media(pointer:coarse){body[data-shared-greentower-ui] [data-shared-pause-fallback]{display:none!important}}

body[data-shared-greentower-ui] [data-shared-ui-role="menu"] #wallet:not([hidden]),body[data-shared-greentower-ui] [data-shared-ui-role="menu"] #mission:not([hidden]),body[data-shared-greentower-ui] [data-shared-ui-role="menu"] #hint:not([hidden]),body[data-shared-greentower-ui] [data-shared-ui-role="menu"] #vehicle-status:not([hidden]),body[data-shared-greentower-ui] [data-shared-ui-role="menu"] #mode-links:not([hidden]),body[data-shared-greentower-ui] [data-shared-ui-role="menu"] #fps:not([hidden]),body[data-shared-greentower-ui] [data-shared-ui-role="menu"] #corridor-meta:not([hidden]){position:static!important;inset:auto!important;transform:none!important;display:block!important;width:auto!important}

/* A 320px viewport cannot fit auxiliary targets between the two bottom docks. */
@media(max-width:360px){body[data-shared-greentower-ui] [data-shared-ui-role="action"][data-shared-slot^="aux"]{right:0!important;bottom:calc(100% + 12px)!important}body[data-shared-greentower-ui] [data-shared-ui-role="action"][data-shared-slot="aux2"]{right:54px!important}}

/* Opt-in presentation outranks the old menu's intentional full-screen rules,
   including its dynamically inserted stylesheet, without replacing its owner. */
html body[data-shared-greentower-ui] :is(#official-game-menu,#simple-game-menu,#city-hud-menu)[data-original-game-menu][data-original-game-menu][data-shared-ui-role="menu"][open]{position:fixed!important;inset:auto!important;right:max(12px,env(safe-area-inset-right))!important;top:var(--shared-menu-top)!important;width:auto!important;max-width:min(360px,calc(100vw - 24px))!important;max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;margin:0!important;padding:0!important;border-radius:12px!important;background:transparent!important;backdrop-filter:none!important;z-index:1500!important}
html body[data-shared-greentower-ui] :is(#official-game-menu,#simple-game-menu,#city-hud-menu)[data-original-game-menu][data-original-game-menu][data-shared-ui-role="menu"][open]>:not(summary):not([hidden]){display:block!important}
body[data-shared-greentower-ui] details[data-shared-ui-role="menu"]:not([open])>:not(summary){display:none!important}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] :is(.city-hud-sheet,.topbar,.view-switch,.lantern-panel,.climate-panel,.climate-fields,#destination-navigation-content){position:static!important;inset:auto!important;width:auto!important;max-width:100%!important;max-height:none!important;transform:none!important;margin:6px 0!important}
body[data-shared-greentower-ui]>.climate-panel{right:calc(max(12px,env(safe-area-inset-right)) + 74px)!important}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] .original-menu-shell{margin:0!important;gap:8px!important}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"]>.city-hud-sheet:not([hidden]){display:block!important}

body[data-shared-greentower-ui] [data-shared-ui-role="menu"]>summary,body[data-shared-greentower-ui] [data-shared-ui-role="menu-toggle"]{width:62px!important;height:52px!important;text-align:center}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"]:not(details){top:calc(var(--shared-menu-top) + 60px)!important;max-height:calc(100dvh - 84px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important}

body[data-shared-greentower-ui] [data-shared-ui-role="menu"] canvas{position:static!important;inset:auto!important;display:block!important;max-width:100%!important;width:min(100%,280px)!important;height:auto!important;transform:none!important;margin:8px auto!important}
body[data-shared-greentower-ui] [data-shared-ui-role="menu"] #maglev-readout{position:static!important;inset:auto!important;max-width:100%!important;width:auto!important;transform:none!important}
