#touchControls{display:none}
body.touch-game{overscroll-behavior:none;-webkit-user-select:none;user-select:none}
.touch-game #game,.touch-game #game canvas,.touch-game #touchControls{touch-action:none}
.touch-game #touchControls{display:block;position:fixed;inset:0;z-index:80;pointer-events:none}
#touchControls button,#touchStick{pointer-events:auto;touch-action:none;-webkit-tap-highlight-color:transparent;color:#f0e8d3;border:1px solid #8aada670;background:#102d3de8;border-radius:12px;font:600 12px system-ui;min-width:44px;min-height:44px}
#touchControls button[aria-pressed=true],#touchControls button.pressed{background:#4a6973;border-color:#e7c789}
#touchControls .touch-menu{position:absolute;top:calc(48px + env(safe-area-inset-top));left:8px;right:8px;display:flex;gap:5px;justify-content:center}
#touchControls .touch-modes{position:absolute;bottom:calc(156px + env(safe-area-inset-bottom));left:8px;display:flex;gap:4px}
#touchStick{position:absolute;bottom:calc(20px + env(safe-area-inset-bottom));left:calc(20px + env(safe-area-inset-left));width:116px;height:116px;border-radius:50%;background:#163b4a66;display:grid;place-items:center}
#touchStick span{width:48px;height:48px;border-radius:50%;background:#bdcfc177;border:1px solid #e1e7cd88;pointer-events:none}
#touchControls .touch-actions{position:absolute;bottom:calc(20px + env(safe-area-inset-bottom));right:calc(12px + env(safe-area-inset-right));display:grid;grid-template-columns:54px 65px;gap:8px}
.touch-actions button[data-hold=fire]{grid-row:span 2;border-radius:50%;font-size:13px}.touch-actions button[data-dragon]{grid-column:span 2;min-height:40px}
#touchControls .touch-zoom{position:absolute;right:8px;top:calc(104px + env(safe-area-inset-top));display:flex;flex-direction:column;gap:5px}
.touch-game header{top:0!important;left:0!important;right:0!important;height:44px!important;padding:4px 8px!important;padding-top:env(safe-area-inset-top)!important;border-radius:0!important;gap:6px!important}
.touch-game header .brand,.touch-game header .world-state,.touch-game header #sound,.touch-game header #music,.touch-game header .stocks small{display:none!important}
.touch-game header .stocks{display:flex!important;gap:14px!important;width:100%;justify-content:center;font-size:12px}.touch-game header .stocks span{min-width:0!important;padding:4px!important}.touch-game header .stocks em{font-size:14px!important}
.touch-game .brief,.touch-game .commandbar,.touch-game .mapbox,.touch-game .corner,.touch-game #worldControls,.touch-game #exerciseControls,.touch-game #controlGroups,.touch-game #view3d-controls,.touch-game #view2dBar,.touch-game #birdVolume,.touch-game .keyline,.touch-game .hint,.touch-game .telemetry{display:none!important}
.touch-game.touch-menu .brief{display:block!important;position:fixed!important;left:8px!important;right:8px!important;top:100px!important;bottom:210px!important;width:auto!important;max-height:none!important;overflow:auto!important;z-index:81!important;padding:12px!important}
.touch-game.touch-tools .commandbar{display:flex!important;position:fixed!important;left:8px!important;right:60px!important;top:100px!important;bottom:210px!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;overflow:auto!important;transform:none!important;flex-wrap:wrap!important;align-content:start!important;z-index:81!important;padding:10px!important}
.touch-game.touch-map .mapbox,.touch-game.touch-map .corner{display:block!important;position:fixed!important;right:65px!important;left:auto!important;top:100px!important;bottom:auto!important;max-width:calc(100vw - 80px)!important;z-index:81!important}
.touch-game #worldClock2d,.touch-game #worldClock{top:96px!important;left:8px!important;right:auto!important;font-size:10px!important;padding:5px!important;pointer-events:none}
.touch-game #contextHUD,.touch-game #villageAlerts{left:8px!important;top:130px!important;max-width:calc(100vw - 80px)!important;font-size:11px!important;pointer-events:none}
.touch-game #flightAltitude{display:none!important}.touch-game #speechComposer{left:8px!important;right:8px!important;width:auto!important;transform:none!important;top:110px!important;bottom:auto!important;z-index:90!important}
.touch-game input,.touch-game textarea{user-select:text;font-size:16px!important}.touch-game .brief button,.touch-game .commandbar button{min-height:44px!important}
.touch-game #deathScreen{width:min(90vw,400px)!important;z-index:100!important}.touch-game #toast{bottom:210px!important;max-width:90vw!important}.touch-game a[href*='CREDITS']{display:none!important}
@media(orientation:landscape) and (max-height:600px){#touchControls .touch-menu{top:48px;left:145px;right:145px}#touchControls .touch-modes{bottom:10px;left:145px;right:145px;justify-content:center}.touch-modes button{font-size:10px;min-width:42px}.touch-game.touch-menu .brief,.touch-game.touch-tools .commandbar{left:145px!important;right:145px!important;top:98px!important;bottom:62px!important}#touchControls .touch-zoom{top:46px;right:8px;flex-direction:row}.touch-game #worldClock2d{top:50px!important}}

.touch-game .village-status,.touch-game #dragonRide,.touch-game #horseRide,.touch-game #drinkWater,.touch-game #thirstStatus,.touch-game #coldStatus,.touch-game #restStatus,.touch-game #hoverInfo{display:none!important}
.touch-game #villageAlerts{bottom:auto!important;height:auto!important;width:calc(100vw - 80px)!important;max-height:66px!important;overflow:hidden;top:122px!important;padding:0!important;background:transparent!important;border:0!important;z-index:10!important}
.touch-game .flow-alert{font-size:10px!important;padding:5px!important;max-height:62px;overflow:auto}
.touch-game header .stocks{gap:8px!important;font-size:11px!important}.touch-game header .stocks span:last-child{max-width:110px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.touch-extra{display:none}.touch-game.touch-tools .touch-extra{position:absolute;left:8px;top:100px;right:60px;display:flex;gap:6px;z-index:82}.touch-game.touch-tools .commandbar{top:150px!important}
.touch-game #frostWeatherQuick>.weather-settings{position:fixed!important;bottom:210px!important;left:8px!important;right:8px!important;width:auto!important;max-height:calc(100dvh - 310px)!important}
@media(orientation:landscape) and (max-height:600px){.touch-game.touch-tools .touch-extra{left:145px;right:145px;top:96px}.touch-game.touch-tools .commandbar{top:146px!important}.touch-game #villageAlerts{top:98px!important;width:130px!important;max-width:130px!important;max-height:70px!important}.touch-game #frostWeatherQuick>.weather-settings{left:145px!important;right:145px!important;bottom:62px!important;max-height:calc(100dvh - 160px)!important}}

.touch-game #worldClock2d,.touch-game #worldClock{top:98px!important;bottom:auto!important;width:auto!important;max-height:24px!important}.touch-game #villageAlerts{top:130px!important}.touch-game #touchControls{box-sizing:border-box;margin:0;padding:0;width:100%;height:100dvh;max-height:100%;transform:none}.touch-game #touchControls button{margin:0;box-sizing:border-box}
.touch-game{width:100%;max-width:100%;overflow:hidden}.touch-game #touchControls{width:100dvw;max-width:100dvw;overflow:clip}
.touch-game header .stocks{min-width:0;flex:1;gap:8px!important;overflow:hidden}.touch-game header .stocks span{display:flex!important;flex:1;align-items:center;justify-content:center;gap:3px!important;min-width:0!important;overflow:hidden}.touch-game header .stocks b{font-size:12px!important;min-width:0;overflow:hidden;text-overflow:ellipsis}.touch-game header .stocks em{margin:0!important;flex:none}.touch-game #frostSettingsToggle{min-width:38px;min-height:36px;padding:5px;flex:none}
body.touch-game{position:fixed!important;inset:0!important;width:100dvw!important;height:100dvh!important;contain:paint;overflow:hidden!important}
.touch-game #contextHUD{top:98px!important;bottom:auto!important}
@media(orientation:landscape) and (max-height:600px){.touch-game #contextHUD{top:98px!important;max-width:130px!important}.touch-game #villageAlerts{top:132px!important}}
