/* Illustrated journal assets, at the scale of an in-world overlay. */
:root{--journal-river:url('./assets/ui/journal-river.png');--journal-court:url('./assets/ui/journal-courtyard.png');--journal-scene:var(--journal-river)}
:is(.location-panel,.action-dialog){width:min(1050px,70vw);max-width:calc(100vw - 34px);max-height:70dvh;border-radius:8px;box-shadow:inset 0 0 0 3px #f8e2ab,0 3px 0 #78582b66,0 10px 25px #172f3e26}
.panel-roof{left:-18px;right:-18px;top:auto;bottom:calc(100% - 8px);height:auto;aspect-ratio:2132/146;background:none;overflow:hidden}
.panel-roof::before,.panel-roof::after,.panel-roof>b{display:none}
.panel-roof>svg{display:block;width:100%;height:100%;overflow:hidden;image-rendering:auto}
:is(.location-panel,.action-dialog)>.panel-header{min-height:64px;padding:14px 23px 12px!important;gap:18px;background-size:106px 40px;background-position:right 74px center}
.panel-header :is(h1,h2){font-size:22px;line-height:1.3;letter-spacing:.015em;text-shadow:0 2px #fff9e9}
.panel-brand{width:112px;max-height:38px;padding-right:17px}
:is(.location-panel,.action-dialog) .panel-header .close-button{width:40px;height:40px;min-width:40px;min-height:40px;flex-basis:40px}
:is(.location-panel,.action-dialog)>.panel-content{padding:17px 23px 20px;font-size:15px}
/* Reduce the panel footprint; the index and story scroll independently. */
.location-panel[data-place=missions]{width:min(1050px,70vw);height:70dvh;max-height:70dvh}
.location-panel[data-place=missions]>.panel-content{padding:12px 22px 17px;gap:15px;overflow:hidden}
.pool-strip{min-height:43px;padding:7px 12px;gap:11px;background-size:106px 39px,auto;background-position:right 130px center,center}
.pool-strip>.game-icon{width:25px;height:25px;flex-basis:25px}
.pool-strip>div{gap:8px}.pool-strip>div>span{font-size:13px}.pool-strip strong{font-size:17px}.pool-slot-total{font-size:12px;padding-left:15px}.reward-info>summary{font-size:12px;gap:9px}
.quest-browser{grid-template-columns:minmax(205px,.72fr) minmax(0,1.8fr);gap:23px;min-height:0}
.quest-navigation{padding-right:18px;min-height:0}.quest-navigation h2{font-size:21px}.quest-navigation .play-tabs{gap:0;margin:11px 0 12px}.quest-navigation .play-tabs button{font-size:13px;padding:7px 9px;min-height:35px}
.quest-list>button{min-height:74px;padding:8px 9px;gap:10px}.quest-list strong{font-size:15px}.quest-list small{font-size:11px}.quest-list .resident-art{height:54px;width:38px;flex-basis:38px}
.quest-detail{overflow:hidden;padding-top:0;min-height:0}
.quest-story{grid-template-columns:minmax(0,1fr) minmax(150px,34%);gap:7px;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#92b8c0 transparent;align-items:stretch}
.quest-story-copy{padding-top:10px;min-width:0;align-self:start}.quest-story-copy>.eyebrow{font-size:12px}.quest-story-copy h2{font-size:30px;line-height:1.15;margin:10px 0 16px}.quest-story-copy>p{font-size:15px;line-height:1.6;margin-bottom:19px}
.quest-requirement{margin:16px 0 12px;gap:9px}.quest-requirement b{font-size:15px}.quest-requirement p{font-size:13px;line-height:1.6;margin-top:6px}
.quest-story .quest-requirement::before{background-image:var(--journal-court);background-position:right bottom;background-size:cover;width:39px;height:39px;flex-basis:39px}
/* Scenery is a close illustration with its own transparent silhouette, never a map crop. */
.quest-portrait{align-self:stretch;min-height:210px;overflow:hidden;padding:0 0 20px;display:flex;align-items:flex-end;justify-content:center}
.quest-portrait::before,.active-quest-portrait::before{left:0;top:auto;bottom:0;width:100%;height:100%;background-image:var(--journal-scene);background-position:right bottom;background-size:auto 94%;background-repeat:no-repeat;mask-image:none;-webkit-mask-image:none;image-rendering:auto}
.quest-portrait .resident-art{height:205px;max-height:100%;width:125px;max-width:92%;margin-bottom:0;filter:drop-shadow(2px 3px #405a4a26)}
[data-scene=dojo],[data-scene=dojo-quarter],[data-scene=arena],[data-scene=arena-quarter],[data-scene=bamboo-heights],[data-scene=mint],[data-scene=residential-quarter],[data-scene=old-town]{--journal-scene:var(--journal-court)}
.quest-footer{flex:0 0 auto;min-height:65px;padding-top:13px;margin-top:12px;gap:10px}.quest-reward{gap:7px}.quest-reward>.game-icon{width:25px;height:25px;flex-basis:25px}.quest-reward strong{font-size:20px}.quest-reward>span{font-size:12px}.quest-footer small{font-size:12px}.quest-cta{gap:10px}.quest-cta .pixel-button{min-height:44px;padding:10px 18px;font-size:14px}.quest-location{font-size:11px}.quest-detail .quest-availability{flex:0 0 auto;font-size:10px;margin:7px 0 0}
.quest-detail-active{padding-right:29%;position:relative}.quest-active{min-height:0;overflow:auto;padding-top:8px;padding-right:7px;scrollbar-width:thin}.quest-active h3{font-size:28px}.active-quest-portrait{width:28%;min-height:210px;bottom:40px}.active-quest-portrait .resident-art{height:180px;width:110px}
.reward-info-content{width:min(610px,calc(70vw - 50px));max-height:45dvh;z-index:6}
/* All panels follow the same compact scale, with smaller conversations near the bottom. */
.location-panel[data-place=profile],.location-panel[data-place=menu]{width:min(850px,65vw);max-height:70dvh}
.action-dialog{width:min(760px,65vw)}.action-dialog:has(.atlas-map){width:min(1000px,72vw)}
.player-banner{padding:16px 20px;gap:17px;margin-bottom:15px}.player-banner .fighter-art{height:112px;width:82px}.player-banner h2{font-size:25px}.fighter-dossier{margin:13px 0 16px;padding:12px 17px}.profile-balance{padding:14px 17px;margin-bottom:18px}.profile-balance strong{font-size:22px}.adventure-menu>button,.profile-menu>button{min-height:81px;font-size:13px;padding:11px 9px;gap:9px}.adventure-menu .game-icon{height:26px;width:26px}
.player-banner::before,.arena-intro::before{background-image:var(--journal-court);background-size:contain;background-repeat:no-repeat;background-position:right bottom;mask-image:none;opacity:.62}.shop-banner::before{background-image:var(--journal-river);background-size:contain;background-repeat:no-repeat;background-position:right bottom;mask-image:none;opacity:.62}
.shop-banner,.arena-intro{padding:18px 20px;margin-bottom:17px;gap:20px}.shop-banner h2,.arena-intro h2{font-size:26px}.shop-banner .resident-art{height:145px;width:80px}.shop-shelves,.gear-shelves{gap:13px}.shop-item{padding:17px 14px}.bag-detail{padding:19px}.equipment-belt{padding:11px}.guide-pages>article{padding:19px}.play-row{padding:15px 4px}
.location-panel[data-place=npc]{width:min(820px,60vw);max-height:48dvh;bottom:6dvh;overflow:visible}
.location-panel[data-place=npc]>.panel-content{max-height:48dvh;overflow:auto}
.location-panel[data-place=npc]>.panel-header{top:12px;right:14px;min-height:0;padding:0!important;background:none}
.conversation-scene{grid-template-columns:170px minmax(0,1fr);gap:20px;padding:34px 24px 19px;min-height:240px}
.conversation-person{padding:0 0 16px;min-height:195px;align-self:end}.conversation-person>.resident-art{width:115px;height:180px;filter:drop-shadow(2px 3px #34523b26)}.conversation-person::before{left:0;right:0;top:auto;bottom:0;height:95%;background-image:var(--journal-court);background-size:auto 100%;background-position:right bottom;background-repeat:no-repeat;mask-image:none;-webkit-mask-image:none}
.conversation-nyra .conversation-person::before,.conversation-keira .conversation-person::before,.conversation-taejin .conversation-person::before{background-image:var(--journal-river)}
.conversation-person>span{font-size:10px;margin-top:5px}.conversation-box{padding-top:5px}.conversation-box header h2{font-size:27px;margin-bottom:10px}.conversation-line{font-size:15px;line-height:1.6}.conversation-detail{max-height:max(140px,calc(48dvh - 200px));margin:13px 0}.conversation-choices{padding-top:13px;gap:8px}.conversation-choices .pixel-button{font-size:13px;min-height:42px;padding:10px 15px}.conversation-hint{font-size:10px;margin-top:12px}.training-choices>article{padding:12px}.training-choices h3{font-size:16px}.training-choices p{font-size:13px}.training-choices small{font-size:11px}
.public-fishing::before{height:28px;top:-24px;left:-9px;right:-9px;background:url('./assets/ui/journal-roof.png') center 49.4%/100% auto no-repeat;border:0}.public-fishing{width:min(300px,calc(100vw - 30px));max-height:68dvh}.fishing-panel-heading h2{font-size:15px}
/* Less visual weight on the world itself. */
.objective-hud{max-width:245px}.objective-hud>button{font-size:12px;padding:9px 10px}.objective-hud p{font-size:12px}.objective-hud #objective-progress{font-size:10px}.hud-top-right .hud-button{padding:10px 15px;min-height:43px;font-size:13px}
/* At tablet sizes use the available width, keeping a band of city around the journal. */
@media(max-width:1100px) and (min-width:761px){:is(.location-panel,.action-dialog),.location-panel[data-place=missions]{width:min(920px,82vw)}.location-panel[data-place=profile],.location-panel[data-place=menu]{width:77vw}.location-panel[data-place=npc]{width:75vw}.quest-browser{grid-template-columns:195px minmax(0,1fr);gap:19px}.quest-navigation{padding-right:14px}.quest-story{grid-template-columns:minmax(0,1fr) 140px}.quest-story-copy h2{font-size:28px}.quest-portrait .resident-art{height:185px}.quest-reward strong{font-size:18px}.quest-cta{gap:7px}.quest-cta .pixel-button{padding:10px 14px}.quest-location{display:none}.reward-info-content{width:min(580px,calc(82vw - 50px))}.panel-header :is(h1,h2){font-size:20px}}
@media(max-width:760px){:is(.location-panel,.action-dialog),.location-panel[data-place=missions],.location-panel[data-place=profile],.location-panel[data-place=menu],.action-dialog:has(.atlas-map){width:calc(100vw - 34px);max-width:calc(100vw - 34px);max-height:calc(100dvh - 116px)}.location-panel[data-place=missions]{height:calc(100dvh - 116px);max-height:calc(100dvh - 116px)}.panel-roof{left:-10px;right:-10px;top:auto;bottom:calc(100% - 5px);height:auto;aspect-ratio:2132/146;overflow:visible}.panel-roof>svg{width:100%;height:100%}
:is(.location-panel,.action-dialog)>.panel-header{min-height:61px;padding:12px 14px!important;gap:8px;background-size:74px 30px;background-position:right 62px center}.panel-header :is(h1,h2){font-size:16px;line-height:1.4}:is(.location-panel,.action-dialog) .panel-header .close-button{width:38px;height:38px;min-width:38px;min-height:38px;flex-basis:38px}.panel-header::after{left:14px;right:14px}:is(.location-panel,.action-dialog)>.panel-content{padding:15px 14px 18px}.location-panel[data-place=missions]>.panel-content{display:block;padding:11px 13px 18px;overflow:auto}
.pool-strip{min-height:0;padding:8px 10px;margin-bottom:13px;gap:7px}.pool-strip>div>span{display:none}.pool-strip strong{font-size:13px}.pool-slot-total{font-size:10px;border:0;margin-left:auto;padding-left:0}.pool-strip>.game-icon{width:22px;height:22px;flex-basis:22px}.pool-strip>details{width:100%;margin:0}.reward-info>summary{font-size:11px;padding:3px 0}.reward-info-content{width:calc(100vw - 64px);max-height:45dvh;padding:15px}.quest-browser{display:flex;gap:18px}.quest-navigation{padding:0;border:0}.quest-browse-toggle{font-size:14px;padding:11px 12px;min-height:44px}.quest-browse-toggle>span{font-size:11px}.quest-navigation .play-tabs{margin:8px 0 10px}.quest-list>button{min-height:69px}.quest-detail{overflow:visible;min-height:0}.quest-story{display:grid;grid-template-columns:minmax(0,1fr) 90px;overflow:visible;gap:5px}.quest-story-copy{padding-top:0}.quest-story-copy>.eyebrow{font-size:11px}.quest-story-copy h2{font-size:26px;margin:9px 0 15px}.quest-story-copy>p{font-size:14px;line-height:1.65;margin-bottom:17px}.quest-requirement{margin-top:16px}.quest-requirement b{font-size:14px}.quest-requirement p{font-size:13px}.quest-portrait{min-height:185px;align-self:start;margin-top:23px;padding-bottom:16px}.quest-portrait .resident-art{height:157px;width:83px;max-width:94%}.quest-portrait::before{width:100%;left:0;top:auto;bottom:0;height:93%;background-size:auto 100%;background-position:right bottom}.quest-story .quest-requirement::before{display:none}.quest-footer{margin-top:18px;padding-top:14px;gap:13px;min-height:0;flex-wrap:wrap}.quest-reward strong{font-size:19px}.quest-reward>span{font-size:12px}.quest-cta{width:100%;justify-content:space-between}.quest-location{display:flex;font-size:11px}.quest-cta .pixel-button{min-height:44px;padding:10px 20px}.quest-detail .quest-availability{font-size:10px;margin-top:12px}.quest-detail-active{padding-right:0}.active-quest-portrait{position:relative;bottom:auto;right:auto;min-height:140px;width:100%;margin-top:12px}.active-quest-portrait .resident-art{height:140px;width:78px}.active-quest-portrait::before{left:20%;width:65%;height:100%;top:auto;background-size:contain}
.location-panel[data-place=npc]{width:calc(100vw - 36px);bottom:5dvh;max-height:68dvh}.location-panel[data-place=npc]>.panel-content{max-height:68dvh;padding:0}.location-panel[data-place=npc]>.panel-header{top:10px;right:11px;padding:0!important}.conversation-scene{display:block;padding:46px 17px 17px;min-height:0}.conversation-person{width:84px;height:119px;min-height:0;padding:0 0 9px;margin:0 0 9px 9px}.conversation-person>.resident-art{width:73px;height:110px}.conversation-person::before{left:0;right:0;top:auto;bottom:0;height:100%;background-size:auto 100%}.conversation-box{padding:0}.conversation-box header h2{font-size:25px}.conversation-line{font-size:14px;line-height:1.65}.conversation-detail{max-height:27dvh;margin:12px 0}.conversation-choices{gap:7px}.conversation-choices .pixel-button{font-size:12px;min-height:42px;padding:10px 12px}.conversation-hint{font-size:10px;margin-top:10px}.training-choices>article{padding:11px}.training-choices h3{font-size:15px}.training-choices p{font-size:13px}.player-banner{padding:15px;gap:12px}.player-banner h2{font-size:23px}.player-banner .fighter-art{width:66px;height:97px}.player-banner::before,.shop-banner::before,.arena-intro::before{opacity:.45}.adventure-menu>button,.profile-menu>button{min-height:78px;font-size:12px}.profile-balance{padding:13px}.profile-balance strong{font-size:20px}.shop-banner,.arena-intro{padding:15px;gap:13px}.shop-banner h2,.arena-intro h2{font-size:23px}.shop-banner .resident-art{width:63px;height:110px}.public-fishing{width:min(265px,calc(100vw - 30px));max-height:70dvh}.public-fishing::before{height:22px;top:-18px}.fishing-panel-heading h2{font-size:13px}}
@media(max-height:650px) and (min-width:761px){:is(.location-panel,.action-dialog),.location-panel[data-place=missions],.location-panel[data-place=profile],.location-panel[data-place=menu]{max-height:72dvh}.location-panel[data-place=missions]{height:72dvh}.panel-roof{top:auto;height:auto;bottom:calc(100% - 6px);aspect-ratio:2132/146}.panel-roof>svg{display:block}:is(.location-panel,.action-dialog)>.panel-header{min-height:55px;padding:10px 20px!important}.panel-header :is(h1,h2){font-size:18px}.location-panel[data-place=missions]>.panel-content{padding-top:9px;gap:10px}.pool-strip{min-height:37px;padding-block:5px}.quest-story-copy h2{font-size:26px;margin-bottom:10px}.quest-story-copy>p{font-size:14px;margin-bottom:10px}.quest-requirement{margin:10px 0}.quest-requirement p{font-size:12px}.quest-portrait{min-height:165px;padding-bottom:15px}.quest-portrait .resident-art{height:155px}.quest-footer{min-height:54px;margin-top:8px;padding-top:10px}.quest-reward strong{font-size:18px}.quest-availability{font-size:10px}.location-panel[data-place=npc]{max-height:56dvh;bottom:6dvh}.location-panel[data-place=npc]>.panel-content{max-height:56dvh}.conversation-person{min-height:160px}.conversation-person>.resident-art{height:150px}.conversation-detail{max-height:140px}.conversation-scene{min-height:180px}}
/* The desktop height allowance includes the illustrated roof above the panel. */
@media(min-width:761px){:is(.location-panel,.action-dialog),.location-panel[data-place=profile],.location-panel[data-place=menu]{max-height:calc(70dvh - 60px)}.location-panel[data-place=missions]{height:calc(70dvh - 60px);max-height:calc(70dvh - 60px)}.location-panel[data-place=npc]{max-height:48dvh}}
@media(min-width:761px){.quest-story-copy{padding-top:6px}.quest-story-copy h2{font-size:28px;margin:7px 0 10px}.quest-story-copy>p{margin-bottom:12px}.quest-requirement{margin:10px 0 8px}.quest-portrait{align-self:start;min-height:0;height:210px;max-height:100%;padding-bottom:16px}.quest-portrait .resident-art{height:185px}.quest-portrait::before{height:100%}}
@media(min-width:1101px){.panel-header :is(h1,h2){font-size:26px}}
@media(max-width:760px){.panel-header :is(h1,h2){font-size:19px}}
/* Conversation already introduces the lesson; put the training choices immediately in view. */
.conversation-detail .training-room{display:block}.conversation-detail .training-room>.fighter-art,.conversation-detail .training-room>section>.eyebrow,.conversation-detail .training-room>section>h3,.conversation-detail .training-room>section>p{display:none}.conversation-detail .training-choices>article:first-child{margin-top:0}
@media(max-width:760px){:is(.location-panel,.action-dialog) .panel-header .close-button{width:44px;height:44px;min-width:44px;min-height:44px;flex-basis:44px}}
