#presence-menu svg,#presence-reply svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#presence-panel {position:fixed;z-index:46;right:20px;bottom:calc(var(--safe,16px) + 80px);width:min(410px,calc(100vw - 40px));max-height:calc(100dvh - 150px);box-sizing:border-box;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:18px;border:1px solid #e3eee333;border-radius:22px;background:#13292ff5;color:#eef4ed;scrollbar-width:thin}
.presence-heading {display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
.presence-heading h2 {font-size:18px;margin:0}
#presence-panel button,#presence-panel select {box-sizing:border-box;min-height:44px;padding:9px 11px;font-size:12px;line-height:1.4;border:1px solid #e3eee333;border-radius:12px;color:inherit;background:#20383d;touch-action:manipulation}
#presence-panel .presence-heading button {flex:none}
#presence-panel label {display:block;font-size:12px;line-height:1.6}
#presence-panel select {display:block;width:100%;margin-top:5px;font-size:16px;background:#0d2228}
#presence-ride-offer {border-top:1px solid #e4f0d62b;margin-top:12px;padding-top:6px}
#presence-offer-label {display:flex;align-items:center;gap:8px;min-height:44px;cursor:pointer;touch-action:manipulation}
#presence-offer-label input {width:22px;height:22px;flex:none;accent-color:#cce6b9}
.presence-note,.presence-members {font-size:11px;line-height:1.6;color:#bdd0c7;margin:7px 0 12px;overflow-wrap:anywhere}
.presence-create {padding:12px;border:1px solid #d4e6db24;border-radius:14px;margin:12px 0}
#presence-create-drive {width:100%;margin:8px 0;--control-surface:#315e68e6;--control-border:#e1f2d3}
.presence-actions {display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.presence-actions button {flex:1 1 100px}
.presence-card {margin-top:12px;padding:13px;border:1px solid #d4e6db33;border-radius:14px;background:#ffffff04}
.presence-card strong {font-size:13px;line-height:1.5;overflow-wrap:anywhere}
.presence-card p {font-size:11px;line-height:1.6;overflow-wrap:anywhere;margin:7px 0}
#social-quick #presence-reply {position:relative;display:flex}
#presence-reply .presence-reply-name {position:absolute;bottom:calc(100% + 5px);right:0;max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:8px;padding:3px 7px;background:#102c32ed;font-size:10px;line-height:14px;pointer-events:none}
body.ride-ui #ride-motion-buttons #presence-reply .presence-reply-name {position:absolute;width:max-content;height:auto;max-height:none;overflow:hidden;bottom:calc(100% + 5px);right:0;max-width:130px;font-size:9px;line-height:14px}
body.presence-open :is(#quick,#joystick,#pedals,#walk-controls,#refreshment-pocket,#cockpit-wheel-target,#ride-vehicle-rail,#ride-motion-rail,#hud-categories,#social-quick,#boarding-prompt,.world-mini,#chat-preview,#help) {visibility:hidden;pointer-events:none}
body:is(.photo-mode,.map-open) :is(#presence-menu,#presence-panel,#presence-reply) {display:none!important}
body:is(.chat-typing,.chat-keyboard) :is(#presence-menu,#presence-reply) {visibility:hidden;pointer-events:none}
@media(max-width:700px),(pointer:coarse) {
 #presence-panel {left:12px;right:12px;bottom:var(--safe,12px);width:auto;max-height:min(68dvh,560px);padding:15px}
}
body.hud-landscape #presence-panel {top:12px;right:var(--hud-right,12px);bottom:var(--safe,12px);left:auto;width:min(410px,calc(100vw - 140px));max-height:none}
/* Nearby actions, food and chat share one space above the walking controls. */
#walk-local-hud,#walk-social-actions {display:contents}
body.hud-mobile:not(.ride-ui) #walk-local-hud {
 --walk-hud-bottom:calc(var(--safe) + 188px);
 --walk-hud-top:calc(env(safe-area-inset-top,0px) + 174px);
 position:fixed;z-index:8;inset-inline:var(--hud-left) var(--hud-right);bottom:var(--walk-hud-bottom);
 max-height:calc(100dvh - var(--walk-hud-bottom) - var(--walk-hud-top));
 display:flex;flex-direction:column;align-items:center;gap:6px;overflow:auto;overscroll-behavior:contain;pointer-events:none;
}
body.hud-mobile:not(.ride-ui) #walk-local-hud > :is(#boarding-prompt,#shop-strip,#chat-preview) {
 position:static;inset:auto;transform:none;width:min(100%,440px);max-width:100%;box-sizing:border-box;margin:0;
}
body.hud-mobile:not(.ride-ui) #walk-local-hud > #boarding-prompt {flex:none}
body.hud-mobile:not(.ride-ui) #walk-local-hud > #shop-strip {pointer-events:auto;touch-action:pan-y;min-height:0;max-height:none}
body.hud-mobile:not(.ride-ui) #walk-local-hud > #chat-preview:not([hidden]) {
 order:-1;display:flex;flex-direction:column;justify-content:flex-end;overflow:hidden;min-height:0;max-width:min(100%,360px);
}
body.hud-mobile:not(.ride-ui) #walk-social-actions {display:flex;width:100%;flex:none;flex-wrap:wrap;align-items:flex-end;gap:6px 8px}
body.hud-mobile:not(.ride-ui) #walk-social-actions:not(:has(button:not([hidden]))) {display:none}
body.hud-mobile:not(.ride-ui) #walk-social-actions :is(#social-quick,#refreshment-pocket) {position:relative;inset:auto;transform:none;width:max-content;max-width:100%;margin:0;pointer-events:auto}
body.hud-mobile:not(.ride-ui) #walk-social-actions #refreshment-pocket button {flex:0 1 80px;min-width:48px}
body.hud-mobile:not(.ride-ui) #walk-social-actions #social-quick {flex-wrap:wrap;row-gap:2px}
body.hud-mobile:not(.ride-ui) #walk-social-actions #together-quick-name {
 position:static;order:-1;flex:1 0 100%;max-width:100%;box-sizing:border-box;padding:1px 5px;font-size:10px;
}
body.hud-mobile:not(.ride-ui):not(.hud-landscape) #chat-toggle {top:calc(env(safe-area-inset-top,0px) + 58px)}
body.hud-mobile.hud-landscape:not(.ride-ui) #walk-local-hud {
 --walk-hud-bottom:calc(var(--safe) + 62px);
 --walk-hud-top:calc(env(safe-area-inset-top,0px) + 120px);
 inset-inline:calc(var(--hud-left) + 108px) calc(var(--hud-right) + 108px);
}
body.hud-mobile.hud-landscape:not(.ride-ui) #walk-local-hud > #chat-preview p:not(:last-child) {display:none}
body.hud-mobile.hud-landscape:not(.ride-ui) #walk-social-actions {display:contents}
body.hud-mobile.hud-landscape:not(.ride-ui) #walk-social-actions #social-quick {
 position:fixed;left:auto;right:var(--hud-right);bottom:calc(var(--safe) + 70px);
 max-width:104px;column-gap:4px;justify-content:flex-end;
}
body.hud-mobile.hud-landscape:not(.ride-ui) #walk-social-actions #social-quick button {width:48px;min-width:48px;padding-inline:2px}
body.hud-mobile.hud-landscape:not(.ride-ui) #shop-strip .shop-grid {grid-template-columns:repeat(4,minmax(0,1fr))}
body.hud-mobile.hud-landscape:not(.ride-ui) #shop-strip .shop-grid button {padding:4px;overflow-wrap:anywhere}
body.hud-mobile.hud-landscape:not(.ride-ui) #hud-categories {max-width:calc(100vw - 260px)}
body.hud-mobile.hud-landscape:not(.ride-ui) #hud-categories {
 flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;
}
body.hud-mobile.hud-landscape:not(.ride-ui) #hud-categories button {
 width:44px;min-width:44px;padding-inline:2px;
}
@media(max-width:359px){
 body.hud-mobile:not(.ride-ui) #hud-categories {flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
 body.hud-mobile:not(.ride-ui) #hud-categories button {width:44px;min-width:44px;padding-inline:2px}
 body.hud-mobile:not(.ride-ui):not(.hud-landscape) #walk-local-hud {--walk-hud-top:calc(env(safe-area-inset-top,0px) + 170px);gap:4px}
 body.hud-mobile:not(.ride-ui) #walk-social-actions {row-gap:4px}
 body.hud-mobile:not(.ride-ui) #walk-local-hud > #chat-preview {padding-block:2px}
 body.hud-mobile:not(.ride-ui) #walk-local-hud > #chat-preview p:not(:last-child) {display:none}
}
body.hud-mobile.hud-landscape:not(.ride-ui) .world-mini {left:auto;right:var(--hud-right);top:calc(env(safe-area-inset-top,0px) + 62px);bottom:auto;transform:none}
body:not(.ride-ui):not(.hud-mobile):has(#refreshment-pocket:not([hidden])) #chat-preview {bottom:calc(var(--safe,16px) + 208px)}
body:not(.ride-ui):has(#shop-strip:not([hidden])) #chat-preview,
#walk-local-hud:has(#shop-strip:not([hidden])) > :is(#walk-social-actions,#boarding-prompt) {display:none!important}
