*{box-sizing:border-box}body{margin:0;font:15px system-ui,Arial;background:#f4f6f8;color:#17202a}header{background:#1f2937;color:#fff;padding:14px 22px;display:flex;align-items:center;gap:35px;flex-wrap:wrap;position:sticky;top:0;z-index:20}h1{margin:0;font-size:24px}.mainnav{display:flex;gap:8px}.navdrop{position:relative}.navbtn{background:#374151;color:white;font-size:15px;padding:10px 16px}.dropdown{display:none;position:absolute;top:calc(100% + 5px);left:0;min-width:210px;background:white;color:#17202a;border-radius:8px;box-shadow:0 5px 18px #0003;overflow:hidden;padding:5px;z-index:30}.dropdown.open{display:block}.dropdown button{display:block;width:100%;text-align:left;background:white;border-radius:5px}.dropdown button:hover{background:#eef2f7}.dropdown .menu-title{font-weight:700;color:#667085}.dropdown .menu-add{border-top:1px solid #ddd;margin-top:4px;padding-top:10px}button{border:0;border-radius:7px;padding:9px 13px;background:#e5e7eb;cursor:pointer}button:hover{filter:brightness(.96)}main{max-width:1350px;margin:22px auto;padding:0 15px}.hidden{display:none}.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.toolbar h2{margin:8px 0}.muted{color:#667085}.day,.player,.panel,.chart-panel{background:white;border-radius:10px;padding:16px;box-shadow:0 1px 5px #0001;margin-bottom:14px}.day{display:grid;grid-template-columns:190px 1fr auto;gap:15px;align-items:center}.day.selected{outline:2px solid #9ca3af}.latest{font-size:11px;margin-left:7px;border-radius:10px;padding:3px 6px;background:#e5e7eb;color:#374151}.actions{display:flex;gap:7px;flex-wrap:wrap}.day-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.day-head h3{margin:0 0 5px}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%;background:white}th,td{border:1px solid #ddd;padding:7px;text-align:center}th{background:#eef2f7}.results td{font-weight:600;font-size:16px;min-width:65px}.results .score-one{background:#b7efc5!important;color:#075b24}.results .score-six{background:#ffb8b8!important;color:#8b0000}.results .total td,.results .total th{font-weight:800;background:#e5e7eb}.score{width:55px}input,textarea,select{padding:7px;border:1px solid #cbd5e1;border-radius:6px;width:100%}.box{background:white;padding:22px;border-radius:10px;width:min(480px,92vw)}.box>*{margin-bottom:10px}.modal{position:fixed;inset:0;background:#0006;display:grid;place-items:center;z-index:50}.modal.hidden{display:none}.player{display:flex;justify-content:space-between;align-items:center;gap:15px}.chart-panel h3{margin-top:0}.chart3d{display:flex;align-items:flex-end;gap:13px;min-height:250px;overflow-x:auto;padding:25px 20px 8px;perspective:900px;border-radius:8px;background:linear-gradient(#fff,#f3f4f6)}.baritem{min-width:55px;height:230px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;position:relative}.barvalue{font-weight:700;margin-bottom:4px}.bar3d{width:34px;min-height:3px;background:linear-gradient(90deg,#64748b 0 72%,#475569 72% 100%);position:relative;transform:skewY(-8deg);box-shadow:7px 6px 0 #33415555}.bar3d:before{content:"";position:absolute;left:-8px;top:-5px;width:34px;height:8px;background:#94a3b8;transform:skewX(-42deg);transform-origin:right bottom}.bar3d:after{content:"";position:absolute;right:-8px;top:-1px;width:8px;height:100%;background:#334155;transform:skewY(-42deg);transform-origin:left top}.barlabel{font-size:11px;margin-top:9px;white-space:nowrap;transform:rotate(-35deg);transform-origin:top center}.distribution{display:grid;gap:6px}.dist-row{display:grid;grid-template-columns:70px repeat(6,1fr);gap:6px;align-items:center;padding:7px;border-bottom:1px solid #eee}.dist-one{background:#b7efc5;padding:3px 5px;border-radius:4px}.dist-six{background:#ffb8b8;padding:3px 5px;border-radius:4px}@media(max-width:850px){header{align-items:flex-start}.day{grid-template-columns:1fr}.player{flex-direction:column;align-items:flex-start}.dist-row{grid-template-columns:60px repeat(3,1fr)}.day-head{align-items:flex-start;flex-direction:column}}


/* Excel-nahe Statistik-Tabellen */
.excel-stat { overflow: hidden; }
.excel-stat h3 { margin-top: 0; }
.excel-table { min-width: 620px; }
.excel-table th, .excel-table td { padding: 6px 9px; white-space: nowrap; }
.excel-table thead th { font-weight: 700; }
.excel-table tbody th { font-weight: 600; }
.excel-table .excel-total th, .excel-table .excel-total td { font-weight: 800; }
.excel-table .freq-one { background: #b7efc5; color: #075b24; font-weight: 700; }
.excel-table .freq-six { background: #ffb8b8; color: #8b0000; font-weight: 700; }
@media (max-width: 768px) {
  .excel-stat { padding: 11px; }
  .excel-table { min-width: 560px; }
  .excel-table th, .excel-table td { padding: 5px 6px; font-size: .82rem; }
}


/* Excel-Statistiken: Häufigkeitstabelle ohne farbliche Hervorhebung. */
.excel-table.frequency td,
.excel-table.frequency th {
  background: inherit;
  color: inherit;
}
.excel-table.frequency .freq-one,
.excel-table.frequency .freq-six {
  background: inherit !important;
  color: inherit !important;
}

/* Die beiden Excel-Auswertungen werden einzeln über das Statistik-Menü gewählt. */
.stat-choice {
  white-space: nowrap;
}


/* Excel-ähnliche Statistikdarstellung: links Tabelle, rechts 3D-Grafik */
.excel-stat-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(520px, 1.1fr);
  gap: 18px;
  align-items: start;
}
.excel-stat-layout > .excel-stat { min-width: 0; }
.excel-chart {
  background: var(--panel, #fff);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  padding: 10px 10px 6px;
  min-width: 0;
  overflow: hidden;
}
.excel-chart-title { font-weight: 600; margin: 2px 4px 0; }
.excel-chart svg { display:block; width:100%; height:auto; }
.excel-table { width:100%; border-collapse:collapse; }
.excel-table th, .excel-table td { padding: 5px 7px; text-align:center; border:1px solid #d9d9d9; }
.excel-table th:first-child, .excel-table td:first-child { text-align:center; }
.excel-table thead th { font-weight:600; }
.excel-total th, .excel-total td { font-weight:700; }
@media (max-width: 1100px) {
  .excel-stat-layout { grid-template-columns: 1fr; }
  .excel-chart { order: 2; }
}
@media (max-width: 600px) {
  .excel-stat-layout { gap:10px; }
  .excel-table th, .excel-table td { padding:4px 3px; font-size:.78rem; }
  .excel-chart { padding:6px 4px 3px; }
}


/* V9: Statistik-Tabellen vollständig ohne horizontalen Scrollbalken. */
.excel-stat .tablewrap { overflow: visible; width: 100%; }
.excel-table { width: 100%; min-width: 0 !important; table-layout: fixed; }
.excel-table th, .excel-table td { white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.excel-table th:first-child, .excel-table td:first-child { width: 52px; }
.excel-table.frequency th:not(:first-child), .excel-table.frequency td:not(:first-child) { width: calc((100% - 52px) / 6); }
@media (max-width: 600px) {
  .excel-table th, .excel-table td { padding: 4px 2px; font-size: .72rem; line-height: 1.15; }
  .excel-table th:first-child, .excel-table td:first-child { width: 38px; }
  .excel-table.frequency th:not(:first-child), .excel-table.frequency td:not(:first-child) { width: calc((100% - 38px) / 6); }
}

/* V9.1: Statistiktabellen passen immer in ihren Container. */
.excel-stat-layout, .excel-stat, .excel-stat .tablewrap { min-width: 0; max-width: 100%; }
.excel-table { table-layout: fixed; width: 100%; min-width: 0 !important; }
.excel-table th, .excel-table td { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.excel-table th:first-child, .excel-table td:first-child { width: 11%; }
.excel-table:not(.frequency) th:not(:first-child), .excel-table:not(.frequency) td:not(:first-child) { width: 22.25%; }
.excel-table.frequency th:not(:first-child), .excel-table.frequency td:not(:first-child) { width: 14.833%; }

/* V9.2: Statistik-Tabellen niemals horizontal scrollen. */
.excel-stat-layout{min-width:0;max-width:100%;overflow:hidden}
.excel-stat{min-width:0;max-width:100%;overflow:hidden}
.excel-stat .tablewrap{overflow-x:hidden;overflow-y:visible}
.excel-table{min-width:0!important;width:100%;table-layout:fixed}
.excel-table th,.excel-table td{white-space:normal;overflow-wrap:anywhere;word-break:break-word}


/* V10: echte interaktive 3D-Diagramme, optisch an die Excel-Originale angelehnt. */
.excel-stat-layout {
  grid-template-columns: minmax(410px, 450px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.chart3d-panel {
  padding: 0;
  min-height: 720px;
  border: 1px solid #a9a9a9;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  overflow: hidden;
}
.echart-3d {
  width: 100%;
  height: 720px;
  min-width: 0;
}
.chart-unavailable {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  color: #667085;
  background: #fff;
}
@media (max-width: 1050px) {
  .excel-stat-layout { grid-template-columns: 1fr; }
  .chart3d-panel { min-height: 620px; }
  .echart-3d { height: 620px; }
}
@media (max-width: 600px) {
  .chart3d-panel { min-height: 500px; }
  .echart-3d { height: 500px; }
}


/* V10.1: Tabellenkopf der Excel-Statistiken bleibt einzeilig. Die linke Spalte wurde nur leicht verbreitert. */
.excel-table thead th,
.excel-table .excel-total th {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}
.excel-table.frequency thead th {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
@media (max-width: 1050px) {
  .excel-stat-layout { grid-template-columns: 1fr; }
}

/* V10.2: Frequenz-Tabelle – Kopfzeilen müssen wirklich innerhalb ihrer Zellen bleiben. */
.excel-table.frequency thead th {
  font-size: 12px;
  line-height: 1.1;
  padding: 6px 3px;
  letter-spacing: -0.15px;
}
.excel-table.frequency th:first-child,
.excel-table.frequency td:first-child {
  width: 11%;
}
.excel-table.frequency th:not(:first-child),
.excel-table.frequency td:not(:first-child) {
  width: 14.833%;
}
@media (max-width: 600px) {
  .excel-table.frequency thead th {
    font-size: 10px;
    padding: 5px 1px;
    letter-spacing: -0.2px;
  }
}


/* V11: Verwaltungsschutz */
.admin-btn { background:#374151; color:#fff; font-weight:600; margin-left:auto; white-space:nowrap; }
.admin-btn.admin-active { background:#166534; }
.menu-locked { color:#7c2d12 !important; font-weight:600; border-top:1px solid #eee; margin-top:4px; }
.locked-badge { color:#7c2d12; font-size:13px; font-weight:600; white-space:nowrap; }
.admin-locked-panel { text-align:center; padding:32px 20px; }
.admin-locked-panel h3 { margin-top:0; }
.modal-actions { display:flex; gap:8px; margin-top:4px; }
.modal-actions button { margin-bottom:0; }
@media (max-width:850px) {
  .admin-btn { margin-left:0; }
  .mainnav { flex-wrap:wrap; }
}


/* V11.2: Navigations-Dropdowns müssen oberhalb des Spieltags liegen. */
header { z-index: 1000; }
.mainnav { position: relative; z-index: 1001; }
.navdrop { z-index: 1002; }
.dropdown { z-index: 1100; }

@media (max-width: 600px) {
  .latest-panel { padding: 11px; }
  .latest-panel .results th,
  .latest-panel .results td { padding: 4px 3px; font-size: .78rem; line-height: 1.15; }
  .latest-panel .results th:first-child,
  .latest-panel .results td:first-child { width: 38px; }
}

header { position:sticky; top:0; z-index:10000; overflow:visible !important; }
.mainnav { position:relative; z-index:10001; overflow:visible !important; }
.navdrop { position:relative; z-index:10002; overflow:visible !important; }
.dropdown { position:absolute; top:calc(100% + 5px); left:0; z-index:10003 !important; overflow:visible; }
@media (max-width:600px) {
  .latest-panel { padding:11px; }
  .latest-panel .results th, .latest-panel .results td { padding:4px 3px; font-size:.78rem; line-height:1.15; }
  .latest-panel .results th:first-child, .latest-panel .results td:first-child { width:38px; min-width:38px !important; }
  .latest-panel .results th:not(:first-child), .latest-panel .results td:not(:first-child) { width:calc((100% - 38px) / var(--player-count,1)); }
}



/* V11.5: Spieler-Dropdown als echtes Overlay. Die Positionierung erfolgt
   per JS fixed, damit das Menü niemals hinter dem aktuellen Spieltag liegt. */
.dropdown {
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
#menu-players { min-width: 220px; }

/* ============================================================
   Responsive Darstellung des letzten Spieltags
   ============================================================ */
#days{min-height:0}
#currentDayTitle{margin-top:.25rem;margin-bottom:.55rem}
#dayList{margin-bottom:.65rem}
#scoreEditor{margin-top:.5rem}
#scoreEditor table{width:100%;border-collapse:collapse}
#scoreEditor th,#scoreEditor td{padding:.28rem .45rem;line-height:1.15}

@media (min-width:901px) and (min-height:700px){
  #days{max-height:calc(100vh - 115px);overflow:hidden}
  #scoreEditor{max-height:calc(100vh - 255px);overflow:auto}
}
@media (min-width:769px) and (max-height:699px){
  #days{max-height:calc(100vh - 95px);overflow:hidden}
  #currentDayTitle{font-size:1.25rem;margin-bottom:.35rem}
  #scoreEditor th,#scoreEditor td{padding:.18rem .35rem;font-size:.9rem}
  #scoreEditor{max-height:calc(100vh - 205px);overflow:auto}
}
@media (max-width:768px){
  #days{width:100%;max-width:100%;overflow-x:hidden}
  #currentDayTitle{font-size:clamp(1.05rem,4vw,1.35rem);margin-bottom:.4rem}
  #scoreEditor{width:100%;max-width:100%;overflow-x:auto;margin-top:.35rem}
  #scoreEditor table{min-width:0}
  #scoreEditor th,#scoreEditor td{padding:.24rem .3rem;font-size:clamp(.78rem,2vw,.92rem)}
}
@media (max-width:480px){
  #days{padding-left:.55rem;padding-right:.55rem}
  #currentDayTitle{font-size:1.05rem;line-height:1.15}
  #scoreEditor{margin-top:.25rem}
  #scoreEditor th,#scoreEditor td{padding:.18rem .22rem;font-size:.74rem;line-height:1.05}
  #scoreEditor input,#scoreEditor select,#scoreEditor button{font-size:.78rem;min-height:30px}
}
@media (max-width:480px) and (max-height:700px){
  #currentDayTitle{font-size:.98rem;margin-bottom:.2rem}
  #scoreEditor th,#scoreEditor td{padding:.14rem .18rem;font-size:.7rem}
}

/* Responsive Darstellung des letzten Spieltags */
#days{min-height:0}
#currentDayTitle{margin-top:.25rem;margin-bottom:.55rem}
#dayList{margin-bottom:.65rem}
#scoreEditor{margin-top:.5rem}
#scoreEditor table{width:100%;border-collapse:collapse}
#scoreEditor th,#scoreEditor td{padding:.28rem .45rem;line-height:1.15}
@media (min-width:901px) and (min-height:700px){#days{max-height:calc(100vh - 115px);overflow:hidden}#scoreEditor{max-height:calc(100vh - 255px);overflow:auto}}
@media (min-width:769px) and (max-height:699px){#days{max-height:calc(100vh - 95px);overflow:hidden}#currentDayTitle{font-size:1.25rem;margin-bottom:.35rem}#scoreEditor th,#scoreEditor td{padding:.18rem .35rem;font-size:.9rem}#scoreEditor{max-height:calc(100vh - 205px);overflow:auto}}
@media (max-width:768px){#days{width:100%;max-width:100%;overflow-x:hidden}#currentDayTitle{font-size:clamp(1.05rem,4vw,1.35rem);margin-bottom:.4rem}#scoreEditor{width:100%;max-width:100%;overflow-x:auto;margin-top:.35rem}#scoreEditor table{min-width:0}#scoreEditor th,#scoreEditor td{padding:.24rem .3rem;font-size:clamp(.78rem,2vw,.92rem)}}
@media (max-width:480px){#days{padding-left:.55rem;padding-right:.55rem}#currentDayTitle{font-size:1.05rem;line-height:1.15}#scoreEditor{margin-top:.25rem}#scoreEditor th,#scoreEditor td{padding:.18rem .22rem;font-size:.74rem;line-height:1.05}#scoreEditor input,#scoreEditor select,#scoreEditor button{font-size:.78rem;min-height:30px}}
@media (max-width:480px) and (max-height:700px){#currentDayTitle{font-size:.98rem;margin-bottom:.2rem}#scoreEditor th,#scoreEditor td{padding:.14rem .18rem;font-size:.7rem}}


/* V12: Kein horizontaler Seiten-Scroll; die responsive Spieltagsdarstellung bleibt v5-basiert. */
html, body { max-width:100%; overflow-x:hidden; }
main { min-width:0; }
#days, #scoreEditor { min-width:0; max-width:100%; }


/* V13: Spieltagsanzeige wie V5, aber ohne horizontales Scrollen.
   Die Tabelle wird immer auf die verfügbare Breite eingepasst. */
.latest-panel { width:100%; max-width:100%; min-width:0; overflow:hidden; }
.latest-panel .tablewrap { width:100%; max-width:100%; min-width:0; overflow-x:hidden; overflow-y:visible; }
.latest-panel table.results {
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  table-layout:fixed !important;
}
.latest-panel table.results th,
.latest-panel table.results td {
  min-width:0 !important;
  max-width:none;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  padding:7px 4px;
}
.latest-panel table.results th:first-child,
.latest-panel table.results td:first-child {
  width:42px !important;
}
.latest-panel table.results th:not(:first-child),
.latest-panel table.results td:not(:first-child) {
  width:auto !important;
}
.latest-panel .day-head { min-width:0; }
.latest-panel .day-head > div { min-width:0; }
@media (max-width:850px) {
  .latest-panel { padding:11px; }
  .latest-panel table.results th,
  .latest-panel table.results td {
    padding:5px 2px;
    font-size:.78rem;
    line-height:1.1;
  }
  .latest-panel table.results th:first-child,
  .latest-panel table.results td:first-child { width:34px !important; }
}
@media (max-width:520px) {
  .latest-panel table.results th,
  .latest-panel table.results td {
    padding:4px 1px;
    font-size:.68rem;
  }
  .latest-panel table.results th:first-child,
  .latest-panel table.results td:first-child { width:30px !important; }
}


/* V14: Aktueller Spieltag – feste Spaltenanteile, damit wirklich alle Spieler
   innerhalb des Panels dargestellt werden. Keine horizontale Scrollfläche. */
#scoreEditor .latest-panel {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
#scoreEditor .latest-panel .tablewrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden !important;
}
#scoreEditor .latest-panel .results {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}
#scoreEditor .latest-panel .results th,
#scoreEditor .latest-panel .results td {
  min-width: 0 !important;
  width: calc((100% - 42px) / var(--player-count, 1));
  max-width: none;
  padding: 6px 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#scoreEditor .latest-panel .results th:first-child,
#scoreEditor .latest-panel .results td:first-child {
  width: 42px !important;
}
#scoreEditor .latest-panel .results th {
  font-size: 14px;
  line-height: 1.15;
}
#scoreEditor .latest-panel .results td {
  font-size: 16px;
}
@media (max-width: 850px) {
  #scoreEditor .latest-panel .results th,
  #scoreEditor .latest-panel .results td {
    padding: 5px 2px;
    font-size: 12px;
  }
  #scoreEditor .latest-panel .results th:first-child,
  #scoreEditor .latest-panel .results td:first-child {
    width: 34px !important;
  }
  #scoreEditor .latest-panel .results th:not(:first-child),
  #scoreEditor .latest-panel .results td:not(:first-child) {
    width: calc((100% - 34px) / var(--player-count, 1));
  }
}
@media (max-width: 520px) {
  #scoreEditor .latest-panel .results th,
  #scoreEditor .latest-panel .results td {
    padding: 4px 1px;
    font-size: 10px;
  }
  #scoreEditor .latest-panel .results th:first-child,
  #scoreEditor .latest-panel .results td:first-child {
    width: 30px !important;
  }
  #scoreEditor .latest-panel .results th:not(:first-child),
  #scoreEditor .latest-panel .results td:not(:first-child) {
    width: calc((100% - 30px) / var(--player-count, 1));
  }
}


/* V15: Aktueller Spieltag darf selbst keinen horizontalen Scrollcontainer erzeugen. */
.latest-panel,
.latest-panel .tablewrap,
#scoreEditor .latest-panel,
#scoreEditor .latest-panel .tablewrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

#scoreEditor .latest-panel .results {
  display: table !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

#scoreEditor .latest-panel .results th,
#scoreEditor .latest-panel .results td {
  min-width: 0 !important;
  max-width: 0;
  overflow: hidden !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#scoreEditor .latest-panel .results th:first-child,
#scoreEditor .latest-panel .results td:first-child {
  width: 42px !important;
  min-width: 42px !important;
}

#scoreEditor .latest-panel .results th:not(:first-child),
#scoreEditor .latest-panel .results td:not(:first-child) {
  width: calc((100% - 42px) / var(--player-count, 1)) !important;
}


/* V16: Der Spieleranzahl-Wert wird jetzt korrekt aus app.js gesetzt.
   Die aktuelle Spieltagstabelle darf niemals horizontal scrollbar werden. */
#scoreEditor .latest-panel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
#scoreEditor .latest-panel .tablewrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
#scoreEditor .latest-panel table.results {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}
#scoreEditor .latest-panel table.results th,
#scoreEditor .latest-panel table.results td {
  min-width: 0 !important;
  max-width: none !important;
  width: auto;
  overflow: hidden !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#scoreEditor .latest-panel table.results th:first-child,
#scoreEditor .latest-panel table.results td:first-child {
  width: 42px !important;
  min-width: 42px !important;
}
#scoreEditor .latest-panel table.results th:not(:first-child),
#scoreEditor .latest-panel table.results td:not(:first-child) {
  width: calc((100% - 42px) / var(--player-count, 1)) !important;
}
@media (max-width: 850px) {
  #scoreEditor .latest-panel table.results th,
  #scoreEditor .latest-panel table.results td {
    padding: 4px 2px !important;
    font-size: 12px !important;
  }
}
@media (max-width: 520px) {
  #scoreEditor .latest-panel table.results th:first-child,
  #scoreEditor .latest-panel table.results td:first-child {
    width: 32px !important;
    min-width: 32px !important;
  }
  #scoreEditor .latest-panel table.results th:not(:first-child),
  #scoreEditor .latest-panel table.results td:not(:first-child) {
    width: calc((100% - 32px) / var(--player-count, 1)) !important;
  }
  #scoreEditor .latest-panel table.results th,
  #scoreEditor .latest-panel table.results td {
    padding: 3px 1px !important;
    font-size: 10px !important;
  }
}

/* V17: Der aktuelle Spieltag wird vollständig als normaler Seiteninhalt dargestellt.
   Kein eigener vertikaler Scrollcontainer um die Ergebnistabelle. Der Browser darf
   bei Bedarf die gesamte Seite scrollen. */
#days {
  max-height: none !important;
  overflow: visible !important;
}
#scoreEditor {
  max-height: none !important;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}
