:root {
  --bg: #ece7e1;
  --panel: #f3efe9;
  --text: #24211f;
  --muted: #625e59;
  --line: #d2cec6;
  --ring: #d4d0c8;
  --cz: #2b486b;
  --pl: #ad2523;
  --de: #ad8532;
  --en: #2b486b;
  --audio-button: #2b486b;
  --geo-accent: #124a32;
  --flag-size: clamp(118px, calc((100vw - 98px) / 2), 142px);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', Arial, sans-serif;
  display: flex;
  justify-content: center;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.container {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  padding: 34px 24px 26px;
  background-color: var(--panel);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

.page--map .container {
  max-width: 830px;
}

.page-header {
  text-align: center;
}

.title-block {
  display: inline-block;
  width: auto;
  max-width: 100%;
}

.page-title {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(32px, 8.7vw, 39px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.7px;
  color: #211f1d;
  text-transform: uppercase;
}

.station-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 20px 0 0;
}

.station-title-row::before,
.station-title-row::after {
  content: '';
  flex: 0 0 24px;
  height: 1px;
  background: #aaa59d;
}

.station-title {
  flex: 0 1 auto;
  max-width: 276px;
  margin: 0;
  color: #36322f;
  font-size: 14.5px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.language-prompt {
  width: fit-content;
  max-width: 100%;
  margin: 34px auto 30px;
  color: #302d2a;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 400;
  text-align: center;
}

.language-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
  row-gap: 34px;
  align-items: start;
}

.language-card {
  min-width: 0;
  text-align: center;
}

.flag-wrap {
  position: relative;
  width: var(--flag-size);
  height: calc(var(--flag-size) + 31px);
  margin: 0 auto;
}

.flag {
  width: var(--flag-size);
  height: var(--flag-size);
  display: block;
  overflow: hidden;
  border: 1px solid #c8c3bb;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    0 0 0 6px var(--panel),
    0 0 0 7px var(--ring),
    0 3px 9px rgba(43, 38, 33, 0.11);
}

.flag svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: none;
}

.play {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  min-width: 112px;
  height: 40px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  font-weight: 500;
  box-shadow: 0 3px 7px rgba(32, 28, 24, 0.27);
  transition: transform 120ms ease, filter 120ms ease, box-shadow 120ms ease;
}

.play.cz,
.play.pl,
.play.de,
.play.en {
  background: var(--audio-button);
}

.play:hover {
  filter: brightness(1.06);
}

.play:active {
  transform: translateX(-50%) scale(0.97);
  box-shadow: 0 2px 4px rgba(32, 28, 24, 0.2);
}

.play:focus-visible,
.trail-nav a:focus-visible {
  outline: 3px solid #2a2927;
  outline-offset: 3px;
}

.play-icon {
  width: 18px;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  line-height: 1;
}


.trail-nav {
  margin-top: 24px;
  padding: 15px 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #5c5853;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px 8px;
  text-align: center;
  font-size: 16px;
  line-height: 1.45;
}

.trail-nav a {
  color: inherit;
  text-decoration: none;
}

.trail-nav a:hover {
  text-decoration: underline;
}

.nav-separator,
.nav-arrow {
  color: #6e6963;
}

.site-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;
  text-align: center;
}

