:root{
  --paper:#f6eef1;   /* a VERY slight pink — sacred, initiatory, softer than the other rooms */
  --ink:#26202c;
  --muted:#6b6470;
  --pink:#cc5f97;
  --hair:rgba(38,32,44,.16);
}

*{ margin:0; padding:0; box-sizing:border-box; }

html,body{
  background:var(--paper);
  color:var(--ink);
  font-family:'Courier Prime', ui-monospace, monospace;
}
html{ height:100%; }
body{ min-height:100%; overflow-x:hidden; }

/* Desktop: one contained viewport. Portrait: the stage grows tall
   (JS sets its height) and the page scrolls — premium column of pieces. */
#stage{
  position:relative;
  width:100%;
  height:100dvh;
  overflow:hidden;
  /* instant wall: CSS twin of the procedural backdrop paints the moment the
     HTML arrives — the canvas's first frame lands on a near-identical wall,
     so the room never reads as a blank slab while three.js + GLBs load */
  background:radial-gradient(120% 95% at 50% 38%, #f6eef1 0%, #e6d8dd 100%);
}

#gl{
  position:absolute; inset:0;
  width:100%; height:100%;
  display:block;
  touch-action:pan-y;          /* taps + hover drive the scene; scrolling stays native */
  cursor:default;
}
#gl.is-hot{ cursor:pointer; }
#gl.is-grab{ cursor:grabbing; }

/* ---------- type ---------- */

.mono{ font-family:'Courier Prime', ui-monospace, monospace; }

/* masthead sits top-LEFT in this room (like the Gorgons) */
#masthead{
  position:absolute;
  top:clamp(72px, 11vh, 122px);          /* headroom for the site menu bar */
  left:clamp(22px, 4.2vw, 56px);
  z-index:4;
  pointer-events:none;
  max-width:min(44vw, 480px);
}
#masthead .title{
  font-family:'Cormorant Garamond', Georgia, serif;
  font-weight:500;
  font-size:clamp(38px, 6.2vmin, 74px);
  line-height:1.0;
  letter-spacing:.01em;
}
#masthead .tagline{
  margin-top:1.15em;
  font-family:'EB Garamond', Georgia, serif;
  font-weight:500;
  font-size:clamp(16.5px, 2.25vmin, 21.5px);
  line-height:1.64;
  color:var(--ink);
  opacity:.88;
  max-width:38ch;
}
#masthead .note{
  margin-top:1.4em;
  font-size:clamp(10.5px, 1.3vmin, 12.5px);
  letter-spacing:.18em;
  text-transform:uppercase;
  color:var(--muted);
}

#hint{
  position:absolute; left:clamp(22px, 4.2vw, 56px); bottom:clamp(18px, 3.4vh, 34px);
  font-size:clamp(11px, 1.35vmin, 13px);
  letter-spacing:.1em;
  color:var(--muted);
  z-index:4; pointer-events:none;
}

#brand{
  position:absolute; right:clamp(22px, 4.2vw, 56px); bottom:clamp(16px, 3vh, 30px);
  z-index:4; pointer-events:none;
  display:flex; flex-direction:column; align-items:center; gap:6px;
}
#brand img{
  width:clamp(54px, 6.5vmin, 78px);
  height:auto;
  opacity:.88;
  mix-blend-mode:multiply;      /* line-art sits on the paper, no white box */
}
#brand span{
  font-size:clamp(9.5px, 1.15vmin, 11px);
  letter-spacing:.22em;
  text-transform:uppercase;
  color:var(--muted);
}

/* ---------- museum placards (frosted, readable over anything) ---------- */

