/* Sacralib V2.20 — corrected inner-page parity with the *CURRENT* homepage.
   V2.19 mistakenly copied V2.7's viewport-edge wallpaper and Unicode chevron.
   Actual homepage improvements are V2.8 (#homeView attached artwork) and
   V2.11 (flex-centred CSS triangle). No modifications to HOME or public UI. */
body.sv218-page-theme.sv217-page-theme.sv216-page-theme.codex-site-v2-current:not(.codex-site-v2-home) {
  /* Same single uninterrupted paper wash as HOME V2.8 — no edge murals on BODY. */
  --sv220-gutter:clamp(20px,5.55vw,116px);
  background-color:#f4ecdf!important;
  background-image:linear-gradient(180deg,#f7f0e5 0%,#f4ecdf 55%,#f4ecdf 100%)!important;
  background-position:center top!important;
  background-size:100% 100%!important;
  background-repeat:no-repeat!important;
  background-attachment:fixed!important;
}
/* V2.8 is the current HOME background, not the old V2.7 repeating
   parchment.webp texture. Articles and all other owner V2 inner routes must
   inherit the one continuous wash above. The original repeating-texture
   override introduced later caused visible horizontal seams. */
body.sv218-page-theme.sv217-page-theme.sv216-page-theme.codex-site-v2-current:not(.codex-site-v2-home) .codex-navbar {
  /* V2.8 home uses the flat warm parchment toolbar, NOT V2.16's pale
     white gradient. Keep typography and navigation geometry unchanged. */
  background:#f5eddf!important;
  border-bottom-color:#d5bea0!important;
}
/* V2.17/18 duplicate full-screen images remain switched off by V2.19. */
body.sv218-page-theme.sv217-page-theme:not(.codex-site-v2-home) #sv217Landscapes {display:none!important;}
body.sv218-page-theme.sv217-page-theme:not(.codex-site-v2-home)::before {display:none!important;content:none!important;}
/* On HOME V2.8, murals are located relative to #homeView, not the viewport.
   Do the same for real inner views: the artwork stays close to the columns
   even if the user has a wide monitor. Every image keeps its original ratio. */
body.sv218-page-theme.sv217-page-theme.sv216-page-theme.codex-site-v2-current:not(.codex-site-v2-home)
:is(#articleView,#libraryView,#guidesView,#experienceView,#mapsView,#ratingView,#onlineView,#chatView,#armoryView,#marketView,#game-marketView,#set-compareView,#bugsView).active {
  position:relative!important;
  isolation:isolate!important;
  overflow:visible!important;
}
body.sv218-page-theme.sv217-page-theme.sv216-page-theme.codex-site-v2-current:not(.codex-site-v2-home)
:is(#articleView,#libraryView,#guidesView,#experienceView,#mapsView,#ratingView,#onlineView,#chatView,#armoryView,#marketView,#game-marketView,#set-compareView,#bugsView).active::before,
body.sv218-page-theme.sv217-page-theme.sv216-page-theme.codex-site-v2-current:not(.codex-site-v2-home)
:is(#articleView,#libraryView,#guidesView,#experienceView,#mapsView,#ratingView,#onlineView,#chatView,#armoryView,#marketView,#game-marketView,#set-compareView,#bugsView).active::after {
  content:''!important;
  display:block!important;
  position:absolute!important;
  top:-90px!important;
  width:clamp(60px,calc(var(--sv220-gutter) - 12px),138px)!important;
  height:auto!important;
  aspect-ratio:160 / 2048!important;
  max-height:none!important;
  pointer-events:none!important;
  opacity:.88!important;
  border:0!important;
  background-repeat:no-repeat!important;
  background-position:top center!important;
  background-size:100% 100%!important;
  z-index:-1!important;
  filter:saturate(.85)!important;
}
body.sv218-page-theme.sv217-page-theme.sv216-page-theme.codex-site-v2-current:not(.codex-site-v2-home)
:is(#articleView,#libraryView,#guidesView,#experienceView,#mapsView,#ratingView,#onlineView,#chatView,#armoryView,#marketView,#game-marketView,#set-compareView,#bugsView).active::before {
  left:calc(4px - var(--sv220-gutter))!important;
  right:auto!important;
  background-image:url('/assets/codex-v27-figma/side-left.webp')!important;
}
body.sv218-page-theme.sv217-page-theme.sv216-page-theme.codex-site-v2-current:not(.codex-site-v2-home)
:is(#articleView,#libraryView,#guidesView,#experienceView,#mapsView,#ratingView,#onlineView,#chatView,#armoryView,#marketView,#game-marketView,#set-compareView,#bugsView).active::after {
  right:calc(4px - var(--sv220-gutter))!important;
  left:auto!important;
  background-image:url('/assets/codex-v27-figma/side-right.webp')!important;
}
/* HOME V2.8 intentionally hides decorative side columns below 1550px. */
@media(max-width:1550px) {
 body.sv218-page-theme.sv217-page-theme.sv216-page-theme.codex-site-v2-current:not(.codex-site-v2-home)
 :is(#articleView,#libraryView,#guidesView,#experienceView,#mapsView,#ratingView,#onlineView,#chatView,#armoryView,#marketView,#game-marketView,#set-compareView,#bugsView).active::before,
 body.sv218-page-theme.sv217-page-theme.sv216-page-theme.codex-site-v2-current:not(.codex-site-v2-home)
 :is(#articleView,#libraryView,#guidesView,#experienceView,#mapsView,#ratingView,#onlineView,#chatView,#armoryView,#marketView,#game-marketView,#set-compareView,#bugsView).active::after {
   display:none!important;content:none!important;
 }
}
/* HOME V2.11: flex-centred text and a real CSS triangle, not the Unicode "⌄"
   added back by V2.19. This removes font-dependent vertical displacement. */
@media(min-width:1200px) {
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home)
 #sv23MainNav .sv23-top-group>summary {
   display:flex!important;align-items:center!important;justify-content:center!important;
   gap:5px!important;line-height:1.25!important;min-height:38px!important;
   list-style:none!important;
 }
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home)
 #sv23MainNav .sv23-top-group>summary::-webkit-details-marker {display:none!important;}
 body.sv218-page-theme.codex-site-v2-current:not(.codex-site-v2-home)
 #sv23MainNav .sv23-top-group>summary::after {
   content:''!important;display:block!important;position:static!important;
   width:0!important;height:0!important;font-size:0!important;line-height:0!important;
   border-left:4px solid transparent!important;
   border-right:4px solid transparent!important;
   border-top:5px solid #795535!important;
   border-bottom:0!important;
   background:none!important;
   top:auto!important;bottom:auto!important;
   vertical-align:middle!important;
   flex:none!important;align-self:center!important;
   margin:2px 0 0 1px!important;
   transform:none!important;
 }
}
