/* Valoria command surface. One persistent rail; transient panels and sheets
   share the same materials. Game input, native bridges and IDs stay intact. */
body.valoria-ui{
 --v-ink:#f4effc;--v-muted:#b8aecb;--v-line:#d9c5ff24;--v-surface:#171222f2;--v-control:#ffffff09;--v-hover:#ffffff12;--v-active:#9c75df29;--v-accent:#d2b6ff;--v-shadow:0 8px 28px #09051342;--v-edge:12px;--v-rail:54px;
 --hud-bg:var(--v-surface);--hud-raised:#2a2139;--hud-text:var(--v-ink);--hud-muted:var(--v-muted);--hud-line:var(--v-line);--hud-accent:var(--v-accent);--hud-panel-top:calc(max(var(--v-edge),env(safe-area-inset-top)) + var(--v-rail) + 10px);
}
body.valoria-ui #hud-base .hud-command-bar{
 position:absolute;inset:max(var(--v-edge),env(safe-area-inset-top)) max(var(--v-edge),env(safe-area-inset-right)) auto max(var(--v-edge),env(safe-area-inset-left));
 display:flex;flex-flow:row nowrap;align-items:center;justify-content:flex-start;gap:8px;height:var(--v-rail);padding:5px 8px;margin:0;isolation:isolate;overflow:visible;z-index:38;pointer-events:auto;
 background:var(--v-surface);border:1px solid var(--v-line);border-radius:15px;box-shadow:var(--v-shadow);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
}
body.valoria-ui #hud-base .hud-command-bar .world-identity{display:flex;align-items:center;flex:0 0 auto;min-width:0;max-width:none;gap:0;margin:0}
body.valoria-ui #hud-base .hud-command-bar .brand{display:flex;align-items:center;gap:7px;width:auto;min-width:0;height:40px;margin:0;padding:0 4px;border:0;border-radius:9px;background:transparent;box-shadow:none;color:var(--v-ink);font:700 16px/1 system-ui,sans-serif;letter-spacing:-.6px;text-shadow:none;white-space:nowrap}
body.valoria-ui #hud-base .hud-command-bar .brand::before{content:"V";display:grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border-radius:9px;background:linear-gradient(155deg,#d4b8ff,#9572d8);color:#24183a;font:850 20px/1 system-ui,sans-serif;letter-spacing:-1px;box-shadow:inset 0 1px #ffffff60}
body.valoria-ui #hud-base .hud-command-bar .brand::after{content:none}
body.valoria-ui #hud-base .hud-command-bar .world-name{display:none}
body.valoria-ui #hud-base .hud-command-bar #valoria-address-form.valoria-address{position:relative;inset:auto;transform:none;flex:1 1 280px;display:flex;align-items:center;gap:7px;width:auto;min-width:110px;max-width:none;height:40px;margin:0;padding:0 4px 0 11px;border:1px solid #d9c5ff20;border-radius:10px;background:#0d0a156b;box-shadow:none;backdrop-filter:none;overflow:hidden;z-index:2}
body.valoria-ui #hud-base .hud-command-bar #valoria-address-form:focus-within{border-color:#c4a2f680;box-shadow:0 0 0 2px #b997e81c}
body.valoria-ui #hud-base .hud-command-bar .valoria-address-search-icon{width:17px;height:17px;flex:0 0 17px;color:var(--v-muted);stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round}
body.valoria-ui #hud-base .hud-command-bar #valoria-address-input{width:0;min-width:0;flex:1 1 0;height:38px;min-height:0;margin:0;padding:0;background:transparent;border:0;outline:0;color:var(--v-ink);font:500 13px/1.2 system-ui,sans-serif}
body.valoria-ui #hud-base .hud-command-bar #valoria-address-form button{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;min-width:0;min-height:0;padding:0;border:0;border-radius:7px;background:#b997e825;color:var(--v-accent);font-size:0}
body.valoria-ui #hud-base .hud-command-bar #valoria-address-form button svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
body.valoria-ui #hud-base .hud-command-bar .world-tools{display:flex;flex:0 0 auto;flex-wrap:nowrap;align-items:center;gap:2px;margin:0;padding:0;border:0;background:none;border-radius:0;box-shadow:none;backdrop-filter:none;min-width:0}
body.valoria-ui #hud-base .hud-command-bar :where(.hud-tool,.mobile-hud-button,.peer-media-quick-actions button,#world-activity>summary){position:relative;display:flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto;width:40px;height:40px;min-width:40px;min-height:40px;margin:0;padding:0;border:1px solid transparent;border-radius:9px;background:transparent;box-shadow:none;backdrop-filter:none;color:var(--v-muted);font:600 12px/1 system-ui,sans-serif;white-space:nowrap;touch-action:manipulation;transition:background .15s,color .15s}
body.valoria-ui #hud-base .hud-command-bar :where(.hud-tool,.mobile-hud-button,.peer-media-quick-actions button,#world-activity>summary):hover{background:var(--v-hover);color:var(--v-ink)}
body.valoria-ui #hud-base .hud-command-bar :is(.hud-tool,.mobile-hud-button,.peer-media-quick-actions button)[aria-expanded=true],body.valoria-ui #hud-base .hud-command-bar .hud-tool.active{color:var(--v-accent);background:var(--v-active);border-color:#b995f52d}
body.valoria-ui #hud-base .hud-command-bar :where(.hud-tool,.mobile-hud-button,.peer-media-quick-actions button,#world-activity>summary) svg{width:20px;height:20px;flex:0 0 20px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
body.valoria-ui #hud-base .hud-command-bar .hud-tool>span,body.valoria-ui #hud-base .hud-command-bar .peer-media-quick-actions button>span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
/* The omnibox already opens the browser; the overflow retains its action. */
body.valoria-ui #hud-base .hud-command-bar #valoria-browser-toggle,body.valoria-ui #hud-base .hud-command-bar #peer-media-options,body.valoria-ui #hud-base .hud-command-bar #help-button{display:none}
body.valoria-ui #hud-base .hud-command-bar #peer-media-dock{position:relative;inset:auto;transform:none;display:flex;flex:0 0 auto;flex-direction:row;align-items:center;justify-content:center;gap:0;width:auto;max-width:none;margin:0;padding:0 0 0 7px;border-left:1px solid var(--v-line);z-index:auto;pointer-events:auto}
body.valoria-ui #hud-base .hud-command-bar .peer-media-quick-actions{display:flex;flex-flow:row nowrap;align-items:center;gap:2px;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;pointer-events:auto}
body.valoria-ui #hud-base .hud-command-bar #peer-media-mic[aria-pressed=true]{background:#9173c52e;color:#e6d4ff}
body.valoria-ui #hud-base .hud-command-bar #peer-media-sound[aria-pressed=true]{color:#e9c6a7}
body.valoria-ui #hud-base .hud-command-bar #peer-media-live[aria-pressed=true]{color:#ffd7d6;background:#9639436b;border-color:#f59a9a42}
body.valoria-ui #hud-base .hud-command-bar #peer-media-inline{position:absolute;top:calc(100% + 12px);right:0;left:auto;width:max-content;max-width:min(280px,calc(100vw - 24px));margin:0;padding:8px 11px;border:1px solid var(--v-line);border-radius:9px;background:var(--v-surface);box-shadow:var(--v-shadow);font-size:11px;line-height:1.4;text-align:left;pointer-events:none;white-space:normal}
body.valoria-ui #hud-base .hud-command-bar #world-activity{position:relative;inset:auto;transform:none;flex:0 0 40px;width:40px;height:40px;max-width:none;margin:0;padding:0;border:0;border-radius:9px;background:transparent;box-shadow:none;z-index:3;pointer-events:auto}
body.valoria-ui #hud-base .hud-command-bar #world-activity[open]>summary{background:var(--v-active);color:var(--v-accent)}
body.valoria-ui #hud-base .hud-command-bar #activity-entries{position:absolute;top:calc(100% + 12px);right:0;width:min(320px,calc(100vw - 24px));max-height:min(320px,50dvh);overflow:auto;padding:8px 15px;border:1px solid var(--v-line);border-radius:13px;background:var(--v-surface);box-shadow:var(--v-shadow);pointer-events:auto}
body.valoria-ui #hud-base .hud-command-bar .header-account{flex:0 0 auto;min-width:0;min-height:40px;height:40px;margin:0;padding:0 12px;border:0;border-radius:9px;background:#d2b6ff;color:#251837;font-size:12px;font-weight:750;box-shadow:none;white-space:nowrap}
body.valoria-ui #hud-base .hud-command-bar #mobile-quick-actions{position:static;inset:auto;display:none;align-items:center;flex:0 0 auto;gap:2px;z-index:auto;margin:0;padding:0;pointer-events:auto}
body.valoria-ui #valoria-address-feedback{top:var(--hud-panel-top);z-index:39;background:var(--v-surface);border-color:#f3aaab42}
/* One consistent panel surface; the close button never scrolls out of reach. */
body.valoria-ui #hud-base #panel{--panel-pad:18px;top:var(--hud-panel-top);right:max(var(--v-edge),env(safe-area-inset-right));max-width:calc(100% - 2 * var(--v-edge));max-height:calc(var(--mobile-viewport-height,100dvh) - var(--hud-panel-top) - 12px);padding:var(--panel-pad);border:1px solid var(--v-line);border-radius:15px;background:var(--v-surface);box-shadow:var(--v-shadow);backdrop-filter:blur(20px);z-index:40}
body.valoria-ui #hud-base #panel .panel-top{position:sticky;top:calc(-1 * var(--panel-pad));z-index:5;margin:calc(-1 * var(--panel-pad)) calc(-1 * var(--panel-pad)) 14px;padding:7px var(--panel-pad);min-height:49px;background:#1c1628fa;border-bottom:1px solid var(--v-line);backdrop-filter:blur(15px)}
body.valoria-ui #hud-base #panel-eyebrow{color:var(--v-muted);font-size:11px;font-weight:650;letter-spacing:.03em;text-transform:none}
body.valoria-ui #hud-base #panel-close{width:34px;height:34px;flex:0 0 34px;border:0;border-radius:9px;background:#ffffff09;color:var(--v-muted)}
body.valoria-ui #hud-base #panel h2{font-size:22px;font-weight:720;letter-spacing:-.5px;line-height:1.2}
body.valoria-ui #hud-base #panel :is(input:not([type=checkbox]),select,textarea){border-color:var(--v-line);background:#100d1b;color:var(--v-ink);border-radius:9px}
body.valoria-ui #hud-base #panel input[type=checkbox]{display:inline-block;width:16px;height:16px;min-height:16px;flex:0 0 16px;padding:0;margin:2px 0;accent-color:#bd9bec}
body.valoria-ui #hud-base #panel .primary{background:#d2b6ff;color:#251837;border-radius:10px}
body.valoria-ui #hud-base #panel :is(.secondary,.catalog-tabs button,.profile-destination){border-radius:10px}
body.valoria-ui #hud-base #panel :is(.browser-tab-row,.media-action,.catalog-tile){border-color:var(--v-line);background:#ffffff05;box-shadow:none}
body.valoria-ui #hud-base #panel :is(.media-action,.browser-tab-open,.profile-destination):hover:not(:disabled){background:var(--v-hover)}
body.valoria-ui #hud-base #panel .media-action[aria-pressed=true]{background:var(--v-active);border-color:#b995f543}
body.valoria-ui #hud-base #panel :is(.browser-device-status,.media-session-status){background:#ffffff05;border-color:var(--v-line)}
body.valoria-ui #hud-base #panel #browser-tab-form button{background:#d2b6ff;color:#251837;border:0;border-radius:9px}
body.valoria-ui #hud-base #mobile-quick-menu:not([hidden]){position:absolute;top:var(--hud-panel-top);right:max(var(--v-edge),env(safe-area-inset-right));left:auto;display:grid;gap:3px;width:min(300px,calc(100vw - 24px));max-height:calc(var(--mobile-viewport-height,100dvh) - var(--hud-panel-top) - 12px);overflow:auto;margin:0;padding:7px;border:1px solid var(--v-line);border-radius:13px;background:var(--v-surface);box-shadow:var(--v-shadow);z-index:41;pointer-events:auto}
body.valoria-ui #hud-base #mobile-quick-menu button{display:flex;align-items:center;gap:12px;min-height:44px;padding:9px 12px;border:0;border-radius:9px;background:transparent;text-align:left;color:var(--v-ink);font:550 13px/1.3 system-ui,sans-serif}
body.valoria-ui #hud-base #mobile-quick-menu button:hover{background:var(--v-hover)}
body.valoria-ui #hud-base #mobile-quick-menu .mobile-menu-icon{display:grid;place-items:center;flex:0 0 22px;color:var(--v-accent)}
body.valoria-ui #hud-base #mobile-quick-menu svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
/* Desktop conversation: a real, centered input rail, not a squashed sidebar. */
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui{position:absolute;left:50%;right:auto;top:auto;bottom:max(var(--v-edge),env(safe-area-inset-bottom));transform:translateX(-50%);width:min(600px,calc(100% - 32px));height:auto;max-height:calc(100dvh - var(--hud-panel-top) - 20px);padding:0;background:var(--v-surface);border:1px solid var(--v-line);border-radius:14px;box-shadow:var(--v-shadow);backdrop-filter:blur(18px);z-index:26;pointer-events:auto;overflow:visible}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui .composer-wrap{display:flex;flex-direction:column;min-height:0;height:auto;max-height:inherit;overflow:hidden;border-radius:inherit}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui .composer-popover{position:relative;inset:auto;width:100%;min-height:0;overflow:hidden;order:1;background:transparent;border:0;box-shadow:none;backdrop-filter:none;padding:13px 16px 8px}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui #chat-context:not([hidden]){display:flex;flex-direction:column;height:auto;max-height:min(34dvh,290px)}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui #creation-tools:not([hidden]){display:flex;flex-direction:column;height:min(470px,52dvh,calc(100dvh - 166px));max-height:inherit}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui :is(#conversation,#creation-conversation){min-height:0;overflow:auto;overscroll-behavior:contain}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui #composer{display:flex;order:2;align-items:flex-end;gap:7px;width:100%;min-width:0;min-height:52px;padding:5px;margin:0;border:0;border-radius:inherit;background:none;box-shadow:none}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui:has(.composer-popover:not([hidden])) #composer{border-top:1px solid var(--v-line);border-radius:0}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui .composer-toggle{display:flex;flex:0 0 auto;position:static;gap:2px;padding:3px;margin:0;align-self:flex-end;border:0;border-radius:9px;background:#ffffff08}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui .composer-toggle button{min-width:0;height:34px;min-height:34px;padding:0 10px;border:0;border-radius:7px;background:none;color:var(--v-muted);font-size:12px;font-weight:650}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui .composer-toggle button[aria-pressed=true]{color:var(--v-ink);background:var(--v-active)}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui #composer-input{display:block;flex:1 1 0;width:0;min-width:0;min-height:40px;max-height:100px;padding:9px 3px;margin:0;border:0;background:transparent;outline:none;color:var(--v-ink);font:400 13px/22px system-ui,sans-serif;resize:none;overflow:auto}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui #composer-submit{width:40px;height:40px;min-width:40px;min-height:40px;flex:0 0 40px;margin:0;padding:0;border:0;border-radius:9px;background:#d2b6ff;color:#251837}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui #composer-submit:disabled{background:#ffffff0e;color:#a59ab8;opacity:1}
body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui>.controls{display:none}
body.valoria-ui #hud-base #world-minimap{border:1px solid var(--v-line);border-radius:13px;background:var(--v-surface);box-shadow:var(--v-shadow)}
/* Browser viewers use the same quiet, compact command chrome. */
body.valoria-ui .peer-media-viewer-toolbar,body.valoria-ui .peer-browser-footer{background:#1c1628;border-color:var(--v-line);gap:7px;padding:8px max(10px,env(safe-area-inset-right)) 8px max(10px,env(safe-area-inset-left))}
body.valoria-ui .peer-media-viewer-toolbar button,body.valoria-ui .peer-browser-footer button{min-height:40px;padding:0 11px;border:1px solid var(--v-line);border-radius:9px;background:#ffffff07;color:var(--v-ink);font-size:12px;font-weight:650}
body.valoria-ui .peer-browser-toolbar input,body.valoria-ui .peer-browser-footer input{border-color:var(--v-line);border-radius:9px;background:#100d1b;color:var(--v-ink);font-size:16px}
@media(min-width:1220px){
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar .hud-tool{width:auto;min-width:40px;padding:0 9px}
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar .hud-tool>span{position:static;width:auto;height:auto;clip:auto;overflow:visible;margin:0;font-size:12px}
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar .world-tools{gap:1px}
}
@media(min-width:1500px){body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar .peer-media-quick-actions button{width:auto;padding:0 9px}body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar .peer-media-quick-actions button>span{position:static;width:auto;height:auto;clip:auto;overflow:visible;margin:0;font-size:12px}}
@media(max-width:790px){
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar .world-tools,body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar .header-account,body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #world-activity:not([open]){display:none}
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #mobile-quick-actions{display:flex}
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar :is(#mobile-search-toggle,#mobile-chat-toggle){display:none}
 body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui{width:min(560px,calc(100vw - 24px))}
 body.valoria-ui:not(.hud-touch) #hud-base #world-minimap:not(.expanded){display:none}
}
@media(max-width:520px){
 body.valoria-ui{--v-edge:6px;--v-rail:52px}
 body.valoria-ui #hud-base .hud-command-bar{gap:4px;padding:5px}
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #mobile-search-toggle{display:flex}
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #valoria-address-form.valoria-address{display:none}
 body.valoria-ui:not(.hud-touch).mobile-search-open #hud-base .hud-command-bar #valoria-address-form.valoria-address{display:flex}
 body.valoria-ui:not(.hud-touch) #hud-base .bottom-ui{width:calc(100% - 12px)}
}
/* Touch rail stays single-row at phone, tablet and landscape sizes. Search,
   menu and conversation are intentional transient surfaces, never extra rows. */
body.valoria-ui.hud-touch{--v-edge:8px;--v-rail:56px;--hud-panel-top:calc(max(var(--v-edge),env(safe-area-inset-top)) + var(--v-rail) + 10px);--hud-touch-bottom:max(15px,env(safe-area-inset-bottom));--hud-stick:clamp(88px,23vw,116px)}
body.valoria-ui.hud-touch #hud-base .hud-command-bar .world-tools,body.valoria-ui.hud-touch #hud-base .hud-command-bar .header-account,body.valoria-ui.hud-touch #hud-base .hud-command-bar #world-activity:not([open]){display:none!important}
body.valoria-ui.hud-touch #hud-base .hud-command-bar #mobile-quick-actions{display:flex;gap:2px}
body.valoria-ui.hud-touch #hud-base .hud-command-bar .world-identity{margin-right:auto}
body.valoria-ui.hud-touch #hud-base .hud-command-bar #peer-media-dock{padding-left:0;border:0}
body.valoria-ui.hud-touch #hud-base .hud-command-bar #valoria-address-form.valoria-address{display:none!important}
body.valoria-ui.hud-touch.mobile-search-open #hud-base .hud-command-bar #valoria-address-form.valoria-address,body.valoria-ui:not(.hud-touch).mobile-search-open #hud-base .hud-command-bar #valoria-address-form.valoria-address{display:flex!important;position:absolute;inset:calc(100% + 9px) 0 auto;transform:none;width:100%;max-width:none;height:48px;min-width:0;margin:0;background:var(--v-surface);border:1px solid #c9aff85c;box-shadow:var(--v-shadow);padding-left:12px;z-index:10}
body.valoria-ui.hud-touch #hud-base .hud-command-bar #valoria-address-input{font-size:16px}
body.valoria-ui.hud-touch #hud-base .hud-command-bar :is(.mobile-hud-button,.peer-media-quick-actions button){width:44px;height:44px;min-width:44px;min-height:44px}
body.valoria-ui.hud-touch #hud-base #world-activity[open],body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #world-activity[open]{position:relative}
body.valoria-ui.hud-touch #hud-base .hud-command-bar #world-activity[open]{position:absolute;inset:calc(100% + 9px) 0 auto auto;width:min(320px,calc(100vw - 24px));height:auto;background:var(--v-surface);border:1px solid var(--v-line);border-radius:13px;box-shadow:var(--v-shadow)}
body.valoria-ui.hud-touch #hud-base .hud-command-bar #world-activity[open] #activity-entries{position:static;width:100%;border:0;border-radius:0;box-shadow:none;background:none}
body.valoria-ui.hud-touch #hud-base .hud-command-bar #world-activity[open]>summary{margin-left:auto}
body.valoria-ui.hud-touch #hud-base #panel:not([hidden]){left:max(var(--v-edge),env(safe-area-inset-left));right:max(var(--v-edge),env(safe-area-inset-right));width:auto!important;max-width:460px;margin-left:auto;padding:var(--panel-pad)}
body.valoria-ui.hud-touch #hud-base .bottom-ui:not([hidden]){display:none!important}
body.valoria-ui.hud-touch.mobile-chat-open #hud-base .bottom-ui{display:block!important;visibility:visible;pointer-events:auto;background:var(--v-surface);border-color:var(--v-line);box-shadow:var(--v-shadow);z-index:49}
body.valoria-ui.hud-touch #hud-base .analog-stick{background:#1a142a65;border:1px solid #d7c1ff65;box-shadow:inset 0 0 0 7px #ffffff07;touch-action:none!important}
body.valoria-ui.hud-touch #hud-base .stick-thumb{background:#d9c7f2e8;border:1px solid #fff8;box-shadow:0 3px 10px #09051342}
body.valoria-ui.hud-touch #hud-base .mobile-actions button{border:1px solid #d7c1ff60;background:#21182edb;border-radius:50%;touch-action:none!important}
body.valoria-ui.hud-touch #hud-base .mobile-actions button.pressed,body.valoria-ui.hud-touch #hud-base .analog-stick.pressed{background:#705299a8;border-color:#e9d3ffb5}
body.valoria-ui.hud-touch #hud-base #world-minimap:not(.expanded){display:none!important}
@media(max-width:399px){body.valoria-ui #hud-base .hud-command-bar .brand{font-size:0;gap:0;padding:0}body.valoria-ui.hud-touch #hud-base .hud-command-bar{gap:4px;padding:5px}body.valoria-ui.hud-touch #hud-base .hud-command-bar .world-identity{margin-right:auto}body.valoria-ui.hud-touch #hud-base .hud-command-bar .peer-media-quick-actions,body.valoria-ui.hud-touch #hud-base .hud-command-bar #mobile-quick-actions{gap:1px}}
@media(max-width:350px){body.valoria-ui.hud-touch{--v-edge:4px;--v-rail:54px}body.valoria-ui.hud-touch #hud-base .hud-command-bar{gap:2px;padding:4px}body.valoria-ui.hud-touch #hud-base .hud-command-bar .peer-media-quick-actions,body.valoria-ui.hud-touch #hud-base .hud-command-bar #mobile-quick-actions{gap:0}}
@media(pointer:coarse) and (orientation:landscape) and (max-height:500px){body.valoria-ui.hud-touch{--v-rail:48px;--hud-stick:86px;--hud-touch-bottom:max(8px,env(safe-area-inset-bottom))}body.valoria-ui.hud-touch #hud-base .hud-command-bar :is(.mobile-hud-button,.peer-media-quick-actions button){width:40px;height:38px;min-width:40px;min-height:38px}}
@media(max-width:600px){body.valoria-ui .peer-browser-toolbar{flex-wrap:wrap;gap:5px}body.valoria-ui .peer-browser-toolbar form{order:2;flex:1 0 100%}body.valoria-ui .peer-browser-footer{flex-wrap:wrap}body.valoria-ui .peer-browser-footer form{flex:1 0 100%}}
@media(prefers-reduced-motion:reduce){body.valoria-ui #hud-base .hud-command-bar :is(button,summary){transition:none}}
/* Overflow is always available; compact displays move destinations here. */
body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #mobile-quick-actions{display:flex}
body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #mobile-chat-toggle,body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #mobile-search-toggle{display:none}
@media(max-width:520px){body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #mobile-search-toggle{display:flex}}
@media(max-width:790px){
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #world-activity[open]{position:absolute;inset:calc(100% + 9px) 0 auto auto;width:min(320px,calc(100vw - 24px));height:auto;background:var(--v-surface);border:1px solid var(--v-line);border-radius:13px;box-shadow:var(--v-shadow)}
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #world-activity[open] #activity-entries{position:static;width:100%;border:0;border-radius:0;box-shadow:none;background:none}
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar #world-activity[open]>summary{margin-left:auto}
}
@media(min-width:761px) and (min-height:501px){
 body.valoria-ui.hud-touch.mobile-chat-open #hud-base .bottom-ui{position:absolute;inset:auto max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) auto;transform:none;width:min(480px,calc(100vw - 24px));height:min(500px,calc(100dvh - var(--hud-panel-top) - 24px));max-height:calc(var(--mobile-viewport-height,100dvh) - var(--hud-panel-top) - 12px);padding:10px;border:1px solid var(--v-line);border-radius:15px}
 body.valoria-ui.hud-touch.mobile-chat-open #hud-base .composer-wrap{display:flex;flex-direction:column;min-height:0;height:100%;overflow:hidden}
 body.valoria-ui.hud-touch.mobile-chat-open #hud-base .composer-popover{display:flex;flex-direction:column;position:relative;inset:auto;flex:1 1 0;width:100%;height:auto;max-height:none;min-height:0;overflow:hidden;background:transparent;border:0;box-shadow:none;order:1}
 body.valoria-ui.hud-touch.mobile-chat-open #hud-base #composer{order:2;flex:0 0 auto;min-width:0;margin:0;gap:6px}
 body.valoria-ui.hud-touch.mobile-chat-open #hud-base #composer-input{min-width:0;flex:1 1 0;width:0;font-size:16px}
}
body.valoria-ui.hud-touch.mobile-chat-open #hud-base #mobile-controls{display:none!important}
body.valoria-ui.hud-touch.mobile-chat-open #hud-base #composer-input{background:#100d1b;border-color:var(--v-line);color:var(--v-ink)}
body.valoria-ui.hud-touch.mobile-chat-open #hud-base #composer-submit{background:#d2b6ff;color:#251837}

@media(min-width:950px) and (max-width:1219px){
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar .hud-tool{flex-direction:column;gap:2px;width:54px;height:42px;min-width:54px;padding:2px}
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar .hud-tool>span{position:static;width:auto;height:auto;clip:auto;overflow:visible;margin:0;font-size:10px;line-height:12px}
 body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar .hud-tool svg{width:18px;height:18px;flex:0 0 18px}
}
@media(min-width:1650px){body.valoria-ui:not(.hud-touch) #hud-base .hud-command-bar{left:50%;right:auto;width:min(1580px,calc(100% - 24px));transform:translateX(-50%)}}
body.valoria-ui #hud-base .hud-command-bar #return-valoria-button{width:auto;min-width:40px;padding:0 8px}

@media(max-width:1099px){body.valoria-ui #hud-base .hud-command-bar #browser-button,body.valoria-ui #hud-base .hud-command-bar #vehicle-toggle{display:none}}
@media(min-width:700px){
 body.valoria-ui.hud-touch #hud-base .hud-command-bar #valoria-address-form.valoria-address,body.valoria-ui.hud-touch.mobile-search-open #hud-base .hud-command-bar #valoria-address-form.valoria-address{display:flex!important;position:relative;inset:auto;transform:none;flex:1 1 200px;width:auto;min-width:110px;height:40px;padding-left:11px;box-shadow:none;background:#0d0a156b;border-color:var(--v-line)}
 body.valoria-ui.hud-touch #hud-base .hud-command-bar #mobile-search-toggle{display:none}
 body.valoria-ui.hud-touch #hud-base .hud-command-bar .world-identity{margin-right:0}
}
@media(min-width:1100px){
 body.valoria-ui.hud-touch #hud-base .hud-command-bar .world-tools{display:flex!important}
 body.valoria-ui.hud-touch #hud-base .hud-command-bar :is(#browser-button,#vehicle-toggle){display:none}
 body.valoria-ui.hud-touch #hud-base .hud-command-bar .hud-tool{min-width:44px;width:44px;height:44px}
}
body.valoria-ui #hud-base #composer-input::placeholder{color:var(--v-muted);opacity:1}
body.valoria-ui #hud-base .hud-command-bar #return-valoria-button{max-width:140px}
