html.haunt-on #hero-content { pointer-events: none !important; }
html.haunt-on #hero-content form,
html.haunt-on #hero-content .hero-links { pointer-events: auto; }
html.haunt-on #guide-shelf { display: none; }
html.haunt-on body[data-page="home"] .site-header .guide-mark { display: inline-flex; }
.haunt-layer { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.haunt-light { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.haunt-machine {
  position: absolute; display: block; translate: -50% -50%; z-index: 2;
  color: var(--clan-sand); text-decoration: none; pointer-events: auto;
  border-radius: 12px; -webkit-tap-highlight-color: transparent;
}
.haunt-machine::after {
  content: ""; position: absolute; inset: -4px; border: 1px solid transparent;
  border-radius: inherit; transition: border-color .24s ease-out;
}
.haunt-machine:hover::after { border-color: color-mix(in srgb, var(--clan-gold) 55%, transparent); }
.haunt-machine:focus-visible { outline: 2px solid var(--clan-gold); outline-offset: 7px; }
.haunt-machine[hidden] { display: none; }
.haunt-label {
  position: absolute; top: calc(100% + 16px); right: 0; display: grid; gap: 4px;
  min-width: 194px; padding: 12px 15px; text-align: right;
  color: var(--clan-sand); background: color-mix(in srgb, var(--clan-black) 94%, transparent);
  border: 1px solid var(--line); border-radius: 8px;
  transition: color .2s ease-out, translate .2s ease-out;
}
.haunt-label::before { content: ""; position: absolute; right: 24px; bottom: 100%; height: 17px; width: 1px; background: var(--clan-bronze); }
.haunt-label b { font-family: "Yeseva One", Georgia, serif; font-size: 19px; font-weight: 400; line-height: 1.1; }
.haunt-label span { color: var(--clan-gold); font-size: 12px; line-height: 1.5; }
.haunt-machine:hover .haunt-label { translate: 0 -3px; }
.haunt-tools {
  position: absolute; top: 88px; left: max(24px, calc((100vw - 1180px) / 2 + 24px));
  z-index: 8; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: calc(100% - 48px);
}
.haunt-tools .haunt-look, .haunt-mobile {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 10px 14px; color: var(--clan-sand);
  font: 13px/1.3 "Golos Text", sans-serif; cursor: pointer; text-decoration: none;
  background: color-mix(in srgb, var(--clan-black) 94%, transparent);
  border: 1px solid var(--line); border-radius: 8px;
  transition: border-color .2s ease-out, color .2s ease-out;
}
.haunt-tools svg { width: 18px; height: 18px; stroke: var(--clan-gold); fill: none; stroke-width: 1.5; flex: none; }
.haunt-tools .haunt-look:hover, .haunt-mobile:hover { color: var(--clan-gold); border-color: var(--clan-gold); }
.haunt-mobile[hidden] { display: none; }
.haunt-portal { position: fixed; inset: 0; z-index: 250; width: 100%; height: 100%; pointer-events: none; }
.haunt-status { position: fixed; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.haunt-room {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; color: var(--clan-sand); background: var(--clan-black); border: 0;
}
.haunt-room::backdrop { background: var(--clan-black); }
.haunt-room[open] { display: flex; flex-direction: column; }
.haunt-room-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px 24px 14px; border-bottom: 1px solid var(--line); flex: none;
}
.haunt-room h2 { margin: 0 0 5px; font: 400 clamp(21px, 2.8vw, 31px)/1.2 "Yeseva One", Georgia, serif; }
.haunt-room-head p { margin: 0; color: var(--clan-sand); font-size: 13px; line-height: 1.5; }
.haunt-room-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.haunt-room button { cursor: pointer; }
.haunt-room-actions .button { min-height: 44px; white-space: nowrap; }
.haunt-room-viewport { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-color: var(--clan-bronze) var(--clan-black); }
.haunt-room-picture { position: relative; width: 100%; min-width: 100%; margin: auto; }
.haunt-room-picture img { width: 100%; max-width: none; height: auto; display: block; }
.haunt-room-viewport:not(.is-zoomed) { display: grid; align-items: center; }
.haunt-room-viewport.is-zoomed .haunt-room-picture { width: max(1800px, 160%); }
.haunt-secret { position: absolute; translate: -50% -50%; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid transparent; background: transparent; border-radius: 50%; }
.haunt-secret:hover, .haunt-secret:focus-visible, .haunt-secret.is-found, .haunt-secret.is-hint {
  border-color: var(--clan-gold); background: color-mix(in srgb, var(--clan-gold) 12%, transparent);
}
.haunt-secret:focus-visible { outline: 2px solid var(--clan-gold); outline-offset: 3px; }
.haunt-secret.is-found::after { content: ""; position: absolute; top: 8%; right: 8%; width: 6px; height: 6px; border-radius: 50%; background: var(--clan-gold); }
.haunt-room-foot { padding: 14px 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px; flex: none; }
.haunt-room-foot p { margin: 0; font-size: 14px; line-height: 1.5; max-width: 70ch; }
.haunt-room-count { color: var(--clan-gold); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .haunt-tools { top: 84px; left: 16px; right: 16px; max-width: none; }
  .haunt-tools .haunt-look, .haunt-mobile { font-size: 12px; padding-inline: 10px; }
  .haunt-label { min-width: 170px; padding: 10px 12px; }
  .haunt-label b { font-size: 17px; }
  .haunt-room-head { padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
  .haunt-room-actions { justify-content: flex-start; }
  .haunt-room-actions .button { min-height: 42px; font-size: 12px; padding-inline: 10px; }
  .haunt-room-foot { padding: 12px 16px; gap: 10px; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html.haunt-on .paintfx { overflow: clip; }
  .haunt-machine::after, .haunt-label, .haunt-tools .haunt-look, .haunt-mobile { transition: none; }
  .haunt-machine:hover .haunt-label { translate: none; }
}
@media (max-width: 900px), (max-height: 520px) {
  #s-hero .haunt-tools {
    position: relative; inset: auto; order: 1; max-width: none;
    padding: 16px 16px 0; opacity: 1 !important;
  }
  #s-hero .haunt-tools .haunt-look, #s-hero .haunt-mobile {
    flex: 1 1 160px; min-height: 44px;
  }
  #s-hero .haunt-label { display: none; }
  #s-hero .haunt-machine { min-width: 44px; min-height: 44px; }
}
