:root {
  --color-brand: #120c3c;
  --color-pin: #d40000;
  --color-paper: #f7f4ee;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", "P052", Georgia, serif;
  color-scheme: light;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}
body {
  background: #e9e6df;
  color: var(--color-brand);
  font-family: var(--font-body);
}
#visitCanvas {
  display: block;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  touch-action: none;
  outline: none;
}
[hidden] {
  display: none !important;
}
.visit-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgb(40 34 60 / 0.28) 100%);
}
.visit-crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.85);
  box-shadow: 0 0 0 1px rgb(18 12 60 / 0.35);
  pointer-events: none;
}
.visit-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  pointer-events: none;
}
.visit-back,
.visit-place {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem 0.35rem 0.4rem;
  border-radius: 999px;
  background: rgb(247 244 238 / 0.85);
  backdrop-filter: blur(6px);
  color: var(--color-brand);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 10px rgb(18 12 60 / 0.15);
}
.visit-place {
  padding-left: 0.85rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.visit-start {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(30rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  padding: 2rem;
  border-radius: 0.75rem;
  background: rgb(247 244 238 / 0.94);
  backdrop-filter: blur(10px);
  text-align: center;
  box-shadow: 0 20px 60px -10px rgb(18 12 60 / 0.45);
  transform: translate(-50%, -50%);
}
.visit-start img {
  margin: 0 auto 0.5rem;
}
.visit-start h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
}
.visit-start h1::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin: 0.5rem auto 0;
  background: var(--color-pin);
}
.visit-enter {
  margin: 1rem 0;
  padding: 0.8rem 1.6rem;
  border: 0;
  border-radius: 0.375rem;
  background: var(--color-brand);
  color: #fff;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
}
.visit-enter:focus-visible,
.visit-back:focus-visible,
.visit-info a:focus-visible {
  outline: 3px solid #1a5fb4;
  outline-offset: 2px;
}
.visit-keys {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0.5rem 0 0;
  text-align: left;
  font-size: 0.9rem;
}
.visit-keys dt {
  color: #5f5b70;
}
.visit-keys dd {
  margin: 0;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.35em;
  border: 1px solid #cfc8bb;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.85em;
  text-align: center;
}
.visit-alt {
  margin: 1rem 0 0;
  font-size: 0.9rem;
}
.visit-alt a,
.visit-unsupported a {
  color: var(--color-brand);
}
.visit-info {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  width: min(34rem, calc(100vw - 2rem));
  padding: 0.9rem 1.2rem;
  border-left: 4px solid var(--color-pin);
  border-radius: 0.5rem;
  background: rgb(247 244 238 / 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -8px rgb(18 12 60 / 0.4);
  transform: translateX(-50%);
}
.visit-info h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.2;
}
.visit-info p {
  margin: 0.25rem 0 0;
  line-height: 1.4;
}
.visit-info .visit-info-meta {
  color: #5f5b70;
  font-size: 0.95rem;
}
.visit-info .visit-info-bio {
  max-height: 9rem;
  overflow-y: auto;
  font-size: 0.95rem;
}
.visit-info a {
  color: var(--color-brand);
  font-size: 0.9rem;
}
.visit-unsupported {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(28rem, calc(100vw - 2rem));
  padding: 1.5rem;
  border-radius: 0.5rem;
  background: var(--color-paper);
  text-align: center;
  transform: translate(-50%, -50%);
}
@media (max-width: 40rem) {
  .visit-start {
    padding: 1.25rem;
  }
  .visit-info {
    bottom: 0.75rem;
  }
}
.visit-touch {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  pointer-events: none;
}
.visit-pad {
  display: grid;
  grid-template-columns: repeat(3, 2.7rem);
  grid-template-rows: repeat(3, 2.7rem);
  gap: 0.2rem;
  pointer-events: auto;
  touch-action: none;
}
.visit-pad button,
.visit-gyro {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0.9rem;
  background: rgb(247 244 238 / 0.82);
  backdrop-filter: blur(6px);
  color: var(--color-brand);
  box-shadow: 0 4px 14px rgb(18 12 60 / 0.25);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.visit-pad svg {
  width: 20px;
  height: 20px;
}
.visit-pad button:active {
  background: var(--color-brand);
  color: #fff;
}
.pad-forward { grid-area: 1 / 2; }
.pad-left { grid-area: 2 / 1; }
.pad-right { grid-area: 2 / 3; }
.pad-back { grid-area: 3 / 2; }
.visit-gyro {
  display: none;
}
.has-touch .visit-gyro {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgb(18 12 60 / 0.15);
  pointer-events: auto;
  cursor: pointer;
}
.visit-gyro svg {
  width: 18px;
  height: 18px;
}
.visit-gyro[aria-pressed="true"] {
  background: var(--color-brand);
  color: #fff;
}
.visit-pad button:focus-visible,
.visit-gyro:focus-visible {
  outline: 3px solid #1a5fb4;
  outline-offset: 2px;
}
.has-touch .visit-info {
  top: auto;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: auto;
  right: max(0.75rem, env(safe-area-inset-right));
  width: min(12.5rem, calc(100vw - 11rem));
  padding: 0.4rem 0.6rem;
  border-left-width: 3px;
  border-radius: 0.4rem;
  background: rgb(247 244 238 / 0.8);
  box-shadow: 0 4px 14px -6px rgb(18 12 60 / 0.35);
  transform: none;
}
.has-touch .visit-info h2 {
  font-size: 0.88rem;
}
.has-touch .visit-info p {
  margin-top: 0.05rem;
  font-size: 0.7rem;
  line-height: 1.25;
}
.has-touch .visit-info a {
  font-size: 0.7rem;
}
.has-touch .visit-info .visit-info-bio {
  display: none;
}
.has-touch .visit-crosshair {
  opacity: 0.6;
}
.visit-bar-end {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.visit-fullscreen {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(247 244 238 / 0.85);
  backdrop-filter: blur(6px);
  color: var(--color-brand);
  box-shadow: 0 2px 10px rgb(18 12 60 / 0.15);
  pointer-events: auto;
  cursor: pointer;
}
.visit-fullscreen .icon-exit,
.visit-fullscreen[aria-pressed="true"] .icon-enter {
  display: none;
}
.visit-fullscreen[aria-pressed="true"] .icon-exit {
  display: block;
}
.visit-fullscreen:focus-visible {
  outline: 3px solid #1a5fb4;
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 40rem) {
  .visit-back {
    font-size: 0.95rem;
  }
  .visit-place {
    font-size: 0.72rem;
    padding: 0.3rem 0.65rem;
  }
}
.visit-place {
  white-space: nowrap;
}
.visit-fullscreen,
.visit-gyro {
  flex: none;
}
@media (max-width: 25rem) {
  .visit-back-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .visit-back {
    padding-right: 0.4rem;
  }
}
