@font-face {
  font-family: "ETmodules";
  src: url("assets/modules.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

:root {
  --pink: #e80092;
  --ink: #4c4c4c;
  --line: #202020;
  --paper: rgba(255, 255, 255, 0.91);
  --pattern: url("assets/pattern.png");
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #fff; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: "Raleway", Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 500;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
.leaflet-container img,
.leaflet-pane img,
.leaflet-image-layer,
.leaflet-marker-icon,
.leaflet-marker-shadow { max-width: none !important; }
button, input { font: inherit; }
a { color: inherit; }

.screen {
  width: 100%;
  min-height: 100svh;
  position: relative;
}

.hero-screen {
  display: grid;
  place-items: center;
  background: #fff;
  overflow: hidden;
}
.hero-link {
  width: 100%;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-decoration: none;
  padding: clamp(18px, 2.6vw, 40px) 0 clamp(70px, 12vh, 160px);
}
.hero-frame {
  width: min(86vw, 1260px);
  aspect-ratio: 1472 / 832;
  background: url("assets/hero-bg.png") center / contain no-repeat;
  display: grid;
  place-items: center;
}
.hero-frame img {
  width: clamp(210px, 28vw, 500px);
  height: auto;
  max-height: 60svh;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,.16));
  transition: transform .5s ease, filter .5s ease;
}
.hero-link:hover .hero-frame img,
.hero-link:focus-visible .hero-frame img {
  transform: scale(1.025);
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.2));
}

.intro-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: calc(54px + var(--safe-top)) max(22px, var(--safe-right)) calc(54px + var(--safe-bottom)) max(22px, var(--safe-left));
  background: #fff;
}
.intro-card {
  position: relative;
  font-family: "Raleway", Arial, sans-serif;
  width: min(76%, 920px);
  max-width: 920px;
  background: #f5f5f5;
  padding: 56px clamp(24px, 5vw, 70px) 40px;
  box-shadow: 0 12px 18px -6px rgba(0,0,0,.3);
  text-align: center;
}
.intro-card p { margin: 0 0 18px; }
.intro-card p:last-child { margin-bottom: 0; }
.intro-card strong { font-weight: 600; font-size: 16px; line-height: 1.7; }
.magnifier {
  position: absolute;
  left: 50%;
  top: -36px;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  color: #757575;
  line-height: 1;
  background: transparent;
}
.magnifier::before {
  content: "U";
  font-family: "ETmodules";
  font-size: 60px;
  font-weight: 400;
  display: block;
}

.pill-button {
  display: inline-flex;
  font-family: "Raleway", Arial, sans-serif;
  font-weight: 500;
  align-items: center;
  justify-content: center;
  gap: .35em;
  min-height: 44px;
  padding: 8px 15px;
  border: 2px solid var(--pink);
  border-radius: 30px;
  color: var(--pink);
  background: rgba(255,255,255,0);
  text-decoration: none;
  font-size: 15px;
  line-height: 1.2;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.pill-button:hover,
.pill-button:focus-visible {
  color: #fff;
  background: var(--pink);
  transform: translateY(-1px);
  outline: none;
}
.pill-button span { font-size: 1.05em; line-height: 1; }

.map-screen {
  display: grid;
  place-items: center;
  background: #fff;
  padding: max(10px, var(--safe-top)) max(10px, var(--safe-right)) max(10px, var(--safe-bottom)) max(10px, var(--safe-left));
}
#map.leaflet-container,
#fallback-map { background: #efefef; }
.map-shell {
  position: relative;
  width: min(90vw, calc(94svh * 4132 / 2647));
  height: min(94svh, calc(90vw * 2647 / 4132));
  min-height: 250px;
  background: #fff;
  overflow: hidden;
}
#map, #fallback-map { width: 100%; height: 100%; background: #efefef; }
#map.leaflet-container { background: #efefef; }
.leaflet-image-layer { image-rendering: auto; }
.story-marker { background: transparent; border: 0; }
.story-marker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.22));
  transition: transform .2s ease, filter .2s ease;
}
.story-marker:hover img,
.story-marker:focus img {
  transform: scale(1.12);
  filter: drop-shadow(0 4px 5px rgba(0,0,0,.28));
}
.leaflet-tooltip.story-tooltip {
  color: #444;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(0,0,0,.18);
  box-shadow: 0 4px 12px rgba(0,0,0,.16);
  font-size: 13px;
  padding: 5px 8px;
}
.leaflet-tooltip.story-tooltip::before { display: none; }