#labelLayer{
  position:absolute; inset:0;
  overflow:hidden;
  z-index:3;
  pointer-events:none;
}
.placard{
  position:absolute; left:0; top:0;
  transform:translate(-50%,0);
  opacity:0;
  transition:opacity .3s ease;
  pointer-events:none;
  white-space:nowrap;
  text-align:left;

  background:rgba(250,248,243,.78);
  -webkit-backdrop-filter:blur(14px) saturate(1.15);
  backdrop-filter:blur(14px) saturate(1.15);
  border:1px solid var(--hair);
  border-radius:12px;
  padding:.72em .95em .66em 1em;
  box-shadow:0 18px 44px rgba(38,32,44,.13), 0 2px 8px rgba(38,32,44,.05);
}
.placard.on{ opacity:1; pointer-events:auto; cursor:pointer; }
.placard .p-head{
  display:flex; align-items:center; gap:.7em;
}
.placard .nm{
  font-family:'Cormorant Garamond', Georgia, serif;
  font-weight:600;
  font-size:clamp(17px, 2.3vmin, 24px);
  letter-spacing:.015em;
  color:var(--ink);
}
.placard .lnk{
  flex:none;
  width:1.35em; height:1.35em;
  border:1px solid var(--hair);
  border-radius:4px;
  display:grid; place-items:center;
  color:var(--muted);
  transition:color .25s ease, border-color .25s ease, transform .25s ease;
}
.placard .lnk svg{ width:.62em; height:.62em; display:block; }
.placard.on:hover .lnk{ color:var(--pink); border-color:var(--pink); transform:translate(1px,-1px); }
/* price rides the placard's mono date line — a hairline dot divides
   them so it reads as one caption, not a bolted-on price tag */
.placard .pr{
  color:var(--ink);
  font-weight:700;
  letter-spacing:.12em;
}
.placard .pr::before{
  content:'\00b7';
  margin:0 .6em 0 .55em;
  color:var(--hair);
  font-weight:400;
}
.placard .dt{
  display:block;
  margin-top:.45em;
  font-family:'Courier Prime', ui-monospace, monospace;
  font-size:clamp(10px, 1.25vmin, 12px);
  letter-spacing:.2em;
  text-transform:uppercase;
  color:var(--muted);
}

/* ---------- white flash for navigation ---------- */

#flash{
  position:fixed; inset:0;
  background:#fff;
  opacity:0; pointer-events:none;
  z-index:9;
  transition:opacity .45s ease;
}
#flash.go{ opacity:1; pointer-events:auto; }

/* ---------- WebGL-fail fallback ---------- */

#fallback{
  position:absolute; inset:0;
  padding:clamp(24px,6vw,64px);
  background:var(--paper);
  z-index:6;
}
#fallback .title{
  font-family:'Cormorant Garamond', Georgia, serif;
  font-weight:500;
  font-size:clamp(36px,7vmin,72px);
  margin:.4em 0 .7em;
}
#fallback ul{ list-style:none; }
#fallback li{ border-top:1px solid var(--hair); }
#fallback li:last-child{ border-bottom:1px solid var(--hair); }
#fallback a{
  display:block; padding:.9em 2px;
  color:var(--ink); text-decoration:none;
  font-size:clamp(13px,1.8vmin,16px);
}
#fallback a:hover{ color:var(--pink); }

/* ---------- portrait / mobile ---------- */

@media (max-aspect-ratio: 9/10){
  #masthead{
    max-width:min(86vw, 480px);
    top:clamp(88px, 26vw, 104px);   /* vw not vh: the mobile iframe GROWS, and a vh here shifted the masthead as it grew → resize loop */
    left:clamp(22px, 4.2vw, 56px);   /* top-left on phones too */
  }
  #masthead .tagline{ font-size:clamp(16px, 4.5vw, 19px); }
  .placard .nm{ font-size:clamp(16px, 4.6vw, 21px); }
  .placard .dt{ font-size:clamp(9.5px, 2.7vw, 11.5px); }
  #hint{ display:none; }        /* placards are always visible here — no hint needed */
  #brand{ bottom:14px; }
}

@media (prefers-reduced-motion: reduce){
  .placard{ transition:none; }
  #flash{ transition:opacity .1s linear; }
}

/* shipping, stated high up so nobody has to hunt for it */
#masthead .note.ship{ margin-top:.5em; }
