:root {
  color-scheme: dark;
  --bg-top: #1a1613;
  --bg-bottom: #0b0908;
  --panel: rgba(21, 18, 15, 0.82);
  --panel-strong: rgba(17, 14, 11, 0.9);
  --line: rgba(255, 240, 220, 0.1);
  --line-strong: rgba(255, 240, 220, 0.18);
  --text: #f7efe5;
  --muted: #cbb9a4;
  --accent: #e0bf86;
  --accent-strong: #f4ddaf;
  --shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 10%, rgba(142, 94, 54, 0.12), transparent 24%),
    radial-gradient(circle at 88% 0%, rgba(122, 92, 49, 0.1), transparent 22%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
  color: var(--text);
  overflow-x: hidden;
}

.app-shell {
  position: relative;
  min-height: 100vh;
}

.map-shell {
  display: flex;
  flex-direction: column;
}

.app-header {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100vw;
  max-width: none;
  z-index: 20;
  margin: 0;
  padding: 0;
  min-height: 4px;
  overflow: visible;
  background: linear-gradient(
    to bottom,
    rgba(10, 8, 7, 0.5) 0,
    rgba(10, 8, 7, 0.16) 2px,
    rgba(10, 8, 7, 0) 4px
  );
  box-shadow: none;
  backdrop-filter: blur(1px);
}

.app-header::before {
  content: "";
  position: absolute;
  inset: 0;
  height: 96px;
  z-index: 0;
  opacity: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 8, 7, 0.92),
    rgba(10, 8, 7, 0.7),
    rgba(10, 8, 7, 0)
  );
  backdrop-filter: blur(12px);
  pointer-events: none;
  transition: opacity 160ms ease;
}

.app-header:hover::before,
.app-header:focus-within::before {
  opacity: 1;
}

.brand-row {
  opacity: 0;
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.72rem 1rem 0.82rem;
  align-items: center;
  pointer-events: none;
  transition:
    opacity 140ms ease,
    transform 180ms ease;
}

.app-shell--anonymous .app-header::before,
.app-shell--anonymous .brand-row {
  opacity: 1;
  pointer-events: auto;
}

.app-shell--anonymous .app-header::before {
  height: 112px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.brand-copy {
  min-width: 0;
}

.map-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
  text-transform: lowercase;
}

