/* A quiet interface around the original pixel-art world. */
:root{--ui-surface:rgba(17,24,23,.94);--ui-stroke:rgba(204,221,209,.14);--ui-text:#e1e8e2;--ui-soft:#9baaa0}
#game-shell .topbar{background:rgba(14,21,20,.96);border-color:var(--ui-stroke);box-shadow:none;gap:20px;padding-inline:20px}
#game-shell .brand{font-family:'Segoe UI',sans-serif;font-weight:650;letter-spacing:-.5px;font-size:19px;gap:9px}
#game-shell .brand small{display:none}
#game-shell .brand-mark{width:30px;height:32px;font-size:23px;line-height:32px;clip-path:none;border:0;border-radius:7px;background:#cfb57c}
#game-shell .nav-tabs{gap:4px;margin-left:12px;align-items:center;overflow:visible}
#game-shell .nav-tabs>button,#game-shell .nav-tabs summary{font-size:12px;font-weight:500;color:var(--ui-soft);padding:9px 12px;border-radius:8px;white-space:nowrap}
#game-shell .nav-tabs>button.active{background:#ffffff0b;color:var(--ui-text)}
#game-shell .nav-tabs>button.active:after{display:none}
#game-shell .nav-tabs>button:hover,#game-shell .nav-tabs summary:hover{background:#ffffff09;color:var(--ui-text)}
#game-shell .nav-tabs #bag-count{margin-left:5px;background:#ffffff0b;border-radius:5px;padding:2px 5px;color:#bac6ba}
.ui-more{position:relative;align-self:center}
.ui-more summary{cursor:pointer;list-style:none;display:flex;gap:8px;align-items:center}
.ui-more summary::-webkit-details-marker{display:none}
.ui-more summary:after{content:'⌄';color:#a3b4a8}
.ui-more[open] summary{background:#ffffff0b!important;color:#e1e8e2!important}
.ui-more-menu{position:absolute;top:calc(100% + 12px);left:0;width:260px;display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:9px;border:1px solid var(--ui-stroke);border-radius:12px;background:#141e1b;box-shadow:0 16px 48px #0007;z-index:30}
#game-shell .nav-tabs .ui-more-menu>*{display:flex;align-items:center;justify-content:flex-start;gap:6px;min-height:42px;padding:10px;color:#b9c6bc;font-size:12px;border-radius:7px;margin:0}
#game-shell .nav-tabs .ui-more-menu>*:hover,#game-shell .nav-tabs .ui-more-menu>*.active{background:#ffffff0b;color:#ede8d6}
#game-shell .nav-tabs .ui-more-menu button:after{display:none}
#game-shell .nav-tabs .ui-more-menu svg{width:15px;height:15px}
#game-shell .wallet-balance{background:#ffffff04;border-color:var(--ui-stroke);border-radius:7px;box-shadow:none}
#game-shell .connection{opacity:.8}
#game-shell .chat-panel{background:var(--ui-surface);border:1px solid var(--ui-stroke);border-radius:12px;box-shadow:0 8px 32px #0003}
#game-shell .chat-toggle{background:transparent;min-height:40px;color:#c2cec4;border-bottom:1px solid var(--ui-stroke)}
#game-shell .chat-title kbd{border:0;background:#ffffff08;color:#84968a}
#game-shell .chat-tabs{border-color:var(--ui-stroke)}
#game-shell .chat-tabs button[aria-selected=true]{background:transparent;border-bottom-color:#c6b17e;color:#ddd5bb}
#game-shell .chat-scope{background:transparent;color:#92a398}
#game-shell .chat-form input[type=text]{border-color:var(--ui-stroke);border-radius:8px;background:#ffffff04}
#game-shell .chat-send{border:0;border-radius:8px;background:#b8c5ad;color:#17231c}
#game-shell .chat-log{font-weight:400}
#game-shell .action-dock{background:rgba(16,24,22,.95);border:1px solid var(--ui-stroke);border-radius:14px;padding:6px;gap:4px;box-shadow:0 8px 30px #0004}
#game-shell .action-dock>button{border:1px solid transparent;border-radius:9px;background:transparent;box-shadow:none;color:#bdc9bd}
#game-shell .action-dock>button:hover{background:#ffffff0c;border-color:var(--ui-stroke)}
#game-shell .action-dock>button strong{font-weight:500}
#game-shell .action-dock>button small{color:#839589}
#game-shell .action-dock .attack-button{background:#c3ad77;color:#1c251d;border:0}
#game-shell .action-dock .attack-button small{color:#3e4b36}
#game-shell .action-dock .shortcut-hint{border:0;background:#ffffff0c;color:#95a38f;border-radius:3px}
#game-shell .action-dock .attack-button .shortcut-hint{color:#46503a}
#game-shell .right-column .minimap-card{border-color:var(--ui-stroke);border-radius:10px;box-shadow:none;background:var(--ui-surface)}
#game-shell .drawer{border-color:var(--ui-stroke);border-radius:14px;background:#121c19f7}
#game-shell .drawer-header{border-color:var(--ui-stroke)}
@media(min-width:1101px){#game-shell .topbar{height:60px}#game-shell .player-card,#game-shell .right-column{top:80px}#game-shell .chat-panel.expanded:not(.sized){width:340px}#game-shell .chat-panel.expanded:not(.sized) #chat-body{height:220px}#game-shell .action-dock>button{min-height:48px}#game-shell .action-dock>button small{display:none}}
@media(min-width:761px) and (max-width:1100px){#game-shell .topbar{gap:10px;padding-inline:12px}#game-shell .brand{font-size:16px}#game-shell .nav-tabs{margin-left:0;gap:0}#game-shell .nav-tabs>button,#game-shell .nav-tabs summary{padding:8px}}
@media(max-width:760px){#game-shell .topbar{gap:8px;padding-inline:12px}#game-shell .brand{font-size:16px}#game-shell .brand-mark{width:24px;height:26px;font-size:20px;line-height:26px}#game-shell .action-dock{border-radius:12px}#game-shell .chat-panel{border-radius:10px}}
@media(prefers-reduced-motion:reduce){.ui-more-menu{scroll-behavior:auto}}
/* Refined top chrome; player-card artwork and contents stay original. */
#game-shell .brand>span:not(.brand-mark){display:none}
#game-shell .brand{flex:0 0 auto}
#game-shell .brand .brand-mark{width:34px;height:34px;line-height:34px;border-radius:10px;background:#d0b77f;color:#18251e;box-shadow:inset 0 1px 0 #fff3;font-size:25px}
#game-shell .topbar{background:#101916f5;border-bottom:1px solid #d9e8dc12;gap:22px}
#game-shell .nav-tabs{margin-left:0;gap:6px}
#game-shell .nav-tabs>button,#game-shell .nav-tabs summary{color:#aab7ad;border-radius:9px;padding:9px 13px}
#game-shell .nav-tabs>button.active{background:#b8c9bc12;color:#edf0e8}
#game-shell .header-wallet{gap:3px;padding:3px;background:#ffffff03;border:1px solid #d9e8dc0d;border-radius:12px}
#game-shell .wallet-balance{border:0;background:transparent;padding:6px 10px;font-size:12px}
#game-shell .wallet-balance svg{width:15px;height:15px;opacity:.85}
#game-shell .wallet-topup{width:34px;height:34px;min-height:34px;border:1px solid #caa65b55;border-radius:8px;box-shadow:none}
#game-shell .audio-settings-button,#game-shell #help-button{border:1px solid #d9e8dc16;background:#ffffff03;box-shadow:none;border-radius:10px;color:#a4b5a6}
#game-shell .connection{font-size:9px;gap:3px 6px;color:#8e9f92}
#game-shell .right-column{gap:10px}
#game-shell .right-column .panel{background:#111c18f2;border:1px solid #d9e8dc1a;border-top:1px solid #d9e8dc1a;border-radius:13px;box-shadow:0 8px 28px #0003;padding:14px}
#game-shell .right-column .panel-eyebrow{color:#b9c7bc;font-size:11px;letter-spacing:0;text-transform:none;margin-bottom:10px}
#game-shell .right-column .live-clock{color:#92a69a;font-size:10px;font-variant-numeric:tabular-nums}
#game-shell #minimap{border-radius:7px;border:1px solid #d9e8dc0d}
#game-shell .map-key{color:#7f9587;font-size:9px;padding-top:8px}
#game-shell .ui-more-menu{border-color:#d9e8dc20;border-radius:14px;padding:8px;background:#142019;box-shadow:0 14px 45px #0006}
@media(max-width:760px){#game-shell .topbar{gap:8px}#game-shell .brand .brand-mark{width:30px;height:30px;line-height:30px;font-size:23px}#game-shell .right-column .panel{padding:8px;border-radius:10px}#game-shell .right-column .panel-eyebrow{font-size:9px;margin-bottom:5px}#game-shell .map-key{padding-top:4px}}
#game-shell .nav-tabs>button,#game-shell .ui-more summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 12px}
.ui-pixel-icon{width:16px;height:16px;flex:none;fill:currentColor;shape-rendering:crispEdges;color:#c2af7f}
#game-shell #player-card:not([data-tier="premium"]):not([data-tier="diamond"]):not([data-tier="creator"]){background:rgba(22,38,29,.76);backdrop-filter:blur(8px);border:1px solid #b7c79b28;border-radius:9px;box-shadow:0 5px 20px #0002}
#game-shell .chat-composer{display:flex;align-items:center;gap:6px;padding:7px 9px 0;flex-shrink:0}
#game-shell .chat-composer .chat-channel-bar{padding:0;margin:0;flex:0 0 auto;width:auto;border:0}
#game-shell .chat-composer .chat-channel-trigger{width:auto;min-width:76px;min-height:40px;gap:5px;padding:7px;border:1px solid #d9e8dc20;border-radius:8px;background:#ffffff05}
#game-shell .chat-composer .chat-channel-copy small{display:none}
#game-shell .chat-composer .chat-channel-copy strong{font-size:11px}
#game-shell .chat-composer .chat-channel-icon{width:auto;height:auto;font-size:15px;background:transparent;border:0}
#game-shell .chat-composer .chat-form{flex:1;min-width:0;padding:0;gap:5px}
#game-shell .chat-composer .chat-form input{min-width:0;width:0;flex:1}
#game-shell .chat-composer .chat-channel-arrow{font-size:12px}
#chat-channel-menu.chat-channel-menu{padding:5px;border-radius:10px;background:#142019;border:1px solid #d9e8dc26;box-shadow:0 12px 35px #0006}
#chat-channel-menu .chat-channel-heading{display:none}
#chat-channel-menu button[data-channel]{min-height:40px;padding:8px;gap:9px;border-radius:6px}
#chat-channel-menu .chat-option-copy small{display:none}
#chat-channel-menu .chat-option-icon{width:25px;height:25px;font-size:16px}
#chat-channel-menu:popover-open{animation:channel-fade-up .16s ease-out}
@keyframes channel-fade-up{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:760px){#game-shell .chat-composer .chat-channel-trigger{min-width:40px;min-height:44px}#game-shell .chat-composer .chat-channel-copy{display:none}#game-shell .chat-composer .chat-form input{font-size:16px}}
@media(prefers-reduced-motion:reduce){#chat-channel-menu:popover-open{animation:none}}
#chat-channel-menu::backdrop{background:transparent;backdrop-filter:none}
/* Comfortable Thai labels and the familiar soft red attack action. */
#game-shell #attack-button{background:#bd7974;color:#fff1eb;border:1px solid #d79b93}
#game-shell #attack-button:hover{background:#ca8580}
#game-shell #attack-button small{color:#f2d4cd}
#game-shell #attack-button .shortcut-hint{color:#f9ddd5;background:#6f35352b}
#game-shell .action-dock #quick-serum-button,#game-shell .action-dock #quick-medicine-button{gap:3px;padding:8px 5px;overflow:hidden}
#game-shell .action-dock #quick-serum-button strong,#game-shell .action-dock #quick-medicine-button strong{display:block;line-height:1.6;font-size:12px;white-space:nowrap;margin:0;flex-shrink:0}
#game-shell .action-dock #quick-serum-button small,#game-shell .action-dock #quick-medicine-button small{display:none}
#game-shell .action-dock .quick-medicine-icon{height:24px;min-height:24px;line-height:24px;flex-shrink:0}
@media(pointer:coarse){#game-shell.touch-playing .action-dock #quick-serum-button strong,#game-shell.touch-playing .action-dock #quick-medicine-button strong{display:none}}
#game-shell #attack-button{background:#984e43;border-color:#b86958;color:#ffe9d9}
#game-shell #attack-button:hover{background:#ac5b4e}
#game-shell #attack-button small{color:#e7bda8}
#game-shell #attack-button .shortcut-hint{color:#f2cdb8;background:#58291f33}
#game-shell .chat-panel{background:rgba(22,38,29,.58);backdrop-filter:blur(8px);border:1px solid #b7c79b28;box-shadow:0 5px 20px #0002}
#game-shell .chat-toggle{background:transparent}
@media(min-width:1101px){#game-shell .topbar{height:50px;padding-inline:16px;gap:16px}#game-shell .brand .brand-mark{width:28px;height:28px;line-height:28px;font-size:22px;border-radius:8px}#game-shell .nav-tabs>button,#game-shell .ui-more summary{min-height:38px;padding:7px 10px;font-size:11px;gap:7px}#game-shell .header-wallet{padding:2px;border-radius:9px}#game-shell .wallet-topup{width:28px;height:28px;min-height:28px}#game-shell .wallet-balance{padding:4px 8px;font-size:11px}#game-shell .audio-settings-button,#game-shell #help-button{width:30px;height:30px;min-height:30px}#game-shell .player-card,#game-shell .right-column{top:68px}}
#game-shell .ui-pixel-icon{width:22px;height:22px;object-fit:contain;image-rendering:pixelated;flex:none}
#game-shell .ui-more-menu .ui-pixel-icon{width:24px;height:24px}
#game-shell .audio-settings-button .ui-pixel-icon,#game-shell #help-button .ui-pixel-icon{width:24px;height:24px;margin:auto}
#game-shell .mobile-tabs .ui-pixel-icon{display:block;width:22px;height:22px;margin:0 auto 3px}
@media(min-width:1101px){#game-shell .nav-tabs>button .ui-pixel-icon,#game-shell .ui-more summary .ui-pixel-icon{width:20px;height:20px}}
#game-shell .audio-launcher{width:30px;height:30px;min-height:30px;border:1px solid #d9e8dc16;background:#ffffff03;border-radius:9px;display:grid;place-items:center}
#game-shell .audio-launcher .ui-pixel-icon{width:24px;height:24px}
#game-shell .topbar .connection.server-ping{flex:0 0 auto;min-width:126px;grid-template-columns:6px auto;gap:3px 6px}
#game-shell .connection #connection-dot{grid-column:1;grid-row:1}
#game-shell .connection #connection-text{grid-column:2;grid-row:1}
#game-shell .connection #player-count{grid-column:1 / -1;grid-row:2;white-space:nowrap;line-height:1.4;font-size:9px}
#game-shell .audio-header-tools{display:flex;align-items:center;gap:6px;align-self:center}
#game-shell .audio-header-tools .audio-launcher,#game-shell .audio-header-tools #help-button{display:grid;place-items:center;width:30px;height:30px;min-height:30px;padding:0;line-height:1}
#game-shell .audio-header-tools img.ui-pixel-icon{display:block;width:22px;height:22px;margin:0;object-fit:contain;align-self:center;justify-self:center}
/* Complete button boundaries and centered labels, including disabled actions. */
#game-shell .action-dock>button{border:1px solid #98ac833e;text-align:center;justify-content:center;align-items:center}
#game-shell .action-dock>button strong,#game-shell .action-dock>button small{width:100%;text-align:center}
#game-shell .action-dock #return-town-button{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px;border:1px solid #98ac833e;border-radius:9px}
#game-shell .action-dock #attack-button{border-color:#b86958}
@media(max-width:760px) and (orientation:portrait){
 #game-shell .mobile-tabs{align-items:stretch;height:calc(56px + env(safe-area-inset-bottom,0px));gap:3px;padding:3px 5px env(safe-area-inset-bottom,0px)}
 #game-shell .mobile-tabs>button,#game-shell .mobile-tabs>a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;flex:0 0 56px;min-width:56px;min-height:46px;padding:4px 3px;border:1px solid #98ac8326;border-radius:7px;font-size:10px;line-height:1.2;text-align:center;white-space:nowrap;background:#ffffff03;color:#b6c4b5}
 #game-shell .mobile-tabs>button.active{border:1px solid #c9b47c77;background:#c9b47c12}
 #game-shell .mobile-tabs .ui-pixel-icon{width:22px;height:22px;margin:0}
 #game-shell .mobile-tabs svg{display:none}
 #game-shell .mobile-tabs [data-quest-count]{position:absolute;font-size:8px;right:3px;top:3px}
 #game-shell .mobile-tabs>*{position:relative}
 #game-shell:not(.touch-playing) .action-dock{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:5px;width:100%;max-width:360px}
 #game-shell:not(.touch-playing) .action-dock>button{grid-column:auto;grid-row:auto;min-height:46px;height:46px;display:flex;flex-direction:column;gap:2px;padding:4px;font-size:10px;line-height:1.25}
 #game-shell:not(.touch-playing) .action-dock>button strong{font-size:10px;line-height:1.4}
 #game-shell:not(.touch-playing) .action-dock>button small{display:none}
 #game-shell:not(.touch-playing) .action-dock #attack-button{grid-column:span 2;padding-top:5px!important;flex-direction:row}
 #game-shell:not(.touch-playing) .action-dock .quick-medicine-icon{height:19px;min-height:19px;font-size:18px;line-height:19px}
 #game-shell:not(.touch-playing) .action-dock #return-town-button{grid-column:span 2}
}
/* One-row mobile header; keep wallet and settings reachable. */
@media(max-width:760px){
 #game-shell .topbar{display:flex!important;flex-wrap:nowrap!important;height:50px!important;min-height:50px!important;max-height:50px!important;padding:0 8px!important;gap:6px!important;align-items:center!important}
 #game-shell .topbar>.brand{flex:0 0 28px;margin:0!important}
 #game-shell .topbar .brand .brand-mark{width:28px;height:28px;line-height:28px;font-size:22px}
 #game-shell .topbar>.nav-tabs,#game-shell .topbar>.connection{display:none!important}
 #game-shell .topbar #header-wallet{position:static!important;grid-column:auto!important;grid-row:auto!important;order:1;flex:1 1 auto;width:auto!important;min-width:0;margin:0 0 0 auto!important;justify-content:flex-end;gap:1px;padding:2px}
 #game-shell .topbar .wallet-balance{gap:3px;padding:4px 5px;font-size:10px}
 #game-shell .topbar .wallet-balance svg{width:12px;height:12px}
 #game-shell .topbar .wallet-balance strong{max-width:48px}
 #game-shell .topbar .wallet-topup{width:26px;height:26px;min-height:26px}
 #game-shell .topbar .audio-header-tools{position:static!important;grid-row:auto!important;grid-column:auto!important;order:2;flex:0 0 auto;gap:4px;margin:0!important}
 #game-shell .topbar .audio-header-tools .audio-launcher,#game-shell .topbar .audio-header-tools #help-button{width:28px;height:28px;min-height:28px}
 #game-shell .topbar .audio-header-tools img.ui-pixel-icon{width:20px;height:20px}
}
.mobile-menu-toggle{display:none}
@media(max-width:760px){
 #game-shell .topbar #header-wallet{flex:0 1 auto;margin:0!important;width:fit-content!important;justify-content:flex-start;max-width:calc(100vw - 140px)}
 #game-shell .topbar .audio-header-tools{margin-left:auto!important}
 #game-shell .topbar .mobile-menu-toggle{display:grid;place-items:center;order:3;flex:0 0 30px;width:30px;height:30px;padding:0;border:1px solid #98ac833e;border-radius:8px;background:#ffffff03;color:#c9d3c5;font-size:19px;line-height:1}
 #game-shell .mobile-tabs{display:none!important;position:absolute;inset:50px 0 auto!important;bottom:auto!important;height:58px!important;min-height:58px;padding:4px 6px!important;box-shadow:0 8px 18px #0003;z-index:12;background:#122019f5;border-top:0;border-bottom:1px solid #b7c79b28}
 #game-shell.mobile-menu-open .mobile-tabs{display:flex!important}
 #game-shell{--mobile-nav-height:0px}
}
/* Show every mobile destination at once, without a scroll strip. */
@media(max-width:760px){
 #game-shell .mobile-tabs{height:auto!important;min-height:0!important;overflow:visible!important;overflow-x:visible!important;overflow-y:visible!important;padding:6px!important;gap:4px!important}
 #game-shell.mobile-menu-open .mobile-tabs{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr));align-items:stretch}
 #game-shell .mobile-tabs>button,#game-shell .mobile-tabs>a{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:none;min-width:0!important;width:100%;min-height:46px;padding:4px 1px!important;gap:2px;font-size:8px!important;line-height:1.3;text-align:center;white-space:nowrap;border:1px solid #98ac8326;border-radius:6px;background:#ffffff03}
 #game-shell .mobile-tabs .ui-pixel-icon{width:20px;height:20px;margin:0}
 #game-shell .mobile-tabs .wiki-nav{margin:0!important}
}
@media(max-width:350px){#game-shell.mobile-menu-open .mobile-tabs{grid-template-columns:repeat(6,minmax(0,1fr))}}
/* Desktop dock has one stable centered row, rather than inherited mixed grids. */
@media(min-width:1101px) and (pointer:fine){
 #game-shell:not(.touch-playing) .bottom-hud{display:flex;justify-content:center;align-items:flex-end}
 #game-shell:not(.touch-playing) .combat-controls{flex:0 1 760px;width:min(760px,100%);max-width:760px;min-width:0}
 #game-shell:not(.touch-playing) .bottom-hud .coordinate{position:absolute;right:0;bottom:0}
 #game-shell:not(.touch-playing) .bottom-hud .control-tip{position:absolute;left:0;bottom:0}
 #game-shell:not(.touch-playing) .action-dock:has(#emote-button){display:flex;align-items:stretch;justify-content:center;width:100%;max-width:760px;gap:4px;padding:6px;border:1px solid #98ac833e;border-radius:12px;background:#111c18eb}
 #game-shell:not(.touch-playing) .action-dock>button{flex:1 1 0;min-width:0;width:auto;height:58px;min-height:58px;margin:0}
 #game-shell:not(.touch-playing) .action-dock #bag-shortcut{width:auto;height:58px;min-height:58px;flex:1 1 0}
 #game-shell:not(.touch-playing) .action-dock #attack-button{flex:1.8 1 0}
 #game-shell:not(.touch-playing) .action-dock #nearby-button{flex:1.3 1 0}
 #game-shell:not(.touch-playing) .action-dock #return-town-button{flex:1 1 0;padding:5px;font-size:11px;white-space:nowrap}
 #game-shell:not(.touch-playing) .action-dock #quick-serum-button,#game-shell:not(.touch-playing) .action-dock #quick-medicine-button{opacity:.85;border:1px solid #98ac8355;background:#ffffff04}
 #game-shell:not(.touch-playing) .action-dock .action-slot small{display:none}
 #game-shell:not(.touch-playing) .action-dock #nearby-button strong{font-size:12px;white-space:nowrap}
}
/* Portrait touch controls share explicit cells; no inherited accessory overlaps. */
@media(max-width:760px) and (orientation:portrait){
 #game-shell.touch-playing .bottom-hud{left:auto;right:max(8px,env(safe-area-inset-right,0px));bottom:calc(12px + env(safe-area-inset-bottom,0px));width:204px}
 #game-shell.touch-playing .combat-controls:has(#bag-shortcut){gap:6px;width:100%}
 #game-shell.touch-playing .action-dock:has(#emote-button){display:grid;width:100%;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:72px 46px 46px;gap:5px;padding:0;background:none;border:0;box-shadow:none}
 #game-shell.touch-playing .action-dock>button{position:relative;inset:auto;width:100%;height:46px;min-height:46px;margin:0;padding:4px;border-radius:10px;grid-column:auto;grid-row:auto}
 #game-shell.touch-playing .action-dock #nearby-button{grid-column:1;grid-row:1;width:100%;height:72px;min-height:72px;border-radius:12px}
 #game-shell.touch-playing .action-dock #attack-button{grid-column:2 / 4;grid-row:1;width:100%;height:72px;min-height:72px;border-radius:14px;padding:6px!important;background:#984e43;border-color:#b86958}
 #game-shell.touch-playing .action-dock #bag-shortcut{position:relative;inset:auto;grid-column:1;grid-row:2;width:100%;height:46px;min-height:46px;gap:1px;padding:3px;border-radius:10px;z-index:auto}
 #game-shell.touch-playing #bag-shortcut svg{width:20px;height:20px}
 #game-shell.touch-playing #bag-shortcut span{font-size:10px}
 #game-shell.touch-playing .action-dock #quick-serum-button{grid-column:2;grid-row:2;width:100%;height:46px;min-height:46px;border-radius:10px}
 #game-shell.touch-playing .action-dock #quick-medicine-button{grid-column:3;grid-row:2;width:100%;height:46px;min-height:46px;border-radius:10px}
 #game-shell.touch-playing .action-dock #emote-button{grid-column:1;grid-row:3;width:100%;height:46px;min-height:46px;border-radius:10px}
 #game-shell.touch-playing .action-dock #auto-attack-button{grid-column:2;grid-row:3;width:100%;height:46px;min-height:46px;border-radius:10px}
 #game-shell.touch-playing .action-dock #return-town-button{grid-column:3;grid-row:3;font-size:11px;line-height:1.4;padding:3px}
 #game-shell.touch-playing .action-dock .shortcut-hint{display:none!important}
 #game-shell.touch-playing .touch-stick{left:max(8px,env(safe-area-inset-left,0px));bottom:calc(78px + env(safe-area-inset-bottom,0px));width:92px;height:92px}
 #game-shell.touch-playing .stick-knob{width:42px;height:42px}
 #game-shell .touch-tools{top:6px;right:6px;gap:4px}
 #game-shell .touch-tools button{min-width:30px;min-height:36px;font-size:11px;padding:4px}
 #game-shell .touch-tools #rotate-button{display:none}
}
@media(max-width:760px) and (orientation:portrait){
 #game-shell .touch-tools{display:none}
 #game-shell .topbar .audio-header-tools .audio-launcher{display:grid}
}
@media(max-width:760px) and (orientation:portrait){
 #game-shell.touch-playing .action-dock:has(#emote-button){grid-template-rows:72px 46px 46px 44px}
 #game-shell.touch-playing .action-dock #vehicle-shortcut{position:relative;inset:auto;grid-column:1 / 4;grid-row:4;justify-self:stretch;width:100%;height:44px;min-height:44px;display:flex;flex-direction:row;gap:6px;border-radius:10px}
 #game-shell.touch-playing .action-dock #vehicle-shortcut img{width:30px;height:30px;object-fit:contain}
 #game-shell.touch-playing .action-dock #vehicle-shortcut small{display:none}
}
/* Compact mobile quest menu, with the full chapter text still reachable. */
@media(max-width:760px){
 #game-shell .chapter-menu-heading{padding:2px 28px 8px 0}
 #game-shell .chapter-journal .chapter-menu-heading h2{font-size:19px;margin:3px 0}
 #game-shell .chapter-menu-heading p{font-size:11px;margin:3px 0;line-height:1.6}
 #game-shell .chapter-cover-card{height:180px}
 #game-shell .chapter-cover-top{top:10px;left:12px;right:12px}
 #game-shell .chapter-cover-copy{left:12px;right:12px;bottom:12px;gap:3px}
 #game-shell .chapter-cover-copy>strong{font-size:21px;line-height:1.4}
 #game-shell .chapter-cover-description{font-size:11px;line-height:1.5}
 #game-shell .chapter-open-label{margin-top:4px;padding-top:6px;font-size:12px}
 #game-shell .chapter-menu-progress{padding-top:10px}
 #game-shell .chapter-journal .chapter-menu-synopsis{font-size:11px;line-height:1.6;margin:10px 0}
 #game-shell .chapter-other-button{min-height:48px;padding:10px}
 #game-shell .chapter-banner{min-height:120px;padding:12px}
 #game-shell .chapter-journal .chapter-banner h2{font-size:20px}
 #game-shell .chapter-list-heading{margin:12px 0 8px}
}
/* Mobile header exposes the live online count beside the settings controls. */
@media(max-width:760px){
 #game-shell .topbar>.connection.server-ping{display:flex!important;order:1;flex:0 0 auto;min-width:0;margin-left:auto;opacity:1}
 #game-shell .topbar>.connection :is(#connection-dot,#connection-text){display:none}
 #game-shell .topbar>.connection #player-count{display:block;font-size:9px;line-height:1.4;white-space:nowrap;color:#b9cbbf}
 #game-shell .topbar .audio-header-tools{margin-left:0!important}
 #game-shell .topbar .audio-header-tools .audio-launcher{width:38px;height:40px;min-height:40px;display:flex;flex-direction:column;justify-content:center;gap:1px;padding:2px}
 #game-shell .topbar .audio-launcher::after{content:'ตั้งค่า';font-size:8px;line-height:1.3;color:#c9d3c5}
 #game-shell .topbar .mobile-menu-toggle{height:40px;display:flex;flex-direction:column;justify-content:center;gap:1px;font-size:18px}
 #game-shell .topbar .mobile-menu-toggle::after{content:'เมนู';font-size:8px;line-height:1.3}
 #game-shell .topbar #header-wallet{max-width:calc(100vw - 206px)}
 #game-shell .topbar .wallet-balance{padding:3px;gap:2px}
}
@media(pointer:coarse){
 #game-shell.touch-playing .touch-stick{visibility:hidden;pointer-events:none;opacity:0}
 #game-shell.touch-playing .touch-stick.stick-active{visibility:visible;opacity:1}
}
@media(max-width:760px){
 #game-shell .topbar .mobile-menu-toggle{order:99;margin-left:0;flex-shrink:0}
 #game-shell .topbar .audio-header-tools{order:98}
}
@media(max-width:760px){
 #game-shell .topbar .audio-header-tools{margin-left:auto!important}
 #game-shell .topbar .mobile-menu-toggle{margin-left:0!important;margin-right:0!important}
 #game-shell .topbar>.connection.server-ping{margin-left:0}
}
@media(max-width:760px){
 #game-shell .topbar .audio-header-tools{display:flex;order:98;gap:4px;margin-left:auto!important}
 #game-shell .topbar .audio-header-tools .mobile-menu-toggle{order:0}
 #game-shell .topbar .audio-header-tools .audio-launcher{order:1}
 #game-shell .topbar .audio-header-tools #help-button{order:2}
}
/* Smaller status card on phones, retaining readable health and vital values. */
@media(max-width:760px){
 #game-shell:has(#world) #player-card,
 #game-shell:has(#world) #player-card.hud-expanded{transform:none;max-width:190px;padding:6px 8px}
 #game-shell:has(#world) #player-card .player-heading{padding-bottom:4px;gap:5px}
 #game-shell:has(#world) #player-card #player-name{font-size:12px;line-height:1.4;margin:2px 0 0}
 #game-shell:has(#world) #player-card .player-tier{font-size:8px;line-height:1.3;letter-spacing:.3px}
 #game-shell:has(#world) #player-card .hp-label{font-size:10px;margin:3px 0;line-height:1.4}
 #game-shell:has(#world) #player-card .hp-label strong{font-size:12px}
 #game-shell:has(#world) #player-card .bar.hp{height:4px}
 #game-shell:has(#world) #player-card:not(.hud-expanded) .vitals{margin-top:5px;gap:3px}
 #game-shell:has(#world) #player-card .vitals>div{padding:3px 2px}
 #game-shell:has(#world) #player-card .vitals strong,
 #game-shell:has(#world) #player-card:not(.hud-expanded) .vitals strong{font-size:11px}
 #game-shell:has(#world) #player-card .vital-symbol{font-size:13px}
 #game-shell:has(#world) #player-card.hud-expanded .portrait,
 #game-shell:has(#world) #player-card.hud-expanded .portrait canvas{width:30px;height:36px}
}
/* Short landscape phones need a full-height bag, independent of combat dock. */
@media(max-width:1100px) and (max-height:500px) and (orientation:landscape) and (pointer:coarse){
 #game-shell #drawer:has(.bag-layout){--bag-top:58px;--bag-bottom:8px;inset:58px max(8px,env(safe-area-inset-right,0px)) 8px max(8px,env(safe-area-inset-left,0px))!important;transform:none!important;width:auto!important;max-width:none!important;height:auto!important;max-height:none!important;padding:8px 12px;overflow-y:auto;border-radius:12px}
 #game-shell #drawer:has(.bag-layout) #drawer-content{height:auto;overflow:visible}
 #game-shell #drawer:has(.bag-layout) .bag-summary{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
 #game-shell #drawer:has(.bag-layout) .bag-layout{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);align-items:start;gap:8px}
 #game-shell #drawer:has(.bag-layout) .bag-slots{height:clamp(120px,42dvh,210px);max-height:none;grid-template-columns:repeat(auto-fill,48px)}
 #game-shell #drawer:has(.bag-layout) .bag-selected-body{height:auto;max-height:none;overflow:visible}
 #game-shell #drawer:has(.bag-layout) .bag-selected-body button{min-height:44px}
 #game-shell:has(#drawer:not(.hidden) .bag-layout) :is(.bottom-hud,.touch-stick){visibility:hidden;pointer-events:none}
 #game-shell.touch-playing .bottom-hud{left:auto;right:max(8px,env(safe-area-inset-right,0px));bottom:8px;width:210px}
 #game-shell.touch-playing .combat-controls:has(#bag-shortcut){gap:4px;width:100%}
 #game-shell.touch-playing .action-dock:has(#emote-button){display:grid;width:100%;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:56px 44px 44px 44px;gap:4px;padding:0;border:0;background:none}
 #game-shell.touch-playing .action-dock>button{position:relative;inset:auto;width:100%;height:44px;min-height:44px;padding:3px;grid-column:auto;grid-row:auto;border-radius:9px}
 #game-shell.touch-playing .action-dock #nearby-button{grid-column:1;grid-row:1;width:100%;height:56px;min-height:56px;border-radius:10px}
 #game-shell.touch-playing .action-dock #attack-button{grid-column:2 / 4;grid-row:1;width:100%;height:56px;min-height:56px;border-radius:12px;padding:4px!important}
 #game-shell.touch-playing .action-dock #bag-shortcut{position:relative;inset:auto!important;grid-column:1;grid-row:2;width:100%;height:44px;min-height:44px;padding:2px;gap:0;z-index:auto}
 #game-shell.touch-playing .action-dock #quick-serum-button{grid-column:2;grid-row:2;width:100%;height:44px;min-height:44px}
 #game-shell.touch-playing .action-dock #quick-medicine-button{grid-column:3;grid-row:2;width:100%;height:44px;min-height:44px}
 #game-shell.touch-playing .action-dock #emote-button{grid-column:1;grid-row:3;width:100%;height:44px;min-height:44px}
 #game-shell.touch-playing .action-dock #auto-attack-button{grid-column:2;grid-row:3;width:100%;height:44px;min-height:44px}
 #game-shell.touch-playing .action-dock #return-town-button{grid-column:3;grid-row:3;font-size:11px}
 #game-shell.touch-playing .action-dock #vehicle-shortcut{grid-column:1 / 4;grid-row:4;position:relative;inset:auto;width:100%;height:44px;min-height:44px;display:flex;flex-direction:row;justify-content:center;gap:6px}
 #game-shell.touch-playing .action-dock #vehicle-shortcut small,#game-shell.touch-playing .shortcut-hint{display:none!important}
}
@media(max-width:1100px) and (max-height:500px) and (orientation:landscape) and (pointer:coarse){
 #game-shell:has(#drawer:not(.hidden) .bag-layout) .mobile-tabs{display:none!important}
 #game-shell #drawer:has(.bag-layout) .bag-summary span{padding:4px 6px;font-size:10px}
 #game-shell #drawer:has(.bag-layout) #drawer-content>h2{font-size:20px;margin:4px 0 8px}
 #game-shell #drawer:has(.bag-layout) .bag-layout{margin-top:4px}
}

/* Touch tablets use the same on-demand navigation as phones. */
@media(min-width:761px) and (max-width:1366px) and (pointer:coarse){
 #game-shell .topbar{display:flex!important;flex-wrap:nowrap!important;height:50px!important;min-height:50px!important;max-height:50px!important;padding:0 8px!important;gap:6px!important;align-items:center!important}
 #game-shell .topbar>.brand{flex:0 0 28px;margin:0!important}
 #game-shell .topbar .brand .brand-mark{width:28px;height:28px;line-height:28px;font-size:22px}
 #game-shell .topbar>.nav-tabs,#game-shell .topbar>.connection{display:none!important}
 #game-shell .topbar #header-wallet{position:static!important;grid-column:auto!important;grid-row:auto!important;order:1;flex:1 1 auto;width:auto!important;min-width:0;margin:0 0 0 auto!important;justify-content:flex-end;gap:1px;padding:2px}
 #game-shell .topbar .wallet-balance{gap:3px;padding:4px 5px;font-size:10px}
 #game-shell .topbar .wallet-balance svg{width:12px;height:12px}
 #game-shell .topbar .wallet-balance strong{max-width:48px}
 #game-shell .topbar .wallet-topup{width:26px;height:26px;min-height:26px}
 #game-shell .topbar .audio-header-tools{position:static!important;grid-row:auto!important;grid-column:auto!important;order:2;flex:0 0 auto;gap:4px;margin:0!important}
 #game-shell .topbar .audio-header-tools .audio-launcher,#game-shell .topbar .audio-header-tools #help-button{width:28px;height:28px;min-height:28px}
 #game-shell .topbar .audio-header-tools img.ui-pixel-icon{width:20px;height:20px}
}

@media(min-width:761px) and (max-width:1366px) and (pointer:coarse){
 #game-shell .topbar #header-wallet{flex:0 1 auto;margin:0!important;width:fit-content!important;justify-content:flex-start;max-width:calc(100vw - 140px)}
 #game-shell .topbar .audio-header-tools{margin-left:auto!important}
 #game-shell .topbar .mobile-menu-toggle{display:grid;place-items:center;order:3;flex:0 0 30px;width:30px;height:30px;padding:0;border:1px solid #98ac833e;border-radius:8px;background:#ffffff03;color:#c9d3c5;font-size:19px;line-height:1}
 #game-shell .mobile-tabs{display:none!important;position:absolute;inset:50px 0 auto!important;bottom:auto!important;height:58px!important;min-height:58px;padding:4px 6px!important;box-shadow:0 8px 18px #0003;z-index:12;background:#122019f5;border-top:0;border-bottom:1px solid #b7c79b28}
 #game-shell.mobile-menu-open .mobile-tabs{display:flex!important}
 #game-shell{--mobile-nav-height:0px}
}
/* Show every mobile destination at once, without a scroll strip. */
@media(min-width:761px) and (max-width:1366px) and (pointer:coarse){
 #game-shell .mobile-tabs{height:auto!important;min-height:0!important;overflow:visible!important;overflow-x:visible!important;overflow-y:visible!important;padding:6px!important;gap:4px!important}
 #game-shell.mobile-menu-open .mobile-tabs{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr));align-items:stretch}
 #game-shell .mobile-tabs>button,#game-shell .mobile-tabs>a{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:none;min-width:0!important;width:100%;min-height:46px;padding:4px 1px!important;gap:2px;font-size:8px!important;line-height:1.3;text-align:center;white-space:nowrap;border:1px solid #98ac8326;border-radius:6px;background:#ffffff03}
 #game-shell .mobile-tabs .ui-pixel-icon{width:20px;height:20px;margin:0}
 #game-shell .mobile-tabs .wiki-nav{margin:0!important}
}

@media(min-width:761px) and (max-width:1366px) and (pointer:coarse){
 #game-shell .desktop-menu-pages{display:none!important}
 #game-shell .drawer{position:absolute!important;inset:62px 12px 12px!important;width:auto!important;max-width:900px;max-height:calc(100dvh - 74px);margin:auto;z-index:14;border-radius:14px;overflow:auto}
 #game-shell .drawer.hidden{display:none!important}
 #game-shell .drawer.atlas-drawer{transform:none!important;height:auto!important;min-width:0;overflow:hidden}
 #game-shell .atlas-drawer>#drawer-content{min-width:0;max-width:100%;height:100%;overflow:auto}
 #game-shell .atlas-drawer>.drawer-close{position:absolute;top:8px;right:8px;z-index:3}
 #game-shell .drawer-close{position:sticky;top:0;z-index:2;min-width:44px;min-height:44px}
 #game-shell .mobile-tabs{max-height:calc(100dvh - 62px);overflow-y:auto!important}
}

@media(min-width:761px) and (max-width:1366px) and (pointer:coarse){#game-shell .touch-menu-toggle{display:none!important}}
@media(min-width:761px) and (max-width:1366px) and (pointer:coarse){#game-shell .touch-tools{top:54px!important;right:8px!important}}

@media(min-width:761px) and (max-width:1366px) and (pointer:coarse){#game-shell .mobile-tabs>button,#game-shell .mobile-tabs>a{font-size:12px!important;min-height:62px}#game-shell .mobile-tabs .ui-pixel-icon{width:24px;height:24px}}

/* Keep mobile actions unavailable behind the open inventory. */
@media(max-width:760px),(pointer:coarse){
 #game-shell:has(#drawer:not(.hidden) .bag-layout) .combat-controls,
 #game-shell:has(#drawer:not(.hidden) .bag-layout) .combat-controls *,
 #game-shell:has(#drawer:not(.hidden) .bag-layout) .touch-stick{
  visibility:hidden!important;pointer-events:none!important;
 }
}

/* Selected item details use their full content height on every screen. */
#game-shell #drawer:has(.bag-layout) .bag-selected-body{height:auto!important;max-height:none!important;overflow:visible!important;overscroll-behavior:auto}
#game-shell #drawer:has(.bag-layout) .bag-layout{align-items:start}
#game-shell #drawer:has(.warehouse-capacity) .warehouse-slot-detail{height:auto!important;max-height:none!important;overflow:visible!important;overscroll-behavior:auto}
#game-shell .bag-detail-back{display:none}
@media(max-width:760px){
 #game-shell #drawer:has(.bag-detail-open){--bag-top:62px;--bag-bottom:8px;max-height:calc(100dvh - 70px)!important}
 #game-shell #drawer-content.bag-detail-open :is(.bag-summary,.bag-contents,.bag-gear,.bag-more){display:none}
 #game-shell #drawer-content.bag-detail-open .bag-detail-back{display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;padding:10px 14px;border:2px solid #f7dd9c;border-radius:10px;background:#dfbf78;color:#16261b;font-size:16px;font-weight:700;box-shadow:0 3px 0 #715934}
 #game-shell #drawer-content.bag-detail-open .bag-selected>h3{position:sticky;top:0;z-index:3;display:flex;flex-direction:column-reverse;align-items:stretch;gap:10px;padding:8px 0 12px;background:#12261f}
 #game-shell #drawer-content.bag-detail-open .bag-detail-back:focus-visible{outline:3px solid #fff5d6;outline-offset:3px}
 #game-shell #drawer-content.bag-detail-open .bag-layout{grid-template-columns:minmax(0,1fr)}
}

/* A readable caption shares the existing top-up icon. */
#game-shell .topbar .wallet-topup{position:relative;width:38px;height:40px;min-height:40px;background-size:26px 26px;background-position:center 1px;background-color:#1b3227}
#game-shell .wallet-topup-label{position:absolute;bottom:1px;left:0;right:0;text-align:center;color:#f5dea2;font:600 8px/1.3 Sarabun,Tahoma,sans-serif;white-space:nowrap;text-shadow:0 1px 2px #000}
@media(max-width:760px) and (orientation:portrait){
 #game-shell .topbar:has(.header-wallet:not(.hidden)){display:flex!important;flex-wrap:nowrap!important;height:50px!important;min-height:50px!important;max-height:50px!important;gap:3px!important;padding:0 6px!important}
 #game-shell .topbar>.brand{flex:0 0 24px}
 #game-shell .topbar .brand .brand-mark{width:24px;height:26px;line-height:26px;font-size:20px}
 #game-shell .topbar #header-wallet{flex:1 1 0;width:auto!important;max-width:none;min-width:0;margin:0!important;justify-content:flex-end;gap:2px;padding:1px;border-radius:7px}
 #game-shell .topbar .wallet-balance{flex:1 1 0;justify-content:center;min-width:0;padding:3px 1px;font-size:9px;gap:2px;border:0;background:transparent}
 #game-shell .topbar .wallet-balance svg{width:10px;height:10px}
 #game-shell .topbar .wallet-balance strong{max-width:none;min-width:0}
 #game-shell .topbar .wallet-topup{width:30px;height:34px;min-height:34px;background-size:22px 22px;background-position:center 0;border-width:1px;border-radius:7px}
 #game-shell .topbar .wallet-topup-label{font-size:7px}
 #game-shell .topbar .audio-header-tools{flex:0 0 auto;gap:2px;margin-left:0!important}
 #game-shell .topbar .audio-header-tools .mobile-menu-toggle,#game-shell .topbar .audio-header-tools .audio-launcher,#game-shell .topbar .audio-header-tools #help-button{width:26px;min-width:26px;min-height:34px;height:34px}
}

/* Keep the compact wallet and top-up artwork without surrounding frames. */
#game-shell .topbar #header-wallet{border:0;background:transparent;box-shadow:none}
#game-shell .topbar .wallet-balance{border:0;background:transparent;box-shadow:none}
#game-shell .topbar .wallet-topup{border:0;background-color:transparent;box-shadow:none}
#game-shell .topbar .wallet-topup:hover{box-shadow:none}

/* Align wallet symbols with the menu/settings icon row and their captions. */
@media(max-width:760px) and (orientation:portrait){
 #game-shell .topbar #header-wallet{height:34px;align-items:stretch;padding:0}
 #game-shell .topbar .wallet-balance{align-self:stretch;align-items:center;padding:0 1px}
 #game-shell .topbar .wallet-topup{height:34px;min-height:34px;background-position:center 5px}
 #game-shell .topbar .wallet-topup-label{bottom:-2px;font-size:8px;line-height:1.3}
 #game-shell .topbar .audio-header-tools{height:34px;align-items:center}
}

/* One shared icon center and caption baseline for the portrait header. */
@media(max-width:760px) and (orientation:portrait){
 #game-shell .topbar #header-wallet{height:40px;align-items:center}
 #game-shell .topbar .wallet-balance{height:40px;align-self:center;padding:0 1px}
 #game-shell .topbar .wallet-topup{height:40px;min-height:40px;background-position:center 9px;background-size:22px 22px}
 #game-shell .topbar .wallet-topup-label{bottom:0;font-size:8px;line-height:10px}
 #game-shell .topbar .audio-header-tools{height:40px;align-items:center}
 #game-shell .topbar .audio-header-tools :is(.mobile-menu-toggle,.audio-launcher){position:relative;height:40px;min-height:40px;display:flex;flex-direction:column;justify-content:center;gap:0;padding:0 0 0}
 #game-shell .topbar .audio-header-tools :is(.mobile-menu-toggle,.audio-launcher)::after{position:absolute;bottom:0;left:0;right:0;text-align:center;font-size:8px;line-height:10px}
 #game-shell .topbar .audio-header-tools #help-button{height:40px;min-height:40px}
}

/* The three header tools share the wallet's frameless appearance. */
#game-shell .topbar .audio-header-tools :is(.mobile-menu-toggle,.audio-launcher,#help-button){border:0;background:transparent;box-shadow:none}
#game-shell .topbar .audio-header-tools :is(.mobile-menu-toggle,.audio-launcher,#help-button):hover{background:transparent;box-shadow:none}

/* Mobile header actions stay at the right, even without the account wallet. */
#game-shell .topbar .mobile-header-topup{display:none}
@media(max-width:760px){
 #game-shell .topbar .audio-header-tools{margin-left:auto!important;flex-shrink:0;gap:2px}
 #game-shell .topbar .audio-header-tools .mobile-header-topup{display:block;order:0;width:30px;height:40px;min-height:40px;background-size:22px 22px;background-position:center 9px}
 #game-shell .topbar .audio-header-tools .mobile-header-topup .wallet-topup-label{bottom:0;font-size:8px;line-height:10px}
 #game-shell .topbar #header-wallet>.wallet-topup{display:none}
}
@media(max-width:760px) and (orientation:landscape){
 #game-shell .touch-tools{top:54px!important}
}

/* Fullscreen stays reachable in portrait and on desktop. */
#game-shell .touch-tools{display:flex;position:absolute;top:60px!important;right:max(8px,env(safe-area-inset-right,0px));z-index:8;gap:4px}
#game-shell .touch-tools .touch-menu-toggle{display:none}
#game-shell .touch-tools .touch-fullscreen{min-width:44px;min-height:44px;padding:6px;border:1px solid #64785d;border-radius:8px;background:#14241eee;color:#ead7a6;font-size:11px}
@media(max-width:760px) and (pointer:coarse), (max-width:1100px) and (max-height:500px) and (pointer:coarse){
 #game-shell.touch-playing .bottom-hud:has(#vehicle-shortcut),#game-shell.touch-playing .action-dock:has(#vehicle-shortcut){width:160px;max-width:160px}
 #game-shell.touch-playing .action-dock:has(#vehicle-shortcut){grid-template-columns:44px 64px 44px;gap:4px;grid-template-rows:64px 44px 44px}
 #game-shell.touch-playing .action-dock #attack-button{width:64px;height:64px;min-height:64px}
 #game-shell.touch-playing .action-dock #nearby-button,#game-shell.touch-playing .action-dock #bag-shortcut{width:44px;height:44px;min-height:44px}
 #game-shell.touch-playing .action-dock :is(#quick-medicine-button,#quick-serum-button,#auto-attack-button,#emote-button,#return-town-button){width:44px;height:44px;min-height:44px;padding:2px}
 #game-shell.touch-playing .action-dock #attack-button strong{font-size:14px}
}
@media(max-width:760px) and (orientation:portrait) and (pointer:coarse){
 #game-shell.touch-playing .action-dock:has(#emote-button){grid-template-rows:64px 44px 44px 44px}
 #game-shell.touch-playing .action-dock #vehicle-shortcut{width:100%;height:44px;min-height:44px}
}

@media(max-width:760px), (max-width:1100px) and (max-height:500px) and (pointer:coarse){
 #game-shell .touch-tools{top:3px!important;left:calc(50% - 22px);right:auto}
}

/* Fullscreen shares the header tool size on phones and tablets. */
#game-shell .topbar .audio-header-tools .touch-fullscreen{display:grid;place-items:center;flex-shrink:0;padding:0;border:0;border-radius:9px;background:transparent;box-shadow:none;color:#a4b5a6;order:2}
#game-shell .topbar .audio-header-tools .mobile-menu-toggle{order:1}
#game-shell .topbar .audio-header-tools #help-button{order:3}
#game-shell .topbar .audio-header-tools .audio-launcher{order:4}
#game-shell .topbar .audio-header-tools .touch-fullscreen svg{display:block;width:22px;height:22px}
#game-shell .touch-tools:not(:has(.touch-fullscreen)){display:none}
