* {box-sizing:border-box}
:root {color-scheme:dark;background:#22231f}
body {margin:0;height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr);color:#e5e3d9;background:#22231f;font-family:Arial,sans-serif}
a {color:inherit;text-decoration:none}
button {font:inherit;color:inherit;cursor:pointer}
:focus-visible {outline:3px solid #d77746;outline-offset:3px}
[hidden] {display:none!important}
header {min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 4vw;background:#141513;color:white;position:relative;z-index:2}
.logo {font-size:20px;font-weight:bold;letter-spacing:-.6px}
nav {display:flex;gap:16px;font-size:13px;flex-wrap:wrap}
nav [aria-current],.source {text-decoration:underline;text-underline-offset:3px}
.menu {display:none;background:none;border:0}
main {position:relative;min-height:0;overflow:hidden}
.heading {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.heading,footer {padding:14px 4vw;display:flex;align-items:baseline;justify-content:space-between;gap:16px}
h1,h2 {font-family:Georgia,serif;font-weight:400;margin:0;letter-spacing:-.045em}
h1 {font-size:clamp(36px,4vw,56px);line-height:1.03}
#place,.kicker,.credit {font:12px/1.3 Consolas,monospace}
.scene {position:absolute;inset:0;overflow:hidden;container-type:size;background:#332d24}
.plane {position:absolute;top:50%;left:50%;width:max(100cqw,169.412cqh);aspect-ratio:1440/850;transform:translate(-50%,-50%)}
@media(min-width:701px){
 .scene.screen {background:#292a25}
 .screen .plane {aspect-ratio:2400/1450;width:max(100cqw,165.518cqh,min(200cqw,330cqh))}
}
.room {width:100%;height:100%;display:block}
.surface {position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h)}
#case {cursor:pointer}
:is(#case,#case12,#feature-disc):hover,:is(#case,#case12,#feature-disc):focus-visible {outline:2px solid #f4e7c9;outline-offset:2px}
:is(#case,#case12,#feature-disc):focus-visible {background:rgb(255 240 193 / .32)}
#shelf-caption .action {min-width:44px}
.screen .plane {isolation:isolate}
#rack-print {position:absolute;left:0;top:30%;width:20%;height:50%;pointer-events:none}
#projector-rack {position:absolute;left:0;top:49%;width:16%;height:20%;min-height:44px;border:0;padding:0;background:transparent;cursor:pointer;touch-action:manipulation}
#projector-rack:focus-visible {outline-offset:-3px}
@media(orientation:portrait) {
 #projector-rack,#rack-print {display:none}
}
#projection {
 container-type:inline-size;
 /* Screen blend adds the film's light to the photographed cloth. Black frames
    reveal the ambient light on the cloth, including the material variation. */
 mix-blend-mode:screen;
 mask-image:url(projection-weave.svg),radial-gradient(ellipse at 48% 45%,#000 30%,rgb(0 0 0 / .93) 100%),linear-gradient(to right,transparent,#000 1.5px,#000 calc(100% - 1.5px),transparent),linear-gradient(to bottom,transparent,#000 1.5px,#000 calc(100% - 1.5px),transparent);
 mask-size:160px 160px,100% 100%,100% 100%,100% 100%;
 mask-repeat:repeat,no-repeat,no-repeat,no-repeat;
 mask-composite:intersect;
}
#play,#original {width:100%;height:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:5% 8%;text-align:left;border:0;color:#30382f;background:#c9caba}
#play strong,#original strong {font:normal 12cqw/1 Georgia,serif;letter-spacing:-.055em}
.credit {font-size:clamp(10px,2.5cqw,16px);margin-bottom:3%}
.projected-year {font:italic 8cqw/1.05 Georgia,serif;color:#565e4e}
#original {padding:3% 6%;overflow:auto}
#original h3 {margin:0;font:normal clamp(16px,5cqw,42px)/1.1 Georgia,serif}
#original p {margin:.4em 0;font-size:clamp(11px,2.6cqw,17px)}
#original a {display:flex;align-items:center;min-height:clamp(28px,10cqw,46px);font-size:clamp(12px,3.2cqw,22px);text-decoration:underline;text-underline-offset:.2em}
.play-label {margin-top:4%;font-size:clamp(12px,2.8cqw,18px);padding-block:1%;border-bottom:1px solid}
#test-film {display:block;width:100%;height:100%;object-fit:contain;background:#141613}
#projection iframe {display:block;width:100%;height:100%;border:0;background:#141613}
footer {align-items:center;min-height:86px}
.kicker {display:block;color:#b9baae;margin-bottom:4px}
h2 {font-size:clamp(23px,2.2vw,34px);line-height:1.1}
h2 i {font-weight:400;color:#716b5e}
.action,.source {display:inline-flex;align-items:center;min-height:44px;font-size:14px}
.action {text-decoration:underline;text-underline-offset:4px;gap:10px}
.links {display:flex;align-items:center;gap:24px}
.source {font-size:12px;color:#b9baae}
@media(max-width:700px){
 header {min-height:48px;padding:0 5vw}
 .menu {display:block;min-height:44px}
 nav {display:grid;position:absolute;inset:100% 0 auto;padding:12px 5vw 20px;background:#141513}
 .menu[aria-expanded=false]+nav {display:none}
 .heading,footer {padding:14px 5vw}
 .plane {width:max(100cqw,44cqh);aspect-ratio:660/1500}
 .screen .plane {width:max(191cqw,72.728cqh);aspect-ratio:800/1100}
 .links {gap:12px;flex-wrap:wrap}
 footer {align-items:flex-start;flex-direction:column;gap:3px}
 .action,.source {min-height:44px}
}

/* As on Visuals, the caption sits directly on the full-height shop view. */
footer {
 position:absolute;inset:auto 0 0;pointer-events:none;
 color:#fff9ef;background:linear-gradient(transparent,rgba(21,20,15,.85));
 padding-top:40px;padding-bottom:max(12px,env(safe-area-inset-bottom))
}
footer .kicker {color:inherit}
footer a {pointer-events:auto}
@media(max-height:520px) and (orientation:landscape){
 /* Share one control row so the cloth can use the phone's limited height. */
 body:has(.scene.screen) {
   grid-template: minmax(0,1fr) auto / auto minmax(0,1fr);
 }
 main:has(.scene.screen) {display:contents}
 .scene.screen {position:relative;grid-area:1 / 1 / 2 / -1}
 body:has(.scene.screen) header {
   grid-area:2 / 1;min-height:44px;gap:12px;padding:0 10px 0 max(12px,env(safe-area-inset-left));
 }
 body:has(.scene.screen) .logo {font-size:16px}
 body:has(.scene.screen) .menu {display:block;min-height:44px}
 body:has(.scene.screen) nav {
   position:absolute;inset:auto auto 100% 0;display:grid;gap:0;background:#141513;
   padding:6px 16px;min-width:150px;max-height:calc(100dvh - 52px);overflow:auto;
 }
 body:has(.scene.screen) nav a {padding-block:8px}
 body:has(.scene.screen) .menu[aria-expanded=false]+nav {display:none}
 #screen-caption {
   grid-area:2 / 2;position:static;min-width:0;min-height:44px;
   padding:0 max(12px,env(safe-area-inset-right)) 0 6px;gap:8px;
   flex-direction:row;align-items:center;background:#141513;
 }
 #screen-caption>div:first-child {min-width:0}
 #screen-caption .links {flex:none;flex-wrap:nowrap;gap:12px}
 #screen-caption .kicker {display:none}
 #screen-caption h2 {font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 /* The visible film occupies 35.86% of the wide plate and is 16:9. */
 .screen .plane {width:max(100cqw,165.518cqh,min(266cqw,456cqh));aspect-ratio:2400/1450}
}

/* While the jam is on the cloth, give the shop a single way back. */
body:has(#projection iframe) {grid-template:minmax(0,1fr) auto / minmax(0,1fr)}
.file-preview #projection {mask-image:none}
body:has(#projection iframe) header,
main:has(#projection iframe) #screen-caption > div:first-child,
main:has(#projection iframe) #test-link,
main:has(#projection[data-playing]) #source-film {display:none}
main:has(#projection iframe) {display:contents}
.scene:has(#projection iframe) {position:relative;grid-area:1 / 1}
main:has(#projection iframe) #screen-caption {
  position:static;grid-area:2 / 1;min-height:44px;
  flex-direction:row;align-items:center;justify-content:center;
  padding:0 max(12px,env(safe-area-inset-left),env(safe-area-inset-right)) env(safe-area-inset-bottom);
  background:#141513;
}
@media(orientation:landscape) {
 /* Keep the nearest hangers and the whole projection within the same shot. */
 .screen .plane:has(#projector-rack:not([hidden])) {
   width:max(100cqw,165.518cqh,min(160cqw,456cqh));
   aspect-ratio:2400/1450;
   transform:translate(max(-50%,calc(-50cqw - 6%)),-50%);
 }
}
