/* Shared Lucas2 guide framing and the section ornament. */
:is(.mobile-gameplay,.character-select,.journey,.intro,.finder-section,.systems,.system-story,.cta-section){position:relative}
:is(.mobile-gameplay,.character-select,.journey,.intro,.finder-section,.systems,.system-story,.cta-section)::before,
.system-story::before{
  content:"";position:absolute;z-index:5;top:0;left:50%;width:min(calc(100% - 48px),1120px);height:42px;
  transform:translateX(-50%);pointer-events:none;box-shadow:none;border:0;
  background:url('../img/ornaments/section-divider.svg') center/160px 42px no-repeat,
    linear-gradient(90deg,transparent,#73512d 20%,#ba8950) left 21px/calc(50% - 78px) 1px no-repeat,
    linear-gradient(90deg,#ba8950,#73512d 80%,transparent) right 21px/calc(50% - 78px) 1px no-repeat
}
.system-story,.system-story:nth-child(even),.system-story.has-guide-table,.system-story.has-guide-table:nth-child(even){border-top:0}
.mobile-gameplay-divider{display:none}

/* Every source illustration keeps its natural ratio inside one consistent frame. */
.system-story.has-source-guide .psd-guide-scene:not(.market-art-frame),
.system-story.has-source-guide .psd-guide-image-frame,
.system-story .system-art-frame,
.system-story .system-supplement-frame,
.intro-guide-poster{
  position:relative;isolation:isolate;width:min(100%,1080px);margin:30px auto 0;padding:14px;
  border:1px solid color-mix(in srgb,var(--story-accent,#c79a5d) 65%,#936735);
  background:repeating-linear-gradient(45deg,#d3a35e0c 0 1px,transparent 1px 12px),linear-gradient(135deg,#432b17,#100c09 28%,#18110d 72%,#3b2716);
  box-shadow:inset 0 0 0 4px #0b0907,inset 0 0 0 5px #72502d,0 24px 56px #000a,0 0 30px color-mix(in srgb,var(--story-accent,#c79a5d) 13%,transparent);
  overflow:visible
}
.system-story.has-source-guide .psd-guide-scene:not(.market-art-frame)::before,
.system-story.has-source-guide .psd-guide-image-frame::before,
.system-story .system-art-frame::before,
.system-story .system-supplement-frame::before,
.intro-guide-poster::before{
  content:"";position:absolute;z-index:2;inset:7px;pointer-events:none;border:1px solid #d6aa6d77;
  box-shadow:inset 0 0 0 3px #0a0807b8
}
.guide-frame-corner{position:absolute;z-index:3;width:58px;height:58px;pointer-events:none;background:url('../img/ornaments/east-corner.svg') center/contain no-repeat;filter:drop-shadow(0 3px 3px #000a)}
.guide-frame-corner--tl{top:-8px;left:-8px}
.guide-frame-corner--tr{top:-8px;right:-8px;transform:rotate(90deg)}
.guide-frame-corner--br{bottom:-8px;right:-8px;transform:rotate(180deg)}
.guide-frame-corner--bl{bottom:-8px;left:-8px;transform:rotate(270deg)}
.system-story.has-source-guide :is(.psd-guide-scene:not(.market-art-frame),.psd-guide-image-frame) img,
.system-story :is(.system-art-frame,.system-supplement-frame) img,
.intro-guide-poster>img{display:block;width:100%;height:auto;object-fit:contain;border:1px solid #9b7040;box-shadow:0 0 0 3px #0d0a08}
.system-story.has-source-guide .psd-guide-title{border-bottom:0;padding-bottom:16px;margin-bottom:18px;text-align:center;text-wrap:balance}
.system-story.has-source-guide .psd-guide-title::after{display:block;content:"";width:112px;height:10px;margin:19px auto 0;background:linear-gradient(90deg,#d4a464,#d4a464) center/100% 1px no-repeat,url('../img/ornaments/section-divider.svg') center/42px 11px no-repeat;box-shadow:none}
html[lang="en"] .system-story.has-source-guide .story-copy h2{max-width:1040px;margin:16px auto 18px;text-align:center;text-wrap:balance}
html[lang="en"] .system-story.has-source-guide .story-copy>p:first-of-type{margin-inline:auto;text-align:center}
.system-story.has-source-guide .psd-guide-copy{border:1px solid color-mix(in srgb,var(--story-accent) 46%,#5b4025);border-left:3px solid var(--story-accent);background:linear-gradient(110deg,color-mix(in srgb,var(--story-accent) 13%,#21160e),#130e0b 72%);box-shadow:0 14px 34px #0006}
.system-story.has-source-guide .psd-guide-subheading{padding-bottom:16px;border-bottom:1px solid color-mix(in srgb,var(--story-accent) 54%,#49331e)}

/* The original embedded illustrations accompany the interactive dungeon and map views. */
#sistem-zindanlar .psd-guide-image-frame,
#sistem-yeniharitalar .psd-guide-scene,
#sistem-yeniharitalar .psd-guide-image-frame,
#sistem-zindanlar .psd-guide-subheading:nth-of-type(-n+2),
#sistem-yeniharitalar .psd-guide-subheading{display:block}
#sistem-zindanlar .dungeon-route,#sistem-yeniharitalar .map-explorer{margin-bottom:36px}
#sistem-zindanlar .psd-guide-image-frame,#sistem-yeniharitalar .psd-guide-image-frame{max-width:1010px}

/* Framed previews that sit outside the PSD source stack. */
.stage-card,.dungeon-boss-scene,.map-explorer-scene,.journey-visual{outline:1px solid #b18a536b;outline-offset:-8px}
.stage-card-image{border-bottom:1px solid #c79a5d}
.stage-card-image::before,.dungeon-boss-scene::before,.map-explorer-scene::before{content:"";position:absolute;z-index:4;inset:8px;pointer-events:none;border:1px solid #d9aa6975}
.stage-card-image::before{z-index:2}
@media(max-width:700px){
  :is(.mobile-gameplay,.character-select,.journey,.intro,.finder-section,.systems,.system-story,.cta-section)::before,.system-story::before{width:calc(100% - 24px);background-size:118px 31px,calc(50% - 58px) 1px,calc(50% - 58px) 1px;background-position:center 5px,left 21px,right 21px}
  .system-story.has-source-guide .psd-guide-scene:not(.market-art-frame),.system-story.has-source-guide .psd-guide-image-frame,.intro-guide-poster{padding:8px}
  .guide-frame-corner{width:38px;height:38px}
  .system-story.has-source-guide .psd-guide-copy{padding:17px;font-size:14px;line-height:1.68}
}
