/* One spacing rhythm for primary navigation and secondary scene controls. */
:root{--control-edge:24px;--control-height:44px}
body #hint{display:none!important}
#navigation-help{position:fixed;left:var(--control-edge);bottom:max(var(--control-edge),env(safe-area-inset-bottom));z-index:34;width:44px;height:44px;border:1px solid #e9dfd5;border-radius:50%;background:#fffcf8ed;color:#68564a;font-size:20px;box-shadow:0 4px 18px #40302012;backdrop-filter:blur(16px)}
#navigation-help:hover,#navigation-help[aria-expanded=true]{background:#fff0e2;color:#ad4307}
body:has(#arrival-choice:not([hidden])) #navigation-help{visibility:hidden}
body .explore-dock{bottom:max(var(--control-edge),env(safe-area-inset-bottom));padding:6px;gap:3px;border:1px solid #fff9;border-radius:20px;max-width:calc(100% - 120px)}
body .explore-dock button{min-height:48px;padding:10px 16px;border-radius:14px;gap:9px;font-size:13px}
body .explore-dock svg{width:20px;height:20px}
body #scene-actions{right:var(--control-edge);gap:8px;align-items:center;max-width:min(560px,calc(100% - 48px))}
body #scene-actions>button,body #scene-actions #view-slot button{height:var(--control-height);min-height:var(--control-height);padding:0 13px;border-radius:14px;font-size:12px;border-color:#e9dfd5;background:#fffcf8f2;color:#5b5146;box-shadow:0 4px 18px #40302010}
body #scene-actions>#ui-settings{width:44px;min-width:44px;padding:12px}
body #scene-actions #view-slot .view-switch{gap:4px}
body #scene-actions #site-credit{display:none}
body #presence-inline-status{font-size:10px;line-height:14px;position:absolute;top:calc(100% + 5px);right:0}
body #presence-inline-status>span{background:transparent;padding:0 4px;text-shadow:0 1px 3px #fff}
body #presence-inline-status:has(span:empty){display:none}
.connected-device-list{display:grid;gap:12px}.connected-device{padding:18px;border:1px solid #e9dfd5;border-radius:18px;background:#fffdf9}.connected-device header{display:flex;align-items:center;gap:12px}.connected-device h3{margin:0;font-size:15px}.connected-device header p{margin:4px 0 0;font-size:11px;color:#8c7e71}.connection-symbol{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#f3ece4;font-size:24px;color:#8b6850}.connection-dot{margin-left:auto;width:7px;height:7px;border-radius:50%;background:#c9c1b8}.connected-device[data-ready=true] .connection-dot{background:#47816a}.connected-device dl{margin:16px 0 12px;display:grid;gap:8px}.connected-device dl>div{display:flex;justify-content:space-between;gap:16px;font-size:12px}.connected-device dt{color:#8a7d70;flex-shrink:0}.connected-device dd{margin:0;text-align:right;color:#554b42}.connection-note,.connection-footnote{font-size:11px;line-height:1.7;color:#8c7e71;margin:0}.connection-footnote{margin:16px 2px}.connection-library{width:100%;min-height:44px;border:1px solid #e9dfd5;border-radius:12px;background:#fff7ed;color:#945124}.navigation-keys{display:grid;grid-template-columns:90px 1fr;gap:18px 12px;font-size:13px;line-height:1.7}.navigation-keys dt{color:#8a7d70}.navigation-keys dd{margin:0}
@media(max-width:767px){:root{--control-edge:12px}body .explore-dock{max-width:calc(100% - 24px);gap:0;padding:4px;bottom:max(12px,env(safe-area-inset-bottom))}body .explore-dock button{padding:4px 3px;min-width:40px;min-height:50px;gap:3px;font-size:10px;flex-direction:column}body .explore-dock svg{width:18px;height:18px}body #navigation-help{bottom:calc(86px + env(safe-area-inset-bottom));width:36px;height:36px}body #scene-actions{max-width:calc(100% - 108px);gap:5px}body #scene-actions>button,body #scene-actions #view-slot button{padding:0 9px;font-size:11px;height:40px;min-height:40px}body #scene-actions>#ui-settings{min-width:40px;width:40px;padding:10px}.connected-device{padding:14px}}
body #viewport{--scene-actions-offset:max(24px,env(safe-area-inset-bottom))}
@media(max-width:767px){body #viewport{--scene-actions-offset:calc(96px + env(safe-area-inset-bottom))}}

/* Room-specific controls live in Settings; the scene toolbar keeps a stable width. */
#presence-settings{margin:16px 0;padding:16px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
#presence-settings h3{font-size:14px;margin:0 0 12px}
#presence-settings>button{min-height:44px;margin:0 6px 6px 0;padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:var(--paper);color:var(--ink)}
#presence-settings>button[aria-pressed=true]{background:var(--soft);color:var(--green)}
#presence-settings #presence-panel{position:static!important;inset:auto!important;width:100%!important;max-height:none!important;overflow:visible;padding:12px!important;margin:8px 0 0;box-shadow:none}
#presence-settings #presence-panel .presence-heading{position:static;padding:0;background:transparent}
#presence-settings #presence-inline-status{position:static;inset:auto;text-align:left;font-size:12px;line-height:1.6;padding:6px 0}
#presence-settings #presence-inline-status>span{padding:0;text-shadow:none}
body #scene-actions>#ui-enter{position:absolute!important;left:auto!important;right:0!important;top:auto!important;bottom:calc(100% + 10px)!important}
