/* ============== The Elbenolly Hotel ============== */
:root {
  --paper: #f3ead4;
  --ink: #1f1a14;
  --wall: #c9a86b;
  --wall-2: #b88f4f;
  --accent: #d94b3a;
  --accent-2: #2a6f6b;
  --gold: #e6b85c;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  overflow: hidden;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><circle cx='14' cy='14' r='5' fill='%23d94b3a' stroke='%231f1a14' stroke-width='2'/></svg>") 14 14, auto;
}

#cursor-trail {
  position: fixed; inset: 0; pointer-events: none; z-index: 10000;
}
.trail-dot {
  position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); opacity: 0.6;
  transform: translate(-50%, -50%);
  animation: fadeout 700ms forwards ease-out;
}
@keyframes fadeout {
  to { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
}

/* MARQUEE */
.marquee {
  position: fixed; top: 0; left: 0; right: 0; height: 28px;
  background: var(--ink); color: var(--gold);
  font-family: var(--mono); font-size: 13px; line-height: 28px;
  overflow: hidden; z-index: 50;
  border-bottom: 2px solid var(--gold);
}
.marquee-track { display: flex; gap: 0; white-space: nowrap; animation: scroll 38s linear infinite; }
.marquee-track span { padding-right: 40px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* MAIN LAYOUT */
#hotel {
  position: relative;
  height: 100vh;
  padding-top: 28px;
  padding-bottom: 32px;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0;
}

/* ELEVATOR */
.elevator {
  background: linear-gradient(180deg, #2a221b 0%, #1a1410 100%);
  color: var(--gold);
  border-right: 3px solid var(--gold);
  display: flex; flex-direction: column; align-items: center;
  padding: 16px 8px;
  font-family: var(--mono);
  z-index: 5;
}
.elevator-screen {
  width: 100%; padding: 8px;
  background: #050505;
  border: 2px inset #555;
  text-align: center;
  font-family: var(--mono);
  margin-bottom: 16px;
}
.elevator-floor-num {
  font-size: 36px; font-weight: 900; color: #ff6a3d;
  text-shadow: 0 0 8px #ff6a3d, 0 0 16px #d94b3a;
  font-family: "Courier New", monospace;
}
.elevator-floor-name { font-size: 10px; color: var(--gold); letter-spacing: 1px; }

.elevator-buttons { display: flex; flex-direction: column; gap: 6px; }
.floor-btn {
  width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--gold);
  background: #2a2018; color: var(--gold);
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  cursor: inherit;
  transition: all 180ms ease;
  box-shadow: inset 0 -2px 6px rgba(0,0,0,0.4), 0 1px 0 #000;
}
.floor-btn:hover { background: #4a3a25; color: #fff; }
.floor-btn.active {
  background: var(--gold); color: var(--ink);
  box-shadow: 0 0 12px var(--gold), inset 0 -1px 4px rgba(0,0,0,0.3);
}
.floor-btn.basement { border-color: var(--accent); color: var(--accent); }
.floor-btn.basement.active { background: var(--accent); color: #fff; box-shadow: 0 0 14px var(--accent); }
.floor-btn.hidden { display: none; }

.elevator-help {
  margin-top: auto;
  font-size: 10px; line-height: 1.5; text-align: center;
  color: var(--gold); opacity: 0.7;
}
.dim { opacity: 0.6; }
kbd {
  background: #333; color: var(--gold); padding: 1px 5px; border-radius: 3px;
  font-family: var(--mono); font-size: 10px; border: 1px solid #555;
}

/* STAGE / FLOORS */
.stage { position: relative; overflow: hidden; }
.floor {
  position: absolute; inset: 0;
  padding: 28px 36px;
  transition: opacity 500ms ease, transform 500ms cubic-bezier(.6,.0,.3,1);
  opacity: 1; transform: translateY(0);
  overflow: hidden;
}
.floor.hidden { opacity: 0; transform: translateY(-30px); pointer-events: none; }
.floor .bg { position: absolute; inset: 0; z-index: 0; }
.floor > * { position: relative; z-index: 1; }

.floor-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4.5vw, 56px);
  font-style: italic; font-weight: 500;
  margin: 0 0 4px;
  color: var(--ink);
}
.floor-title.light { color: var(--paper); text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.floor-sub {
  font-family: var(--mono); font-size: 13px;
  margin: 0 0 24px; color: var(--ink); opacity: 0.7;
}
.floor-sub.light { color: var(--paper); opacity: 0.85; }

/* ---- F1 LOBBY ---- */
.lobby-bg {
  background:
    repeating-linear-gradient(0deg, transparent 0 28px, rgba(0,0,0,0.04) 28px 30px),
    repeating-linear-gradient(90deg, var(--wall) 0 80px, var(--wall-2) 80px 81px);
}
.lobby-scene { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; height: calc(100% - 90px); }
.desk {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 200px 200px 1fr;
  gap: 28px;
  align-items: end;
  padding-top: 40px;
  border-bottom: 24px solid #6b3a1f;
  box-shadow: 0 30px 0 -8px #4a2812;
  background: linear-gradient(180deg, transparent 0 calc(100% - 80px), #8a4d29 calc(100% - 80px) 100%);
  position: relative;
}

.bell {
  width: 120px; height: 90px;
  position: relative;
  cursor: inherit;
  outline: none;
  transition: transform 80ms ease;
  margin: 0 auto 24px;
}
.bell:active { transform: translateY(2px); }
.bell:focus-visible { outline: 2px dashed var(--accent); outline-offset: 4px; }
.bell-dome {
  position: absolute; left: 10px; top: 0; width: 100px; height: 70px;
  background: radial-gradient(ellipse at 30% 25%, #fff5d4 0%, var(--gold) 50%, #8a6014 100%);
  border-radius: 50% 50% 12px 12px / 70% 70% 12px 12px;
  border: 2px solid #5a3e0a;
}
.bell-button {
  position: absolute; left: 52px; top: -8px; width: 16px; height: 18px;
  background: #5a3e0a; border-radius: 50%;
  border: 2px solid #3a2700;
}
.bell-base {
  position: absolute; left: 0; bottom: 0; width: 120px; height: 14px;
  background: #5a3e0a; border-radius: 4px;
  border: 2px solid #3a2700;
}
.bell.ring { animation: ringy 600ms ease; }
@keyframes ringy {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(6deg); }
  60% { transform: rotate(-4deg); }
  80% { transform: rotate(2deg); }
}

.receptionist {
  position: relative; width: 180px; height: 160px;
  margin: 0 auto;
}
.recep-hair {
  position: absolute; left: 20px; top: 30px; width: 140px; height: 80px;
  background: #2a1a0a; border-radius: 50% 50% 30% 30%;
  z-index: 0;
}
.recep-head {
  position: absolute; left: 30px; top: 40px; width: 120px; height: 110px;
  background: #f0c79a; border-radius: 48% 48% 42% 42%;
  border: 2px solid var(--ink);
  z-index: 1;
}
.eye { position: absolute; width: 24px; height: 14px; top: 36px; }
.eye.left { left: 22px; }
.eye.right { right: 22px; }
.eye span {
  display: block; width: 100%; height: 100%;
  background: #2a1a0a;
  border-radius: 50%;
  transform-origin: center;
  transition: transform 200ms ease;
}
.receptionist.asleep .eye span {
  height: 2px; margin-top: 6px; border-radius: 0;
}
.mouth {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 6px;
  border-radius: 0 0 30px 30px;
  background: #6a2a1a;
  transition: all 250ms ease;
}
.receptionist.awake .mouth {
  width: 36px; height: 22px;
  background: #6a2a1a;
  border-radius: 0 0 30px 30px;
}
.zzz {
  position: absolute; right: -16px; top: -8px;
  font-family: var(--serif); font-style: italic; font-size: 28px;
  color: var(--ink); opacity: 0.7;
  animation: float 3s ease-in-out infinite;
}
.receptionist.awake .zzz { opacity: 0; }
@keyframes float {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50% { transform: translateY(-10px); opacity: 0.3; }
}

.guestbook {
  background: rgba(255,255,255,0.85);
  border: 2px solid var(--ink);
  padding: 14px;
  font-family: var(--mono); font-size: 12px;
  max-height: 200px; display: flex; flex-direction: column;
}
.gb-title { font-family: var(--serif); font-style: italic; font-size: 18px; margin-bottom: 8px; }
.gb-entries { flex: 1; overflow-y: auto; margin-bottom: 8px; min-height: 60px; }
.gb-entries div { padding: 2px 0; border-bottom: 1px dotted rgba(0,0,0,0.15); }
.gb-form { display: flex; gap: 6px; }
.gb-form input {
  flex: 1; padding: 4px 6px; font-family: var(--mono); font-size: 12px;
  border: 1px solid var(--ink); background: transparent;
}
.gb-form button {
  font-family: var(--mono); font-size: 12px;
  background: var(--ink); color: var(--paper); border: none; padding: 4px 10px;
  cursor: inherit;
}
.gb-form button:hover { background: var(--accent); }
.gb-note { font-size: 10px; opacity: 0.5; margin-top: 6px; }

.recep-speech {
  position: absolute; bottom: 50px; left: 240px;
  background: var(--paper); padding: 10px 14px; border: 2px solid var(--ink);
  font-family: var(--mono); font-size: 13px;
  max-width: 340px;
  opacity: 0; transition: opacity 300ms ease;
  pointer-events: none;
}
.recep-speech.show { opacity: 1; }
.recep-speech::before {
  content: ""; position: absolute; left: -12px; bottom: 14px;
  border: 6px solid transparent; border-right-color: var(--ink);
}

/* ---- F2 AQUARIUM ---- */
.aquarium-bg {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.15) 0%, transparent 50%),
    linear-gradient(180deg, #1d4f6e 0%, #0d2a3f 60%, #061826 100%);
}
.aquarium {
  position: absolute; inset: 0; cursor: inherit;
  overflow: hidden;
}
.fishie {
  position: absolute;
  font-size: 36px;
  transition: filter 200ms ease;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.2));
}
.food {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 4px var(--gold);
  pointer-events: none;
  animation: sink 4s linear forwards;
}
@keyframes sink { to { transform: translateY(100vh); opacity: 0; } }
.aquarium-stats {
  position: absolute; bottom: 20px; left: 36px;
  font-family: var(--mono); font-size: 12px; color: var(--paper); opacity: 0.7;
  z-index: 2;
}
.bubble {
  position: absolute; bottom: 0;
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  animation: rise 8s linear forwards;
  pointer-events: none;
}
@keyframes rise {
  to { transform: translateY(-100vh) translateX(var(--drift, 20px)); opacity: 0; }
}

