:root {
  --pg-accent: #dc052d;
  --pg-text: #1a1a1a;
  --pg-text-secondary: #5f5e5a;
  --pg-text-tertiary: #888780;
  --pg-border: #d8d6cd;
  --pg-photo-bg: #f1efe8;
  --pg-bg: #ffffff;
  --pg-max-width: 720px;
}

:root[data-theme="dark"] {
  --pg-text: #ece9e0;
  --pg-text-secondary: #b0ada3;
  --pg-text-tertiary: #93908a;
  --pg-border: #3a3832;
  --pg-photo-bg: #232219;
  --pg-bg: #161511;
}

body {
  background: var(--pg-bg);
}

.pg {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--pg-text);
  background: var(--pg-bg);
  max-width: var(--pg-max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.pg__back {
  font-size: 0.8125rem;
  color: var(--pg-text-tertiary);
  text-decoration: none;
}

.pg__title {
  font-size: 2rem;
  font-weight: 500;
  margin: 0.75rem 0 1.5rem;
}

.pg__text {
  font-size: 0.9375rem;
  color: var(--pg-text-secondary);
  line-height: 1.7;
  margin: 0 0 1.25rem;
}

.pg__text a {
  color: var(--pg-accent);
  text-decoration: none;
}

.pg__text a:hover {
  text-decoration: underline;
}

.pg__photo {
  float: right;
  width: 240px;
  border-radius: 12px;
  background: var(--pg-photo-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 1.5rem 1.5rem;
  color: var(--pg-text-tertiary);
  font-size: 0.8125rem;
  text-align: center;
}

.pg__photo:not(:has(img)) {
  aspect-ratio: 4 / 3;
}

@media (max-width: 480px) {
  .pg__photo {
    float: none;
    width: 100%;
    margin: 0 0 1.5rem;
  }
}

.pg__photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.pg__photo svg {
  width: 32px;
  height: 32px;
  stroke: var(--pg-text-tertiary);
}

.pg__cta {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pg-accent);
  text-decoration: none;
}

.pg__cta:hover {
  text-decoration: underline;
}

.pg__subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  margin: 2.5rem 0 1rem;
}

.pg__kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pg-text-tertiary);
  margin: 3rem 0 0;
}

.pg__kicker::before {
  content: "";
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--pg-accent);
}

.pg__kicker + .pg__subtitle {
  margin-top: 0.6rem;
}

.pg__toc {
  display: none;
}

.pg__toc-toggle {
  display: none;
}

.pg__toc-backdrop {
  display: none;
}

@media (max-width: 1099.98px) {
  .pg__toc-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--pg-accent);
    color: #fff;
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    z-index: 50;
  }

  .pg__toc-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 48;
  }

  .pg__toc.is-open {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(260px, 80vw);
    padding: 8.5rem 1.5rem 2rem;
    background: var(--pg-bg);
    border-left: 0.5px solid var(--pg-border);
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
    z-index: 49;
  }

  .pg__toc.is-open a {
    font-size: 0.875rem;
    color: var(--pg-text-secondary);
    text-decoration: none;
    padding: 0.6rem 0;
    border-bottom: 0.5px solid var(--pg-border);
  }

  .pg__toc.is-open a.is-active {
    color: var(--pg-accent);
  }
}

@media (min-width: 1100px) {
  .pg__toc {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    position: fixed;
    top: 8rem;
    left: calc(50% + (var(--pg-max-width) / 2) + 2.5rem);
    width: 180px;
  }

  .pg__toc a,
  .pg__toc a:link,
  .pg__toc a:visited {
    font-size: 0.8125rem;
    color: var(--pg-text-tertiary);
    text-decoration: none;
    padding: 0.3rem 0 0.3rem 0.75rem;
    border-left: 2px solid var(--pg-border);
  }

  .pg__toc a:hover,
  .pg__toc a.is-active {
    color: var(--pg-accent);
    border-left-color: var(--pg-accent);
  }
}

.pg__list {
  font-size: 0.9375rem;
  color: var(--pg-text-secondary);
  line-height: 1.7;
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
}

.pg__list a {
  color: var(--pg-accent);
  text-decoration: none;
}

.pg__list a:hover {
  text-decoration: underline;
}

.pg__kontakt-img {
  display: block;
  margin: 0 0 1.5rem;
  border-radius: 8px;
}

.pg__photo-group {
  float: right;
  width: 240px;
  margin: 0 0 1.5rem 1.5rem;
}

.pg__photo-group .pg__photo {
  float: none;
  width: 100%;
  margin: 0 0 0.5rem;
}

@media (max-width: 480px) {
  .pg__photo-group {
    float: none;
    width: 100%;
    margin: 0 0 1.5rem;
  }
}

.pg__quote {
  position: relative;
  margin: 0;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  background: var(--pg-photo-bg);
  border-radius: 12px;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--pg-text);
  line-height: 1.7;
}

.pg__quote::before {
  content: "\201E";
  position: absolute;
  top: 0rem;
  left: 0.6rem;
  font-size: 2.75rem;
  font-style: normal;
  line-height: 1;
  color: var(--pg-accent);
  font-family: Georgia, serif;
}

.pg__quote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--pg-text-tertiary);
}

