@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=DM+Sans:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;
  --ink: #f5efe4;
  --muted: #bdc7cb;
  --gold: #e3bd76;
  --panel: #17252a;
  --panel-deep: #101a1e;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #0b1215;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 50% -15%, #304b53 0, transparent 52%);
  content: "";
}

.game-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 4vw, 4rem) 1.5rem;
}

.game-header,
.game-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.game-header {
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 0.95;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
}

.instruction {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.map-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1376 / 768;
  border: 1px solid rgba(226, 215, 189, 0.3);
  border-radius: 0.4rem;
  box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.35), 0 0 0 0.5rem rgba(226, 215, 189, 0.04);
  isolation: isolate;
}

.map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.map-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(4, 13, 17, 0.18), transparent 22%, transparent 78%, rgba(4, 13, 17, 0.18)),
    linear-gradient(0deg, rgba(4, 13, 17, 0.2), transparent 27%);
}

.hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.hotspot {
  position: absolute;
  display: grid;
  width: 8rem;
  height: 8rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  background: transparent;
  transform: translate(-50%, -50%);
}

.hotspot--pub { left: 45%; top: 50%; }
.hotspot--greenhouse { left: 31%; top: 80%; }
.hotspot--sauna { left: 71%; top: 67%; }
.hotspot--guest-house { left: 45%; top: 67%; }

.hotspot-ring,
.hotspot-dot {
  position: absolute;
  border-radius: 50%;
}

.hotspot-ring {
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(255, 226, 157, 0.8);
  background: rgba(227, 189, 118, 0.16);
  box-shadow: 0 0 1.2rem rgba(227, 189, 118, 0.4);
  animation: breathe 2.2s ease-in-out infinite;
}

.hotspot-dot {
  width: 0.65rem;
  height: 0.65rem;
  background: #f8d58c;
  box-shadow: 0 0 0 0.3rem rgba(248, 213, 140, 0.25), 0 0 1rem #f8d58c;
}

.hotspot-label {
  position: absolute;
  top: auto;
  bottom: calc(50% + 2.5rem);
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(255, 236, 195, 0.28);
  border-radius: 2rem;
  background: rgba(13, 27, 32, 0.78);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0.86;
  transform: translateY(0.25rem);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.hotspot:hover .hotspot-label,
.hotspot:focus-visible .hotspot-label {
  background: rgba(28, 47, 51, 0.95);
  opacity: 1;
  transform: translateY(0);
}

.hotspot:hover .hotspot-ring,
.hotspot:focus-visible .hotspot-ring {
  animation-duration: 0.9s;
}

.hotspot:focus-visible {
  outline: 2px solid white;
  outline-offset: 0.2rem;
}

@keyframes breathe {
  0%, 100% { opacity: 0.48; transform: scale(0.88); }
  50% { opacity: 1; transform: scale(1.16); }
}

.game-footer {
  justify-content: flex-start;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #b3e6c6;
  box-shadow: 0 0 0.7rem #b3e6c6;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(3, 10, 12, 0.76);
  backdrop-filter: blur(0.4rem);
}

.modal-backdrop[hidden] {
  display: none;
}

.place-dialog {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  width: min(850px, 100%);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  border: 1px solid rgba(227, 189, 118, 0.4);
  border-radius: 0.5rem;
  background: var(--panel);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.5);
}

.dialog-image-wrap {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1376 / 768;
  background: #0d1b20;
}

.dialog-hotspot {
  position: absolute;
  top: 53%;
  left: 46%;
  display: grid;
  width: 7rem;
  height: 7rem;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  background: transparent;
  transform: translate(-50%, -50%);
}

.dialog-hotspot[hidden] {
  display: none;
}

.dialog-hotspot .hotspot-label {
  bottom: calc(50% + 2.5rem);
}

.dialog-hotspot:focus-visible {
  outline: 2px solid white;
  outline-offset: 0.2rem;
}

.dialog-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dialog-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 5vw, 3rem);
  background: linear-gradient(145deg, var(--panel), var(--panel-deep));
}

.dialog-content h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.dialog-content p:not(.eyebrow) {
  min-height: 4.5rem;
  margin: 0 0 1.7rem;
  color: var(--muted);
  line-height: 1.65;
}

.close-button {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 1;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  background: rgba(13, 27, 32, 0.7);
}

.continue-button {
  align-self: flex-start;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(227, 189, 118, 0.7);
  border-radius: 2rem;
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
}

.continue-button:hover,
.continue-button:focus-visible,
.close-button:hover,
.close-button:focus-visible {
  background: rgba(227, 189, 118, 0.17);
}

@media (max-width: 650px) {
  .game-header {
    display: block;
  }

  .instruction {
    margin-top: 0.8rem;
  }

  .hotspot {
    width: 5.5rem;
    height: 5.5rem;
  }

  .hotspot-label {
    bottom: calc(50% + 1.9rem);
    font-size: 0.65rem;
  }

  .hotspot-ring {
    width: 2.2rem;
    height: 2.2rem;
  }

  .dialog-image-wrap {
    max-height: none;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  .game-shell {
    padding: 0.75rem clamp(1.25rem, 8vw, 4rem);
  }

  .game-header {
    align-items: center;
    margin-bottom: 0.6rem;
  }

  .game-header .eyebrow {
    display: none;
  }

  h1 {
    font-size: clamp(1.35rem, 5vh, 2.5rem);
  }

  .instruction {
    margin: 0;
    font-size: 0.75rem;
  }

  .map-frame {
    width: min(84vw, 140vh);
    max-width: 100%;
    height: auto;
    margin: 0 auto;
  }

  .map-image {
    width: 100%;
    height: auto;
  }

  .place-dialog {
    width: min(84vw, 110vh);
    max-height: calc(100svh - 1rem);
  }

  .dialog-content {
    padding: clamp(0.8rem, 3vh, 1.5rem) clamp(1rem, 3vw, 2rem);
  }

  .dialog-content h2 {
    margin-bottom: 0.45rem;
    font-size: clamp(1.8rem, 5vh, 2.8rem);
  }

  .dialog-content p:not(.eyebrow) {
    min-height: 0;
    margin-bottom: 0.8rem;
    font-size: clamp(0.75rem, 2.1vh, 0.95rem);
    line-height: 1.4;
  }

  .dialog-content .eyebrow {
    margin-bottom: 0.2rem;
    font-size: clamp(0.55rem, 1.6vh, 0.72rem);
  }

  .continue-button {
    padding: 0.5rem 0.8rem;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
