:root{--paper:#f1ede4;--ink:#303a31;--muted:#777b6c;--green:#344c3e;--rule:#d9d7ca;--gold:#b29558}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:15px/1.6 system-ui,-apple-system,sans-serif}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,.square:focus-visible{outline:3px solid #b87d39;outline-offset:5px}a{color:inherit;text-decoration:none}button{border:0;background:none}header{height:100px;display:flex;justify-content:space-between;align-items:center;padding:0 4.5%;border-bottom:1px solid var(--rule)}.brand{display:flex;gap:13px;align-items:center;font:29px/1.1 Georgia,serif}.seal{display:grid;place-items:center;width:43px;height:43px;border:1px solid #929980;border-radius:50%;font:italic 37px Georgia,serif;padding-bottom:5px}.brand-sub{display:block;font:9px/1.7 system-ui,sans-serif;letter-spacing:.2em;text-transform:uppercase;margin-top:7px}.header-right{display:flex;align-items:center;gap:35px}.study,.eyebrow{font-size:9px;font-weight:600;letter-spacing:.18em}.study{color:#8b8d7e}.directory-toggle{border:1px solid #b8beae;padding:8px 18px;border-radius:3px;font-size:12px}.directory-toggle span{margin-left:18px}.intro{padding:29px 4.5% 25px;display:flex;align-items:center;justify-content:space-between;gap:20px}.eyebrow{margin:0 0 8px;color:#77836f}h1{font:normal clamp(25px,2.7vw,42px)/1.2 Georgia,serif;margin:0;letter-spacing:-.025em}.intro-note{color:#7a7e71;font:13px/1.8 Georgia,serif;margin:0}.square{position:relative;height:clamp(480px,64vh,800px);overflow:hidden;background:#cbd3c1;isolation:isolate}.scene{position:absolute;inset:0;overflow:hidden;cursor:grab;touch-action:pan-y;user-select:none}.scene.dragging{cursor:grabbing}.world{position:absolute;left:0;top:0;height:100%;will-change:transform}.panorama{position:absolute;top:0;height:100%;background-image:none;background-size:100% 100%;background-position:center 55%;background-repeat:no-repeat}.door{position:absolute;top:64%;transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:9px;color:#fff9e9;pointer-events:auto}.door-pin{width:28px;height:28px;border:1px solid #fff9;display:grid;place-items:center;border-radius:50%;background:#314635b8;box-shadow:0 2px 12px #0003;font-size:16px;transition:transform .2s}.door-name{white-space:nowrap;background:#2c3d32ee;padding:6px 12px;border:1px solid #a4a988;border-radius:2px;font:12px Georgia,serif;box-shadow:0 3px 12px #0002;transition:background .2s}.door:hover .door-pin{transform:scale(1.18)}.door:hover .door-name{background:#52684c}.scene-shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(0deg,#1d332cb8,transparent 35%,transparent 80%,#e9ead82b)}.scene-grain{pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 100px #293b2520}.corner-note{position:absolute;top:22px;left:4.5%;font:italic 19px Georgia,serif;color:#35472e;text-shadow:0 1px 12px #fff}.sun{font-size:21px;margin-right:5px}.note-line{display:block;font:9px system-ui,sans-serif;letter-spacing:.06em;margin:5px 0 0 29px}.directory{position:absolute;right:4.3%;top:28px;width:218px;z-index:4;filter:drop-shadow(3px 7px 5px #25302144)}.directory[hidden]{display:none}.post{position:absolute;top:23px;left:101px;width:14px;height:382px;background:linear-gradient(90deg,#51402e,#917355 48%,#59432f);z-index:-1;border-radius:2px}.sign-cap{text-align:center;margin-bottom:13px;font-size:8px;letter-spacing:.22em;color:#3a4937;font-weight:700;text-shadow:0 1px 5px #fff}.signs-row{display:flex;align-items:center;justify-content:space-between;background:#f0e7d3;color:#3e4a37;height:34px;margin-bottom:7px;padding:0 23px 0 14px;clip-path:polygon(0 0,91% 0,100% 50%,91% 100%,0 100%);width:100%;font:13px Georgia,serif;position:relative}.signs-row:before{content:'';position:absolute;width:4px;height:4px;border-radius:50%;background:#a59a7c;left:9px;top:15px}.signs-row:nth-child(even){clip-path:polygon(9% 0,100% 0,100% 100%,9% 100%,0 50%);padding-left:27px;padding-right:13px;transform:translateX(-11px)}.signs-row:nth-child(3n){background:#3d5240;color:#f1e9d7}.signs-row:hover,.signs-row:focus-visible{background:#b59b65;color:#fff}.signs-row.active{box-shadow:inset 0 -2px #a98c4f}.sign-arrow{font:15px system-ui,sans-serif}.sign-foot{text-align:center;font:italic 11px Georgia,serif;color:#f3eedb;margin-top:21px;text-shadow:0 1px 4px #263825}.turn-controls{position:absolute;bottom:49px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:24px;z-index:3;color:#fff9eb}.turn{width:44px;height:44px;border:1px solid #e5e7d17a;border-radius:50%;background:#34493870;font:23px Georgia,serif;backdrop-filter:blur(8px)}.turn:hover{background:#50624e}.now{min-width:250px;text-align:center}.now .eyebrow{color:#e8e8cc;margin:0 0 4px;font-size:8px}.enter{display:flex;align-items:center;justify-content:center;gap:17px;width:100%;font:27px Georgia,serif;padding:0}.enter>span:last-child{font:18px system-ui,sans-serif;color:#d5c18e}.dots{display:flex;justify-content:center;gap:10px;margin-top:14px}.dot{width:7px;height:7px;border:1px solid #e7e4c4;border-radius:50%;padding:0;position:relative}.dot:before{content:'';position:absolute;inset:-7px}.dot.active{background:#f1e9c6}.gesture{position:absolute;bottom:17px;left:0;right:0;text-align:center;font-size:8px;letter-spacing:.16em;color:#e2e3c9;pointer-events:none}.gesture span{margin:0 16px;font-size:13px}.under{padding:18px 4.5%;display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid var(--rule);font-size:11px;color:#7a806f}.under button{font-size:11px;color:var(--green)}.under button span{margin-left:15px}.live-dot{display:inline-block;width:5px;height:5px;background:#8c9f77;border-radius:50%;margin:0 8px 2px 0}footer{padding:24px 4.5%;display:flex;gap:20px;justify-content:space-between;font-size:10px;color:#8d8e80}footer>span:first-child{font:italic 14px Georgia,serif;color:#5b6854}.overview{padding:45px 4.5% 25px}.overview-head{display:flex;justify-content:space-between;align-items:end;margin-bottom:25px;gap:20px}.overview h2{font:30px Georgia,serif;margin:0}.overview-head>p{font-size:12px;color:var(--muted)}#overview-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.overview-card{border:1px solid var(--rule);padding:18px}.overview-card h3{font:21px Georgia,serif;margin:8px 0}.overview-card p{font-size:12px;color:var(--muted);min-height:58px}.overview-card .mini{font-size:10px;color:#718269;margin-right:12px;padding:7px 0}.overview-card .mini:hover{text-decoration:underline}dialog{padding:0;border:0;border-radius:5px;background:var(--paper);color:var(--ink);max-width:1000px;width:calc(100% - 50px);max-height:90dvh;box-shadow:0 30px 100px #0005}dialog::backdrop{background:#17281c99;backdrop-filter:blur(7px)}.room-shell{display:grid;grid-template-columns:38% 62%;min-height:540px}.room-art{background-image:none;background-size:800% 100%;position:relative;min-height:300px}.room-art:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#193321bb,transparent 60%)}.room-art-label{position:absolute;bottom:25px;left:25px;z-index:1;color:#f5f0db;font:italic 24px Georgia,serif}.room-body{padding:50px 40px 30px;position:relative}.close{position:absolute;top:11px;right:17px;font:30px Georgia,serif}.room-body h2{font:42px/1.1 Georgia,serif;letter-spacing:-.03em;margin:12px 0 18px}.room-description{font:17px/1.7 Georgia,serif;color:#65705d}.room-tabs{display:flex;flex-wrap:wrap;gap:8px;border-bottom:1px solid var(--rule);padding-bottom:14px;margin-top:25px}.room-tabs button{font-size:11px;padding:7px 11px;border:1px solid #cad0be;border-radius:2px}.room-tabs button.active{background:#3d5341;color:#f5f0df;border-color:#3d5341}.room-content{min-height:105px;font-size:13px;color:#69745f;padding:18px 0}.room-content h3{font:22px Georgia,serif;color:var(--ink);margin:0 0 8px}.room-content p{margin:0}.room-actions{display:flex;align-items:center;gap:18px;flex-wrap:wrap}.primary{background:var(--green);color:#fff9e9;padding:11px 16px;font-size:11px;border-radius:2px}.back{font-size:11px}.prototype-note{font-size:10px;color:#919581;margin-top:23px}.prototype-note:before{content:'CONCEPT ROOM · ';font-size:8px;letter-spacing:.1em}.overview[hidden],#live-link[hidden]{display:none}body.modal-open{overflow:hidden}
@media(min-width:1700px){.square{height:70vh}.directory{top:55px}}
@media(max-width:900px){.study{display:none}.intro-note{display:none}header{height:83px}.intro{padding-top:22px;padding-bottom:23px}.square{height:65vh;min-height:510px}.directory{right:3%;width:185px}.post{left:86px}.signs-row{font-size:12px}.corner-note{font-size:16px;max-width:180px}.note-line{font-size:8px;max-width:120px;line-height:1.6}.turn-controls{gap:15px}.now{min-width:210px}.enter{font-size:25px}#overview-grid{grid-template-columns:repeat(2,1fr)}.room-shell{grid-template-columns:30% 70%}.room-body{padding:45px 25px 25px}}
@media(max-width:580px){header{padding:0 5%;height:76px}.brand{font-size:25px}.seal{width:36px;height:36px;font-size:32px}.brand-sub{font-size:7px}.directory-toggle{padding:7px 10px;font-size:11px}.directory-toggle span{margin-left:8px}.intro{padding:22px 5%}.intro h1{font-size:27px;max-width:340px}.intro .eyebrow{font-size:8px}.square{height:64dvh;min-height:480px}.directory{top:17px;right:20px;width:180px}.directory .post{height:369px;left:82px}.signs-row{height:31px;margin-bottom:6px;font-size:12px}.signs-row:before{top:13px}.sign-cap{margin-bottom:10px}.sign-foot{margin-top:17px}.corner-note{left:20px;top:20px;font-size:15px;max-width:125px}.sun{display:none}.note-line{margin-left:0;max-width:110px}.turn-controls{bottom:48px;gap:15px}.now{min-width:205px}.turn{width:37px;height:37px}.enter{font-size:24px}.gesture{font-size:6px;letter-spacing:.11em}.gesture span{margin:0 8px}.under{padding:15px 5%;font-size:10px}.under>span{max-width:180px}.under button{font-size:10px;text-align:right}footer{flex-wrap:wrap;gap:8px;padding:20px 5%;font-size:9px}footer>span:nth-child(2){order:3;width:100%}.room-shell{display:block}.room-art{height:180px;min-height:0;background-size:800% auto;background-position-y:47%}.room-body{padding:28px 24px}.room-body h2{font-size:32px}.room-description{font-size:16px}.close{top:-173px;right:10px;border-radius:50%;background:var(--paper);width:33px;height:33px;line-height:1}.room-art-label{font-size:20px;bottom:15px;left:20px}.overview-head{display:block}.overview-card{padding:13px}.overview-card h3{font-size:19px}#overview-grid{gap:9px}.overview-head>p{font-size:11px}.overview-card p{min-height:85px}.door-name{font-size:11px}.door{top:63%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

/* The family home is an independent transparent asset over the shared square. */
.family-house {
  position: absolute;
  width: 18.6%;
  height: auto;
  left: 72.4%;
  bottom: 26%;
  pointer-events: none;
}
.room-art.family-room {
  background-image: url('assets/family-house.webp'), linear-gradient(#c8d0be, #e6d9b8 65%, #9aab7d);
  background-size: 100% auto, cover;
  background-position: center center !important;
  background-repeat: no-repeat;
}

/* Real directional boards, rotating about the central post. */
.signs-row,
.signs-row:nth-child(even) {
  transform: none;
  transform-origin: 50% 50%;
  clip-path: polygon(0 0,91% 0,100% 50%,91% 100%,0 100%);
  padding-left: 14px;
  padding-right: 23px;
}
.signs-row.points-left,
.signs-row.points-left:nth-child(even) {
  clip-path: polygon(9% 0,100% 0,100% 100%,9% 100%,0 50%);
  padding-left: 27px;
  padding-right: 13px;
}
.signs-row.points-ahead,
.signs-row.points-ahead:nth-child(even) {
  clip-path: polygon(0 0,100% 0,100% 100%,0 100%);
  background: #b29558;
  color: #fff9e9;
}

/* An iron wayfinder anchored to the square, with brass-edged boards. */
.directory {
  bottom: 18px;
  perspective: 850px;
  filter: drop-shadow(3px 7px 5px #25302144);
}
.directory .post {
  top: 20px;
  bottom: 0;
  height: auto;
  left: calc(50% - 5px);
  width: 10px;
  border: 1px solid #171f1c;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(90deg, #151d1a, #526057 40%, #29382f 60%, #111b16);
}
.directory .post::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 23px;
  left: -5px;
  top: -14px;
  border-radius: 70% 70% 35% 35%;
  background: linear-gradient(90deg, #18231c, #78816b 45%, #26372b);
  border: 1px solid #28392c;
  box-shadow: 0 17px 0 -5px #b7a06c;
}
.directory .post::after {
  content: '';
  position: absolute;
  left: -38px;
  bottom: 0;
  width: 84px;
  height: 74px;
  background: linear-gradient(90deg, #14221b, #526253 48%, #17251d);
  clip-path: polygon(43% 0,57% 0,59% 46%,68% 70%,88% 83%,100% 87%,100% 96%,75% 96%,55% 80%,55% 100%,45% 100%,45% 80%,25% 96%,0 96%,0 87%,12% 83%,32% 70%,41% 46%);
  filter: drop-shadow(0 3px 2px #17261c55);
}
.signs-row,
.signs-row:nth-child(even),
.signs-row:nth-child(3n) {
  background: linear-gradient(#435548, #233b2d 55%, #1d3025);
  color: #f0dfb8;
  box-shadow: inset 0 1px #ccb880, inset 0 -1px #a18c58;
  text-shadow: 0 1px 1px #07170e;
}
.signs-row::before {
  background: #c5ab70;
  box-shadow: 0 0 0 1px #253429;
}
.signs-row.points-ahead,
.signs-row.points-ahead:nth-child(even) {
  background: linear-gradient(#c0a772, #8d7440);
  color: #fff8de;
}
.signs-row:hover,
.signs-row:focus-visible {
  background: linear-gradient(#61735b, #36513b);
  color: #fff8de;
}
.sign-foot {
  display: table;
  margin: 17px auto 0;
  padding: 3px 9px;
  background: #23382bdc;
  border: 1px solid #a48c59;
  border-radius: 3px;
  color: #efe2be;
  font-size: 10px;
}
@media(max-width:580px) {
  .directory { bottom: 13px; }
  .directory .post { left: calc(50% - 5px); height: auto; }
  .sign-foot { font-size: 9px; margin-top: 13px; }
  .directory .post::after { height: 49px; }
}


/* One shared sky and street behind independently arranged buildings. */
.panorama {
  background: url('assets/shared-square.jpg') center / 100% 100% no-repeat;
  pointer-events: none;
}
.street-plot { position: absolute; top: 0; height: 100%; }
.painted-facade {
  position: absolute;
  inset: 0;
  background-image: url('assets/square-modular.jpg');
  background-repeat: no-repeat;
}
.building-asset {
  position: absolute;
  left: -2%;
  bottom: 24.6%;
  width: 104%;
  height: auto;
  pointer-events: none;
}
.plot-2 .building-asset { bottom: 22%; }
.plot-4 .building-asset { width: 102%; left: -1%; bottom: 26%; }
/* The writing porch projects onto the cobbles to keep Bilbo readable. */
.plot-3 { z-index: 1; }
.plot-3 .building-asset { width: 110%; left: -5%; bottom: 18%; }
.room-art.featured-building {
  background-image: var(--building-image), linear-gradient(#c8d0be, #e6d9b8 65%, #9aab7d);
  background-size: 100% auto, cover;
  background-position: center center !important;
  background-repeat: no-repeat;
}
/* Nine destinations on the existing iron post. */
.directory .signs-row { height: 32px; margin-bottom: 6px; }
.directory .signs-row::before { top: 14px; }
@media(max-width:580px) {
  .directory .signs-row { height: 28px; margin-bottom: 5px; }
  .directory .signs-row::before { top: 12px; }
}

/* Victorian cast-iron lantern post; sign faces and rotation stay unchanged. */
.directory { top: 18px; }
.directory .post {
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: none;
  pointer-events: none;
}
.directory .post::before, .directory .post::after { content: none; }
.post-art { display: block; width: 100%; height: 100%; overflow: visible; }
.sign-cap { position: absolute; top: -8px; width: 100%; font-size: 7px; }
#signs { padding-top: 92px; }
.directory .signs-row { height: 30px; margin-bottom: 5px; }
.directory .signs-row::before { top: 13px; }
.sign-foot { margin-top: 12px; }
@media(max-width:580px) {
  .directory { top: 20px; }
  #signs { padding-top: 75px; }
  .directory .signs-row { height: 26px; margin-bottom: 4px; }
  .directory .signs-row::before { top: 11px; }
  .sign-foot { margin-top: 9px; }
}

/* Reference-inspired iron post, without a lantern. */
#signs { padding-top: 36px; }
@media(max-width:580px) { #signs { padding-top: 31px; } }

/* Doorways are real controls aligned to each illustration. */
.panorama { pointer-events: none; }
.entrance { position: absolute; z-index: 3; padding: 0; pointer-events: auto; perspective: 500px; border-radius: 4px; overflow: visible; }
.entrance::after { content: ''; position: absolute; inset: -3px; border: 2px solid transparent; border-radius: inherit; transition: border-color .18s, box-shadow .18s; }
.entrance:hover::after, .entrance:focus-visible::after { border-color: #ffe2a0; box-shadow: 0 0 14px #ffd37ac0; }
.door-leaf { display: block; position: absolute; inset: 0; transform-origin: left center; opacity: 0; border: 1px solid #9a7b45; background: linear-gradient(90deg,#49351e,#725332 45%,#44301b); transition: transform .5s ease, opacity .15s; backface-visibility: visible; }
.door-knob { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #d9b96d; right: 12%; top: 55%; }
.door-light { position: absolute; inset: 0; background: #ffe5a6; opacity: 0; box-shadow: 0 0 28px #ffda75; }
.round-entrance, .round-entrance .door-leaf, .round-entrance .door-light { border-radius: 50%; }
.round-entrance .door-leaf { background: linear-gradient(90deg,#243a26,#46613b,#233a28); }
.entrance.opening .door-light, .entrance.opening .door-leaf { opacity: 1; }
.entrance.opening .door-leaf { transform: rotateY(-108deg); }
.door { z-index: 5; }
.door-name { position: relative; z-index: 1; }

/* The entire room is the landing page; controls float over its complete image. */
#room { width:100vw; max-width:none; height:100dvh; max-height:none; margin:0; padding:0; border:0; border-radius:0; overflow:hidden; background:#10150f; color:#fff8e8; }
#room::backdrop { background:#10150f; }
.room-shell { display:block; width:100%; height:100%; min-height:0; }
.room-stage { position:relative; width:100%; height:100%; isolation:isolate; }
.room-art { position:absolute; inset:0; width:100%; height:100%; min-height:0; background:none!important; overflow:hidden; }
.room-art::after { content:none; }
#room-image { display:block; width:100%; height:100%; object-fit:contain; }
.room-stage::after { content:''; position:absolute; inset:0; pointer-events:none; z-index:1; background:linear-gradient(180deg,#10150fc9 0%,#10150f55 15%,transparent 31%,transparent 72%,#10150f88 91%,#10150fe0); }
.room-heading { position:absolute; z-index:3; top:clamp(20px,4vh,48px); left:clamp(24px,4.5vw,80px); max-width:calc(100% - 48px); text-shadow:0 2px 16px #0009; }
.room-heading .eyebrow { color:#e0d2ac; margin:0 0 6px; }
.room-heading h2 { margin:0; font:normal clamp(30px,3.8vw,58px)/1.12 Georgia,serif; }
#room-title { font:inherit; color:inherit; text-align:left; padding:0; }
.description-link { display:block; margin-top:10px; padding:0 0 3px; font-size:12px; color:#f3e7c5; border-bottom:1px solid #e9d9ac88; }
.room-pills { position:absolute; z-index:3; bottom:max(24px,env(safe-area-inset-bottom)); left:4%; right:4%; display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:10px; }
#room-options { display:contents; }
.room-pill { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 23px; background:#2e493ae8; color:#fff9e8; border:1px solid #c0c7a882; border-radius:999px; font:13px/1.4 system-ui,sans-serif; box-shadow:0 4px 18px #0004; backdrop-filter:blur(10px); transition:background .15s,transform .15s; }
.room-pill:hover { background:#526e4e; transform:translateY(-2px); }
.exit-pill { background:#eee8dce8; border-color:#fff7dba1; color:#263a2b; }
.exit-pill:hover { background:#fff8e7; }
.room-info { position:absolute; z-index:5; top:clamp(125px,17vh,185px); left:clamp(24px,4.5vw,80px); width:min(440px,calc(100% - 48px)); max-height:55%; overflow:auto; padding:26px 28px; background:#17291eea; border:1px solid #d2c69a66; border-radius:10px; box-shadow:0 12px 35px #0005; backdrop-filter:blur(18px); color:#fff5dd; }
.room-info[hidden] { display:none; }
.room-info h3 { margin:0 25px 12px 0; font:26px/1.2 Georgia,serif; }
.room-info p { margin:0; font:15px/1.7 Georgia,serif; }
.info-close { position:absolute; right:10px; top:8px; padding:3px 10px; color:inherit; font:24px Georgia,serif; }
@media(max-width:580px) {
 .entrance { min-width:44px; min-height:44px; }
 .room-heading { top:22px; left:22px; }
 .room-heading h2 { font-size:31px; }
 .room-pills { gap:8px; left:18px; right:18px; bottom:22px; }
 .room-pill { padding:9px 17px; font-size:12px; }
 .room-info { top:136px; left:20px; width:calc(100% - 40px); max-height:calc(100% - 310px); padding:22px; }
}

/* The face is outside, registered to the small opening inside the recess. */
.wizard-window { position:absolute; overflow:hidden; clip-path:ellipse(49% 49% at 50% 50%); }
.wizard-trigger { position:absolute; inset:0; width:100%; height:100%; border:0; padding:0; border-radius:50%; background:transparent; cursor:default; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.wizard-trigger:focus-visible { outline:2px solid #ffe5a1; outline-offset:-5px; }
.wizard-visitor { position:absolute; width:125%; height:112%; top:-5%; left:-12%; opacity:0; pointer-events:none; }
.wizard-visitor img { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; filter:brightness(.90) sepia(.12); }
.wizard-blink { opacity:0; }
.revealing .wizard-visitor { opacity:1; animation:library-visitor 6.5s ease-in-out both; }
.revealing .wizard-blink { animation:library-blink 6.5s step-end both; }
/* Blink: 3.00–3.25 s. Depart left at 5.25 s, two seconds later.
   The head stays opaque and passes behind the window edge at 6.50 s. */
@keyframes library-visitor {
 0% { transform:translate(120%,0) rotate(1deg); }
 10% { transform:translate(-1%,0) rotate(-1deg); }
 25% { transform:translate(1.6%,-1%) rotate(1deg); }
 46.1538% { transform:translate(-1.4%,1%) rotate(-.8deg); }
 60% { transform:translate(1%,0) rotate(.7deg); }
 80.7692% { transform:translate(-.7%,.6%) rotate(-.5deg); }
 100% { transform:translate(-130%,0) rotate(-1deg); }
}
@keyframes library-blink {
 0%,46.1537%,50%,100% { opacity:0; }
 46.1538%,49.9999% { opacity:1; }
}
@media(prefers-reduced-motion:reduce) {
 .room-pill { transition:none; }
 .revealing .wizard-visitor { animation:none; opacity:1; }
 .revealing .wizard-blink { animation:none; }
}
/* Keep the controls registered to the landscape scene on narrow screens, too. */
.room-shell { display:flex; align-items:center; justify-content:center; }
.room-stage { height:auto; aspect-ratio:3 / 2; max-height:100%; }
@media(max-width:580px) {
 .room-heading { top:12px; left:16px; max-width:calc(100% - 32px); }
 .room-heading h2 { font-size:clamp(22px,6.5vw,31px); }
 .room-heading .eyebrow { font-size:7px; margin-bottom:3px; }
 .description-link { margin-top:4px; font-size:11px; }
 .room-pills { left:10px; right:10px; bottom:12px; gap:6px; }
 .room-pill { padding:7px 13px; min-height:36px; font-size:11px; }
 .room-info { position:fixed; top:12%; left:20px; width:calc(100% - 40px); max-height:70dvh; }
}

/* An independent, gentle one-second glow followed by four quiet seconds. */
.entrance::after {
 border-color:#ffe2a0;
 opacity:0;
 animation:door-invitation 5s ease-in-out var(--door-pulse-delay,0ms) infinite;
}
@keyframes door-invitation {
 0%,20%,100% { opacity:0; box-shadow:0 0 0 #ffd37a00; }
 10% { opacity:.75; box-shadow:0 0 10px #ffd37a90; }
}
/* Hover opens the leaf; only activating the doorway crosses the threshold. */
.entrance:is(:hover,:focus-visible,.opening) .door-light,
.entrance:is(:hover,:focus-visible,.opening) .door-leaf { opacity:1; }
.entrance:is(:hover,:focus-visible,.opening) .door-leaf { transform:rotateY(-108deg); }
.entrance:is(:hover,:focus-visible,.opening)::after {
 animation:none;
 opacity:1;
 border-color:#ffe2a0;
 box-shadow:0 0 14px #ffd37ac0;
}
.door-light { transition:opacity .25s ease; }
.entering-building { pointer-events:none; }
.plot-1 .building-asset { width:104%; left:-2%; bottom:20%; }
@media(prefers-reduced-motion:reduce) {
 .entrance::after { animation:none; opacity:.25; box-shadow:none; }
 .door-leaf,.door-light { transition:none; }
}
/* The backdrop shares the buildings' transform. Reflected halves meet at
   identical image edges, so each complete street circuit repeats seamlessly. */
.panorama { background:none; }
.scene { background:#cbd3c1; }
.street-backdrop { position:absolute; inset:0; pointer-events:none; }
.street-backdrop::before,.street-backdrop::after {
 content:'';
 position:absolute;
 top:0;
 bottom:0;
 width:50%;
 background:url('assets/shared-square.jpg') center / 100% 100% no-repeat;
}
.street-backdrop::before { left:0; }
.street-backdrop::after { right:0; transform:scaleX(-1); }

/* Building labels sit immediately below their own illustrated doorway. */
.door { gap:0; padding:0; }
.door-pin { display:none; }
.plot-5 .building-asset { width:106%; left:-3%; bottom:24%; }
/* Only decoded images from the current entry can become visible. */
#room-preview { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; }
#room-image[hidden],#room-preview[hidden],#room-load-status[hidden] { display:none; }
.room-load-status { position:absolute; z-index:2; top:45%; left:15%; right:15%; margin:0; text-align:center; color:#f6edda; font:15px/1.6 Georgia,serif; }
.room-art.loading .wizard-window { visibility:hidden; }

.plot-7 .building-asset { width:106%; left:-3%; bottom:24%; }
.plot-8 .building-asset { width:106%; left:-3%; bottom:21%; }

/* Georgia Bold identity: path-based SVGs keep the approved face on every device. */
.brand { color:#233f35; gap:13px; }
.brand-mark { display:block; width:48px; height:48px; flex:none; }
.brand-wordmark { display:block; width:200px; height:40px; object-fit:contain; }
.brand-sub { margin-top:3px; }
@media(max-width:580px) {
 .brand { gap:9px; }
 .brand-mark { width:40px; height:40px; }
 .brand-wordmark { width:158px; height:32px; }
 .brand-sub { font-size:7px; }
}

/* Compact, equal-width boards; the rivet never crowds the label or arrow tip. */
.directory .signs-row,
.directory .signs-row:nth-child(even),
.directory .signs-row.points-left,
.directory .signs-row.points-left:nth-child(even) {
 padding:0 30px 0 34px;
 gap:12px;
 white-space:nowrap;
}
.directory .sign-label { flex:none; }
.directory .sign-arrow { flex:0 0 14px; text-align:center; }
.directory .signs-row::before { left:20px; }
.directory .post { width:218px; left:50%; transform:translateX(-50%); }

/* Broad edge targets reveal quiet arrows without covering titles or pills. */
.room-step {
 position:absolute;
 z-index:4;
 top:30%;
 bottom:24%;
 width:clamp(64px,8vw,120px);
 padding:0;
 display:grid;
 place-items:center;
 color:#fff7df;
}
.room-step-prev { left:0; }
.room-step-next { right:0; }
.room-step span {
 display:grid;
 place-items:center;
 width:48px;
 height:48px;
 border:1px solid #f1e8cf99;
 border-radius:50%;
 background:#233f35ba;
 font:28px Georgia,serif;
 opacity:0;
 transition:opacity .2s ease;
}
.room-step:hover span,.room-step:focus-visible span { opacity:1; }
.room-step:focus-visible { outline-offset:-6px; }
.building-asset,.painted-facade { pointer-events:auto; }
.entrance.doorway-hint::after {
 border-color:#ffe7a3;
 animation:doorway-click-hint 1.2s ease-in-out both;
}
@keyframes doorway-click-hint {
 0%,100% { opacity:.2; box-shadow:0 0 3px #ffd37a40; }
 45% { opacity:1; box-shadow:0 0 10px 3px #ffe7a3,0 0 28px 6px #ffd37ab0; }
}
@media(hover:none),(pointer:coarse) {
 .room-step span { opacity:.8; width:40px; height:40px; font-size:24px; }
}
@media(prefers-reduced-motion:reduce) {
 .room-step span { transition:none; }
 .entrance.doorway-hint::after {
  animation:none;
  opacity:1;
  box-shadow:0 0 14px #ffd37ac0;
 }
}

/* v0.24: Site Directory as an outlined button, like Signpost. */
#map-toggle{border:1px solid #b8beae;border-radius:3px;padding:8px 16px;font-size:12px;background:transparent;white-space:nowrap}
#map-toggle:hover{border-color:var(--green)}
#map-toggle span{margin-left:12px}
@media(max-width:580px){#map-toggle{padding:7px 10px;font-size:11px}#map-toggle span{margin-left:8px}}
/* v0.24: caption above the room pills, shown on hover or keyboard focus.
   The paragraph takes a full row of its own; the box is the span inside. */
.pill-caption{flex:0 0 100%;order:-1;margin:0 0 4px;text-align:center;pointer-events:none}
.pill-caption span{display:inline-block;max-width:min(620px,100%);padding:10px 18px;border-radius:10px;background:#17291ee0;border:1px solid #d2c69a55;color:#fff5dd;font:14px/1.55 Georgia,serif;box-shadow:0 8px 24px #0005;backdrop-filter:blur(12px);opacity:0;visibility:hidden;transform:translateY(4px);transition:opacity .18s,transform .18s,visibility .18s}
.pill-caption.visible span{opacity:1;visibility:visible;transform:none}
@media(max-width:580px){.pill-caption span{font-size:12px;padding:8px 12px}}
@media(prefers-reduced-motion:reduce){.pill-caption span{transition:none;transform:none}}
.external-mark{margin-left:.35em}

/* v0.25: immersive portrait rooms. Desktop retains the complete painting. */
@media (max-width:700px) and (orientation:portrait) {
  .room-stage { height:100%; aspect-ratio:auto; max-height:none; }
  #room-image, #room-preview { object-fit:cover; object-position:var(--room-focal-x,50%) 50%; }
  .room-heading { top:max(20px,env(safe-area-inset-top)); }
  .room-pills { bottom:max(20px,env(safe-area-inset-bottom)); }
  .room-step { top:30%; bottom:30%; width:48px; }
  .engineering-surfaces { display:none; }
}
.engineering-surfaces { position:absolute; inset:0; pointer-events:none; container-type:inline-size; }
.chalk-words { position:absolute; white-space:pre-line; color:#eee8d6; font:italic 2.0cqw/1.5 Georgia,serif; text-shadow:0 0 1px #fff8; transform-origin:top left; }
.drawer-label { position:absolute; display:flex; align-items:center; justify-content:center; padding:0; color:#30261a; font:600 .85cqw/1.1 Georgia,serif; text-align:center; pointer-events:auto; transform-origin:top left; }
.drawer-label:hover { color:#000; text-decoration:underline; }
.drawer-label:focus-visible { outline:2px solid #fff0b2; outline-offset:2px; }
@media (max-width:700px) and (orientation:portrait) { .engineering-surfaces { display:none; } }

/* Registered to the four plates and the clean board in engineering v25. */
.chalk-words { left:85.3%; top:24.5%; width:13%; transform:skewY(-6deg); }
.drawer-label { left:18.1%; width:10.5%; height:2.7%; transform:skewY(-4deg); }
.drawer-label-0 { top:65.4%; }
.drawer-label-1 { top:70.2%; }
.drawer-label-2 { top:75.0%; }
.drawer-label-3 { top:79.9%; }

.chalk-words { left:86.5%; font-size:1.8cqw; line-height:1.6; }

.engineering-surfaces { right:auto; bottom:auto; }
.room-art.loading .engineering-surfaces { visibility:hidden; }

/* v0.26: a visitor already at the window when the room is first revealed. */
.wizard-window { z-index:2; }
.entry-waiting { background:#414247; }
.entry-waiting::before {
  content:''; position:absolute; inset:-8%; pointer-events:none;
  background:radial-gradient(ellipse at 54% 24%,#77736e 0%,#515158 28%,#34383d 68%);
  filter:blur(5px);
}
.entry-glimpse .wizard-visitor {
  opacity:1; animation:library-entry-exit 1.1s linear both;
}
.entry-glimpse .wizard-blink {
  animation:library-entry-blink 1.1s step-end both;
}
/* Blink 0–150ms, eyes open for 500ms, brisk leftward departure 650–1100ms. */
@keyframes library-entry-exit {
  0%,59.0909% { transform:translate(0,0); }
  100% { transform:translate(-130%,0); }
}
@keyframes library-entry-blink {
  0% { opacity:1; }
  13.6364%,100% { opacity:0; }
}
@media(prefers-reduced-motion:reduce) {
  .entry-glimpse .wizard-visitor { animation:none; transform:none; }
  .entry-glimpse .wizard-blink { animation:none; opacity:0; }
}


/* v0.27: lettering that belongs to its surface. Fonts are self-hosted (SIL Open Font License; see assets/fonts). */
@font-face { font-family:'Caveat'; src:url('assets/fonts/caveat-600.woff2') format('woff2'); font-weight:600; font-display:swap; }
@font-face { font-family:'Cinzel'; src:url('assets/fonts/cinzel-600.woff2') format('woff2'); font-weight:600; font-display:swap; }
.svg-defs { position:absolute; width:0; height:0; overflow:hidden; }

/* Chalk: hand-lettered, grainy, slightly uneven; each word is a control. */
.chalk-words { display:flex; flex-direction:column; align-items:flex-start; gap:0; font:600 2.15cqw/1.38 'Caveat','Comic Sans MS',cursive; font-style:normal; color:#efece2; text-shadow:none; }
.chalk-word { all:unset; cursor:pointer; pointer-events:auto; color:#f1eee3; opacity:.9; filter:url(#chalk-texture); padding:0 .15em; border-radius:4px; transition:opacity .15s, text-shadow .15s; }
.chalk-word:nth-child(1) { transform:rotate(-1.2deg); }
.chalk-word:nth-child(2) { transform:rotate(.6deg) translateX(.3em); }
.chalk-word:nth-child(3) { transform:rotate(-.4deg) translateX(.1em); }
.chalk-word:nth-child(4) { transform:rotate(.9deg) translateX(.35em); }
.chalk-word:hover, .chalk-word:focus-visible { opacity:1; text-shadow:0 0 .35em #fffbe6aa; }
.chalk-word:focus-visible { outline:2px solid #fff0b2aa; outline-offset:2px; }

/* Brass: engraved capitals cut into the plate, with a bright lower lip. */
.drawer-label { font:600 .74cqw/1 'Cinzel',Georgia,serif; letter-spacing:.07em; color:#3b2a10d9; text-shadow:0 1px 0 #fff0b899, 0 -1px 0 #0000002e; border:0; background:none; cursor:pointer; white-space:nowrap; }
.drawer-label:hover, .drawer-label:focus-visible { color:#241805; text-decoration:none; text-shadow:0 1px 0 #fff0b8cc, 0 0 .6em #fff3c4cc; }

/* Category lists in the room's info panel. */
.room-list ul, ul.room-list { list-style:none; margin:16px 0 0; padding:0; display:grid; gap:6px; }
.room-list a { display:block; padding:10px 12px; border-radius:8px; color:#fff5dd; text-decoration:none; border:1px solid #d2c69a33; background:#ffffff08; transition:background .15s, border-color .15s; }
.room-list a:hover, .room-list a:focus-visible { background:#ffffff16; border-color:#d2c69a88; outline:none; }
.room-list-title { display:block; font:17px/1.35 Georgia,serif; }
.room-list-line { display:block; margin-top:2px; font:13.5px/1.45 Georgia,serif; color:#e9dcbcc4; }
.drawer-label-0 { font-size:.6cqw; letter-spacing:.04em; }

/* v0.29: registered to the new Engineering Lab painting (1672 x 940): the clean
   chalkboard right of the toast's smoke, and the four brass plates, which tilt more
   toward the bottom of the chest. */
.chalk-words { left:75.6%; top:28.2%; width:16%; font-size:2.45cqw; line-height:1.28; transform:skewY(-7deg); }
.drawer-label { left:10.95%; width:13.9%; height:4.1%; }
.drawer-label-0 { top:68.75%; transform:skewY(-1.2deg); }
.drawer-label-1 { top:75.35%; transform:skewY(-2.7deg); }
.drawer-label-2 { top:82.3%;  transform:skewY(-4.4deg); }
.drawer-label-3 { top:89.5%;  transform:skewY(-6.4deg); }
.drawer-label { font-size:.76cqw; }

/* v0.30: the chalkboard is a layer of chalk sketches mapped onto the painted board.
   Live sketches glow on hover or focus; teasers are faint and inert. */
.chalkboard { position:absolute; left:0; top:0; width:1000px; height:540px; transform-origin:0 0; pointer-events:none; }
.chalkboard svg { display:block; width:1000px; height:540px; overflow:visible; }
.chalkboard .ink { filter:url(#chalk-texture); }
.chalkboard .hit { fill:transparent; }
.chalk-live { pointer-events:auto; cursor:pointer; outline:none; }
.chalk-live .ink { transition:filter .15s; }
.chalk-live:hover .ink, .chalk-live:focus-visible .ink { filter:url(#chalk-texture) drop-shadow(0 0 3px #fffbe6) drop-shadow(0 0 10px #fff3c4aa); }
.chalk-live:focus-visible .hit { stroke:#fff0b2; stroke-opacity:.55; stroke-width:3; stroke-dasharray:6 6; }
.chalk-tease { opacity:.34; pointer-events:none; }

/* v0.31: stationary wooden muntins, exactly at thirds of the opening.
   The 1% inset matches the existing ellipse's 49% radii. */
.window-muntins { position:absolute; inset:1%; z-index:2; pointer-events:none; }
.window-muntin { position:absolute; display:block; box-shadow:1px 1px 2px #1c100c99; }
.window-muntin.vertical {
  top:0; bottom:0; left:calc(var(--division) * 100% / 3);
  width:2%; transform:translateX(-50%);
  background:linear-gradient(90deg,#3c2415 0%,#92603a 27%,#724422 58%,#432816 100%);
}
.window-muntin.horizontal {
  left:0; right:0; top:calc(var(--division) * 100% / 3);
  height:1.75%; transform:translateY(-50%);
  background:linear-gradient(180deg,#a06e41 0%,#7c4e2b 28%,#59331b 70%,#382113 100%);
}
/* Lower the face slightly so its visible eye sits between horizontal bars. */
.wizard-visitor { z-index:1; top:3%; }
.wizard-trigger { z-index:3; }

/* v0.32: looking around on portrait phones (drag sideways), and passages
   from a main room into a building's further rooms. */
@media (max-width:700px) and (orientation:portrait) {
  .room-art { touch-action:none; cursor:grab; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
  .room-art.looking { cursor:grabbing; }
  #room-image, #room-preview { -webkit-user-drag:none; pointer-events:none; }
  .passages { display:none; }
}
.passages { position:absolute; pointer-events:none; z-index:2; }
.room-art.loading .passages { visibility:hidden; }
.passage { position:absolute; pointer-events:auto; border-radius:14px; padding:0; transition:box-shadow .25s, background .25s; }
.passage:hover, .passage:focus-visible { background:radial-gradient(ellipse at 50% 55%, #ffe7a333, transparent 70%); box-shadow:0 0 0 1px #ffe7a366, 0 0 22px 4px #ffd37a55; outline:none; }


/* v0.34: quiet light effects over the paintings. */
.room-effects { position:absolute; pointer-events:none; z-index:1; overflow:hidden; }
.room-art.loading .room-effects { visibility:hidden; }
/* v0.41: cut-out layers over a painting (e.g. the Gallery's sign). */
.room-layers { position:absolute; pointer-events:none; z-index:1; }
.room-art.loading .room-layers { visibility:hidden; }
.room-layers img { position:absolute; display:block; user-select:none; -webkit-user-drag:none; }
.fx { position:absolute; transform-origin:50% 50%; border-radius:50%; mix-blend-mode:screen; opacity:0; will-change:opacity; }
.fx-bulb { background:radial-gradient(circle, #fff6d0 0%, #ffd36ecc 18%, #ffb34a55 42%, transparent 70%); }
.fx-candle { background:radial-gradient(circle, #ffe9a8aa 0%, #ffbf5c55 30%, #ff9a3a1f 55%, transparent 72%); }
.fx-fire { border-radius:40%; background:radial-gradient(ellipse at 50% 60%, #ffcf7acc 0%, #ff9b3a88 35%, #ff6a1a33 60%, transparent 78%); }
.fx-fire-spill { background:radial-gradient(ellipse at 50% 40%, #ffa24a66 0%, #ff8a3a22 40%, transparent 70%); }
.fx-patch { position:absolute; opacity:0; pointer-events:none; user-select:none; -webkit-user-drag:none; }
.fx-wag { transition:opacity 45ms linear; }
