/* The desktop shell shares the mobile flow, with room for persistent context. */
.desktop-resources,.desktop-page-heading{display:none}
@media(min-width:801px){
 .header-shell{position:sticky;top:0;z-index:50;background:#0c1d27f5;backdrop-filter:blur(12px);border-bottom:1px solid #314d5b}
 .header-shell .topbar{height:76px;min-height:76px;padding:12px 24px;gap:22px;border:0;transform:none}
 .header-shell .activity-bar{padding:0;gap:12px;min-width:0;flex:1;border-right:0}
 .header-shell .activity-symbol{flex:0 0 38px;width:38px;height:38px}
 .header-shell .activity-detail{min-width:0;flex:1}
 .header-shell .activity-title b{font-size:13px;line-height:1.4}
 .header-shell .activity-title>span{font-size:11px;flex-shrink:0;margin-left:8px}
 .header-shell .activity-detail>small{display:block;font-size:10px;line-height:1.4;margin-top:5px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
 .header-shell .activity-detail>.progress{height:4px;margin-top:5px}
 .header-shell .activity-bar>button{min-height:38px;padding:8px 12px;border-radius:8px;font-size:11px;flex-shrink:0}
 .header-shell .activity-bar>.task-pause{min-width:40px}
 .header-shell .desktop-header-vitals{width:230px;flex:0 0 230px;gap:12px;padding-left:20px;border-left:1px solid #34515f}
 .header-shell .desktop-header-vitals button{min-width:0}
 .sidebar-resources{display:none}
 .desktop-resources{display:grid;grid-template-columns:repeat(6,minmax(0,1fr)) 70px;gap:0;margin:0;padding:7px 24px;background:linear-gradient(90deg,#152e38a0,#112630);border-top:1px solid #29444f}
 .desktop-resources>button{justify-content:flex-start;gap:10px;padding:4px 12px;min-height:40px;border-radius:6px;border-right:1px solid #3f62652e}
 .desktop-resources>button:first-child{padding-left:2px}
 .desktop-resources>button:focus-visible{outline:2px solid #f8cb62;outline-offset:-2px}
 .desktop-resource-copy{display:flex;flex-direction:column;gap:3px;min-width:0;text-align:left}
 .desktop-resource-copy>small{font-size:9px;line-height:1.2;color:#aac1ca;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .desktop-resource-copy>b{font-size:13px;line-height:1.2;color:#eef2df;font-variant-numeric:tabular-nums}
 .desktop-resources>button[data-id="coins"] b{color:#ffd474}
 .desktop-resources .resource-more{justify-content:center;border-right:0;font-size:22px}
 .sidebar .nav-item{min-height:46px;font-size:13px;border-radius:6px}
 .sidebar .brand{margin-bottom:28px}
 .sidebar .nav-item[data-tab="journal"] .nav-dot{display:none}
 .sidebar .journal-signal{top:calc(50% - 4px);right:14px}
 .main-content:has(.journal-content){max-width:1390px;padding:26px 32px 56px;margin-inline:auto}
 .desktop-page-heading{display:flex;align-items:baseline;gap:20px;margin:0 0 18px}
 .desktop-page-heading h1{font:700 29px/1.2 Georgia,serif;color:#f6e7bd;letter-spacing:-.3px}
 .desktop-page-heading>span{font-size:11px;color:#97b3bf}
 .journal-toolbar{margin:0 0 26px}
 .journal-tabs{margin:0;gap:8px}
 .journal-tabs .skills-tab{font-size:12px;padding:12px 17px;min-height:46px;gap:9px}
 .journal-content:has(>.next-goal){display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,.85fr);gap:24px;align-items:start}
 .journal-content>.next-goal{grid-column:1;display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin:0;padding:25px 28px;border:1px solid #bba26370;border-top:3px solid #ffd05b;border-radius:16px!important;background:radial-gradient(ellipse at 100% 0,#c3a03f22,transparent 70%),linear-gradient(140deg,#20363e,#102630);box-shadow:0 12px 35px #05101833}
 .journal-content>.next-goal:after{display:none}
 .journal-content>.next-goal .objective-header{display:flex;align-items:center;gap:13px;margin:0;padding:0;background:none;border:0}
 .journal-content>.next-goal .objective-header .shelter-ui-art{width:45px;height:45px;grid-row:auto;filter:drop-shadow(0 2px 7px #f4c45020)}
 .journal-content>.next-goal .objective-header h2{font-size:12px;letter-spacing:1.5px;color:#ffd57a}
 .journal-content>.next-goal .objective-count{margin-left:auto;font-size:12px;color:#d9d2ae;grid-column:auto}
 .journal-content>.next-goal .objective-mobile-progress{display:block;margin:0}
 .objective-mobile-progress>div:first-child{display:flex;justify-content:space-between;margin-bottom:8px;font-size:10px;color:#b1c4c8}
 .objective-mobile-progress>div>span{font:9px Consolas,monospace;letter-spacing:1.4px;color:#c8b27b}
 .objective-story-track{height:5px;border-radius:5px;overflow:hidden;background:#071d27}
 .objective-story-track i{display:block;height:100%;background:linear-gradient(90deg,#c79b3f,#ffe09a);border-radius:inherit}
 .journal-content>.next-goal .objective-body{display:grid;grid-template-columns:minmax(0,1fr);gap:13px;width:100%;max-width:none;margin:0;padding:0;border:0;background:none}
 .journal-content>.next-goal .objective-status-line{grid-column:1;grid-row:auto;grid-template-columns:34px minmax(0,1fr);gap:5px 12px}
 .journal-content>.next-goal .objective-state-mark{width:34px;height:34px;font-size:22px;border-color:#ad965770;background:#b79c3310;color:#ffcd67}
 .journal-content>.next-goal .objective-state-mark.is-complete{color:#9bedd0;border-color:#71b896;background:#528c701a}
 .journal-content>.next-goal .objective-kicker{font-size:9px;font-weight:700;letter-spacing:1.3px;color:#cdb778;text-transform:uppercase}
 .journal-content>.next-goal .objective-body h3{font-size:25px;line-height:1.25;color:#fff0ce}
 .journal-content>.next-goal .objective-body>p,.journal-content>.next-goal .objective-body>small{grid-column:1;grid-row:auto;margin:0;font-size:13px;line-height:1.65}
 .journal-content>.next-goal .objective-body>small{font-size:12px;color:#a8c0cb}
 .journal-content>.next-goal .objective-mobile-reward{display:flex;align-items:center;flex-wrap:wrap;gap:11px;padding:14px 0 0;border-top:1px solid #a7ad6b2c}
 .objective-mobile-reward>span{font:9px Consolas,monospace;color:#c2ad7c;letter-spacing:1.3px}
 .objective-mobile-reward>div{display:flex;gap:12px;flex-wrap:wrap}
 .objective-mobile-reward b{display:flex;align-items:center;gap:7px;font-size:12px;color:#ffda8d}
 .journal-content>.next-goal .objective-body>button{grid-column:1;grid-row:auto;justify-self:stretch;align-self:end;width:100%;min-height:46px;padding:12px 20px;margin:36px 0 0;border-radius:8px;font-size:13px}
 .journal-content>.next-goal .objective-footer{display:none}
 .journal-content>.next-goal.objective-ready{border-color:#6bab89;border-top-color:#92e2b7}
 .journal-content>.next-goal .objective-task-status{margin-top:10px;padding:16px;font-size:13px}
 .journal-content>.journal-list-actions,.journal-content>.objective-journey-progress,.journal-content>.quest-list,.journal-content>.objective-hidden,.journal-content>.objective-pagination{grid-column:1/-1;margin:0}
 .journal-content>.journal-list-actions{padding-top:12px}
 .journal-content>.objective-journey-progress{margin-top:-12px}
 .journal-content>.quest-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .quest-list .quest-card{display:grid;grid-template-columns:36px minmax(0,1fr);gap:12px 15px;padding:21px;border-radius:10px;background:#102630;border-color:#35505b}
 .quest-list .quest-card>div:nth-child(2){min-width:0}
 .quest-list .quest-card>.pill,.quest-list .quest-card>button{grid-column:2;justify-self:start;margin:0;min-height:30px}
 .quest-list .quest-card h3{font-size:15px;line-height:1.4}
 .quest-list .quest-card p{font-size:12px;line-height:1.6}
 .quest-list .quest-card small{font-size:11px;line-height:1.6}
 .quest-list .quest-number{width:36px;height:36px;font-size:13px}
 .base-explore .scene-footer{display:block;position:absolute;bottom:16px;right:16px;z-index:21;padding:0;border:0;background:none}
 .base-explore .scene-footer button{min-height:39px;padding:10px 17px;border:1px solid #557684;border-radius:20px;background:#102832e8;font-size:12px}
 .base-explore .scene-footer button:hover{background:#1c3c47;border-color:#9dbcae}
 .base-facility-directory>header{padding-inline:2px}
 .base-facility-directory h2{font-size:19px}
 .base-facility-card{border-radius:10px}
 .base-facility-copy>strong{font-size:13px}
}
@media(min-width:801px) and (max-width:1149px){
 .header-shell .topbar{padding-inline:18px;gap:14px}
 .header-shell .desktop-header-vitals{width:170px;flex-basis:170px;padding-left:12px}
 .header-shell .activity-title b{font-size:12px}
 .header-shell .activity-bar{gap:8px}
 .desktop-resources{padding-inline:18px;grid-template-columns:repeat(6,minmax(0,1fr)) 38px}
 .desktop-resources>button{padding-inline:6px;gap:6px}
 .desktop-resource-copy>small{font-size:8px}
 .desktop-resource-copy>b{font-size:11px}
 .main-content:has(.journal-content){padding:24px}
 .journal-content:has(>.next-goal){grid-template-columns:minmax(0,1fr)}
 .journal-content>.next-goal .objective-body>button{justify-self:start;width:auto;min-width:220px}
 .journal-content>.quest-list{grid-template-columns:minmax(0,1fr)}
}

@media(min-width:801px){
 .base-explore .scene-footer{left:auto}
 .header-shell .desktop-header-vitals button small{display:inline;font-size:8px;line-height:1.3}
}

/* Desktop confirmations enter from the edge; mobile notices drop below resources. */
#toast{left:16px;right:auto;bottom:20px;max-width:min(360px,calc(100vw - 32px));margin:0;padding:12px 16px;border:1px solid #3b5666;border-left:3px solid var(--amber,#ffc847);border-radius:8px;background:var(--surface-overlay,#10232d);color:#eaf4ff;text-align:left;overflow-wrap:anywhere;pointer-events:none;opacity:0;transform:translate(-18px,6px);animation:none;transition:opacity .2s ease,transform .24s cubic-bezier(.2,.7,.2,1)}
#toast.visible{opacity:1;transform:translate(0,0);animation:none}
@media(max-width:800px){
 #toast{top:calc(var(--mobile-resource-height,env(safe-area-inset-top,0px)) + 8px);left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));bottom:auto;width:max-content;max-width:min(360px,calc(100vw - 24px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)));margin:0 auto;padding:11px 14px;transform:translateY(-12px)}
 #toast.visible{transform:translateY(0)}
}
.reduce-motion #toast,.reduce-motion #toast.visible{animation:none!important;transition:none!important;transform:none}
@media(prefers-reduced-motion:reduce){#toast,#toast.visible{animation:none!important;transition:none!important;transform:none}}

/* Keep recovery actions clear of the resource bar and mobile navigation. */
@media(max-width:800px){
 .low-health-warning{left:max(12px,env(safe-area-inset-left,0px));right:max(12px,env(safe-area-inset-right,0px));width:auto;margin-inline:auto;max-height:calc(100dvh - var(--mobile-resource-height,46px) - var(--app-dock-height,0px) - var(--app-task-height,58px) - 32px);overflow-y:auto;overscroll-behavior:contain}
}
.mobile-only-notice{display:grid;position:fixed;inset:0;z-index:10000;place-items:center;padding:28px;background:#0b1d28;color:#f1e9d6;text-align:center}
.mobile-only-notice[hidden]{display:none}
.mobile-only-notice>div{max-width:510px;padding:40px;border:0;border-radius:20px;background:#142f3b;box-shadow:0 20px 60px #0005}
.mobile-only-notice h1{font:700 32px/1.2 Georgia,serif;margin:0 0 16px}
.mobile-only-notice p{font:16px/1.6 system-ui;color:#b9cbd1;margin:0}
.desktop-play-blocked #app,.desktop-play-blocked #modal,.desktop-play-blocked #toast{display:none!important}
