.w18st-story{max-width:1400px;margin:0 auto;background:#111;position:relative}.w18st-public-page{position:relative;aspect-ratio:16/9;min-height:400px;background-size:cover;background-position:center;color:#fff;overflow:hidden}.w18st-public-page[hidden]{display:none!important}.w18st-public-element{position:absolute;box-sizing:border-box;line-height:1.15;overflow-wrap:anywhere;text-shadow:0 2px 5px #0007}.w18st-public-element p{margin:0 0 .4em}.w18st-public-element img{max-width:100%}.w18st-public-nav{display:flex;align-items:center;justify-content:center;gap:18px;padding:10px;background:#1c201f;color:#fff}.w18st-public-nav button{background:#32423c;color:#fff;border:1px solid #7b9288;border-radius:4px;min-width:50px;padding:8px;cursor:pointer}@media(max-width:680px){.w18st-public-page{min-height:260px}.w18st-public-element{font-size:clamp(12px,3vw,32px)!important}}
.w18st-public-element.w18st-panel-none{background:transparent}.w18st-public-element.w18st-panel-soft{background:rgba(0,0,0,.22);border-radius:8px;padding:8px 10px}.w18st-public-element.w18st-panel-medium{background:rgba(0,0,0,.45);border-radius:8px;padding:8px 10px}.w18st-public-element.w18st-panel-strong{background:rgba(0,0,0,.68);border-radius:8px;padding:8px 10px}.w18st-public-element.w18st-panel-light{background:rgba(245,245,242,.9);color:#1c201f;border-radius:8px;padding:8px 10px;text-shadow:none}.w18st-layout-text .w18st-public-element,.w18st-layout-split .w18st-public-element,.w18st-layout-image-left .w18st-public-element,.w18st-layout-image-right .w18st-public-element{text-shadow:none}

/* 7.0.4: Readability panels resize independently of font size. */
.w18st-public-element:not(img){display:flex;align-items:center;overflow:auto}
.w18st-public-element:not(img)>*{max-width:100%}
/* 7.0.5: full-viewport slides, cropped/contained/fixed images, internal text scrolling. */
.w18st-story{width:100%;max-width:none;height:100dvh;min-height:440px;overflow:hidden;border-radius:0;isolation:isolate}
.w18st-public-page{height:100dvh;min-height:440px;aspect-ratio:auto;overflow:hidden}
.w18st-public-element:not(.w18st-public-image){max-height:calc(100% - var(--top, 0%) - 1%);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.w18st-public-image{display:block!important;overflow:hidden!important;background:#dbe2dd;box-shadow:0 0 0 1px #9ba6aa inset;padding:0!important}
.w18st-public-image>img{width:100%;height:100%;display:block;object-position:center;max-width:none}
.w18st-fit-cover>img{object-fit:cover}
.w18st-fit-contain>img{object-fit:contain;background:#293330}
.w18st-fit-fixed>img{object-fit:none;background:#293330}
.w18st-public-nav{position:absolute;z-index:9;bottom:10px;right:12px;background:#1c201fdc;border-radius:7px;padding:6px 9px}
.w18st-public-nav button{min-width:36px;padding:6px}
@media(max-width:680px){.w18st-story,.w18st-public-page{min-height:0;height:100dvh}.w18st-public-element:not(.w18st-public-image){font-size:clamp(12px,3vw,32px)!important}}

.w18st-public-element:not(.w18st-public-image){align-items:safe center}

/* 7.0.10: navigation states remain usable without obscuring the right-hand rail. */
.w18st-public-nav button:disabled{opacity:.38;cursor:default}.w18st-public-nav button:focus-visible{outline:2px solid #ebebe9;outline-offset:2px}.w18st-public-nav .w18st-count{min-width:3.5em;text-align:center;font-variant-numeric:tabular-nums}@media(max-width:767px){.w18st-public-nav{bottom:max(10px,env(safe-area-inset-bottom));right:max(10px,env(safe-area-inset-right))}}

/* 7.0.11 – genuine gallery and timeline layouts. */
.w18st-gallery{position:absolute;inset:7% 6% 9%;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,42%),1fr));gap:14px;align-content:start;overflow:auto;overscroll-behavior:contain}
.w18st-gallery figure{margin:0;background:#202725;color:#fff;border-radius:8px;min-width:0;overflow:hidden}
.w18st-gallery img{display:block;width:100%;height:clamp(110px,22vh,260px);object-fit:cover}
.w18st-gallery figcaption{font:14px/1.4 system-ui,sans-serif;padding:9px 12px}
.w18st-timeline{position:absolute;inset:10% 9%;overflow:auto;overscroll-behavior:contain;border-left:3px solid #7f9b8f;padding-left:24px;color:#1c201f}
.w18st-timeline article{position:relative;margin:0 0 20px;padding:14px 18px;background:rgba(245,245,242,.92);border-radius:8px}
.w18st-timeline article:before{content:'';position:absolute;left:-32px;top:19px;width:11px;height:11px;border:2px solid #f5f5f2;background:#436c5e;border-radius:50%}
.w18st-timeline time{font-weight:700;color:#436c5e}.w18st-timeline h3{margin:6px 0;font-size:clamp(19px,2vw,28px)}.w18st-timeline p{margin:0;white-space:pre-wrap;font-size:clamp(14px,1.3vw,18px);line-height:1.45}
.w18st-special-empty{padding:24px;color:#a1a69f}
@media(max-width:600px){.w18st-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.w18st-gallery img{height:110px}.w18st-timeline{inset:8% 5%}}

/* 7.0.14 – keep chosen image focus in public story. */
.w18st-public-image>img{width:100%;height:100%;max-width:none}

/* 7.0.15: same reading-box color and continuous book columns on public slides. */
.w18st-public-element.w18st-panel-custom{background:var(--w18st-panel-color,#ffffff);border-radius:8px;padding:8px 10px}
.w18st-public-element:has(>.w18st-flow-2),.w18st-public-element:has(>.w18st-flow-3){align-items:flex-start!important}
.w18st-public-element>.w18st-flow-content{width:100%;min-width:0;max-height:100%;overflow-y:auto;overscroll-behavior:contain}
.w18st-flow-2,.w18st-flow-3{column-gap:24px;column-rule:1px solid rgba(120,125,120,.20);column-fill:balance;line-height:1.48;text-align:left}
.w18st-flow-2{column-count:2}.w18st-flow-3{column-count:3}
.w18st-flow-content p{margin:0 0 .8em}
@media(max-width:680px){.w18st-flow-3{column-count:2}.w18st-flow-content{column-gap:12px}}

/* 7.0.19: portrait phones / safe areas / no horizontal scroll on published stories. */
@media(max-width:680px){
 .w18st-story,.w18st-public-page{height:100dvh;height:100svh;min-height:0;max-width:100vw;overflow:hidden}
 .w18st-public-page{background-position:center center}
 .w18st-public-element:not(.w18st-public-image){overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;max-width:95%}
 .w18st-public-element>.w18st-flow-content{column-count:1!important;column-gap:0;column-rule:none;overflow:auto;overscroll-behavior:contain}
 .w18st-public-nav{left:10px;right:auto;bottom:max(10px,env(safe-area-inset-bottom));padding:7px;gap:7px}
 .w18st-public-nav button{min-height:44px;min-width:44px}
 .w18st-public-nav .w18st-count{min-width:3em}
 .w18st-gallery{inset:7% 12% 11% 5%}
 .w18st-timeline{inset:8% 12% 12% 6%}
}
@media (pointer:coarse){.w18st-public-element:not(.w18st-public-image),.w18st-gallery,.w18st-timeline{-webkit-overflow-scrolling:touch}}

.w18st-layout-biography-map .w18st-map-frame{inset:0}.w18st-layout-biography-map .w18st-leaflet-map{height:100%}

/* 7.1.0 – isolated, responsive HTML slide. */
.w18st-html-iframe{display:block;width:100%;height:100%;border:0;background:transparent;min-height:0;}

/* 7.1.1: embedded HTML scrolls within its own frame without forcing a story change. */
.w18st-layout-html{overflow:hidden}
.w18st-layout-html>.w18st-html-iframe{position:absolute;inset:0;width:100%;height:100%;overscroll-behavior:contain}
@media(pointer:coarse){.w18st-layout-html>.w18st-html-iframe{-webkit-overflow-scrolling:touch}}

/* 7.1.6: source/document/video/audio layouts in editor and public view. */
.w18st-resource-list{position:absolute;inset:7% 7% 11%;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(270px,100%),1fr));gap:14px;align-content:start;overflow:auto;overscroll-behavior:contain;color:#1c201f;scrollbar-width:thin}
.w18st-resource{display:flex;flex-direction:column;gap:9px;min-width:0;padding:14px;border:1px solid #a1a69f;border-radius:8px;background:#ebebe9;color:#1c201f;overflow-wrap:anywhere}
.w18st-resource h3{font:700 clamp(17px,2vw,24px)/1.2 system-ui;margin:0}
.w18st-resource p{white-space:pre-wrap;margin:0;font:15px/1.5 system-ui}
.w18st-resource a{align-self:flex-start;color:#225c68;text-decoration:underline;font:600 14px system-ui}
.w18st-resource small{font:13px/1.4 system-ui;color:#485955}
.w18st-resource iframe{height:min(50vh,520px);min-height:220px;width:100%;border:1px solid #9ba6aa;background:white}
.w18st-resource video{max-height:56vh;max-width:100%;width:100%;background:#121717}
.w18st-resource audio{width:100%;max-width:100%}
.w18st-resource-editor{display:flex;flex-wrap:wrap;align-items:end;gap:8px;padding:12px;margin:10px 0;border:1px solid #a1a69f;border-radius:7px;background:#f5f6f4}
.w18st-resource-editor>label{display:flex;flex:1 1 210px;flex-direction:column;gap:4px;font-size:12px}
.w18st-resource-editor input,.w18st-resource-editor textarea{width:100%;min-height:38px;box-sizing:border-box}
.w18st-resource-editor textarea{min-height:62px}
@media(max-width:700px){.w18st-resource-list{inset:6% 12% 13% 5%;grid-template-columns:minmax(0,1fr)}.w18st-resource-editor button{min-height:44px}}

/* 7.1.9: isolated 3D canvas follows HTML-slide sizing on every viewport. */
.w18st-layout-three-d>.w18st-html-iframe{position:absolute;inset:0;width:100%;height:100%;overscroll-behavior:contain}
@media(pointer:coarse){.w18st-layout-three-d>.w18st-html-iframe{-webkit-overflow-scrolling:touch}}

/* 7.2.8 – mobile published-story controls and interactive swipe isolation. */
@media (pointer:coarse){
 .w18st-public-nav button{min-width:44px;min-height:44px;touch-action:manipulation}
 .w18st-interactive-root,.w18st-story-links,.w18st-gallery,.w18st-timeline{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
 .w18st-public-element:not(.w18st-public-image){-webkit-overflow-scrolling:touch}
}
@media (max-height:439px){.w18st-story,.w18st-public-page{min-height:0;height:100dvh}}

/* 7.2.9: published resource and interactive lists retain internal scrolling. */
.w18st-resource-list,.w18st-interactive-root,.w18st-story-links{overscroll-behavior:contain;scrollbar-width:thin;}
@media(pointer:coarse){.w18st-resource-list,.w18st-interactive-root,.w18st-story-links{-webkit-overflow-scrolling:touch;touch-action:pan-y;}}

/* 7.2.15: No artificial frame around full-bleed photographs; captions are independent overlays. */
.w18st-layout-full .w18st-public-image,
.w18st-layout-image-overlay .w18st-public-image{box-shadow:none;background:transparent;}

/* 7.2.16: visible overlays always appear on top of the photograph in published slides. */
.w18st-layout-image-overlay .w18st-public-image,
.w18st-layout-photo .w18st-public-image{z-index:0}
.w18st-layout-image-overlay .w18st-public-element:not(.w18st-public-image),
.w18st-layout-photo .w18st-public-element:not(.w18st-public-image){z-index:2}