.locate-button {
  position: absolute;
  z-index: 800;
  left: 18px;
  top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  border: 2px solid #5c5c5c;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: #4b4b4b;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  cursor: pointer;
}
.locate-button:hover,
.locate-button:focus-visible { background: #fff; outline: 3px solid rgba(232,0,146,.18); }
.locate-button[disabled] { opacity: .65; cursor: wait; }
.locate-symbol {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.locate-symbol::before,
.locate-symbol::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.locate-symbol::before { width: 2px; height: 22px; left: 5px; top: -5px; }
.locate-symbol::after { width: 22px; height: 2px; left: -5px; top: 5px; }
.location-message {
  position: absolute;
  z-index: 800;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  max-width: min(90%, 560px);
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: #555;
  box-shadow: 0 3px 10px rgba(0,0,0,.13);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.location-message.is-visible { opacity: 1; }
.user-location-icon {
  width: 20px;
  height: 20px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #2389da;
  box-shadow: 0 0 0 2px rgba(35,137,218,.46), 0 3px 8px rgba(0,0,0,.3);
  position: relative;
}
.user-location-icon::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid rgba(35,137,218,.38);
  border-radius: 50%;
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse { from { transform: scale(.45); opacity: .9; } to { transform: scale(1.25); opacity: 0; } }

.fallback-map-inner { position: relative; width: 100%; height: 100%; }
.fallback-map-inner > img { width: 100%; height: 100%; object-fit: contain; }
.fallback-marker {
  position: absolute;
  transform: translate(-50%,-50%);
  width: 34px;
  height: 33px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.fallback-marker img { width: 100%; height: 100%; object-fit: contain; }
.fallback-user { position: absolute; transform: translate(-50%,-50%); }

.story-section {
  width: 100%;
  min-height: 100svh;
  padding: clamp(92px, 12svh, 150px) max(22px, var(--safe-right)) max(70px, calc(70px + var(--safe-bottom))) max(22px, var(--safe-left));
  background-color: #fff;
  background-image: var(--pattern);
  background-repeat: repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5svh, 62px);
  position: relative;
  overflow: hidden;
}
.story-main {
  width: min(100%, 1120px);
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 58px);
}
.story-icon-wrap {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  justify-self: end;
  margin-top: 23px;
}
.story-icon-wrap img { max-width: 100px; max-height: 100px; width: auto; height: auto; }
.story-media { min-width: 0; }
.audio-card {
  width: 100%;
  min-height: 170px;
  padding: 24px clamp(28px, 4vw, 58px) 28px;
  border: 5px double var(--line);
  border-radius: 0 88px 0 0;
  background: rgba(255,255,255,.78);
  box-shadow: none;
  overflow: hidden;
}
.audio-card h2 {
  margin: 0 0 22px;
  font-family: "Josefin Sans", "Raleway", sans-serif;
  color: #4d4d4d;
  text-align: center;
  font-size: clamp(24px, 2.4vw, 36px);
  font-weight: 400;
  line-height: 1.15;
  font-variant: normal;
  text-transform: none;
  letter-spacing: .01em;
}
.audio-controls {
  display: grid;
  grid-template-columns: 34px minmax(80px, 1fr) auto 30px minmax(58px, 100px);
  align-items: center;
  gap: 12px;
}
.audio-play,
.audio-mute {
  border: 0;
  background: transparent;
  color: #6c6c6c;
  padding: 4px;
  cursor: pointer;
  line-height: 1;
}
.audio-play { font-size: 18px; }
.audio-mute { font-size: 22px; transform: rotate(180deg); }
.audio-play:hover,
.audio-mute:hover,
.audio-play:focus-visible,
.audio-mute:focus-visible { color: var(--pink); outline: none; }
.audio-seek,
.audio-volume {
  width: 100%;
  height: 4px;
  accent-color: #6e6e6e;
  cursor: pointer;
}
.audio-time {
  min-width: 48px;
  color: #858585;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.gallery-card {
  width: min(290px, 80%);
  margin: 36px 0 0;
  text-align: center;
}
.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: zoom-in;
  box-shadow: 0 5px 14px rgba(0,0,0,.13);
}
.gallery-open img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: top center;
  transition: transform .28s ease;
}
.gallery-open:hover img,
.gallery-open:focus-visible img { transform: scale(1.018); }
.gallery-card figcaption {
  padding-top: 8px;
  color: #666;
  font-size: 13px;
}
.credits {
  width: min(92%, 760px);
  font-family: "Raleway", Arial, sans-serif;
  font-weight: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #5d5d5d;
  text-align: center;
  font-size: clamp(14px, 1.35vw, 17px);
  line-height: 1.45;
}
.back-map { margin-top: -12px; }

