:root {
  --border: #e6e6e6;
  --text: #111;
  --muted: #666;
  --winBg: #dbefdc;
  --hoverBg: #f7f7f7;
  --hoverWinBg: #d4e7d5;
}

/* initialer Gruenton war #eaf8ee, hoverBG war #f7f7f7 */

/* Basis */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0px;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: #fff;
}

.wrap {
  position: relative;
}

/* Groesse je Layout */
body.portrait .wrap {
  width: 300px;
  max-width: 300px;
}

body.landscape .wrap {
  width: 800px;
  max-width: 800px;
}

body.portrait {
  font-size: 10px;
}

body.landscape {
  font-size: 12px;
}

h1 {
  font-size: 14px;
  margin: 0 0 8px 0;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0 0 8px 0;
}

.filters {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  align-items: center;
}

.btn {
  font-size: 10px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  color: var(--text);
}

.btn.active {
  background: #111;
  color: #fff;
  border-color: #111;
}

.pager {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.pager button {
  font-size: 10px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.pager button:disabled {
  opacity: .4;
  cursor: default;
}

/* Tabelle */
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

thead th {
  text-align: left;
  font-weight: 600;
  padding: 6px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

tbody td {
  padding: 6px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.portrait thead th,
body.portrait tbody td {
  padding: 5px 5px;
}

tbody tr:hover {
  background: var(--hoverBg);
}

tbody tr.win {
  background: var(--winBg);
}

tbody tr.win:hover {
  background: var(--hoverWinBg);
}

tbody tr.hover-outline {
  outline: 1px solid #ddd;
  outline-offset: -1px;
}

/* Spaltenbreiten Portrait */
body.portrait .c-date {
  width: 50px;
  text-align: left;
  padding-right: 0;
}

body.portrait .c-group {
  width: 55px;
  text-align: center;
}

body.portrait .c-score {
  width: 35px;
  text-align: center;
}

body.portrait .matchwrap {
  white-space: normal;
  line-height: 1.15;
}

/* Spaltenbreiten Landscape */
body.landscape .c-date {
  width: 130px;
  text-align: left;
  padding-right: 0;
}

body.landscape .c-group {
  width: 70px;
  text-align: center;
}

body.landscape .c-score {
  width: 40px;
  text-align: center;
}

/* Tooltip (global overlay) */
#tooltip {
  display: none;
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .20);
  padding: 8px;
  font-size: 12px;
  color: var(--text);
  max-width: min(760px, calc(100vw - 20px));
  pointer-events: none;
}

#tooltip .muted {
  color: var(--muted);
  font-size: 11px;
}


/* Teams as buttons */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px 0;
}

.teambtn {
  white-space: nowrap;
}

/* --- mirror Stage F UI tweaks ---*)
.c-group{ text-align:center; }

/* Sieg grÃ¼n hinterlegen 
.row.win td{ background:#eaf8ee; }

/* Datum schmaler (kurzes Datum) 
.c-date{ width:64px; white-space:nowrap; }*/

/* Ergebnis als Link */
.c-score a {
  color: inherit;
  text-decoration: underline;
}

/* (Optional) Team-Spalte ist nicht mehr verwendet */
/* .c-team { display:none; } */