/* A compact quest dialogue. The existing red-button skin owns every action. */
.ev-lore-dock{position:absolute;left:20px;right:20px;bottom:10px;z-index:15;pointer-events:auto}.ev-lore-dock:empty{display:none}.ev-lore-dock .sp-narration{margin:0}
.sp-narration{position:absolute;left:30px;bottom:28px;z-index:35;width:min(760px,calc(100% - 60px));box-sizing:border-box;color:#e9d6ad;background:radial-gradient(ellipse at 12% 0,#66502c42,transparent 65%),linear-gradient(120deg,#201b15f7,#0b1016fa),url('/assets/ui/classhall-stone-tile.png');border:3px ridge #ac8d54;box-shadow:inset 0 0 0 4px #090805,inset 0 0 0 5px #70532a7a,0 8px 24px #0009;padding:22px 26px;font:24px/1.4 var(--f-num,Arial)}
.sp-narration::before{content:'';position:absolute;inset:8px;border:1px solid #b69b5c33;pointer-events:none}
.sp-narration--inline{position:relative;inset:auto;width:100%;z-index:2;margin-top:16px}
.sp-narration-head{display:flex;align-items:center;gap:20px;min-width:0;padding-bottom:16px;border-bottom:1px solid #a98a484d}
.sp-narration-portrait{flex:0 0 92px;width:92px;height:92px;display:grid;place-items:center;color:#e8c166;background:radial-gradient(circle,#72552c,#18161b 70%);border:4px ridge #d4b36a;border-radius:50%;box-shadow:0 0 0 3px #090706,0 3px 12px #0009;overflow:hidden;font-size:40px}
.sp-narration[data-state=playing] .sp-narration-portrait{box-shadow:0 0 0 3px #090706,0 0 20px #79badf5c;border-color:#efce80}
.sp-narration-portrait{position:relative}.sp-narration-portrait img{position:absolute;max-width:none;width:220%;height:auto;left:-60%;top:-2%;object-fit:contain}
.sp-narration-heading{flex:1;min-width:0}.sp-narration-heading small{display:block;color:#b7cad4;font:22px/1.3 var(--f-ui,Georgia);margin-bottom:5px}.sp-narration-heading strong{display:block;font:38px/1.12 var(--f-title,Georgia);color:#f0d28f;font-weight:400;overflow-wrap:anywhere;text-shadow:0 2px 3px #000}
.sp-narration-close{border:0;background:none;color:#d9bd85;cursor:pointer;font:36px/1 Arial;min-width:42px;min-height:42px;align-self:flex-start;padding:0}
.sp-narration-close:hover{color:#fff2c3}.sp-narration-close:focus-visible{outline:2px solid #ffe6aa;outline-offset:2px}
.sp-narration-transcript{max-height:0;overflow:hidden;visibility:hidden;scrollbar-color:#90713e #0f0b08;touch-action:pan-y;overscroll-behavior:contain}
.sp-narration.is-expanded .sp-narration-transcript{max-height:210px;overflow:auto;visibility:visible;margin-top:12px;padding-right:8px}
.sp-narration-transcript p{margin:0;color:#e4d5b8;line-height:1.55;white-space:pre-line;overflow-wrap:anywhere}
.sp-narration-meta{display:flex;gap:12px;justify-content:space-between;align-items:center;margin:10px 0 8px;color:#b8aa90;font-size:16px;min-width:0}.sp-narration-state{min-width:0;overflow-wrap:anywhere}.sp-narration-time{flex-shrink:0;color:#c8b17c;font-variant-numeric:tabular-nums}
.sp-narration-progress{display:block;width:100%;height:5px;border:0;background:#080704;accent-color:#b99448;margin:0 0 10px}.sp-narration-progress[hidden]{display:none}.sp-narration-progress::-webkit-progress-bar{background:#080704}.sp-narration-progress::-webkit-progress-value{background:#ba9650}
.sp-narration-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch;gap:12px;min-width:0}.sp-narration-actions .sp-wowbtn{--h:54px;--cap:20px;min-width:0;width:100%;height:var(--h);font-size:21px;white-space:normal;text-align:center;padding-inline:24px;line-height:1.12}
.sp-narration[data-kind=event]:not(.sp-narration--inline){width:40%;max-width:720px;left:25px;bottom:20px}
.sp-narration--inline.is-expanded .sp-narration-transcript{max-height:180px}
body.sp-mobile-landscape .sp-narration{left:calc(24px + var(--mobile-safe-left,0px));bottom:calc(20px + var(--mobile-safe-bottom,0px));width:calc(43% - 38px);padding:26px 28px;font-size:var(--ml-text)}
body.sp-mobile-landscape .sp-narration--inline{left:auto;bottom:auto;width:100%;margin-top:18px}
body.sp-mobile-landscape .sp-narration-portrait{width:100px;height:100px;flex-basis:100px;font-size:45px}
body.sp-mobile-landscape .sp-narration-heading strong{font-size:var(--ml-text);line-height:1.15}
body.sp-mobile-landscape .sp-narration-heading small,body.sp-mobile-landscape .sp-narration-meta{font-size:var(--ml-small);line-height:1.2}
body.sp-mobile-landscape .sp-narration-close{width:var(--ml-touch);height:var(--ml-touch);min-width:var(--ml-touch);font-size:var(--ml-title)}
body.sp-mobile-landscape .sp-narration-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
body.sp-mobile-landscape .sp-narration-actions .sp-wowbtn{--h:var(--ml-touch);--cap:calc(var(--ml-touch)*.3);height:var(--ml-touch);min-height:var(--ml-touch);font-size:var(--ml-small);min-width:0;padding-inline:calc(var(--cap) + 10px);width:100%}
body.sp-mobile-landscape .sp-narration-actions .sp-narration-skip{display:none}
body.sp-mobile-landscape .sp-narration.is-expanded .sp-narration-transcript{max-height:270px;font-size:var(--ml-text);line-height:1.4}
body.sp-mobile-landscape .sp-narration[data-kind=event]:not(.sp-narration--inline){width:calc(43% - 38px);max-width:none}
@media(prefers-reduced-motion:reduce){.sp-narration *{transition:none!important;animation:none!important}}
.sp-chronicles{color:#e9d6ad;min-width:0}.sp-chronicles-search{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,.6fr);gap:12px;margin:12px 0}.sp-chronicles-search .sx-input{min-width:0;width:100%;font:inherit;box-sizing:border-box}.sp-chronicles-list{max-height:42vh;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-color:#92713d #0f0b08}.sp-chronicles-row{display:flex;gap:12px;align-items:center;padding:12px 5px;border-bottom:1px solid #ac854d44}.sp-chronicles-row>div{flex:1;min-width:0}.sp-chronicles-row strong{color:#edd494}.sp-chronicles-row p{margin:6px 0 0;line-height:1.45}.sp-chronicles-row .sp-wowbtn{--h:40px;min-width:110px;flex-shrink:0;font-size:16px}.sp-chronicles-dock:empty{display:none}
.sx-modal:has(.sp-chronicles){width:min(2300px,94%);height:88%;max-height:88%;background:linear-gradient(120deg,#211a12,#0d0d10);color:#e9d6ad;border:3px ridge #b49251;box-shadow:inset 0 0 0 5px #080704,0 8px 40px #0009}
.sx-modal:has(.sp-chronicles) .sx-modal__head h3{color:#efd28c;text-shadow:0 2px 3px #000}
.sx-modal:has(.sp-chronicles) .sx-modal__body{flex:1;min-height:0;overflow:hidden;display:flex}
.sp-chronicles{display:grid;grid-template-rows:auto auto minmax(0,1fr);width:100%;min-height:0;font:24px/1.4 var(--f-num,Arial)}
.sp-chronicles>p{margin:0;color:#baa887}.sp-chronicles-search{margin:14px 0 20px}.sp-chronicles-list{max-height:none;min-height:0}
.sp-chronicles:has(.sp-chronicles-dock:not(:empty)){grid-template-columns:minmax(0,1fr) minmax(0,.72fr);column-gap:24px}
.sp-chronicles:has(.sp-chronicles-dock:not(:empty))>p,.sp-chronicles:has(.sp-chronicles-dock:not(:empty))>.sp-chronicles-search{grid-column:1/-1}
.sp-chronicles-dock{grid-column:2;grid-row:3;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y}.sp-chronicles-dock .sp-narration{margin:0}
.sp-chronicles-row p{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:#bbaa8e}
body.sp-mobile-landscape .sp-chronicles{font-size:var(--ml-text)}body.sp-mobile-landscape .sp-chronicles .sp-wowbtn{--h:var(--ml-touch);height:var(--ml-touch);font-size:var(--ml-small);min-width:230px}
body.sp-mobile-landscape .sp-chronicles-search .sx-input{min-height:var(--ml-touch);font-size:var(--ml-small)}
body.sp-mobile-landscape .sx-modal:has(.sp-chronicles) .sx-modal__head h3{font-size:var(--ml-title)}
body.sp-mobile-landscape .sx-modal:has(.sp-chronicles) .sx-modal__head .sp-wowbtn{--h:var(--ml-touch);height:var(--ml-touch);min-width:260px;font-size:var(--ml-small)}

/* Recovery and victory reserve a normal column for the tale. The hero, its
   name and the navigation footer never share a positioned overlay with it. */
.journey-recovery .recovery-hero-column{position:absolute;left:90px;top:235px;bottom:140px;width:730px;display:flex;flex-direction:column;gap:16px;min-width:0;min-height:0}
.journey-recovery .recovery-hero-column>.journey-scene{position:relative;inset:auto;width:100%;flex:1 1 0;min-height:220px;overflow:hidden}
.journey-recovery .recovery-hero-column .journey-halo{width:min(470px,70%);height:auto;aspect-ratio:1;left:15%;top:2%}
.journey-recovery .recovery-hero-column .journey-model{inset:0 24px 110px}
.journey-recovery .recovery-hero-column .journey-name{bottom:0}
.journey-recovery .journey-panel{display:flex;flex-direction:column;bottom:140px;max-height:none;overflow:hidden}
.journey-recovery .journey-spirit-seal{flex:0 0 auto;margin-bottom:16px}
.recovery-content{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-color:#879b9e #0b121a;padding-right:10px}
.journey-recovery .recovery-content .journey-intro{margin-bottom:16px}
.journey-recovery .recovery-content .journey-treasures{padding:18px 0}
.journey-recovery .recovery-content .journey-fatigue{margin-bottom:12px}
.recovery-actions{flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:16px;border-top:1px solid #8aa4a055;padding-top:18px;margin-top:14px}
.journey-recovery .recovery-actions>.sp-wowbtn{width:100%;min-width:0;--h:62px;height:var(--h);margin:0;font-size:24px;padding-inline:24px;white-space:normal;line-height:1.14}
.recovery-lore-dock,.end-lore-dock{min-width:0;min-height:0;flex:0 1 auto;display:flex;max-height:60%}
.recovery-lore-dock:empty,.end-lore-dock:empty{display:none}
.recovery-lore-dock .sp-narration,.end-lore-dock .sp-narration{display:flex;flex-direction:column;max-height:100%;min-height:0;margin:0;width:100%}
.recovery-lore-dock .sp-narration>:not(.sp-narration-transcript),.end-lore-dock .sp-narration>:not(.sp-narration-transcript){flex-shrink:0}
.recovery-lore-dock .sp-narration-transcript,.end-lore-dock .sp-narration-transcript{min-height:0;flex:0 1 auto}
.sx-end .sx-end__hero-col:has(.end-lore-dock:not(:empty)){align-self:stretch;display:flex;flex-direction:column;gap:16px;min-height:0}
.sx-end .sx-end__hero-col:has(.end-lore-dock:not(:empty))>.sx-end__hero{flex:1 1 0;min-height:240px;height:auto;max-height:none;width:100%;padding-bottom:20px;overflow:hidden}
.sx-end .sx-end__hero-col>.end-lore-dock{width:100%;max-height:55%}
body.sp-mobile-landscape .journey-recovery .recovery-hero-column{left:calc(30px + var(--mobile-safe-left,0px));top:130px;bottom:155px;width:560px;gap:14px}
body.sp-mobile-landscape .journey-recovery .recovery-hero-column>.journey-scene{min-height:calc(90px / var(--ui-scale,1) + 90px)}
body.sp-mobile-landscape .journey-recovery .recovery-hero-column .journey-model{inset:0 10px 90px}
body.sp-mobile-landscape .journey-recovery .recovery-hero-column .journey-name h2{font-size:40px;margin:4px 0}
body.sp-mobile-landscape .journey-recovery .recovery-hero-column .journey-name p{font-size:var(--ml-small);line-height:1.2}
body.sp-mobile-landscape .journey-recovery .recovery-lore-dock{max-height:none;flex-shrink:1}
body.sp-mobile-landscape .journey-recovery .recovery-lore-dock .sp-narration{padding:16px 18px}
body.sp-mobile-landscape .journey-recovery .recovery-lore-dock .sp-narration-head{padding-bottom:10px;gap:16px}
body.sp-mobile-landscape .journey-recovery .recovery-lore-dock .sp-narration-portrait{width:64px;height:64px;flex-basis:64px}
body.sp-mobile-landscape .journey-recovery .recovery-lore-dock .sp-narration-heading{padding-right:100px}
body.sp-mobile-landscape .journey-recovery .recovery-lore-dock .sp-narration-heading small{margin:0}
body.sp-mobile-landscape .journey-recovery .recovery-lore-dock .sp-narration-heading strong{display:none}
body.sp-mobile-landscape .journey-recovery .recovery-lore-dock .sp-narration-close{position:absolute;top:4px;right:4px}
body.sp-mobile-landscape .journey-recovery .recovery-lore-dock .sp-narration-meta{display:none}
body.sp-mobile-landscape .journey-recovery .recovery-lore-dock .sp-narration.is-expanded .sp-narration-transcript{height:calc(60px / var(--ui-scale,1));max-height:calc(60px / var(--ui-scale,1));flex:0 1 auto;margin-top:10px}
body.sp-mobile-landscape .journey-recovery .recovery-actions>.sp-wowbtn{--h:var(--ml-touch);height:var(--h);min-height:var(--h);min-width:0;font-size:var(--ml-small);padding-inline:26px;line-height:1.15}
body.sp-mobile-landscape :is(.recovery-lore-dock,.end-lore-dock) .sp-narration{margin:0}
body.sp-mobile-landscape :is(.recovery-lore-dock,.end-lore-dock) .sp-narration-actions .sp-wowbtn{min-width:0;font-size:var(--ml-small);padding-inline:calc(var(--cap) + 6px)}
.sp-portrait .journey-recovery .recovery-hero-column{position:relative;inset:auto;width:100%;height:auto;gap:24px}
.sp-portrait .journey-recovery .recovery-hero-column>.journey-scene{height:650px;min-height:650px;flex:none;margin:20px 0}
.sp-portrait :is(.recovery-lore-dock,.end-lore-dock){max-height:none}
@media(max-height:340px){body.sp-mobile-landscape .journey-recovery .recovery-hero-column>.journey-scene{min-height:calc(70px / var(--ui-scale,1) + 90px)}body.sp-mobile-landscape .journey-recovery .recovery-lore-dock .sp-narration.is-expanded .sp-narration-transcript{height:calc(44px / var(--ui-scale,1));max-height:calc(44px / var(--ui-scale,1))}}

/* Dungeon history is a separate action: its modal never selects a battle. */
.raid-choice-option{display:flex;flex-direction:column;gap:14px;min-width:0}.raid-choice-option>.sx-plate{width:100%;flex:1;min-width:0}.raid-choice-history.sp-wowbtn{--h:58px;height:var(--h);width:100%;min-width:0;font-size:24px}
.raid-choice-dock{min-width:0}.raid-choice-dock .sp-narration{margin:0}.sx-modal:has(.raid-choice-dock){width:min(1150px,92%);background-color:#17130d}.sx-modal:has(.raid-choice-dock) .sx-modal__head h3{color:#e9ca84}.sx-modal:has(.raid-choice-dock) .sx-modal__head .sp-wowbtn{min-width:210px;flex-shrink:0}
body.sp-mobile-landscape .raid-choice-history.sp-wowbtn{--h:var(--ml-touch);height:var(--ml-touch);font-size:var(--ml-text)}body.sp-mobile-landscape .sx-modal:has(.raid-choice-dock) .sx-modal__head h3{font-size:var(--ml-title)}body.sp-mobile-landscape .sx-modal:has(.raid-choice-dock) .sx-modal__head .sp-wowbtn{--h:var(--ml-touch);height:var(--ml-touch);font-size:var(--ml-small);min-width:260px}
