/* Mobile Spieltermine und Kalender: kompakt, touchfähig, einheitliche Orts-Badges. */
#spiele .venue-badge {
  display: inline-flex;
  min-width: 84px;
  min-height: 27px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #d6e3ec;
  border-radius: 6px;
  color: #234962;
  background: #f0f6fb;
  white-space: nowrap;
}

#spiele .venue-badge--away {
  border-color: #dfd8c8;
  color: #69562e;
  background: #f7f5ef;
}

#spiele .venue-badge--unknown {
  color: var(--muted);
  background: var(--surface-soft);
}

#spiele .venue-badge svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#spiele .venue-badge > span {
  color: inherit;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
}

#spiele .match-card > .venue-badge {
  justify-self: end;
}

#spiele .calendar-legend {
  gap: 6px;
}

#spiele .calendar-legend .venue-badge {
  min-width: 0;
  min-height: 25px;
  padding: 4px 7px;
}

#spiele .calendar-dot {
  min-height: 24px;
  gap: 3px;
  border: 1px solid #d6e3ec;
  color: #234962;
  background: #f0f6fb;
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  font: inherit;
  text-transform: none;
}

#spiele .calendar-dot--away {
  border-color: #dfd8c8;
  color: #69562e;
  background: #f7f5ef;
}

#spiele .calendar-dot svg {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#spiele .calendar-dot-team {
  overflow: hidden;
  font-size: 8px;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#spiele .calendar-dot:hover,
#spiele .calendar-dot.is-active {
  border-color: currentColor;
  box-shadow: 0 5px 14px rgba(8, 29, 49, 0.12);
}

#spiele .calendar-dot:focus-visible {
  outline: 2px solid var(--navy-700);
  outline-offset: 2px;
}

.calendar-match-popover {
  position: fixed;
  z-index: 1000;
  width: min(300px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid #cbd8e4;
  border-radius: 14px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 20px 60px rgba(8, 29, 49, 0.2);
}

.calendar-match-popover[hidden] {
  display: none;
}

.calendar-match-popover-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.calendar-match-popover-meta > span:last-child {
  text-align: right;
}

.calendar-match-popover .venue-badge {
  min-width: 0;
  min-height: 25px;
  padding: 4px 7px;
}

.calendar-match-pairing {
  display: grid;
  gap: 2px;
  margin: 10px 0 0;
}

.calendar-match-pairing strong {
  color: var(--navy-900);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.calendar-match-pairing > span {
  color: var(--muted);
  font-size: 10px;
}

.calendar-match-location {
  margin: 9px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  #spiele .match-grid {
    gap: 7px;
  }

  #spiele .match-card {
    grid-template-columns: 62px minmax(0, 1fr) auto;
    min-height: 0;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 14px;
    box-shadow: none;
  }

  #spiele .match-card:hover {
    transform: none;
  }

  #spiele .match-date-block {
    grid-column: 1;
    min-height: 0;
    align-self: start;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  #spiele .match-date-block b {
    font-size: 12px;
    line-height: 1.25;
  }

  #spiele .match-date-block span {
    margin-top: 1px;
    font-size: 9px;
    line-height: 1.25;
  }

  #spiele .match-meta {
    gap: 5px;
  }

  #spiele .match-meta .team-badge {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 8px;
    font-size: 10px;
  }

  #spiele .match-meta small {
    font-size: 8px;
    letter-spacing: 0.05em;
  }

  #spiele .match-info h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 4px 0 1px;
    font-size: 13px;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #spiele .match-info p {
    overflow: hidden;
    font-size: 9px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #spiele .match-card > .venue-badge {
    min-width: 70px;
    min-height: 25px;
    align-self: center;
    padding: 4px 6px;
  }

  #spiele .match-card > .venue-badge > span {
    font-size: 9px;
  }

  #spiele .calendar-dot {
    gap: 2px;
    padding: 2px 1px;
  }

  #spiele .calendar-dot svg {
    width: 9px;
    height: 9px;
    flex-basis: 9px;
  }

  #spiele .calendar-dot-team {
    font-size: 7px;
  }
}

@media (max-width: 359px) {
  #spiele .match-card {
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 6px;
    padding-inline: 8px;
  }

  #spiele .match-card > .venue-badge {
    min-width: 66px;
  }
}
