:root {
  --venue-forest: #075b4f;
  --venue-deep: #103c35;
  --venue-mint: #d9f3e7;
  --venue-purple: #7953a6;
  --venue-lime: #c9d63b;
  --venue-lilac: #eee7f7;
  --venue-paper: #f7faf7;
  --venue-line: rgba(16, 60, 53, 0.16);
}

body.venue-dialog-open {
  overflow: hidden;
}

.venue-page {
  padding-top: 116px;
  color: var(--venue-deep);
  background: var(--venue-paper);
}

.venue-hero {
  position: relative;
  padding: clamp(156px, 13vw, 190px) max(24px, calc((100vw - 1240px) / 2)) clamp(68px, 8vw, 112px);
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(217, 243, 231, 0.88), rgba(247, 250, 247, 0.96) 48%, rgba(238, 231, 247, 0.74)),
    var(--venue-paper);
}

.venue-hero::before {
  content: none;
}

.venue-home-section {
  min-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  scroll-margin-top: 94px;
}

.venue-home-section::before {
  top: clamp(42px, 6vw, 86px);
}

/* Keep the homepage section heading on the same visual scale as Registration. */
.venue-home-section .venue-intro {
  width: min(820px, 58%);
}

.venue-home-section .venue-kicker {
  gap: 12px;
  margin-bottom: 13px;
  color: var(--direction-violet, var(--venue-purple));
  font: 600 clamp(0.68rem, 1vw, 0.78rem) / 1.4 "Prompt", sans-serif;
  letter-spacing: 0.085em;
}

.venue-home-section .venue-kicker::before {
  width: 68px;
  height: 8px;
  flex: 0 0 68px;
  background: linear-gradient(
    90deg,
    var(--direction-citron, var(--venue-lime)) 0 46px,
    transparent 46px 54px,
    var(--direction-stack, var(--venue-forest)) 54px 68px
  );
  background-size: 100% 4px;
  background-position: left center;
  background-repeat: no-repeat;
}

.venue-home-section .venue-intro h2 {
  max-width: 820px;
  color: var(--direction-violet, var(--venue-purple));
  font-family: "Prompt", sans-serif;
  font-size: clamp(2.15rem, 4.1vw, 3.9rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: 0;
  white-space: normal;
  text-wrap: balance;
}

.venue-breadcrumb {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: clamp(28px, 4vw, 48px);
  color: #5b6e68;
  font-size: 0.78rem;
  font-weight: 600;
}

.venue-breadcrumb a {
  color: var(--venue-forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.venue-hero-grid {
  position: relative;
  z-index: 1;
  display: block;
}

.venue-intro {
  position: absolute;
  z-index: 3;
  top: clamp(24px, 4.5vw, 64px);
  left: 0;
  width: min(520px, 46%);
}

.venue-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 16px;
  color: var(--venue-forest);
  font: 700 0.74rem / 1.4 "Chakra Petch", sans-serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.venue-kicker::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--venue-purple);
}

.venue-intro :is(h1, h2) {
  max-width: none;
  margin: 0;
  color: var(--venue-deep);
  font: 800 clamp(2.6rem, 3.4vw, 3.9rem) / 1.05 "Prompt", sans-serif;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.venue-lead {
  max-width: 610px;
  margin: 26px 0 0;
  color: #51655f;
  font-size: clamp(0.98rem, 1.2vw, 1.12rem);
}

.venue-map-shell {
  position: relative;
  width: 100%;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.venue-map-compass {
  position: absolute;
  z-index: 4;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--venue-purple) !important;
  background: rgba(247, 250, 247, 0.88);
  border: 1px solid rgba(121, 83, 166, 0.35);
  border-radius: 50%;
  font: 700 0.75rem / 1 "Chakra Petch", sans-serif !important;
  backdrop-filter: blur(8px);
}

.venue-map-compass::before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  margin-top: -21px;
  background: var(--venue-purple);
  transform: rotate(45deg);
}

.venue-map {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1250 / 850;
  background: transparent;
}

.venue-map-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 180ms ease;
}

.venue-map-canvas.is-ready {
  opacity: 1;
}

.venue-map-source {
  display: none;
}

.venue-map::after {
  content: "";
  position: absolute;
  inset: 0;
  border-bottom: 1px solid var(--venue-line);
  pointer-events: none;
}

.venue-map-pin {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 7px;
  color: #fff;
  background: rgba(44, 28, 59, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(44, 28, 59, 0.32);
  transform: translate(-28px, -50%);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.venue-map-pin--28 {
  left: 61%;
  top: 40%;
}

.venue-map-pin--13 {
  left: 14%;
  top: 82%;
}

.venue-map-pin::before,
.venue-map-pin::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 26px;
  top: 50%;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(121, 83, 166, 0.55);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: venue-pin-pulse 2.4s ease-out infinite;
}

.venue-map-pin::after {
  animation-delay: 1.2s;
}

.venue-map-pin span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--venue-purple);
  border-radius: 50%;
  font: 700 1rem / 1 "Chakra Petch", sans-serif;
}

.venue-map-pin--13 span {
  color: var(--venue-deep);
  background: var(--venue-lime);
}

