/* Shared controls for the three full-screen game scenes. */
.navigation-shell.has-page-close>.navigation-toggle{right:66px}
.navigation-page-close{position:fixed;top:calc(8px + env(safe-area-inset-top,0px));right:12px;z-index:950;display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;border-radius:12px;background:#284d5b;color:#eaf3ee;box-shadow:0 4px 16px #06151d55;cursor:pointer}
.navigation-page-close:hover{background:#356374}
.navigation-page-close:focus-visible{outline:2px solid #efc876;outline-offset:3px}
body:has(:is(#modal:not(:empty),#level-celebration,.navigation-overlay.is-open)) #app .navigation-page-close{display:none!important}
#app:has(.main-content[data-page="guild"] .faction-preview[data-faction-screen="member"]) .navigation-shell>.navigation-toggle{display:none!important}
#app .main-content[data-page="guild"] .faction-preview[data-faction-screen="member"] .faction-menu-button{position:fixed;top:calc(8px + env(safe-area-inset-top,0px));right:66px;z-index:950;width:88px;height:48px;border-radius:12px;background:var(--game-popup-bg,#122e3b)!important;box-shadow:0 4px 16px #06151d55!important}
#app:has(.main-content:is([data-page="guild"],[data-page="collections"],[data-page="highscores"],[data-page="settings"])),
#app:has(.main-content[data-page="survivors"] #trader-shop){--full-page-top:calc(64px + env(safe-area-inset-top,0px))}
#app:has(.main-content:is([data-page="guild"],[data-page="collections"],[data-page="highscores"],[data-page="settings"])) .header-shell,
#app:has(.main-content[data-page="survivors"] #trader-shop) .header-shell{display:none!important}
@media(min-width:801px){
 #app .main-content:is([data-page="guild"],[data-page="collections"],[data-page="highscores"],[data-page="settings"]),
 #app .main-content[data-page="survivors"]:has(#trader-shop){padding-top:var(--full-page-top)!important}
}
@media(max-width:800px){
 body:has(#app .workspace) #app .main-content[data-page="collections"]{inset:0 0 var(--activity-bottom-clearance,0px) 0!important;min-height:0!important;padding-top:calc(76px + env(safe-area-inset-top,0px))!important;padding-bottom:8px!important}
 body:has(#app .workspace) #app .main-content[data-page="guild"]:has(.faction-preview[data-faction-screen="member"]){padding-top:0!important}
 body:has(#app .workspace) #app .main-content[data-page="survivors"]:has(#trader-shop){padding-top:calc(60px + env(safe-area-inset-top,0px))!important}
}
/* Keep the collections tabs clear of the fixed controls at every viewport size. */
body:has(#app .workspace) #app .main-content[data-page="collections"]{padding-top:calc(76px + env(safe-area-inset-top,0px))!important}
/* Artwork reaches the viewport edge; only the trader's content reserves the control lane. */
body:has(#app .workspace) #app .main-content[data-page="survivors"]:has(#trader-shop){padding-top:0!important}
#app .main-content[data-page="survivors"] #trader-shop{padding-top:calc(60px + env(safe-area-inset-top,0px))!important}
#app .main-content[data-page="survivors"] #trader-shop::after{top:calc(60px + env(safe-area-inset-top,0px))}
#app:has(.scene-hud) .navigation-shell>.navigation-toggle{background:var(--game-popup-bg,#122e3b)!important;color:#eaf3ee!important}
#app:has(.scene-hud) .header-shell{display:none!important}
#app:has(.scene-hud) .mobile-player-name,
#app:has(.scene-hud) .character-rpg .dossier-header{display:none!important}
#app:has(.scene-hud) .scene-underlay{position:relative;min-height:100dvh}
#app:has(.scene-hud) .world-map-screen{top:0!important}
#app:has(.scene-hud) .scene-underlay[inert]{pointer-events:none}
.scene-hud{position:fixed;z-index:90;top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));width:min(282px,calc(100vw - 76px));pointer-events:none;color:#fff4d8;text-shadow:0 2px 5px #071820b0;font-family:Segoe UI,system-ui,sans-serif}
.scene-hud button{pointer-events:auto;border:0;box-shadow:none}
.scene-hud-identity{display:flex;align-items:flex-start;gap:9px;width:100%}
.scene-hud-avatar{position:relative;flex:0 0 51px;width:51px;height:51px;overflow:hidden;padding:0;border-radius:15px;background:#153645!important;box-shadow:0 7px 18px #0519239c,0 2px 6px #071b2480!important}
.scene-hud-avatar::after{content:"";position:absolute;inset:0;border-radius:inherit;background:linear-gradient(135deg,#d9f5e21c,transparent 42%,#06182026);pointer-events:none}
.scene-hud-avatar .dock-model-portrait,.scene-hud-avatar .dock-character-head,.scene-hud-avatar canvas,.scene-hud-avatar img{width:100%;height:100%;border-radius:15px;object-fit:cover}
.scene-hud-vitals{flex:1;min-width:0;max-width:180px;padding-top:1px}
.scene-hud-name{display:flex;align-items:baseline;gap:5px;max-width:100%;padding:0;background:transparent!important;color:#fff6db!important;text-align:left;line-height:1.1;white-space:nowrap}
.scene-hud-name strong{overflow:hidden;text-overflow:ellipsis;font-size:14px;font-weight:750}
.scene-hud-name span{flex:none;font-size:10px;font-weight:650}
.scene-hud-meter{margin-top:4px}
.scene-hud-track{position:relative;display:flex;align-items:center;overflow:hidden;height:15px;border-radius:8px;background:#172c30bf;box-shadow:0 2px 6px #06151a55;font-style:normal}
.scene-hud-track em{position:absolute;inset:0 auto 0 0;display:block;height:100%;border-radius:inherit}
.scene-hud-meter-copy{position:relative;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:5px;width:100%;padding:0 6px;color:#fff9e9;font-size:9px;font-weight:600;line-height:1;white-space:nowrap;text-shadow:0 1px 2px #08212cc9}
.scene-hud-meter-copy b{font-size:9px;font-weight:750}
.scene-hud-meter-copy span{overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums}
.scene-hud-track.health{background:var(--game-health-track,#172c30bf)}
.scene-hud-track.health .scene-hud-meter-copy{color:var(--game-health-text,#ffe6ad);font-weight:700;text-shadow:0 1px 1px #541d27}
.scene-hud-track.health .scene-hud-meter-copy>span{color:var(--game-health-text,#ffe6ad);font-size:inherit;font-weight:750;text-shadow:0 1px 1px #541d27}
.scene-hud-track.health em{background:var(--game-health-fill,#c9344b)}
.scene-hud-track.xp em{background:linear-gradient(90deg,#e7ae4f,#f8db83)}
.scene-hud-links{display:flex;flex-direction:column;align-items:center;gap:4px;width:61px;margin-top:13px}
.scene-hud-links button{display:flex;flex-direction:column;align-items:center;justify-content:center;width:61px;min-height:59px;padding:2px 2px 4px;border-radius:12px;background:transparent!important;color:#fff3d7!important;font-size:11px;font-weight:750;line-height:1.1}
.scene-hud-links button.has-alert-dot{position:relative}
.scene-hud-links button.has-alert-dot::after{content:"";position:absolute;top:4px;right:7px;width:10px;height:10px;border-radius:50%;background:#ef4b55;box-shadow:0 2px 6px #091820b8;pointer-events:none}
.scene-hud-links button[data-tab="journal"]{position:relative}
.scene-hud-links .journal-signal{top:4px;right:7px;width:9px;height:9px;pointer-events:none;box-shadow:0 2px 6px #091820b8}
.journal-signal[hidden]{display:none!important}
.scene-hud-links button[data-tab="base"].is-under-attack{position:relative}
.scene-hud-links button[data-tab="base"].is-under-attack>img{animation:base-nav-hop 1.8s ease-in-out infinite}
.scene-hud-links button[data-tab="base"].is-under-attack::after{content:"!";position:absolute;top:10px;right:2px;display:grid;place-items:center;width:18px;height:18px;border-radius:50%;background:#df414b;color:#fff;font:900 14px/1 system-ui,sans-serif;box-shadow:0 2px 7px #091820bd;pointer-events:none}
@keyframes base-nav-hop{0%,46%,100%{transform:translateY(0)}13%{transform:translateY(-6px)}25%{transform:translateY(0)}35%{transform:translateY(-3px)}}
.reduce-motion .scene-hud-links button[data-tab="base"].is-under-attack>img{animation:none}
@media(prefers-reduced-motion:reduce){.scene-hud-links button[data-tab="base"].is-under-attack>img{animation:none}}
.scene-hud-links img{display:block;width:42px;height:42px;object-fit:contain;filter:drop-shadow(0 3px 3px #06141966)}
.scene-hud-links button[aria-current="page"] img:not(.airdrop-nav-crate){filter:drop-shadow(2px 0 #efc56e) drop-shadow(-2px 0 #efc56e) drop-shadow(0 2px #efc56e) drop-shadow(0 -2px #efc56e) drop-shadow(0 3px 5px #06141988)}
.scene-hud-links button[data-tab="activities"][aria-current="page"] img{filter:drop-shadow(2px 0 #efc56e) drop-shadow(-2px 0 #efc56e) drop-shadow(0 2px #efc56e) drop-shadow(0 -2px #efc56e) brightness(1.12)}
.scene-hud-links button[data-tab="activities"] img{transform:scale(1.08);filter:drop-shadow(0 3px 3px #06141966) brightness(1.12)}
.scene-hud-links button[data-tab="storage"] img{transform:scale(1.12)}
.scene-hud-links span{display:block;margin-top:1px}
.scene-hud-links small{margin-top:2px;font-size:9px;font-variant-numeric:tabular-nums;color:#ffe5ab}
.scene-hud-links button[data-tab="daily"]{position:relative}
.scene-hud-links button[data-tab="daily"].is-daily-ready::after{background:#64d5a0}
.scene-hud-links button[data-tab="daily"].is-daily-ready>img{animation:daily-ready-bounce 3.2s ease-in-out infinite}
@keyframes daily-ready-bounce{0%,18%,100%{transform:translateY(0)}6%{transform:translateY(-4px)}12%{transform:translateY(0)}15%{transform:translateY(-2px)}}
.reduce-motion .scene-hud-links button[data-tab="daily"].is-daily-ready>img{animation:none}
@media(prefers-reduced-motion:reduce){.scene-hud-links button[data-tab="daily"].is-daily-ready>img{animation:none}}
.scene-hud-links .scene-hud-daily-check{position:absolute;top:1px;right:5px;display:block;width:19px;height:19px;filter:drop-shadow(0 2px 4px #061820a6)}
.scene-hud-links .scene-hud-daily-check[hidden],.scene-hud-links [data-scene-daily-timer][hidden]{display:none}
.scene-panel-layer[hidden]{display:none!important}
body:has(.scene-panel-layer:not([hidden])){overflow:hidden}
.scene-panel-layer{position:fixed;z-index:500;inset:0;display:grid;place-items:center;padding:12px 24px calc(var(--scene-task-clearance,84px) + 12px);isolation:isolate}
.scene-panel-scrim{position:absolute;inset:0;z-index:-1;width:100%;height:100%;padding:0;border:0;border-radius:0;background:#03141bbd!important;backdrop-filter:blur(5px)}
.scene-panel-layer .scene-panel{display:flex;flex-direction:column;width:min(880px,100%);max-height:var(--scene-storage-popup-height);min-height:0;overflow:hidden;border:0!important;border-radius:20px;background:var(--game-popup-bg,#122e3b)!important;box-shadow:0 22px 70px #031117ad}
.scene-panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex:none;min-height:65px;padding:11px 14px 11px 22px;background:transparent}
.scene-panel-heading h2{font:650 20px/1.25 Segoe UI,system-ui,sans-serif;color:#f9efd5;letter-spacing:0}
.scene-panel-close{display:grid;place-items:center;flex:none;width:42px;height:42px;padding:0;border:0!important;border-radius:12px;background:#2a4b57!important;color:#e9f2ef!important;box-shadow:none!important}
.scene-panel-close>svg{display:block;flex:none;width:18px;height:18px}
.scene-panel-close:hover{background:#376170!important}
.scene-panel-scroll{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:18px;scrollbar-color:#5b7a80 transparent}
body:has(.scene-panel-layer:not([hidden])) #app .scene-panel-content.main-content{position:relative!important;inset:auto!important;display:block!important;width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;background:transparent!important}
body:has(#app .workspace):has(.scene-panel-layer:not([hidden])) #app .scene-panel-content.main-content{top:auto!important;padding:0!important}
.scene-panel-content>.page-heading:first-child{display:none}
.scene-panel-content[data-page="activities"]>.skills-page-heading{display:none}
.scene-panel-content[data-page="activities"]>.work-navigation{margin-top:0}
.scene-panel-content .storage-heading{display:none}
.scene-panel-content[data-page="journal"] .section-page-heading h1{display:none}
.scene-panel-content[data-page="storage"] .storage-view{position:relative!important;inset:auto!important;width:100%!important;height:min(var(--storage-six-row-height,374px),calc(100dvh - 125px))!important;min-height:0!important;max-height:calc(100dvh - 125px)!important;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0!important;overflow:hidden!important}
.scene-panel-content[data-page="storage"] .storage-view .storage-controls{flex:none;margin:0 0 8px}
#app:has(.workspace) .scene-panel-content.main-content[data-page="storage"] .storage-view .storage-controls{margin:0 0 8px}
.scene-panel-content[data-page="storage"] .storage-view .storage-items{flex:1 1 auto;min-height:0;max-height:none;overflow:hidden}
#app:has(.workspace) .scene-panel-content[data-page="storage"] .storage-view .inventory-item{border:0!important}
#app:has(.workspace) .scene-panel-content[data-page="storage"] .storage-view .inventory-item:not(.is-selected):not([aria-selected="true"]):not(.chosen){background:var(--game-popup-raised,#1c4355)!important;box-shadow:none!important}
#app .scene-panel-content[data-page="storage"] .storage-view .inventory-item.has-storage-durability>.storage-durability-fill{border:0!important}
body:has(.scene-panel-layer:not([hidden])) #app .scene-panel-content.main-content>.storage-view{top:0!important;right:auto!important;bottom:auto!important;left:auto!important}
body:has(#app .workspace):has(.scene-panel-layer:not([hidden])) #app .scene-panel-content.main-content>.storage-view{top:0!important;bottom:auto!important}
.scene-panel-layer .scene-panel:has(.scene-panel-content[data-page="storage"]){position:relative;width:min(470px,100%);background:var(--game-popup-bg,#122e3b)!important}
.scene-panel-layer .scene-panel:has(.scene-panel-content[data-page="storage"])::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:#ffd16b;z-index:1}
.scene-panel:has(.scene-panel-content[data-page="storage"]) .scene-panel-heading{min-height:76px;padding:16px 13px 9px 18px;background:transparent}
.scene-panel:has(.scene-panel-content[data-page="storage"]) .scene-panel-heading h2{font:700 27px/1.1 Georgia,serif;color:#ffebbd}
.scene-panel:has(.scene-panel-content[data-page="storage"]) .scene-panel-scroll{padding:4px 12px 12px}
.scene-panel-content[data-page="storage"] .storage-view .storage-controls{gap:6px}
.scene-panel-content[data-page="storage"] .storage-filter-select,.scene-panel-content[data-page="storage"] .storage-clear-filters,.scene-panel-content[data-page="storage"] .storage-search-toggle{background:var(--game-popup-raised,#1c4355)!important;box-shadow:none!important}
.scene-panel-layer .scene-panel:has(.scene-panel-content[data-page="daily"]){position:relative;width:min(470px,100%);background:var(--game-popup-bg,#122e3b)!important}
.scene-panel-layer .scene-panel:has(.scene-panel-content[data-page="daily"])::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:#ffd16b;z-index:1}
.scene-panel:has(.scene-panel-content[data-page="daily"]) .scene-panel-heading{justify-content:flex-start;gap:10px;min-height:76px;padding:16px 13px 9px 18px;background:transparent}
.scene-panel:has(.scene-panel-content[data-page="daily"]) .scene-panel-heading h2{font:700 27px/1.1 Georgia,serif;color:#ffebbd;white-space:nowrap}
.scene-daily-reset{margin-right:auto;color:#a7bdc4;font-size:9px;white-space:nowrap;font-variant-numeric:tabular-nums}
.scene-panel:has(.scene-panel-content[data-page="daily"]) .scene-panel-scroll{padding:4px 12px 12px}
.scene-daily-panel{--daily-gold:#ffd16b;display:grid;gap:12px;color:#e8f0ed}
.scene-daily-goal,.scene-daily-days-card,.scene-daily-finale{border:0;border-radius:13px;background:var(--game-popup-raised,#1c4355);box-shadow:0 5px 18px #071e2838}
.scene-daily-goal{display:grid;grid-template-columns:minmax(0,1fr) 96px;align-items:center;gap:10px;min-height:110px;padding:12px 11px 12px 14px}
.scene-daily-goal-main{min-width:0}
.scene-daily-goal-main h3{margin:0 0 13px;color:#ffebbd;font:700 17px/1.2 Georgia,serif}
.scene-daily-progress{display:flex;align-items:center;gap:8px}
.scene-daily-progress progress{appearance:none;-webkit-appearance:none;flex:1;min-width:20px;height:10px;overflow:hidden;border:0;border-radius:4px;background:#315768}
.scene-daily-progress progress::-webkit-progress-bar{border-radius:4px;background:#315768}
.scene-daily-progress progress::-webkit-progress-value{border-radius:4px;background:var(--daily-gold)}
.scene-daily-progress progress::-moz-progress-bar{border-radius:4px;background:var(--daily-gold)}
.scene-daily-progress b{flex:none;color:#f5e9cb;font-size:10px;font-weight:700;white-space:nowrap}
.scene-daily-pending{margin:0;color:#b8cbd0;font-size:10px;line-height:1.35}
.scene-daily-reward{display:grid;align-content:center;justify-items:center;gap:7px;align-self:stretch;min-width:0;padding:9px 5px;border-radius:11px;background:#153745;color:var(--daily-gold);text-align:center}
.scene-daily-reward small,.scene-daily-boost small{color:#b2c5c7;font-size:8px;font-weight:800;letter-spacing:.12em}
.scene-daily-reward strong{font-size:12px;line-height:1.15;white-space:nowrap}
.scene-daily-claimed{font-size:10px;font-weight:750}
.scene-daily-reward .scene-daily-action{min-height:28px;width:100%;padding:5px 7px;border:0!important;border-radius:7px;background:var(--daily-gold)!important;color:#17313b!important;font-size:10px;font-weight:800;box-shadow:none!important}
.scene-daily-reward .scene-daily-action[data-action="claim-daily"]{background:linear-gradient(110deg,#52dc89,#a2ffbe,#48dca0,#52dc89)!important;background-size:250% 100%!important;color:#073723!important;box-shadow:0 0 17px #67f3a04d!important}
.scene-daily-reward .scene-daily-action[data-action="claim-daily"]:hover:not(:disabled){background-position:50% 50%!important;box-shadow:0 0 22px #67f3a070!important}
.scene-daily-days-card{padding:20px 12px}
.scene-daily-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.scene-daily-day{display:grid;place-items:center;gap:1px;min-width:0;min-height:55px;padding:5px 1px;border-radius:9px;background:#264b5b;color:#9dbac2}
.scene-daily-day b{display:grid;place-items:center;min-height:22px;font-size:18px;line-height:1}
.scene-daily-day small{font-size:9px;font-weight:800}
.scene-daily-day.is-earned{background:#315d72;color:#dfeef1}
.scene-daily-day.is-next{background:#3b5864;color:var(--daily-gold)}
.scene-daily-day.is-final{background:#385669;color:var(--daily-gold)}
.scene-daily-day.is-final.is-earned{background:#496b80;color:#fff0cb}
.scene-daily-day .completion-tick{width:19px;height:19px}
.scene-daily-finale{display:flex;align-items:center;gap:11px;min-height:109px;padding:11px 9px}
.scene-daily-prize-art{display:grid;place-items:center;flex:none;width:80px;height:78px}
.scene-daily-prize-art>img,.scene-daily-prize-art>.item-icon{display:block;width:76px;height:76px;object-fit:contain;filter:drop-shadow(0 4px 6px #07182078)}
.scene-daily-finale-copy{flex:1;min-width:0}
.scene-daily-finale-copy strong{display:block;color:#ffebbd;font:700 17px/1.15 Georgia,serif}
.scene-daily-finale-copy p{margin:6px 0 0;color:#b7cbd1;font-size:10px}
.scene-daily-boost{display:grid;align-content:center;justify-items:center;gap:5px;flex:none;width:99px;min-height:73px;padding:6px;border-radius:10px;background:#2b5263;color:var(--daily-gold);text-align:center}
.scene-daily-boost strong{font-size:26px;line-height:1}
.scene-daily-boost.is-active{background:#153746;color:#8be6b7;box-shadow:none}
.scene-daily-boost.is-active small{color:#b7cbd1}
.scene-daily-boost.is-active strong{text-shadow:none}
/* Quests uses the same compact popup frame as Daily Goal. */
.scene-panel-layer .scene-panel:has(.scene-panel-content[data-page="journal"]){position:relative;width:min(470px,100%);background:var(--game-popup-bg,#122e3b)!important}
.scene-panel-layer .scene-panel:has(.scene-panel-content[data-page="journal"])::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:#ffd16b;z-index:1}
.scene-panel:has(.scene-panel-content[data-page="journal"]) .scene-panel-heading{min-height:76px;padding:16px 13px 9px 18px;background:transparent}
.scene-panel:has(.scene-panel-content[data-page="journal"]) .scene-panel-heading h2{font:700 27px/1.1 Georgia,serif;color:#ffebbd}
.scene-panel:has(.scene-panel-content[data-page="journal"]) .scene-panel-scroll{padding:4px 12px 16px}
.scene-panel-content[data-page="journal"] .journal-toolbar{margin:0 0 12px;padding:0;background:transparent!important}
.scene-panel-content[data-page="journal"] .journal-primary-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;margin:0;padding:5px;gap:3px;border:0;border-radius:13px;background:#173947;overflow:visible}
.scene-panel-content[data-page="journal"] .journal-primary-tabs button{min-height:40px;border:0!important;border-radius:9px;background:transparent!important;color:#b9cbd0;box-shadow:none!important;font-size:11px}
.scene-panel-content[data-page="journal"] .journal-primary-tabs button.selected{background:#2c5a6b!important;color:#ffe8b8}
.scene-panel-content[data-page="journal"] .quest-journey{gap:11px}
.scene-panel-content[data-page="journal"] .quest-journey .quest-current{padding:15px}
.scene-panel-content[data-page="journal"] .quest-current-header .eyebrow{color:#ffd16b;font-size:9px;letter-spacing:.14em}
.scene-panel-content[data-page="journal"] .quest-current>strong,.scene-panel-content[data-page="journal"] .quest-current-copy strong{color:#ffebbd}
#app .scene-panel-content[data-page="journal"] .quest-journey .quest-roadmap{padding:15px!important}
.scene-panel-content[data-page="journal"] .quest-journey .quest-roadmap>header{margin:0 0 10px;padding:0}
.scene-panel-content[data-page="journal"] .quest-journey .quest-roadmap>header h2{color:#ffebbd;font:700 17px/1.2 Georgia,serif}
.scene-panel-content[data-page="journal"] .quest-more-note{margin:0;color:#b9cbd0;text-align:center;font-size:11px}
.scene-panel-content[data-page="journal"] .quest-roadmap-row{border:0!important;background:#173947;box-shadow:none!important}
.scene-panel-content[data-page="journal"] .quest-roadmap-detail{border:0!important;background:#173947}
.scene-panel-content[data-page="journal"] .quest-current-actions{max-width:100%}
.scene-panel-content[data-page="journal"] .quest-current-actions>.primary{border:0!important;box-shadow:0 5px 14px #071e284d!important}
/* Shared card and inset surfaces across all three journal tabs. */
#app:has(.workspace) .scene-panel-content[data-page="journal"] :is(.quest-current,.quest-roadmap,.beta-event,.tutorial-chapters,.quests-locked,.community-coming,.event-announcement){border:0!important;border-radius:13px;background:var(--game-popup-raised,#1c4355)!important;box-shadow:0 5px 18px #071e2838!important}
#app:has(.workspace) .scene-panel-content[data-page="journal"] :is(.beta-event,.tutorial-chapters){width:100%;max-width:none;margin:0;padding:15px}
#app .scene-panel-content[data-page="journal"] .beta-event-header{padding:0}
#app .scene-panel-content[data-page="journal"] .beta-event-body{padding:14px 0 0}
#app:has(.workspace) .scene-panel-content[data-page="journal"] .tutorial-chapters>header{margin:0 0 14px;padding:0;background:transparent}
#app .scene-panel-content[data-page="journal"] .tutorial-chapters>header h2{color:#ffebbd;font-size:20px;line-height:1.25}
#app:has(.workspace) .scene-panel-content[data-page="journal"] :is(.tutorial-chapter,.tutorial-rewards span,.tutorial-complete-footer,.event-objectives>div,.quest-project-checklist button){border:0!important;background:#173947!important;box-shadow:none!important}
#app .scene-panel-content[data-page="journal"] .tutorial-rewards span{border-radius:9px;padding:6px 8px}
#app:has(.workspace) .scene-panel-content[data-page="journal"] .tutorial-chapter{margin:8px 0;padding:10px 12px;border-radius:11px}
#app:has(.workspace) .scene-panel-content[data-page="journal"] .tutorial-chapter.is-current{background:#2c5a6b!important}
#app .scene-panel-content[data-page="journal"] .beta-event .button-row>button:not(.primary){background:#173947!important;color:#e8f0ed}
.scene-panel-layer .scene-panel:has(.scene-panel-content[data-page="activities"]){position:relative;width:min(470px,100%);background:var(--game-popup-bg,#122e3b)!important}
.scene-panel-layer .scene-panel:has(.scene-panel-content[data-page="activities"])::before{content:"";position:absolute;top:0;left:0;right:0;height:4px;background:#ffd16b;z-index:1}
.scene-panel:has(.scene-panel-content[data-page="activities"]) .scene-panel-heading{min-height:76px;padding:16px 13px 9px 18px;background:transparent}
.scene-panel:has(.scene-panel-content[data-page="activities"]) .scene-panel-heading h2{font:700 27px/1.1 Georgia,serif;color:#ffebbd}
.scene-panel:has(.scene-panel-content[data-page="activities"]) .scene-panel-scroll{padding:4px 12px 16px}
.scene-panel-content[data-page="activities"] .work-navigation{margin:0 0 12px}
.scene-panel-content[data-page="activities"] .work-navigation :is(.work-search-toggle,.work-skill-select,.work-overview-link){background:var(--game-popup-raised,#1c4355)!important;box-shadow:none!important}
.scene-panel-content[data-page="activities"] .work-search{border:0!important;box-shadow:none!important}
.scene-panel-content[data-page="activities"] #skills-content .activity-card:is(.is-recommended,.is-daily){border:0!important;box-shadow:0 7px 20px #071e284d!important}
@media(min-width:801px){.scene-panel-layer .scene-panel:has(.scene-panel-content[data-page="activities"]){width:min(880px,100%)}}
.scene-panel-layer button:focus-visible,.scene-hud button:focus-visible{outline:2px solid #ffdd8d;outline-offset:3px}
@media(max-width:600px){.scene-hud{top:max(10px,env(safe-area-inset-top));left:max(9px,env(safe-area-inset-left));width:min(264px,calc(100vw - 70px))}.scene-hud-avatar{flex-basis:46px;width:46px;height:46px}.scene-hud-identity{gap:8px}.scene-hud-vitals{max-width:195px}.scene-hud-name strong{font-size:12px}.scene-hud-name span{font-size:9px}.scene-hud-meter{margin-top:3px}.scene-hud-track{height:13px}.scene-hud-meter-copy,.scene-hud-meter-copy b{font-size:8px}.scene-hud-links{width:54px;gap:2px;margin-top:12px}.scene-hud-links button{width:54px;min-height:53px;font-size:10px}.scene-hud-links img{width:37px;height:37px}.scene-panel-layer{padding:10px clamp(18px,4.5vw,28px) calc(var(--scene-task-clearance,84px) + 10px)}.scene-panel-layer .scene-panel{border-radius:16px}.scene-panel-heading{min-height:59px;padding:9px 10px 9px 16px}.scene-panel-heading h2{font-size:18px}.scene-panel-scroll{padding:12px}.scene-panel-content[data-page="storage"] .storage-view{height:min(var(--storage-six-row-height,374px),calc(100dvh - 97px))!important;max-height:calc(100dvh - 97px)!important}.scene-panel:has(.scene-panel-content[data-page="daily"]) .scene-panel-heading{min-height:68px;padding:13px 12px 8px 15px;gap:8px}.scene-panel:has(.scene-panel-content[data-page="daily"]) .scene-panel-heading h2{font-size:23px}.scene-daily-reset{font-size:8px}.scene-panel:has(.scene-panel-content[data-page="daily"]) .scene-panel-scroll{padding:3px 10px 10px}.scene-daily-panel{gap:10px}.scene-daily-goal{grid-template-columns:minmax(0,1fr) 84px;min-height:99px;padding:10px}.scene-daily-goal-main h3{font-size:15px}.scene-daily-reward strong{font-size:11px}.scene-daily-days-card{padding:17px 10px}.scene-daily-days{gap:4px}.scene-daily-day{min-height:48px;border-radius:8px}.scene-daily-finale{min-height:94px;gap:7px;padding:8px}.scene-daily-prize-art{width:65px;height:65px}.scene-daily-prize-art>img,.scene-daily-prize-art>.item-icon{width:63px;height:63px}.scene-daily-finale-copy strong{font-size:14px}.scene-daily-boost{width:82px;min-height:66px;padding:4px}.scene-daily-boost small{font-size:7px}.scene-daily-boost strong{font-size:23px}}
@media(max-height:690px){.scene-hud-links{gap:0;margin-top:8px}.scene-hud-links button{min-height:46px}.scene-hud-links img{width:33px;height:33px}.scene-hud-links small{display:none}}
@media(max-height:610px) and (max-width:390px){.scene-hud-links{gap:0;margin-top:4px}.scene-hud-links button{min-height:39px;padding:0 2px;font-size:8px}.scene-hud-links img{width:27px;height:27px}.scene-hud-links small{display:none}}
@media(max-width:340px){.scene-daily-finale{gap:5px}.scene-daily-prize-art{width:56px;height:60px}.scene-daily-prize-art>img,.scene-daily-prize-art>.item-icon{width:56px;height:56px}.scene-daily-finale-copy strong{font-size:13px}.scene-daily-boost{width:73px}}

/* Keep the active Idle Skills task visible on each full-screen scene. */
.scene-task-dock{position:fixed;z-index:95;left:0;right:0;bottom:0;width:100%;transform:none;pointer-events:auto}
/* The tutorial reserves its own space above the task dock (rules below). */
#app .scene-task-dock .activity-bar{position:relative!important;inset:auto!important;display:flex!important;align-items:center;width:100%!important;height:auto!important;min-height:64px!important;box-sizing:border-box;margin:0;padding:9px max(12px,env(safe-area-inset-right,0px)) calc(9px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px))!important;gap:8px!important;border:0!important;border-radius:12px 12px 0 0!important;background:var(--game-popup-bg,#122e3b)!important;box-shadow:0 -4px 18px #061a2255!important;backdrop-filter:blur(12px)}
.scene-task-dock .activity-symbol{display:grid!important;place-items:center;flex:none;width:38px;height:38px;border:0;border-radius:10px;background:var(--game-popup-raised,#1c4355)}
.scene-task-dock .activity-symbol .skill-icon{width:32px;height:32px}
/* Balance the artwork's slightly uneven transparent padding inside the tile. */
.scene-task-dock .scene-idle-skills-icon{display:block;width:32px;height:32px;object-fit:contain;transform:translate(1px,1px)}
.scene-task-dock .activity-detail{display:flex;flex:1;flex-direction:column;align-items:stretch;justify-content:center;gap:4px;min-width:0}
.scene-task-dock .activity-title{display:flex;align-items:baseline;gap:6px;min-width:0;margin:0;font-size:11px;line-height:1.2}
.scene-task-dock .activity-title>.activity-tool-warning{align-self:baseline;font-family:inherit;letter-spacing:0}
.scene-task-dock .activity-title>b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#f8e8c5;font-weight:500}
.scene-task-dock .activity-title>span{flex:none;margin-left:auto;color:#bed3d0;white-space:nowrap}
.scene-task-dock .activity-detail>small{display:block!important;overflow:hidden;margin:0;color:#aec8c8;font-size:9px;line-height:1.2;text-overflow:ellipsis;white-space:nowrap}
.scene-task-dock .activity-bar .progress{height:4px;margin:0;border-radius:99px;overflow:hidden;background:#2b4a55}
.scene-task-dock .activity-bar>button{display:grid;place-items:center;flex:none;min-height:38px;padding:8px 10px;border:0!important;border-radius:10px;background:var(--game-popup-raised,#1c4355);color:#e9eee2;font-size:10px;white-space:nowrap;box-shadow:none!important}
.scene-task-dock .activity-bar>button:hover:not(:disabled){background:#386575}
.scene-task-dock .activity-bar>.task-pause{flex:0 0 38px;width:38px!important;min-width:38px!important;height:38px!important;min-height:38px!important;padding:0!important;border-radius:10px;color:#f6d078;background:var(--game-popup-raised,#1c4355)!important}
.scene-task-dock .activity-bar>.task-pause:hover:not(:disabled){background:#37677c!important}
.scene-task-dock .activity-bar>[data-action="nav"][data-tab="activities"]{display:grid!important;background:#e5bd68;color:#20343b;font-weight:600}
.scene-task-dock .activity-bar>[data-action="nav"][data-tab="activities"]:hover{background:#f4d188}
.scene-task-dock button:focus-visible{outline:2px solid #ffd166;outline-offset:3px}
.scene-task-dock .activity-bar>button{position:relative;z-index:2}
#app .scene-task-dock .activity-bar>.scene-task-open{position:absolute;inset:0;z-index:1;width:100%;height:100%;min-height:0;padding:0;border-radius:inherit;background:transparent!important;cursor:pointer}
#app .scene-task-dock .scene-task-open:focus-visible{outline-offset:-3px}
@media(max-width:360px){.scene-task-dock .activity-title{flex-wrap:wrap;row-gap:2px}.scene-task-dock .activity-title>b{flex:1 1 auto}.scene-task-dock .activity-title>span{order:1}.scene-task-dock .activity-title>.activity-tool-warning{order:2;flex-basis:100%;margin:0;white-space:nowrap}}
#app:has(.scene-task-dock:not([hidden])) .base3d-build-rail{--build-bottom:calc(var(--scene-task-clearance,84px) + 24px)}
#app:has(.scene-task-dock:not([hidden])) :is(.base3d-planting-controls,.base3d-path-controls){bottom:max(calc(var(--scene-task-clearance,84px) + 18px),calc(clamp(150px,22dvh,240px) + env(safe-area-inset-bottom,0px)))}
#app:has(.scene-task-dock:not([hidden])) .world-map-screen{bottom:0!important}
#app:has(.scene-task-dock:not([hidden])) .workspace>.main-content[data-page="base"],#app:has(.scene-task-dock:not([hidden])) .workspace>.main-content[data-page="expedition-map"]{bottom:0!important;inset-block-end:0!important;height:100dvh!important}
#app:has(.scene-task-dock:not([hidden])) .main-content[data-page="character"]{bottom:0!important;inset-block-end:0!important}
#app:has(.scene-task-dock:not([hidden])) .character-rpg .survivor-scene{height:100dvh!important;min-height:100dvh!important}
@media(min-width:801px){#app:has(.scene-task-dock:not([hidden])) .character-rpg .survivor-scene{height:calc(100dvh - 90px)!important;min-height:560px!important}}
@media(max-width:800px){
 body:not(.has-opening-tour) #app:has(.scene-task-dock:not([hidden])) .character-rpg .survivor-stage .adventure-launch{bottom:calc(max(var(--app-dock-height,0px),var(--scene-task-clearance,84px)) + 12px)!important}
}

/* Quarters lives in the base popup. The roster scrolls with the sheet, not sideways. */
#app .scene-panel-layer .scene-panel:has(.scene-panel-content[data-page="survivors"] .crew-scene){width:min(760px,100%);background:var(--game-popup-bg,#122e3b)!important}
#app .scene-panel-content[data-page="survivors"] .crew-scene{display:block;height:auto;max-height:none;min-height:0;margin:0;padding:0;background:none;overflow:visible}
#app .scene-panel-content[data-page="survivors"] .crew-overview{display:grid;grid-template-columns:132px minmax(0,1fr) auto;gap:12px;align-items:stretch;margin-bottom:22px}
#app .scene-panel-content[data-page="survivors"] .crew-count,
#app .scene-panel-content[data-page="survivors"] .crew-water{display:flex;justify-content:center;align-items:flex-start;flex-direction:column;min-width:0;margin:0;padding:13px 16px;border-radius:15px;background:var(--game-popup-raised,#1c4355);box-shadow:none}
#app .scene-panel-content[data-page="survivors"] .crew-count .meta{color:#a6c9c4;font-size:9px;font-weight:700;letter-spacing:1.2px}
#app .scene-panel-content[data-page="survivors"] .crew-count strong{display:block;margin:4px 0 1px;font-size:25px;line-height:1;color:#f4d27f}
#app .scene-panel-content[data-page="survivors"] .crew-count strong span{font-size:16px;color:#bdcfd0;font-weight:500}
#app .scene-panel-content[data-page="survivors"] .crew-count small{font-size:10px;color:#a8c2c6}
#app .scene-panel-content[data-page="survivors"] .crew-water{flex-direction:row;justify-content:flex-start;align-items:center;gap:10px}
#app .scene-panel-content[data-page="survivors"] .crew-water .item-icon{flex:none}
#app .scene-panel-content[data-page="survivors"] .crew-water b{font-size:14px;color:#eaf3f2}
#app .scene-panel-content[data-page="survivors"] .crew-water small{font-size:10px;color:#abc4c9;line-height:1.35}
#app .scene-panel-content[data-page="survivors"] .crew-upgrade{align-self:stretch;padding:0 17px;border:0;border-radius:14px;background:#d9b465!important;color:#122b35!important;font-size:12px;font-weight:800;white-space:nowrap;box-shadow:0 5px 14px #071a2140}
#app .scene-panel-content[data-page="survivors"] .crew-upgrade:hover{background:#edca79!important}
#app .scene-panel-content[data-page="survivors"] .crew-upgrade span{margin-left:5px;font-size:16px}
#app .scene-panel-content[data-page="survivors"] .crew-repair{display:block;width:100%;margin:-8px 0 18px;background:#51343b!important;color:#ffb7a8!important}
#app .scene-panel-content[data-page="survivors"] .crew-roster-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 11px}
#app .scene-panel-content[data-page="survivors"] .crew-roster-heading h3{font-size:15px;color:#f6ebce}
#app .scene-panel-content[data-page="survivors"] .crew-roster-heading span{font-size:10px;color:#a8c0c6;text-align:right}
#app .scene-panel-content[data-page="survivors"] .crew-roster.survivor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex:none;gap:13px!important;min-height:0;margin:0;padding:0 0 4px;overflow:visible;scroll-snap-type:none;scrollbar-width:auto}
#app .scene-panel-content[data-page="survivors"] .crew-roster .survivor-card{display:flex;flex-direction:column;flex-basis:auto;gap:11px;min-width:0;min-height:0;max-height:none;margin:0;padding:16px;overflow:visible;scroll-snap-align:none;border:0;border-radius:17px;background:var(--game-popup-raised,#1c4355)!important;box-shadow:0 7px 22px #06182045!important}
#app .scene-panel-content[data-page="survivors"] .crew-roster .resident-heading{display:flex;flex-direction:row;align-items:center;gap:12px;min-height:0;text-align:left}
#app .scene-panel-content[data-page="survivors"] .crew-roster .crew-portrait{width:64px;height:64px;flex:0 0 64px;border-radius:13px;box-shadow:0 5px 13px #07192255}
#app .scene-panel-content[data-page="survivors"] .crew-roster .crew-identity{min-width:0;flex:1}
#app .scene-panel-content[data-page="survivors"] .crew-roster .crew-number{font-size:9px;color:#d7ae64;letter-spacing:1.1px}
#app .scene-panel-content[data-page="survivors"] .crew-roster .crew-name-row h2{margin:3px 0 0;font-size:19px;color:#f7f0e2}
#app .scene-panel-content[data-page="survivors"] .crew-roster .resident-needs{margin:3px 0 1px;padding:0;font-size:10px;color:#9cdbc0}
#app .scene-panel-content[data-page="survivors"] .crew-roster .resident-status{font-size:10px;color:#d4bb77}
#app .scene-panel-content[data-page="survivors"] .crew-roster .assignment-current{flex:none;margin:0;padding:12px 13px;border-radius:12px;background:#15313c!important}
#app .scene-panel-content[data-page="survivors"] .crew-roster .assignment-current h3{margin:5px 0 8px;font-size:14px;color:#f0f4f2}
#app .scene-panel-content[data-page="survivors"] .crew-roster .assignment-current small{font-size:10px}
#app .scene-panel-content[data-page="survivors"] .crew-roster .button-row{display:flex;gap:8px;margin:0}
#app .scene-panel-content[data-page="survivors"] .crew-roster .button-row button{min-height:38px;border-radius:10px}
#app .scene-panel-content[data-page="survivors"] .crew-roster .assignment-tracker{flex:none;max-height:none;margin:0;padding:1px 0 0;overflow:visible}
#app .scene-panel-content[data-page="survivors"] .crew-roster .assignment-output{min-height:0;margin:4px 0}
#app .scene-panel-content[data-page="survivors"] .crew-roster .empty-resident{align-items:center;justify-content:center;text-align:center;background:linear-gradient(150deg,#1b3944,#152f3b)!important}
#app .scene-panel-content[data-page="survivors"] .crew-roster .empty-resident.locked-slot{background:#162e39!important}
#app .scene-panel-content[data-page="survivors"] .crew-roster .empty-resident-symbol{width:62px;height:62px;margin:3px auto}
#app .scene-panel-content[data-page="survivors"] .crew-roster .empty-resident h2{font-size:15px}
#app .scene-panel-content[data-page="survivors"] .crew-roster .empty-resident p{max-width:220px;font-size:11px;line-height:1.45}
@media(max-width:700px){
 
 #app .scene-panel-content[data-page="survivors"] .crew-overview{grid-template-columns:1fr 1.3fr;gap:9px;margin-bottom:18px}
 #app .scene-panel-content[data-page="survivors"] .crew-count,#app .scene-panel-content[data-page="survivors"] .crew-water{min-height:75px;padding:11px}
 #app .scene-panel-content[data-page="survivors"] .crew-water{gap:5px}
 #app .scene-panel-content[data-page="survivors"] .crew-water .item-icon{transform:scale(.8);transform-origin:left center}
 #app .scene-panel-content[data-page="survivors"] .crew-water small{font-size:9px}
 #app .scene-panel-content[data-page="survivors"] .crew-upgrade{grid-column:1/-1;min-height:39px}
 #app .scene-panel-content[data-page="survivors"] .crew-roster.survivor-grid{grid-template-columns:minmax(0,1fr)}
 #app .scene-panel-content[data-page="survivors"] .crew-roster .survivor-card{padding:14px}
}

/* Every page uses the same edge-to-edge task dock; panels reserve its measured height. */
#app>.workspace>.scene-task-dock{z-index:900}
.scene-panel-layer:not([hidden]){bottom:0}
/* Six storage rows set the height ceiling for every scene popup. */
.scene-panel-layer{--scene-storage-popup-height:min(600px,66dvh,calc(min(470px,calc(100vw - clamp(36px,9vw,56px))) + 112px),calc(100dvh - var(--scene-task-clearance,84px) - 24px))}
.scene-panel-layer:has(.scene-panel-content:is([data-page="activities"],[data-page="journal"])){--scene-storage-popup-height:min(680px,74dvh,calc(min(470px,calc(100vw - clamp(36px,9vw,56px))) + 192px),calc(100dvh - var(--scene-task-clearance,84px) - 24px))}
#app .scene-panel-layer .scene-panel{max-height:var(--scene-storage-popup-height)!important}
.scene-task-dock-panel{z-index:2}

/* One shell colour for every game dialog, including older facility and character sheets. */
body:has(#app .workspace) #modal .modal,
body:has(#app .workspace) #modal .modal .modal-fixed-head,
body:has(#app .workspace) #modal .modal .modal-scroll-body{background:var(--game-popup-bg,#122e3b)!important}

/* Expedition receipts share the storage-sized popup, with only the haul scrolling. */
body #modal .modal-backdrop.expedition-result-backdrop{position:fixed!important;inset:0!important;display:flex!important;align-items:center!important;justify-content:center!important;padding:max(16px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))!important;background:#03141bbd!important;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
body #modal .modal.loot-report.expedition-result-dialog{position:relative!important;inset:auto!important;display:flex!important;flex-direction:column;width:min(470px,100%)!important;max-width:470px!important;height:auto!important;min-height:0!important;max-height:min(680px,76dvh,calc(min(470px,calc(100vw - clamp(36px,9vw,56px))) + 192px),calc(100dvh - 32px))!important;margin:0!important;padding:0!important;overflow:hidden!important;border:0!important;border-radius:20px!important;background:var(--game-popup-bg,#122e3b)!important;box-shadow:0 22px 70px #031117ad!important}
body #modal .expedition-result-dialog::before{content:'';position:absolute;inset:0 0 auto;height:4px;background:#ffd166;z-index:3;pointer-events:none}
body #modal .expedition-result-dialog .modal-fixed-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;min-height:64px;padding:14px 14px 10px 18px!important;border:0!important}
body #modal .expedition-result-dialog .modal-fixed-head h2{margin:0;font:700 clamp(20px,5.7vw,26px)/1.15 Georgia,serif;letter-spacing:0;color:#ffebbd}
body #modal .expedition-result-dialog .modal-close{position:static!important;display:grid;place-items:center;flex:none;width:36px;height:36px;padding:0;border:0;border-radius:11px;background:var(--game-popup-raised,#1c4355)!important;box-shadow:none!important}
body #modal .expedition-result-dialog .modal-scroll-body{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;max-height:none;padding:0 14px 14px!important;overflow:hidden!important}
body #modal .expedition-result-dialog .compact-expedition-report{display:flex;flex-direction:column;flex:1 1 auto;gap:10px;width:100%;max-width:none;height:auto;max-height:none;min-height:0;margin:0!important;padding:0!important;overflow:hidden;text-align:left}
body #modal .expedition-result-dialog .expedition-haul-summary{display:flex;align-items:center;flex:none;gap:12px;padding:10px 12px;border-radius:13px;background:var(--game-popup-raised,#1c4355)}
body #modal .expedition-result-dialog .expedition-haul-summary>img{width:56px;height:56px;object-fit:contain;flex:none}
body #modal .expedition-result-dialog .expedition-haul-summary>div{min-width:0;flex:1}
body #modal .expedition-result-dialog .expedition-haul-summary strong{color:#ffe3a0;font-size:14px;line-height:1.3}
body #modal .expedition-result-dialog .expedition-haul-summary p{margin:4px 0;color:#acc0c6;font-size:11px;line-height:1.3}
body #modal .expedition-result-dialog .expedition-result-facts{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:6px 16px;margin:6px 0 0}
body #modal .expedition-result-dialog .expedition-result-facts>span{display:flex;align-items:baseline;flex:none;gap:5px;min-width:0;margin:0;padding:0;border:0;background:none;box-shadow:none}
body #modal .expedition-result-dialog .expedition-result-facts>span b{font-size:12px;line-height:1.3;color:#ffd166}
body #modal .expedition-result-dialog .expedition-result-facts>span small{font-size:10px;line-height:1.3;color:#acc0c6}
body #modal .expedition-result-dialog :is(.expedition-stop-reason,.warning){margin:0;flex:none;font-size:11px;line-height:1.4}
body #modal .expedition-result-dialog .expedition-reward-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:0;scrollbar-width:none}
body #modal .expedition-result-dialog .expedition-rewards{display:grid;grid-template-columns:minmax(0,1fr);gap:7px!important;margin:0;padding:0}
body #modal .expedition-result-dialog .compact-expedition-report .expedition-reward{grid-template-columns:36px minmax(0,1fr) auto;grid-template-rows:1fr;gap:9px;height:auto;min-height:53px!important;padding:7px 10px!important;border:0!important;border-radius:12px!important;background:var(--game-popup-raised,#1c4355)!important;box-shadow:none!important;transform:none}
body #modal .expedition-result-dialog .compact-expedition-report .expedition-reward .item-art,body #modal .expedition-result-dialog .compact-expedition-report .expedition-reward .item-art>.item-icon{width:36px!important;height:36px!important;max-width:36px!important;max-height:36px!important;min-width:0;background:none}
body #modal .expedition-result-dialog .compact-expedition-report .expedition-reward b{display:block;white-space:normal;overflow-wrap:anywhere;font-size:12px!important;line-height:1.3}
body #modal .expedition-result-dialog .compact-expedition-report .expedition-reward small{align-self:center;font-size:12px!important;line-height:1.3}
body #modal .expedition-result-dialog .expedition-reward:hover:not(:disabled){background:#2c5260!important}
body #modal .expedition-result-dialog .expedition-result-actions{flex:none;padding:0 0 3px;background:none}
body #modal .expedition-result-dialog .expedition-result-actions>button{min-height:42px;margin:0;font-weight:750}
body #modal .expedition-result-dialog .loot-detail-view{width:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none}
body #modal .expedition-result-dialog .loot-detail-card{margin-top:8px;padding:16px;border:0;background:var(--game-popup-raised,#1c4355);box-shadow:none}
body #modal .expedition-result-dialog .loot-detail-art{height:85px}
body #modal .expedition-result-dialog .loot-detail-art .item-icon{max-height:80px;max-width:80px}
body #modal .expedition-result-dialog .loot-detail-card h2{font-size:20px;margin:8px 0}
body #modal .expedition-result-dialog .loot-detail-card p{font-size:12px;line-height:1.5}
body #modal .expedition-result-dialog :is(.expedition-reward-scroll,button):focus-visible{outline:2px solid #ffd166;outline-offset:-2px}
body #modal .expedition-result-dialog :is(.expedition-reward-scroll,.loot-detail-view)::-webkit-scrollbar{display:none}

/* A dedicated guide dock, separate from the task bar and every interactive drawer. */
body.tutorial-active .scene-task-dock{display:none!important}
body.has-opening-tour{--tutorial-reserved:calc(var(--opening-guide-height,112px) + 12px)}
body #opening-tour-host{top:auto!important;bottom:0!important;left:0!important;right:0!important;transform:none;width:100%!important;max-height:36dvh;padding-bottom:env(safe-area-inset-bottom,0px);background:var(--game-popup-bg,#122e3b);border-radius:15px 15px 0 0}
body #opening-tour{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 14px;position:relative;max-height:calc(36dvh - env(safe-area-inset-bottom,0px));overflow-y:auto;padding:13px 36px 13px 14px;border:0!important;border-radius:15px 15px 0 0;background:var(--game-popup-bg,#122e3b)!important;box-shadow:0 10px 28px #03141b66}
body #opening-tour .opening-guide-heading{gap:8px}
body #opening-tour .opening-guide-heading strong{font-size:13px;line-height:1.25;color:#ffe3a4}
body #opening-tour .opening-guide-heading>span{font-size:10px;letter-spacing:0}
body #opening-tour .opening-guide-copy p{margin:5px 0 0;font-size:11px;line-height:1.45;color:#c7d8dc}
body #opening-tour .opening-guide-actions{margin:0}
body #opening-tour .opening-guide-actions .primary{min-width:0;min-height:40px!important;padding:9px 12px;font-size:11px;white-space:normal;border:0}
body #opening-tour .opening-note-close{position:absolute;top:8px;right:7px;width:26px;height:26px;min-height:0;padding:5px;border:0;background:transparent;color:#acc0c6;box-shadow:none}
body.has-opening-tour #app :is(.character-action-rail,.base3d-build-rail){bottom:var(--tutorial-reserved)!important}
body.has-opening-tour #app :is(.base3d-build-menu,.navigation-panel){bottom:var(--tutorial-reserved)!important;height:auto!important}
body.has-opening-tour #app .character-equipment-panel{top:calc((100dvh - var(--tutorial-reserved))/2);max-height:calc(100dvh - var(--tutorial-reserved) - 24px)}
body.has-opening-tour #app .scene-panel-layer{padding-bottom:var(--tutorial-reserved)!important}
body.has-opening-tour #app .scene-panel-layer .scene-panel{max-height:min(var(--scene-storage-popup-height),calc(100dvh - var(--tutorial-reserved) - 24px))!important}
body.has-opening-tour #app .scene-hud-links{max-height:calc(100dvh - var(--tutorial-reserved) - 75px);overflow-y:auto;scrollbar-width:none}
body.has-opening-tour #app .scene-hud-links::-webkit-scrollbar{display:none}
body:has(.boss-flow) #opening-tour-host{display:none!important}
@media(max-width:430px){body #opening-tour{grid-template-columns:minmax(0,1fr);gap:8px;padding:11px 34px 11px 13px}body #opening-tour .opening-guide-actions{justify-self:end}body #opening-tour .opening-guide-actions .primary{min-height:34px!important;padding:7px 12px}}
/* A regular skill gain sits beneath the HUD without blocking the world. */
#app .main-content[data-page="highscores"]>.app-page-heading h1{font:700 24px/1.2 Georgia,serif;color:#ffe6ac;letter-spacing:0}
#skill-level-notice{position:fixed;top:calc(env(safe-area-inset-top,0px) + 82px);right:max(12px,env(safe-area-inset-right,0px));z-index:1000;display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:10px;width:min(310px,calc(100vw - 100px));min-height:88px;padding:12px 38px 12px 12px;overflow:hidden;box-sizing:border-box;border:0;border-radius:14px;background:#122e3b;color:#b7ced2;box-shadow:0 8px 24px #06182055;animation:skill-notice-enter .28s cubic-bezier(.2,.8,.25,1) both}
#skill-level-notice::before{content:"";position:absolute;inset:0 0 auto;height:4px;background:#ffd166}
#skill-level-notice .skill-level-art{display:grid;place-items:center;width:44px;height:44px;aspect-ratio:1;border-radius:10px;background:#1c4355}
#skill-level-notice .skill-icon{display:block;width:40px;height:40px;object-fit:contain;object-position:center}
#skill-level-notice .skill-level-copy{min-width:0}
#skill-level-notice .skill-level-copy>small{display:block;color:#ffd166;font:700 9px/1.4 Segoe UI,system-ui,sans-serif;letter-spacing:.9px}
#skill-level-notice h2{margin:3px 0;color:#ffe6ac;font:700 19px/1.2 Georgia,serif;letter-spacing:0;white-space:nowrap}
#skill-level-notice p{margin:0;color:#b7ced2;font:400 13px/1.4 Segoe UI,system-ui,sans-serif}
#skill-level-notice p strong,#skill-level-notice p>span[aria-hidden]{color:#ffd166}
#skill-level-notice .skill-level-close{position:absolute;top:10px;right:8px;display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;border-radius:8px;background:#244653;color:#e8efdf;cursor:pointer;box-shadow:none}
#skill-level-notice .skill-level-close:hover{background:#315867;transform:none}
#skill-level-notice .skill-level-close svg{width:16px;height:16px;display:block}
#skill-level-notice .skill-level-close:focus-visible{outline:2px solid #ffd166;outline-offset:2px}
#skill-level-notice .skill-level-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#skill-level-notice.leaving{animation:skill-notice-exit .2s ease-in both;pointer-events:none}
@keyframes skill-notice-enter{from{opacity:0;translate:calc(100% + max(12px,env(safe-area-inset-right,0px))) 0}to{opacity:1;translate:0 0}}
@keyframes skill-notice-exit{to{opacity:0;translate:calc(100% + max(12px,env(safe-area-inset-right,0px))) 0}}
@media(max-width:380px){#skill-level-notice{grid-template-columns:36px minmax(0,1fr);gap:8px;padding-left:10px;min-height:84px}#skill-level-notice .skill-level-art{width:36px;height:36px}#skill-level-notice .skill-icon{width:32px;height:32px}#skill-level-notice h2{font-size:17px}#skill-level-notice .skill-level-copy>small{font-size:8px;letter-spacing:.5px}}
#skill-level-notice.is-still,body.reduce-motion #skill-level-notice{animation:none}
@media(prefers-reduced-motion:reduce){#skill-level-notice{animation:none}}

/* Shared, non-interactive scroll cue for every overflowing popup scroll area. */
.popup-scroll-cue{position:fixed;display:grid;place-items:center;height:24px;border:0;border-radius:0 0 12px 12px;background:var(--game-popup-bg,#122e3b);color:#ffd166;pointer-events:none;user-select:none}
.popup-scroll-cue[hidden]{display:none!important}
.popup-scroll-cue::before{content:"";position:absolute;left:0;right:0;bottom:100%;height:28px;background:linear-gradient(transparent,var(--game-popup-bg,#122e3b));pointer-events:none}
.popup-scroll-cue>svg{display:block;width:18px;height:18px;opacity:.8}
