/* One viewport, one scene. Menu controls belong to the game world. */
html,body{width:100%;height:100%;overflow:hidden;background:#06152B}
.app-shell:not(.in-game){position:relative;max-width:none;padding:0!important;height:100dvh}
.game-menu{display:block;position:relative;width:100%;height:100dvh;min-height:0;padding:0;overflow:hidden}
.menu-screen{position:relative;width:100%;height:100%;overflow:hidden;animation:menu-in .35s ease-out}
.site-footer{display:none}
.app-shell:not(.in-game)>.site-header{position:absolute;z-index:40;right:max(22px,env(safe-area-inset-right));top:max(18px,env(safe-area-inset-top));height:40px;border:0;gap:0;color:#D9E9FF}
.site-header .wordmark,.site-header .powered{display:none}
.header-right{gap:8px}.site-header .icon-button{width:40px;height:40px;border-radius:7px;background:#081B30D9;color:#F0E7D9;border-color:#9CB8D855;box-shadow:inset 0 1px 0 #FFFFFF15}
.site-header .icon-button:hover{background:#143957}.site-header .mute-line{background:#F3B37B}.demo-badge{color:#BFD0E2;border-color:#8BA1BB33;background:#06152B80;font-size:9px}
body[data-menu-screen="hub"] .site-header{display:none}
.home-screen{isolation:isolate;background:#071B31;color:#FFF6E6}
.title-world,.title-world picture,.title-backdrop,.title-shade{position:absolute;inset:0;width:100%;height:100%}
.title-backdrop{object-fit:cover;object-position:center 52%}
.title-shade{background:linear-gradient(#06152B33,transparent 28%,transparent 72%,#06152BF2),radial-gradient(ellipse at 50% 45%,#06152B88,transparent 55%)}
.title-copy{position:absolute;z-index:2;top:48%;left:50%;transform:translate(-50%,-50%);width:min(450px,43vw);text-align:center}
.title-kicker{display:block;color:#D6BA91;font:800 9px/1.5 var(--heading);letter-spacing:2.1px;text-align:center}
.game-title{margin:16px -35px 20px;font-family:var(--heading);font-weight:800;font-style:italic;letter-spacing:-3px;line-height:.88;transform:rotate(-3deg);color:#FFF2D0;filter:drop-shadow(0 7px 12px #020D1DE6);text-shadow:1px 1px 0 #9C591F,2px 2px 0 #9C591F,3px 3px 0 #9C591F,4px 4px 0 #082642,6px 7px 0 #082642}
.title-first{display:block;font-size:clamp(38px,4.9vw,73px);letter-spacing:-2.8px}
.title-last{display:block;font-size:clamp(84px,10.6vw,155px);color:#FFAE64;margin-top:1px;letter-spacing:-8px;text-shadow:1px 1px 0 #9F421C,2px 2px 0 #9F421C,3px 3px 0 #9F421C,4px 4px 0 #9F421C,5px 5px 0 #082642,7px 8px 0 #082642}
.title-de{display:inline-block;vertical-align:middle;font-size:.24em;letter-spacing:-.5px;transform:rotate(-90deg);color:#FFF2D0;margin-right:-.1em}.title-period{color:#238CFF}
.game-slogan{font-size:12px;line-height:1.6;color:#F4E2C5;margin:20px -20px 21px;text-shadow:0 2px 4px #06152B}
.game-slogan strong{font-weight:500;color:#D4E2F3}
.main-actions{display:grid;gap:9px;max-width:360px;margin:auto}
.menu-action{position:relative;display:flex;justify-content:center;align-items:center;gap:12px;min-height:51px;border:1px solid #839DB865;background:linear-gradient(#183C59F5,#102840F5);color:#EBE6D9;border-radius:5px;text-align:center;padding:10px 18px;font:800 13px var(--heading);letter-spacing:1.1px;box-shadow:0 3px 0 #030D1C,inset 0 1px 0 #FFFFFF14;transition:background .14s,border-color .14s,translate .14s}
.menu-action.primary{min-height:58px;background:linear-gradient(#FFAD65,#F37535);border:1px solid #FFD39A;color:#14273A;box-shadow:0 4px 0 #933C1D,inset 0 1px 0 #FFE4BC;font-size:15px}
.menu-action:hover:not(:disabled),.menu-action:focus-visible{background:linear-gradient(#245575,#153653);border-color:#BFD8EF;translate:0 -1px}
.main-actions .menu-action.primary:is(:hover,:focus-visible):not(:disabled){background:linear-gradient(#FFC17E,#FF8A44);border-color:#FFE7C4;color:#14273A}
.home-screen .menu-action:focus-visible{outline:2px solid #FFD49A;outline-offset:4px}
.menu-action:disabled{opacity:.5;box-shadow:none}
.menu-action small{display:block;font:400 9px/1.5 var(--body);letter-spacing:0;margin-top:4px;color:#BED0E3}
.menu-action svg{width:21px;height:21px;position:absolute;left:17px}
.menu-caret{position:absolute;right:17px;font-size:18px;font-weight:400;opacity:.7}
.menu-secondary{display:grid;grid-template-columns:1fr 1fr;gap:9px}.menu-secondary .menu-action{min-height:42px;font-size:10px;letter-spacing:1px}
.menu-account{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;margin:17px auto 0;font-size:9px;color:#94B1CB}
.menu-account>button{padding:4px 0;background:none;font:600 10px var(--body);color:#E0D7C7;text-decoration:underline;text-underline-offset:3px}
.menu-account>span:last-child{flex-basis:100%;font-size:9px}.menu-account .little-dot{width:5px;height:5px;margin:0}
#storage-warning{margin:8px auto 0;max-width:360px;font-size:10px}
.title-footer{position:absolute;z-index:2;bottom:max(22px,env(safe-area-inset-bottom));left:max(28px,env(safe-area-inset-left));right:max(28px,env(safe-area-inset-right));display:flex;align-items:flex-end;justify-content:space-between;gap:16px;pointer-events:none}
.title-footer p{margin:0;font:700 9px/1.7 var(--heading);letter-spacing:1.7px;color:#B6C6D7}.title-footer p strong{color:#E8C9A1}
#title-powered{display:flex;flex-direction:column;align-items:flex-end;gap:5px;pointer-events:auto;background:none;padding:0;color:#A4BAD2}
#title-powered span{font-size:9px;letter-spacing:1.4px}#title-powered img{width:132px;height:auto;filter:brightness(0) invert(1);opacity:.8}
.coffee-motes{position:absolute;inset:0;overflow:hidden;pointer-events:none}.coffee-motes i{position:absolute;left:18%;top:74%;width:3px;height:3px;border-radius:50%;background:#FFD78D;box-shadow:0 0 9px #FFB952;animation:coffee-mote 9s ease-in-out infinite;opacity:0}.coffee-motes i:nth-child(2){left:28%;top:80%;animation-delay:-4s}.coffee-motes i:nth-child(3){left:73%;top:83%;animation-delay:-2s}.coffee-motes i:nth-child(4){left:84%;top:55%;animation-delay:-7s}.coffee-motes i:nth-child(5){left:40%;top:61%;animation-delay:-5s}.coffee-motes i:nth-child(6){left:64%;top:44%;animation-delay:-3s}
/* Character selection retains its in-scene stat panels. */
.menu-step{display:flex;align-items:center;justify-content:space-between;gap:15px;font:700 10px var(--heading);letter-spacing:1px}
.menu-step>button{font-size:11px;letter-spacing:0}
.step-title{font:800 clamp(24px,2.9vw,38px)/1.25 var(--heading);letter-spacing:-1px;outline:none}
.step-title em{font-style:normal;color:#FFB27D}
/* The hub camera fills the viewport and follows the walker on tall screens. */
.hub-screen{background:#101D30;color:#F6EEE0;isolation:isolate}
.hub-world{position:absolute;inset:0;margin:0;overflow:hidden}
.hub-world canvas{display:block;width:100%;height:100%;touch-action:none;outline-offset:-4px}
.hub-vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(#06152BEF, #06152B70 16%, transparent 35%,transparent 63%,#06152BA6 86%,#06152BF5)}
.hub-screen .menu-step{position:absolute;z-index:5;top:max(18px,env(safe-area-inset-top));left:max(20px,env(safe-area-inset-left));right:max(20px,env(safe-area-inset-right));color:#B5CCE4}
.hub-screen .soft-button{background:#0B2138ED;color:#EFE3CF;border-color:#ABC1DB60;min-height:42px;box-shadow:inset 0 1px 0 #FFFFFF15;border-radius:5px}
.hub-screen .soft-button:hover{background:#1B3D58}
.hub-heading{position:absolute;z-index:3;top:81px;left:15%;right:15%;pointer-events:none;text-align:center}
.hub-heading .step-title{font-size:clamp(24px,3.1vw,42px);margin:6px 0;color:#FFF4E1;text-shadow:0 2px 6px #06152B,0 4px 20px #06152B}
.hub-heading .title-kicker{font-size:8px;letter-spacing:2px}
.destination-buttons{position:absolute;inset:0;pointer-events:none;z-index:3}
.destination-buttons button{position:absolute;pointer-events:auto;left:var(--door-x,50%);top:var(--door-y,38%);transform:translate(-50%,-100%);width:190px;padding:13px 12px 9px;border:1px solid #C3C8BD80;border-top:3px solid #F1BD7C;border-radius:5px;background:linear-gradient(145deg,#122C43EE,#081C33EE);color:#FFF0D8;box-shadow:0 5px 0 #06152B77,0 10px 25px #06152B30;transition:background .2s,border-color .2s;text-align:center}
.destination-buttons button:hover,.destination-buttons button[aria-pressed=true]{border-color:#FFC383;background:linear-gradient(145deg,#244A69F0,#13334CF0)}
.destination-number{position:absolute;left:9px;top:8px;color:#90ACC6;font:600 8px var(--body);letter-spacing:1px}
.destination-buttons svg{display:block;width:24px;height:24px;margin:0 auto 5px;color:#F6BE7C}
.destination-buttons strong{display:block;font:800 16px var(--heading)}.destination-buttons small{display:block;font-size:10px;color:#BED0DF;margin:4px 0 8px}
.destination-enter{display:block;border-top:1px solid #95B0CF33;padding-top:6px;font:800 8px var(--heading);letter-spacing:1.8px;color:#F6C98D}.destination-enter span{float:right;margin-right:2px}
.hub-speech{position:absolute;z-index:3;left:var(--walker-x,50%);top:var(--walker-y,60%);transform:translate(-50%,-100%);width:max-content;max-width:min(280px,80vw);margin:0;padding:9px 13px;border-radius:7px;background:#F8EDDB;color:#112941;box-shadow:0 3px 0 #06152B88;text-align:center;font:600 11px/1.4 var(--body);pointer-events:none}
.hub-speech:after{content:'';position:absolute;left:50%;bottom:-7px;border:7px solid transparent;border-top-color:#F8EDDB;border-bottom:0}
.hub-bottom{position:absolute;z-index:4;left:max(24px,env(safe-area-inset-left));right:max(24px,env(safe-area-inset-right));bottom:max(24px,env(safe-area-inset-bottom));display:flex;align-items:flex-end;justify-content:space-between;gap:20px;pointer-events:none}
.hub-player{display:flex;align-items:center;gap:10px;min-width:180px}.hub-player>.little-dot{box-shadow:0 0 15px #FF7E32}.hub-player>span:last-child{font:700 8px/1.8 var(--heading);letter-spacing:1.6px;color:#A8BFDA}.hub-player strong{display:block;font-size:15px;letter-spacing:0;color:#FFE9CC}
.hub-instructions{text-align:center;flex:1}.hub-instructions>p{font-size:11px;line-height:1.6;color:#E8E1D6;margin:0}.hub-instructions .menu-tip{font-size:10px;margin:8px 0 0;color:#9DBAD8}.hub-screen kbd{background:#0B2138;border-color:#91AED149;color:#D6E6FA;font-size:10px;padding:3px 5px}
#start{position:absolute;right:0;bottom:58px;pointer-events:auto}#start:disabled{display:none}
.hub-duration{font:800 8px/1.8 var(--heading);letter-spacing:1.4px;text-align:right;color:#B6C8D9;min-width:180px}.hub-duration strong{color:#F1CE9F}
.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.settings-card{background:#fff;border:1px solid #DCE2EB;padding:18px;border-radius:13px}.settings-card h3{font:700 16px var(--heading);margin:0 0 10px}.settings-card p{font-size:12px;color:var(--muted)}.settings-card .mode-picker{display:grid;grid-template-columns:1fr;gap:8px}.settings-card .mode-picker button{padding:12px;font-size:12px}.settings-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.settings-profile{font-size:12px;padding:14px 0;color:#52637A}.settings-profile strong{color:#06152B}.auth-status{font-size:12px;line-height:1.6}.cloud-conflict{background:#FFF1E9;border:1px solid #F0B597;border-radius:12px;padding:16px;margin:16px 0}

@keyframes menu-in{from{opacity:0}to{opacity:1}}
@keyframes coffee-mote{0%,100%{opacity:0;transform:translate(0,0)}25%{opacity:.6}80%{opacity:0;transform:translate(12px,-75px)}}
@media(max-aspect-ratio:1/1){
  .title-copy{width:min(420px,76vw);top:44%}.title-first{font-size:clamp(40px,7vw,66px)}.title-last{font-size:clamp(95px,15vw,144px)}
  .title-shade{background:linear-gradient(#06152B35,#06152B20 50%,transparent 75%,#06152BF0),radial-gradient(ellipse at 50% 42%,#06152B77,transparent 70%)}
  .hub-heading{top:90px;left:5%;right:5%}.hub-heading .step-title{font-size:30px}
  .destination-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;inset:175px 18px auto}
  .destination-buttons button{position:relative;left:auto;top:auto;transform:none;width:100%;padding:12px 7px 9px}.destination-buttons strong{font-size:14px}.destination-buttons small{font-size:9px}
  .hub-bottom{flex-wrap:wrap;gap:15px}.hub-instructions{order:3;flex-basis:100%}.hub-player,.hub-duration{min-width:0}
}
@media(max-width:600px){
  .app-shell:not(.in-game)>.site-header{right:14px;top:max(12px,env(safe-area-inset-top));height:36px}.site-header .icon-button{width:36px;height:36px}.demo-badge{font-size:8px;padding:6px}
  .title-copy{width:min(360px,82vw);top:42%}.title-kicker{font-size:7px;letter-spacing:1.25px}.game-title{margin:14px -12px 17px}.title-first{font-size:43px;letter-spacing:-2px}.title-last{font-size:102px;letter-spacing:-6px}
  .game-slogan{font-size:10px;line-height:1.65;margin:15px -10px 20px}.main-actions{max-width:290px;gap:8px}.menu-action{min-height:47px;font-size:11px;letter-spacing:1px}.menu-action.primary{min-height:53px;font-size:13px}.menu-secondary{gap:8px}.menu-secondary .menu-action{min-height:39px;font-size:9px}.menu-action small{font-size:8px}.menu-account{margin-top:14px}.menu-account>button{font-size:9px}.menu-account>span:last-child{font-size:8px}
  .title-footer{left:17px;right:17px;bottom:max(18px,env(safe-area-inset-bottom))}.title-footer p{font-size:7px;letter-spacing:1px}#title-powered img{width:106px}#title-powered span{font-size:8px}
  .hub-screen .menu-step{left:12px;right:12px;top:max(12px,env(safe-area-inset-top));font-size:8px}.hub-screen .menu-step>span{display:none}.hub-screen .soft-button{min-height:40px;font-size:10px;padding:8px 11px}
  .hub-heading{top:83px;left:8%;right:8%}.hub-heading .step-title{font-size:28px;line-height:1.15;margin-top:7px}.hub-heading .title-kicker{font-size:7px;letter-spacing:1px}
  .destination-buttons{inset:195px 12px auto;gap:7px}.destination-buttons button{padding:12px 4px 8px;border-top-width:2px}.destination-number{font-size:7px;left:6px}.destination-buttons svg{width:20px;height:20px;margin-bottom:7px}.destination-buttons strong{font-size:11px}.destination-buttons small{display:none}.destination-enter{font-size:7px;margin-top:9px;letter-spacing:1px}
  .hub-bottom{left:16px;right:16px;bottom:max(22px,env(safe-area-inset-bottom));gap:19px}.hub-player strong{font-size:13px}.hub-player>span:last-child{font-size:7px}.hub-duration{font-size:7px;letter-spacing:.8px}.hub-instructions>p{font-size:10px}.hub-instructions .menu-tip{font-size:9px}.hub-speech{font-size:10px;max-width:230px}
  .settings-grid{grid-template-columns:1fr}
}
@media(max-height:650px) and (min-aspect-ratio:1/1){
  .title-copy{top:49%;width:340px}.title-kicker{font-size:7px;letter-spacing:1.3px}.game-title{margin:8px -20px 10px}.title-first{font-size:42px}.title-last{font-size:94px}.game-slogan{font-size:10px;margin:11px 0 14px}.main-actions{max-width:300px;gap:7px}.menu-action{min-height:42px;padding:8px 15px;font-size:11px}.menu-action.primary{min-height:48px;font-size:13px}.menu-secondary .menu-action{min-height:35px;font-size:9px}.menu-account{margin-top:12px}.title-footer{bottom:16px}.title-footer p{font-size:7px}#title-powered img{width:110px}
  .hub-heading{top:64px}.hub-heading .step-title{font-size:28px}.hub-screen .menu-step>span{visibility:hidden}.destination-buttons button{width:165px;padding:8px}.destination-buttons svg{display:none}.destination-buttons strong{font-size:14px}.destination-buttons small{font-size:9px}.destination-enter{font-size:7px}.hub-bottom{bottom:15px;gap:15px}.hub-player,.hub-duration{min-width:130px}.hub-player strong{font-size:12px}.hub-duration{font-size:7px}.hub-instructions>p{font-size:10px}.hub-instructions .menu-tip{font-size:9px}
}
@media(max-height:460px) and (min-aspect-ratio:1/1){
  .title-copy{top:50%;width:280px}.game-title{margin:7px -10px 9px}.title-first{font-size:29px;letter-spacing:-1.5px}.title-last{font-size:66px;letter-spacing:-4px}.title-kicker{font-size:6px;letter-spacing:1px}.game-slogan{font-size:9px;margin:9px 0 10px}.game-slogan br{display:none}.game-slogan strong{display:none}.main-actions{gap:6px;max-width:255px}.menu-action{min-height:35px;padding:6px 10px;font-size:10px}.menu-action.primary{min-height:39px;font-size:11px}.menu-action small{font-size:7px}.menu-secondary .menu-action{min-height:31px;font-size:8px}.menu-account{margin-top:9px;font-size:8px}.menu-account>button{font-size:8px}.menu-account>span:last-child{font-size:7px}
  .hub-heading{top:18px;left:25%;right:25%}.hub-heading .title-kicker{display:none}.hub-heading .step-title{font-size:22px;margin:0}.hub-screen .menu-step{top:12px}.hub-screen .menu-step>span{display:none}.hub-bottom{bottom:12px}.hub-duration{display:none}.hub-instructions{text-align:right}.hub-instructions .menu-tip{margin-top:3px}.hub-speech{font-size:9px;padding:6px 10px}.destination-buttons button{width:145px}.destination-buttons strong{font-size:12px}.destination-buttons small{font-size:8px;margin:4px 0}.destination-enter{font-size:7px;padding-top:5px}
}
@media(max-height:700px) and (max-aspect-ratio:1/1){.title-copy{top:48.5%}.title-first{font-size:34px}.title-last{font-size:83px}.game-title{margin:11px -10px 14px}.game-slogan{margin:12px 0 15px}.menu-action{min-height:41px}.menu-action.primary{min-height:47px}.menu-secondary .menu-action{min-height:35px}.menu-account{margin-top:12px}}
@media(prefers-reduced-motion:reduce){.menu-screen,.coffee-motes i{animation:none}.menu-action,.destination-buttons button{transition:none}.coffee-motes{display:none}}
/* Keep both faces visible below the controls on a narrow phone. */
@media(max-aspect-ratio:3/4){
  .home-screen{background:radial-gradient(ellipse at 50% 12%,#173956,#06152B 72%)}
  .title-backdrop{height:auto;top:auto;bottom:0;object-fit:contain;mask-image:linear-gradient(transparent,#000 30%)}
}
/* Settings and the shared locker use the same in-game materials. */
.profile-modal{background:#06152BBD}
.profile-dialog{background:linear-gradient(135deg,#122A43,#091C31);border-color:#7088A45E;border-radius:8px;color:#EEE7D9;box-shadow:0 25px 90px #0009}
.profile-dialog-top{border-color:#8FA9C433;color:#F5C487}.profile-tabs{border-bottom:1px solid #8FA9C433;padding-bottom:1px}.profile-tabs button{color:#AFC4DA}.profile-tabs .selected{color:#FFBB7C;border-color:#FFAA62}
.profile-content :is(.eyebrow,.tag){color:#F0B77C}.profile-content h2,.profile-content h3{color:#FFF0D8}.profile-content :is(p,.account-copy,.auth-status,.settings-profile,.mode-description){color:#B7CBE0}.profile-content :is(.settings-profile strong,.settings-profile b){color:#F5E3C8}
.profile-content :is(.settings-card,.stash-card,.collection-item,.achievement,.profile-stats>div,.leaderboard-wrap){background:#102B43;border-color:#7B9BBD40;border-radius:6px}.profile-content :is(.stash-card p,.collection-item small,.achievement p,.profile-stats span){color:#B7CBE0}
.profile-content :is(.profile-stats b,.collection-item span){color:#8DC5FF}.profile-content :is(.stash-card.locked,.achievement.earned,.empty-state,.progress-note){background:#193750;border-color:#8BABCF50;color:#D1DFEB}
.profile-content .mode-picker button{background:#0B1D32;border-color:#728EAC70;color:#DFEAF6}.profile-content .mode-picker button.selected{background:#214663;border-color:#F2B373;box-shadow:none}.profile-content .mode-picker span{color:#AAC6DF}
.profile-dialog .soft-button{background:#1B3B56;border-color:#7696B870;color:#F7E6CF;border-radius:5px}.profile-dialog .soft-button:hover{background:#28506F}.profile-dialog .soft-button.primary{background:#EA8B49;color:#10243B;border-color:#FBC28E}
.profile-content input:not([type=checkbox]):not([type=file]),.profile-content select{background:#091C30;border-color:#718EAD;color:#EDF3FA}
.profile-content .leaderboard-wrap th{background:#183B58;color:#D8E5F1}.profile-content .leaderboard-wrap td{border-color:#7B9BBD30;color:#F1E5CF}.profile-content .leaderboard-wrap td small{color:#A9C4DF}.profile-content .leaderboard-wrap td:nth-child(3){color:#FFBC7D}.profile-content hr{border-color:#7B9BBD33}
.profile-dialog{color-scheme:dark;scrollbar-color:#56748D #10243A}
.profile-dialog :is(.gear-position,.gear-position.is-locked,.gear-collection-card,.gear-shared-note,.gear-extraction-note){background:#102B43;border-color:#7B9BBD60;box-shadow:none;color:#C9D9E8;border-radius:6px}
.profile-dialog .gear-position h3,.profile-dialog .gear-person>strong{color:#FFF0D8}
.profile-dialog :is(.gear-person-kicker,.gear-person>small,.gear-slot-label,.gear-rarity-label,.gear-owned-state,.gear-collection-card small,.gear-benefits li){color:#B7CBE0}
.profile-dialog .gear-person canvas{background:linear-gradient(#132E4500,#26516B);border-color:#8FBADB70}
.profile-dialog .gear-rarity-1{border-color:#438EFF}.profile-dialog .gear-rarity-2{border-color:#F0A269}.profile-dialog .gear-rarity-2 .gear-rarity-label{color:#FBB97C}
.profile-content .account-feedback,.profile-content .cloud-conflict{background:#392D29;border:1px solid #C78D6059;color:#FFD0AD}
.profile-content .cloud-conflict p{color:#FFD0AD}.profile-content .gear-no-change{color:#B7CBE0}