.site-legal-placeholder {
  color: var(--geo-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-legal-placeholder:hover {
  text-decoration-thickness: 2px;
}

.site-legal-placeholder:focus-visible {
  outline: 3px solid #2a2927;
  outline-offset: 3px;
}

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

.site-footer {
  padding-top: 10px;
}

.footer-partners-heading {
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #504b46;
  font-size: 14.5px;
  line-height: 1.3;
  font-weight: 400;
  text-align: left;
}

.footer-partners {
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
}

.partner {
  --partner-gutter: 8px;
  min-width: 0;
  padding: 0 var(--partner-gutter);
  text-align: center;
}

.partner-logo-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner + .partner .partner-logo-wrap {
  position: relative;
}

.partner + .partner .partner-logo-wrap::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: calc(var(--partner-gutter) * -1);
  width: 1px;
  background: var(--line);
}

.partner-logo {
  display: block;
  width: 100%;
  height: 64px;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.partner-logo--tipsport {
  width: min(120px, 100%);
}

.partner-logo--aopk {
  width: min(125px, 100%);
}

.partner-logo--edurikon {
  width: min(115px, 100%);
}

.footer-note {
  margin: 12px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: #625d58;
  text-align: center;
  text-wrap: balance;
  font-size: 13.5px;
  line-height: 1.5;
}

.footer-note-line {
  display: block;
}

.footer-note strong {
  font-weight: 700;
}

.map-wrap {
  margin-top: 30px;
}

.trail-map {
  width: 100%;
  height: clamp(420px, 70vh, 600px);
  min-height: 420px;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e1da;
}

.map-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.map-error {
  margin: 0;
  padding: 32px 20px;
  color: var(--muted);
  text-align: center;
}

.custom-pin-wrapper {
  background: transparent;
  border: 0;
}

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

.trail-map .leaflet-popup-content {
  font-family: 'Inter', Arial, sans-serif;
  line-height: 1.45;
}

.page--map .page-header,
.page--map .trail-nav,
.page--map .site-footer {
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
}

.page--map .trail-nav {
  margin-top: 28px;
}

.page--404 .container {
  display: flex;
  flex-direction: column;
}

.page--404 .station-title {
  max-width: 280px;
}

.error-hero {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 0 42px;
  text-align: center;
}

.error-code {
  margin-left: -7px;
  color: #2b486b;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(94px, 28vw, 122px);
  line-height: 0.78;
  font-weight: 800;
  letter-spacing: -7px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.65);
}

.error-trail {
  position: relative;
  width: 150px;
  height: 14px;
  margin: 25px 0 21px;
  border-top: 2px dashed #ad8532;
}

.error-trail::before,
.error-trail::after {
  content: '';
  position: absolute;
  top: -7px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--panel);
  border-radius: 50%;
  background: #ad8532;
  box-shadow: 0 0 0 1px #9b772d;
}

.error-trail::before {
  left: -2px;
}

.error-trail::after {
  right: -2px;
}

.error-kicker {
  margin: 0 0 8px;
  color: #756f68;
  font-size: 12.5px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.error-title {
  margin: 0;
  color: #292522;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
}

.page--404 .error-message {
  max-width: 340px;
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
}

.error-actions {
  width: 100%;
  max-width: 330px;
  margin-top: 29px;
  display: grid;
  gap: 11px;
}

.error-action {
  min-height: 48px;
  padding: 11px 18px;
  border: 1px solid #2b486b;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

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

.error-action--secondary {
  background: rgba(255, 255, 255, 0.24);
  color: #2b486b;
}

.error-action:hover {
  transform: translateY(-1px);
}

.error-action--primary:hover {
  background: #233d5b;
  box-shadow: 0 4px 10px rgba(39, 55, 74, 0.27);
}

.error-action--secondary:hover {
  background: rgba(255, 255, 255, 0.52);
}

.error-action:active {
  transform: translateY(0) scale(0.985);
}

.error-action:focus-visible {
  outline: 3px solid #2a2927;
  outline-offset: 3px;
}

.page--404 .trail-nav {
  margin-top: 0;
}

@media (max-width: 480px) {
  .trail-map {
    height: 500px;
    min-height: 420px;
  }
}

@media (max-width: 389px) {
  .container {
    padding: 28px 16px 22px;
  }

  .page-title {
    font-size: clamp(30px, 9.3vw, 34px);
  }

  .station-title-row {
    gap: 10px;
    margin-top: 17px;
  }

  .station-title-row::before,
  .station-title-row::after {
    flex-basis: 20px;
  }

  .station-title {
    max-width: min(260px, calc(100% - 60px));
    font-size: 13.5px;
  }

  .language-prompt {
    margin-top: 29px;
    margin-bottom: 27px;
    font-size: 16px;
  }

  .language-grid {
    column-gap: 12px;
    row-gap: 29px;
  }

  .play {
    min-width: 102px;
    height: 37px;
    padding-inline: 11px;
    gap: 7px;
    font-size: 19px;
  }

  .trail-nav {
    margin-top: 22px;
    font-size: 14.5px;
  }

  .partner {
    --partner-gutter: 6px;
  }

  .footer-partners-heading {
    font-size: 14px;
  }


  .footer-note {
    font-size: 13px;
  }

  .error-hero {
    padding: 39px 0 35px;
  }

  .error-title {
    font-size: 28px;
  }

  .page--404 .error-message {
    font-size: 15px;
  }
}

@media (max-width: 335px) {
  .container {
    padding-inline: 14px;
  }

  .station-title-row::before,
  .station-title-row::after {
    flex-basis: 18px;
  }

  .station-title {
    max-width: min(232px, calc(100% - 56px));
  }

  .language-grid {
    column-gap: 10px;
  }

  .play {
    min-width: 98px;
    height: 36px;
    font-size: 18px;
  }

  .partner {
    --partner-gutter: 5px;
  }
}
