:root{font-family:system-ui,Segoe UI,Arial,sans-serif;color:#1a2940;background:#f2f5f9}*{box-sizing:border-box}body{margin:0}header{background:#10223c;color:white;padding:18px max(20px,calc((100vw - 1180px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}header strong{font-size:20px}header small{display:block;color:#afc1d6;margin-top:4px}nav{display:flex;gap:9px;flex-wrap:wrap}nav a{color:#d7e6f8;text-decoration:none;padding:9px 12px;border-radius:8px}nav a:hover,nav a.active{background:#304b70;color:white}main{max-width:1180px;margin:30px auto;padding:0 20px}h1{font-size:30px;margin:0 0 6px}p.sub{color:#65758a;margin:0 0 24px}.panel{background:white;border:1px solid #dde5ee;border-radius:13px;padding:22px;margin-bottom:20px;box-shadow:0 3px 12px #1c36520a}.flex{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.field{display:flex;flex-direction:column;gap:7px;flex:1;min-width:150px}label{font-size:13px;font-weight:650;color:#40516a}input,select{width:100%;border:1px solid #cbd6e3;border-radius:8px;padding:11px;font:inherit;background:white;color:#14243a}button,.btn{background:#1e5ba9;border:0;color:white;padding:11px 16px;border-radius:8px;font:inherit;cursor:pointer;text-decoration:none;display:inline-block}button:hover,.btn:hover{background:#14437d}.secondary{background:#e7edf5;color:#263b55}.secondary:hover{background:#d3e0ee}.danger{background:#b02f3b}.danger:hover{background:#8e2430}.tablewrap{overflow:auto}table{border-collapse:collapse;width:100%}th,td{text-align:left;border-bottom:1px solid #e4eaf1;padding:13px 10px}th{font-size:13px;color:#61738a;background:#f6f8fb}td.actions{white-space:nowrap}td.actions button{margin-right:5px;padding:7px 10px}.muted{color:#77879a}.score{font-weight:800;font-size:20px}.topline{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:16px}.shots{display:grid;grid-template-columns:repeat(auto-fill,minmax(85px,1fr));gap:12px;margin:18px 0}.shots .field{min-width:0}.total{font-size:25px;font-weight:800;margin:18px 0}.notice{background:#fff6df;padding:12px;border-radius:8px;color:#745015}.live{background:#101e30;color:white;min-height:70vh}.live header{background:#0c1727}.live main{max-width:1450px}.live h1{font-size:clamp(30px,4vw,56px)}.live .panel{background:#172b45;border-color:#2c4462;color:white}.live th{background:#203754;color:#bbcee5}.live td{border-color:#30465f;font-size:clamp(17px,2vw,27px)}.live .score{font-size:clamp(22px,3vw,38px)}.live .muted{color:#a7bad0}.tag{color:#78dda4;font-weight:700}.filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.filters select{width:auto}.empty{text-align:center;padding:35px;color:#718096}#toast{position:fixed;bottom:20px;right:20px;background:#20344f;color:white;padding:13px 18px;border-radius:9px;display:none;max-width:360px}#toast.show{display:block}@media(max-width:700px){header{padding:16px}main{margin:20px auto}h1{font-size:25px}td,th{padding:10px 6px}nav a{padding:7px}}

.live tr.club-row td{background:#254567;font-weight:700;border-top:2px solid #52749b}.live tr.shooter-row td{font-size:clamp(15px,1.55vw,21px)}.live tr.shooter-row td:nth-child(2){padding-left:25px}
/* Festliches Vereinsdesign: Dunkelgrün, Gold und Creme; kein offizielles Wappen verwendet. */
:root{color:#23372c;background:#f8f6ef}header{background:#163d2d;border-bottom:4px solid #c4a15a}header strong{font-family:Georgia,serif;letter-spacing:.2px}header small{color:#e4d6b4}.brand{display:flex;align-items:center;gap:13px}.crest{width:46px;height:52px;border:2px solid #e3c47d;border-radius:8px 8px 20px 20px;display:grid;place-items:center;color:#e3c47d;font-size:30px;background:#214c38}.banner{display:flex;justify-content:space-between;gap:15px;padding:12px max(20px,calc((100vw - 1180px)/2));background:#e8dec4;color:#4c452e;font-size:12px;letter-spacing:1.6px;font-weight:800}.panel{border-color:#e4dfd0;box-shadow:0 4px 18px #344b3210}h1,h2{font-family:Georgia,serif;color:#1a4934}button,.btn{background:#236443}button:hover,.btn:hover{background:#194b32}nav a.active,nav a:hover{background:#386a4e}input:focus,select:focus{outline:2px solid #b89a55;outline-offset:1px}th{background:#f0ecdf;color:#53614c}footer{text-align:center;color:#71816f;font-size:12px;padding:22px}.live{background:#122c23}.live header{background:#10291e}.live .panel{background:#193b2c;border-color:#56714b}.live th{background:#24503b;color:#e9d6a8}.live td{border-color:#46644f}.live h1,.live h2{color:#f1dfb5}.live tr.club-row td{background:#315b3d}.tag{color:#e4c06f}button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:700px){.banner{flex-direction:column;gap:3px;letter-spacing:.5px}.brand strong{font-size:17px}}

/* Kompakte, zweispaltige Live-Anzeige mit sämtlichen Vereinen und Top 10. */
.live main{max-width:1920px;margin:14px auto;padding:0 18px}
.live-heading{margin-bottom:8px}.live h1{font-size:clamp(25px,2.5vw,42px)}.live p.sub{margin-bottom:8px}
.live-summary{display:flex;gap:10px;flex-wrap:wrap;margin:8px 0 14px}
.live-summary span{border:1px solid #6b805b;border-radius:7px;padding:6px 12px;color:#f1dfb5;font-weight:700;font-size:clamp(12px,1vw,16px)}
.live-grid{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);gap:14px;align-items:start}
.live .live-panel{padding:12px 16px;margin:0}
.live .live-panel h2{font-size:clamp(19px,1.6vw,28px);margin:2px 0 9px}
.live .live-panel h2 small{font:normal 12px system-ui;color:#b9d1b8;margin-left:8px}
.live .live-panel th{padding:6px 8px;font-size:12px}
.live .live-panel td{padding:5px 8px;font-size:clamp(12px,1.05vw,17px);line-height:1.18}
.live .live-panel .score{font-size:clamp(15px,1.4vw,23px);text-align:right;white-space:nowrap}
.live .live-panel th:last-child{text-align:right}
.live .live-panel .tiny{font-size:clamp(10px,.75vw,12px);margin-top:2px}
.live .position{width:46px;font-weight:800;color:#e4c06f}
.live-note{color:#bdd0b9;font-size:12px;margin:12px 0}
@media(max-width:850px){.live-grid{grid-template-columns:1fr}.live .live-panel td{font-size:15px}.live .live-panel .tiny{font-size:12px}}
@media(min-width:1100px){.live header{padding-top:10px;padding-bottom:10px}.live .banner{padding-top:6px;padding-bottom:6px}.live footer{padding:8px}}

/* Vereinswertung mit fünf besten Einzelschützen und schmaler Top-10-Spalte */
.live-grid{grid-template-columns:minmax(0, 1fr) minmax(260px, .34fr);gap:12px}
.club-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.club-card{background:#24503b;border:1px solid #577350;border-radius:9px;padding:10px;min-width:0}
.club-card-head{display:flex;gap:8px;align-items:flex-start;border-bottom:1px solid #59795d;padding-bottom:7px;margin-bottom:7px}
.club-place{font-weight:800;color:#e4c06f;min-width:22px}
.club-title{flex:1;min-width:0;overflow-wrap:anywhere;font-size:clamp(13px,1.05vw,18px)}
.club-score{font-weight:800;color:#f1dfb5;font-size:clamp(18px,1.5vw,25px);white-space:nowrap}
.club-score small{font-size:10px;font-weight:400}
.club-shooter{display:flex;justify-content:space-between;gap:7px;font-size:clamp(11px,.85vw,14px);line-height:1.35;padding:3px 0}
.club-shooter-name{overflow-wrap:anywhere;min-width:0}
.club-shooter-points{font-weight:800;color:#f1dfb5;white-space:nowrap}
.live .top-ten-panel td{font-size:clamp(12px,.95vw,16px);padding:7px 4px}
.live .top-ten-panel .score{font-size:clamp(16px,1.3vw,22px)}
.live .top-ten-panel .position{width:32px}
.live .top-ten-panel .tiny{font-size:11px}
@media(max-width:1350px){.club-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){.live-grid{grid-template-columns:1fr}.club-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.club-cards{grid-template-columns:1fr}}

/* Beamer-Modus: alle Vereine gleichzeitig, danach alle Teilnehmer. */
.live main{max-width:none;width:100%;padding:0 12px;margin:8px auto}
.live .live-stage .live-panel{padding:8px 10px}
.live .live-stage .live-panel h2{font-size:clamp(16px,1.4vw,23px);margin:0 0 7px}
.live .club-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}
.live .club-card{padding:6px 7px;border-radius:6px}
.live .club-card-head{gap:4px;padding-bottom:3px;margin-bottom:3px}
.live .club-place{min-width:18px;font-size:12px}
.live .club-title{font-size:clamp(11px,.9vw,15px);line-height:1.12}
.live .club-score{font-size:clamp(13px,1.15vw,19px)}
.live .club-score small{font-size:9px}
.live .club-shooter{font-size:clamp(10px,.78vw,13px);line-height:1.14;padding:2px 0}
.live .club-title .tiny{font-size:10px}
.live .live-summary{margin:5px 0 7px}
.live .live-summary span{padding:3px 8px}
.live .live-note{margin:6px 0;font-size:11px}
.live .all-shooters{max-height:calc(100vh - 225px);overflow:auto}
.live .all-shooters table{width:100%}
.live .all-shooters th{position:sticky;top:0;z-index:1}
.live .all-shooters td{font-size:clamp(12px,1vw,17px);padding:4px 8px}
.live .all-shooters .score{font-size:clamp(13px,1.1vw,19px)}
.live .all-shooters .pending{opacity:.7}
@media(max-width:1100px){.live .club-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.live .club-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{.live .all-shooters{max-height:none;overflow:visible}}

/* Bereits geschossene Teilnehmer in der Auswahlliste hervorheben. */
#participant option.not-shot{font-weight:800}
#participant option:not(.not-shot){font-weight:400}

.quick-club{border-top:1px solid #e4dfd0;margin-top:20px;padding-top:12px}.quick-club h3{font-family:Georgia,serif;color:#1a4934;margin:4px 0 12px}

/* Korrektur: Vollbild durchgehend dunkel, auch unterhalb kurzer Tabellen. */
html:has(body.live){background:#122c23;min-height:100%;}
body.live{background:#122c23;min-height:100vh;display:flex;flex-direction:column;}
body.live main{flex:1 0 auto;}
body.live footer{background:#122c23;color:#b8c9b8;}
/* Stabile Spaltenbreiten: 4. und 5. Schuss stehen nicht mehr neben der Summe. */
.live .shooters-table{table-layout:fixed;width:100%;border-collapse:collapse;}
.live .shooters-table .col-place{width:6%;}
.live .shooters-table .col-name{width:30%;}
.live .shooters-table .col-club{width:30%;}
.live .shooters-table .col-total{width:14%;}
.live .shooters-table .col-four,.live .shooters-table .col-five{width:10%;}
.live .shooters-table th,.live .shooters-table td{padding:6px 10px;vertical-align:middle;overflow-wrap:anywhere;}
.live .shooters-table th:nth-child(n+4),.live .shooters-table td:nth-child(n+4){text-align:right;font-variant-numeric:tabular-nums;}
.live .shooters-table td.score{font-weight:800;color:#f1dfb5;}
.live .shooters-table th:nth-child(4),.live .shooters-table td:nth-child(4){padding-right:22px;}
.live .shooters-table th:nth-child(5),.live .shooters-table td:nth-child(5){padding-left:16px;padding-right:22px;}
.live .shooters-table th:nth-child(6),.live .shooters-table td:nth-child(6){padding-left:16px;}
@media(max-width:700px){.live .all-shooters{overflow-x:auto}.live .shooters-table{min-width:620px}}

/* Live-Anzeige: Hintergrund bereits vor dem Laden von JavaScript setzen.
   data-page steht direkt im HTML und funktioniert auch ohne :has()-Unterstuetzung. */
html:has(body[data-page="rangliste"]),
html:has(body.live) { background-color:#122c23 !important; min-height:100%; }
body[data-page="rangliste"] {
  background:#122c23 !important; color:#f5e7c6;
  min-height:100vh; min-height:100dvh;
  margin:0; display:flex; flex-direction:column;
}
body[data-page="rangliste"] > main#app { flex:1 0 auto; width:100%; }
body[data-page="rangliste"] > footer { background:#122c23 !important; color:#b8c9b8; }
body[data-page="rangliste"] .live-stage { background:#122c23; }

/* Ergebniswerte und Netzwerkzugänge */
.shooters-table .col-shot{width:5.7%}
.shooters-table .shot-value{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.shooters-table .counted-shot{font-weight:750}
.network-addresses{display:grid;gap:12px;margin:16px 0}
.network-group{padding:12px;border:1px solid var(--line,#d4d4d4);border-radius:8px;overflow-wrap:anywhere}
.network-link{display:grid;grid-template-columns:115px minmax(0,1fr);gap:10px;margin-top:8px}
.network-link a{overflow-wrap:anywhere}

/* Vereinsfelder im Live-Modus mit +/- vergrößern/verkleinern. */
.live .club-view-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:10px}
.live .club-view-header h2{margin:0}
.live .club-size-controls{display:flex;align-items:center;gap:7px;font-size:13px;color:#e9d6a8}
.live .club-size-controls button{padding:4px 12px;font-size:22px;line-height:1.2;min-width:38px;font-weight:700}
.live .club-size-value{min-width:66px;text-align:center}
.live .club-cards.club-size-0{grid-template-columns:repeat(6,minmax(0,1fr));--club-scale:.83}
.live .club-cards.club-size-1{grid-template-columns:repeat(5,minmax(0,1fr));--club-scale:.93}
.live .club-cards.club-size-2{grid-template-columns:repeat(5,minmax(0,1fr));--club-scale:1}
.live .club-cards.club-size-3{grid-template-columns:repeat(4,minmax(0,1fr));--club-scale:1.18}
.live .club-cards.club-size-4{grid-template-columns:repeat(3,minmax(0,1fr));--club-scale:1.35}
.live .club-cards[class*="club-size-"] .club-card{padding:calc(7px * var(--club-scale))}
.live .club-cards[class*="club-size-"] .club-title{font-size:clamp(10px,calc(1vw * var(--club-scale)),21px)}
.live .club-cards[class*="club-size-"] .club-shooter{font-size:clamp(10px,calc(.85vw * var(--club-scale)),18px)}
.live .club-cards[class*="club-size-"] .club-score{font-size:clamp(13px,calc(1.2vw * var(--club-scale)),26px)}
@media(max-width:850px){.live .club-cards[class*="club-size-"]{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:500px){.live .club-cards[class*="club-size-"]{grid-template-columns:1fr}}

/* Schriftgröße unabhängig von der Größe der Vereinsfelder steuern. */
.live .club-size-controls .font-control-label{margin-left:12px}
.live .club-cards.club-font-0{--font-scale:.75}
.live .club-cards.club-font-1{--font-scale:.88}
.live .club-cards.club-font-2{--font-scale:1}
.live .club-cards.club-font-3{--font-scale:1.2}
.live .club-cards.club-font-4{--font-scale:1.45}
.live .club-cards[class*="club-font-"] .club-title{font-size:clamp(10px,calc(1vw * var(--club-scale) * var(--font-scale)),30px)}
.live .club-cards[class*="club-font-"] .club-shooter{font-size:clamp(9px,calc(.85vw * var(--club-scale) * var(--font-scale)),27px)}
.live .club-cards[class*="club-font-"] .club-score{font-size:clamp(12px,calc(1.2vw * var(--club-scale) * var(--font-scale)),38px)}

/* Platzierung: gut lesbar, unabhängig von Feld- und Schriftgrößen. */
.live .club-card-head{display:grid;grid-template-columns:42px minmax(0,1fr);grid-template-areas:"place title" "score score";align-items:start;column-gap:8px;row-gap:5px}
.live .club-place{grid-area:place;display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:42px;min-width:42px;height:42px;padding:0 3px;border:2px solid #f2d68c;border-radius:9px;background:#102f23;color:#ffe5a4;font-family:Arial,sans-serif;font-size:21px!important;font-weight:900;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums;box-shadow:0 1px 4px #0005}
.live .club-title{grid-area:title;align-self:center;min-width:0;line-height:1.2}
.live .club-score{grid-area:score;justify-self:start;white-space:normal;line-height:1.1}
.live .club-card{overflow:hidden}
.live .club-cards.club-size-0 .club-place,.live .club-cards.club-size-1 .club-place{width:34px;min-width:34px;height:34px;font-size:17px!important}
.live .club-cards.club-size-0 .club-card-head,.live .club-cards.club-size-1 .club-card-head{grid-template-columns:34px minmax(0,1fr);column-gap:5px}
.live .club-cards.club-size-3 .club-place,.live .club-cards.club-size-4 .club-place{width:48px;min-width:48px;height:48px;font-size:23px!important}
.live .club-cards.club-size-3 .club-card-head,.live .club-cards.club-size-4 .club-card-head{grid-template-columns:48px minmax(0,1fr)}

/* Weitere Schützen sind ausschließlich Stichentscheid, nicht Teil der Vereinssumme. */
.club-shooter.club-tiebreak { border-top: 1px dashed rgba(228,195,116,.35); opacity: .85; }
.club-shooter.club-tiebreak small { font-size: .72em; font-weight: normal; }

/* Zusatzschützen sind nur beim Stichentscheid sichtbar und klar gekennzeichnet. */
.live .club-shooter.club-tiebreak {border-top:2px dashed #e4c374;opacity:1;padding-top:5px;}
.live .tiebreak-label {display:block;color:#ffe4a0;font-size:.82em;font-weight:800;line-height:1.25;}

/* Kleine Schaltflächen oben rechts für die manuelle Live-Ansicht. */
.live-view-buttons{display:inline-flex;gap:4px;padding:3px;border:1px solid #536b62;border-radius:9px;background:#112a27}
.live-view-button{padding:6px 9px;font-size:12px;font-weight:700;border-radius:6px;background:transparent;color:#e6ebdf;white-space:nowrap}
.live-view-button:hover{background:#315044}
.live-view-button.is-active{background:#d5b96c;color:#18251e}

.live-view-button:disabled{opacity:.35;cursor:not-allowed}

/* Sanftes automatisches Scrollen auf überfüllten Teilnehmerseiten. */
.live .all-shooters{scroll-behavior:auto;overscroll-behavior:contain;}

/* Beameransicht ohne Navigationskopf, Banner, Fußzeile und Erklärungstext. */
body[data-page="rangliste"] > header,
body[data-page="rangliste"] > .banner,
body[data-page="rangliste"] > footer { display:none !important; }
body[data-page="rangliste"] main { padding-top:8px; }
body[data-page="rangliste"] .live-note { display:none !important; }
/* Kleine Umschaltknöpfe über den Schriftgrößenknöpfen rechts. */
.live .live-controls-stack { display:flex;flex-direction:column;align-items:flex-end;gap:5px;max-width:100%; }
.live .live-mini-toolbar { display:flex;justify-content:flex-end;align-items:center;gap:5px;flex-wrap:wrap; }
.live .live-mini-toolbar button { padding:4px 8px;font-size:11px;line-height:1.2;border-radius:5px;min-height:25px; }
.live .live-mini-toolbar .live-view-buttons { padding:2px;gap:2px;border-radius:6px; }
.live .live-mini-toolbar .live-view-button { padding:4px 7px; }
@media(max-width:800px){.live .club-view-header {align-items:flex-start}.live .live-controls-stack {align-items:flex-start}.live .club-size-controls{flex-wrap:wrap}}
