:root{
  --amber:#d4a15f; --paper:#e8dcc7; --red:#a34035; --green:#6d7a70;
}
*{box-sizing:border-box} html,body,#app{margin:0;width:100%;height:100%;overflow:hidden;background:#050606;color:var(--paper);font-family:Georgia,'Times New Roman',serif}
#webgl{position:fixed;inset:0;width:100%;height:100%;display:block;background:transparent;z-index:1;transition:opacity .35s}
#grain{position:fixed;z-index:2;inset:0;pointer-events:none;opacity:.16;mix-blend-mode:screen;background-image:radial-gradient(circle at 20% 30%,rgba(255,255,255,.25) 0 1px,transparent 1px),radial-gradient(circle at 70% 80%,rgba(255,255,255,.18) 0 1px,transparent 1px);background-size:4px 4px,7px 7px;animation:grain .32s steps(2) infinite}
@keyframes grain{to{transform:translate(2px,-2px)}}
#vignette{position:fixed;z-index:3;inset:0;pointer-events:none;background:radial-gradient(circle at center,transparent 35%,rgba(0,0,0,.35) 62%,rgba(0,0,0,.86) 100%)}
.panel{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:radial-gradient(circle at 50% 35%,rgba(50,55,50,.38),rgba(0,0,0,.96) 74%);z-index:20;padding:24px}.panel.active{display:flex}.start-card{max-width:760px;padding:42px;border:1px solid rgba(232,220,199,.18);background:rgba(9,10,10,.78);box-shadow:0 30px 90px rgba(0,0,0,.72);backdrop-filter:blur(8px)}
h1{font-size:clamp(42px,8vw,88px);line-height:.92;margin:.1em 0 .12em;font-weight:400;letter-spacing:-.04em}.eyebrow{font-size:13px;letter-spacing:.18em;text-transform:uppercase;color:var(--amber);margin:0 0 12px}.date{font-size:21px;color:#c9b996;margin:0 0 22px}.description{font-size:18px;line-height:1.58;color:#d9cfbc}.micro{font-size:13px;color:#9d9587;margin-top:20px}button{font:700 13px/1.1 system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase;border:1px solid rgba(232,220,199,.32);background:rgba(212,161,95,.16);color:#f2e6d1;padding:14px 20px;cursor:pointer}button:hover{background:rgba(212,161,95,.32)}
#hud{position:fixed;left:24px;top:22px;z-index:8;text-shadow:0 2px 10px #000;opacity:0;transition:opacity .6s}#hud.visible{opacity:1}#chapter{font:700 12px/1 system-ui,sans-serif;letter-spacing:.2em;text-transform:uppercase;color:var(--amber);margin-bottom:8px}#instruction{font-size:16px;color:#d9cfbc;max-width:440px}
#thoughtBox{position:fixed;left:50%;bottom:42px;transform:translateX(-50%);max-width:min(820px,86vw);padding:18px 24px;background:rgba(0,0,0,.56);border-left:3px solid rgba(212,161,95,.8);font-size:clamp(21px,3.1vw,36px);line-height:1.22;text-align:center;z-index:10;opacity:0;transition:opacity .5s,transform .5s;text-shadow:0 2px 18px #000}#thoughtBox.show{opacity:1;transform:translateX(-50%) translateY(-10px)}
#memoryCard{position:fixed;right:24px;bottom:24px;width:min(360px,36vw);min-height:120px;background:rgba(8,8,8,.7);border:1px solid rgba(232,220,199,.14);padding:14px;z-index:9;opacity:0;transform:translateY(12px);transition:.4s}#memoryCard.show{opacity:1;transform:translateY(0)}#memoryCard img{width:100%;max-height:220px;object-fit:cover;display:block;filter:sepia(.24) contrast(1.05)}#memoryCard h3{margin:10px 0 4px;font-size:19px;font-weight:400;color:#f2dfc0}#memoryCard p{margin:0;font-size:14px;line-height:1.42;color:#cfc3ae}
.media-video{position:fixed;inset:0;width:100%;height:100%;object-fit:cover;z-index:6;opacity:0;transition:opacity .7s;filter:contrast(1.04) saturate(.78) brightness(.76)}.media-video.show{opacity:1}
#controls{position:fixed;right:18px;top:18px;z-index:30;display:flex;gap:8px}#controls button{padding:10px 12px;background:rgba(0,0,0,.35);font-size:11px;color:#d7cab5}
.end-card p{font-size:20px;line-height:1.5}.quote{color:var(--amber);font-style:italic}
@media(max-width:700px){.start-card{padding:26px}#memoryCard{left:16px;right:16px;bottom:130px;width:auto}#thoughtBox{bottom:32px}.description{font-size:16px}}
#fallbackScene{position:fixed;inset:0;background-size:cover;background-position:center;display:block;transform:scale(1.03);transition:background-image .5s, filter .5s;filter:contrast(1.02) saturate(.8) brightness(.72);z-index:0}
body.no-webgl #fallbackScene{display:block} body.no-webgl #webgl, body.image-fallback #webgl{display:none}.hotspotDom{position:fixed;width:34px;height:34px;border-radius:50%;border:2px solid rgba(255,255,255,.5);background:rgba(212,161,95,.65);box-shadow:0 0 28px rgba(212,161,95,.8);z-index:7;cursor:pointer;animation:pulseHotspot 1.8s ease-in-out infinite}.hotspotDom::after{content:"";position:absolute;inset:-10px;border:1px solid rgba(255,255,255,.25);border-radius:50%}@keyframes pulseHotspot{50%{transform:scale(1.18);opacity:.7}}
#hotspotLayer{position:fixed;inset:0;z-index:9;pointer-events:none}.hotspotDom{pointer-events:auto;position:fixed;width:36px;height:36px;border-radius:50%;border:0;background:transparent;z-index:12;cursor:pointer;overflow:visible}.hotspotDom span{position:absolute;inset:0;border-radius:50%;border:2px solid rgba(255,244,221,.82);background:rgba(212,161,95,.55);box-shadow:0 0 34px rgba(212,161,95,.95), inset 0 0 18px rgba(255,255,255,.28);animation:pulseHotspot 1.65s ease-in-out infinite}.hotspotDom em{position:absolute;left:50%;top:42px;transform:translateX(-50%);white-space:nowrap;font:700 11px/1.1 system-ui,sans-serif;letter-spacing:.09em;text-transform:uppercase;color:#f5e7cf;background:rgba(0,0,0,.72);border:1px solid rgba(232,220,199,.18);padding:7px 9px;border-radius:999px;text-shadow:0 1px 8px #000}.hotspotDom.visited span{background:rgba(109,122,112,.72);box-shadow:0 0 22px rgba(109,122,112,.9)}#continueBtn{display:none;background:rgba(212,161,95,.26)!important;border-color:rgba(232,220,199,.42)!important}#continueBtn.visible{display:inline-block}@media(max-width:700px){.hotspotDom em{font-size:9px;top:36px}.hotspotDom{width:32px;height:32px}}

/* Interaction repair: keep story controls above the panorama/video layers. */
#hotspotLayer{z-index:45;pointer-events:none;}
.hotspotDom{z-index:46;pointer-events:auto;touch-action:manipulation;-webkit-tap-highlight-color:transparent;}
.hotspotDom span,.hotspotDom em{pointer-events:none;}
#objectTray{position:fixed;right:18px;top:94px;bottom:auto;z-index:55;display:none;width:230px;max-height:calc(100vh - 150px);overflow:auto;padding:14px;background:rgba(5,5,5,.72);border:1px solid rgba(232,220,199,.16);backdrop-filter:blur(8px);box-shadow:0 18px 55px rgba(0,0,0,.55)}
#objectTray.visible{display:block}.tray-title{font:800 11px/1 system-ui,sans-serif;letter-spacing:.18em;text-transform:uppercase;color:var(--amber);margin:0 0 10px}#objectButtons{display:flex;gap:8px;flex-direction:column}#objectButtons button{width:100%;text-align:left;padding:11px 12px;font-size:11px;background:rgba(0,0,0,.42);border-color:rgba(232,220,199,.24);color:#f2e6d1}#objectButtons button:hover,#objectButtons button:focus{background:rgba(212,161,95,.32);outline:1px solid rgba(212,161,95,.65)}
#thoughtBox{z-index:50;pointer-events:none}#memoryCard{z-index:54;pointer-events:none}.media-video{pointer-events:none}#controls{z-index:60}.panel{z-index:80}
@media(max-width:700px){#objectTray{right:12px;left:auto;top:92px;bottom:auto;width:min(220px,42vw);max-height:calc(100vh - 124px);overflow:auto;padding:10px}#objectButtons button{font-size:10px;padding:9px 10px}#thoughtBox{bottom:32px;font-size:20px;max-width:calc(100vw - 260px);left:18px;transform:none;text-align:left}#thoughtBox.show{transform:translateY(-10px)}#memoryCard{left:16px;right:16px;bottom:110px;width:auto}}

/* Keeps the Explore controls out of the story text and fixes portrait crop for Tonya/Malik memory. */
#memoryCard.tonya-memory img{object-fit:contain;object-position:center top;background:rgba(0,0,0,.35);max-height:260px;}
@media(min-width:701px){#thoughtBox{max-width:calc(100vw - 330px);left:24px;transform:none;text-align:left;}#thoughtBox.show{transform:translateY(-10px)}}


/* === STRICT HOSTINGER/MACALY BACKGROUND FIX ===
   These scene files are normal photographs/equirectangular stills used as cinematic backgrounds.
   Do not render them onto a Three.js sphere. The canvas is hidden and the CSS layer is authoritative.
*/
#webgl {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
#fallbackScene {
  position: fixed !important;
  inset: 0 !important;
  display: block !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1 !important;
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: #050606 !important;
  transform: none !important;
  filter: contrast(1.02) saturate(.82) brightness(.72) !important;
}
#grain { z-index: 2 !important; }
#vignette { z-index: 3 !important; }
#hud { z-index: 40 !important; }
#hotspotLayer { z-index: 45 !important; }
.hotspotDom { z-index: 46 !important; }
#thoughtBox { z-index: 50 !important; }
#memoryCard { z-index: 54 !important; }
#objectTray { z-index: 55 !important; }
#controls { z-index: 60 !important; }
.panel { z-index: 80 !important; }
.media-video {
  object-fit: contain !important;
  background: #050606 !important;
}
