/* Shared enamel artwork, flexible text areas and readable game framing. */
:root{--reading-scale:1;--journey-button:url('https://img.sleeplessailab.com/www/games/pop-tcg/v1/art/ui-enamel-v1/button.webp');--journey-panel:url('https://img.sleeplessailab.com/www/games/pop-tcg/v1/art/ui-enamel-v1/panel.webp')}
html{font-size:calc(15px * var(--reading-scale))}
body:not(.gallery-view){font-size:1rem}
body:not(.gallery-view) :is(.panel,.interlude-card,.loading-card){background:#062d28;border:0;border-image:var(--journey-panel) 100 fill / 28px;padding:30px;max-height:90dvh;overflow:auto;overflow-wrap:anywhere}
body:not(.gallery-view) :is(.menu-item,.primary,.ghost,.press-start){border:0;border-image:var(--journey-button) 24 120 fill / 9px 34px;background:transparent;color:#f7e6bb;padding:15px 38px;min-height:48px;white-space:normal;overflow-wrap:anywhere;line-height:1.4}
.menu-item small{line-height:1.45}.menu-item::before{display:none}.menu-item:hover{transform:translateX(3px)}
.settings-panel{width:min(680px,94vw)}.settings-panel header .ghost{padding:12px 28px;min-width:60px}.seg{flex-wrap:wrap}.seg button{min-width:75px;min-height:44px;overflow-wrap:anywhere}
.volume-control{display:grid;grid-template-columns:7em minmax(100px,1fr) 3em;align-items:center;gap:10px;margin:12px 0}.volume-control input{width:100%;accent-color:#d9c28a}.backup-actions{display:flex;flex-wrap:wrap;gap:8px}
#journey-save-health{position:fixed;z-index:12;right:16px;bottom:10px;margin:0;max-width:min(560px,90vw);color:#d9e9cf;background:#04231bdc;border:1px solid #ad986255;border-radius:8px;padding:5px 10px;font-size:.74rem;pointer-events:none}
body[data-screen=play] #journey-save-health{bottom:4px;font-size:.65rem}#journey-save-health[data-error=true]{color:#ffdfaa;border-color:#edb77e}
.map-detail{padding:20px 26px 26px;border-image:var(--journey-panel) 100 fill / 22px}.detail-art{margin:-20px -26px 12px}.map-head{background:#062b24bf}.map-node{min-width:110px}.node-label{line-height:1.35}
#screen-loading{align-items:center;justify-content:flex-end;padding:5vw;background:#14372d url('https://img.sleeplessailab.com/www/games/pop-tcg/v1/art/ui-enamel-v1/loading-scene.webp') center/cover no-repeat}
.loading-art{display:none}.loading-card{margin:0;width:min(490px,88vw);box-shadow:0 18px 70px #001c2488}.chapter-numeral{font-size:4rem}.loading-card h2{font-size:clamp(1.8rem,3vw,2.8rem);line-height:1.2}.loading-bar{height:13px;border:1px solid #ccb579;border-radius:12px;overflow:visible;background:#031c17;margin-top:36px}
.loading-bar i{position:relative;border-radius:12px;background:linear-gradient(90deg,#7aa876,#e6d59c);min-width:7%}.loading-bar i::after{content:'';position:absolute;right:-20px;bottom:5px;width:42px;height:48px;background:url('https://img.sleeplessailab.com/www/games/pop-tcg/v1/art/ui-enamel-v1/loading-sprite.webp') center/contain no-repeat;animation:journey-hop .8s ease-in-out infinite alternate}
@keyframes journey-hop{to{transform:translateY(-7px) rotate(5deg)}}
.play-mode #play-objective{width:min(300px,31vw);padding:18px 24px}.play-mode #play-objective p{display:none}.play-mode #play-objective h2{font-size:calc(15px * var(--reading-scale));line-height:1.35}.play-roster{flex-wrap:wrap}
#journey-goal,#journey-coach{position:absolute;right:22px;top:112px;width:min(280px,29vw);padding:20px 24px;color:#f4e7c8;border-image:var(--journey-panel) 100 fill / 24px;pointer-events:auto;overflow-wrap:anywhere}
#journey-goal small,#journey-coach small{display:block;color:#d9c28a;font-size:10px;letter-spacing:.1em}#journey-goal b,#journey-coach b{display:block;font-size:calc(14px * var(--reading-scale));line-height:1.4;margin:5px 0}#journey-goal p,#journey-coach p{font-size:calc(12px * var(--reading-scale));line-height:1.5;margin:7px 0}
#journey-goal button,#journey-coach button{background:transparent;border:1px solid #d8c18e55;border-radius:6px;padding:7px 10px;font-size:calc(11px * var(--reading-scale));margin:4px;color:inherit;cursor:pointer}.goal-direction{display:inline-block;color:#ffe2a1;min-width:50px;font-size:15px}
#journey-coach{top:auto;bottom:100px;right:22px}.journey-learning #journey-goal{display:none}.play-battle :is(#journey-goal,#journey-coach),body[data-modal=true] :is(#journey-goal,#journey-coach),.meeting-companion #journey-coach{visibility:hidden}
.play-mode #gallery-notice{top:auto;bottom:26px;right:24px;max-width:40vw}.play-mode .play-tools button{min-height:35px}
body.gallery-view .pb-enemy{left:auto;right:20px;transform:none;top:14px;width:min(420px,43vw);padding:15px 22px}.pb-enemy h2{font-size:calc(18px * var(--reading-scale));line-height:1.2}.pb-head{margin-bottom:5px}.pb-intent{gap:7px;margin-top:6px}.pbi-dmg{font-size:23px}.pbi-name{font-size:calc(13px * var(--reading-scale))}.pbi-tags{font-size:calc(11px * var(--reading-scale))}.pbi-next small{font-size:10px}.pbi-beat{width:26px;height:26px}
body.gallery-view .pb-ally{width:min(270px,28vw);padding:15px 20px}.pb-ally h3{font-size:calc(14px * var(--reading-scale))}
body.gallery-view .pb-dock{width:min(980px,calc(100vw - 32px));padding:12px 22px;bottom:12px;max-height:37dvh;overflow:visible}.pb-moves{gap:5px}.pb-moves strong,.pb-moves small,.pb-side strong,.pb-side small{white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;line-height:1.3}.pb-moves strong{font-size:calc(12px * var(--reading-scale))}.pb-moves small{font-size:calc(10px * var(--reading-scale))}.pb-moves button{min-height:52px!important}.pb-tip{font-size:calc(11px * var(--reading-scale))}
body.gallery-view .pb-log{left:12px;right:12px;padding:8px 16px;font-size:calc(12px * var(--reading-scale));line-height:1.45}.pb-chips span{font-size:11px;line-height:1.3;white-space:normal}.pb-ally-detail{font-size:11px}
.play-dialog :is(p,li){font-size:calc(13px * var(--reading-scale))}.play-dialog button{white-space:normal;overflow-wrap:anywhere;line-height:1.4;min-height:36px}.pt-grid{grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr))}.pt-grid article>div{min-width:0}.pj-roster b{overflow-wrap:anywhere}.pc-memories{display:grid;gap:10px}.pc-memory{display:flex;gap:12px;align-items:center;padding:10px;border:1px solid #cdb77855}.pc-memory img{width:48px;height:48px;object-fit:cover;border-radius:50%}.pc-memory p{margin:3px 0}.pc-memory>div{min-width:0;flex:1}
body[data-collection=tidal-otters] :is(.play-roster img,.play-mini img,.pj-roster img,.pt-grid img,.play-lead img,.pb-ally img){object-position:50% 26%;object-fit:cover}
.journey-practice{width:min(560px,92vw);max-height:90dvh;overflow:auto;padding:30px;background:#062d28;color:#f4e7c8;border:0;border-image:var(--journey-panel) 100 fill / 26px;font-family:system-ui,sans-serif;line-height:1.6}.journey-practice::backdrop{background:#031c17dd}.journey-practice h2{font-size:1.5rem;line-height:1.4}.journey-practice button{padding:12px 24px;border:1px solid #d9c28a;background:#174a3c;color:inherit;border-radius:8px;cursor:pointer;font:inherit}.practice-close{float:right}.practice-track{height:28px;margin:28px 12px;position:relative;background:#031c17;border:1px solid #ccb579;border-radius:20px}.practice-track b{position:absolute;left:62%;width:23%;height:100%;background:#e9c87688;border:2px solid #e9c876}.practice-track i{position:absolute;top:-4px;width:7px;height:34px;background:#fdf2d6;border-radius:4px;box-shadow:0 0 12px #fff0b3}.practice-feedback{min-height:3.2em}
@media(max-width:1000px){#journey-coach{width:250px;bottom:85px}#journey-goal{top:94px;width:240px}.play-mode #play-objective{top:94px;width:270px}.pb-tip{display:none}.pb-dock{max-height:40dvh!important}.pb-moves{grid-template-columns:repeat(5,minmax(0,1fr))}.pb-moves kbd{display:none}.pb-moves button{padding-left:10px!important}.map-body{grid-template-columns:1fr minmax(280px,35vw)}}
@media(max-width:800px){#journey-goal{top:150px;right:12px;left:12px;width:auto;padding:14px 22px}#journey-goal p{display:none}#journey-goal b{display:inline-block;margin-right:10px}#journey-goal small{display:none}#journey-coach{bottom:310px;left:12px;right:12px;width:auto;padding:16px 22px}.play-mode #play-objective{top:62px;width:auto;left:12px;right:12px;padding:14px 22px}.play-mode #play-objective h2{margin:0 0 6px}.play-mode #play-objective small{display:none}.map-body{display:flex;flex-direction:column;overflow:auto}.map-board{min-height:340px;flex:none}.map-detail{overflow:visible}.pb-ally{display:none}.pb-enemy{width:calc(100vw - 24px)!important;right:12px!important;max-height:26dvh;overflow:auto}.pb-moves{grid-template-columns:repeat(3,minmax(0,1fr))}body.gallery-view .pb-dock{max-height:42dvh;overflow:auto}.pb-log{position:static;grid-row:1}.pj-roster{grid-template-columns:repeat(3,1fr)}#screen-loading{justify-content:center;padding:16px}.chapter-numeral{font-size:2rem}.loading-card{max-height:88dvh}.build-note{display:none}#journey-save-health{max-width:90vw;font-size:.65rem}}
@media(max-height:650px) and (min-width:801px){#journey-coach{bottom:80px;width:270px}.play-mode #play-objective{top:78px}#journey-goal{top:78px}.play-mode .play-roster{display:none}.pb-chips{display:none}.pbi-next{display:none}.pb-enemy{padding:12px 20px!important}.pb-intent{margin-top:4px}.pb-dock{max-height:42dvh!important}.pb-log{font-size:11px!important}.pb-moves small{font-size:10px}.loading-card{max-height:90dvh}.title-col .logo{font-size:3.5rem}.title-col .tagline{margin:.8rem 0}.title-col .menu-item{padding:10px 38px}.title-save{margin:.8rem 0}}
@media(prefers-reduced-motion:reduce){.loading-bar i::after{animation:none}.loading-bar i{transition:none}}
.reduced-motion .loading-bar i::after{animation:none}

.journey-practising :is(#journey-coach,#journey-goal){visibility:hidden}

.journey-memories>div{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.journey-memories article{padding:14px;border:1px solid #cdb77855;border-radius:8px}.journey-memories img{width:56px;height:56px;border-radius:50%;object-fit:cover;margin-bottom:8px}.journey-memories button{max-width:100%}

.journey-face{display:block;position:relative;width:48px;height:48px;flex:none;border-radius:50%;overflow:hidden;border:1px solid #d8c18e77;background:#06352a}.play-roster .journey-face,.play-mini .journey-face{width:100%;height:100%;border:0}.pt-grid .journey-face{width:58px;height:58px}.pj-roster .journey-face{width:46px;height:46px}body.gallery-view .journey-face>img{position:absolute!important;width:180%!important;height:180%!important;max-width:none!important;left:-40%;top:-17%;border:0!important;border-radius:0!important;object-fit:cover;object-position:center}
.windseed-story-body{display:grid;grid-template-columns:minmax(130px,230px) minmax(0,1fr);gap:1.3rem;align-items:center}
.windseed-story-body img{width:100%;max-height:38vh;object-fit:contain;filter:drop-shadow(0 8px 18px #0006)}
.windseed-story-body p{line-height:1.8;overflow-wrap:anywhere}
#play-guardian-story{width:min(820px,calc(100vw - 32px));max-height:86vh;overflow-y:auto}
#play-guardian-story .pc-actions{display:flex;flex-wrap:wrap;gap:.7rem}
#play-guardian-story button{white-space:normal;min-height:44px}
@media(max-width:620px){.windseed-story-body{grid-template-columns:1fr}.windseed-story-body img{max-height:20vh}.windseed-story-body p{margin-top:0}}
