.gallery-slide--cog-room{display:none;background:#000}
.is-divine .gallery-slide--cog-room{display:block}
.is-divine .gallery:has(cogwheel-room) :is(.gallery-track,.gallery-control,.gallery-footer){display:none}
.gallery:has(.gallery-empty) :is(.gallery-control,.gallery-footer){display:none}
.gallery-slide--cog-room::after{inset:0;background:none;box-shadow:inset 0 0 28px 8px #02040899;pointer-events:none}
cogwheel-room{display:block;position:relative;width:100%;height:100%;overflow:hidden;background:#000}
cogwheel-room canvas{display:block;width:100%;height:100%}

/* The cabinet has its own frontal light; keep the page sunbeam pass behind it. */
html.is-divine .about-section>.gallery{position:relative;z-index:4}

cogwheel-room{cursor:pointer}
cogwheel-room:focus-visible{outline:3px solid #d8b66d;outline-offset:-4px}
html.is-cog-cursor,html.is-cog-cursor *{cursor:var(--rl-cog-cursor)!important}
html.is-cog-cursor .divine-cursor{display:none!important}

/* Reveal depth through the camera, without fading or scaling the scene. */
.gallery-slide--cog-room,cogwheel-room,cogwheel-room canvas{opacity:1;animation:none;transition:none}

/* A fixed, recessed edge belongs to the page; the machinery sits behind it. */
.is-divine .gallery:has(cogwheel-room) .gallery-viewport{border-color:#5e4c3180;box-shadow:inset 0 0 0 2px #17130c,0 1px 0 1px #fff9e3aa}
.gallery-slide--cog-room::after{box-shadow:inset 0 0 0 3px #100e0b,inset 0 12px 12px -5px #000b,inset 0 -8px 10px -5px #0008}

/* Only the sun cursor reveals the machinery through a soft pool of light. */
cogwheel-room canvas{visibility:hidden;mask-image:radial-gradient(circle 185px at var(--lamp-x,50%) var(--lamp-y,50%),#000 0%,#000 18%,#000b 43%,#0005 68%,transparent 100%);-webkit-mask-image:radial-gradient(circle 185px at var(--lamp-x,50%) var(--lamp-y,50%),#000 0%,#000 18%,#000b 43%,#0005 68%,transparent 100%)}
cogwheel-room[data-lit] canvas{visibility:visible}
html.is-cog-cursor cogwheel-room canvas{visibility:hidden}
