/* Orvylia's original fullscreen world UI. Load after styles.css. */
:root{--immersive-sky:#cce8f5;--hud-white:#fffffff2;--hud-shadow:0 5px 22px #26474117;--hud-top:calc(12px + env(safe-area-inset-top));--dock-bottom:calc(15px + env(safe-area-inset-bottom))}
html,body{width:100%;height:100%;overflow:hidden;background:var(--immersive-sky)}
.app-shell,.main{margin:0!important;padding:0!important;max-width:none;width:100%;height:100dvh;min-height:0}
html[dir=rtl] .main{margin:0!important}
.sidebar,.topbar,.page-heading,.lower-grid,.quick-actions,.page-footer,.phone-fab{display:none!important}
.world-card{position:fixed;inset:0;width:100%;height:100vh;height:100dvh;min-height:0;max-height:none;border:0;border-radius:0;background:linear-gradient(180deg,#c5e5f4,#e6f2f1);z-index:0}
#world,#atlas-world,#earth-world,#photo-world{position:absolute;inset:0;width:100%;height:100%;min-width:0;min-height:0}
.world-card canvas{display:block}
.scene-loading{font-size:14px;background:#d8edf3;color:#356d63}
.scene-top{top:calc(79px + env(safe-area-inset-top));left:50%;right:auto;transform:translateX(-50%);width:max-content;max-width:calc(100% - 32px);display:flex;justify-content:center;gap:4px;padding:5px;background:var(--hud-white);border:1px solid #ffffffb8;border-radius:28px;box-shadow:var(--hud-shadow);z-index:5}
.scene-location{max-width:300px;padding:9px 12px;background:#203940;color:white;border-radius:22px;box-shadow:none;font-size:12px;line-height:1.2;white-space:nowrap;overflow:hidden}
.scene-location>span{overflow:hidden;text-overflow:ellipsis}
.scene-location i{background:#90d8ba;flex:none}
.scene-source-controls{gap:2px;min-width:0}
.scene-pill{background:transparent;padding:10px 12px;max-width:170px;font-size:11px;color:#627470;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:22px}
.scene-pill:hover{background:#ebf3ed}
.scene-bottom{bottom:calc(103px + env(safe-area-inset-bottom));left:18px;right:18px;gap:10px;align-items:end}
.scene-caption{max-width:min(340px,52vw);background:#ffffffe5;border-radius:20px;padding:11px 16px;box-shadow:var(--hud-shadow)}
.scene-caption small{font-size:8px;letter-spacing:.8px}.scene-caption b{font-size:11px;line-height:1.5}
.scene-bottom .scene-caption{display:none}
.camera-controls{margin-inline-start:auto;border-radius:24px;background:var(--hud-white);box-shadow:var(--hud-shadow);border:1px solid #fff}
.camera-controls button{width:39px;height:39px;font-size:20px;color:#53756b}
.camera-controls button+button{border-left:1px solid #e5eee8}
.scene-note{bottom:calc(111px + env(safe-area-inset-bottom));left:50%;font-size:10px;padding:9px 14px;border-radius:24px;color:#537267;background:#ffffffd6;max-width:calc(100% - 280px);white-space:normal;text-align:center;line-height:1.5;box-shadow:var(--hud-shadow)}
.atlas-note{top:calc(127px + env(safe-area-inset-top));left:18px;background:#ffffffd9;border-radius:16px;padding:8px 12px;font-size:9px;max-width:260px}

.immersive-hud{position:fixed;inset:0;z-index:35;pointer-events:none;font-family:'DM Sans',system-ui,sans-serif;color:#25383a}
.immersive-hud button{pointer-events:auto;touch-action:manipulation}
.hud-topbar{position:absolute;top:var(--hud-top);left:50%;transform:translateX(-50%);width:min(900px,calc(100% - 36px));min-height:49px;display:flex;align-items:center;gap:0;padding:5px 8px;background:var(--hud-white);border:1px solid #ffffffc4;border-radius:28px;box-shadow:var(--hud-shadow);backdrop-filter:blur(14px)}
.hud-topbar button{display:flex;align-items:center;justify-content:center;gap:7px;background:none;padding:9px 12px;font-size:12px;line-height:1.3;min-width:0;min-height:35px;border-radius:22px;white-space:nowrap}
.hud-topbar button+button:not(.hud-wallet){border-inline-start:1px solid #e5ebe7}
.hud-topbar button:hover{background:#edf5ed}
.hud-clock{font-weight:600;flex:none}.hud-clock>[data-hud-weather]{font-size:19px;color:#d2a35a}
.hud-time-dot{width:5px;height:5px;border-radius:50%;background:#63b187;flex:none}.hud-time-dot[data-paused=true]{background:#9aa8a1}
.hud-mood{color:#568f6b;font-weight:600;min-width:120px}.hud-mood>[data-hud-mood-face]{font-size:18px}.hud-mood[data-mood=low]{color:#a76b4f}.hud-mood[data-mood=medium]{color:#9b8749}
.hud-account{color:#648277;font-size:11px!important}.hud-account>i{width:7px;height:7px;background:#5ab086;border-radius:50%;flex:none}.hud-account[data-mode=guest]>i,.hud-account[data-mode=loading]>i,.hud-account[data-mode=profile]>i{background:#95a7a0}.hud-account[data-mode=offline],.hud-account[data-mode=error]{color:#96673e}.hud-account[data-mode=offline]>i,.hud-account[data-mode=error]>i{background:#c79660}.hud-account[data-mode=syncing]>i{background:#60969e}
.hud-top-space{flex:1;min-width:4px}.hud-goals{width:38px;flex:none;color:#aa9959;font-size:19px!important;padding:6px!important}
.hud-wallet{flex:none;display:flex!important;gap:3px!important;align-items:flex-end!important;flex-direction:column;padding:5px 13px!important}.hud-wallet b{font-size:14px;line-height:1.2;letter-spacing:-.3px}.hud-wallet-label{font-size:8px;line-height:1.1;color:#81908a;font-weight:400}
.hud-life{position:absolute;left:17px;bottom:calc(84px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:10px;max-width:calc(100% - 34px)}
.hud-profile{display:grid;place-items:center;width:59px;height:59px;padding:2px;flex:none;border:3px solid #fff;border-radius:50%;background:#e2f3e9;box-shadow:0 0 0 2px #62b890,0 3px 15px #22433324;overflow:hidden}
.hud-avatar{display:block;width:100%;height:100%}
.hud-needs{width:208px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px 11px;padding:12px 15px;border:1px solid #fff;border-radius:29px;background:var(--hud-white);box-shadow:var(--hud-shadow)}
.hud-need{display:flex;align-items:center;gap:5px;min-width:0}.hud-need-icon{font-size:14px;width:14px;text-align:center;flex:none;color:#889a8c;line-height:1}.hud-need-track{height:7px;flex:1;min-width:0;border-radius:5px;overflow:hidden;background:#eaf0e9}.hud-need-track i{display:block;height:100%;border-radius:5px;background:#47ad83;transition:width .3s}.hud-need-track i[data-level=medium]{background:#d4b365}.hud-need-track i[data-level=low]{background:#d89468}
.hud-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

.mobile-nav{display:flex;position:fixed;left:50%;right:auto;bottom:var(--dock-bottom);transform:translateX(-50%);width:min(450px,calc(100% - 28px));justify-content:space-between;gap:3px;padding:7px 8px;background:var(--hud-white);border:1px solid #ffffffc4;border-radius:30px;backdrop-filter:blur(14px);box-shadow:0 8px 30px #25483b20;z-index:40}
.mobile-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;flex:1;min-width:0;min-height:49px;padding:7px 5px;border-radius:24px;background:none;color:#718079;font-size:21px;line-height:1}
.mobile-nav button.active{color:#fff;background:#24363d}.mobile-nav span{display:block;font-size:10px;font-weight:500;line-height:1.1;margin:0;max-width:100%;overflow:hidden;text-overflow:ellipsis}
.mobile-nav button:hover:not(.active){background:#eaf3ed}
.toast-region{bottom:calc(158px + env(safe-area-inset-bottom));right:18px;max-width:min(350px,calc(100% - 36px))}
.modal-backdrop{z-index:100}.modal{box-shadow:0 15px 70px #14362d2a}.modal-close{min-width:38px;min-height:38px}

/* Move map utilities away from the world centre and keep provider credits visible. */
#earth-world .earth-toolbar,#earth-world>div:has(>form){top:calc(139px + env(safe-area-inset-top))!important;left:18px!important;right:18px!important;max-width:340px!important;z-index:6!important}
#earth-world .earth-toolbar>form,#earth-world>div:has(>form)>form{border-radius:26px!important}
#earth-world .earth-toolbar>div[role=region],#earth-world>div:has(>form)>div[role=region]{max-height:min(35dvh,295px)!important;overscroll-behavior:contain}
#earth-world .earth-avatar-controls{top:calc(196px + env(safe-area-inset-top))!important;left:18px!important;right:18px!important;max-width:340px!important;border-radius:19px!important;padding:6px 10px!important;z-index:5!important}
#earth-world .earth-avatar-controls button{max-width:160px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#earth-world .earth-map-note{display:none!important}
#earth-world .earth-provider-credits{bottom:calc(209px + env(safe-area-inset-bottom))!important;left:12px!important;right:12px!important;max-width:340px!important;width:fit-content;z-index:5!important;font-size:8px!important;line-height:1.35!important;pointer-events:auto}
.world-card:has(#earth-world:not([hidden])) #earth-world .maplibregl-ctrl-bottom-right{bottom:0;left:0;right:0}
.world-card:has(#earth-world:not([hidden])) #earth-world .maplibregl-ctrl-bottom-right .maplibregl-ctrl-group{margin:0 15px calc(118px + env(safe-area-inset-bottom)) 0}
.world-card:has(#earth-world:not([hidden])) #earth-world .maplibregl-ctrl-bottom-left{bottom:calc(118px + env(safe-area-inset-bottom))}
.world-card:has(#earth-world:not([hidden])) #earth-world .maplibregl-ctrl-attrib{left:8px;right:8px;bottom:calc(4px + env(safe-area-inset-bottom));padding:3px 6px;max-width:none;width:fit-content;margin-left:auto;direction:ltr;font:8px/1.4 system-ui,sans-serif}
.world-card:has(#earth-world:not([hidden])) #earth-world .maplibregl-ctrl-attrib a,.world-card:has(#earth-world:not([hidden])) #earth-world .maplibregl-ctrl-attrib-inner{font-size:8px;line-height:1.4}
html[data-immersive-view=earth] .mobile-nav{bottom:calc(62px + env(safe-area-inset-bottom))}
html[data-immersive-view=earth] .hud-life{bottom:calc(136px + env(safe-area-inset-bottom))}

@media(max-width:960px){.scene-note{display:none}}
@media(max-width:700px){
 :root{--hud-top:calc(9px + env(safe-area-inset-top));--dock-bottom:calc(12px + env(safe-area-inset-bottom))}
 .hud-topbar{width:calc(100% - 20px);min-height:63px;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"clock wallet" "mood account";gap:0 7px;border-radius:25px;padding:6px 11px}
 .hud-topbar button{min-height:24px;padding:3px 2px;font-size:11px;justify-content:flex-start;gap:5px;border:0!important;border-radius:14px;overflow:hidden}
 .hud-clock{grid-area:clock}.hud-clock [data-hud-clock]{overflow:hidden;text-overflow:ellipsis}.hud-clock>[data-hud-weather]{font-size:17px}
 .hud-mood{grid-area:mood;min-width:0!important;font-size:10px!important}.hud-mood>[data-hud-mood-face]{font-size:15px}.hud-mood [data-hud-mood]{overflow:hidden;text-overflow:ellipsis}
 .hud-wallet{grid-area:wallet;padding:3px 1px!important;align-items:flex-end!important;max-width:128px}.hud-wallet b{font-size:12px}.hud-wallet-label{display:none}
 .hud-account{grid-area:account;justify-content:flex-end!important;font-size:9px!important;max-width:128px}.hud-account span{overflow:hidden;text-overflow:ellipsis}
 .hud-top-space,.hud-goals{display:none!important}
 .scene-top{top:calc(83px + env(safe-area-inset-top));max-width:calc(100% - 20px);padding:4px;gap:1px}.scene-location{max-width:min(225px,calc(100vw - 120px));font-size:10px;padding:9px 10px}.scene-pill{font-size:9px;padding:9px 10px;max-width:105px}.scene-source-controls #atmosphere-label{display:none}
 .hud-life{left:12px;bottom:calc(86px + env(safe-area-inset-bottom));gap:8px;max-width:calc(100% - 24px)}
 .hud-profile{width:49px;height:49px;border-width:2px}.hud-needs{width:181px;gap:5px 9px;padding:11px 12px}.hud-need-icon{font-size:12px;width:12px}.hud-need-track{height:6px}
 .mobile-nav{width:calc(100% - 24px);max-width:430px;border-radius:28px;padding:6px 7px;gap:2px}.mobile-nav button{min-height:48px;font-size:21px;gap:5px;padding:7px 4px}.mobile-nav span{font-size:9px}
 .scene-bottom{left:12px;right:12px;bottom:calc(90px + env(safe-area-inset-bottom))}.camera-controls button{width:32px;height:32px;font-size:18px}
 .scene-note{display:none}.atlas-note{top:calc(126px + env(safe-area-inset-top));left:12px;max-width:200px;font-size:8px}
 #earth-world .earth-toolbar,#earth-world>div:has(>form){top:calc(130px + env(safe-area-inset-top))!important;left:12px!important;right:12px!important;max-width:340px!important}
 #earth-world .earth-avatar-controls{top:calc(186px + env(safe-area-inset-top))!important;left:12px!important;right:12px!important;max-width:340px!important;font-size:9px!important}
 #earth-world .earth-avatar-controls button{padding:6px 7px!important;font-size:9px!important}
 #earth-world .earth-provider-credits{left:12px!important;right:12px!important;bottom:calc(199px + env(safe-area-inset-bottom))!important;max-width:290px!important;width:auto;font-size:8px!important;padding:2px 5px!important;background:#ffffffed!important}
 .world-card:has(#earth-world:not([hidden])) #earth-world .maplibregl-ctrl-attrib{left:5px;right:5px;bottom:calc(3px + env(safe-area-inset-bottom));width:auto;text-align:center}
 html[data-immersive-view=earth] .hud-life{bottom:calc(136px + env(safe-area-inset-bottom))}
 .toast-region{left:14px;right:14px;bottom:calc(154px + env(safe-area-inset-bottom));max-width:none}
 .modal{max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:28px 20px;border-radius:25px}
}
@media(max-width:360px){.hud-wallet{max-width:105px}.hud-account{max-width:105px}.hud-needs{width:163px;padding:10px}.hud-life{gap:7px}.hud-profile{width:46px;height:46px}.camera-controls{flex-direction:column}.camera-controls button{width:30px;height:30px}.camera-controls button+button{border-left:0;border-top:1px solid #e5eee8}.hud-account{font-size:8px!important}}
@media(max-height:500px) and (min-width:701px){.hud-topbar{min-height:40px}.hud-topbar button{min-height:29px;padding-block:5px}.scene-top{top:calc(62px + env(safe-area-inset-top))}.hud-life{bottom:calc(75px + env(safe-area-inset-bottom))}.hud-profile{width:48px;height:48px}.hud-needs{padding-block:10px}.mobile-nav button{min-height:39px}.mobile-nav{padding-block:5px}.scene-note{display:none}#earth-world .earth-toolbar,#earth-world>div:has(>form){top:calc(106px + env(safe-area-inset-top))!important}#earth-world .earth-avatar-controls{top:calc(162px + env(safe-area-inset-top))!important}}
@media(prefers-reduced-motion:reduce){.hud-need-track i{transition:none}}

/* Solid controls remain sharp over the moving WebGL world on all viewports. */
.hud-topbar,.mobile-nav,.scene-pill,.scene-caption{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}

.mobile-nav [data-install-dock]{color:#17694d;background:#e4f1e6}.mobile-nav [data-install-dock][hidden]{display:none}.install-onboard{margin:0 0 20px;max-width:100%}
