/* ============================================================
   EXAMINE — OBJECTS FROM HALLOWEEN'S PAST
   Standalone room stylesheet. Intentionally isolated from history.css.
   ============================================================ */
*{box-sizing:border-box}
.examine-room{position:relative;width:100vw;height:100vh;height:100svh;overflow:hidden;background:#050506;color:#eadcc9;font-family:Georgia,serif;isolation:isolate}
.examine-museum{position:absolute;inset:0;overflow:hidden;background:linear-gradient(#0a0809,#050405)}
.museum-ceiling{position:absolute;left:-4%;right:-4%;top:0;height:18%;background:linear-gradient(180deg,#050405 0,#100b0b 78%,#201511 100%);clip-path:polygon(0 0,100% 0,91% 100%,9% 100%)}
.museum-wall{position:absolute;inset:15% 0 24%;background:radial-gradient(ellipse at 50% 38%,rgba(85,57,44,.36),transparent 45%),repeating-linear-gradient(90deg,rgba(78,55,44,.08) 0 2px,transparent 2px 110px),linear-gradient(180deg,#171112,#0b090a);border-top:1px solid rgba(133,91,60,.18);border-bottom:2px solid #211510}
.museum-floor{position:absolute;left:-12%;right:-12%;bottom:-5%;height:34%;background:repeating-linear-gradient(94deg,rgba(66,40,27,.34) 0 2px,transparent 2px 115px),linear-gradient(180deg,#130d0c,#060505);transform:perspective(500px) rotateX(47deg);transform-origin:bottom}
.museum-cabinet{position:absolute;top:23%;width:18%;height:48%;background:linear-gradient(90deg,#080606,#1a100d 15%,#261713 50%,#110b09 88%,#050404);border:2px solid #2e1d15;box-shadow:0 20px 35px #000,inset 0 0 25px #000}
.museum-cabinet::before{content:"";position:absolute;inset:7% 9%;background:repeating-linear-gradient(180deg,transparent 0 14%,rgba(116,76,49,.24) 14.4% 15%,transparent 15.4% 25%);border:1px solid rgba(122,82,52,.22)}
.cabinet-left{left:2.5%}.cabinet-right{right:2.5%}
.museum-case{position:absolute;top:32%;height:34%;width:20%;border:2px solid rgba(111,80,58,.55);background:linear-gradient(115deg,rgba(176,190,184,.035),rgba(15,12,12,.65) 35%,rgba(84,66,55,.08));box-shadow:0 20px 35px rgba(0,0,0,.82),inset 0 0 28px rgba(0,0,0,.75)}
.museum-case::before{content:"";position:absolute;left:7%;right:7%;bottom:8%;height:5%;background:#1d120e;box-shadow:0 4px 8px #000}
.museum-case span{position:absolute;left:50%;bottom:14%;width:54%;height:10%;transform:translateX(-50%);background:rgba(198,177,140,.08);border:1px solid rgba(198,177,140,.12)}
.case-left{left:22%}.case-center{left:40%;width:20%}.case-right{right:22%}
.museum-desk{position:absolute;z-index:2;left:50%;bottom:5%;width:33%;height:13%;transform:translateX(-50%) perspective(500px) rotateX(8deg);background:linear-gradient(180deg,#281710,#100a08);border:2px solid #382116;box-shadow:0 14px 24px #000}
.museum-lamp{position:absolute;z-index:3;left:50%;bottom:17%;width:8%;height:20%;transform:translateX(-50%);filter:drop-shadow(0 0 20px rgba(204,149,78,.22))}
.museum-lamp::before{content:"";position:absolute;left:50%;bottom:0;width:5px;height:65%;background:#39261a;transform:translateX(-50%)}
.museum-lamp::after{content:"";position:absolute;left:50%;top:0;width:74%;height:34%;transform:translateX(-50%);background:linear-gradient(180deg,#3b2618,#160f0c);clip-path:polygon(20% 0,80% 0,100% 100%,0 100%);box-shadow:0 8px 24px rgba(224,156,77,.2)}
.museum-vignette{position:absolute;inset:0;box-shadow:inset 0 0 150px 60px #000;pointer-events:none}
.examine-heading{position:absolute;z-index:10;left:50%;top:4.5%;width:min(760px,68vw);transform:translateX(-50%);text-align:center;text-shadow:0 3px 12px #000}
.examine-kicker{font:700 .62rem/1 Georgia,serif;letter-spacing:.2em;color:#b98ad1}.examine-heading h1{margin:.35rem 0 .2rem;font:400 clamp(1.25rem,2.5vw,2.15rem)/1.05 "Rye",Georgia,serif;letter-spacing:.045em;color:#eedabd}.examine-heading p{margin:0;font:italic 600 clamp(.68rem,.9vw,.82rem)/1.35 Georgia,serif;color:#bfb09e}
.examine-return-veil{position:absolute;z-index:31;right:1.3%;top:2.2%;padding:9px 12px;border:1px solid rgba(216,183,125,.46);background:rgba(9,6,6,.86);color:#d9c3e6;text-decoration:none;font:700 .63rem/1 Georgia,serif;letter-spacing:.08em;border-radius:3px}.examine-return-veil:hover,.examine-return-veil:focus-visible{outline:none;box-shadow:0 0 15px rgba(193,116,241,.5);border-color:#c891f0}
.examine-intro{position:absolute;z-index:9;left:50%;top:19%;transform:translateX(-50%);width:min(560px,62vw);padding:.65rem .9rem;text-align:center;background:rgba(6,5,6,.64);border-top:1px solid rgba(216,183,125,.18);border-bottom:1px solid rgba(216,183,125,.18);transition:opacity .45s}.examine-intro strong{display:block;font:400 .78rem/1.2 "Rye",Georgia,serif;letter-spacing:.09em;color:#ddc9a8}.examine-intro span{display:block;margin-top:.35rem;font:italic .72rem/1.35 Georgia,serif;color:#aa9b8c}
.take-glass{position:absolute;z-index:18;left:50%;bottom:7.2%;transform:translateX(-50%);display:flex;align-items:center;gap:.75rem;padding:.55rem .9rem .55rem .62rem;border:1px solid rgba(206,158,235,.55);border-radius:5px;background:rgba(10,6,11,.93);color:#e7d5ef;cursor:pointer;box-shadow:0 0 16px rgba(163,82,207,.22),0 7px 18px #000;animation:glassNudge 2.4s ease-in-out infinite}.take-glass:hover,.take-glass:focus-visible{outline:none;border-color:#d39af1;box-shadow:0 0 24px rgba(190,104,237,.58),0 7px 18px #000}.glass-copy{text-align:left}.glass-copy b{display:block;font:400 .74rem/1 "Rye",Georgia,serif;letter-spacing:.08em}.glass-copy small{display:block;margin-top:.22rem;font:italic .62rem/1 Georgia,serif;color:#bca9c5}.glass-icon{position:relative;display:block;width:34px;height:34px;border:3px solid #caa8dc;border-radius:50%;box-shadow:0 0 10px rgba(200,145,240,.42)}.glass-icon::after{content:"";position:absolute;width:20px;height:4px;right:-14px;bottom:-7px;background:#b995ca;border-radius:3px;transform:rotate(47deg);transform-origin:left center}
@keyframes glassNudge{50%{box-shadow:0 0 25px rgba(178,93,226,.42),0 7px 18px #000}}
.exhibit-layer,.investigation-layer,.investigation-atmosphere{position:absolute;inset:0}.exhibit-layer{z-index:12}.investigation-atmosphere{z-index:14;pointer-events:none;opacity:0}.investigation-layer{z-index:16;pointer-events:none}.blackout{position:absolute;inset:0;background:#010102;opacity:0}.cold-haze{position:absolute;width:20vw;height:18vw;border-radius:50%;filter:blur(28px);opacity:0;background:rgba(98,49,130,.22)}.haze-one{left:8%;top:35%}.haze-two{right:10%;top:29%;background:rgba(44,112,115,.16)}.haze-three{left:42%;bottom:13%;width:15vw;height:11vw}.floor-fog{position:absolute;left:-15%;bottom:-2%;width:70%;height:26%;opacity:0;background:radial-gradient(ellipse,rgba(154,151,166,.12),transparent 68%);filter:blur(18px)}.fog-two{left:42%;bottom:1%;animation-delay:-4s}.watching-eyes{position:absolute;right:10.2%;top:39%;width:44px;height:14px;opacity:0}.watching-eyes i{position:absolute;top:2px;width:7px;height:5px;border-radius:50%;background:#b8d59d;box-shadow:0 0 8px #b8d59d}.watching-eyes i:first-child{left:7px}.watching-eyes i:last-child{right:7px}.passing-shadow{position:absolute;left:-25%;top:18%;width:18%;height:62%;opacity:0;background:radial-gradient(ellipse,rgba(0,0,0,.92),transparent 68%);filter:blur(7px)}
.investigation-title{position:absolute;z-index:24;left:50%;top:43%;transform:translate(-50%,-50%);width:min(520px,80vw);padding:1rem;text-align:center;opacity:0;pointer-events:none;text-shadow:0 2px 12px #000}.investigation-title b{display:block;font:400 clamp(1rem,2vw,1.55rem)/1.1 "Rye",Georgia,serif;letter-spacing:.12em;color:#d4b1e8}.investigation-title em{display:block;margin-top:.5rem;font:italic 700 .8rem/1.3 Georgia,serif;color:#c7b9c8}
.return-glass{position:absolute;z-index:40;right:1.3%;bottom:2.2%;display:none;padding:10px 14px;border:1px solid rgba(210,161,238,.58);border-radius:3px;background:rgba(8,5,10,.94);color:#e0caeb;font:700 .68rem/1 Georgia,serif;letter-spacing:.07em;cursor:pointer;box-shadow:0 4px 18px #000}.return-glass:hover,.return-glass:focus-visible{outline:none;border-color:#d69cf3;box-shadow:0 0 18px rgba(194,111,239,.52)}
.lens{position:fixed;z-index:35;left:0;top:0;width:126px;height:126px;border:4px solid rgba(218,188,233,.86);border-radius:50%;opacity:0;pointer-events:none;transform:translate(-50%,-50%);box-shadow:0 0 18px rgba(193,116,241,.42),inset 0 0 28px rgba(145,94,173,.16)}.lens::after{content:"";position:absolute;width:72px;height:9px;right:-53px;bottom:-25px;border-radius:6px;background:#a985b9;transform:rotate(47deg);transform-origin:left center;box-shadow:0 2px 5px #000}.lens span{position:absolute;inset:7px;border-radius:50%;background:radial-gradient(circle at 40% 35%,rgba(213,232,226,.12),rgba(100,71,119,.06) 55%,rgba(0,0,0,.08));border:1px solid rgba(255,255,255,.14)}
.examine-room.investigating .examine-intro,.examine-room.investigating .take-glass{opacity:0;pointer-events:none}.examine-room.investigating .investigation-atmosphere{opacity:1}.examine-room.investigating .return-glass{display:block}.examine-room.investigating .lens{opacity:1}.examine-room.investigating .museum-museum{filter:brightness(.4)}
.examine-room.entering .blackout{animation:blackoutSequence 2.25s forwards}.examine-room.entering .investigation-title{animation:titleReveal 3.9s .95s forwards}.examine-room.investigating:not(.entering) .blackout{opacity:.62}.examine-room.investigating .cold-haze{animation:hazeWake 5s 1.6s ease-in-out infinite alternate}.examine-room.investigating .floor-fog{animation:fogDrift 9s 1.8s ease-in-out infinite alternate}.examine-room.variant-eyes .watching-eyes{animation:eyesAppear 2.8s .72s forwards}.examine-room.variant-shadow .passing-shadow{animation:shadowPass 1.25s .62s forwards}.examine-room.investigating .museum-museum{filter:brightness(.35)}
@keyframes blackoutSequence{0%{opacity:0}9%{opacity:.97}18%{opacity:.35}25%{opacity:1}35%{opacity:.5}43%,100%{opacity:.62}}
@keyframes titleReveal{0%,8%{opacity:0;transform:translate(-50%,-47%)}18%,58%{opacity:1;transform:translate(-50%,-50%)}100%{opacity:0;transform:translate(-50%,-54%)}}
@keyframes hazeWake{0%{opacity:.08;transform:scale(.85)}100%{opacity:.55;transform:scale(1.15)}}@keyframes fogDrift{0%{opacity:.16;transform:translateX(-5%)}100%{opacity:.48;transform:translateX(12%) scale(1.08)}}
@keyframes eyesAppear{0%,40%{opacity:0}48%,68%{opacity:1}75%,100%{opacity:0}}@keyframes shadowPass{0%{left:-25%;opacity:0}18%{opacity:.62}78%{opacity:.4}100%{left:108%;opacity:0}}
.examine-room.investigating .examine-museum{filter:brightness(.38) contrast(1.16) saturate(.7);transition:filter .18s}.examine-room:not(.investigating) .examine-museum{transition:filter .7s}.examine-room.investigating .examine-heading{opacity:.32;transition:opacity .4s}.examine-room:not(.investigating) .examine-heading{transition:opacity .6s}
.examine-back-foyer{z-index:41}
/* EXAMINE ONLY: reserve the bottom edge for room controls and keep ambience below the permanent top shell. */
body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-bar{top:calc(var(--shell-height) + 8px);bottom:auto;left:50%;right:auto;transform:translateX(-50%);width:min(500px,42vw)}
@media(max-width:900px){body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-bar{top:calc(var(--shell-height) + 7px);left:50%;right:auto;bottom:auto;transform:translateX(-50%);width:min(390px,56vw)}.examine-heading{top:6%;width:76vw}.examine-intro{top:22%}.museum-cabinet{width:21%}.case-left{left:20%}.case-right{right:20%}}
@media(max-width:650px){body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-bar{top:calc(var(--shell-height) + 6px);left:50%;right:auto;bottom:auto;transform:translateX(-50%);width:calc(100vw - 20px)}.examine-heading{top:7.5%;width:92vw}.examine-heading p{display:none}.examine-intro{top:21%;width:86vw}.examine-return-veil{top:auto;right:10px;bottom:50px}.take-glass{bottom:14%}.return-glass{right:10px;bottom:50px}.examine-back-foyer{bottom:50px!important}.museum-cabinet{display:none}.museum-case{top:36%;width:29%;height:30%}.case-left{left:3%}.case-center{left:35.5%}.case-right{right:3%}.museum-desk{width:55%}}
@media(prefers-reduced-motion:reduce){.take-glass,.examine-room.entering .blackout,.examine-room.entering .investigation-title,.examine-room.investigating .cold-haze,.examine-room.investigating .floor-fog,.examine-room.variant-eyes .watching-eyes,.examine-room.variant-shadow .passing-shadow{animation:none}.examine-room.investigating .blackout{opacity:.62}.examine-room.investigating .cold-haze{opacity:.25}.examine-room.investigating .floor-fog{opacity:.2}}

/* PHASE 1A — layout correction: keep permanent ambience clear of centered museum content. */
body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-bar{
  top:calc(var(--shell-height) + 8px);
  bottom:auto;
  left:12px;
  right:auto;
  transform:none;
  width:min(430px,36vw);
}

/* Make the investigation invitation deliberately easy to notice and activate. */
.take-glass{
  gap:.95rem;
  padding:.72rem 1.18rem .72rem .82rem;
  border-width:2px;
  box-shadow:0 0 22px rgba(163,82,207,.34),0 7px 18px #000;
}
.glass-copy b{font-size:.84rem;letter-spacing:.095em}
.glass-copy small{margin-top:.28rem;font-size:.68rem}
.glass-icon{width:44px;height:44px;border-width:4px}
.glass-icon::after{width:25px;height:5px;right:-18px;bottom:-9px}

@media(max-width:900px){
  body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-bar{
    top:calc(var(--shell-height) + 7px);
    left:10px;
    right:auto;
    transform:none;
    width:min(350px,42vw);
  }
}
@media(max-width:650px){
  body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-bar{
    top:calc(var(--shell-height) + 6px);
    left:8px;
    right:8px;
    transform:none;
    width:auto;
  }
  .take-glass{padding:.65rem .9rem .65rem .7rem;gap:.8rem}
  .glass-icon{width:40px;height:40px}
}


/* ============================================================
   PHASE 1B — INVESTIGATION MODE CORRECTION
   1. Cinematic bright/dark horror flicker + museum rattle.
   2. Stronger fog/haze during transition.
   3. Magnifying glass physically reveals the museum beneath darkness.
   4. EXAMINE-only ambience meter sizing is contained inside its box.
   ============================================================ */

/* Lens coordinates are updated by examine.js. */
.examine-room{
  --lens-x:50vw;
  --lens-y:50vh;
}

/* Keep the shared ambience control contained in its EXAMINE-only position. */
body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-bar{
  width:min(455px,39vw);
  grid-template-columns:auto minmax(54px,1fr) 68px 28px minmax(72px,88px);
  gap:6px;
  overflow:hidden;
}
body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-bar > *{
  min-width:0;
  max-width:100%;
}
body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-volume{
  min-width:0;
  width:100%;
  max-width:100%;
}
body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-meter{
  min-width:0;
  overflow:hidden;
}

/* Investigation darkness is intentionally not total darkness. */
.examine-room.investigating:not(.entering) .blackout{
  opacity:.79;
  background:
    radial-gradient(ellipse at 50% 48%,rgba(13,9,17,.45),rgba(1,1,2,.94) 72%),
    #010102;
  -webkit-mask-image:radial-gradient(circle 96px at var(--lens-x) var(--lens-y),
    transparent 0 68px,
    rgba(0,0,0,.12) 78px,
    rgba(0,0,0,.58) 101px,
    #000 127px);
  mask-image:radial-gradient(circle 96px at var(--lens-x) var(--lens-y),
    transparent 0 68px,
    rgba(0,0,0,.12) 78px,
    rgba(0,0,0,.58) 101px,
    #000 127px);
}

/* The room remains barely readable outside the lens. */
.examine-room.investigating:not(.entering) .examine-museum{
  filter:brightness(.24) contrast(1.32) saturate(.48);
}
.examine-room.investigating:not(.entering) .museum-lamp{
  filter:brightness(.38) drop-shadow(0 0 7px rgba(135,86,165,.18));
}

/* The lens itself feels illuminated rather than empty glass. */
.examine-room.investigating .lens{
  box-shadow:
    0 0 12px rgba(204,151,240,.78),
    0 0 35px rgba(108,70,153,.48),
    inset 0 0 16px rgba(223,220,238,.14);
}
.examine-room.investigating .lens span{
  background:
    radial-gradient(circle at 42% 36%,
      rgba(229,240,232,.13),
      rgba(139,114,161,.055) 55%,
      rgba(0,0,0,.025) 74%);
}

/* A supernatural flash layer; no extra image asset required. */
.investigation-atmosphere::before{
  content:"";
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 52% 42%,rgba(238,227,214,.92),rgba(151,112,190,.33) 35%,transparent 68%);
  mix-blend-mode:screen;
}

/* During activation, the entire museum physically rattles and its lighting fails. */
.examine-room.entering .examine-museum{
  transform-origin:50% 56%;
  animation:horrorMuseumFailure 3.15s cubic-bezier(.2,.7,.25,1) forwards;
}
.examine-room.entering .investigation-atmosphere::before{
  animation:horrorFlashFailure 3.05s linear forwards;
}
.examine-room.entering .blackout{
  animation:horrorBlackoutFailure 3.15s linear forwards;
}
.examine-room.entering .floor-fog{
  animation:horrorFogSurge 3.2s ease-out forwards !important;
}
.examine-room.entering .cold-haze{
  animation:horrorHazeSurge 3.2s ease-out forwards !important;
}

/* A harder, less predictable horror-film electrical failure. */
@keyframes horrorMuseumFailure{
  0%   {transform:translate(0,0) scale(1);filter:brightness(1) contrast(1) saturate(1)}
  5%   {transform:translate(0,0) scale(1.002);filter:brightness(1.75) contrast(1.05) saturate(.8)}
  9%   {transform:translate(-4px,2px) scale(1.003);filter:brightness(.08) contrast(1.6) saturate(.35)}
  13%  {transform:translate(5px,-2px) scale(1.003);filter:brightness(1.45) contrast(1.12) saturate(.72)}
  17%  {transform:translate(-7px,1px) scale(1.005);filter:brightness(.12) contrast(1.7) saturate(.32)}
  21%  {transform:translate(6px,3px) scale(1.004);filter:brightness(1.18) contrast(1.2) saturate(.68)}
  25%  {transform:translate(-5px,-3px) scale(1.006);filter:brightness(.06) contrast(1.8) saturate(.28)}
  30%  {transform:translate(7px,1px) scale(1.006);filter:brightness(.92) contrast(1.28) saturate(.58)}
  34%  {transform:translate(-9px,0) scale(1.007);filter:brightness(.04) contrast(1.9) saturate(.2)}
  38%  {transform:translate(6px,-4px) scale(1.006);filter:brightness(1.08) contrast(1.3) saturate(.54)}
  42%  {transform:translate(-5px,4px) scale(1.006);filter:brightness(.06) contrast(1.86) saturate(.22)}
  46%  {transform:translate(4px,-2px) scale(1.005);filter:brightness(.62) contrast(1.42) saturate(.45)}
  50%  {transform:translate(-3px,2px) scale(1.004);filter:brightness(.03) contrast(1.95) saturate(.18)}
  55%  {transform:translate(3px,0) scale(1.004);filter:brightness(.36) contrast(1.5) saturate(.38)}
  61%  {transform:translate(-2px,1px) scale(1.003);filter:brightness(.05) contrast(1.8) saturate(.22)}
  70%  {transform:translate(1px,-1px) scale(1.002);filter:brightness(.28) contrast(1.5) saturate(.4)}
  82%  {transform:translate(0,0) scale(1.001);filter:brightness(.11) contrast(1.6) saturate(.32)}
  100% {transform:translate(0,0) scale(1);filter:brightness(.24) contrast(1.32) saturate(.48)}
}

@keyframes horrorBlackoutFailure{
  0%,4%   {opacity:0}
  7%      {opacity:.16}
  9%      {opacity:.97}
  13%     {opacity:.18}
  17%     {opacity:.99}
  21%     {opacity:.28}
  25%     {opacity:1}
  30%     {opacity:.38}
  34%     {opacity:1}
  38%     {opacity:.38}
  42%     {opacity:1}
  46%     {opacity:.62}
  50%     {opacity:1}
  55%     {opacity:.72}
  61%     {opacity:.98}
  70%,100%{opacity:.79}
}

@keyframes horrorFlashFailure{
  0%,4%,11%,15%,23%,28%,36%,41%,49%,100%{opacity:0}
  5%  {opacity:.82}
  12% {opacity:.48}
  16% {opacity:.68}
  24% {opacity:.36}
  29% {opacity:.52}
  37% {opacity:.26}
  42% {opacity:.32}
  50% {opacity:.12}
}

@keyframes horrorFogSurge{
  0%{opacity:0;transform:translateX(-12%) scale(.9)}
  24%{opacity:.28}
  48%{opacity:.62;transform:translateX(4%) scale(1.15)}
  100%{opacity:.38;transform:translateX(10%) scale(1.28)}
}
@keyframes horrorHazeSurge{
  0%{opacity:0;transform:scale(.72)}
  22%{opacity:.22}
  52%{opacity:.7;transform:scale(1.23)}
  100%{opacity:.43;transform:scale(1.08)}
}

/* After the entrance sequence, keep fog and haze moving instead of freezing. */
.examine-room.investigating:not(.entering) .cold-haze{
  animation:hazeWake 5.2s ease-in-out infinite alternate;
}
.examine-room.investigating:not(.entering) .floor-fog{
  animation:fogDrift 8.4s ease-in-out infinite alternate;
}

/* Make EXIT unmistakable even in the dark. */
.examine-room.investigating .return-glass{
  border-width:2px;
  color:#f1ddfa;
  background:rgba(12,6,15,.97);
  box-shadow:0 0 17px rgba(181,93,231,.45),0 5px 22px #000;
}

/* Keep small screens usable without allowing the shared slider to escape its box. */
@media(max-width:900px){
  body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-bar{
    width:min(390px,48vw);
    grid-template-columns:minmax(60px,1fr) 62px 28px minmax(68px,82px);
  }
  body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-title{
    display:none;
  }
}
@media(max-width:650px){
  body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-bar{
    width:auto;
    grid-template-columns:minmax(80px,1fr) 28px minmax(74px,90px);
  }
  body[data-location="EXAMINE — Objects From Halloween's Past"].has-site-shell .ambience-meter{
    display:none;
  }
}
@media(prefers-reduced-motion:reduce){
  .examine-room.entering .examine-museum,
  .examine-room.entering .investigation-atmosphere::before,
  .examine-room.entering .blackout,
  .examine-room.entering .floor-fog,
  .examine-room.entering .cold-haze{
    animation:none!important;
  }
  .examine-room.investigating:not(.entering) .blackout{opacity:.79}
}


/* ============================================================
   PHASE 1C — SAFARI-SAFE MAGNIFYING GLASS REVEAL
   The previous mask-based blackout aperture was unreliable in Safari.
   This version uses an actual duplicated museum layer clipped to a
   moving circle. The clue/Easter-egg content is still a later phase;
   this fix makes the existing museum itself visible through the glass.
   ============================================================ */

/* The normal room is dark, but still recognizable outside the glass. */
.examine-room.investigating:not(.entering) .examine-museum{
  filter:brightness(.40) contrast(1.18) saturate(.62);
}
.examine-room.investigating:not(.entering) .blackout{
  opacity:.56;
  -webkit-mask-image:none;
  mask-image:none;
  background:
    radial-gradient(ellipse at 50% 45%,rgba(18,12,21,.20),rgba(1,1,2,.83) 78%),
    rgba(1,1,2,.78);
}

/* JS creates this independent museum duplicate on page load.
   It sits ABOVE the dark overlay, but only a circular area is visible. */
.investigation-reveal-view{
  position:absolute;
  inset:0;
  z-index:15;
  overflow:hidden;
  pointer-events:none;
  opacity:0;
  clip-path:circle(0px at var(--lens-x) var(--lens-y));
  -webkit-clip-path:circle(0px at var(--lens-x) var(--lens-y));
  transition:opacity .18s ease,clip-path .08s linear,-webkit-clip-path .08s linear;
}
.examine-room.investigating:not(.entering) .investigation-reveal-view{
  opacity:1;
  clip-path:circle(92px at var(--lens-x) var(--lens-y));
  -webkit-clip-path:circle(92px at var(--lens-x) var(--lens-y));
}

/* Duplicate of the museum background, deliberately brighter and colder
   than normal so the lens feels supernatural instead of flashlight-like. */
.reveal-museum{
  position:absolute;
  inset:0;
  overflow:hidden;
  background:linear-gradient(#0a0809,#050405);
  filter:brightness(.94) contrast(1.10) saturate(.78);
}
.reveal-museum .museum-vignette{
  box-shadow:inset 0 0 105px 28px rgba(0,0,0,.76);
}
.reveal-museum::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at var(--lens-x) var(--lens-y),
      rgba(205,186,223,.14) 0,
      rgba(105,79,125,.06) 85px,
      transparent 112px);
  mix-blend-mode:screen;
}

/* Strengthen visual connection between the physical glass and its reveal. */
.examine-room.investigating:not(.entering) .lens{
  width:134px;
  height:134px;
  border-color:rgba(227,203,239,.96);
  box-shadow:
    0 0 12px rgba(227,188,247,.92),
    0 0 30px rgba(157,91,196,.70),
    0 0 58px rgba(87,60,115,.44),
    inset 0 0 18px rgba(230,231,236,.17);
}
.examine-room.investigating:not(.entering) .lens span{
  background:radial-gradient(circle at 40% 34%,
    rgba(236,242,233,.12),
    rgba(158,127,176,.045) 58%,
    transparent 76%);
}

/* Keep the reveal layer dormant during the violent entrance transition. */
.examine-room.entering .investigation-reveal-view{
  opacity:0!important;
  clip-path:circle(0px at var(--lens-x) var(--lens-y))!important;
  -webkit-clip-path:circle(0px at var(--lens-x) var(--lens-y))!important;
}

/* Reduced-motion users still get a functional reveal. */
@media(prefers-reduced-motion:reduce){
  .examine-room.investigating .investigation-reveal-view{
    opacity:1;
    clip-path:circle(92px at var(--lens-x) var(--lens-y));
    -webkit-clip-path:circle(92px at var(--lens-x) var(--lens-y));
  }
}


/* ============================================================
   PHASE 2 — TWENTY PERMANENT EXHIBITS
   Five museum zones → four artifacts per zone.
   Investigation Mode remains a separate layer.
   ============================================================ */

.museum-zone{
  position:absolute;z-index:13;width:58px;height:58px;padding:0;border:0;
  background:transparent;cursor:pointer;color:#e7d9ed;
}
.zone-paper{left:8.4%;top:43%}
.zone-masks{left:29.2%;top:50%}
.zone-home{left:48.2%;top:49%}
.zone-culture{right:28.5%;top:50%}
.zone-candy{left:48.2%;bottom:19%}

.zone-dot{
  position:absolute;left:50%;top:50%;width:10px;height:10px;border-radius:50%;
  transform:translate(-50%,-50%);background:#b85ce8;
  box-shadow:0 0 7px #cf7cf2,0 0 18px rgba(169,76,220,.72);
  animation:zonePulse 2.5s ease-in-out infinite;
}
.zone-label{
  position:absolute;left:50%;bottom:48px;min-width:155px;padding:.46rem .58rem;
  transform:translate(-50%,8px);opacity:0;pointer-events:none;
  border:1px solid rgba(207,145,239,.55);border-radius:4px;
  background:rgba(9,5,11,.94);box-shadow:0 0 22px rgba(159,71,209,.35);
  font:700 .58rem/1.35 Georgia,serif;letter-spacing:.08em;text-align:center;
  transition:.18s ease;
}
.zone-label b{font:400 .66rem/1.3 "Rye",Georgia,serif;color:#e8ccef}
.museum-zone:hover .zone-dot,.museum-zone:focus-visible .zone-dot{
  width:15px;height:15px;background:#d48bfb;box-shadow:0 0 10px #e4b0ff,0 0 28px rgba(183,91,235,.9)
}
.museum-zone:hover .zone-label,.museum-zone:focus-visible .zone-label{
  opacity:1;transform:translate(-50%,0)
}
.museum-zone:focus-visible{outline:none}
@keyframes zonePulse{50%{box-shadow:0 0 10px #d991f3,0 0 25px rgba(176,84,227,.8)}}

/* Normal exhibit access remains available while investigating. */
.examine-room.investigating .museum-zone{z-index:30}
.examine-room.investigating .zone-dot{
  background:#83529a;opacity:.72;box-shadow:0 0 8px rgba(195,126,230,.65)
}
.examine-room.investigating .museum-zone:hover .zone-dot,
.examine-room.investigating .museum-zone:focus-visible .zone-dot{
  opacity:1;background:#cf82f3
}

/* Shared overlay frame; deliberately below the permanent top shell but
   above the museum/investigation layers. */
.collection-overlay,.exhibit-overlay{
  position:fixed;z-index:82;
  left:0;right:0;top:calc(var(--shell-height,42px) + 58px);bottom:54px;
  display:none;align-items:center;justify-content:center;padding:10px 4vw;
  background:rgba(2,1,3,.72);backdrop-filter:blur(4px);
}
.collection-overlay.open,.exhibit-overlay.open{display:flex}
body.examine-modal-open{overflow:hidden}
body.examine-modal-open .ambience-bar{opacity:.32;pointer-events:none}

.collection-drawer{
  position:relative;width:min(1040px,91vw);max-height:100%;
  overflow:auto;padding:1.1rem 1.25rem 1.35rem;
  border:1px solid rgba(204,151,230,.4);border-radius:8px;
  background:linear-gradient(180deg,rgba(28,17,27,.98),rgba(8,6,8,.99));
  box-shadow:0 22px 60px #000,0 0 35px rgba(130,59,162,.23)
}
.collection-kicker,.exhibit-kicker{
  font:700 .58rem/1 Georgia,serif;letter-spacing:.19em;color:#bd8bd3
}
.collection-drawer h2{
  margin:.38rem 0 .2rem;font:400 clamp(1.15rem,2vw,1.8rem)/1.1 "Rye",Georgia,serif;
  color:#efddc2;letter-spacing:.04em
}
.collection-subtitle{margin:.2rem 0 1rem;color:#b9aa98;font:italic .78rem/1.4 Georgia,serif}
.museum-modal-close{
  position:absolute;right:.7rem;top:.65rem;width:34px;height:34px;border-radius:50%;
  border:1px solid rgba(213,170,236,.46);background:#100a12;color:#e8d5f0;
  font:700 1.1rem/1 Georgia,serif;cursor:pointer
}
.museum-modal-close:hover,.museum-modal-close:focus-visible{outline:none;box-shadow:0 0 17px rgba(192,105,234,.55)}
.collection-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.9rem}
.collection-card{
  display:grid;grid-template-rows:150px auto;min-height:235px;padding:0;border:1px solid rgba(203,165,129,.22);
  border-radius:6px;overflow:hidden;background:rgba(255,255,255,.025);color:#e6d9c8;
  text-align:left;cursor:pointer;transition:.18s
}
.collection-card:hover,.collection-card:focus-visible{
  outline:none;transform:translateY(-3px);border-color:rgba(202,140,235,.65);
  box-shadow:0 8px 24px rgba(0,0,0,.5),0 0 20px rgba(153,72,194,.22)
}
.collection-card img{width:100%;height:100%;object-fit:contain;background:#050405}
.collection-card-copy{padding:.7rem .72rem .78rem}
.collection-card-number{font:700 .56rem/1 Georgia,serif;letter-spacing:.15em;color:#b581cc}
.collection-card h3{margin:.3rem 0 .25rem;font:400 .76rem/1.25 "Rye",Georgia,serif;color:#e9d6b7}
.collection-card p{margin:0;font:italic .65rem/1.35 Georgia,serif;color:#a99b8b}

/* Full artifact record */
.exhibit-record{
  position:relative;width:min(1180px,93vw);height:100%;overflow:hidden;
  border:1px solid rgba(207,155,234,.4);border-radius:8px;
  background:linear-gradient(180deg,rgba(24,14,25,.99),rgba(7,5,8,.995));
  box-shadow:0 24px 70px #000,0 0 38px rgba(126,52,160,.28)
}
.exhibit-record-grid{display:grid;grid-template-columns:minmax(280px,38%) 1fr;height:100%}
.exhibit-image-side{
  position:relative;padding:1rem;background:#050405;border-right:1px solid rgba(208,166,235,.18);
  display:flex;align-items:center;justify-content:center
}
.exhibit-image-frame{width:100%;height:calc(100% - 58px);display:flex;align-items:center;justify-content:center}
.exhibit-image-frame img{
  display:block;max-width:100%;max-height:100%;object-fit:contain;
  border:1px solid rgba(224,190,149,.24);box-shadow:0 12px 36px rgba(0,0,0,.66)
}
.exhibit-number{
  position:absolute;left:1rem;bottom:1rem;padding:.45rem .58rem;
  border:1px solid rgba(202,145,231,.45);background:rgba(8,5,9,.88);
  color:#d5a7eb;font:400 .82rem/1 "Rye",Georgia,serif;letter-spacing:.08em
}
.exhibit-copy-side{overflow:auto;padding:1.15rem 1.45rem 1.8rem;scrollbar-color:#744291 #100c12}
.exhibit-copy-side h2{
  margin:.38rem 2.6rem .18rem 0;font:400 clamp(1.18rem,2vw,1.75rem)/1.12 "Rye",Georgia,serif;
  color:#efdcbe;letter-spacing:.025em
}
.exhibit-copy-side h3{margin:0 0 1rem;font:italic 700 .85rem/1.35 Georgia,serif;color:#cdbba3}
.exhibit-body p,.exhibit-history p,.exhibit-swingali p,.exhibit-feature p{
  margin:.66rem 0;font:.86rem/1.55 Georgia,serif;color:#eadfce
}
.exhibit-body strong,.exhibit-history strong,.exhibit-feature strong{color:#f1dfc4}
.exhibit-body em,.exhibit-feature em{color:#dcc9b3}
.exhibit-swingali,.exhibit-history,.exhibit-feature,.exhibit-references{
  margin-top:1.1rem;padding:.85rem .95rem;border:1px solid rgba(204,154,230,.19);
  border-radius:5px;background:rgba(255,255,255,.022)
}
.exhibit-swingali{background:rgba(88,39,105,.14);border-color:rgba(203,142,236,.29)}
.exhibit-feature{background:rgba(59,48,31,.17);border-color:rgba(221,180,109,.28)}
.exhibit-swingali h4,.exhibit-history h4,.exhibit-feature h4,.exhibit-references h4{
  margin:0 0 .5rem;font:700 .58rem/1 Georgia,serif;letter-spacing:.15em;color:#c392db
}
.exhibit-swingali p{font-style:italic;font-weight:600}
.exhibit-references ol{margin:.15rem 0 0;padding-left:1.25rem}
.exhibit-references li{margin:.45rem 0;font:.68rem/1.4 Georgia,serif;color:#a99aac}
.exhibit-references a,.feature-link{color:#d5b0e7;text-underline-offset:2px}
.feature-link{
  display:inline-block;margin-top:.48rem;padding:.52rem .65rem;border:1px solid rgba(211,166,116,.3);
  border-radius:3px;font:700 .62rem/1.2 Georgia,serif;letter-spacing:.07em;text-decoration:none
}
.feature-link:hover,.feature-link:focus-visible{outline:none;box-shadow:0 0 14px rgba(196,143,85,.28)}
.exhibit-back{
  position:absolute;z-index:2;left:1rem;top:.75rem;padding:.48rem .62rem;
  border:1px solid rgba(203,150,232,.32);border-radius:3px;background:rgba(10,6,11,.92);
  color:#d7bee4;font:700 .56rem/1 Georgia,serif;letter-spacing:.07em;cursor:pointer
}
.exhibit-back:hover,.exhibit-back:focus-visible{outline:none;box-shadow:0 0 13px rgba(186,98,230,.42)}

@media(max-width:900px){
  .collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .collection-card{grid-template-rows:125px auto}
  .exhibit-record-grid{grid-template-columns:34% 1fr}
  .museum-zone{width:50px;height:50px}
}
@media(max-width:650px){
  .collection-overlay,.exhibit-overlay{
    top:calc(var(--shell-height,42px) + 68px);bottom:50px;padding:6px
  }
  .collection-grid{grid-template-columns:1fr 1fr;gap:.55rem}
  .collection-card{min-height:195px;grid-template-rows:105px auto}
  .collection-card h3{font-size:.66rem}
  .exhibit-record-grid{grid-template-columns:1fr;grid-template-rows:34% 1fr}
  .exhibit-image-side{border-right:0;border-bottom:1px solid rgba(208,166,235,.18);padding:.65rem}
  .exhibit-image-frame{height:100%}
  .exhibit-copy-side{padding:.85rem .9rem 1.3rem}
  .exhibit-back{top:.55rem;left:.55rem}
  .zone-label{display:none}
  .zone-paper{left:8%;top:46%}.zone-masks{left:27%;top:52%}.zone-home{left:46%;top:51%}
  .zone-culture{right:27%;top:52%}.zone-candy{left:46%;bottom:20%}
}


/* ============================================================
   PHASE 2A — VISIBLE / CLICKABLE MUSEUM CASE FIX
   The five collections are now visibly populated in NORMAL mode
   and remain accessible in Investigation Mode.
   ============================================================ */

.exhibit-layer{
  z-index:20 !important;
  pointer-events:none;
}

/* Each collection is now a real visible museum placard/display rather
   than an almost invisible 10px hotspot. */
.museum-zone{
  pointer-events:auto !important;
  width:17vw !important;
  min-width:170px;
  max-width:250px;
  height:26vh !important;
  min-height:170px;
  max-height:260px;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  color:#eee0cf;
}

/* Position the five collections around the physical room furniture. */
.zone-paper{left:2.8% !important;top:29% !important}
.zone-masks{left:21.4% !important;top:35% !important}
.zone-home{left:41.5% !important;top:35% !important}
.zone-culture{right:21.4% !important;top:35% !important}
.zone-candy{right:2.8% !important;left:auto !important;top:29% !important;bottom:auto !important}

.case-preview{
  position:absolute;inset:0;
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  overflow:hidden;
  border:1px solid rgba(196,153,113,.42);
  border-radius:5px;
  background:
    linear-gradient(180deg,rgba(19,13,12,.94),rgba(5,4,5,.97));
  box-shadow:
    inset 0 0 26px rgba(0,0,0,.7),
    0 12px 28px rgba(0,0,0,.7),
    0 0 0 1px rgba(0,0,0,.55);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,filter .18s ease;
}
.case-preview::before{
  content:"";
  position:absolute;inset:0;
  pointer-events:none;
  background:linear-gradient(118deg,rgba(255,255,255,.07),transparent 26%,transparent 70%,rgba(189,155,211,.035));
  mix-blend-mode:screen;
}
.case-preview-images{
  display:grid;
  grid-template-columns:1fr 1fr;
  grid-template-rows:1fr 1fr;
  gap:3px;
  min-height:0;
  padding:7px 7px 4px;
}
.case-preview-images img{
  width:100%;height:100%;min-height:0;
  object-fit:contain;
  background:#030303;
  border:1px solid rgba(220,190,154,.16);
  opacity:.9;
}
.case-preview-copy{
  position:relative;
  display:block;
  padding:.5rem .55rem .58rem;
  text-align:center;
  border-top:1px solid rgba(203,164,119,.24);
  background:linear-gradient(180deg,rgba(24,14,18,.95),rgba(8,6,8,.98));
}
.case-preview-copy i{
  display:block;
  margin-bottom:.18rem;
  font:700 .52rem/1 Georgia,serif;
  letter-spacing:.18em;
  color:#b986d0;
}
.case-preview-copy b{
  display:block;
  font:400 clamp(.62rem,.8vw,.8rem)/1.16 "Rye",Georgia,serif;
  color:#ead4b7;
  letter-spacing:.035em;
}
.case-preview-copy small{
  display:block;
  margin-top:.28rem;
  font:700 .48rem/1.2 Georgia,serif;
  letter-spacing:.08em;
  color:#a99aaa;
}
.zone-dot{
  position:absolute !important;
  right:8px !important;
  top:8px !important;
  left:auto !important;
  width:14px !important;
  height:14px !important;
  transform:none !important;
  background:#c265ee !important;
  border:2px solid rgba(237,205,250,.76);
  box-shadow:0 0 8px #d98cff,0 0 22px rgba(188,76,237,.92) !important;
  animation:zonePulse 2.1s ease-in-out infinite !important;
}
.museum-zone:hover .case-preview,
.museum-zone:focus-visible .case-preview{
  transform:translateY(-5px) scale(1.025);
  border-color:rgba(213,150,242,.8);
  box-shadow:
    inset 0 0 26px rgba(0,0,0,.55),
    0 15px 32px rgba(0,0,0,.8),
    0 0 22px rgba(168,72,211,.34);
}
.museum-zone:focus-visible{outline:none}

/* IMPORTANT: investigation darkness no longer sits above the exhibits.
   The user can still browse the museum without returning the glass. */
.examine-room.investigating .exhibit-layer{
  z-index:28 !important;
}
.examine-room.investigating .museum-zone{
  pointer-events:auto !important;
}
.examine-room.investigating .case-preview{
  filter:brightness(.42) saturate(.62);
  border-color:rgba(147,101,165,.35);
}
.examine-room.investigating .museum-zone:hover .case-preview,
.examine-room.investigating .museum-zone:focus-visible .case-preview{
  filter:brightness(.9) saturate(.9);
  border-color:rgba(213,150,242,.78);
}
.examine-room.investigating .zone-dot{
  opacity:1 !important;
  background:#b552df !important;
  box-shadow:0 0 9px #d28bf2,0 0 22px rgba(182,78,226,.88) !important;
}

/* Lens stays above the museum displays, but no longer covers headings/buttons
   with a visual 'reveal circle'. */
.lens{z-index:36 !important}
.investigation-title{z-index:34 !important}
.return-glass{z-index:42 !important}

/* Collection and exhibit windows remain above everything. */
.collection-overlay,.exhibit-overlay{z-index:90 !important}

@media(max-width:980px){
  .museum-zone{
    width:18vw !important;
    min-width:145px;
    height:23vh !important;
    min-height:150px;
  }
  .zone-paper{left:1.5% !important}
  .zone-masks{left:20.5% !important}
  .zone-home{left:40.7% !important}
  .zone-culture{right:20.5% !important}
  .zone-candy{right:1.5% !important}
}
@media(max-width:760px){
  /* On narrow screens use a compact five-card rail instead of overlapping cases. */
  .exhibit-layer{
    top:29%;
    bottom:19%;
    padding:0 10px;
    display:grid;
    grid-template-columns:repeat(5,minmax(135px,1fr));
    gap:8px;
    overflow-x:auto;
    overflow-y:hidden;
    align-items:center;
  }
  .museum-zone{
    position:relative !important;
    left:auto !important;right:auto !important;top:auto !important;bottom:auto !important;
    width:145px !important;min-width:145px;height:205px !important;min-height:205px;
  }
}


/* ============================================================
   PHASE 3 — THE CURATOR'S CHALLENGE / INVESTIGATION LAYER
   Separate from the 20 permanent exhibits.
   ============================================================ */

.investigation-hud{
  position:fixed;
  z-index:44;
  left:18px;
  bottom:66px;
  width:245px;
  display:none;
  padding:.68rem .78rem .72rem;
  border:1px solid rgba(196,126,229,.48);
  border-radius:5px;
  background:rgba(8,5,10,.93);
  box-shadow:0 8px 25px rgba(0,0,0,.72),0 0 18px rgba(135,55,175,.28);
  color:#e8dced;
  pointer-events:none;
}
.examine-room.investigating .investigation-hud{display:block}
.investigation-hud .hud-kicker{
  font:700 .5rem/1 Georgia,serif;letter-spacing:.16em;color:#b678cf
}
.investigation-hud strong{
  display:block;margin:.26rem 0 .18rem;font:400 .72rem/1.2 "Rye",Georgia,serif;color:#ead5b8
}
.investigation-hud p{
  margin:.15rem 0;font:italic .58rem/1.35 Georgia,serif;color:#b7a8bb
}
.clue-progress{
  display:flex;align-items:center;gap:7px;margin-top:.5rem;
  font:700 .56rem/1 Georgia,serif;letter-spacing:.08em;color:#d6b7e4
}
.clue-dots{display:flex;gap:4px}
.clue-dots i{
  width:8px;height:8px;border-radius:50%;
  border:1px solid #765183;background:#140d18;box-shadow:inset 0 0 5px #000
}
.clue-dots i.found{
  background:#c86af0;border-color:#e7b0ff;box-shadow:0 0 8px #d986fa
}

/* Hidden investigation sites: invisible until the glass gets close. */
.investigation-site{
  position:absolute;
  z-index:33;
  width:64px;height:64px;
  border:0;padding:0;
  background:transparent;
  opacity:0;
  pointer-events:none;
  cursor:pointer;
  transition:opacity .12s ease,filter .12s ease,transform .12s ease;
}
.examine-room.investigating:not(.entering) .investigation-site.near{
  opacity:.3;
  pointer-events:auto;
}
.examine-room.investigating:not(.entering) .investigation-site.hot{
  opacity:1;
  pointer-events:auto;
}
.investigation-site::before{
  content:"";
  position:absolute;inset:17px;border-radius:50%;
  border:1px solid rgba(150,226,218,.6);
  background:radial-gradient(circle,rgba(157,239,229,.28),rgba(107,67,143,.14) 45%,transparent 72%);
  box-shadow:0 0 13px rgba(131,224,215,.42),0 0 31px rgba(115,67,159,.35);
}
.investigation-site.hot::before{
  border-color:rgba(232,220,250,.95);
  background:radial-gradient(circle,rgba(230,245,236,.48),rgba(171,102,213,.25) 48%,transparent 75%);
  box-shadow:0 0 12px #d9c6ef,0 0 34px rgba(181,91,226,.75);
}
.investigation-site.found::before{
  background:radial-gradient(circle,rgba(185,141,205,.12),transparent 68%);
  border-color:rgba(167,118,190,.25);
  box-shadow:none;
}
.investigation-site .site-mark{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.7);
  font:700 1.15rem/1 Georgia,serif;color:#efe7f4;
  text-shadow:0 0 8px #bd6ee2;
}
.investigation-site.hot .site-mark{transform:translate(-50%,-50%) scale(1)}

.investigation-site[data-site="clue1"]{left:9%;top:24%}
.investigation-site[data-site="clue2"]{left:29%;top:30%}
.investigation-site[data-site="clue3"]{left:53%;top:26%}
.investigation-site[data-site="clue4"]{right:14%;top:30%}
.investigation-site[data-site="clue5"]{left:14%;bottom:20%}
.investigation-site[data-site="clue6"]{left:38%;bottom:18%}
.investigation-site[data-site="clue7"]{right:34%;bottom:18%}
.investigation-site[data-site="clue8"]{right:11%;bottom:20%}

.investigation-site[data-site="egg1"]{left:4%;top:53%}
.investigation-site[data-site="egg2"]{left:43%;top:17%}
.investigation-site[data-site="egg3"]{right:4%;top:55%}
.investigation-site[data-site="egg4"]{left:25%;bottom:8%}
.investigation-site[data-site="egg5"]{right:26%;bottom:8%}

/* Discovery cards */
.investigation-discovery{
  position:fixed;z-index:96;
  left:50%;top:50%;
  width:min(480px,86vw);
  transform:translate(-50%,-50%) scale(.94);
  opacity:0;visibility:hidden;
  padding:1rem 1.1rem 1.05rem;
  border:1px solid rgba(206,151,235,.52);
  border-radius:6px;
  background:
    linear-gradient(180deg,rgba(24,13,26,.985),rgba(6,4,7,.995));
  box-shadow:0 25px 70px #000,0 0 34px rgba(149,63,190,.34);
  color:#eee1d2;
  transition:.15s ease;
}
.investigation-discovery.open{
  opacity:1;visibility:visible;transform:translate(-50%,-50%) scale(1)
}
.discovery-kicker{
  font:700 .55rem/1 Georgia,serif;letter-spacing:.17em;color:#bd7cd9
}
.investigation-discovery h3{
  margin:.38rem 2rem .45rem 0;
  font:400 1.05rem/1.2 "Rye",Georgia,serif;color:#ecd5b7
}
.investigation-discovery p{
  margin:.48rem 0;font:.8rem/1.48 Georgia,serif;color:#ded1c2
}
.discovery-file{
  margin-top:.72rem;padding-top:.58rem;border-top:1px solid rgba(201,149,230,.18);
  font:700 .57rem/1.3 Georgia,serif;letter-spacing:.08em;color:#af9bb7
}
.discovery-close{
  position:absolute;right:.65rem;top:.6rem;width:30px;height:30px;border-radius:50%;
  border:1px solid rgba(204,151,234,.42);background:#0c080e;color:#e6d2ee;cursor:pointer
}

/* Supernatural eye event */
.watching-eyes{
  position:absolute;z-index:31;width:58px;height:18px;
  opacity:0;pointer-events:none;
  transition:opacity .16s ease;
}
.watching-eyes.show{opacity:.95}
.watching-eyes::before,.watching-eyes::after{
  content:"";position:absolute;top:3px;width:14px;height:8px;border-radius:60% 60% 50% 50%;
  background:radial-gradient(circle at 55% 50%,#08050a 0 18%,#d5c4e6 22% 34%,#9d4fd1 38% 50%,transparent 54%);
  box-shadow:0 0 9px rgba(183,97,230,.78)
}
.watching-eyes::before{left:7px}
.watching-eyes::after{right:7px}

/* Brief apparition/message */
.haunt-whisper{
  position:absolute;z-index:32;
  opacity:0;pointer-events:none;
  font:italic 700 .78rem/1 Georgia,serif;letter-spacing:.08em;color:rgba(228,211,235,.72);
  text-shadow:0 0 8px #000,0 0 13px rgba(174,95,209,.65);
  transition:opacity .3s ease;
}
.haunt-whisper.show{opacity:1}

/* Final reward drawer */
.curator-reward{
  position:fixed;z-index:98;left:50%;bottom:12%;
  width:min(560px,88vw);transform:translateX(-50%) translateY(20px);
  opacity:0;visibility:hidden;
  padding:1rem 1.15rem;
  border:1px solid rgba(219,174,103,.47);
  border-radius:6px;
  background:linear-gradient(180deg,rgba(30,23,15,.98),rgba(8,6,5,.995));
  box-shadow:0 22px 65px #000,0 0 32px rgba(183,126,57,.25);
  color:#eadcc8;
  transition:.22s ease;
}
.curator-reward.open{opacity:1;visibility:visible;transform:translateX(-50%) translateY(0)}
.curator-reward h3{
  margin:.25rem 2rem .4rem 0;font:400 1.05rem/1.2 "Rye",Georgia,serif;color:#e7c990
}
.curator-reward p{margin:.45rem 0;font:.78rem/1.5 Georgia,serif}
.reward-kicker{font:700 .53rem/1 Georgia,serif;letter-spacing:.17em;color:#be9259}

/* Investigation becomes visibly distinct from normal browsing, while case
   cards stay usable. */
.examine-room.investigating:not(.entering) .case-preview{
  filter:brightness(.28) saturate(.48) !important;
}
.examine-room.investigating:not(.entering) .museum-zone:hover .case-preview{
  filter:brightness(.75) saturate(.78) !important;
}
.examine-room.investigating:not(.entering) .zone-dot{
  background:#7e4395 !important;
  opacity:.55 !important;
}
.examine-room.investigating:not(.entering) .museum-zone:hover .zone-dot{
  background:#ca67ed !important;opacity:1 !important;
}

/* The reveal circle should search the museum rather than cover fixed headings. */
.examine-room.investigating .room-heading,
.examine-room.investigating .room-instruction{
  position:relative;z-index:40;
}
.examine-room.investigating .investigation-reveal-view{
  z-index:25 !important;
}
.examine-room.investigating .exhibit-layer{
  z-index:28 !important;
}
.examine-room.investigating .lens{
  z-index:41 !important;
}

@media(max-width:760px){
  .investigation-hud{left:8px;bottom:58px;width:210px}
  .investigation-site{width:52px;height:52px}
}


/* ============================================================
   PHASE 3A — 8/8 COMPLETION EVENT
   Modular visual payoff for The Curator's Challenge.
   ============================================================ */

.completion-flash{
  position:fixed;
  inset:0;
  z-index:94;
  opacity:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 50% 48%,rgba(255,255,255,.98) 0 9%,
      rgba(218,181,255,.92) 18%,
      rgba(119,54,168,.58) 36%,
      rgba(8,4,12,.0) 72%);
  mix-blend-mode:screen;
}
.examine-room.completion-event .completion-flash{
  animation:curatorFlash 1.55s linear forwards;
}

.examine-room.completion-event .examine-museum{
  animation:curatorShudder 1.6s cubic-bezier(.15,.7,.15,1) forwards !important;
}

.examine-room.completion-event .investigation-site[data-kind="clue"]::before{
  animation:allCluesFlare 1.8s ease-out forwards !important;
}
.examine-room.completion-event .investigation-site[data-kind="clue"]{
  opacity:1 !important;
}

.examine-room.completion-event .watching-eyes{
  opacity:1 !important;
  filter:drop-shadow(0 0 10px rgba(210,151,249,.95));
}
.examine-room.completion-event .curator-reward{
  box-shadow:
    0 22px 65px #000,
    0 0 24px rgba(228,178,91,.55),
    0 0 64px rgba(187,109,229,.38);
}

@keyframes curatorFlash{
  0%,18%{opacity:0}
  22%{opacity:1}
  28%{opacity:.08}
  36%{opacity:.88}
  43%{opacity:.12}
  52%{opacity:.68}
  68%,100%{opacity:0}
}
@keyframes curatorShudder{
  0%,18%{transform:translate(0,0)}
  24%{transform:translate(-5px,2px)}
  31%{transform:translate(7px,-2px)}
  38%{transform:translate(-8px,3px)}
  45%{transform:translate(6px,-2px)}
  52%{transform:translate(-4px,1px)}
  62%{transform:translate(2px,-1px)}
  100%{transform:translate(0,0)}
}
@keyframes allCluesFlare{
  0%{filter:brightness(1);transform:scale(1)}
  22%{filter:brightness(2.2);transform:scale(1.22)}
  42%{filter:brightness(3);transform:scale(1.42)}
  72%{filter:brightness(1.5);transform:scale(1.12)}
  100%{filter:brightness(1);transform:scale(1)}
}

@media(prefers-reduced-motion:reduce){
  .examine-room.completion-event .examine-museum,
  .examine-room.completion-event .completion-flash,
  .examine-room.completion-event .investigation-site[data-kind="clue"]::before{
    animation:none !important;
  }
}


/* ============================================================
   EXAMINE — UNIVERSAL UX REPAIR
   Case markers + exhibit readability only.
   ============================================================ */

/* Canonical swirling/glowing Portal marker treatment for case-file markers. */
.zone-dot{
  width:clamp(18px,1.35vw,24px) !important;
  height:clamp(18px,1.35vw,24px) !important;
  border:1px solid rgba(247,226,255,.98) !important;
  border-radius:50% !important;
  background:
    radial-gradient(circle at 38% 34%,
      #fff 0 7%,
      #efc9ff 9% 22%,
      #c36df2 42%,
      #681b8c 72%,
      rgba(77,10,107,.28) 78%,
      transparent 80%) !important;
  box-shadow:
    0 0 7px rgba(246,223,255,.98),
    0 0 17px rgba(205,105,255,.98),
    0 0 31px rgba(142,43,205,.82) !important;
  transform-origin:center;
  animation:
    examinePortalPulse 1.8s ease-in-out infinite,
    examinePortalTurn 4.6s linear infinite !important;
}

@keyframes examinePortalPulse{
  0%,100%{scale:.88;opacity:.82}
  50%{scale:1.14;opacity:1}
}
@keyframes examinePortalTurn{
  from{rotate:0deg}
  to{rotate:360deg}
}

/* Universal larger reading treatment for Case -> Exhibit information. */
.exhibit-record{
  width:min(1380px,96vw) !important;
  max-height:88vh !important;
}

.exhibit-record-grid{
  grid-template-columns:minmax(330px,36%) minmax(0,1fr) !important;
}

.exhibit-copy-side{
  padding:clamp(1.4rem,2.5vw,2.5rem) clamp(1.5rem,3vw,3rem) 2.5rem !important;
  scrollbar-gutter:stable;
  scrollbar-width:auto;
  scrollbar-color:#a861cf #100b12;
}

.exhibit-copy-side::-webkit-scrollbar{width:12px}
.exhibit-copy-side::-webkit-scrollbar-track{background:#100b12}
.exhibit-copy-side::-webkit-scrollbar-thumb{
  border:2px solid #100b12;
  border-radius:8px;
  background:linear-gradient(#bd78e5,#75428f);
}

.exhibit-copy-side h2{
  font-size:clamp(1.7rem,2.8vw,2.55rem) !important;
  line-height:1.15 !important;
}

.exhibit-copy-side h3{
  font-size:clamp(1rem,1.2vw,1.15rem) !important;
  line-height:1.5 !important;
}

.exhibit-body p,
.exhibit-history p,
.exhibit-swingali p,
.exhibit-feature p{
  font-size:clamp(1rem,1.08vw,1.13rem) !important;
  line-height:1.72 !important;
}

.exhibit-references li{
  font-size:clamp(.84rem,.9vw,.95rem) !important;
  line-height:1.5 !important;
}

/* Curator challenge/reward panel is also enlarged for first-time visibility. */
.curator-reward{
  width:min(760px,88vw) !important;
  padding:clamp(1.25rem,2.5vw,2rem) !important;
}

.curator-reward h3{
  font-size:clamp(1.25rem,2vw,1.8rem) !important;
}

.curator-reward p{
  font-size:clamp(1rem,1.08vw,1.12rem) !important;
  line-height:1.65 !important;
}

@media(max-width:760px){
  .exhibit-record-grid{
    grid-template-columns:1fr !important;
  }
}

@media(prefers-reduced-motion:reduce){
  .zone-dot{animation:none !important}
}


/* ============================================================
   EXAMINE — THE CURATOR'S CHALLENGE READABILITY / SCALE FIX
   Enlarges only the lower-left Investigation HUD.
   Functionality and hotspot coordinates remain unchanged.
   ============================================================ */
.investigation-hud{
  /* Roughly doubles the visual footprint without consuming twice the width. */
  width:clamp(355px,27vw,405px) !important;
  padding:1.05rem 1.15rem 1.1rem !important;

  left:18px !important;
  bottom:66px !important;

  /* Keep the information panel UNDER interactive investigation targets
     and museum cases so it can never cover their click/preview layers. */
  z-index:29 !important;

  border:1px solid rgba(207,142,235,.62) !important;
  border-radius:7px !important;
  background:rgba(8,5,10,.94) !important;
  box-shadow:
    0 10px 30px rgba(0,0,0,.76),
    0 0 23px rgba(146,58,188,.34) !important;
}

.investigation-hud .hud-kicker{
  font-size:clamp(.68rem,.78vw,.78rem) !important;
  line-height:1.05 !important;
  letter-spacing:.17em !important;
}

.investigation-hud strong{
  margin:.42rem 0 .32rem !important;
  font-size:clamp(1.02rem,1.22vw,1.2rem) !important;
  line-height:1.18 !important;
}

.investigation-hud p{
  margin:.28rem 0 !important;
  font-size:clamp(.82rem,.92vw,.94rem) !important;
  line-height:1.48 !important;
}

.investigation-hud .clue-progress{
  gap:10px !important;
  margin-top:.72rem !important;
  font-size:clamp(.72rem,.8vw,.82rem) !important;
  line-height:1.1 !important;
}

.investigation-hud .clue-dots{
  gap:6px !important;
}

.investigation-hud .clue-dots i{
  width:11px !important;
  height:11px !important;
}

/* Interactive layers always remain above the enlarged HUD if their screen
   regions happen to overlap on a short or narrow display. */
.examine-room.investigating .museum-zone{
  z-index:30 !important;
}
.examine-room.investigating .investigation-site{
  z-index:33 !important;
}
.examine-room.investigating .lens{
  z-index:36 !important;
}

/* Preserve clearance for smaller displays rather than letting the HUD
   expand into the rest of the room. */
@media(max-width:980px){
  .investigation-hud{
    width:clamp(315px,37vw,355px) !important;
    padding:.92rem 1rem 1rem !important;
  }
}

@media(max-width:700px){
  .investigation-hud{
    left:8px !important;
    bottom:58px !important;
    width:min(330px,48vw) !important;
  }
}
