/* The room grade affects only the virtual architecture and lighting. The
   collection photographs remain unfiltered and keep their native proportions. */
.p01-r05 .oc-scene--r03-room:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
  --oc-room-light: .94;
  --oc-floor-warmth: .23;
  --oc-room-colour: url('/p01/r05/environment/gallery.webp');
}

.p01-r05 .oc-scene--r03-room .oc-room:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
  z-index: 0;
  object-position: center;
  filter: grayscale(.87) saturate(.8) contrast(1.06) brightness(var(--oc-room-light));
}

.p01-r05 .oc-scene--r03-room:is(.oc-scene--textile, .oc-scene--robe):where(:not([data-wichf-shell], [data-wichf-shell] *)) { --oc-room-light: .86; }
.p01-r05 .oc-scene--r03-room:is(.oc-scene--figure, .oc-scene--drums, .oc-scene--mask):where(:not([data-wichf-shell], [data-wichf-shell] *)) { --oc-room-light: .78; }
.p01-r05 .oc-scene--r03-room:is(.oc-scene--textile, .oc-scene--robe, .oc-scene--figure, .oc-scene--drums, .oc-scene--mask) .oc-room:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
  filter: grayscale(.87) saturate(.8) contrast(1.06) brightness(var(--oc-room-light));
}

.p01-r05 .oc-scene--r03-room:where(:not([data-wichf-shell], [data-wichf-shell] *))::before,.p01-r05 
.oc-scene--r03-room:where(:not([data-wichf-shell], [data-wichf-shell] *))::after {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}
.p01-r05 .oc-scene--r03-room:where(:not([data-wichf-shell], [data-wichf-shell] *))::before {
  background: var(--oc-room-colour) center / cover no-repeat;
  mask-image: linear-gradient(to bottom, #000 0%, #0008 16%, transparent 31% 70%, #0008 79%, #000 89% 100%);
  opacity: var(--oc-floor-warmth);
}
.p01-r05 .oc-scene--r03-room:where(:not([data-wichf-shell], [data-wichf-shell] *))::after {
  background: linear-gradient(180deg, transparent 17%, #05060957 27%, transparent 41% 71%, #0406074a 89%, #04060720);
}

.p01-r05 .oc-scene--r03-room .oc-object-display:where(:not([data-wichf-shell], [data-wichf-shell] *)) { z-index: 2; }
.p01-r05 .oc-scene--r03-room .oc-image-error:where(:not([data-wichf-shell], [data-wichf-shell] *)) { z-index: 5; }
.p01-r05 #main-content .oc-stage__note:where(:not([data-wichf-shell], [data-wichf-shell] *)) { max-width: none; }

.p01-r05 .oc-scene--r03-room.oc-scene--screens .oc-object-photo:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
  box-shadow: 0 0 0 1px #312c21, 0 2px 1px 2px #171715, 0 .52rem .95rem #000a;
}

.p01-r05 .oc-visitor:where(:not([data-wichf-shell], [data-wichf-shell] *)) { z-index: 3; isolation: isolate; }
.p01-r05 .oc-visitor > img:first-child:where(:not([data-wichf-shell], [data-wichf-shell] *)) { position: relative; z-index: 1; filter: saturate(.67) brightness(.87); }
.p01-r05 .oc-visitor:where(:not([data-wichf-shell], [data-wichf-shell] *))::before {
  content: '';
  position: absolute;
  inset: auto -26% -1.7% -26%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse, #080807c7, transparent 71%);
}
.p01-r05 .oc-visitor__reflection:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
  transform: translateY(54%) scaleY(-.54);
  transform-origin: center top;
  opacity: .45;
  filter: blur(1.3px) saturate(.52) brightness(.56);
  mask-image: linear-gradient(to top, #000 2%, #000a 29%, transparent 88%);
}

/* Keep both screens within their own wall bay. Set the frames by proportion so
   a wider screen reaches further into the left bay without resizing its pixels. */
@media (width > 920px) {
  .p01-r05 .oc-scene--screens .oc-object-display:where(:not([data-wichf-shell], [data-wichf-shell] *)) { column-gap: 3.45%; }
  .p01-r05 .oc-scene--screens .oc-object-photo--tiger:where(:not([data-wichf-shell], [data-wichf-shell] *)) { margin-bottom: clamp(2px, .45vw, 8px); }
  .p01-r05 .oc-scene--r03-room.oc-scene--screens .oc-object-display:where(:not([data-wichf-shell], [data-wichf-shell] *))::before,.p01-r05 
  .oc-scene--r03-room.oc-scene--screens .oc-object-display:where(:not([data-wichf-shell], [data-wichf-shell] *))::after {
    content: '';
    position: absolute;
    z-index: -1;
    bottom: -3%;
    height: 7%;
    background: linear-gradient(0deg, #07070700, #080807b0);
    pointer-events: none;
  }
  .p01-r05 .oc-scene--r03-room.oc-scene--screens .oc-object-display:where(:not([data-wichf-shell], [data-wichf-shell] *))::before {
    left: 0;
    width: 52.1%;
    clip-path: polygon(0 0,100% 15%,100% 57%,0 100%);
  }
  .p01-r05 .oc-scene--r03-room.oc-scene--screens .oc-object-display:where(:not([data-wichf-shell], [data-wichf-shell] *))::after {
    right: 0;
    width: 44.4%;
    bottom: 0;
    clip-path: polygon(0 15%,100% 0,100% 100%,0 58%);
  }
}

.p01-r05 .oc-related:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
  --oc-card-padding: clamp(.75rem, 1.45vw, 1.35rem);
  --oc-card-angle: 2.12;
  align-items: stretch;
}

.p01-r05 .oc-related-card:where(:not([data-wichf-shell], [data-wichf-shell] *)) { display: flex; background: #061e18; }
.p01-r05 .oc-related-card > a:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
}
.p01-r05 .oc-related-card__image:where(:not([data-wichf-shell], [data-wichf-shell] *)) { flex: none; aspect-ratio: var(--oc-card-angle); width: 100%; }
.p01-r05 .oc-related-card--screens .oc-related-card__image:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
  background-image: linear-gradient(0deg, #1014197d, #13151938), var(--oc-gallery-preview);
}
.p01-r05 .oc-related-card__copy:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
  display: grid;
  flex: 1;
  align-content: start;
  row-gap: .16rem;
  margin: 0;
  padding: var(--oc-card-padding);
}
.p01-r05 #main-content .oc-related-card__copy h3:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
  margin-block: 0 .17rem;
  min-height: 1.12em;
  text-wrap: pretty;
}
.p01-r05 .oc-related-card__copy p:last-of-type:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
  max-width: 35ch;
  line-height: 1.42;
  text-wrap: pretty;
}
.p01-r05 .oc-related-card__arrow:where(:not([data-wichf-shell], [data-wichf-shell] *)) { top: var(--oc-card-padding); right: var(--oc-card-padding); }

