/* Zusaetze fuer die oeffentliche Live-Ansicht: ruhiger, touch-freundlicher. */

.live-page .metrics-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.live-page .cat-tabs { gap: 4px; }
.live-page .cat-tab {
  padding: 13px 20px;
  font-size: 15px;
  min-height: 44px;
}
.live-page .cat-tab .n { font-size: 12px; padding: 2px 8px; }

.live-page table { font-size: 16px; }
.live-page thead th { font-size: 11.5px; padding: 14px 16px; }
.live-page tbody td { padding: 16px; }
.live-page td.name a { font-size: 18px; }
.live-page td.total { font-size: 26px; }
.live-page td.rank { font-size: 22px; }
.live-page td.time { font-size: 17px; }

.live-page tr.podium td.rank { font-weight: 800; }
.live-page tr.podium-1 { background: #fffaf0; box-shadow: inset 4px 0 0 #d4a017; }
.live-page tr.podium-2 { background: #f8fafc; box-shadow: inset 4px 0 0 #94a3b8; }
.live-page tr.podium-3 { background: #fff7ed; box-shadow: inset 4px 0 0 #b45309; }
.live-page tr.podium-1:hover { background: #fdf3da; }
.live-page tr.podium-2:hover { background: #eef2f6; }
.live-page tr.podium-3:hover { background: #ffecd9; }

.live-page .total-label { display: none; }

@media (max-width: 720px) {
  .live-page .cat-tab { padding: 11px 14px; font-size: 14px; }
  .live-page table { font-size: 14.5px; }
  .live-page td.name a { font-size: 16px; }
  .live-page td.total { font-size: 21px; }
}

/* --------------------------------------- Handy: Zeilen werden zu Karten */

@media (max-width: 640px) {
  .live-page .tablecard { overflow-x: visible; }

  .live-page table,
  .live-page thead,
  .live-page tbody,
  .live-page tr,
  .live-page td {
    display: block;
    width: auto;
  }

  .live-page thead { display: none; }

  .live-page tbody tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "rank name total"
      "loops loops status";
    align-items: center;
    column-gap: 12px;
    row-gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }
  .live-page tbody tr:last-child { border-bottom: 0; }

  .live-page td {
    padding: 0;
    border-bottom: 0;
    min-width: 0;
    width: auto;
  }

  .live-page td.rank { grid-area: rank; font-size: 19px; }
  .live-page td.name { grid-area: name; min-width: 0; }
  .live-page td.name a { font-size: 16px; }
  .live-page td.name .club { white-space: normal; }

  .live-page td.num:not(.total),
  .live-page td.time { display: none; }

  .live-page td.num.total {
    grid-area: total;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding-left: 0;
    font-size: 24px;
  }
  .live-page td.num.total .total-label { display: block; }

  .live-page td.loops { grid-area: loops; }
  .live-page td.status { grid-area: status; text-align: right; }

  .live-page tr.podium-1,
  .live-page tr.podium-2,
  .live-page tr.podium-3 { border-radius: 10px; }
}

/* Zwei Wettbewerbe untereinander */
.comp-block { margin: 0 0 2.2rem; }
.comp-block + .comp-block { border-top: 1px solid var(--line, #e5e5e5); padding-top: 1.4rem; }
.comp-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 .6rem; }
.comp-head h2 { font-size: 1.15rem; margin: 0; letter-spacing: .01em; }
.comp-count { color: #6b7280; font-size: .85rem; }

/* Kategorie-Zwischenkopf: Plaetze gelten je Kategorie */
.live-page tr.cat-head td {
  background: #eef2f7; color: #334155; font-size: 11.5px; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; padding: 9px 16px;
  border-bottom: 1px solid #dbe3ec;
}
@media (max-width: 640px) {
  .live-page tr.cat-head { display: block; }
  .live-page tr.cat-head td { display: block; border-radius: 6px; margin: 10px 0 4px; }
}

/* Grosse Tabs: die beiden Wettbewerbe */
.mode-tabs { display: flex; gap: 8px; margin: 0 0 1rem; flex-wrap: wrap; }
.mode-tab {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-radius: 10px; border: 1px solid var(--line, #e2e8f0);
  background: #fff; color: var(--ink, #0b1220); font-weight: 700; font-size: 15px;
  text-decoration: none; min-height: 46px;
}
.mode-tab .n { font-size: 12px; font-weight: 700; color: #64748b; background: #f1f5f9;
  border-radius: 999px; padding: 2px 8px; }
.mode-tab.active { background: var(--ink, #0b1220); color: #fff; border-color: var(--ink, #0b1220); }
.mode-tab.active .n { background: rgba(255,255,255,.16); color: #fff; }
@media (max-width: 640px) {
  .mode-tabs { gap: 6px; }
  .mode-tab { flex: 1 1 45%; justify-content: center; padding: 10px 12px; font-size: 14px; }
}