#scoreEditor .latest-panel,
#scoreEditor .latest-panel .tablewrap {
  max-height: none !important;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

/* V18: Aktueller Spieltag auf großen Bildschirmen etwas größer,
   ohne die responsive Breite/Anpassung der Tabelle zu verlieren. */
@media (min-width: 601px) {
  .latest-panel .results th,
  .latest-panel .results td {
    padding: clamp(7px, 0.45vw, 9px) clamp(5px, 0.38vw, 8px);
  }
  .latest-panel .results td {
    font-size: clamp(16px, 0.98vw, 17px);
  }
}


/* V19: Die erste Spalte muss auch das Wort "Gesamt" vollständig anzeigen.
   Die Tabelle bleibt weiterhin vollständig responsive. */
#scoreEditor .latest-panel table.results th:first-child,
#scoreEditor .latest-panel table.results td:first-child {
  width: 62px !important;
  min-width: 62px !important;
  max-width: 62px !important;
}
#scoreEditor .latest-panel table.results .total th:first-child {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
@media (max-width: 850px) {
  #scoreEditor .latest-panel table.results th:first-child,
  #scoreEditor .latest-panel table.results td:first-child {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
  }
}
@media (max-width: 520px) {
  #scoreEditor .latest-panel table.results th:first-child,
  #scoreEditor .latest-panel table.results td:first-child {
    width: 50px !important;
    min-width: 50px !important;
    max-width: 50px !important;
  }
}
@media (max-width: 380px) {
  #scoreEditor .latest-panel table.results th:first-child,
  #scoreEditor .latest-panel table.results td:first-child {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
  }
}
