/* Battle has its own canvas, guidance and a readable dialogue line. */
#stage{aspect-ratio:auto;height:clamp(225px,36dvh,340px)}
#battleBrief{display:flex;align-items:center;gap:6px;min-height:32px;flex:0 0 auto;padding:4px 8px;background:#f4e7d5;border-bottom:2px solid #3d2025}
#battleBrief #firstPath{position:static;width:auto;flex:1;padding:0;border:0;box-shadow:none;background:none}
#battleBrief .pathHead,#battleBrief .pathBar,#battleBrief .pathReward{display:none}
#battleBrief .pathGoal{font-size:9px;line-height:1.5;margin:0}
#battleBrief #loginHint{position:static!important;transform:none!important;max-width:90px;width:auto!important;font-size:8px!important;padding:4px 6px!important}
#battleBrief #loginHint span{display:none}#battleBrief #loginHint b{font-size:8px}
#battleSpeech{flex:0 0 auto;display:flex;align-items:center;gap:9px;min-height:51px;padding:7px 11px;background:#fff8e9;border-top:2px solid #3d2025;border-bottom:2px solid #3d2025}
#battleSpeech b{color:#a54f65;font:10px 'Galmuri11',monospace;white-space:nowrap}
#battleDialogue{margin:0;font:11px/1.55 'Galmuri11',monospace;overflow-wrap:anywhere}
#journeyRail{flex:0 0 auto;display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:6px 8px;background:#33202a}
#journeyRail button{position:relative;min-height:34px;border:1px solid #f1bc83;background:#fff1d7;color:#4d2934;font:10px 'Galmuri11',monospace;cursor:pointer}
#journeyRail b{display:inline-grid;place-items:center;background:#b84059;color:white;border-radius:10px;min-width:15px;margin-left:5px;font:10px system-ui}
#panel{min-height:90px}#kiwrap{padding-top:5px;padding-bottom:5px}#top{gap:6px}
#ovArchive .card{position:relative;max-height:85dvh;padding-top:12px;overflow:auto}
#ovArchive .card>:not(#storyBox):not(#archiveDismiss):not(.archiveHeading){display:none!important}
.archiveHeading{display:none}#ovArchive .archiveHeading{display:block;font-size:17px;margin:0 0 10px}
#ovArchive #archiveDismiss{position:sticky;bottom:0;z-index:3;background:#ef939f;box-shadow:0 -5px 0 #fff8e9}
#storyBox .storyi{scroll-margin-top:12px}
#luluExit button{min-height:44px;padding:9px 12px;border:2px solid #512c37;background:#ef939f;color:#301b22;font:12px 'Galmuri11',monospace;box-shadow:3px 3px 0 #724a48;margin:4px}
#luluExit #luluStay{background:#fff0d1}#luluExit::backdrop{background:#24121ac9}
.journeyOv{z-index:45;padding:12px;background:#21171cdd}
.journeyCard{display:flex;flex-direction:column;width:min(480px,100%);max-height:calc(100dvh - 24px);border:3px solid #3d2025;background:#fff5e5;box-shadow:5px 5px 0 #b38664;color:#422832;overflow:hidden;font-family:'Galmuri11',monospace}
.journeyHead{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:#512c3b;color:#fff0da;flex:none}
.journeyHead h2{font-size:16px;margin:0}.journeyHead small{display:block;color:#f6bf87;font-size:8px;margin-top:5px}
.journeyHead button{width:38px;height:38px;border:2px solid #e9bd98;background:#ef939f;color:#3d2025;font-size:23px}
.journeyTabs{display:flex;flex:none;padding:6px;gap:4px;background:#e8cfb7}.journeyTabs button{flex:1;padding:10px 2px;border:1px solid #754752;background:#fff8e9;color:#58303c;font:10px 'Galmuri11',monospace}.journeyTabs button[aria-selected=true]{background:#a4435d;color:#fff4df}
.journeyBody{overflow:auto;min-height:0;padding:12px;overscroll-behavior:contain}.journeyBody h3{font-size:17px;margin:8px 0}.journeyBody p{font:11px/1.7 'Galmuri11',monospace}.journeyBody button{cursor:pointer}
.journeyHero{padding:15px;border:2px solid #71434c;background:linear-gradient(125deg,#fde2ba,#f4b8bb);margin-bottom:12px}.journeyHero small{font:9px 'Galmuri11',monospace;letter-spacing:.08em}.journeyHero p{margin:8px 0 0}
.journeyProgress{height:8px;background:#d9c0ad;border:1px solid #764854;margin:10px 0}.journeyProgress i{display:block;height:100%;background:#429f90}
.milestones{display:grid;grid-template-columns:repeat(4,1fr);gap:5px}.milestones button{border:2px solid #68424a;background:#fff1cf;color:#442533;font:9px/1.6 'Galmuri11',monospace;padding:8px 1px}.milestones button:disabled{opacity:.6}.milestones span{display:block;font-size:20px}
.journeyDays{display:flex;gap:5px;overflow:auto;padding:9px 0;margin:6px 0}.journeyDays button{flex:0 0 58px;padding:9px 3px;border:1px solid #855455;background:#eadac9;font:10px 'Galmuri11',monospace;color:#54313a}.journeyDays button.selected{background:#ef939f;border:2px solid #542d38}
.missionRow{display:grid;grid-template-columns:38px 1fr 62px;align-items:center;gap:8px;padding:11px 8px;margin-bottom:7px;background:#fffdf3;border:2px solid #b88872}.missionIcon{font-size:24px;color:#b1783c}.missionRow strong{font:10px/1.5 'Galmuri11',monospace}.missionRow small{display:block;font:8px/1.5 'Galmuri11',monospace;color:#846358}.missionRow button,.journeyAction{border:2px solid #56303d;padding:10px 5px;background:#e9b85b;color:#39212a;font:10px 'Galmuri11',monospace;box-shadow:2px 2px 0 #7d5550}.missionRow button:disabled,.journeyAction:disabled{opacity:.45;box-shadow:none}.missionRow .journeyProgress{margin:5px 0;height:5px}
.radarMachine{padding:13px;border:5px solid #675464;background:#253b45;box-shadow:inset 0 0 0 3px #aeb9ae;margin-bottom:12px}.radarGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.radarTile{min-height:70px;display:grid;place-content:center;text-align:center;border:2px solid #76979b;background:#3c555c;color:#fff3d0;font:8px/1.5 'Galmuri11',monospace}.radarTile b{font-size:24px;color:#eed890}.radarTile.lit{background:#66bca1;color:#133e35;border-color:#ebf4ab;box-shadow:0 0 10px #a7ed99}.radarCenter{border-radius:50%;background:repeating-radial-gradient(circle,#347568 0 13px,#569786 14px 15px);font-size:12px;color:#caffdf}.radarCenter b{font-size:24px;color:#caffdf}.radarActions{display:flex;gap:8px;margin:12px 0}.radarActions button{flex:1}.journeyNote{font-size:9px!important;color:#73575d}.supplyBox{position:relative;border:2px solid #6a4150;background:linear-gradient(130deg,#dab278,#fbdfab);padding:16px;margin-bottom:12px;text-align:center}.supplyBox .chest{font-size:64px;line-height:1.2;color:#845327;text-shadow:3px 4px #fff1c9}.supplyBox.rare{background:linear-gradient(130deg,#b7cfd0,#ecf2d5)}.supplyPreview{display:flex;justify-content:center;gap:10px;align-items:center}.supplyPreview img{width:52px;height:52px;object-fit:contain;image-rendering:pixelated}.journeyReceipt{padding:12px;border:2px solid #588d7e;background:#e0f2df;font:11px/1.8 'Galmuri11',monospace;margin:10px 0;overflow-wrap:anywhere}.journeyFooter{padding:9px 12px;border-top:2px solid #c79778;background:#f1decc;font:9px/1.7 'Galmuri11',monospace}.journeyCard button:focus-visible{outline:3px solid #42a591;outline-offset:2px}
@media(max-height:720px){#stage{height:210px}#battleSpeech{min-height:43px}#battleBrief{min-height:27px}#journeyRail{padding:4px 8px}#skillbar{padding:4px 6px}.skillBtn{min-height:38px}.bottomDock{padding-top:4px;padding-bottom:4px}}
@media(min-width:700px){#stage{height:330px}}

#journeyBadge[hidden]{display:none}#ovArchive .storyi.hid ~ .storyi.hid{display:none}

#ovArchive .archiveHeading{position:sticky;top:-12px;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff8e9;padding:10px 0;border-bottom:2px solid #c79778;margin:0 0 10px}#ovArchive .archiveHeading h2{margin:0;font:17px 'Galmuri11',monospace}#archiveClose{flex:0 0 44px;width:44px;height:44px;border:2px solid #59333e;background:#ef939f;color:#3d2025;font:26px system-ui;cursor:pointer}#archiveClose:focus-visible{outline:3px solid #429f90;outline-offset:2px}

.supplyGiftIcon{font-size:48px;line-height:1;color:#9e4960;width:72px;text-align:center}

#ovDex .card{max-height:85dvh;overflow:auto}.dexHeader{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:var(--paper,#fff8e9);z-index:3;padding:8px 0}.dexHeader h2{margin:0}#dexClose{min-width:44px;min-height:44px}

/* The top brief remains useful after the first path is complete. */
#battleBrief{min-height:68px;align-items:stretch}
#battleBrief #firstPath{pointer-events:auto;min-width:0;align-self:center}
#pathExplore{min-height:30px;margin-top:5px;padding:4px 10px;background:#4c776b;border:1px solid #31564c;color:#fff8e9;font:10px 'Galmuri11',monospace;cursor:pointer}
#pathExplore[hidden],#battleNotice[hidden]{display:none}
#battleNotice{display:flex;flex:1;align-items:center;gap:9px;min-width:0;padding:3px 0;border:0;background:none;color:#4b2934;text-align:left;cursor:pointer}
.noticeCopy{display:flex;flex:1;min-width:0;flex-direction:column;gap:3px}
#noticeTitle{color:#8a5361;font:8px 'Galmuri11',monospace}
#noticeText{font:10px/1.55 'Galmuri11',monospace;overflow-wrap:anywhere}
#noticeAction{max-width:66px;flex:none;font:9px/1.5 'Galmuri11',monospace;color:#35695d}
#battleBrief #loginHint{align-self:center;max-width:66px}
#battleNotice[data-notice^="ready:"] #noticeTitle{color:#9e492a}
#battleNotice:focus-visible,#pathExplore:focus-visible{outline:2px solid #35695d;outline-offset:2px}


/* A roomy growth view, without giving up the large battle on first visit. */
#wrap{height:100dvh;min-height:0}
#stage{--battle-height:clamp(225px,36dvh,340px);height:min(var(--battle-height),var(--battle-max-height,100dvh));max-height:none;transition:height .24s ease}
#growthTools{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:3px 10px;background:#f8dfcc;border-top:2px solid #3d2025}
#growthTitle{font:11px 'Galmuri11',monospace;color:#59333e}
#growthView{min-height:44px;max-width:72%;border:2px solid #59333e;background:#fff8e9;color:#59333e;padding:6px 10px;font:11px/1.4 'Galmuri11',monospace;cursor:pointer;touch-action:manipulation}
#growthView:active{background:#ffd891}
#growthView:focus-visible,#panel button:focus-visible{outline:3px solid #429f90;outline-offset:2px}
#panel{min-height:0;overscroll-behavior-y:contain;scroll-padding-top:60px;overflow-anchor:none;padding:0 10px 12px}
#buyrow{position:sticky;top:0;z-index:4;margin:0;padding:7px 0;background:#f8dfcc}
#buyrow button{min-height:44px;touch-action:manipulation}
.up{min-height:72px;padding:9px 8px;gap:8px;margin:8px 0}
.up .tx{overflow-wrap:anywhere}
.up .nm{line-height:1.4}
.up .vl{line-height:1.5}
.up button{flex:0 0 auto;min-height:48px;min-width:94px;touch-action:manipulation}
#wrap.growthCompact #stage{height:clamp(100px,15dvh,150px);max-height:none}
#wrap.growthCompact #battleSpeech{display:none}
#wrap.growthCompact #battleBrief{min-height:44px}
#wrap.growthCompact #noticeTitle{display:none}
#wrap.growthCompact #battleBrief .pathGoal{font-size:8px}
#wrap.growthCompact #pathExplore{margin-top:2px;min-height:30px}
#panel #journeyRail{margin:14px 0 2px;border:2px solid #3d2025}
#journeyRail button{min-height:44px;touch-action:manipulation}
@media(max-height:720px){#stage{--battle-height:210px}#battleBrief{min-height:44px}#battleSpeech{display:none}}
@media(min-width:700px){#stage{--battle-height:330px}}
@media(max-width:350px){#growthTitle{font-size:10px}#growthView{font-size:10px;padding:6px 8px}.up .gl{width:30px;height:32px}.up button{min-width:84px;padding:8px}.up .nm{font-size:12px}}
@media(prefers-reduced-motion:reduce){#stage{transition:none}}