/* ---- F3 LIBRARY ---- */
.library-bg {
  background:
    repeating-linear-gradient(90deg, #5a3a1a 0 8px, #4a2a10 8px 10px),
    #3a2210;
}
.shelves {
  display: grid;
  grid-template-rows: 1fr 1fr 1fr;
  gap: 18px;
  height: calc(100% - 90px);
  padding: 8px;
}
.shelf {
  display: flex; gap: 4px; align-items: flex-end;
  background: linear-gradient(180deg, transparent 0 calc(100% - 16px), #6a4220 calc(100% - 16px) 100%);
  padding: 0 8px 18px;
  border-bottom: 4px solid #2a1808;
}
.book {
  flex: 0 0 auto;
  width: 28px; cursor: inherit;
  border-radius: 1px 1px 0 0;
  position: relative;
  transition: transform 180ms ease, margin-bottom 180ms ease;
  border-top: 2px solid rgba(0,0,0,0.3);
  border-left: 1px solid rgba(0,0,0,0.2);
  border-right: 1px solid rgba(0,0,0,0.2);
  font-family: var(--mono); font-size: 9px; color: rgba(255,255,255,0.7);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  padding: 8px 0;
  overflow: hidden;
}
.book:hover { transform: translateY(-6px); margin-bottom: 4px; }
.book-card {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  width: min(560px, 90%);
  background: var(--paper); padding: 18px 22px;
  border: 2px solid var(--ink);
  font-family: var(--serif);
  opacity: 0; pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 5;
}
.book-card.show { opacity: 1; }
.book-card .bc-title { font-size: 22px; font-style: italic; margin-bottom: 4px; }
.book-card .bc-author { font-family: var(--mono); font-size: 11px; opacity: 0.7; margin-bottom: 10px; }
.book-card .bc-sum { font-size: 14px; line-height: 1.5; }

/* ---- F4 SKY ROOM ---- */
.sky-bg {
  background: linear-gradient(180deg, #87a7c8 0%, #f0bfa3 70%, #e88a6a 100%);
}
.sky { position: absolute; inset: 0; overflow: hidden; }
.cloud {
  position: absolute;
  background: rgba(255,255,255,0.85);
  border-radius: 40px;
  padding: 14px 22px;
  font-family: var(--serif); font-style: italic; font-size: 18px;
  color: var(--ink);
  cursor: grab;
  user-select: none;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1), inset 0 2px 0 rgba(255,255,255,0.9);
  transition: transform 200ms ease;
}
.cloud:active { cursor: grabbing; transform: scale(1.05); }
.cloud::before, .cloud::after {
  content: ""; position: absolute;
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
}
.cloud::before { width: 30px; height: 30px; top: -10px; left: 20%; }
.cloud::after  { width: 24px; height: 24px; top: -8px; right: 25%; }

/* ---- F5 PHONE ---- */
.phone-bg {
  background:
    radial-gradient(ellipse at 60% 70%, rgba(0,0,0,0.2) 0%, transparent 70%),
    #6b3a1f;
}
.phone-wrap {
  display: grid; grid-template-columns: 360px 1fr; gap: 40px;
  align-items: center; height: calc(100% - 90px);
  padding: 0 20px;
}
.rotary {
  width: 320px; height: 320px;
  background: radial-gradient(circle at 50% 50%, #2a2a2a 0%, #0a0a0a 100%);
  border-radius: 50%;
  position: relative;
  border: 6px solid #1a1a1a;
  box-shadow: 0 12px 30px rgba(0,0,0,0.5), inset 0 4px 12px rgba(255,255,255,0.05);
}
.rotary-disc {
  position: absolute; inset: 16px;
  border-radius: 50%;
  transition: transform 600ms cubic-bezier(.5,.05,.3,1);
}
.rotary-center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 80px; height: 80px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #c0c0c0 0%, #707070 100%);
  border: 3px solid #1a1a1a;
  pointer-events: none;
}
.finger-stop {
  position: absolute; right: 16px; top: 50%;
  width: 22px; height: 22px;
  background: var(--gold); border-radius: 50%;
  border: 2px solid #5a3e0a;
  transform: translateY(-50%) rotate(-20deg);
  transform-origin: -135px 0;
}
.num {
  position: absolute; left: 50%; top: 50%;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid var(--paper);
  color: var(--paper);
  font-family: var(--mono); font-size: 20px; font-weight: 700;
  cursor: inherit;
  transform-origin: 22px 22px;
  transform: rotate(calc((var(--i) * 30deg) - 105deg)) translate(120px) rotate(calc(105deg - (var(--i) * 30deg)));
  transition: background 150ms ease;
}
.num:hover { background: rgba(255,255,255,0.15); }
.phone-display {
  background: var(--paper); padding: 24px;
  border: 2px solid var(--ink);
  font-family: var(--mono);
  min-height: 220px;
  display: flex; flex-direction: column;
}
.dialed {
  font-size: 32px; letter-spacing: 12px; margin-bottom: 14px;
  text-align: center;
  color: var(--accent);
}
.voicemail {
  flex: 1; font-family: var(--serif); font-size: 16px; line-height: 1.6;
  white-space: pre-wrap;
}
.hangup {
  margin-top: 12px; align-self: flex-start;
  background: var(--accent); color: var(--paper); border: none;
  padding: 6px 12px; font-family: var(--mono); cursor: inherit;
}
.hangup:hover { background: #b03a2a; }

/* ---- F6 KITCHEN ---- */
.kitchen-bg {
  background:
    repeating-linear-gradient(0deg, transparent 0 40px, rgba(0,0,0,0.05) 40px 41px),
    repeating-linear-gradient(90deg, transparent 0 40px, rgba(0,0,0,0.05) 40px 41px),
    #d8e8d0;
}
.kitchen {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  padding-top: 20px;
}
.cook-btn {
  background: var(--accent); color: var(--paper);
  font-family: var(--mono); font-size: 18px; font-weight: 700;
  padding: 14px 36px; border: 3px solid var(--ink);
  cursor: inherit;
  box-shadow: 6px 6px 0 var(--ink);
  transition: all 100ms ease;
  letter-spacing: 1px;
}
.cook-btn:hover { background: #ec6b58; }
.cook-btn:active { box-shadow: 2px 2px 0 var(--ink); transform: translate(4px, 4px); }
.recipe-card {
  background: var(--paper); padding: 24px 32px;
  border: 2px dashed var(--ink);
  font-family: var(--serif);
  min-width: 400px; max-width: 600px;
  text-align: center;
}
.rc-name { font-size: 28px; font-style: italic; margin-bottom: 10px; }
.rc-ing { font-family: var(--mono); font-size: 13px; line-height: 1.8; text-align: left; }
.rc-ing li { list-style: "·  "; }
.rc-method { margin-top: 12px; font-size: 14px; font-style: italic; opacity: 0.8; }

/* ---- F7 ROOF ---- */
.roof-bg {
  background:
    radial-gradient(ellipse at 50% 100%, #2a1845 0%, transparent 60%),
    linear-gradient(180deg, #0a0820 0%, #1a0f3a 100%);
}
.roof { position: absolute; inset: 0; overflow: hidden; }
.star {
  position: absolute; width: 4px; height: 4px;
  background: var(--paper); border-radius: 50%;
  cursor: inherit;
  box-shadow: 0 0 4px var(--paper), 0 0 8px rgba(255,255,255,0.5);
  animation: twinkle var(--dur, 3s) ease-in-out infinite;
}
.star.big { width: 6px; height: 6px; box-shadow: 0 0 6px #fff, 0 0 14px var(--gold); }
.star:hover { transform: scale(2); }
@keyframes twinkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.fortune {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,0.5); border: 1px solid var(--gold);
  color: var(--paper); padding: 16px 24px;
  font-family: var(--serif); font-style: italic; font-size: 18px;
  max-width: 600px; text-align: center;
  opacity: 0; transition: opacity 300ms ease;
  backdrop-filter: blur(6px);
  z-index: 3;
}
.fortune.show { opacity: 1; }

/* ---- BASEMENT ---- */
.basement-bg {
  background:
    radial-gradient(circle at 50% 60%, rgba(217,75,58,0.15) 0%, transparent 50%),
    #0a0806;
}
.basement {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  padding-top: 30px;
  color: var(--paper);
}
.boiler {
  width: 160px; height: 220px;
  background:
    radial-gradient(circle at 30% 30%, #555 0%, #222 60%, #0a0a0a 100%);
  border-radius: 12px;
  border: 3px solid #1a1a1a;
  position: relative;
  box-shadow: inset 0 0 30px rgba(0,0,0,0.6), 0 0 30px rgba(217,75,58,0.2);
}
.boiler::before {
  content: ""; position: absolute; left: 50%; top: 30%;
  transform: translate(-50%, -50%);
  width: 60px; height: 60px; border-radius: 50%;
  background: radial-gradient(circle, #ff6a3d 0%, #d94b3a 60%, #5a1a10 100%);
  box-shadow: 0 0 30px var(--accent);
  animation: flicker 1.5s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(0.95); }
}
.boiler::after {
  content: ""; position: absolute; left: 30px; bottom: 20px;
  width: 14px; height: 14px; background: var(--accent);
  border-radius: 50%; box-shadow: 0 0 6px var(--accent);
}
.bsmt-text {
  font-family: var(--serif); font-style: italic; font-size: 22px;
  max-width: 560px; text-align: center;
  min-height: 80px;
  text-shadow: 0 0 10px rgba(217,75,58,0.4);
}

/* FOOTNOTE */
.footnote {
  position: fixed; bottom: 0; left: 0; right: 0; height: 32px;
  background: var(--ink); color: var(--gold);
  font-family: var(--mono); font-size: 11px;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  z-index: 40;
  border-top: 2px solid var(--gold);
}
.footnote .dot { opacity: 0.4; }

/* SMALL SCREENS */
@media (max-width: 700px) {
  #hotel { grid-template-columns: 80px 1fr; }
  .elevator { padding: 12px 4px; }
  .floor-btn { width: 40px; height: 40px; font-size: 14px; }
  .elevator-floor-num { font-size: 24px; }
  .floor { padding: 18px 16px; }
  .lobby-scene { grid-template-columns: 1fr; }
  .desk { grid-template-columns: 1fr; gap: 16px; }
  .phone-wrap { grid-template-columns: 1fr; gap: 16px; padding: 0; }
  .rotary { width: 240px; height: 240px; margin: 0 auto; }
  .num { transform: rotate(calc((var(--i) * 30deg) - 105deg)) translate(90px) rotate(calc(105deg - (var(--i) * 30deg))); }
  .recipe-card { min-width: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