.torn-divider {
  position: relative;
  height: clamp(185px, 23vw, 310px);
  margin: clamp(-58px, -5vw, -25px) 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  background-image: var(--pattern);
  background-repeat: repeat;
}
.torn-divider::before,
.torn-divider::after,
.torn-divider span {
  content: "";
  position: absolute;
  left: -1%;
  width: 102%;
  background: #3a3a3d;
}
.torn-divider::before {
  height: 64%;
  top: 13%;
  opacity: .28;
  background: rgba(120,120,120,.55);
  clip-path: polygon(0 18%, 8% 12%, 16% 16%, 25% 11%, 37% 18%, 49% 12%, 60% 20%, 72% 14%, 84% 22%, 100% 14%, 100% 82%, 87% 76%, 74% 84%, 62% 74%, 50% 82%, 37% 73%, 24% 80%, 12% 69%, 0 74%);
}
.torn-divider span {
  height: 58%;
  top: 18%;
  opacity: 1;
  clip-path: polygon(0 18%, 8% 14%, 16% 18%, 25% 13%, 37% 20%, 49% 14%, 60% 22%, 72% 16%, 84% 24%, 100% 16%, 100% 78%, 87% 74%, 74% 82%, 62% 72%, 50% 80%, 37% 71%, 24% 78%, 12% 67%, 0 72%);
}
.torn-divider::after {
  height: 66%;
  top: 23%;
  opacity: .18;
  background: rgba(120,120,120,.7);
  clip-path: polygon(0 18%, 8% 14%, 16% 18%, 25% 13%, 37% 20%, 49% 14%, 60% 22%, 72% 16%, 84% 24%, 100% 16%, 100% 78%, 87% 74%, 74% 82%, 62% 72%, 50% 80%, 37% 71%, 24% 78%, 12% 67%, 0 72%);
  transform: translateY(10px);
}

.lightbox {
  width: min(92vw, 900px);
  max-height: 92svh;
  border: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(0,0,0,.84); }
.lightbox figure { margin: 0; display: grid; place-items: center; }
.lightbox img { max-height: 82svh; width: auto; max-width: 100%; object-fit: contain; box-shadow: 0 10px 35px rgba(0,0,0,.48); }
.lightbox figcaption { color: #fff; text-align: center; padding: 10px 42px 0; }
.lightbox-close {
  position: absolute;
  right: -4px;
  top: -46px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 42px;
  cursor: pointer;
}

@media (max-width: 800px) {
  .hero-link { padding: 10px 0 36px; }
  .hero-frame { width: min(96vw, 980px); aspect-ratio: 1472 / 832; min-height: 0; background-size: contain; }
  .hero-frame img { width: min(58vw, 390px); max-height: 48svh; }
  .intro-card { width: min(100%, 720px); padding: 52px 22px 34px; }
  .intro-card p { margin-bottom: 16px; }
  .map-shell { width: 100%; height: min(92svh, calc(100vw * 2647 / 4132)); min-height: 300px; }
  .locate-button { left: 10px; top: 10px; min-height: 38px; padding: 6px 10px; font-size: 14px; }
  .story-section { padding-top: 76px; gap: 30px; justify-content: flex-start; }
  .story-main { grid-template-columns: 74px minmax(0, 1fr); gap: 14px; }
  .story-icon-wrap { width: 70px; height: 70px; margin-top: 19px; }
  .story-icon-wrap img { max-width: 68px; max-height: 68px; }
  .audio-card { min-height: 145px; padding: 20px 20px 24px; border-width: 4px; border-radius: 0 58px 0 0; }
  .audio-card h2 { margin-bottom: 18px; font-size: clamp(20px, 5vw, 27px); }
  .audio-controls { grid-template-columns: 28px minmax(70px,1fr) auto 26px 62px; gap: 7px; }
  .audio-time { min-width: 42px; font-size: 13px; }
  .gallery-card { margin-top: 24px; }
  .credits { width: 100%; font-size: 14px; }
  .torn-divider { height: 155px; margin: -35px 0; }
  .fallback-marker { width: 27px; height: 26px; }
}

@media (max-width: 560px) {
  body { font-size: 14px; }
  .intro-screen { min-height: 75svh; gap: 28px; padding-inline: 16px; }
  .intro-card { width: 100%; box-shadow: 0 9px 15px -6px rgba(0,0,0,.3); }
  .intro-card strong { font-size: 15px; line-height: 1.65; }
  .magnifier::before { font-size: 52px; }
  .map-screen { min-height: 100svh; align-items: center; }
  .map-shell { height: auto; aspect-ratio: 4132 / 2647; min-height: 0; }
  .story-section { min-height: 100svh; padding: 68px 14px 60px; }
  .story-main { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
  .story-icon-wrap { width: 62px; height: 62px; margin: 0; align-self: flex-start; margin-left: 9px; }
  .story-icon-wrap img { max-width: 60px; max-height: 60px; }
  .story-media { width: 100%; }
  .audio-card { width: 100%; min-height: 142px; padding: 18px 14px 21px; border-radius: 0 44px 0 0; }
  .audio-controls {
    grid-template-columns: 27px minmax(0,1fr) 43px 25px;
    grid-template-areas: "play seek time mute" "volume volume volume volume";
    row-gap: 13px;
  }
  .audio-play { grid-area: play; }
  .audio-seek { grid-area: seek; }
  .audio-time { grid-area: time; }
  .audio-mute { grid-area: mute; }
  .audio-volume { grid-area: volume; width: 42%; justify-self: end; }
  .gallery-card { width: min(250px, 82%); margin-inline: auto; }
  .locate-button span:last-child { display: inline; }
  .location-message { bottom: 8px; font-size: 12px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