.venue-map-pin--13::before,
.venue-map-pin--13::after {
  border-color: rgba(201, 214, 59, 0.72);
}

.venue-map-pin small {
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.venue-map-pin:hover {
  transform: translate(-28px, -50%) scale(1.05);
  box-shadow: 0 18px 40px rgba(44, 28, 59, 0.42);
}

.venue-map-pin:focus-visible,
.venue-photo-card:focus-visible,
.venue-open-photo:focus-visible,
.venue-dialog button:focus-visible,
.venue-dialog a:focus-visible {
  outline: 3px solid #f6cd5f;
  outline-offset: 3px;
}

.venue-live-map {
  width: min(1180px, calc(100vw - 48px));
  margin: 0 auto;
  padding: clamp(76px, 8vw, 112px) 0 0;
}

.venue-live-map-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  column-gap: clamp(32px, 6vw, 86px);
  align-items: end;
  margin-bottom: 28px;
}

.venue-live-map-copy .venue-kicker {
  grid-column: 1 / -1;
}

.venue-live-map-copy :is(h1, h2) {
  margin: 0;
  color: var(--venue-deep);
  font: 700 clamp(2.2rem, 4vw, 4.1rem) / 0.98 "Chakra Petch", "Prompt", sans-serif;
  letter-spacing: -0.055em;
}

.venue-live-map-copy > p:not(.venue-kicker) {
  margin: 0 0 4px;
  color: #5a6d66;
  font-size: 0.92rem;
}

.venue-live-map-frame {
  position: relative;
  overflow: hidden;
  height: clamp(430px, 54vw, 650px);
  background: #dcece5;
  border: 1px solid var(--venue-line);
  box-shadow: 0 24px 70px rgba(16, 60, 53, 0.13);
}

.venue-live-map-frame::before {
  content: "กำลังโหลดแผนที่…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--venue-forest);
  font-weight: 700;
}

.venue-live-map-frame iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  border: 0;
}

.venue-live-map-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--venue-line);
  border-top: 0;
}

.venue-live-map-links a {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 18px;
  align-items: center;
  padding: 18px 20px;
  color: var(--venue-deep);
  background: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}

.venue-live-map-links a + a {
  border-left: 1px solid var(--venue-line);
}

.venue-live-map-links a:hover {
  color: #fff;
  background: var(--venue-forest);
}

.venue-live-map-links span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.venue-live-map-links span > i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--venue-purple);
  border-radius: 50%;
  font: 700 0.78rem / 1 "Chakra Petch", sans-serif;
  font-style: normal;
}

.venue-live-map-links a:nth-child(2) span > i {
  color: var(--venue-deep);
  background: var(--venue-lime);
}

.venue-live-map-links b {
  grid-column: 2;
  grid-row: 1;
  font-size: 0.74rem;
  white-space: nowrap;
}

.venue-hero-directions {
  margin-top: 0;
  border-color: rgba(16, 60, 53, 0.2);
}

.venue-building {
  width: min(1180px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: 0.28fr minmax(420px, 1.08fr) minmax(320px, 0.84fr);
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
  margin: 0 auto;
  padding: clamp(78px, 9vw, 126px) 0;
}

.venue-building + .venue-building {
  border-top: 1px solid var(--venue-line);
}

.venue-building--reverse {
  grid-template-columns: minmax(320px, 0.84fr) minmax(420px, 1.08fr) 0.28fr;
}

.venue-building--reverse .venue-building-index {
  grid-column: 3;
  grid-row: 1;
  padding: 12px 0 12px 22px;
  border-right: 0;
  border-left: 1px solid var(--venue-line);
}

.venue-building--reverse .venue-photo-card {
  grid-column: 2;
  grid-row: 1;
}

.venue-building--reverse .venue-building-copy {
  grid-column: 1;
  grid-row: 1;
}

.venue-building-index {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 22px 12px 0;
  border-right: 1px solid var(--venue-line);
}

.venue-building-index span {
  color: #70817b;
  font: 700 0.7rem / 1.4 "Chakra Petch", sans-serif;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.venue-building-index strong {
  color: var(--venue-purple);
  font: 700 clamp(4.4rem, 8vw, 7rem) / 0.78 "Chakra Petch", sans-serif;
  letter-spacing: -0.09em;
}

[data-venue-number="13"] .venue-building-index strong {
  color: #9ca916;
}

[data-venue-number="13"] .venue-kicker::before {
  background: var(--venue-lime);
}

.venue-photo-card {
  min-width: 0;
  padding: 0;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: zoom-in;
}

.venue-photo-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #dfe9e4;
  box-shadow: 0 24px 64px rgba(16, 60, 53, 0.16);
}

.venue-photo-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.75, 0.2, 1);
}

.venue-photo-card:hover img {
  transform: scale(1.035);
}

