.adventureChapters{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:16px;margin:24px 0}.adventureChapter{display:grid;gap:8px;padding:18px;background:#103235;border:1px solid #6b8d65;border-radius:16px;color:#fff8dc;text-align:left;cursor:pointer}.adventureChapter img{width:70px;height:70px}.adventureChapter:disabled{opacity:.4;cursor:not-allowed}.adventureChapter small{color:#d4dcae}
.adventureOverlay{position:fixed;inset:0;z-index:500;display:flex;align-items:end;justify-content:center;background:#05141955;padding:24px}.adventureDialogueBox{width:min(880px,100%);display:flex;align-items:center;gap:22px;border:4px solid #edcf84;box-shadow:0 0 0 5px #173333;border-radius:16px;background:#fcf1cc;color:#203733;padding:22px;min-height:180px}.adventureDialogueBox img{width:130px;height:145px;object-fit:contain}.adventureDialogueBox p{font-size:20px;line-height:1.5;margin:10px 0}.adventureDialogueBox button{background:#173b39;color:#fff2cd;border:0;border-radius:8px;padding:12px 18px;cursor:pointer}.adventureDialogueBox>div{flex:1}
.adventureCinematic{align-items:center;background:#061b1df7}.adventureCinematic>div{max-width:800px;width:100%;text-align:center}.adventureCinematic img{width:100%;max-height:60vh;object-fit:contain;animation:storyFloat 4s ease-in-out infinite alternate}.adventureCinematic p{font-size:24px;color:#f2d46a}.adventureCinematic button{padding:12px 24px;border-radius:10px;cursor:pointer}.adventureObjective{position:fixed;top:78px;left:50%;transform:translateX(-50%);z-index:105;background:#143832e8;border:1px solid #e2c96d;color:#fff3c9;border-radius:10px;padding:8px 16px;font-size:13px;max-width:90vw;text-align:center;pointer-events:none}
@keyframes storyFloat{from{transform:translateY(-3px)}to{transform:translateY(3px)}}@media(prefers-reduced-motion:reduce){.adventureCinematic img{animation:none}}
@keyframes storyFade{from{opacity:0}to{opacity:1}}.adventureDialogueBox,.adventureCinematic{animation:storyFade .3s ease-out}@media(prefers-reduced-motion:reduce){.adventureDialogueBox,.adventureCinematic{animation:none}}
@media(max-width:600px){.adventureOverlay{padding:12px}.adventureDialogueBox{gap:10px;padding:12px}.adventureDialogueBox img{width:75px;height:100px}.adventureDialogueBox p{font-size:16px}.adventureObjective{top:60px;width:90vw}}

#adventureScreen{position:relative;min-height:65vh}.adventureOverlay{position:absolute;padding:clamp(8px,2vw,24px);overflow:auto;box-sizing:border-box}.adventureObjective{position:absolute;top:10px;max-width:85%;box-sizing:border-box}.adventureDialogueBox{min-height:0;max-height:100%;overflow:auto;padding:clamp(8px,2vw,22px);gap:clamp(8px,2vw,22px);box-sizing:border-box}.adventureDialogueBox img{width:clamp(45px,10vw,130px);height:clamp(55px,12vw,145px)}.adventureDialogueBox p{font-size:clamp(12px,1.6vw,20px);line-height:1.35;margin:6px 0}.adventureCinematic>div{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.adventureCinematic img{min-height:0;max-height:65%;width:100%;flex:1;object-fit:contain}.adventureCinematic p{font-size:clamp(14px,2vw,24px);margin:8px}.adventureDialogueBox button{padding:8px 12px}

#result{position:relative}

.voyageHero{position:relative;isolation:isolate;overflow:hidden;min-height:560px;border:1px solid #b8914555;border-radius:24px;margin:0 0 36px;box-shadow:0 20px 60px #0005;background:#0b191b}.voyageArtwork{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:65% center;z-index:-2}.voyageHero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#051619f5 0%,#051619db 27%,#05161955 58%,transparent 80%);z-index:-1}.voyageCopy{padding:clamp(26px,4vw,54px);max-width:580px}.voyageCopy .kicker{color:#f2d46a;font-size:11px;letter-spacing:.16em}.voyageCopy h1{font-size:clamp(48px,6vw,78px);line-height:.98;margin:20px 0 24px}.voyageCopy h1 em{color:#f2d46a;font-style:normal}.voyageCopy p:not(.kicker){font-size:18px;line-height:1.6;max-width:380px;color:#eee3c9}.voyageCopy small{display:block;color:#c7d4bd;margin:15px 0 0;font-size:12px}.voyageStart{padding:17px 25px!important;box-shadow:0 5px 0 #8f662b,0 8px 26px #e5b84633;font-size:17px!important;gap:25px!important}.voyageStart:hover{transform:translateY(-2px)}.voyageCopy #howBtn{font-size:12px;padding:12px 0}.adventureChapter[aria-busy=true]{opacity:.7;cursor:progress}.adventureObtained{align-items:center;background:#031419bd;cursor:pointer;backdrop-filter:blur(3px)}.obtainedCard{position:relative;text-align:center;isolation:isolate;color:#fff2c5;max-width:100%;padding:16px}.obtainedCard img{display:block;width:clamp(76px,15vw,180px);height:clamp(76px,15vw,180px);object-fit:contain;margin:auto;image-rendering:pixelated;animation:itemArrives .55s cubic-bezier(.2,.8,.3,1.25) both;filter:drop-shadow(0 8px 20px #eec76888)}.obtainedCard h2{font-size:clamp(18px,2.8vw,32px);margin:12px 0}.obtainedCard button{border:0;background:transparent;color:#e7e7c1;font:inherit;font-size:clamp(11px,1.4vw,15px);padding:10px;cursor:pointer}.obtainedGlow{position:absolute;width:220px;aspect-ratio:1;max-width:75vw;left:50%;top:40%;transform:translate(-50%,-50%);background:radial-gradient(circle,#f3d86c66,transparent 70%);z-index:-1}.adventureDialogueBox img{object-position:center bottom}
@keyframes itemArrives{from{opacity:0;transform:translateY(30px) scale(.25) rotate(-12deg)}to{opacity:1;transform:translateY(0) scale(1) rotate(0)}}
@media(max-width:620px){.voyageHero{min-height:610px;border-radius:18px}.voyageArtwork{object-position:70% center}.voyageHero:after{background:linear-gradient(0deg,#051619fa 0%,#051619e8 40%,#05161944 100%)}.voyageCopy{padding:26px;padding-top:150px}.voyageCopy h1{font-size:52px}.voyageCopy p:not(.kicker){font-size:16px}.voyageCopy .kicker{font-size:10px}.obtainedCard{padding:8px}.obtainedCard h2{margin:6px 0}}
@media(prefers-reduced-motion:reduce){.obtainedCard img{animation:none}.voyageStart:hover{transform:none}}

.adventureCinematic video{display:block;width:100%;max-height:60vh;object-fit:contain;background:#061b1d;border-radius:12px}


/* Keep story panels in the visible viewport, including the tall chapter selection page. */
@media(max-width:900px),(pointer:coarse){.adventureOverlay{position:fixed!important;inset:0!important;width:100%;height:100dvh;z-index:1500;align-items:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}.adventureDialogueBox{max-height:90dvh}.adventureCinematic video{max-height:65dvh;min-height:0}.adventureCinematic>div{max-height:100%}.adventureCinematic img{max-height:60dvh}}
.landscapeHint{position:fixed;z-index:2000;top:max(18px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;padding:12px 18px;background:#102d32f2;border:1px solid #f2d46a;border-radius:14px;box-shadow:0 8px 25px #0005;pointer-events:none;color:#fff3cd;font-size:13px;max-width:90vw}.landscapeHint svg{width:65px;height:30px;flex:none}
