/* Static scenery remains behind the existing Wiki panels and article layout. */
.ciki-world-backdrop { display: none; }

/* Leave the upper room visible before the reading furniture begins. The
   lamps and high window sit about 100–150 screen pixels below its ceiling;
   the old 30px gap put almost all of them behind the opaque article panels.
   This is applied from the article's existing markup, before image decode. */
html body:not(.ciki-layout-editing):not(.ciki-history-open) #app:not(.editor):not(.admin) .v-main > .v-main__wrap > .container.grid-list-xl:has(.contents :is(.case-dossier--lore, .case-dossier--guides, .case-dossier--characters, .project-portal--prequel, .project-portal--mirage)) {
  padding-top: clamp(136px, 18svh, 192px) !important;
}

html body.ciki-world-background:not(.ciki-layout-editing):not(.ciki-history-open) #app:not(.editor):not(.admin) .v-main > .v-main__wrap > .container.grid-list-xl {
  position: relative;
  isolation: isolate;
}

html body.ciki-world-background:not(.ciki-layout-editing):not(.ciki-history-open) #app:not(.editor):not(.admin) .v-main > .v-main__wrap > .container.grid-list-xl > .ciki-world-backdrop {
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: clip;
  background-color: #232b30;
}

/* A single still follows a long article without repeating the room or
   stretching its architecture. clip does not create a scroll container. */
html body.ciki-world-background .ciki-world-backdrop::before {
  content: "";
  display: block;
  position: sticky;
  top: var(--ciki-room-header, 64px);
  height: max(480px, calc(100vh - var(--ciki-room-header, 64px)));
  height: max(480px, calc(100svh - var(--ciki-room-header, 64px)));
  background-image: var(--ciki-room-image, none);
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}

@media print {
  .ciki-world-backdrop { display: none !important; }
  html body:not(.ciki-layout-editing):not(.ciki-history-open) #app:not(.editor):not(.admin) .v-main > .v-main__wrap > .container.grid-list-xl:has(.contents :is(.case-dossier--lore, .case-dossier--guides, .case-dossier--characters, .project-portal--prequel, .project-portal--mirage)) {
    padding-top: 30px !important;
  }
}