.map-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.app-header:hover .brand-row,
.app-header:focus-within .brand-row {
  opacity: 1;
  pointer-events: auto;
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.account-controls {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

[hidden] {
  display: none !important;
}

.forbidden-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d4bd8d;
  color: #3b2a18;
  padding: 24px;
}

.forbidden-card {
  max-width: 760px;
  text-align: center;
}

.forbidden-card img {
  width: min(100%, 720px);
  border-radius: 12px;
  display: block;
  margin: 0 auto 18px;
}

.forbidden-card h1 {
  margin: 0 0 8px;
}

.forbidden-card p {
  margin: 0 0 18px;
  font-size: 1.1rem;
}

.back-map-button {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 999px;
  background: #6b4a24;
  color: #fff2d0;
  text-decoration: none;
  font-weight: bold;
}

.app-header h1 {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.05;
}

.app-subtitle {
  margin: 0.2rem 0 0;
  opacity: 0.92;
  font-size: 0.74rem;
}

.login-link {
  display: inline-block;
  color: var(--text);
  text-decoration: none;
  padding: 0.6rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.login-link::before {
  content: "";
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 2px rgba(9, 8, 7, 0.24);
}

.login-link--signed-in::before,
.app-shell--signed-in .login-link::before {
  background: linear-gradient(180deg, #f4ddaf 0%, #e0bf86 100%);
  border-color: rgba(255, 232, 190, 0.36);
}

.login-link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.account-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.account-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.account-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 12rem;
  padding: 0.45rem;
  border-radius: 1rem;
  background: rgba(16, 15, 14, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 0.35rem;
  z-index: 30;
}

.account-menu-link,
.account-menu-button {
  appearance: none;
  border: 0;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  color: #fff;
  background: transparent;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.account-menu-link:hover,
.account-menu-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.map-stage {
  position: relative;
  flex: 1;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.25rem 0 0.75rem;
}

.map-layer {
  position: relative;
  width: min(100vw, calc((100vh - 4rem) * 1.5));
  height: min(calc(100vw / 1.5), calc(100vh - 4rem));
  background-image:
    linear-gradient(180deg, rgba(10, 8, 7, 0.08), rgba(10, 8, 7, 0.22)),
    url("/assets/mapbackground.png");
  background-size: 100% 100%;
  background-position: center top;
  background-repeat: no-repeat;
  overflow: hidden;
}

.map-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.34), transparent 14%),
    radial-gradient(circle at 38% 26%, rgba(255, 255, 255, 0.24), transparent 12%),
    radial-gradient(circle at 68% 16%, rgba(255, 255, 255, 0.2), transparent 13%),
    radial-gradient(circle at 82% 46%, rgba(255, 255, 255, 0.24), transparent 16%),
    radial-gradient(circle at 26% 72%, rgba(255, 255, 255, 0.18), transparent 17%);
  mix-blend-mode: screen;
  transition: opacity 180ms ease;
}

.map-layer.map-layer--signed-in {
  background-image:
    linear-gradient(180deg, rgba(10, 8, 7, 0.08), rgba(10, 8, 7, 0.22)),
    url("/assets/mapbackground.png");
}

.map-layer--anonymous {
  filter: saturate(0.82) contrast(0.95) brightness(0.95);
}

.map-layer--anonymous::before {
  opacity: 1;
}

.map-layer--anonymous .venue-pin img {
  filter:
    grayscale(0.22)
    saturate(0.75)
    brightness(0.88)
    drop-shadow(0 8px 16px rgba(0, 0, 0, 0.48));
}

.map-layer--anonymous .venue-label {
  background: rgba(9, 8, 7, 0.68);
}

.status {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 15;
  padding: 0.6rem 0.85rem;
  border-radius: 999px;
  background: rgba(9, 8, 7, 0.62);
  backdrop-filter: blur(8px);
  font-size: 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.tool-panel {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.tool-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tool-row:last-child {
  margin-bottom: 0;
}

.tool-row button {
  padding: 8px 12px;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
}

.tool-row button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.venue-icons {
  position: absolute;
  inset: 0;
  z-index: 15;
}

.venue-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 0;
  padding: 1rem;
  cursor: pointer;
}

.venue-pin .venue-notification {
  position: absolute;
  top: 0.55rem;
  right: 0.75rem;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #cf5b31;
  color: #fff7ec;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.venue-pin img {
  width: clamp(64px, 6vw, 88px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
  transition: transform 0.18s ease, filter 0.18s ease;
}

.venue-pin:hover img,
.venue-pin:focus-visible img {
  transform: scale(1.08);
}

.venue-label {
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(9, 8, 7, 0.58);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.3;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
}

.venue-pin:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 12px;
}

/* Victory Theater emphasis */
.venue-pin--theater {
  gap: 2.9rem;
  z-index: 30;
}

.venue-pin--theater img {
  transform: scale(1.7);
  transform-origin: center bottom;
  filter:
    drop-shadow(0 0 8px rgba(255, 220, 120, 0.55))
    drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  animation: theaterPulse 3.5s ease-in-out infinite;
}

.venue-pin--theater:hover img,
.venue-pin--theater:focus-visible img {
  transform: scale(1.7);
  filter:
    drop-shadow(0 0 12px rgba(255, 220, 120, 0.7))
    drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}

.venue-pin--theater .venue-label {
  position: relative;
  z-index: 2;
  background: rgba(9, 8, 7, 0.72);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.modal-open {
  overflow: hidden;
}

.booth-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 12, 0.72);
  backdrop-filter: blur(12px);
}

.booth-sheet {
  position: relative;
  width: min(1120px, 100%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at top, rgba(232, 192, 121, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(34, 28, 24, 0.98), rgba(18, 14, 12, 0.98));
  color: #f7efe3;
  padding: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.booth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.booth-eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d9b36d;
  font-size: 0.76rem;
}

.booth-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
}

.booth-copy {
  margin: 10px 0 0;
  color: rgba(247, 239, 227, 0.84);
  line-height: 1.55;
  max-width: 78ch;
}

.booth-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(160px, 1fr) minmax(320px, 1.4fr) minmax(180px, 1fr);
  margin-top: 20px;
}

