/* One captured view of the existing renderer; no independent animation clock. */
#home-loadout{display:none}
[data-state='menu'] #home-loadout{display:flex;align-items:center;justify-content:center;gap:18px;grid-area:loadout}
#home-pip-preview{width:168px;height:168px;border:0;background:transparent;object-fit:contain}
#home-loadout h3{margin:0 0 7px;font-family:Georgia,serif;color:#ffe1a0;font-size:25px}
#home-loadout p{margin:4px 0;color:#e3e8df;font-size:12px;line-height:1.4}
#home-loadout .home-free{color:#ffe1a0;font-size:11px;font-weight:bold}
#home-wardrobe{margin-top:8px;min-height:44px}
.home-account-entry{display:none}
[data-state='menu'] .home-account-entry{
 display:block;position:absolute;z-index:1;
 top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left))
}
#game-shell #home-account{
 display:grid;gap:2px;min-height:44px;padding:6px 12px;text-align:left;
 border:1px solid #e9c47f;border-radius:10px;
 background:#123746f5;color:#fff1cf;font-size:14px;line-height:1.2
}
#game-shell #home-account:enabled:hover{background:#235462}
#home-account:focus-visible{outline:3px solid #fff4ce;outline-offset:3px}
#game-shell #home-account:disabled{opacity:1;color:#e5e9e5;border-color:#e9c47f85}
#home-account-status{display:block;color:#d3e5e6;font-size:10px;font-weight:400}
#home-goals .dialog-actions{position:sticky;top:0;z-index:1;justify-content:flex-end}
#home-goals ul{padding-left:20px;line-height:1.6}#home-goals li{padding:8px 0;border-bottom:1px solid #dfbb7833}
#home-goals p{line-height:1.5}
#game-shell[data-state='menu'] .game-menu{
 grid-template-areas:'brand' 'loadout' 'run' 'actions' 'update';
 grid-template-columns:minmax(0,460px);gap:10px;padding:32px 18px 18px
}
[data-state='menu'] .harbor-brand{grid-area:brand}
[data-state='menu'] #harbor-cast{display:none}
#home-run-card{display:contents}
.run-actions{display:contents}
#game-shell #home-ready-outfit{
 min-height:44px;padding:3px 5px;background:transparent;color:#ffe6af;border:0;
 font:inherit;text-align:left;text-decoration:underline;text-underline-offset:3px
}
#home-ready-outfit:focus-visible{outline:2px solid #fff4ce;outline-offset:2px}
.home-run-progress{display:none}
[data-state='menu'] #home-run-card{
 display:grid;grid-area:run;gap:10px;box-sizing:border-box;
 width:100%;padding:18px;border:1px solid #f0c777a6;border-radius:16px;text-align:left;
 background:linear-gradient(108deg,#123b4a 6%,#102d3fec 70%),url('art/environment/comic-v1/harbor-wide-v1.png') 80% 37% / cover;
 box-shadow:0 12px 35px #081e2e66
}
[data-state='menu'] #menu-title{
 grid-area:auto;margin:0;font-size:clamp(25px,3vw,39px);line-height:1.05
}
[data-state='menu'] #menu-description{
 grid-area:auto;margin:0;color:#e3eeec;font-size:13px;line-height:1.35
}
[data-state='menu'] #play{
 grid-area:auto;justify-self:stretch;min-width:0;width:100%;margin:1px 0 3px
}
[data-state='menu'] .home-run-progress{
 display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.55fr);
 gap:10px;margin:0;padding:9px 0;border-block:1px solid #eac78742
}
.home-run-progress dt{font-size:11px;color:#cae0e1}
.home-run-progress dd{margin:2px 0 0;color:#ffe6af;font-weight:750;font-size:15px;line-height:1.25;overflow-wrap:anywhere}
[data-state='menu'] .title-actions{grid-area:actions}
[data-state='menu'] .game-update{grid-area:update}
@media(min-width:840px) and (min-height:651px){
 #game-shell[data-state='menu'] .game-menu{
  grid-template-columns:minmax(0,290px) minmax(0,460px);
  grid-template-areas:'brand brand' 'loadout run' 'loadout actions' 'update update';
  column-gap:28px;row-gap:12px
 }
 [data-state='menu'] #home-loadout{align-self:center;flex-direction:column;gap:4px}
 [data-state='menu'] #home-pip-preview{width:218px;height:218px}
 [data-state='menu'] #home-loadout h3{font-size:31px}
}
@media(max-width:600px){
 #game-shell[data-state='menu'] .game-menu{gap:7px;padding:64px 14px 14px}
 #game-shell #home-account{font-size:12px;padding-inline:8px}
 [data-state='menu'] .harbor-brand .brand-name{font-size:42px}
 [data-state='menu'] .harbor-brand .brand-series{font-size:10px}
 [data-state='menu'] .harbor-brand .brand-port{font-size:8px;margin-top:5px}
 [data-state='menu'] #home-loadout{gap:12px}
 #home-pip-preview{width:140px;height:140px}#home-loadout h3{font-size:23px}
 [data-state='menu'] #play{min-height:50px;font-size:20px}
 #game-shell .title-actions button{min-width:92px;min-height:44px;padding:8px;font-size:11px}
 [data-state='menu'] #menu-description{font-size:10px}
}
@media(max-height:650px) and (max-width:600px){
 [data-state='menu'] .harbor-brand .brand-name{font-size:32px}
 [data-state='menu'] .harbor-brand .brand-port{display:none}
 #home-pip-preview{width:98px;height:98px}
 #home-loadout h3{font-size:21px;margin-bottom:3px}
 #home-loadout p{margin:2px 0;line-height:1.25}
 #home-wardrobe{margin-top:4px}
 #game-shell[data-state='menu'] .game-menu{gap:6px}
}
@media(min-width:601px) and (max-height:650px), (orientation:landscape) and (max-height:450px){
 #game-shell[data-state='menu'] .game-menu{
  grid-template-columns:minmax(0,310px) minmax(0,430px);
  grid-template-areas:'brand run' 'loadout run' 'loadout actions' 'update update';
  gap:8px 22px;padding:42px 28px 14px
 }
 [data-state='menu'] .harbor-brand .brand-name{font-size:40px}
 [data-state='menu'] .harbor-brand .brand-port{font-size:8px;margin-top:4px}
 #home-pip-preview{width:120px;height:120px}#home-loadout h3{font-size:21px}
 [data-state='menu'] #home-loadout{flex-direction:column;gap:6px}
 #game-shell .title-actions button{min-width:88px;min-height:44px;padding:7px;font-size:11px}
 [data-state='menu'] #menu-description{font-size:10px}
}