@media (621px <= width) {
  .p01-r05 .oc-related:where(:not([data-wichf-shell], [data-wichf-shell] *)) { grid-auto-rows: auto; row-gap: 0; }
  .p01-r05 .oc-related-card:where(:not([data-wichf-shell], [data-wichf-shell] *)) { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  .p01-r05 .oc-related-card:not(:nth-last-child(-n + 3)):where(:not([data-wichf-shell], [data-wichf-shell] *)) { margin-bottom: clamp(.75rem,1.8vw,1.65rem); }
  .p01-r05 .oc-related-card > a:where(:not([data-wichf-shell], [data-wichf-shell] *)) { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
  .p01-r05 .oc-related-card__copy:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: .16rem;
  }
}

@media (621px <= width <= 920px) {
  .p01-r05 .oc-related:where(:not([data-wichf-shell], [data-wichf-shell] *)) { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .p01-r05 .oc-related-card:not(:last-child):where(:not([data-wichf-shell], [data-wichf-shell] *)) { margin-bottom: clamp(.75rem,1.8vw,1.65rem); }
}

@media (width <= 620px) {
  .p01-r05 .oc-related-card > a:where(:not([data-wichf-shell], [data-wichf-shell] *)) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
    align-items: start;
  }
  .p01-r05 .oc-related-card__image:where(:not([data-wichf-shell], [data-wichf-shell] *)) { aspect-ratio: 1; align-self: start; height: auto; min-height: 0; }
  .p01-r05 .oc-related-card__copy:where(:not([data-wichf-shell], [data-wichf-shell] *)) { align-self: stretch; }
  .p01-r05 .oc-related-card__arrow:where(:not([data-wichf-shell], [data-wichf-shell] *)) { right: .45rem; }
}