.venue-photo-action {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: #fff;
  background: rgba(16, 60, 53, 0.9);
  font-size: 0.68rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.venue-building-copy h2 {
  margin: 0;
  color: var(--venue-deep);
  font: 700 clamp(2.4rem, 4vw, 4.4rem) / 1 "Chakra Petch", "Prompt", sans-serif;
  letter-spacing: -0.06em;
}

.venue-building-copy > p:not(.venue-kicker) {
  margin: 22px 0;
  color: #5a6d66;
  font-size: 0.94rem;
}

.venue-building-copy address {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding-top: 18px;
  color: var(--venue-deep);
  border-top: 1px solid var(--venue-line);
  font-size: 0.82rem;
  font-style: normal;
}

.venue-building-copy address i {
  margin-top: 5px;
  color: var(--venue-purple);
}

.venue-open-photo {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding: 12px 16px;
  color: #fff;
  background: var(--venue-forest);
  border: 1px solid var(--venue-forest);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  transition: color 180ms ease, background 180ms ease;
}

.venue-open-photo:hover {
  color: var(--venue-forest);
  background: transparent;
}

.venue-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-width: none;
  max-height: calc(100dvh - 36px);
  padding: 0;
  color: var(--venue-deep);
  background: #fff;
  border: 0;
  box-shadow: 0 40px 110px rgba(5, 29, 24, 0.42);
}

.venue-dialog::backdrop {
  background: rgba(5, 29, 24, 0.76);
  backdrop-filter: blur(10px);
}

.venue-dialog-inner {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100dvh - 36px);
}

.venue-dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--venue-line);
}

.venue-dialog-bar div {
  display: grid;
}

.venue-dialog-bar span {
  color: #70817b;
  font-size: 0.64rem;
}

.venue-dialog-bar strong {
  font-size: 0.95rem;
}

.venue-dialog-bar button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--venue-deep);
  border: 0;
  cursor: pointer;
}

.venue-dialog figure {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  margin: 0;
  background: #e8efeb;
}

.venue-dialog figure img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: contain;
}

.venue-dialog figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px;
  color: #687a73;
  background: #fff;
  font-size: 0.68rem;
}

.venue-dialog figcaption span {
  min-width: 0;
}

.venue-dialog figcaption a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 0 0 auto;
  padding: 10px 18px;
  color: #fff;
  background: var(--venue-forest);
  border: 1px solid var(--venue-forest);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}

.venue-dialog figcaption a:hover {
  color: var(--venue-forest);
  background: #fff;
}

@keyframes venue-pin-pulse {
  from {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.45);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.5);
  }
}

@media (max-width: 1120px) {
  .venue-page {
    padding-top: 70px;
  }
}

@media (max-width: 980px) {
  .venue-hero {
    padding-top: 142px;
  }

  .venue-home-section {
    padding-top: 0;
  }

  .venue-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .venue-intro {
    position: relative;
    inset: auto;
    width: auto;
    max-width: 700px;
    margin-bottom: 30px;
  }

  .venue-building {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .venue-photo-card {
    grid-column: 2;
  }

  .venue-building-copy {
    grid-column: 2;
  }

  .venue-building-index {
    grid-row: 1 / span 2;
  }

  .venue-building--reverse .venue-building-index {
    grid-column: 1;
    grid-row: 1 / span 2;
    padding: 12px 22px 12px 0;
    border-right: 1px solid var(--venue-line);
    border-left: 0;
  }

  .venue-building--reverse .venue-photo-card,
  .venue-building--reverse .venue-building-copy {
    grid-column: 2;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .venue-hero {
    padding: 112px 18px 62px;
  }

  .venue-home-section {
    padding: 58px 18px 0;
  }

  .venue-breadcrumb {
    margin-bottom: 30px;
  }

  .venue-intro :is(h1, h2) {
    font-size: clamp(2.25rem, 10.5vw, 3.2rem);
  }

  .venue-lead br {
    display: none;
  }

  .venue-map-shell {
    margin-inline: 0;
    padding: 0;
  }

  .venue-map-pin small {
    display: none;
  }

  .venue-map-pin {
    padding: 6px;
  }

  .venue-live-map {
    width: calc(100% - 36px);
    padding-top: 62px;
  }

  .venue-live-map-copy {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .venue-live-map-frame {
    height: 560px;
  }

  .venue-live-map-links {
    grid-template-columns: 1fr;
  }

  .venue-live-map-links a + a {
    border-top: 1px solid var(--venue-line);
    border-left: 0;
  }

  .venue-building {
    width: min(100% - 36px, 620px);
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 66px 0;
  }

  .venue-building-index {
    grid-row: auto;
    display: none;
  }

  .venue-photo-card,
  .venue-building-copy {
    grid-column: 1;
  }

  .venue-building--reverse .venue-photo-card,
  .venue-building--reverse .venue-building-copy {
    grid-column: 1;
  }

  .venue-photo-action {
    right: 10px;
    bottom: 10px;
  }

  .venue-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100dvh - 18px);
  }

  .venue-dialog-inner {
    max-height: calc(100dvh - 18px);
  }

  .venue-dialog figcaption {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .venue-dialog figcaption a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .venue-map-pin::before,
  .venue-map-pin::after {
    animation: none;
  }

  .venue-map-pin,
  .venue-map-canvas,
  .venue-photo-frame img,
  .venue-open-photo {
    transition-duration: 0.01ms;
  }
}
