/* Robobo Field UI — shared surfaces and original SVG artwork, version 4.27. */
:root{--hud-bg:rgba(19,31,34,.89);--hud-solid:#18292d;--hud-line:rgba(232,239,223,.2);--hud-ink:#f1f3e9;--hud-muted:#b3c3bc;--hud-accent:#e4c789;--hud-radius:14px;--hud-edge:max(18px,env(safe-area-inset-left));--hud-right:max(18px,env(safe-area-inset-right));--hud-top:max(18px,env(safe-area-inset-top))}
#hud{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--hud-ink);font-size:13px}
#hud button,#chat-panel button{font-family:inherit;font-weight:550;box-shadow:none;transition:background .15s,border-color .15s}
#hud button:focus-visible,#chat-panel :focus-visible,body:has(#hud:not([hidden])) dialog :focus-visible{outline:2px solid var(--hud-accent);outline-offset:3px}
#hud .adventure-bar,#hud .controls-hint,#hud .sandbox-keyboard-hint{display:none!important}
#hud .sandbox-vitals{top:var(--hud-top);left:var(--hud-edge);width:232px;padding:12px 14px 10px;background:var(--hud-bg);color:var(--hud-ink);border:1px solid var(--hud-line);border-radius:var(--hud-radius);box-shadow:none;backdrop-filter:none}
.hud-health-row,#hud .sandbox-food{display:flex;align-items:center;gap:10px;position:relative;margin:0}
.hud-stat-icon{width:18px;height:18px;flex:none;opacity:.9}
.hud-stat-body{flex:1;min-width:0}
#hud .sandbox-health-heading{display:flex;gap:8px;align-items:center;font-size:10px;line-height:16px;color:var(--hud-muted);font-weight:500}
#hud #sandbox-health-value{font-size:13px;color:#b8dec8;margin-left:auto;line-height:16px;letter-spacing:0;font-weight:650}
#hud .sandbox-pvp-badge{font-size:8px;line-height:14px;padding:0 4px;background:#e4c78919;color:var(--hud-accent);font-weight:600;border-radius:3px}
#hud .sandbox-health,#hud .sandbox-hunger{height:3px;margin-top:5px;border-radius:3px;background:#f2f3e51a;overflow:hidden}
#hud #sandbox-health-fill{background:#94c8ad}
#hud .sandbox-food{margin-top:7px}
#hud .sandbox-food-heading{font-size:10px;color:var(--hud-muted);line-height:16px;display:block}
#hud .sandbox-food-heading>span{display:flex;justify-content:space-between;align-items:center}
#hud #sandbox-hunger-value{color:var(--hud-accent);font-size:12px;font-weight:600;margin:0}
#hud #sandbox-hunger-fill{background:var(--hud-accent)}
#hud #sandbox-eat{height:36px;min-height:36px;min-width:59px;padding:0 7px;font-size:10px;white-space:nowrap;border:1px solid #e4c78940;border-radius:8px;background:#e4c78916;color:var(--hud-accent)}
#hud #sandbox-eat:disabled{opacity:.4}
#hud .sandbox-hunger-hint{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);margin:0;padding:0}
#hud .sandbox-food[data-low-hunger=true] .sandbox-hunger-hint{position:absolute;clip-path:none;width:232px;height:auto;left:-15px;top:calc(100% + 26px);font-size:11px;line-height:1.4;padding:8px 10px;border:1px solid #e1a58880;border-radius:8px;background:#302a23;color:#f3c9ae;opacity:1}
#hud .sandbox-food[data-low-hunger=true] #sandbox-hunger-value,#hud .sandbox-vitals[data-low-health=true] #sandbox-health-value{color:#efb198}
#hud .sandbox-shield{margin:5px 0 0 28px;font-size:9px;font-weight:450;color:var(--hud-muted);line-height:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Small room identity; roster, settings and instructions live in the menu. */
#hud .hud-top{position:static;display:block;pointer-events:none}
#hud .room-hud{position:absolute;top:var(--hud-top);right:calc(var(--hud-right) + 130px);width:auto;max-width:none;min-height:44px;padding:0 6px 0 13px;gap:10px;display:flex;align-items:center;background:var(--hud-bg);color:var(--hud-ink);border:1px solid var(--hud-line);border-radius:12px;box-shadow:none;backdrop-filter:none;pointer-events:auto}
#hud .room-hud>div:first-child{display:flex;align-items:center;gap:8px}
#hud .room-hud .hud-label{display:none}
#hud .room-code{font-family:ui-monospace,SFMono-Regular,monospace;font-weight:600;font-size:14px;letter-spacing:.1em;color:var(--hud-ink);padding:0;min-height:42px}
#hud .players-box{border:0;padding:0;min-width:0;display:block;order:-1;color:var(--hud-muted);font-size:10px}
#hud #invite-friend{margin:0;min-width:36px;width:36px;height:38px;min-height:38px;border:0;background:none;border-radius:8px}
#hud #minimap{top:var(--hud-top);right:var(--hud-right);left:auto;width:114px;height:114px;border:1px solid var(--hud-line);border-radius:22px;background:#263e3b;box-shadow:0 4px 18px #07151720;opacity:.95}
#hud .mobile-toolbar{display:flex;position:absolute;top:calc(var(--hud-top) + 124px);right:var(--hud-right);gap:5px;pointer-events:auto;z-index:5}
#hud .mobile-toolbar button,#hud #open-emotes{display:flex;align-items:center;justify-content:center;width:36px;min-width:36px;height:36px;min-height:36px;padding:0;border:1px solid var(--hud-line);border-radius:10px;color:var(--hud-ink);background:var(--hud-bg)}
#hud .mobile-toolbar #camera-toggle-mobile{position:static}
#hud #open-emotes{position:absolute;left:calc(var(--hud-edge) + 104px);right:auto;top:auto;bottom:24px}
#hud #open-chat{position:absolute;left:var(--hud-edge);right:auto;bottom:24px;top:auto;width:auto;min-width:94px;max-width:170px;height:36px;min-height:36px;padding:0 11px;gap:8px;border:1px solid var(--hud-line);border-radius:10px;background:var(--hud-bg);color:var(--hud-ink);font-size:12px}
#hud #open-chat kbd{display:none}
#hud #open-chat[aria-expanded=true]{border-color:var(--hud-accent);color:var(--hud-accent)}
#hud #open-chat[aria-label^="Чат:"]{color:var(--hud-accent)}
#hud #shift-lock-status{top:var(--hud-top);padding:6px 10px;font:10px/1.4 system-ui;color:#dbe5df;background:#14232965;border-radius:7px;opacity:0;animation:hud-tip-out 5s ease forwards}
@keyframes hud-tip-out{0%,70%{opacity:1}100%{opacity:0;visibility:hidden}}
body:has(#hud:not([hidden])) .connection.online{display:none}
body:has(#hud:not([hidden])) .connection.offline{left:50%;top:18px;bottom:auto;transform:translateX(-50%);background:#402d27;color:#ffe4d3;border-color:#c39878;z-index:40}
body:has(#hud:not([hidden])) #world-climate{top:calc(var(--hud-top) + 167px);right:var(--hud-right);bottom:auto;left:auto;max-width:124px;padding:3px 0;border:0;background:none;color:#d9e3db;text-shadow:0 1px 5px #132528;font:10px/1.4 system-ui}
/* Inventory: each slot uses a separate illustrated asset, selected by a fine gold edge. */
#hud #quickbar{left:50%;right:auto;bottom:20px;transform:translateX(-50%);display:flex;flex-direction:row;gap:8px;max-width:calc(100vw - 350px);align-items:stretch;pointer-events:none}
#hud #quickbar[hidden]{display:none}
#hud #quick-slots{display:grid;grid-template-columns:repeat(8,52px);gap:3px;padding:5px;background:var(--hud-bg);border:1px solid var(--hud-line);border-radius:13px;pointer-events:auto}
#hud #quick-slots .bag-slot{width:52px;height:55px;min-height:55px;padding:3px;border:1px solid transparent;border-radius:8px;background:none;color:var(--hud-ink);gap:0}
#hud #quick-slots .bag-slot[aria-pressed=true]{border-color:#e4c78995;background:#e4c7891c;color:var(--hud-accent)}
#hud #quick-slots .bag-slot[data-empty=true]{opacity:.35}
#hud #quick-slots .bag-slot kbd{left:4px;top:3px;font:9px/1 system-ui;color:var(--hud-muted)}
#hud #quick-slots .bag-slot small{right:3px;top:3px;font:9px/1 system-ui;color:var(--hud-ink)}
#hud #quick-slots .bag-slot strong{font-size:9px;line-height:12px;font-weight:500;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bag-icon{display:flex;align-items:center;justify-content:center}
.bag-icon img{width:38px;height:34px;object-fit:contain;filter:drop-shadow(0 2px 2px #08131440)}
#hud #quick-utilities{display:grid;grid-template-columns:repeat(2,32px);gap:3px;padding:0;pointer-events:auto;align-content:center}
#hud #quick-utilities button{width:32px;height:30px;min-height:30px;min-width:32px;padding:0;background:var(--hud-bg);border:1px solid var(--hud-line);border-radius:8px;color:var(--hud-muted)}
#hud #quick-utilities button::before{width:17px;height:17px}
#hud #quick-utilities button strong,#hud #quick-utilities button span,#hud #quick-utilities button kbd{display:none}
#hud #weapon-status{bottom:calc(20px + 77px);left:50%;right:auto;transform:translateX(-50%);display:flex;align-items:center;gap:12px;min-width:0;padding:5px 6px 5px 14px;border:1px solid var(--hud-line);border-radius:10px;background:var(--hud-bg);font-size:12px}
#hud #weapon-status[hidden]{display:none}
#hud #weapon-current{font-size:11px;font-weight:500;color:var(--hud-muted)}
#hud #weapon-ammo{font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
#hud #weapon-hint{display:none}
#hud #weapon-reload{width:32px;height:30px;min-width:32px;min-height:30px;padding:0;background:#e4c78915;border:0;border-radius:6px;color:var(--hud-accent)}
#hud #sandbox-fire{right:var(--hud-right);bottom:24px;width:64px;height:64px;min-height:64px;padding:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:1px solid #e4c78980;border-radius:20px;background:#29382de6;color:var(--hud-accent);box-shadow:none}
#hud #sandbox-fire[hidden]{display:none}
#hud #sandbox-fire>span{display:none}
#hud #sandbox-fire::before{content:'';width:29px;height:29px;background:currentColor;mask:url('/assets/hud/arsenal.svg') center/contain no-repeat;-webkit-mask:url('/assets/hud/arsenal.svg') center/contain no-repeat}
#hud #sandbox-fire.mining::before{background:url('/assets/hud/item-pickaxe.svg') center/contain no-repeat;mask:none;-webkit-mask:none}
#hud #sandbox-fire>strong{font-size:9px;font-weight:550}
#hud #sandbox-fire.held{background:#6b613bd9;border-color:var(--hud-accent)}
#hud .sandbox-context{left:50%;right:auto;bottom:101px;transform:translateX(-50%);max-width:400px;padding:8px;border:1px solid var(--hud-line);border-radius:12px;background:var(--hud-bg);color:var(--hud-ink);box-shadow:none}
#hud #sandbox-context-label{font-size:11px;color:var(--hud-muted);margin:0 4px 6px}
#hud .sandbox-action{min-height:36px;padding:8px 12px;border:1px solid var(--hud-line);border-radius:8px;background:#e4c78914;color:var(--hud-ink);font-size:12px;font-weight:550}
#hud #sandbox-survival{top:calc(var(--hud-top) + 135px);left:var(--hud-edge);right:auto;transform:none;width:232px;max-width:232px;padding:10px 12px;border:1px solid var(--hud-line);border-radius:12px;background:var(--hud-bg);font-size:11px}
#hud #sandbox-survival[data-danger=true]{color:#f4b49a;border-color:#e5a68a80}
#hud #mining-target{border:1px solid var(--hud-line);border-radius:7px;background:var(--hud-bg);color:var(--hud-accent);font-size:11px}
#hud .sandbox-feedback,body:has(#hud:not([hidden])) .toast{top:auto;bottom:180px;left:50%;right:auto;transform:translateX(-50%);max-width:min(420px,70vw);padding:9px 14px;font:12px/1.5 system-ui;font-weight:450;border:1px solid var(--hud-line);border-radius:10px;background:var(--hud-bg);color:var(--hud-ink);box-shadow:none}
/* Chat is closed on entry; it opens at the lower left without covering health. */
#chat-panel{left:var(--hud-edge);right:auto;top:auto;bottom:70px;width:302px;max-height:min(350px,calc(100dvh - 235px));padding:0 12px 10px;border:1px solid var(--hud-line);border-radius:14px;background:#18292df5;color:var(--hud-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;box-shadow:0 8px 32px #0d1c2430}
#chat-title{font-size:12px;font-weight:600}
#chat-messages{height:156px;padding:6px 0}
#chat-messages li,#chat-messages .chat-sender{font-size:12px;font-weight:450;line-height:1.5}
#chat-messages .chat-sender{color:#d5c397;font-weight:600}
#chat-options{font-size:10px;color:var(--hud-muted)}
#chat-input{background:#edf2e90a;border:1px solid var(--hud-line);color:var(--hud-ink);border-radius:8px;font-size:16px}
#chat-input::placeholder{color:var(--hud-muted);font-size:12px}
#chat-form #chat-send{background:#e4c789;color:#26332e;border-radius:8px}
#chat-form #chat-send:disabled{background:#35443f;color:#82958b}
#chat-speech-toggle{background:none;border:0;color:var(--hud-muted);font-size:0!important;width:36px;min-height:36px;padding:0;display:flex;align-items:center;justify-content:center}
#chat-speech-toggle[aria-pressed=true]{background:#e4c7891a;color:var(--hud-accent);border:0}
#close-chat{display:flex;align-items:center;justify-content:center;width:36px;height:36px;margin:0;color:var(--hud-muted)}
.chat-footer{font-size:9px;color:var(--hud-muted)}
/* Overlay screens retain their existing controls, with one consistent palette. */
body:has(#hud:not([hidden])) dialog{background:#192a2e;color:var(--hud-ink);border:1px solid #65716a;border-radius:18px;box-shadow:0 24px 90px #06191c70;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
body:has(#hud:not([hidden])) dialog::backdrop{background:#08161970;backdrop-filter:blur(3px)}
body:has(#hud:not([hidden])) dialog :is(h2,h3){color:var(--hud-ink);font-weight:600;letter-spacing:-.02em}
body:has(#hud:not([hidden])) dialog :is(p,small,label,dt,.bag-help,.arsenal-note,.settings-field>p){color:var(--hud-muted)}
body:has(#hud:not([hidden])) dialog button{background:#253a3d;border:1px solid #50625b;color:var(--hud-ink);border-radius:9px;box-shadow:none;font-weight:500}
body:has(#hud:not([hidden])) dialog button:is([aria-pressed=true],.primary){background:#e4c7891f;border-color:#e4c78990;color:var(--hud-accent)}
body:has(#hud:not([hidden])) dialog button:disabled{opacity:.4}
body:has(#hud:not([hidden])) dialog :is(input,select,textarea){background:#112327;color:var(--hud-ink);border-color:#53665e;accent-color:var(--hud-accent)}
body:has(#hud:not([hidden])) dialog :is(kbd,.bag-resources,.bag-item,.bag-slot){color:var(--hud-ink);border-color:#53665e}
body:has(#hud:not([hidden])) #bag-slots{background:#112226}
body:has(#hud:not([hidden])) #bag-items [data-item^="mat:"]{background:#253a3d}
#arsenal-list button img,#community-buy button img{width:46px;height:38px;object-fit:contain;vertical-align:middle;flex:none}
#arsenal-list button,#community-buy button{display:flex;align-items:center;gap:10px}
#mobile-menu{width:min(530px,calc(100% - 32px));padding:24px}
#mobile-menu .dialog-heading{margin-bottom:20px}
#mobile-menu .dialog-heading h2{margin:0;font-size:26px;font-weight:550}
.hud-eyebrow{font:9px/1.4 system-ui;letter-spacing:.12em;margin:0 0 8px;color:var(--hud-muted)}
#mobile-menu .mobile-menu-grid{gap:8px}
#mobile-menu .mobile-menu-grid button{min-height:54px;font-size:12px;gap:12px;padding:10px 12px}
#mobile-menu .mobile-menu-grid button>span{display:none}
#mobile-menu .mobile-menu-grid button::before{flex:none;opacity:.8}
#mobile-menu .mobile-menu-grid button[data-mobile-action=leave-room]{color:#eeb49f;background:#af735010;border-color:#b7846544}
.hud-menu-controls{display:flex;gap:8px;margin-top:16px}
.hud-menu-controls button{display:flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:8px 12px;font-size:12px}
.hud-menu-controls #mobile-gyro>span:first-child{display:none}
.hud-menu-controls #mobile-sound::before{display:none}
.hud-menu-controls button[hidden]{display:none}
.hud-menu-people{display:flex;align-items:center;gap:12px;margin-top:18px;color:var(--hud-muted);font-size:11px}
.hud-menu-people #players{display:flex;gap:4px}.hud-menu-people #players .player{width:27px;height:27px;border:1px solid var(--hud-line)}
.hud-controls-help{margin-top:16px;border-top:1px solid var(--hud-line);font-size:12px}
.hud-controls-help summary{padding:14px 0;cursor:pointer;color:var(--hud-muted)}
#mobile-menu .sandbox-keyboard-hint{position:static;display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:0 0 12px;margin:0;background:none;border:0;font-size:11px;color:var(--hud-muted);width:auto;max-width:none}
#mobile-menu .sandbox-keyboard-hint span{display:flex;align-items:center;gap:8px}
#mobile-menu .sandbox-keyboard-hint kbd{font:10px/1 system-ui;min-width:36px;text-align:center;padding:5px;border:1px solid var(--hud-line);border-radius:5px}
.hud-menu-footer{border-top:1px solid var(--hud-line);display:flex;justify-content:space-between;align-items:center;padding-top:14px;color:#91a79d;font:10px/1.5 system-ui;letter-spacing:.1em}
#mobile-menu #performance-status{position:static;display:block;background:none;border:0;padding:0;color:var(--hud-muted);font:10px/1.5 system-ui;letter-spacing:0}
/* Shared icon rules use masks so active states and contrast remain predictable. */
[data-hud-icon]::before,[data-mobile-action]::before{content:'';display:inline-block;width:21px;height:21px;background:currentColor;mask:var(--hud-icon) center/contain no-repeat;-webkit-mask:var(--hud-icon) center/contain no-repeat}
#hud :is(.mobile-toolbar button,#invite-friend,#open-emotes,#quick-utilities button,#weapon-reload),#chat-send,#close-chat{font-size:0!important}
#hud .mobile-toolbar button>*,#hud #open-emotes>*{display:none}
@media(hover:hover){#hud button:hover:not(:disabled),#chat-panel button:hover:not(:disabled){background-color:#7b91843b;border-color:#e4c78980}#hud #quick-slots .bag-slot:hover{background:#d4e8dc12}#hud #quick-utilities button:hover::after{content:attr(title);position:absolute;bottom:calc(100% + 9px);left:0;padding:6px 10px;border:1px solid var(--hud-line);border-radius:7px;background:var(--hud-solid);color:var(--hud-ink);font:11px/1.4 system-ui;white-space:nowrap}}
/* Landscape touch: clear thumbs, 44px targets, scrollable inventory. */
.mobile-layout{--hud-edge:max(12px,env(safe-area-inset-left));--hud-right:max(12px,env(safe-area-inset-right));--hud-top:max(10px,env(safe-area-inset-top))}
.mobile-layout #hud .sandbox-vitals{width:200px;padding:8px 10px;border-radius:12px}
.mobile-layout #hud .sandbox-health-heading,.mobile-layout #hud .sandbox-food-heading{font-size:10px}
.mobile-layout #hud #sandbox-eat{min-width:58px;height:44px;min-height:44px;font-size:10px;padding:0 5px}
.mobile-layout #hud .sandbox-food{margin-top:0;gap:8px}
.mobile-layout #hud .sandbox-shield{margin-top:0;font-size:9px}
.mobile-layout #hud .sandbox-food[data-low-hunger=true] .sandbox-hunger-hint{width:200px;left:-11px;top:calc(100% + 20px);font-size:10px}
.mobile-layout #hud .room-hud{display:none}
.mobile-layout #hud #minimap{width:82px;height:82px;border-radius:17px}
.mobile-layout #hud .mobile-toolbar{top:var(--hud-top);right:calc(var(--hud-right) + 94px);gap:6px}
.mobile-layout #hud .mobile-toolbar button{width:44px;min-width:44px;height:44px;min-height:44px}
.mobile-layout #hud #open-chat{left:auto;right:var(--hud-right);top:calc(var(--hud-top) + 90px);bottom:auto;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;font-size:0;gap:0}
.mobile-layout #hud #open-chat span{font-size:0}
.mobile-layout #hud #open-chat[aria-label^="Чат:"]::after{content:'';position:absolute;right:5px;top:5px;width:6px;height:6px;border-radius:50%;background:var(--hud-accent)}
.mobile-layout #hud #open-emotes{display:none}
.mobile-layout #hud #mobile-heading{top:var(--hud-top);min-width:44px;padding:7px 10px;font-size:10px;background:none;text-shadow:0 1px 5px #102b26;pointer-events:none}
.mobile-layout #hud #quickbar{left:calc(var(--hud-edge) + 130px);right:calc(var(--hud-right) + 86px);bottom:var(--safe-bottom);transform:none;max-width:480px;flex-direction:row;gap:4px;margin-inline:auto;align-items:center}
.mobile-layout #hud #quick-slots{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:46px;flex:1;min-width:0;gap:3px;padding:4px;overflow-x:auto;touch-action:pan-x;border-radius:10px}
.mobile-layout #hud #quick-slots .bag-slot{width:46px;height:46px;min-height:46px;padding:2px;gap:0}
.mobile-layout #hud #quick-slots .bag-icon img{width:32px;height:30px}
.mobile-layout #hud #quick-slots strong{font-size:8px;line-height:10px}
.mobile-layout #hud #quick-slots kbd{display:none}
.mobile-layout #hud #quick-slots small{font-size:9px;top:2px;right:2px}
.mobile-layout #hud #mobile-kit-toggle,.mobile-layout #hud #mobile-hotbar-toggle{display:flex;width:44px;height:46px;flex:0 0 44px;min-height:44px;background:var(--hud-bg);border:1px solid var(--hud-line);border-radius:10px;color:var(--hud-ink);font-size:0}
.mobile-layout #hud #mobile-kit-toggle>*,.mobile-layout #hud #mobile-hotbar-toggle>*{display:none}
.mobile-layout #hud #mobile-hotbar-toggle[aria-expanded=false]{--hud-icon:url('/assets/hud/bag.svg')}
.mobile-layout #hud #quick-utilities{position:absolute;left:0;right:auto;bottom:calc(100% + 7px);display:flex;padding:5px;gap:5px;background:var(--hud-solid);border:1px solid var(--hud-line);border-radius:12px}
.mobile-layout #hud #quick-utilities button{width:44px;min-width:44px;height:44px;min-height:44px}
.mobile-layout #hud #quick-utilities button::before{width:22px;height:22px}
.mobile-layout #hud #quick-utilities[hidden],.mobile-layout #hud #quick-slots[hidden],.mobile-layout #hud #mobile-kit-toggle[hidden]{display:none}
.mobile-layout #hud .joystick{width:104px;height:104px;left:calc(var(--hud-edge) + 12px);bottom:calc(var(--safe-bottom) + 14px);border:1px solid #edf3e84d;background:#172a301f;box-shadow:inset 0 0 0 13px #e5f0e508}
.mobile-layout #hud .joystick span{width:40px;height:40px;background:#e9f1e778;border:1px solid #e7f0e5a8}
.mobile-layout #hud .joystick b{display:none}
.mobile-layout #hud #mobile-sprint{left:calc(var(--hud-edge) + 40px);bottom:calc(var(--safe-bottom) + 132px);width:44px;height:44px;min-height:44px;background:var(--hud-bg);border:1px solid var(--hud-line);border-radius:50%;font-size:0;color:var(--hud-ink)}
.mobile-layout #hud #mobile-sprint>span{display:none}
.mobile-layout #hud #mobile-sprint.active{color:var(--hud-accent);border-color:var(--hud-accent)}
.mobile-layout #hud #sandbox-fire{right:calc(var(--hud-right) + 77px);bottom:calc(var(--safe-bottom) + 72px);width:68px;height:68px;min-height:68px;border-radius:50%;background:#27393099;border-color:#d9c79680}
.mobile-layout #hud #jump{width:58px;height:58px;min-height:58px;border:1px solid var(--hud-line);border-radius:50%;background:var(--hud-bg);color:var(--hud-ink)}
.mobile-layout #hud #jump>svg,.mobile-layout #hud #jump>strong{display:none}
.mobile-layout #hud #mobile-look-hint{display:none}
.mobile-layout #hud #weapon-status{right:calc(var(--hud-right) + 157px);left:auto;bottom:calc(var(--safe-bottom) + 80px);transform:none;padding:0 3px 0 9px;gap:6px;width:auto;height:44px}
.mobile-layout #hud #weapon-current{display:none}
.mobile-layout #hud #weapon-ammo{font-size:13px;background:none;padding:0;min-width:0}
.mobile-layout #hud #weapon-reload{width:44px;height:44px;min-width:44px;min-height:44px}
.mobile-layout #hud #sandbox-context{left:50%;right:auto;bottom:calc(var(--safe-bottom) + 66px);transform:translateX(-50%);max-width:min(300px,45vw);padding:6px}
.mobile-layout #hud .sandbox-action{min-height:44px;font-size:11px}
.mobile-layout #hud #sandbox-survival{top:calc(var(--hud-top) + 55px);left:calc(var(--hud-edge) + 210px);right:calc(var(--hud-right) + 160px);width:auto;max-width:245px;padding:7px 9px;font-size:10px}
.mobile-layout #hud .sandbox-survival .dive-depth{font-size:10px}
.mobile-layout #hud .sandbox-flight button{width:54px;height:54px;border:1px solid var(--hud-line);background:var(--hud-bg);color:var(--hud-ink);border-radius:50%;font-size:0}
.mobile-layout #hud .sandbox-flight button>span{display:none}
.mobile-layout #hud .sandbox-feedback,.mobile-layout body:has(#hud:not([hidden])) .toast{top:auto;bottom:calc(var(--safe-bottom) + 136px);font-size:11px;max-width:min(350px,55vw);padding:7px 10px}
.mobile-layout body:has(#hud:not([hidden])) #world-climate{display:none}
.mobile-layout #chat-panel{left:auto;right:calc(var(--hud-right) + 96px);top:calc(var(--hud-top) + 52px);bottom:auto;width:min(320px,46vw);max-height:calc(var(--chat-vh,100dvh) - 78px);padding:0 10px 8px}
.mobile-layout #chat-panel.keyboard-open{top:calc(var(--chat-vtop,0px) + 4px);right:12px;width:min(430px,calc(100vw - 24px));max-height:calc(var(--chat-vh,100dvh) - 8px)}
.mobile-layout #chat-panel :is(#close-chat,#chat-speech-toggle){width:44px;min-width:44px;height:44px;min-height:44px}
.mobile-layout #mobile-menu{padding:16px 20px}
.mobile-layout #mobile-menu .dialog-heading{margin-bottom:10px}
.mobile-layout #mobile-menu .mobile-menu-grid{grid-template-columns:repeat(3,1fr);gap:6px}
.mobile-layout #mobile-menu .mobile-menu-grid button{min-height:48px;padding:7px 9px;gap:7px;font-size:11px}
.mobile-layout #mobile-menu .mobile-menu-grid button[data-mobile-action=shift-lock-toggle]{display:none}
.mobile-layout .hud-menu-people,.mobile-layout .hud-menu-controls{margin-top:10px}
.mobile-layout #mobile-menu #performance-status{font-size:10px}
@media(max-width:740px) and (orientation:landscape){.mobile-layout #hud .sandbox-vitals{width:178px;padding:7px 9px}.mobile-layout #hud .sandbox-health-heading>span:first-child{font-size:9px}.mobile-layout #hud #sandbox-eat{min-width:54px;font-size:9px}.mobile-layout #hud .sandbox-food{gap:6px}.mobile-layout #hud .hud-stat-icon{width:16px;height:16px}.mobile-layout #hud #sandbox-survival{left:calc(var(--hud-edge) + 184px);right:calc(var(--hud-right) + 88px);top:calc(var(--hud-top) + 57px);max-width:230px}.mobile-layout #hud #quickbar{left:calc(var(--hud-edge) + 124px);right:calc(var(--hud-right) + 72px)}.mobile-layout #hud #mobile-heading{display:none}.mobile-layout #hud #quick-slots strong{display:none}.mobile-layout #hud #quick-slots .bag-icon img{height:36px;width:36px}}
@media(prefers-reduced-transparency:reduce){#hud .sandbox-vitals,#hud .room-hud,#hud #quick-slots,#chat-panel{background:var(--hud-solid)}}
@media(prefers-reduced-motion:reduce){#hud #shift-lock-status{display:none}#hud button{transition:none}}

[data-hud-icon="invite"]{--hud-icon:url("/assets/hud/invite.svg")}
[data-hud-icon="fullscreen"]{--hud-icon:url("/assets/hud/fullscreen.svg")}
[data-hud-icon="person"]{--hud-icon:url("/assets/hud/person.svg")}
[data-hud-icon="shop"]{--hud-icon:url("/assets/hud/shop.svg")}
[data-hud-icon="rotate"]{--hud-icon:url("/assets/hud/rotate.svg")}
[data-hud-icon="down"]{--hud-icon:url("/assets/hud/down.svg")}
[data-hud-icon="empty"]{--hud-icon:url("/assets/hud/empty.svg")}
[data-hud-icon="sprint"]{--hud-icon:url("/assets/hud/sprint.svg")}
[data-hud-icon="build"]{--hud-icon:url("/assets/hud/build.svg")}
[data-hud-icon="up"]{--hud-icon:url("/assets/hud/up.svg")}
[data-hud-icon="lock"]{--hud-icon:url("/assets/hud/lock.svg")}
[data-hud-icon="arsenal"]{--hud-icon:url("/assets/hud/arsenal.svg")}
[data-hud-icon="settings"]{--hud-icon:url("/assets/hud/settings.svg")}
[data-hud-icon="shield"]{--hud-icon:url("/assets/hud/shield.svg")}
[data-hud-icon="bolt"]{--hud-icon:url("/assets/hud/bolt.svg")}
[data-hud-icon="jump"]{--hud-icon:url("/assets/hud/jump.svg")}
[data-hud-icon="close"]{--hud-icon:url("/assets/hud/close.svg")}
[data-hud-icon="bag"]{--hud-icon:url("/assets/hud/bag.svg")}
[data-hud-icon="smile"]{--hud-icon:url("/assets/hud/smile.svg")}
[data-hud-icon="chat"]{--hud-icon:url("/assets/hud/chat.svg")}
[data-hud-icon="send"]{--hud-icon:url("/assets/hud/send.svg")}
[data-hud-icon="speaker"]{--hud-icon:url("/assets/hud/speaker.svg")}
[data-hud-icon="camera"]{--hud-icon:url("/assets/hud/camera.svg")}
[data-hud-icon="exit"]{--hud-icon:url("/assets/hud/exit.svg")}
[data-hud-icon="water"]{--hud-icon:url("/assets/hud/water.svg")}
[data-hud-icon="motion"]{--hud-icon:url("/assets/hud/motion.svg")}
[data-hud-icon="help"]{--hud-icon:url("/assets/hud/help.svg")}
[data-hud-icon="menu"]{--hud-icon:url("/assets/hud/menu.svg")}
[data-hud-icon="food"]{--hud-icon:url("/assets/hud/food.svg")}
[data-hud-icon="recenter"]{--hud-icon:url("/assets/hud/recenter.svg")}
[data-hud-icon="heart"]{--hud-icon:url("/assets/hud/heart.svg")}
[data-mobile-action="settings-game"]{--hud-icon:url("/assets/hud/settings.svg")}
[data-mobile-action="invite-friend"]{--hud-icon:url("/assets/hud/invite.svg")}
[data-mobile-action="customize-game"]{--hud-icon:url("/assets/hud/person.svg")}
[data-mobile-action="open-chat"]{--hud-icon:url("/assets/hud/chat.svg")}
[data-mobile-action="emote"]{--hud-icon:url("/assets/hud/smile.svg")}
[data-mobile-action="leave-room"]{--hud-icon:url("/assets/hud/exit.svg")}
[data-mobile-action="shift-lock-toggle"]{--hud-icon:url("/assets/hud/lock.svg")}
/* Compact controls retain clear names through labels and tooltips. */
[data-hud-icon="close"]{display:flex;align-items:center;justify-content:center;font-size:0!important}
.hud-menu-controls #mobile-sound{font-size:0;width:44px;padding:0}
.hud-menu-controls #mobile-sound::before{display:inline-block}
#hud #quick-slots .bag-slot[data-empty=true] strong{visibility:hidden}
#hud .sandbox-health-heading,#hud .sandbox-food-heading{font-size:11px}
#hud #sandbox-health-value{font-size:14px}
#hud-menu-room{margin:14px 0 0;min-height:44px;width:100%;font:12px/1.4 ui-monospace,SFMono-Regular,monospace}
body:has(#hud:not([hidden])) dialog :is(.bag-heading,.wardrobe-footer,.sandbox-craft-footer,.audio-settings,.gyro-settings,.avatar-stage,.sandbox-recipe,.bag-drop-form){background:#1c3034;border-color:var(--hud-line)}
body:has(#hud:not([hidden])) dialog :is(.settings-check strong,.settings-label output,.range-labels,.controls-guide summary,.controls-guide-body dd,#appearance-options legend,.sandbox-recipe-cost,.sandbox-craft-balance,.sandbox-craft-balance strong){color:var(--hud-muted)}
body:has(#hud:not([hidden])) dialog .sandbox-recipe-cost span{background:#dfe8ce10;color:var(--hud-muted)}
body:has(#hud:not([hidden])) dialog .sandbox-recipe-cost span[data-missing=true]{background:#d3a37715;color:#e6bc93}
body:has(#hud:not([hidden])) dialog .sandbox-block-icon{background:#dfe8ce0d;color:var(--hud-accent)}
body:has(#hud:not([hidden])) dialog .wish-resolution{background:#23393a;border-color:#6f8476;color:var(--hud-ink)}
body:has(#hud:not([hidden])) dialog .wish-resolution[data-status=completed]{background:#274338;border-color:#718b72}
body:has(#hud:not([hidden])) dialog .wish-resolution[data-status=partial],body:has(#hud:not([hidden])) dialog .wish-resolution[data-status=needs_info]{background:#433d2a;border-color:#a99a72}
.sandbox-recipe-icon img{width:40px;height:40px;object-fit:contain}
#hud .mobile-toolbar [data-camera-cycle][data-view=front]::after,#hud .mobile-toolbar [data-camera-cycle][data-view=third]::after{content:'2';position:absolute;align-self:flex-end;margin-left:19px;font:8px/1 system-ui;color:var(--hud-accent);bottom:5px}
#hud .mobile-toolbar [data-camera-cycle][data-view=third]::after{content:'3'}
body:has(#hud:not([hidden])) dialog :is(legend,.gyro-heading strong,.audio-settings legend){color:var(--hud-ink);font-weight:550}

body:has(#hud:not([hidden])) dialog .sandbox-craft-tip{background:#dfe8ce0a;border:1px solid var(--hud-line);color:var(--hud-muted)}
body:has(#hud:not([hidden])) dialog [data-hud-icon="close"]{width:44px;height:44px;min-width:44px;min-height:44px;padding:0}
.sandbox-block-icon img{width:43px;height:43px;object-fit:contain}
#hud .mobile-toolbar button[aria-pressed=true]{background:#e4c78925;border-color:#e4c78990;color:var(--hud-accent)}