.booth-column {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  padding: 18px;
}

.booth-column h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #f0d39e;
}

.booth-column ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.6;
  color: rgba(247, 239, 227, 0.88);
}

.booth-center {
  background:
    radial-gradient(circle at top, rgba(214, 175, 99, 0.16), transparent 44%),
    rgba(255, 255, 255, 0.04);
}

.booth-footer {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.booth-footer strong {
  display: block;
  margin-bottom: 4px;
}

.booth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 232, 190, 0.3);
  background: linear-gradient(180deg, #6b4a24 0%, #473018 100%);
  color: #fff2d0;
  text-decoration: none;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.map-menu {
  position: fixed;
  inset: 0;
  z-index: 75;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 5.2rem 1rem 1rem;
  background: rgba(8, 10, 12, 0.42);
  backdrop-filter: blur(10px);
}

.map-menu-sheet {
  width: min(380px, calc(100vw - 2rem));
  max-height: calc(100vh - 6.25rem);
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at top, rgba(232, 192, 121, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(26, 22, 19, 0.98), rgba(16, 13, 11, 0.98));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  padding: 18px;
}

.map-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.map-menu-eyebrow,
.soil-experts-eyebrow {
  margin: 0 0 6px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #d9b36d;
  font-size: 0.76rem;
}

.map-menu-header h2,
.soil-experts-title {
  margin: 0;
  font-size: 1.6rem;
}

.map-menu-close,
.soil-experts-close {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.map-menu-outline {
  display: grid;
  gap: 12px;
}

.map-menu-group {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.map-menu-group h3 {
  margin: 0 0 10px;
  color: #f0d39e;
  font-size: 0.96rem;
}

.map-menu-group ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.map-menu-group a,
.map-menu-group button {
  color: #fff5df;
  text-decoration: none;
  font: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.map-menu-group small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.map-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.map-menu-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 232, 190, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: #fff2d0;
  text-decoration: none;
  font-weight: 700;
}

.soil-experts-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 10, 12, 0.78);
  backdrop-filter: blur(14px);
}

.soil-experts-sheet {
  position: relative;
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(260px, 1fr) minmax(220px, 1fr);
  gap: 14px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at top, rgba(232, 192, 121, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(18, 14, 12, 0.98), rgba(10, 8, 7, 0.98));
  color: #f7efe3;
  padding: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.soil-experts-asset {
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #171210;
}

.soil-experts-asset img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.soil-experts-copy {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  color: rgba(247, 239, 227, 0.86);
  line-height: 1.6;
}

.soil-experts-copy p {
  margin: 0 0 14px;
}

@keyframes theaterPulse {
  0% {
    filter:
      drop-shadow(0 0 6px rgba(255, 220, 120, 0.4))
      drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  }
  50% {
    filter:
      drop-shadow(0 0 14px rgba(255, 220, 120, 0.7))
      drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  }
  100% {
    filter:
      drop-shadow(0 0 6px rgba(255, 220, 120, 0.4))
      drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  }
}

/* Hide old card-based layout if any old markup remains */
#venues,
.venues,
.app-content,
.venue-card,
.venue-button,
.map-overlay {
  display: none !important;
}

.login-link--signed-in {
  background: rgba(255, 220, 120, 0.14);
  border-color: rgba(255, 220, 120, 0.45);
}
