.page--geo-preview {
  display: block;
}

.geo-document {
  min-width: 0;
}

.page--geo-preview [hidden] {
  display: none !important;
}

.page--geo {
  --geo-accent: #124a32;
}

.page--geo [hidden] {
  display: none !important;
}

.link-reset {
  min-height: 44px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: #2b486b;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.geo-preview-container {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.geo-preview-content {
  flex: 1 0 auto;
}

.onboard-step:not([hidden]) {
  display: block;
}

.preview-language-grid {
  row-gap: 28px;
}

.preview-language-choice {
  width: 100%;
  min-height: 44px;
  padding: 0 0 5px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.preview-language-choice .flag {
  margin: 0 auto 15px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.preview-language-label {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
}

.preview-language-choice:hover .flag {
  transform: translateY(-2px);
}

.geo-permission-step {
  padding-top: 28px;
  text-align: center;
}

.geo-chosen {
  min-height: 48px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  color: #4c4742;
  font-size: 14px;
}

.geo-chosen .link-reset {
  margin-left: 3px;
}

.geo-permission-icon {
  width: 74px;
  height: 74px;
  margin: 30px auto 18px;
  border: 1px solid var(--ring);
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 6px var(--panel), 0 0 0 7px var(--ring);
}

.geo-permission-pin {
  display: block;
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #2b486b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.28);
  transform: rotate(-45deg);
}

.geo-icon {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

.geo-heading {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 29px;
  line-height: 1.18;
}

.geo-text {
  max-width: 335px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.geo-text--multiline {
  white-space: pre-line;
}

.geo-auto-tour-note {
  max-width: 350px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.geo-action-stack {
  width: 100%;
  max-width: 330px;
  margin: 25px auto 0;
  display: grid;
  gap: 10px;
}

.geo-primary,
.geo-secondary {
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid #2b486b;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
}

.geo-primary {
  background: #2b486b;
  color: #fff;
  box-shadow: 0 3px 8px rgba(39, 55, 74, 0.22);
}

.geo-secondary {
  background: rgba(255, 255, 255, 0.28);
  color: #2b486b;
}

.geo-privacy-note {
  max-width: 330px;
  margin: 14px auto 0;
  color: #77716b;
  font-size: 12.5px;
  line-height: 1.5;
}

.lang-switcher {
  position: relative;
  width: max-content;
  max-width: 100%;
  margin: 24px 0 0 auto;
  z-index: 10;
}

.lang-chip {
  min-height: 46px;
  padding: 7px 12px 7px 8px;
  border: 1px solid #b8b2aa;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  color: #332f2c;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.lang-chip__arrow {
  color: var(--muted);
  font-size: 11px;
}

.mini-flag {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid #c8c3bb;
  border-radius: 50%;
  display: block;
  overflow: hidden;
  background: #fff;
}

.mini-flag svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lang-dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  width: 190px;
  padding: 6px;
  border: 1px solid #b8b2aa;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(42, 37, 33, 0.16);
}

.lang-option {
  width: 100%;
  min-height: 46px;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  text-align: left;
}

.lang-option:hover,
.lang-option:focus-visible {
  background: rgba(43, 72, 107, 0.1);
}

.station-listen-prompt {
  margin-top: 28px;
  margin-bottom: 27px;
}

.station-single {
  --single-flag-size: clamp(164px, 48vw, 190px);
  text-align: center;
}

.station-single .flag-wrap {
  width: var(--single-flag-size);
  height: calc(var(--single-flag-size) + 34px);
}

.station-single .flag {
  width: var(--single-flag-size);
  height: var(--single-flag-size);
}

.station-single .play {
  min-width: 128px;
  min-height: 44px;
}

.geo-result {
  margin-top: 24px;
}

.geo-result-title {
  margin: 0 0 14px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  text-align: center;
}

.geo-result-details {
  margin: 0;
}

.geo-result-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.geo-result-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
}

.geo-result-value {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
}

.geo-result-status {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.geo-result-row--accuracy .geo-result-label,
.geo-result-row--accuracy .geo-result-value {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.geo-manual-mode {
  max-width: 350px;
  margin: 28px auto 0;
  text-align: center;
}

.geo-manual-heading {
  margin: 0;
  color: var(--geo-accent);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 25px;
  line-height: 1.2;
}

.geo-manual-text {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.geo-manual-action {
  min-height: 44px;
  margin: 13px auto 0;
  padding: 7px 4px;
  border: 0;
  background: transparent;
  color: var(--geo-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.geo-manual-action .geo-icon {
  width: 20px;
  height: 20px;
}

.geo-production-root {
  width: 100%;
}

.page--start {
  display: block;
}

.geo-start-container {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.page--start .geo-heading,
.page--start .geo-result-title {
  color: var(--geo-accent);
}

.geo-trailhead {
  min-height: 78px;
  margin-top: 28px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  color: var(--geo-accent);
  text-align: left;
}

.geo-trailhead-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.geo-trailhead-name {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 600;
}

.geo-language-selection {
  padding-top: 4px;
}

.geo-choice-grid {
  row-gap: 30px;
}

.geo-language-choice {
  width: 100%;
  min-height: 44px;
  padding: 0 0 5px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.geo-language-choice .flag {
  margin: 0 auto 15px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.geo-language-choice:hover .flag {
  transform: translateY(-2px);
}

.geo-language-choice-label {
  display: block;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
}

.geo-onboarding {
  padding-top: 26px;
  text-align: center;
}

.page--start .geo-onboarding {
  padding-top: 24px;
}

.geo-selected-row {
  position: relative;
  min-height: 68px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #3e3935;
  text-align: left;
}

.geo-selected-language {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.35;
}

.geo-change-wrap {
  position: relative;
  z-index: 21;
  flex: 0 0 auto;
  overflow: visible;
}

.geo-change-language {
  min-height: 44px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  color: var(--geo-accent);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.geo-change-wrap .lang-dropdown {
  right: 0;
  text-align: left;
}

.page--geo .geo-permission-icon {
  margin-top: 32px;
}

.page--geo .geo-permission-icon .geo-icon {
  width: 34px;
  height: 34px;
  color: var(--geo-accent);
}

.page--geo .geo-action-stack {
  max-width: 100%;
}

.page--geo .geo-primary,
.page--geo .geo-secondary {
  min-height: 54px;
  border-color: var(--geo-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  font-size: 16px;
}

.page--geo .geo-primary {
  background: var(--geo-accent);
  box-shadow: 0 3px 8px rgba(18, 74, 50, 0.22);
}

.page--geo .geo-secondary {
  color: var(--geo-accent);
}

.page--geo .geo-action-stack .geo-icon {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
}

.page--geo .geo-privacy-note {
  max-width: 360px;
  margin-top: 20px;
  color: #504b46;
  font-size: 13px;
}

.page--geo .geo-privacy-note strong {
  color: var(--geo-accent);
  font-weight: 600;
}

.geo-legal-links {
  margin-top: 22px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: #5b5651;
  font-size: 13px;
  line-height: 1.4;
}

.geo-legal-placeholder {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.geo-legal-separator {
  color: var(--line);
}

.page--geo .geo-result {
  margin-top: 24px;
  padding-top: 8px;
  padding-bottom: 4px;
  border-top: 1px solid var(--line);
}

.page--station .geo-production-root > .geo-result:not([hidden]) {
  margin-bottom: 22px;
}

.page--station.geo-gate-active .container > .language-prompt,
.page--station.geo-gate-active .container > .language-grid,
.page--station.geo-gate-active .container > .trail-nav {
  display: none;
}

.page--station.geo-content-ready .geo-single-language-grid,
.page--start.geo-content-ready .geo-single-language-grid {
  position: relative;
  z-index: 1;
  grid-template-columns: 1fr;
}

.page--station.geo-content-ready .language-card[hidden],
.page--start.geo-content-ready .language-card[hidden] {
  display: none !important;
}

.page--station.geo-content-ready .language-prompt,
.page--start.geo-content-ready .language-prompt {
  margin-top: 28px;
  margin-bottom: 27px;
}

.page--station.geo-content-ready .station-single,
.page--start.geo-content-ready .station-single {
  --single-flag-size: clamp(164px, 48vw, 190px);
}

.page--station.geo-content-ready .station-single .flag-wrap,
.page--start.geo-content-ready .station-single .flag-wrap {
  width: var(--single-flag-size);
  height: calc(var(--single-flag-size) + 34px);
}

.page--station.geo-content-ready .station-single .flag,
.page--start.geo-content-ready .station-single .flag {
  width: var(--single-flag-size);
  height: var(--single-flag-size);
}

.page--station.geo-content-ready .station-single .play,
.page--start.geo-content-ready .station-single .play {
  min-width: 128px;
  min-height: 44px;
}

#geo-station-switcher {
  position: relative;
  z-index: 20;
  margin-top: 22px;
  overflow: visible;
}

.geo-start-manual-nav {
  margin-top: 22px;
}

.page--geo button:focus-visible,
.page--geo .geo-legal-placeholder:focus-visible {
  outline: 3px solid #2a2927;
  outline-offset: 3px;
}

.page--geo-preview button:focus-visible {
  outline: 3px solid #2a2927;
  outline-offset: 3px;
}

@media (max-width: 389px) {
  .preview-language-label {
    font-size: 18px;
  }

  .geo-language-choice-label {
    font-size: 18px;
  }

  .geo-trailhead {
    padding-inline: 13px;
    gap: 13px;
  }

  .geo-trailhead-name {
    font-size: 16px;
  }

  .geo-selected-row {
    padding-inline: 10px;
    gap: 8px;
  }

  .geo-selected-language {
    gap: 7px;
    font-size: 13px;
  }

  .geo-legal-links {
    flex-wrap: nowrap;
    gap: 6px;
    font-size: 11px;
  }

  .geo-legal-placeholder {
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .geo-result-row {
    align-items: flex-start;
  }

  .geo-result-value {
    max-width: 58%;
  }

  .geo-selected-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .geo-change-wrap {
    width: 100%;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .preview-language-choice .flag,
  .geo-language-choice .flag,
  .page--geo-preview button {
    transition: none;
  }
}
