
/* Compact shared navigation and vitals, with the original tap controls retained. */
body .scene-hud{width:min(234px,calc(100vw - 76px))}
.scene-hud .scene-hud-identity{gap:7px}
.scene-hud .scene-hud-avatar{flex-basis:44px;width:44px;height:44px}
.scene-hud .scene-hud-vitals{max-width:180px}
.scene-hud .scene-hud-name strong{font-size:12px}
.scene-hud .scene-hud-name span{font-size:8px}
.scene-hud .scene-hud-track{height:13px}
.scene-hud .scene-hud-meter-copy,.scene-hud .scene-hud-meter-copy b{font-size:8px}
.scene-hud .scene-hud-links{width:52px;gap:2px;margin-top:9px}
.scene-hud .scene-hud-links button{width:52px;min-height:51px;font-size:10px}
.scene-hud .scene-hud-links img{width:36px;height:36px}
.scene-hud .scene-hud-links small{font-size:8px}
.scene-hud .scene-hud-links .scene-hud-daily-check{width:16px;height:16px;right:4px}
@media(max-width:600px){body .scene-hud{width:min(211px,calc(100vw - 76px))}.scene-hud .scene-hud-avatar{flex-basis:40px;width:40px;height:40px}.scene-hud .scene-hud-identity{gap:6px}.scene-hud .scene-hud-vitals{max-width:165px}.scene-hud .scene-hud-name strong{font-size:11px}.scene-hud .scene-hud-name span{font-size:8px}.scene-hud .scene-hud-meter{margin-top:2px}.scene-hud .scene-hud-track{height:11px}.scene-hud .scene-hud-meter-copy,.scene-hud .scene-hud-meter-copy b{font-size:7px}.scene-hud .scene-hud-links{width:48px;margin-top:8px}.scene-hud .scene-hud-links button{width:48px;min-height:47px;font-size:9px}.scene-hud .scene-hud-links img{width:31px;height:31px}.scene-hud .scene-hud-links small{font-size:8px}}
@media(max-height:690px){.scene-hud .scene-hud-links{gap:0;margin-top:6px}.scene-hud .scene-hud-links button{min-height:42px}.scene-hud .scene-hud-links img{width:29px;height:29px}}
@media(max-height:610px) and (max-width:390px){.scene-hud .scene-hud-links{margin-top:4px}.scene-hud .scene-hud-links button{min-height:39px;font-size:8px}.scene-hud .scene-hud-links img{width:25px;height:25px}}
body:has(#modal) #modal .modal.character-buffs-dialog{width:min(470px,100%)!important;max-width:470px!important;max-height:var(--scene-storage-popup-height,75dvh)!important;overflow:hidden!important}
#modal .character-buffs-dialog .modal-scroll-body{min-height:0;overflow-y:auto}
body:has(#modal) #modal .modal.character-buffs-dialog :is(.buff-card,.buff-empty){border:0!important;box-shadow:none!important;background:var(--game-popup-raised,#1c4355)!important}
#modal .character-buffs-dialog .buff-card{--buff-accent:#ffd166;grid-template-columns:48px minmax(0,1fr);gap:10px;padding:13px}
#modal .character-buffs-dialog .buff-art{width:48px;height:54px;background:transparent;border:0;box-shadow:none}
#modal .character-buffs-dialog .buff-art>*{width:46px!important;height:46px!important}
#modal .character-buffs-dialog .buff-effect strong{font-size:22px}
.character-three,.character-three>.creator-three{position:absolute;inset:0;width:100%;height:100%}
.character-three .creator-three canvas{display:block;width:100%;height:100%;pointer-events:none;cursor:default}
#survivor-model-stage .character-three .creator-three canvas{pointer-events:auto;touch-action:pan-y;cursor:grab}
.dock-character-art>.dock-model-portrait{display:block;position:absolute;inset:0;width:100%;height:100%;object-fit:contain;border-radius:50%;pointer-events:none;}
#survivor-model-stage:has([data-character-three])>.character-composition{inset:0!important;height:100%!important;translate:none!important}
/* Keep the 3D survivor and companion on the same ground line. */
#survivor-model-stage .character-composition:has(>.character-pet)>.character-three{z-index:2}
#survivor-model-stage .character-composition:has(>.character-three[data-preview-state="ready"])::before,
#survivor-model-stage .character-composition:has(>.character-three[data-preview-state="ready"])::after{content:"";position:absolute;z-index:0;width:var(--profile-foot-shadow-width,56px);height:var(--profile-foot-shadow-height,18px);transform:translate(-50%,-50%);pointer-events:none;background:radial-gradient(ellipse,#111a17a8 0%,#111a176e 28%,#111a1728 54%,transparent 73%)}
#survivor-model-stage .character-composition:has(>.character-three)::before{left:var(--profile-left-foot-x,45%);top:var(--profile-left-foot-y,75%)}
#survivor-model-stage .character-composition:has(>.character-three)::after{left:var(--profile-right-foot-x,55%);top:var(--profile-right-foot-y,75%)}
#survivor-model-stage .character-composition:has(>.character-three)>.character-pet{visibility:var(--profile-pet-visibility,hidden);left:calc(var(--profile-centre-x,50%) + var(--profile-pet-size,140px)*.25);top:calc(var(--profile-feet-y,70%) - var(--profile-pet-size,140px)*.94 - var(--profile-pet-depth,26px));bottom:auto;width:var(--profile-pet-size,140px);height:var(--profile-pet-size,140px)}
#survivor-model-stage .character-composition:has(>.character-three)>.character-pet[data-rive-mount="ready"]>canvas{visibility:inherit}
/* Fine alpha-contour ink works for both animated Rive companions and still art. */
#survivor-model-stage .character-pet>:is(img,canvas,svg){filter:drop-shadow(.7px 0 0 #080a0b) drop-shadow(-.7px 0 0 #080a0b) drop-shadow(0 .7px 0 #080a0b) drop-shadow(0 -.7px 0 #080a0b)}
.survivor-creator:has(.creator-three) .creator-scene>#creator-portrait{inset:0;height:100%;width:100%;transform:none;overflow:hidden;transition:opacity .45s ease}
/* The 3D camp fills the screen behind the floating login header and form. */
.survivor-creator.is-account-open:has(.is-login-sheet:not([hidden])) .creator-scene>#creator-portrait:has(.creator-three){inset:0;height:100%;width:100%;}
.survivor-creator .creator-scene{background:#142d38}
.survivor-creator:is(.is-entry,.is-account-open:has(.is-login-sheet:not([hidden]))) #creator-portrait{visibility:hidden}
.survivor-creator.is-entry .creator-entry{justify-content:center;gap:clamp(36px,8dvh,76px);padding:calc(40px + env(safe-area-inset-top,0px)) 20px calc(32px + env(safe-area-inset-bottom,0px))}
.survivor-creator.is-wardrobe-layout:has(.creator-three){height:100dvh;min-height:0;}
.survivor-creator.is-wardrobe-layout .creator-three canvas{pointer-events:auto;touch-action:pan-y;cursor:grab}
.survivor-creator.is-wardrobe-layout.is-face-focus .creator-three canvas{clip-path:inset(0 0 var(--creator-closeup-cut,0px) 0);}
.survivor-creator.is-wardrobe-layout>.creator-controls,.survivor-creator.is-wardrobe-layout .creator-edit-back{background:#142d38!important;border:0!important;}
.survivor-creator.is-wardrobe-layout>.creator-controls{box-shadow:0 18px 60px #071a2780!important;}
/* Categories sit above Randomise as the compact options tray changes height. */
.survivor-creator.is-wardrobe-layout:has(.creator-three)>.creator-controls{display:grid;grid-template-rows:minmax(88px,auto) auto;align-content:start;gap:12px;top:auto;bottom:calc(12px + env(safe-area-inset-bottom,0px));left:10px;right:10px;width:auto;max-width:640px;min-height:0;max-height:none;margin-inline:auto;padding:14px;border-radius:16px;overflow:visible;backdrop-filter:none;}
.survivor-creator.is-wardrobe-layout:has(.creator-three)>.creator-controls>.creator-choice{display:none;grid-area:1/1;}
.survivor-creator.is-wardrobe-layout:has(.creator-three)>.creator-controls>.creator-choice.is-active{display:block;}
.is-wardrobe-layout>.creator-category-tabs{position:absolute;z-index:3;right:0;top:auto;bottom:var(--creator-rail-bottom,220px);display:flex;flex-direction:column;gap:4px;width:66px;max-height:calc(100% - var(--creator-rail-bottom,220px) - 78px);padding:8px;margin:0;box-sizing:border-box;background:#142d38;border:0;border-radius:24px 0 0 24px;box-shadow:0 8px 24px #071a2740;}
.is-wardrobe-layout>.creator-category-tabs button{flex:1 1 auto;min-height:34px;height:clamp(44px,9.4dvh,70px);gap:7px;padding:7px 2px;font-size:9px;border-radius:11px;}
.is-wardrobe-layout>.creator-category-tabs button svg{width:20px;height:20px;}
.is-wardrobe-layout>.creator-category-tabs button[aria-pressed=true]{background:#315061;color:#ffd16b;}
.is-wardrobe-layout>.creator-category-tabs [aria-pressed=true]::after{width:3px;height:auto;left:0;top:25%;bottom:25%;border-radius:3px;}
.is-wardrobe-layout .creator-controls>.creator-random{position:absolute;right:0;top:-38px;min-height:28px;padding:6px 11px;background:#183b49;color:#ffcf72;border:0;border-radius:8px;font-size:9px;font-weight:700;cursor:pointer;}
.is-wardrobe-layout .creator-controls>.creator-random::before{content:'✣';margin-right:5px;}
.is-wardrobe-layout .creator-controls>.creator-footer{position:static;grid-area:2/1;display:flex;justify-content:flex-end;transform:none;translate:none;width:auto;margin:0;padding:0;}
.is-wardrobe-layout .creator-controls>.creator-footer>.public-button{width:auto;min-height:32px;padding:8px 12px;border:0;border-radius:8px;box-shadow:none;font-size:10px;line-height:1.2;}
.is-wardrobe-layout .creator-controls :is(.creator-sex,.creator-options){gap:5px;}
.is-wardrobe-layout .creator-controls :is(.creator-sex,.creator-options)>button{min-height:32px;padding:6px 3px;border:0;border-radius:7px;font-size:9px;line-height:1.25;}
.is-wardrobe-layout .creator-controls .creator-sex>button{font-size:11px;}
.is-wardrobe-layout .creator-controls .creator-sex small{font-size:8px;margin-top:2px;}
.is-wardrobe-layout .creator-controls .creator-choice button[aria-pressed=true]{background:#3b5c6e;color:#ffcf72;}
.is-wardrobe-layout .creator-controls .creator-colours{max-width:none;justify-content:flex-start;gap:6px;margin:10px 0 0;}
.is-wardrobe-layout .creator-controls .creator-colours>span{flex-basis:100%;text-align:left;font-size:8px;line-height:1;margin:0 0 2px;}
.is-wardrobe-layout .creator-controls .creator-swatch{width:32px;height:32px;min-height:32px;flex-basis:32px;border:0;}
.is-wardrobe-layout .creator-controls .creator-swatch[aria-pressed=true]{box-shadow:0 0 0 2px #f5d374;}
.is-wardrobe-layout .creator-controls .creator-beard-group{margin-top:10px;}
.is-wardrobe-layout .creator-controls .creator-subheading{display:block;margin:0 0 5px;font-size:8px;}
@media(max-width:400px){
 .is-wardrobe-layout .creator-controls .creator-colours{gap:5px;}
 .is-wardrobe-layout .creator-controls .creator-swatch{width:30px;height:30px;min-height:30px;flex-basis:30px;}
}
@media(max-width:374px){
 .is-wardrobe-layout .creator-controls .creator-swatch{width:28px;height:28px;min-height:28px;flex-basis:28px;}
 .is-wardrobe-layout .creator-controls .creator-options>button{font-size:8px;}
 .is-wardrobe-layout>.creator-category-tabs{width:60px;padding:6px;}
}
@media(max-height:650px) and (orientation:portrait){
 .is-wardrobe-layout>.creator-category-tabs button{gap:3px;padding:4px 2px;font-size:8px;}
 .is-wardrobe-layout>.creator-category-tabs button svg{width:18px;height:18px;}
}
@media(max-height:500px) and (orientation:landscape){
 .survivor-creator.is-wardrobe-layout:has(.creator-three)>.creator-controls{left:43%;right:80px;bottom:12px;max-height:calc(100dvh - 112px);padding:10px;gap:8px;}
 .is-wardrobe-layout>.creator-category-tabs{top:64px;bottom:auto;width:64px;max-height:none;padding:6px;gap:2px;}
 .is-wardrobe-layout>.creator-category-tabs button{height:44px;gap:3px;}
 .is-wardrobe-layout .creator-controls>.creator-random{top:-32px;}
}
.survivor-creator.is-wardrobe-layout .creator-edit-back{box-shadow:none;}
.survivor-creator.is-wardrobe-layout .creator-scene{inset:0;}
.survivor-creator:has(.creator-three) .creator-scene::after{display:none}
.survivor-creator:has(.creator-three) .creator-controls{box-shadow:0 18px 60px #071a2780;border:0}
.creator-three canvas{touch-action:pan-y;cursor:grab;user-select:none}
.survivor-creator .creator-colours{flex-wrap:wrap;gap:9px;max-width:420px;margin-inline:auto;}
.survivor-creator .creator-colours>span{flex-basis:100%;text-align:center;margin:0;}
.creator-three canvas.is-rotating{cursor:grabbing}
.creator-three canvas:focus-visible{outline:3px solid #e8c576;outline-offset:-3px}

/* One auth palette, shared with game dialogs. Both wardrobe entry points use
   the layout above; signup and account entry use the homestead illustration. */
.auth-site,.survivor-creator{--game-popup-bg:#122e3b;--game-popup-raised:#1c4355;--auth-text:#e8f0f0;--auth-muted:#acc0c6;--auth-accent:#ffd166;}
.public-site.auth-site{background:linear-gradient(#10263135,#10263170),url('assets/Current/scenes/entry/login-homestead-v3.webp') center/cover fixed;color:var(--auth-text);}
.survivor-creator.is-wardrobe-layout{height:100dvh;min-height:0;}
.survivor-creator .creator-scene{background:linear-gradient(#10263135,#10263170),url('assets/Current/scenes/entry/login-homestead-v3.webp') center/cover no-repeat;}
.survivor-creator:is(.is-entry,.is-account-open)>.creator-category-tabs{visibility:hidden;pointer-events:none;}
.survivor-creator.is-account-open #creator-portrait{visibility:hidden;}
.survivor-creator .creator-entry-actions,
.survivor-creator.is-wardrobe-layout>.creator-controls,
.survivor-creator>.creator-journey-stage:not([hidden]),
.survivor-creator>.guest-profile-sheet,
body:has(.public-site) .public-site.auth-site .account-card{
 background:var(--game-popup-bg)!important;color:var(--auth-text);border:0!important;border-radius:18px;box-shadow:0 14px 34px #04131c66!important;
}
.public-site.auth-site .survivor-creator .creator-journey-stage .account-card{background:transparent!important;box-shadow:none!important;}
.survivor-creator.is-wardrobe-layout>.creator-category-tabs{background:var(--game-popup-bg);}
.survivor-creator .creator-entry-actions>[data-entry-login],
.survivor-creator.is-wardrobe-layout .creator-controls :is(.creator-sex,.creator-options)>button,
.survivor-creator.is-wardrobe-layout>.creator-category-tabs button[aria-pressed=true],
.survivor-creator.is-wardrobe-layout .creator-controls>.creator-random,
.survivor-creator .creator-home-back,.survivor-creator .creator-icon-back,
.survivor-creator .creator-heading>a,.survivor-creator .creator-edit-back,.survivor-creator .guest-creator-cancel,
.public-site.auth-site .account-card :is(input,select),.survivor-creator .guest-profile-sheet input,
.survivor-creator .journey-modes button,.survivor-creator .journey-mode-copy,
.survivor-creator .auth-google-summary{
 background:var(--game-popup-raised)!important;color:var(--auth-text);border:0!important;box-shadow:none!important;
}
.survivor-creator .creator-entry-actions>[data-entry-login]{color:var(--auth-text)!important;}
.survivor-creator.is-wardrobe-layout>.creator-category-tabs button[aria-pressed=true]{color:var(--auth-accent);}
.survivor-creator.is-wardrobe-layout .creator-heading>.game-back-control{background:var(--game-popup-raised)!important;color:var(--auth-text)!important;}
.survivor-creator .creator-journey-stage.is-login-sheet .login-guest-link{background:var(--game-popup-bg);border-radius:10px;padding:8px 10px;color:var(--auth-accent);}
.survivor-creator .creator-choice button[aria-pressed=true],.survivor-creator .journey-modes button[aria-pressed=true]{color:var(--auth-accent)!important;}
.survivor-creator .creator-controls :is(.creator-sex,.creator-options)>button[aria-pressed=true]{background:#2c5260!important;}
.survivor-creator .journey-modes button[aria-pressed=true]{background:#2c5260!important;}
.public-site.auth-site .account-card :is(label,small,p),.survivor-creator .creator-colours>span{color:var(--auth-muted);}
.public-site.auth-site .account-card input::placeholder{color:var(--auth-muted);opacity:1;}
.public-site.auth-site :is(.account-error,#name-availability[data-state=error]){color:#ff9c96!important;}
.public-site.auth-site :is(#reset-feedback,#verification-feedback):not(:empty){background:var(--game-popup-raised);border:0;color:var(--auth-text);}
.public-site.auth-site :is(.public-button,.auth-method-email),.survivor-creator .creator-footer>.public-button{background:linear-gradient(#ffd76b,#ffc03d);border:0!important;color:#102631;box-shadow:0 3px 0 #bf8b2f;}
.public-site.auth-site :is(.public-button,.auth-method-email):hover{background:linear-gradient(#ffe18b,#ffd166);}
.public-site.auth-site :is(.forgot-password-link,.text-button,.creator-account-text),.survivor-creator .creator-random{color:var(--auth-accent);}
.public-site.auth-site :is(input,button,a):focus-visible,.survivor-creator :is(button,a):focus-visible{outline:2px solid var(--auth-accent)!important;outline-offset:3px;}
#app .public-site.auth-site :is(input,button,a):focus-visible,#app .survivor-creator :is(input,button,a):focus-visible{outline:2px solid var(--auth-accent)!important;outline-offset:3px;box-shadow:none!important;}
.survivor-creator .creator-entry-actions{width:min(100%,440px);}
/* Centre the email card at every viewport size, allowing the sheet itself to
   scroll on short screens and when a phone keyboard reduces the viewport. */
.survivor-creator>.creator-journey-stage.is-login-sheet:not([hidden]){
 position:absolute;inset:0;width:100%;height:100%;max-height:none;margin:0;padding:80px 20px max(24px,env(safe-area-inset-bottom));
 display:flex;align-items:safe center;justify-content:center;overflow-y:auto;box-sizing:border-box;
 background:transparent!important;box-shadow:none!important;border-radius:0;
}
.survivor-creator>.creator-journey-stage.is-login-sheet .account-layout{
 width:min(100%,440px);max-width:440px;min-height:0;flex:0 0 auto;display:block;margin:auto;padding:22px;
 background:var(--game-popup-bg);border-radius:18px;box-shadow:0 14px 34px #04131c66;
}
.survivor-creator>.creator-journey-stage.is-login-sheet .account-card{width:100%;padding:0;}
.survivor-creator>.creator-journey-stage.is-login-sheet .account-story{display:none;}
.survivor-creator>.creator-journey-stage.is-login-sheet .account-card input{background:var(--game-popup-raised)!important;}
.survivor-creator>.creator-journey-stage:not(.is-login-sheet){width:min(440px,calc(100% - 40px));max-height:calc(100dvh - 120px);}
.public-site.auth-site.recovery-site .public-nav{background:transparent;border:0;box-shadow:none;}
.public-site.auth-site.recovery-site>.account-layout{width:min(100%,500px);min-height:calc(100dvh - 86px);padding:24px 20px;display:flex;flex-direction:column;justify-content:center;gap:0;box-sizing:border-box;}
.public-site.auth-site.recovery-site .account-story{display:none;}
.public-site.auth-site.recovery-site .account-card{max-width:none;width:100%;box-sizing:border-box;}
@media(max-height:500px){
 .survivor-creator>.creator-journey-stage.is-login-sheet:not([hidden]){padding-top:76px;padding-bottom:20px;}
 .survivor-creator.is-entry .creator-entry{gap:16px;padding-top:60px;padding-bottom:16px;overflow-y:auto;}
 .survivor-creator.is-entry .creator-entry>img{max-height:72px;}
}
.three-review-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin:16px auto 22px;padding:0 14px}
.three-review-actions a,.three-review-actions button{border:0;border-radius:12px;background:#23424e;color:#e2eceb;padding:12px 18px;text-decoration:none;font:600 13px inherit;cursor:pointer}
.three-review-actions a:nth-child(2){background:#f3c967;color:#172f38}
.review-page{min-height:100dvh;margin:0;display:grid;place-items:center;background:linear-gradient(#0c2029bb,#0c2029ee);color:#e5eded;font-family:Arial,sans-serif}
.review-card{width:min(500px,calc(100% - 40px));padding:28px;box-sizing:border-box;background:#183440ed;border-radius:24px;box-shadow:0 18px 70px #0005}
.review-card small{color:#e7c17b;letter-spacing:2px}.review-card h1{font-size:32px;margin:14px 0}.review-card p{color:#b7cbcf;line-height:1.6}
.review-links{display:grid;gap:12px;margin-top:24px}.review-links a,.review-links button{display:block;text-align:left;border:0;border-radius:14px;background:#294956;color:#edf4f2;padding:18px;text-decoration:none;font-size:16px;cursor:pointer}.review-links span{display:block;font-size:12px;margin-top:6px;color:#bacdd0}.review-links a:first-child{background:#e9c16e;color:#19303a}.review-links a:first-child span{color:#344b51}
.battle-back{color:inherit;padding:10px;text-decoration:none}
body:has(#world) .topbar .brand h1{font-size:22px}body:has(#world) #intro{display:none}body:has(#world) #menu-toggle{display:none}body:has(#world) .topbar nav>button{display:none}body:has(#world) .topbar nav{display:flex}body:has(#world) #status{display:none}
body:has(#world) button,body:has(#world) .panel,body:has(#world) .health-track{border:0;outline:0}
a:focus-visible,button:focus-visible{outline:3px solid #e8c576;outline-offset:3px}

body:has(#world) footer>span{display:none}body:has(#world) #encounter-counter{top:104px;left:22px}
/* A quiet blue stage leaves room for future 3D scene props. */
body:has(#app .workspace):has(.survivor-stage){background-color:#0e2d3d!important;background-image:radial-gradient(ellipse 75% 48% at 50% 49%,#2a536674,transparent 78%),linear-gradient(180deg,#102b3d 0%,#173b4d 53%,#0b2534 100%)!important;background-position:center!important;background-size:cover!important;background-repeat:no-repeat!important;background-attachment:fixed!important}
body:has(#app .workspace):has(.survivor-stage)::after{content:none!important;background-image:none!important}
#app:has(.workspace) .main-content[data-page="character"]:has(.survivor-stage){background-image:none!important;background-color:transparent!important}
/* Solid dock-blue surfaces keep the profile header clear against the artwork. */
#app .character-rpg .survivor-stage :is(.dossier-level,.character-activity-status,.mobile-character-actions,.desktop-character-buffs>button){background:#142d38!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;filter:none!important}
.character-rpg .survivor-stage .dossier-level::before,.character-rpg .survivor-stage .dossier-level::after{display:none!important}
.character-rpg .mobile-character-actions .character-shortcut-art{background:transparent!important;box-shadow:none!important}
.character-rpg .mobile-character-actions .character-action-glyph{filter:none!important}
.character-rpg .survivor-stage .dossier-level :is(span,b,strong){text-shadow:none!important}
/* The three profile actions form a larger rail attached to the right screen edge. */
@media(max-width:800px){
 #app .character-rpg .mobile-character-actions{position:fixed;right:0!important;top:50dvh!important;bottom:auto!important;transform:translateY(-50%)!important;translate:none!important;flex-direction:column;align-items:stretch;justify-content:center;width:clamp(48px,16vw,68px);max-height:calc(100dvh - 130px)!important;box-sizing:border-box;padding:8px 2px!important;gap:2px!important;border-radius:24px 0 0 24px;}
 #app .mobile-character-actions .character-shortcut>button{width:100%!important;height:clamp(46px,15.3vw,66px)!important;max-height:none!important;gap:4px!important;padding:4px 0!important;}
 #app .mobile-character-actions :is(.character-shortcut-art,.character-equipment-icon){width:clamp(30px,9vw,38px)!important;height:clamp(30px,9vw,38px)!important;}
 #app .mobile-character-actions .character-action-glyph{width:clamp(24px,7vw,30px);height:clamp(24px,7vw,30px);}
 #app .mobile-character-actions .character-action-label{font-size:clamp(7px,2.1vw,9px);}
}
@media(max-width:800px) and (max-height:500px){
 #app .mobile-character-actions .character-shortcut>button{height:46px!important;gap:2px!important;}
 #app .mobile-character-actions .character-shortcut-art{width:28px!important;height:28px!important;}
 #app .mobile-character-actions .character-action-glyph{width:24px;height:24px;}
}
@media(max-width:800px){
 body.has-opening-tour:has(#opening-tour-host:not([hidden]):not(.opening-note-dismissed)) #app .character-rpg .mobile-character-actions{top:auto!important;bottom:calc(var(--app-dock-height,0px) + var(--opening-guide-height,85px) + env(safe-area-inset-bottom,0px) + 24px)!important;transform:none!important;}
}

/* One independent finish toggle for the three shirt cuts. */
.survivor-creator .creator-shirt-finish{display:flex;justify-content:flex-end;margin-top:8px;}
.survivor-creator .creator-rip-toggle{display:flex;align-items:center;gap:9px;min-height:32px;padding:5px 9px;border:0;box-shadow:none;border-radius:8px;background:#213e4c;color:#d5e3e9;font-size:11px;font-weight:700;cursor:pointer;}
.survivor-creator .creator-toggle-track{display:block;width:30px;height:18px;padding:3px;box-sizing:border-box;border:0;border-radius:12px;background:#526d79;}
.survivor-creator .creator-toggle-track::after{content:'';display:block;width:12px;height:12px;border-radius:50%;background:#e4ecee;transition:transform .15s;}
.survivor-creator .creator-rip-toggle[aria-pressed=true] .creator-toggle-track{background:#edbc4f;}
.survivor-creator .creator-rip-toggle[aria-pressed=true] .creator-toggle-track::after{transform:translateX(12px);background:#18333f;}
.survivor-creator [data-look-panel=shirt]>.creator-options{grid-template-columns:repeat(3,minmax(0,1fr));}
@media(prefers-reduced-motion:reduce){.survivor-creator .creator-toggle-track::after{transition:none;}}
#app .mobile-character-actions .character-equipment-icon .character-broken-label{right:-7px;top:-11px;transform:none;z-index:3;padding:5px 6px;border-radius:7px;font-size:8px;font-weight:400;line-height:1;}
.character-pet-scrapheap svg{display:block;width:100%;height:100%;filter:drop-shadow(0 8px 5px #06131b77);}
/* Shared overlay navigation; page content keeps the entire viewport. */
body:has(#app .workspace){--app-dock-height:0px!important}

#app>.workspace{margin-left:0!important;width:100%!important}
.navigation-toggle{position:fixed;right:12px;top:calc(8px + env(safe-area-inset-top,0px));z-index:950;width:48px;height:48px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:4px 0 3px;border:0;border-radius:12px;background:var(--game-popup-bg,#122e3b);color:#e5ece7;box-shadow:0 4px 16px #06151d55;cursor:pointer}
.navigation-toggle svg{display:block;flex:none}
.navigation-toggle span{display:block;color:#c4d7dc;font-size:8px;font-weight:400;line-height:1;letter-spacing:.08em}
body:has(:is(.scene-panel-layer:not([hidden]),#modal:not(:empty),#level-celebration,.base3d-build-overlay:not([hidden]),.navigation-overlay.is-open)) #app .navigation-shell>.navigation-toggle{display:none!important}
.navigation-toggle:focus-visible,.navigation-panel button:focus-visible{outline:2px solid #efc876;outline-offset:3px}
.navigation-overlay{position:fixed;inset:0;z-index:21000;visibility:hidden;pointer-events:none;transition:visibility 0s linear .38s}
.navigation-overlay.is-open{visibility:visible;pointer-events:auto;transition-delay:0s}
#app .navigation-scrim{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0;background:#061923a6;-webkit-backdrop-filter:blur(8px) saturate(.45);backdrop-filter:blur(8px) saturate(.45);opacity:0;transition:opacity 0s linear .38s;cursor:pointer}
#app .navigation-overlay.is-open .navigation-scrim{opacity:1;transition-delay:0s}
.navigation-panel{display:flex;flex-direction:column;position:absolute;inset:0 0 0 auto;width:min(360px,88vw);height:100%;overflow-y:auto;overscroll-behavior:contain;padding:calc(16px + env(safe-area-inset-top,0px)) 18px calc(22px + env(safe-area-inset-bottom,0px));box-sizing:border-box;background:var(--game-popup-bg,#122e3b);box-shadow:inset 0 4px 0 #ffd16b,-12px 0 40px #04141a66;color:#e5eeed;transform:translate3d(105%,0,0);transition:transform .38s cubic-bezier(.35,.02,.7,.28)}
.navigation-overlay.is-open .navigation-panel{transform:translate3d(0,0,0);transition-timing-function:cubic-bezier(.18,.82,.22,1)}
.navigation-panel header{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;color:#f1c66d;font-size:11px;font-weight:800;letter-spacing:1px}
.navigation-panel button{border:0;box-shadow:none;cursor:pointer}
.navigation-panel header button{width:36px;height:36px;border-radius:11px;background:var(--game-popup-raised,#1c4355);color:#edf4f1;font-size:25px;padding:0}
.navigation-character{display:grid;grid-template-columns:48px minmax(0,1fr);align-items:center;gap:12px;width:100%;min-height:64px;padding:0;margin-bottom:18px;overflow:hidden;background:var(--game-popup-raised,#1c4355);border-radius:16px;color:inherit;text-align:left}
.navigation-character .dock-base-art{position:relative;display:block;width:48px;height:64px;min-height:64px;overflow:hidden;border-radius:0;background:#264851;box-shadow:none}
.navigation-character .dock-model-portrait{width:100%;height:100%;object-fit:cover;border-radius:0}
.navigation-character :is(.male-rive-dock,.female-rive-dock){display:block;position:absolute;inset:0}
.navigation-character canvas{width:100%!important;height:100%!important;transform:translateY(5%) scale(1.8);transform-origin:50% 0;pointer-events:none}
.navigation-vitals{display:grid;align-content:center;gap:6px;min-width:0;padding:12px 10px 12px 0}
.navigation-vitals>strong{font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#ffe0a1}
.navigation-vitals>small{font-size:10px;color:#b5c9ce}
.navigation-panel nav{display:grid;gap:7px}
.navigation-panel nav>button{display:flex;align-items:center;gap:13px;min-height:48px;padding:10px 13px;border-radius:12px;background:var(--game-popup-raised,#1c4355);color:#e1eeee;text-align:left;font-size:14px;position:relative}
.navigation-panel nav>button[aria-current=page]{background:#315e70;color:#ffe3a3}
.navigation-panel nav>button>:is(.collection-signal,.navigation-unread){position:static;inset:auto;flex:0 0 8px;align-self:center;margin:0 0 0 -5px;transform:none}
.navigation-panel nav>button>b{margin-left:auto;font-size:22px;font-weight:400;color:#9bb7c2}

.navigation-panel button:hover{filter:brightness(1.12)}

@media(prefers-reduced-motion:reduce){.navigation-overlay,.navigation-scrim,.navigation-panel{transition:none!important}}
.reduce-motion .navigation-overlay,.reduce-motion .navigation-scrim,.reduce-motion .navigation-panel{transition:none!important}
body:has(#app .workspace) .main-content{padding-bottom:env(safe-area-inset-bottom,0px)!important}
body:has(#app .workspace) .header-shell .more-wrapper{display:none!important}
body:has(#app .workspace) .app-page-heading{padding-right:70px!important}
body:has(#app .workspace) .app-page-heading>button{display:none!important}
body:has(#app .workspace) .header-shell .activity-bar{right:64px!important;width:auto!important;border:0!important}
body:has(#app .workspace) .storage-view{bottom:0!important}
body:has(#app .workspace) .player-profile-body{padding-bottom:env(safe-area-inset-bottom,0px)!important}
@media(max-width:800px){
 body:has(#app .workspace) .main-content{min-height:100dvh!important}
 body:has(#app .workspace):has(.survivor-stage) .main-content{bottom:0!important;inset-block-end:0!important;padding-bottom:0!important}
 body:has(#app .workspace) .character-rpg .survivor-scene{height:100dvh!important}
 body:has(#app .workspace) .world-map-screen{bottom:0!important}
}
body:has(#app .workspace) .world-map-screen{left:0!important}
body:has(#app .workspace) .faction-member-hero{padding-right:64px}
/* Reserve a consistent header lane and keep the task controls at the bottom. */
.navigation-panel header button{display:grid;place-items:center;line-height:1;padding:0!important;font-family:Arial,sans-serif}
.navigation-panel header button svg{display:block;width:18px;height:18px}
.navigation-panel header{font-size:10px;letter-spacing:.65px}
body:has(#app .workspace) .header-shell .activity-bar{position:fixed!important;inset:auto 0 0 0!important;top:auto!important;right:0!important;bottom:0!important;left:0!important;width:100%!important;box-sizing:border-box;height:calc(58px + env(safe-area-inset-bottom,0px))!important;min-height:58px!important;padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px))!important;border:0!important;border-radius:14px 14px 0 0!important;background:#102b36!important;box-shadow:0 -5px 20px #04131b55!important;z-index:900}
body:has(#app .workspace) .main-content{padding-bottom:var(--activity-bottom-clearance,0px)!important}
body:has(#app .workspace) .storage-view{bottom:var(--activity-bottom-clearance,0px)!important}
@media(max-width:800px){
 body:has(#app .workspace) #app .main-content:not(.scene-panel-content):not([data-page="base"]):not([data-page="character"]):not([data-page="collections"]):not([data-page="expedition-map"]):not(:has(#trader-shop)):not(:has(.faction-preview[data-faction-screen="member"])){padding-top:calc(56px + env(safe-area-inset-top,0px))!important;top:0!important}
 body:has(#app .workspace) #app .main-content:not(.scene-panel-content)>.storage-view{top:calc(56px + env(safe-area-inset-top,0px))!important}
 body:has(#app .workspace) #app .main-content[data-page="guild"]:not(.scene-panel-content):not(:has(.faction-preview[data-faction-screen="member"])){padding-top:calc(56px + env(safe-area-inset-top,0px))!important}
 body:has(#app .workspace) #app .faction-member-hero{padding-right:12px}
 body:has(#app .workspace) #app .main-content[data-page="activities"]:not(.scene-panel-content){padding-top:calc(56px + env(safe-area-inset-top,0px))!important}
 body:has(#app .workspace) .character-rpg .survivor-scene{height:calc(100dvh - var(--activity-bottom-clearance,0px))!important}
 body:has(#app .workspace) .world-map-screen{bottom:var(--activity-bottom-clearance,0px)!important}
}
/* Paused task: one clear primary action, calm secondary actions. */
#modal .modal.task-pause-panel{padding:28px 24px 18px!important;border:0!important;border-radius:22px!important;box-shadow:0 16px 60px #020d1355}
#modal .task-pause-panel>.eyebrow{margin:0 48px 10px 0;font-size:10px;letter-spacing:1.7px;color:#d7b974;line-height:1.4}
#modal .task-pause-panel>h2{margin:0 40px 12px 0;font-size:22px;line-height:1.25;color:#edf2ed}
#modal .task-pause-panel>p{margin:0 0 24px;color:#a9c1ca;font-size:13px;line-height:1.65;max-width:40ch}
#modal .task-pause-panel .task-pause-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:10px!important;align-items:stretch}
#modal .task-pause-panel .task-pause-actions>button{min-height:46px;margin:0;padding:12px 14px;border:0!important;border-radius:12px;font-size:13px;font-weight:700;box-shadow:none!important}
#modal .task-pause-panel [data-action="resume-task"]{background:#ffd16b;color:#26313a}
#modal .task-pause-panel .pause-cancel{background:#294854;color:#deebed}
#modal .task-pause-panel .pause-cancel:hover{background:#365966}
#modal .task-pause-panel [data-action="keep-task-paused"]{grid-column:1/-1;min-height:38px!important;padding:8px!important;background:transparent;color:#b7cbd0;font-size:12px;font-weight:500}
#modal .task-pause-panel .modal-close{display:grid;place-items:center;top:14px;right:14px;width:34px;height:34px;padding:0!important;border:0!important;border-radius:10px;background:#23424e;color:#c6d9df;font:24px/1 Arial,sans-serif}
@media(max-width:800px){#modal .modal.task-pause-panel{border-radius:22px 22px 0 0!important;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))!important}}

/* A quiet account action below the primary menu, including phone safe areas. */
.navigation-panel>header,.navigation-panel>.navigation-survivor,.navigation-panel>nav,.navigation-panel>.navigation-footer{flex-shrink:0}
.navigation-panel .navigation-footer{margin-top:auto;padding-top:28px;display:flex;justify-content:center}
#app .navigation-panel .navigation-logout{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border:0;border-radius:12px;background:#56343c;color:#ffd7d9;font-size:13px;font-weight:700;line-height:20px;box-shadow:none}
#app .navigation-panel .navigation-logout:hover{background:#6b3c46;filter:none}
#app .navigation-panel .navigation-logout:active{background:#79414c}
.navigation-logout svg{flex:none}

/* Compact, text-only skill overview in the More menu. */
.navigation-panel{scrollbar-width:none}
.navigation-panel::-webkit-scrollbar{display:none}
.navigation-survivor{flex-shrink:0;margin:0 0 18px;padding:8px;border-radius:16px;background:var(--game-popup-raised,#1c4355)}
.navigation-survivor .navigation-character{min-height:52px;margin:0 0 8px;gap:10px;border-radius:10px;background:transparent}
.navigation-survivor .dock-base-art{height:52px;min-height:52px;border-radius:9px;background:transparent}
.navigation-survivor .navigation-vitals{gap:4px;padding:6px 4px 6px 0}
.navigation-survivor .navigation-skills{margin:0}
#app .navigation-survivor .navigation-skill{background:var(--game-popup-bg,#122e3b)}
#app .navigation-survivor .navigation-skill-total{background:#173644}
#app .navigation-panel .navigation-sound{display:flex;align-items:center;gap:8px;flex-shrink:0;align-self:flex-end;width:auto;min-height:44px;margin:9px 0 0 auto;padding:6px 12px;border:0;border-radius:12px;background:transparent;color:#acc0c6;font-size:12px;font-weight:650;text-align:left;box-shadow:none}
.navigation-sound-icon{display:flex;align-items:center}
.navigation-sound-icon svg{width:18px;height:18px}
.navigation-sound-track{display:block;flex:none;width:34px;height:20px;padding:3px;box-sizing:border-box;border-radius:12px;background:#365766;transition:background .18s ease}
.navigation-sound-track i{display:block;width:14px;height:14px;border-radius:50%;background:#d2e0e4;transition:transform .18s ease}
.navigation-sound[aria-checked=true] .navigation-sound-track{background:#efc46e}
.navigation-sound[aria-checked=true] .navigation-sound-track i{background:#122e3b;transform:translateX(14px)}
.navigation-sound[aria-checked=true] .navigation-sound-icon{color:#efc46e}
@media(prefers-reduced-motion:reduce){.navigation-sound-track,.navigation-sound-track i{transition:none}}
.reduce-motion .navigation-sound-track,.reduce-motion .navigation-sound-track i{transition:none}
.navigation-skill-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
#app .navigation-skill{display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:center;gap:4px;min-width:0;min-height:54px;margin:0;padding:6px 5px;border:0;border-radius:9px;background:var(--game-popup-raised,#1c4355);color:#e8f0f0;text-align:left;box-shadow:none;font-size:10px;line-height:14px}
.navigation-skill>span:first-child{grid-column:1/-1;white-space:nowrap;font-size:9px;letter-spacing:-.2px}
.navigation-skill>.skill-icon{grid-column:1;grid-row:2;width:24px;height:24px;object-fit:contain;image-rendering:auto}
.navigation-skill>strong{grid-column:2;grid-row:2;align-self:center;color:#ffd166;font-size:14px;line-height:16px;font-variant-numeric:tabular-nums}
.navigation-skill-progress{grid-column:1/-1;display:block;height:4px;overflow:hidden;border-radius:3px;background:#0c2531}
.navigation-skill-progress>i{display:block;height:100%;border-radius:inherit;background:#e6bc68}
#app .navigation-skill-total{background:#193846}
.navigation-skill-total>strong{grid-column:1/-1;color:#ffe3a4}
body #modal .modal-backdrop.navigation-skill-backdrop{align-items:center;justify-content:center;padding:16px}
body #modal .character-skills-drawer.navigation-skill-popup{width:min(560px,100%);max-width:560px;height:auto;max-height:calc(100dvh - 32px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));margin:0;border:0;border-radius:20px;animation:none}
body #modal .navigation-skill-popup .modal-fixed-head{padding:16px 18px}
body #modal .navigation-skill-popup .modal-fixed-head h2{font-size:20px}
body #modal .navigation-skill-popup .modal-scroll-body{padding:12px 16px 20px;scrollbar-width:none}
body #modal .navigation-skill-popup .modal-scroll-body::-webkit-scrollbar{display:none}

