@page { size: A4 portrait; margin: 14mm 12mm; }
* { box-sizing: border-box; }
body { margin: 0; background: #e9e8e3; color: #111; font: 10.5pt/1.35 "Segoe UI", Roboto, Arial, sans-serif; }

.druckleiste { position: sticky; top: 0; z-index: 5; display: flex; gap: 16px; align-items: center; padding: 10px 16px; background: #1f5a45; color: #fff; font-family: system-ui, sans-serif; font-size: 14px; }
.druckleiste a { color: #fff; }
.druckleiste button { font: inherit; padding: 6px 16px; border: 0; border-radius: 4px; background: #fff; color: #1f5a45; font-weight: 600; cursor: pointer; }

.blatt { background: #fff; width: 210mm; min-height: 297mm; margin: 16px auto; padding: 14mm 12mm; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
body.quer .blatt { width: 297mm; min-height: 210mm; }

.blattkopf { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 14px; }
.blattkopf h1 { font-size: 16pt; margin: 2px 0; }
.verein { font-size: 9pt; text-transform: uppercase; letter-spacing: .06em; color: #444; }
.untertitel { font-size: 12.5pt; font-weight: 600; }
.blattkopf-rechts { text-align: right; font-size: 9.5pt; color: #333; }

h2 { font-size: 12pt; margin: 18px 0 6px; }
h2 small { font-weight: normal; color: #555; font-size: 9.5pt; }

table.rang { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
table.rang th, table.rang td { border-bottom: 1px solid #c9c9c9; padding: 4px 6px; text-align: left; }
table.rang th { border-bottom: 1.5px solid #111; font-size: 8.5pt; text-transform: uppercase; letter-spacing: .03em; }
table.rang .z { text-align: right; font-variant-numeric: tabular-nums; }
table.rang .m { text-align: center; font-variant-numeric: tabular-nums; }
table.rang td.platz { font-weight: 700; width: 3.2em; }
table.rang td.summe { font-weight: 700; }
table.rang td.s { color: #333; width: 2.4em; }
table.rang tr.p1 td, table.rang tr.p2 td, table.rang tr.p3 td { background: #f3f1ea; }
table.rang tr.p1 td.platz::after { content: " ●"; color: #b8892b; }
table.rang tr.p2 td.platz::after { content: " ●"; color: #8d969a; }
table.rang tr.p3 td.platz::after { content: " ●"; color: #9a6a3c; }
table.rang tr.ow td { color: #777; }
table.rang tfoot td { border-top: 1.5px solid #111; border-bottom: 0; font-weight: 700; }
.klein-r { font-size: 8pt; color: #555; }

.fussnote { font-size: 8.5pt; color: #444; margin-top: 6px; }

/* Siegerübersicht */
.podest { display: grid; grid-template-columns: repeat(auto-fill, minmax(78mm, 1fr)); gap: 8px 14px; }
.podest section { border: 1px solid #c9c9c9; padding: 8px 10px; break-inside: avoid; }
.podest h3 { margin: 0 0 4px; font-size: 10.5pt; }
.podest ol { margin: 0; padding: 0; list-style: none; }
.podest li { display: flex; justify-content: space-between; gap: 8px; padding: 2px 0; }
.podest li b { display: inline-block; width: 2.2em; }
.podest section.gesamt { grid-column: 1 / -1; border-width: 2px; border-color: #111; }

/* Startliste zum Mitschreiben */
table.leer td { height: 9mm; }
table.leer td.box { border: 1px solid #999; width: 9mm; }

.seitenumbruch { break-before: page; }
.unterschrift { display: flex; gap: 40mm; margin-top: 18mm; font-size: 9pt; }
.unterschrift div { border-top: 1px solid #111; padding-top: 3px; min-width: 55mm; }

@media print {
  body { background: #fff; }
  .druckleiste { display: none; }
  .blatt { width: auto; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
  body.quer .blatt { width: auto; min-height: 0; }
  .blatt + .blatt { break-before: page; }
  tr { break-inside: avoid; }
}

/* Handy/Tablet: Blatt auf Bildschirmbreite, Druck bleibt unverändert A4 */
@media screen and (max-width: 820px) {
  .druckleiste { flex-wrap: wrap; gap: 8px 14px; }
  .blatt, body.quer .blatt { width: auto; min-height: 0; margin: 8px; padding: 16px 12px; overflow-x: auto; }
  .blattkopf { flex-direction: column; gap: 6px; }
  .blattkopf-rechts { text-align: left; }
  .blattkopf h1 { font-size: 14pt; }
  table.rang th, table.rang td { padding: 4px 3px; }
  table.rang { font-size: 9.5pt; }
  table.rang td.s { width: auto; }
  .podest { grid-template-columns: 1fr; }
  .unterschrift { gap: 12mm; flex-wrap: wrap; }
}
@media screen and (max-width: 480px) {
  /* sehr schmale Handys: Tabellen etwas kleiner */
  table.rang { font-size: 8.5pt; }
}