[data-state="menu"] .title-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;max-width:430px;gap:6px;margin:0 auto}
#game-shell[data-state="menu"] .title-actions button{min-width:0;width:100%}
[data-state='menu'] #title-settings{grid-column:1}
[data-state='menu'] #title-news{grid-column:2/-1}

#game-shell #home-wardrobe{min-height:44px}

[data-state="menu"] #run-goals{display:none}
@media(min-width:601px) and (max-height:450px){
 #game-shell[data-state='menu'] .game-menu{
  padding-block:max(26px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-bottom));row-gap:5px
 }
 [data-state="menu"] #home-loadout{flex-direction:row;gap:12px}
 #home-pip-preview{width:110px;height:110px}
 #home-loadout p{font-size:11px;line-height:1.25}#home-loadout h3{font-size:20px}
}

@media(orientation:landscape) and (max-width:600px) and (max-height:450px){
 #game-shell[data-state='menu'] .game-menu{grid-template-columns:1fr 1.3fr;gap:5px 12px;padding:62px 14px 10px}
 [data-state='menu'] .harbor-brand .brand-name{font-size:28px}
 [data-state='menu'] .harbor-brand .brand-port{display:none}
 [data-state='menu'] #home-loadout{flex-direction:row;gap:8px}
 #home-pip-preview{width:80px;height:80px}#home-loadout h3{font-size:18px}
 #home-loadout p{font-size:10px;line-height:1.2}
}



#pip-launch{position:absolute;inset:0;z-index:30;overflow:hidden;pointer-events:none;border-radius:12px}
#pip-launch[hidden]{display:none}
.launch-active #game-menu{visibility:hidden}
.launch-backdrop{position:absolute;inset:0;background:linear-gradient(180deg,#112c3e18,#102b3fbb),url('art/environment/comic-v1/harbor-wide-v1.png') center/cover}
#pip-launch canvas{position:absolute;object-fit:contain;filter:drop-shadow(0 6px 6px #102b3f77)}
#pip-launch strong{position:absolute;top:23%;left:50%;transform:translateX(-50%);padding:12px 20px;border-radius:20px;background:#fff1cf;color:#173747;font-size:clamp(22px,4vw,36px);white-space:nowrap;box-shadow:0 5px 0 #c4924e}

[data-state='menu'] .title-actions{
 width:100%;max-width:460px;padding:5px;box-sizing:border-box;
 border-radius:12px;background:#102e40d9
}
#game-shell[data-state='menu'] .title-actions button{font-size:13px}
#game-shell[data-state='menu'] .title-actions :is(#title-outfits,#home-goals-button){border-color:#e9c47f!important}
.home-ember-count{display:block;color:#e9c47f;font-size:10px}
@media(max-width:600px), (max-height:650px){
 [data-state='menu'] #home-run-card{gap:6px;padding:10px}
 [data-state='menu'] #menu-description{font-size:11px}
 [data-state='menu'] .home-run-progress{padding:5px 0;gap:6px}
 .home-run-progress dd{font-size:13px}
 #game-shell[data-state='menu'] .title-actions button{min-height:44px;padding:5px;font-size:11px}
}
@media(orientation:landscape) and (max-height:360px){
 #game-shell[data-state='menu'] .game-menu{padding-top:34px}
 [data-state='menu'] .home-account-entry{top:max(7px,env(safe-area-inset-top))}
 [data-state='menu'] .harbor-brand{margin-top:22px}
 [data-state='menu'] #home-run-card{padding:8px}
 [data-state='menu'] #menu-description:not(:has(:is(#run-description-text[data-problem],#local-save-status:not([hidden])))){display:none}
 [data-state='menu'] #run-description-text:not([data-problem]){display:none}
}

/* Results still link directly to the next outfit. */
#game-shell #next-outfit:not([hidden]){
 display:block;margin:4px auto 0;min-height:44px;max-width:100%;
 padding:6px 12px;border:1px solid #dab470;border-radius:8px;
 background:#163e4e;color:#ffe4a9;font-size:inherit;line-height:1.3
}
#game-shell #next-outfit:focus-visible{outline:3px solid #fff4ce;outline-offset:2px}