.pg__footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 0.5px solid var(--pg-border);
  font-size: 0.75rem;
  color: var(--pg-text-tertiary);
}

.pg__footer a,
.pg__footer a:link,
.pg__footer a:visited {
  color: var(--pg-text-tertiary);
  text-decoration: none;
}

.pg__footer a:hover {
  text-decoration: underline;
}

.pg__stats {
  font-size: 0.8125rem;
  color: var(--pg-text-tertiary);
  margin: 0 0 1rem;
}

.pg__map {
  height: 420px;
  border-radius: 12px;
  margin: 0 0 1.5rem;
  border: 0.5px solid var(--pg-border);
  overflow: hidden;
}

.pg__map .leaflet-pin {
  width: 16px;
  height: 16px;
  border-radius: 50% 50% 50% 0;
  border: 1.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transform: rotate(-45deg);
}

.pg__map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 0.5rem 0 1.5rem;
}

.pg__map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--pg-text-secondary);
}

.pg__map-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid #fff;
  box-shadow: 0 0 0 0.5px var(--pg-border);
}

.pg__map .leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.pg__map .leaflet-popup-content {
  margin: 0.6rem 0.8rem;
  font-size: 0.8125rem;
  color: var(--pg-text);
}

.pg__map .leaflet-popup-tip-container {
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.06));
}

.pg__map .leaflet-popup-close-button {
  color: var(--pg-text-tertiary) !important;
}

.pg__map .leaflet-control-zoom {
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
  overflow: hidden;
}

.pg__map .leaflet-control-zoom a {
  background: var(--pg-bg) !important;
  color: var(--pg-text-secondary) !important;
  border-bottom: 0.5px solid var(--pg-border) !important;
}

.pg__map .leaflet-control-zoom a:last-child {
  border-bottom: none !important;
}

.pg__map .leaflet-control-zoom a:hover {
  background: var(--pg-photo-bg) !important;
  color: var(--pg-accent) !important;
}

.pg__map .pg__map-reset {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-top: 8px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: var(--pg-bg);
  color: var(--pg-text-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.pg__map .pg__map-reset:hover {
  background: var(--pg-photo-bg);
  color: var(--pg-accent);
}

.pg__map .pg__map-reset svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pg__map .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.85) !important;
  font-size: 0.6875rem;
  color: var(--pg-text-tertiary);
  border-radius: 6px 0 0 0;
}

.pg__map .leaflet-control-attribution a {
  color: var(--pg-text-tertiary);
}

.pg__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 1rem;
}

.pg__badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  border: 0.5px solid var(--pg-border);
  background: var(--pg-bg);
  color: var(--pg-text-secondary);
  cursor: pointer;
}

.pg__badge[aria-pressed="true"] {
  background: var(--pg-accent);
  border-color: var(--pg-accent);
  color: #fff;
}

.pg__ground-new {
  display: inline-block;
  margin-right: 5px;
  padding: 0 4px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  border-radius: 4px;
  background: #c9971f;
  color: #fff;
  vertical-align: middle;
}

.pg__table-wrap {
  overflow-x: auto;
  margin: 0 0 1.5rem;
  border: 0.5px solid var(--pg-border);
  border-radius: 12px;
}

.pg__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.pg__table th,
.pg__table td {
  padding: 0.5rem 0.55rem;
  text-align: left;
  border-bottom: 0.5px solid var(--pg-border);
}

.pg__table td:nth-child(1),
.pg__table td:nth-child(2),
.pg__table td:nth-child(3),
.pg__table td:nth-child(6) {
  white-space: nowrap;
}

.pg__table th {
  font-weight: 500;
  color: var(--pg-text-tertiary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pg__table td {
  color: var(--pg-text-secondary);
}

.pg__table a {
  color: var(--pg-accent);
  text-decoration: none;
}

.pg__table a:hover {
  text-decoration: underline;
}

.pg__table tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 600px) {
  .pg__table-wrap {
    overflow-x: visible;
    border: none;
    border-radius: 0;
  }

  .pg__table {
    display: block;
    white-space: normal;
  }

  .pg__table thead {
    display: none;
  }

  .pg__table tbody,
  .pg__table tr,
  .pg__table td {
    display: block;
    width: 100%;
  }

  .pg__table tr {
    border: 0.5px solid var(--pg-border);
    border-radius: 12px;
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  .pg__table tr:last-child {
    margin-bottom: 0;
  }

  .pg__table td {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.4rem 0;
    border-bottom: 0.5px solid var(--pg-border);
    text-align: left;
  }

  .pg__table tr td:last-child {
    border-bottom: none;
  }

  .pg__table td:first-child {
    display: none;
  }

  .pg__table td::before {
    font-weight: 500;
    color: var(--pg-text-tertiary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .pg__table td:nth-child(2)::before { content: "Datum"; }
  .pg__table td:nth-child(3)::before { content: "Uhrzeit"; }
  .pg__table td:nth-child(4)::before { content: "Sportart"; }
  .pg__table td:nth-child(5)::before { content: "Spiel"; }
  .pg__table td:nth-child(6)::before { content: "Ergebnis"; }
  .pg__table td:nth-child(7)::before { content: "Ground"; }
  .pg__table td:nth-child(8)::before { content: "Bericht"; }
}
