:root {
    --primary: #009B31;
    --primary-dark: #007C27;
    --primary-soft: #E6F5EA;
    --accent: #A4C400;
    --accent-soft: #F0F6D5;
    --page: #F2F5F2;
    --surface: #FFFFFF;
    --ink: #172019;
    --muted: #667068;
    --border: #D7DED8;
    --court-line: #16652E;
    --q3: #BFE8C8;
    --q2: #EAF29D;
    --q1: #FFDFA1;
    --q0: #F7B4AE;
    --qn: #EEF1EF;
    --traffic-green: #21A657;
    --traffic-yellow: #F0B429;
    --traffic-red: #D64545;
    --traffic-neutral: #7A8580;
    --nav-h: 50px;
    --radius: 10px;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body {
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--page);
    color: var(--ink);
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }

.auth-version {
    position: fixed;
    top: max(4px, env(safe-area-inset-top));
    right: 8px;
    z-index: 3;
    font-size: 9px;
    font-weight: 800;
    color: var(--muted);
}
.auth-page { height: 100dvh; display: grid; place-items: center; padding: 18px; }
.auth-card {
    width: min(430px, 92vw);
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 18px 50px rgba(23,32,25,.12);
}
.auth-mark {
    width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
    background: var(--primary); color: white; font-weight: 950; letter-spacing: .03em;
}
.auth-card h1 { margin: 14px 0 6px; font-size: 1.55rem; }
.auth-card p { margin: 0 0 16px; color: var(--muted); line-height: 1.4; }
.auth-error { padding: 9px 11px; margin-bottom: 12px; border-radius: 9px; background: #FDEDEC; color: #9C2F2F; font-weight: 700; }
.auth-form { display: grid; gap: 10px; }
.auth-form label { display: grid; gap: 4px; font-size: .78rem; font-weight: 800; }
.auth-form input { height: 42px; border: 1px solid var(--border); border-radius: 9px; padding: 0 10px; }
.auth-submit { margin-top: 4px; }

.app { width: 100vw; height: 100dvh; overflow: hidden; }
.top-nav {
    position: relative;
    height: calc(var(--nav-h) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 8px 0;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    border-bottom: 3px solid var(--accent);
    overflow: hidden;
}
.version-stamp {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 1px);
    left: 8px;
    color: rgba(255,255,255,.82);
    font-size: 8px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .04em;
    pointer-events: none;
}
.brand {
    padding-top: 5px;
    color: white;
    font-weight: 900;
    font-size: clamp(.74rem, 1.6vw, 1rem);
    white-space: nowrap;
}
.nav-buttons {
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
}
.nav-button, .logout-button {
    height: 32px;
    border-radius: 7px;
    padding: 0 clamp(7px, 1.2vw, 14px);
    border: 1px solid rgba(255,255,255,.38);
    color: white;
    background: rgba(255,255,255,.08);
    font-size: clamp(.63rem, 1.1vw, .8rem);
    font-weight: 850;
    white-space: nowrap;
}
.nav-button.active { background: var(--accent); color: #173415; border-color: var(--accent); }
.logout-form { margin: 0; padding-top: 3px; }
.logout-button { padding: 0 9px; background: rgba(0,0,0,.10); }

.view-stack { position: relative; height: calc(100dvh - var(--nav-h) - env(safe-area-inset-top)); overflow: hidden; }
.view { position: absolute; inset: 0; display: none; padding: 8px; overflow: hidden; }
.view.active { display: block; }

.view-toolbar {
    min-width: 0; height: 42px; background: white; border: 1px solid var(--border); border-radius: var(--radius);
    display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 9px; overflow: hidden;
}
.toolbar-left { min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden; }
.toolbar-left strong { flex: 0 0 auto; font-size: .87rem; white-space: nowrap; }
.toolbar-note { min-width: 0; color: var(--muted); font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.small-action, .primary-action, .team-current-button {
    height: 32px; border-radius: 8px; padding: 0 10px; font-size: .72rem; font-weight: 850; white-space: nowrap;
}
.small-action, .team-current-button { border: 1px solid var(--border); background: white; color: var(--ink); }
.small-action.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.primary-action { border: 1px solid var(--primary); background: var(--primary); color: white; }
.primary-action.wide { width: 100%; }
.team-current-button { max-width: min(34vw, 260px); overflow: hidden; text-overflow: ellipsis; border-color: #B7CDBD; background: var(--primary-soft); color: var(--primary-dark); }
.selection-info { font-size: .72rem; font-weight: 850; color: var(--primary-dark); white-space: nowrap; }

.set-button-group { display: grid; grid-template-columns: repeat(5, 30px); gap: 3px; }
.set-button-group button {
    width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 7px; background: white; color: var(--ink); font-size: .72rem; font-weight: 900;
}
.set-button-group button.active { background: var(--accent); border-color: var(--accent); color: #233318; }

/* Scouting */
.scouting-layout { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 26vw); gap: 8px; }
.scouting-main { min-width: 0; min-height: 0; display: grid; grid-template-rows: 42px minmax(0, 1fr); gap: 8px; }
.court-pair { min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.court-slot { min-width: 0; min-height: 0; display: grid; grid-template-rows: 16px minmax(0, 1fr) 16px; justify-items: center; }
.court-axis-label { width: 100%; display: grid; place-items: center; color: var(--muted); font-size: .56rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.court-frame { position: relative; height: 100%; max-height: 100%; aspect-ratio: 1 / 1; max-width: 100%; align-self: center; }
.court {
    width: 100%; height: 100%; display: grid; grid-template-columns: repeat(9, 1fr); grid-template-rows: repeat(9, 1fr);
    border: 3px solid var(--court-line); background: white; user-select: none;
}
.court-cell {
    position: relative; min-width: 0; min-height: 0; padding: 0; border: 0; border-right: 1px solid rgba(52,64,84,.21); border-bottom: 1px solid rgba(52,64,84,.21); background: white; overflow: visible;
}
.court-cell:nth-child(9n) { border-right: 0; }
.court-cell:nth-child(n+73) { border-bottom: 0; }
.cell-number { position: absolute; top: 2px; left: 3px; z-index: 4; color: rgba(52,64,84,.55); font-size: clamp(.38rem, .63vw, .53rem); line-height: 1; font-weight: 750; pointer-events: none; }
.zone-mark { position: absolute; right: 2px; bottom: 2px; z-index: 4; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 5px; display: grid; place-items: center; font-size: .52rem; line-height: 1; font-weight: 950; color: #1A2A1B; pointer-events: none; border: 1px solid rgba(0,0,0,.08); }
.court-cell.zone-visible-q3 { background: linear-gradient(135deg, #F7FFF8 0 55%, var(--q3) 55% 100%); box-shadow: inset 0 0 0 1px rgba(0,155,49,.24); }
.court-cell.zone-visible-q2 { background: linear-gradient(135deg, #FFFFFB 0 55%, var(--q2) 55% 100%); box-shadow: inset 0 0 0 1px rgba(164,196,0,.28); }
.zone-mark.q3 { background: var(--q3); }
.zone-mark.q2 { background: var(--q2); }
.attack-line { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% * 6 / 9); height: 4px; transform: translateY(-2px); background: var(--primary); pointer-events: none; }

.player-token {
    position: absolute; z-index: 8; top: 50%; left: 50%; width: min(72%, 48px); aspect-ratio: 1; transform: translate(-50%, -50%);
    border-radius: 999px; border: 3px solid white; color: white; display: grid; place-items: center; font-size: clamp(.75rem, 1.7vw, 1.25rem); font-weight: 950; box-shadow: 0 2px 7px rgba(16,24,40,.30);
}
.player-token.traffic-green { background: var(--traffic-green); }
.player-token.traffic-yellow { background: var(--traffic-yellow); color: #3D3210; }
.player-token.traffic-red { background: var(--traffic-red); }
.player-token.traffic-neutral { background: var(--traffic-neutral); }
.player-token.selected { outline: 4px solid var(--accent); outline-offset: 1px; transform: translate(-50%, -50%) scale(1.08); }
.court-cell.player-field-green { box-shadow: inset 0 0 0 4px rgba(33,166,87,.68); }
.court-cell.player-field-yellow { box-shadow: inset 0 0 0 4px rgba(240,180,41,.78); }
.court-cell.player-field-red { box-shadow: inset 0 0 0 4px rgba(214,69,69,.72); }
.court-cell.player-field-neutral { box-shadow: inset 0 0 0 3px rgba(122,133,128,.50); }
.court-cell.last-target::after { content: ''; position: absolute; inset: 1px; z-index: 6; border: 3px solid var(--primary); pointer-events: none; }
.court.target-mode .player-token { pointer-events: none; }
.second-court-placeholder {
    width: min(100%, 430px); height: 100%; max-height: 100%; aspect-ratio: 1; align-self: center; display: grid; place-items: center; align-content: center; gap: 5px;
    border: 2px dashed #B8C5BC; border-radius: 8px; background: rgba(255,255,255,.55); color: var(--muted); text-align: center;
}
.second-court-placeholder strong { color: var(--primary-dark); font-size: 1rem; }
.second-court-placeholder span { font-size: .68rem; }
.scouting-side { min-height: 0; display: grid; grid-template-rows: minmax(150px, .9fr) minmax(0, 1.1fr); gap: 8px; }
.side-card { min-width: 0; min-height: 0; background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; overflow: hidden; }
.side-title, .side-title-row { font-size: .78rem; font-weight: 900; }
.side-title-row { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.side-hint { color: var(--muted); font-size: .6rem; font-weight: 650; }
.receiver-stats { height: calc(100% - 22px); margin-top: 5px; display: grid; align-content: start; gap: 4px; overflow: hidden; }
.receiver-stat-row { min-height: 31px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 7px; border: 1px solid #E6EBE7; background: #FAFBFA; font-size: .68rem; }
.receiver-stat-row.traffic-green { border-left: 6px solid var(--traffic-green); }
.receiver-stat-row.traffic-yellow { border-left: 6px solid var(--traffic-yellow); }
.receiver-stat-row.traffic-red { border-left: 6px solid var(--traffic-red); }
.receiver-stat-row.traffic-neutral { border-left: 6px solid var(--traffic-neutral); }
.receiver-stat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.receiver-stat-points { white-space: nowrap; font-weight: 950; font-size: .72rem; }
.receiver-stat-empty { color: var(--muted); font-size: .68rem; padding: 8px 2px; }
.recent-card { display: flex; flex-direction: column; }
.recent-list { min-height: 0; height: calc(100% - 20px); margin-top: 5px; display: grid; grid-template-rows: repeat(8, minmax(0, 1fr)); gap: 3px; }
.recent-item, .recent-empty { min-height: 0; border: 1px solid #E6EBE7; border-radius: 7px; background: #FAFBFA; padding: 3px 6px; font-size: clamp(.58rem, .92vw, .72rem); }
.recent-item { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.recent-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quality-badge, .quality-dot { display: grid; place-items: center; border-radius: 999px; font-weight: 950; border: 1px solid rgba(16,24,40,.10); }
.quality-badge { flex: 0 0 auto; width: 23px; height: 23px; font-size: .67rem; }
.q3 { background: var(--q3); } .q2 { background: var(--q2); } .q1 { background: var(--q1); } .q0 { background: var(--q0); } .qn { background: var(--qn); }

/* Startaufstellungen */
.lineup-page { height: 100%; min-height: 0; display: grid; grid-template-rows: 42px minmax(0, 1fr) 150px; gap: 8px; }
.lineup-set-grid { min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.lineup-set-card { min-width: 0; min-height: 0; background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 5px; display: grid; grid-template-rows: 28px minmax(0,1fr) 16px; overflow: hidden; }
.lineup-set-head { display: flex; align-items: center; justify-content: space-between; gap: 3px; font-size: .67rem; font-weight: 950; }
.copy-lineup-button { height: 24px; padding: 0 5px; border: 1px solid #C9D3CC; border-radius: 6px; background: #F7F9F7; color: var(--primary-dark); font-size: .55rem; font-weight: 850; white-space: nowrap; }
.mini-rotation { min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); border: 2px solid var(--court-line); background: #F9FBF9; }
.lineup-position-button { min-width: 0; min-height: 0; position: relative; padding: 2px; border: 0; border-right: 1px solid #D5DED8; border-bottom: 1px solid #D5DED8; background: white; display: grid; place-items: center; align-content: center; gap: 2px; }
.lineup-position-button:nth-child(3n) { border-right: 0; }
.lineup-position-button:nth-child(n+4) { border-bottom: 0; }
.lineup-position-button.selected { background: var(--accent-soft); box-shadow: inset 0 0 0 3px var(--accent); }
.lineup-pos-number { position: absolute; top: 2px; left: 3px; font-size: .48rem; font-weight: 900; color: var(--muted); }
.lineup-player-number { font-size: clamp(.72rem, 1.45vw, 1.1rem); font-weight: 950; color: var(--primary-dark); }
.lineup-player-name { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .45rem; color: var(--muted); }
.mini-net-label { align-self: center; text-align: center; color: white; background: var(--primary); border-radius: 0 0 5px 5px; font-size: .52rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.lineup-roster-panel { display: grid; grid-template-rows: 28px minmax(0, 1fr); gap: 5px; }
.lineup-roster-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lineup-roster-controls { display: flex; gap: 4px; }
.lineup-roster-controls .small-action { height: 27px; }
.lineup-roster-buttons { min-height: 0; display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0,1fr)); gap: 4px; }
.lineup-player-button { min-width: 0; min-height: 0; border: 1px solid #C9D3CC; border-radius: 7px; background: #F9FBF9; display: grid; place-items: center; align-content: center; padding: 2px; }
.lineup-player-button .num { font-size: .85rem; font-weight: 950; color: var(--primary-dark); }
.lineup-player-button .name { width: 100%; font-size: .48rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.lineup-player-button.used { background: var(--primary-soft); border-color: #A8CCB3; }

/* Mannschaften */
.teams-page { height: 100%; min-height: 0; display: grid; grid-template-rows: 42px 78px 44px minmax(0,1fr); gap: 7px; }
.sync-info { color: var(--muted); font-size: .61rem; white-space: nowrap; }
.team-button-grid { min-height: 0; display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); grid-template-rows: repeat(2, minmax(0,1fr)); gap: 4px; }
.team-button { min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: 7px; background: white; padding: 3px 5px; font-size: .58rem; font-weight: 800; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-button.active { background: var(--primary); color: white; border-color: var(--primary); }
.team-edit-bar { display: flex; align-items: center; gap: 6px; padding: 5px 7px; }
.team-name-editor { min-width: 0; flex: 1 1 280px; display: flex; align-items: center; gap: 5px; font-size: .63rem; font-weight: 850; }
.team-name-editor input { min-width: 100px; width: 100%; height: 30px; border: 1px solid var(--border); border-radius: 7px; padding: 0 8px; }
.team-roster-meta { flex: 1 1 auto; min-width: 70px; color: var(--muted); font-size: .58rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster-page-info { font-size: .61rem; font-weight: 850; white-space: nowrap; }
.roster-grid { min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); grid-template-rows: repeat(3, minmax(0,1fr)); gap: 5px; }
.roster-card { min-width: 0; min-height: 0; background: white; border: 1px solid var(--border); border-radius: 8px; padding: 5px; display: grid; grid-template-rows: 18px minmax(0,1fr) 25px; gap: 4px; overflow: hidden; }
.roster-card-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.roster-source { border-radius: 999px; padding: 1px 6px; font-size: .48rem; font-weight: 900; background: var(--primary-soft); color: var(--primary-dark); }
.roster-source.manual { background: var(--accent-soft); color: #556400; }
.roster-override { color: #A56200; font-size: .48rem; font-weight: 900; white-space: nowrap; }
.roster-input-grid { min-height: 0; display: grid; grid-template-columns: 54px minmax(0,1fr); grid-template-rows: repeat(2, minmax(0,1fr)); gap: 4px; }
.roster-input-grid input { min-width: 0; width: 100%; height: 100%; min-height: 28px; border: 1px solid #D7DED8; border-radius: 6px; padding: 0 6px; font-size: .63rem; }
.roster-number-input { grid-row: 1 / 3; font-size: .82rem !important; font-weight: 950; text-align: center; }
.roster-card-actions { display: flex; justify-content: flex-end; gap: 4px; }
.roster-card-actions button { height: 25px; border-radius: 6px; padding: 0 7px; border: 1px solid var(--border); background: #F8FAF8; font-size: .54rem; font-weight: 850; }
.roster-card-actions .save { background: var(--primary); color: white; border-color: var(--primary); }
.roster-empty { grid-column: 1/-1; display: grid; place-items: center; border: 1px dashed #B9C5BC; border-radius: 10px; background: rgba(255,255,255,.6); color: var(--muted); text-align: center; font-size: .75rem; }

/* Zonen */
.zones-layout { height: 100%; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(180px, 22vw); gap: 8px; }
.court-column { min-height: 0; display: grid; grid-template-rows: 42px 16px minmax(0,1fr) 16px; justify-items: center; gap: 0; }
.zones-frame { max-width: 72vh; }
.zone-palette { display: flex; gap: 3px; }
.zone-palette button { width: 31px; height: 30px; border-radius: 7px; border: 1px solid var(--border); font-size: .72rem; font-weight: 950; }
.zone-palette button[data-quality="3"] { background: var(--q3); }
.zone-palette button[data-quality="2"] { background: var(--q2); }
.zone-palette button[data-quality="1"] { background: var(--q1); }
.zone-palette button[data-quality="0"] { background: var(--q0); }
.zone-palette button[data-quality="null"] { background: var(--qn); }
.zone-palette button.active { outline: 3px solid var(--primary); outline-offset: 1px; }
.zones-court .court-cell.q3 { background: var(--q3); } .zones-court .court-cell.q2 { background: var(--q2); } .zones-court .court-cell.q1 { background: var(--q1); } .zones-court .court-cell.q0 { background: var(--q0); }
.zone-side { display: flex; flex-direction: column; justify-content: space-between; }
.zone-legend { margin-top: 8px; display: grid; gap: 7px; }
.zone-legend > div { display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 7px; font-size: .68rem; }
.quality-dot { width: 27px; height: 27px; font-size: .68rem; }
.zone-side-bottom { display: grid; gap: 7px; }
.zone-count { color: var(--muted); font-size: .65rem; line-height: 1.35; }

/* Benutzer */
.users-page { height: 100%; min-height: 0; display: grid; grid-template-rows: 42px 54px minmax(0,1fr); gap: 8px; }
.user-new-bar { display: flex; align-items: end; gap: 8px; padding: 5px 8px; }
.user-new-bar label { display: grid; gap: 2px; flex: 1 1 180px; font-size: .58rem; font-weight: 850; }
.user-new-bar input[type="text"], .user-new-bar input[type="password"], .user-new-bar input:not([type]) { height: 29px; border: 1px solid var(--border); border-radius: 7px; padding: 0 7px; }
.user-check { flex: 0 0 auto !important; display: flex !important; align-items: center; gap: 5px; height: 30px; }
.users-grid { min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); grid-template-rows: repeat(2, minmax(0,1fr)); gap: 6px; }
.user-card { min-width: 0; min-height: 0; background: white; border: 1px solid var(--border); border-radius: 9px; padding: 7px; display: grid; align-content: start; gap: 5px; font-size: .65rem; }
.user-card-title { font-weight: 950; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card label { display: flex; align-items: center; gap: 5px; }
.user-card input[type="password"] { width: 100%; height: 28px; border: 1px solid var(--border); border-radius: 6px; padding: 0 6px; font-size: .62rem; }
.user-card button { height: 27px; border: 1px solid var(--primary); border-radius: 6px; background: var(--primary); color: white; font-size: .58rem; font-weight: 850; }

/* Modals */
.modal-layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 14px; background: rgba(13,29,18,.42); backdrop-filter: blur(3px); }
.modal-card { width: min(900px, 94vw); max-height: 88dvh; background: white; border: 1px solid var(--border); border-radius: 14px; padding: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.22); overflow: hidden; }
.modal-head { height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modal-close { width: 31px; height: 31px; border: 0; border-radius: 8px; background: #EFF3F0; color: var(--ink); font-size: 1.2rem; line-height: 1; }
.team-picker-card { height: min(410px, 72dvh); display: grid; grid-template-rows: 34px minmax(0,1fr); }
.team-picker-grid { min-height: 0; display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); grid-template-rows: repeat(4, minmax(0,1fr)); gap: 7px; }
.team-picker-option { min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: 9px; background: #F9FBF9; padding: 7px; font-size: .7rem; font-weight: 850; }
.team-picker-option.active { background: var(--primary); color: white; border-color: var(--primary); }
.receiver-modal-card { height: min(470px, 80dvh); display: grid; grid-template-rows: 34px minmax(0,1fr); }
.receiver-modal-body { min-height: 0; display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 8px; }
.receiver-slot-buttons { display: grid; grid-template-rows: repeat(3,1fr); gap: 7px; }
.receiver-slot-button { border: 1px solid var(--border); border-radius: 9px; background: #F8FAF8; font-weight: 900; }
.receiver-slot-button.active { background: var(--accent); border-color: var(--accent); color: #25351C; }
.receiver-player-buttons { min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); grid-template-rows: repeat(4, minmax(0,1fr)); gap: 6px; }
.receiver-player-button { min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: 8px; background: #FAFBFA; display: grid; place-items: center; align-content: center; gap: 2px; padding: 3px; }
.receiver-player-button .num { font-size: .95rem; font-weight: 950; color: var(--primary-dark); }
.receiver-player-button .name { width: 100%; font-size: .52rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.add-player-card { width: min(560px, 92vw); display: grid; gap: 10px; }
.modal-form-grid { display: grid; grid-template-columns: 100px minmax(0,1fr) minmax(150px,.7fr); gap: 8px; }
.modal-form-grid label { display: grid; gap: 3px; font-size: .63rem; font-weight: 850; }
.modal-form-grid input { height: 38px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; }

.toast { position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: min(680px, 90vw); padding: 9px 13px; border-radius: 999px; background: #172019; color: white; font-size: .72rem; font-weight: 750; box-shadow: 0 10px 30px rgba(0,0,0,.24); transition: .18s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
    :root { --nav-h: 48px; }
    .brand { font-size: .68rem; }
    .nav-button { padding: 0 6px; font-size: .59rem; }
    .logout-button { font-size: .58rem; padding: 0 6px; }
    .scouting-layout { grid-template-columns: minmax(0,1fr) 205px; }
    .toolbar-note { display: none; }
    .team-current-button { max-width: 190px; }
    .lineup-roster-buttons { grid-template-columns: repeat(10, minmax(0,1fr)); }
    .team-button-grid { grid-template-columns: repeat(8,minmax(0,1fr)); }
}

@media (max-height: 650px) {
    .lineup-page { grid-template-rows: 42px minmax(0,1fr) 124px; }
    .lineup-roster-panel { padding: 5px; }
    .roster-card { padding: 3px; }
    .teams-page { grid-template-rows: 42px 68px 40px minmax(0,1fr); }
}

/* 0.7.0 – Spiele, Offline/PWA, Vollbild und Listenansicht */
.top-actions { display: flex; align-items: center; gap: 5px; padding-top: 3px; white-space: nowrap; }
.sync-status { height: 28px; padding: 0 7px; border-radius: 7px; display: inline-flex; align-items: center; gap: 5px; color: white; border: 1px solid rgba(255,255,255,.30); background: rgba(0,0,0,.08); font-size: .58rem; font-weight: 850; }
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #D9E0DC; box-shadow: 0 0 0 2px rgba(255,255,255,.12); }
.sync-status.online .sync-dot { background: #B9F3C8; }
.sync-status.offline .sync-dot { background: #FFD44D; }
.sync-status.pending .sync-dot { background: #FFD44D; animation: syncPulse 1.1s infinite alternate; }
@keyframes syncPulse { from { opacity: .45; } to { opacity: 1; } }
.fullscreen-button { width: 33px; height: 32px; border: 1px solid rgba(255,255,255,.38); border-radius: 7px; background: rgba(255,255,255,.10); color: white; font-size: 1rem; font-weight: 950; line-height: 1; }
.team-current-button.locked { cursor: default; border-color: #83B493; background: #DCEFE2; }
.danger-action { height: 32px; border: 1px solid #C73535; border-radius: 8px; padding: 0 11px; background: #D94343; color: white; font-size: .7rem; font-weight: 900; white-space: nowrap; }

/* Spiele */
.games-page { height: 100%; min-height: 0; display: grid; grid-template-rows: 42px 62px minmax(0,1fr) minmax(96px,.42fr); gap: 8px; }
.active-game-card { display: grid; grid-template-columns: minmax(0,1fr) minmax(120px,.5fr) max-content; align-items: center; gap: 8px; padding: 8px 10px; }
.active-game-card > strong { font-size: .8rem; }
.active-game-card > span { color: var(--muted); font-size: .66rem; }
.active-game-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; font-weight: 950; }
.active-game-meta { color: var(--muted); font-size: .64rem; text-align: right; white-space: nowrap; }
.game-create { min-height: 0; display: grid; grid-template-rows: 27px minmax(0,1fr) 42px; gap: 6px; }
.game-create-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .76rem; }
.game-team-buttons { min-height: 0; display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 5px; }
.game-team-button { min-width: 0; min-height: 0; border: 1px solid var(--border); border-radius: 8px; background: white; color: var(--ink); padding: 4px 6px; font-size: .59rem; font-weight: 850; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-team-button.active { background: var(--primary); color: white; border-color: var(--primary); }
.game-team-button:disabled { opacity: .58; }
.game-fields { display: grid; grid-template-columns: minmax(180px,1.2fr) 145px minmax(180px,1fr) max-content; align-items: end; gap: 6px; }
.game-fields label { min-width: 0; display: grid; gap: 2px; color: var(--muted); font-size: .55rem; font-weight: 850; }
.game-fields input { min-width: 0; width: 100%; height: 31px; border: 1px solid var(--border); border-radius: 7px; padding: 0 7px; background: white; color: var(--ink); font-size: .67rem; }
.game-history { display: grid; grid-template-rows: 22px minmax(0,1fr); }
.game-history-list { min-height: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 4px; }
.game-history-row { min-width: 0; min-height: 0; border: 1px solid #E4EAE6; border-radius: 7px; background: #FAFBFA; padding: 4px 6px; display: grid; align-content: center; gap: 2px; }
.game-history-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .6rem; }
.game-history-row span, .game-history-empty { color: var(--muted); font-size: .55rem; }
.game-history-empty { grid-column: 1/-1; display: grid; place-items: center; }

/* Die 2er-/3er-Zonen sind bewusst vollflächig. */
:root { --q3: #62C96F; --q2: #F4DF43; --q1: #F4A63A; --q0: #E65A50; }
.court-cell.zone-visible-q3 { background: var(--q3); box-shadow: inset 0 0 0 1px rgba(0,100,30,.28); }
.court-cell.zone-visible-q2 { background: var(--q2); box-shadow: inset 0 0 0 1px rgba(110,95,0,.22); }
.zones-court .court-cell.q3 { background: var(--q3); }
.zones-court .court-cell.q2 { background: var(--q2); }
.zones-court .court-cell.q1 { background: var(--q1); }
.zones-court .court-cell.q0 { background: var(--q0); }

/* Spielerinnenfelder: kontinuierliche Ampelfarbe statt drei harter Stufen. */
.court-cell.player-field-green,
.court-cell.player-field-yellow,
.court-cell.player-field-red,
.court-cell.player-field-neutral { background: var(--player-quality-soft, rgba(122,133,128,.25)); box-shadow: inset 0 0 0 4px var(--player-quality-color, #7A8580); }
.player-token { transition: background-color .18s ease, transform .12s ease; }

/* Annahmestatistik mit Prozent und fließender Farbleiste. */
.receiver-stat-row { display: grid; grid-template-columns: 1fr; grid-template-rows: auto 5px; gap: 4px; border-left: 6px solid var(--stat-color, var(--traffic-neutral)) !important; }
.receiver-stat-top { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 6px; }
.receiver-stat-bar { height: 5px; border-radius: 999px; background: #E7ECE8; overflow: hidden; }
.receiver-stat-bar span { display: block; height: 100%; border-radius: inherit; transition: width .2s ease, background-color .2s ease; }
.receiver-stat-points { font-size: .65rem; }

/* Mannschaftskader als kompakte Liste statt Karten. */
.roster-grid { min-height: 0; display: grid; grid-template-columns: 1fr; grid-template-rows: repeat(16,minmax(0,1fr)); gap: 2px; }
.roster-row { min-width: 0; min-height: 0; display: grid; grid-template-columns: 38px 55px minmax(180px,1fr) 68px 42px 100px; align-items: center; gap: 5px; padding: 2px 5px; border: 1px solid #E1E7E2; border-radius: 6px; background: white; overflow: hidden; }
.roster-row input { min-width: 0; width: 100%; height: 100%; max-height: 29px; border: 1px solid #D7DED8; border-radius: 5px; padding: 0 6px; background: #FCFDFC; font-size: .62rem; }
.roster-list-number { text-align: center; font-weight: 950; }
.roster-list-position { text-align: center; text-transform: uppercase; font-weight: 900; }
.roster-change-state { color: #A56200; font-size: .5rem; font-weight: 850; text-align: center; }
.roster-list-actions { display: flex; justify-content: flex-end; gap: 3px; }
.roster-list-actions button { height: 25px; border-radius: 5px; padding: 0 6px; border: 1px solid var(--border); background: #F8FAF8; font-size: .52rem; font-weight: 850; }
.roster-list-actions button.save { border-color: var(--primary); background: var(--primary); color: white; }
.roster-empty { grid-row: 1/-1; }

@media (max-width: 1180px) {
    .top-nav { grid-template-columns: minmax(0,1fr) max-content; }
    .brand { display: none; }
    .nav-buttons { justify-content: flex-start; }
    .nav-button { padding: 0 6px; font-size: .58rem; }
    .sync-status { padding: 0 5px; font-size: .52rem; }
    .game-team-buttons { grid-template-columns: repeat(7,minmax(0,1fr)); }
}

@media (max-width: 900px) {
    .sync-status { width: 10px; padding: 0; border: 0; background: transparent; }
    .sync-status #syncStatusText, #syncStatusText { display: none; }
    .game-fields { grid-template-columns: minmax(140px,1fr) 128px minmax(120px,.8fr) max-content; }
    .roster-row { grid-template-columns: 28px 46px minmax(120px,1fr) 55px 32px 86px; gap: 3px; padding: 1px 3px; }
}


/* 0.7.1 – Fehler-Doppelfeld unter 76/77, jenseits des Netzes. */
.scouting-court-frame {
    height: 90%;
    align-self: start;
    overflow: visible;
}
.reception-error-button {
    position: absolute;
    z-index: 12;
    top: calc(100% + 2px);
    left: calc(100% * 3 / 9);
    width: calc(100% * 2 / 9);
    height: calc(100% / 9);
    min-width: 0;
    min-height: 0;
    padding: 0 4px;
    border: 3px solid #D93025;
    border-radius: 4px;
    background: #FFF1F0;
    color: #C5221F;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(2px, .5vw, 7px);
    box-shadow: 0 2px 5px rgba(120, 20, 20, .14);
    font-weight: 950;
    cursor: pointer;
    touch-action: manipulation;
}
.reception-error-button .error-cross {
    font-size: clamp(1.15rem, 2.8vw, 2.3rem);
    line-height: .8;
    font-weight: 950;
}
.reception-error-button .error-label {
    font-size: clamp(.42rem, .72vw, .62rem);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .02em;
    white-space: nowrap;
}
.reception-error-button.armed {
    background: #FFE0DE;
    border-color: #C5221F;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, .18), 0 2px 5px rgba(120, 20, 20, .14);
}
.reception-error-button.last-error {
    background: #D93025;
    color: #FFFFFF;
    border-color: #A61B14;
    transform: scale(1.03);
}
.reception-error-button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* 0.7.2 – feste quadratische Volleyballfelder und Schnellzuweisung Startaufstellung */
:root {
    --scouting-court-size: 295px;
    --scouting-pair-width: 598px;
    --lineup-court-size: 128px;
    --lineup-card-width: 142px;
}

/* Volleyballfelder dürfen niemals verzerrt werden. */
.court-frame,
.zones-frame,
.scouting-court-frame,
.second-court-placeholder,
.mini-rotation {
    aspect-ratio: 1 / 1;
}

/* Scouting: zwei feste, gleich große Felder nebeneinander – kein Umbruch, kein Stretching. */
.scouting-layout {
    grid-template-columns: var(--scouting-pair-width) minmax(130px, 1fr);
    min-width: calc(var(--scouting-pair-width) + 138px);
    align-items: start;
}
.scouting-main {
    width: var(--scouting-pair-width);
    min-width: var(--scouting-pair-width);
    grid-template-rows: 42px auto;
    align-content: start;
}
.court-pair {
    width: var(--scouting-pair-width);
    min-width: var(--scouting-pair-width);
    grid-template-columns: repeat(2, var(--scouting-court-size));
    grid-auto-flow: column;
    gap: 8px;
    align-items: start;
    justify-content: start;
    overflow: visible;
}
.court-slot {
    width: var(--scouting-court-size);
    min-width: var(--scouting-court-size);
    max-width: var(--scouting-court-size);
    height: calc(var(--scouting-court-size) + 84px);
    min-height: calc(var(--scouting-court-size) + 84px);
    grid-template-rows: 16px var(--scouting-court-size) 68px;
    align-content: start;
    justify-items: stretch;
}
.scouting-court-frame {
    width: var(--scouting-court-size);
    height: var(--scouting-court-size);
    min-width: var(--scouting-court-size);
    min-height: var(--scouting-court-size);
    max-width: var(--scouting-court-size);
    max-height: var(--scouting-court-size);
    align-self: start;
    overflow: visible;
}
.scouting-court-frame .court,
.second-court-placeholder {
    width: var(--scouting-court-size);
    height: var(--scouting-court-size);
    min-width: var(--scouting-court-size);
    min-height: var(--scouting-court-size);
    max-width: var(--scouting-court-size);
    max-height: var(--scouting-court-size);
}
.second-court-placeholder {
    align-self: start;
    border-radius: 0;
}
.scouting-side {
    min-width: 130px;
}

/* Auch die Zonenverwaltung bleibt exakt quadratisch. */
.zones-frame {
    width: min(100%, 68dvh);
    height: auto;
    max-width: 68dvh;
    max-height: 68dvh;
    align-self: center;
}
.zones-frame .court {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
}

/* Startaufstellungen: fünf feste quadratische Volleyballfelder gleichzeitig. */
.lineup-page {
    grid-template-rows: 42px 182px minmax(178px, 1fr);
}
.lineup-set-grid {
    grid-template-columns: repeat(5, var(--lineup-card-width));
    grid-auto-flow: column;
    justify-content: start;
    align-items: start;
    gap: 6px;
    overflow: hidden;
}
.lineup-set-card {
    width: var(--lineup-card-width);
    min-width: var(--lineup-card-width);
    height: 182px;
    min-height: 182px;
    grid-template-rows: 28px var(--lineup-court-size) 16px;
    align-content: start;
    padding: 5px;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.lineup-set-card.active-set {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 2px rgba(0,155,49,.16);
}
.lineup-set-select {
    min-width: 0;
    height: 24px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--ink);
    font-size: .67rem;
    font-weight: 950;
}
.active-set .lineup-set-select {
    color: var(--primary-dark);
}
.mini-rotation {
    width: var(--lineup-court-size);
    height: var(--lineup-court-size);
    min-width: var(--lineup-court-size);
    min-height: var(--lineup-court-size);
    max-width: var(--lineup-court-size);
    max-height: var(--lineup-court-size);
    justify-self: center;
    align-self: start;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    align-content: center;
    overflow: hidden;
}
.lineup-position-button {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    min-width: 0;
    min-height: 0;
}
.mini-net-label {
    align-self: center;
    text-align: center;
    white-space: nowrap;
}

/* Kader in der Startaufstellung als kompakte Klick-Liste statt Kartenraster. */
.lineup-roster-panel {
    min-height: 0;
    grid-template-rows: 28px minmax(0,1fr);
}
.lineup-roster-head {
    min-height: 28px;
}
.lineup-roster-buttons {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    grid-template-rows: repeat(10, minmax(0,1fr));
    grid-auto-flow: column;
    gap: 2px 5px;
    overflow: hidden;
}
.lineup-player-button {
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    border: 1px solid #DCE4DE;
    border-radius: 5px;
    background: #FCFDFC;
    display: grid;
    grid-template-columns: 38px minmax(0,1fr) 30px;
    align-items: center;
    gap: 5px;
    padding: 1px 6px;
    text-align: left;
}
.lineup-player-button .num {
    font-size: .63rem;
    text-align: right;
    font-weight: 950;
    color: var(--primary-dark);
}
.lineup-player-button .name {
    font-size: .6rem;
    color: var(--ink);
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lineup-player-button .pos {
    font-size: .55rem;
    color: var(--muted);
    font-weight: 900;
    text-align: center;
}
.lineup-player-button.used {
    background: var(--primary-soft);
    border-color: #A8CCB3;
}
.lineup-roster-controls #lineupPrevPage,
.lineup-roster-controls #lineupNextPage {
    display: none !important;
}

@media (max-width: 900px) {
    /* Keine responsive Umordnung der beiden Scoutingfelder. */
    .scouting-layout {
        grid-template-columns: var(--scouting-pair-width) minmax(130px, 1fr);
    }
    .court-pair {
        grid-template-columns: repeat(2, var(--scouting-court-size));
    }
    .lineup-set-grid {
        grid-template-columns: repeat(5, var(--lineup-card-width));
    }
}


/* 0.7.3 – Scouting dauerhaft 80 % Feldbereich / max. 20 % Statistik.
   Keine Breakpoints dürfen dieses Verhältnis oder die zweispaltige Feldanordnung ändern. */
:root {
    --scouting-layout-gap: 8px;
    --scouting-layout-half-gap: 4px;
}

.scouting-layout {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, calc(80% - var(--scouting-layout-half-gap))) minmax(0, calc(20% - var(--scouting-layout-half-gap)));
    gap: var(--scouting-layout-gap);
    align-items: start;
}

.scouting-main {
    width: 100%;
    min-width: 0;
}

.court-pair {
    width: 100%;
    min-width: 0;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: column;
    gap: 8px;
    align-items: start;
    justify-content: stretch;
}

.court-slot {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 0;
    grid-template-rows: 16px auto 68px;
}

.scouting-court-frame,
.scouting-court-frame .court,
.second-court-placeholder {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    aspect-ratio: 1 / 1;
}

.scouting-court-frame {
    align-self: start;
}

.second-court-placeholder {
    align-self: start;
}

.scouting-side {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 1180px), (max-width: 900px) {
    .scouting-layout {
        grid-template-columns: minmax(0, calc(80% - var(--scouting-layout-half-gap))) minmax(0, calc(20% - var(--scouting-layout-half-gap)));
    }
    .court-pair {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 0.8.0 – Scouting/Angriff, Startaufstellung und iPad-Vollbild */
:root {
    --lineup-court-size-v080: 154px; /* +20 % gegenüber 128 px */
    --lineup-active-court-size-v080: 308px; /* aktueller Satz doppelte Kantenlänge */
}

/* iPad: app-eigener Vollbildmodus statt nativer Fullscreen-UI mit System-X. */
html.app-focus-mode,
html.app-focus-mode body,
html.app-focus-mode .app {
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
}
html.app-focus-mode body { position: fixed; inset: 0; }

/* Scouting bleibt 80/20. Die beiden Volleyballfelder sind immer exakt gleich groß und quadratisch. */
.scouting-layout {
    grid-template-columns: minmax(0, calc(80% - 4px)) minmax(0, calc(20% - 4px)) !important;
    gap: 8px !important;
    align-items: start;
}
.scouting-main { width: 100% !important; min-width: 0 !important; }
.court-pair {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-items: start;
    overflow: visible !important;
}
.court-slot {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: 20px auto auto auto !important;
    align-content: start;
    justify-items: stretch;
}
.court-title-label {
    font-size: .72rem;
    color: var(--primary-dark);
    letter-spacing: .06em;
}
.scouting-court-frame,
.attack-court-frame,
.scouting-court-frame .court,
.attack-court-frame .court {
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
    align-self: start !important;
    overflow: visible;
}

/* Neun quadratische Angriffs-Startfelder über dem rechten Court; links identischer Spacer. */
.attack-entry-row,
.attack-entry-spacer,
.court-extension-row {
    width: 100%;
    aspect-ratio: 9 / 1;
    min-height: 0;
}
.attack-entry-row,
.court-extension-row {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
}
.attack-entry-cell {
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-top: 2px solid var(--court-line);
    border-bottom: 2px solid var(--court-line);
    border-right: 1px solid rgba(52,64,84,.10);
    background: #F8FAF8;
}
.attack-entry-cell:first-child { border-left: 2px solid var(--court-line); }
.attack-entry-cell:last-child { border-right: 2px solid var(--court-line); }
.attack-entry-cell:active { background: var(--primary-soft); }

/* Interne 1×1-m-Linien bewusst sehr zurückhaltend; Feldnummern bleiben nur intern/ARIA erhalten. */
.court-cell {
    border-right-color: rgba(52,64,84,.085) !important;
    border-bottom-color: rgba(52,64,84,.085) !important;
}
.cell-number { display: none !important; }
.court-cell.noninteractive { cursor: default; pointer-events: none; }

/* Annahme: 3-m-Linie unten; Angriff: gedreht, 3-m-Linie oben. */
.reception-attack-line { top: calc(100% * 6 / 9) !important; }
.attack-line-top { top: calc(100% * 3 / 9) !important; }

/* Fehlerfeld liegt in einer eigenen Zeile unter Spalte 4/5 – keine Überlagerung mehr. */
.reception-error-button {
    position: static !important;
    grid-column: 4 / span 2;
    width: 100% !important;
    height: 100% !important;
    min-width: 0;
    min-height: 0;
    padding: 1px 2px !important;
    border: 2px solid #D93025 !important;
    border-radius: 3px !important;
    background: #FFF1F0;
    color: #C5221F;
    display: grid !important;
    grid-template-rows: 1fr auto;
    place-items: center;
    align-content: center;
    gap: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}
.reception-error-button .error-cross {
    align-self: end;
    font-size: clamp(1.35rem, 2.4vw, 2.2rem) !important;
    line-height: .8;
    font-weight: 950;
}
.reception-error-button .error-label {
    align-self: start;
    font-size: clamp(.5rem, .8vw, .72rem) !important;
    line-height: 1;
    text-transform: uppercase;
    font-weight: 950;
    white-space: nowrap;
}
.reception-error-button.last-error { background: #D93025; color: #fff; }

/* Spielerinnen auf dem Annahmefeld: kein Kreis mehr, nur große gut lesbare Trikotnummer. */
.player-token {
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    transform: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #102018 !important;
    font-size: clamp(1.35rem, 3.0vw, 2.65rem) !important;
    line-height: 1;
    font-weight: 1000;
    text-shadow: 0 1px 0 rgba(255,255,255,.9), 1px 0 0 rgba(255,255,255,.75), -1px 0 0 rgba(255,255,255,.75);
}
.player-token.selected {
    outline: 4px solid var(--accent) !important;
    outline-offset: -4px !important;
    transform: none !important;
}

/* Annahmequalität: Nummer und Statistik größer, Name immer in eigener zweiter Zeile. */
.receiver-stats { gap: 6px; }
.receiver-stat-row {
    min-height: 58px;
    grid-template-rows: auto auto 7px !important;
    gap: 2px !important;
    padding: 5px 7px;
}
.receiver-stat-summary {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    align-items: baseline;
    gap: 8px;
}
.receiver-stat-number {
    font-size: clamp(1.15rem, 1.9vw, 1.65rem);
    line-height: 1;
    font-weight: 1000;
    color: var(--primary-dark);
}
.receiver-stat-points {
    justify-self: end;
    font-size: clamp(.82rem, 1.2vw, 1.02rem) !important;
    line-height: 1;
    font-weight: 1000;
}
.receiver-stat-name {
    width: 100%;
    font-size: clamp(.67rem, .95vw, .82rem) !important;
    line-height: 1.1;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.receiver-stat-bar { height: 7px !important; }
.quality-badge { width: 29px; height: 29px; font-size: .86rem; }
.recent-item, .recent-empty { font-size: clamp(.68rem, 1vw, .82rem); }
.set-button-group button { font-size: .86rem; }

/* Startaufstellung: Body aus fünf Courts links + schmaler vertikaler Spielerliste rechts. */
.lineup-page {
    grid-template-rows: 42px minmax(0,1fr) !important;
    gap: 8px;
}
.lineup-workspace {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr) 270px;
    gap: 8px;
    overflow: hidden;
}
.lineup-toolbar-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.danger-outline { border-color: #D65353 !important; color: #A82B2B !important; background: #FFF7F7 !important; }
.lineup-set-grid {
    min-width: 0;
    min-height: 0;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow: hidden !important;
}
.lineup-set-card {
    width: calc(var(--lineup-court-size-v080) + 12px) !important;
    min-width: calc(var(--lineup-court-size-v080) + 12px) !important;
    height: calc(var(--lineup-court-size-v080) + 42px) !important;
    min-height: calc(var(--lineup-court-size-v080) + 42px) !important;
    grid-template-rows: 28px var(--lineup-court-size-v080) 8px !important;
    padding: 5px !important;
    transition: width .16s ease, height .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.lineup-set-card.active-set {
    width: calc(var(--lineup-active-court-size-v080) + 12px) !important;
    min-width: calc(var(--lineup-active-court-size-v080) + 12px) !important;
    height: calc(var(--lineup-active-court-size-v080) + 42px) !important;
    min-height: calc(var(--lineup-active-court-size-v080) + 42px) !important;
    grid-template-rows: 28px var(--lineup-active-court-size-v080) 8px !important;
}
.mini-rotation {
    width: var(--lineup-court-size-v080) !important;
    height: var(--lineup-court-size-v080) !important;
    min-width: var(--lineup-court-size-v080) !important;
    min-height: var(--lineup-court-size-v080) !important;
    max-width: var(--lineup-court-size-v080) !important;
    max-height: var(--lineup-court-size-v080) !important;
    aspect-ratio: 1 / 1 !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(2, 1fr) !important;
}
.active-set .mini-rotation {
    width: var(--lineup-active-court-size-v080) !important;
    height: var(--lineup-active-court-size-v080) !important;
    min-width: var(--lineup-active-court-size-v080) !important;
    min-height: var(--lineup-active-court-size-v080) !important;
    max-width: var(--lineup-active-court-size-v080) !important;
    max-height: var(--lineup-active-court-size-v080) !important;
}
.lineup-position-button { aspect-ratio: 1 / 1 !important; }
.lineup-pos-number { font-size: .62rem !important; top: 3px; left: 4px; }
.lineup-player-number { font-size: 1.2rem !important; line-height: 1; }
.lineup-player-name { font-size: .57rem !important; }
.active-set .lineup-pos-number { font-size: .82rem !important; }
.active-set .lineup-player-number { font-size: 2rem !important; }
.active-set .lineup-player-name { font-size: .78rem !important; }
.mini-net-label {
    height: 8px !important;
    min-height: 8px !important;
    background: var(--primary) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    border-radius: 0 0 4px 4px;
}

/* Spielerinnen in der Startaufstellung: eine einzige schmale, vertikale Klickliste. */
.lineup-roster-panel {
    min-width: 0;
    min-height: 0;
    height: 100%;
    grid-template-rows: 34px minmax(0,1fr) !important;
    padding: 6px !important;
}
.lineup-roster-buttons {
    min-height: 0;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    overflow: hidden !important;
}
.lineup-player-button {
    flex: 0 0 31px;
    width: 100%;
    min-height: 31px;
    height: 31px;
    display: grid !important;
    grid-template-columns: 46px minmax(0,1fr) 34px !important;
    align-items: center;
    gap: 6px !important;
    padding: 1px 6px !important;
}
.lineup-player-button .num {
    font-size: 1rem !important;
    line-height: 1;
    text-align: right;
}
.lineup-player-button .name {
    font-size: .72rem !important;
    text-align: left;
}
.lineup-player-button .pos { font-size: .62rem !important; }

/* Auch in Modalen und Listen sind Trikot-/Qualitätszahlen besser lesbar. */
.receiver-player-button .num { font-size: 1.2rem !important; }
.roster-list-number { font-size: .78rem !important; }
.zone-palette button { font-size: .86rem !important; }
.quality-dot { font-size: .78rem !important; }

@media (max-width: 1180px) {
    /* 80/20 und zwei Courts bleiben bestehen; Startaufstellung wird nur bei Bedarf proportional begrenzt. */
    .scouting-layout { grid-template-columns: minmax(0, calc(80% - 4px)) minmax(0, calc(20% - 4px)) !important; }
    .court-pair { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
    .lineup-workspace { grid-template-columns: minmax(0,1fr) 235px; }
}
.zone-mark { min-width: 20px; height: 20px; font-size: .7rem; }

/* 0.9.0 – freie Koordinaten / freie Qualitätszonen / Angriff */
.scouting-main {
    display: grid !important;
    grid-template-rows: 42px auto auto !important;
    align-content: start;
    gap: 8px !important;
    overflow: visible !important;
}
.continuous-courts { align-items: start !important; overflow: visible !important; }
.continuous-court-frame { position: relative !important; overflow: visible !important; }
.continuous-court { position: relative; z-index: 1; cursor: crosshair; }
.continuous-court .court-cell.noninteractive { pointer-events: auto !important; cursor: crosshair !important; background: transparent; }
.continuous-court .court-cell { position: relative; z-index: 1; }
.continuous-court .player-token { pointer-events: auto !important; z-index: 5; cursor: pointer; }
.court-zone-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    overflow: visible;
}
.free-zone-shape { stroke-width: 4; vector-effect: non-scaling-stroke; }
.free-zone-q3 { fill: rgba(47, 190, 77, .58); stroke: rgba(28, 143, 51, .72); }
.free-zone-q2 { fill: rgba(255, 221, 45, .72); stroke: rgba(204, 169, 0, .72); }
.free-zone-q1 { fill: rgba(242, 145, 35, .40); stroke: rgba(196, 101, 9, .62); }
.target-marker {
    position: absolute;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    z-index: 8;
    pointer-events: none;
    background: #111;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.target-marker.attack-marker { background: #005a27; }

/* X sowie 2-Sekunden-Qualitätskorrektur unter dem Feld. */
.quality-action-row {
    width: 100%;
    min-height: 48px;
    height: 48px;
    aspect-ratio: auto !important;
    display: grid !important;
    grid-template-columns: repeat(9, minmax(0,1fr));
    align-items: center;
    overflow: visible;
}
.reception-error-button.icon-only-error {
    grid-column: 4 / span 2 !important;
    height: 44px !important;
    display: grid !important;
    place-items: center !important;
    grid-template-rows: 1fr !important;
    background: #fff1f0 !important;
}
.reception-error-button.icon-only-error .error-cross {
    align-self: center !important;
    font-size: clamp(2rem, 3vw, 3rem) !important;
    line-height: 1 !important;
}
.quality-override {
    grid-column: 6 / span 4;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    padding-left: 6px;
    white-space: nowrap;
    font-size: .66rem;
    font-weight: 850;
}
.quality-override[hidden] { display: none !important; }
.quality-override button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 1000;
}
.quality-override button[data-quality="1"] { background: #f4a340; }
.quality-override button[data-quality="2"] { background: #ffe23e; }
.quality-override button[data-quality="3"] { background: #58c96a; }
.attack-quality-row .quality-override { grid-column: 6 / span 4; }

/* Angriff: Quelle oben, Ziel frei; roter AUS-Streifen liegt außerhalb und verändert die Courtgröße nicht. */
.attack-entry-cell.active {
    background: var(--accent) !important;
    box-shadow: inset 0 0 0 3px var(--primary-dark);
}
.attack-target-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: visible;
}
.attack-target-wrapper > .attack-court-frame { width: 100% !important; height: 100% !important; }
.attack-out-strip {
    position: absolute;
    z-index: 12;
    border: 1px solid rgba(201, 50, 41, .55);
    background: rgba(226, 70, 57, .14);
    cursor: crosshair;
}
.attack-out-strip:hover, .attack-out-strip:active { background: rgba(226,70,57,.28); }
.attack-out-left { right: 100%; top: 0; width: 22px; height: 100%; }
.attack-out-right { left: 100%; top: 0; width: 22px; height: 100%; }
.attack-out-bottom { top: 100%; left: 0; width: 100%; height: 22px; }

.scouting-side {
    grid-template-rows: minmax(145px,1fr) minmax(145px,1fr) !important;
    align-self: stretch;
}
.attack-stats-card { min-height: 0; }
.scouting-raw-row {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
    min-width: 0;
    margin-top: 2px;
}
.raw-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: rgba(255,255,255,.82);
    padding: 5px 7px;
}
.raw-head { display:flex; align-items:center; justify-content:space-between; gap:6px; font-size:.65rem; }
.raw-head span { color:var(--muted); font-size:.58rem; }
.compact-recent {
    height: auto !important;
    min-height: 36px !important;
    margin-top: 4px !important;
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    grid-template-rows: none !important;
    gap: 3px !important;
    overflow: hidden;
}
.recent-item.compact { min-height: 27px; height: 27px; padding:2px 5px; font-size:.59rem; }
.recent-item.compact .quality-badge { width:22px; height:22px; font-size:.65rem; }

/* Freier SVG-Zoneneditor */
.free-zones-layout { grid-template-columns:minmax(0,1fr) minmax(210px,20vw) !important; }
.zone-editor-column { min-height:0; display:grid; grid-template-rows:42px 48px minmax(0,1fr); gap:7px; }
.zone-context-buttons, .zone-tool-buttons { display:flex; gap:4px; }
.zone-context-buttons button, .zone-tool-buttons button {
    min-height: 30px; padding: 3px 9px; border:1px solid var(--border); border-radius:7px; background:#fff; font-size:.69rem; font-weight:850;
}
.zone-context-buttons button.active, .zone-tool-buttons button.active { background:var(--primary-soft); border-color:var(--primary); color:var(--primary-dark); }
.zone-editor-tools { display:flex; align-items:center; gap:7px; padding:5px 7px; overflow:hidden; }
.zone-palette button.q3 { background:#58c96a !important; }
.zone-palette button.q2 { background:#ffe23e !important; }
.zone-palette button.q1 { background:#f4a340 !important; }
.zone-editor-shell { min-height:0; display:grid; place-items:start center; overflow:hidden; }
.zone-editor-court {
    width:min(100%, calc(100dvh - 185px));
    max-width:100%;
    aspect-ratio:1/1;
    position:relative;
    border:3px solid var(--court-line);
    background-color:#fff;
    background-image:
        linear-gradient(to right, rgba(52,64,84,.08) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(52,64,84,.08) 1px, transparent 1px);
    background-size:calc(100% / 9) calc(100% / 9);
    touch-action:none;
}
.zone-editor-svg { position:absolute; inset:0; width:100%; height:100%; touch-action:none; overflow:visible; }
.zone-editor-netline { top:calc(100% * 6 / 9) !important; z-index:8; pointer-events:none; }
.editable-zone { pointer-events:all; cursor:grab; }
.editable-zone.selected { stroke:#073f1e; stroke-width:8; filter:drop-shadow(0 2px 2px rgba(0,0,0,.18)); }
.zone-handle { fill:#fff; stroke:#083f20; stroke-width:7; vector-effect:non-scaling-stroke; pointer-events:all; cursor:grab; }
.polygon-draft { fill:none; stroke:#083f20; stroke-width:7; stroke-dasharray:18 12; vector-effect:non-scaling-stroke; pointer-events:none; }
.zone-help { font-size:.68rem; line-height:1.35; color:var(--muted); }
.free-zone-legend .quality-dot { width:20px; height:20px; border-radius:5px; }
.free-zone-legend .quality-dot.q3 { background:#58c96a; }
.free-zone-legend .quality-dot.q2 { background:#ffe23e; }
.free-zone-legend .quality-dot.q1 { background:#f4a340; }
.free-zone-legend .quality-dot.qn { background:#fff; border:1px solid var(--border); }
.attack-player-buttons { max-height:65dvh; overflow:auto; }

@media (max-width: 1180px) {
    .compact-recent { grid-template-columns: 1fr !important; }
    .quality-override span { display:none; }
}

/* 0.9.0 – Startaufstellungen nach Spielstand gruppiert + Zuspielerin */
.lineup-set-grid {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    overflow: hidden !important;
}
.lineup-set-row {
    min-width: 0;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: start;
    gap: 5px;
}
.lineup-stage-label {
    padding-top: 7px;
    color: var(--muted);
    font-size: .61rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    writing-mode: horizontal-tb;
}
.lineup-stage-current .lineup-stage-label { color: var(--primary-dark); }
.lineup-stage-cards {
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 7px;
    overflow: hidden;
}
.lineup-stage-played .lineup-set-card,
.lineup-stage-future .lineup-set-card {
    opacity: .94;
}
.lineup-stage-current .lineup-set-card {
    opacity: 1;
}
.lineup-position-button {
    position: relative;
}
.lineup-position-button.setter-player {
    box-shadow: inset 0 0 0 4px #1976D2 !important;
    background: #EEF6FF !important;
    border-color: #1976D2 !important;
}
.active-set .lineup-position-button.setter-player {
    box-shadow: inset 0 0 0 6px #1976D2 !important;
}
.lineup-setter-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 4;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #1976D2;
    color: #fff;
    font-size: .62rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.active-set .lineup-setter-badge {
    min-width: 24px;
    height: 24px;
    font-size: .78rem;
}
.lineup-position-button.setter-selectable {
    cursor: pointer;
    outline: 2px dashed #1976D2;
    outline-offset: -5px;
}
.setter-action.active {
    background: #1976D2 !important;
    border-color: #1976D2 !important;
    color: #fff !important;
}

/* Die Qualitätszonen selbst bleiben reine Farbflächen – keine Ziffern im Court. */
.court-zone-overlay text,
.zone-editor-svg text { display: none !important; }

/* --------------------------------------------------------------------------
   0.9.1 final layout corrections
   -------------------------------------------------------------------------- */

/* Scouting: zwei 9x9-Hälften bilden zusammen ein 18x9-Volleyballfeld. */
.combined-volleyball-court {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
    align-items: start !important;
    overflow: visible !important;
    padding: 0 16px 34px 0;
    box-sizing: border-box;
}
.combined-volleyball-court .court-slot {
    display: grid !important;
    grid-template-rows: 20px auto 48px !important;
    gap: 0 !important;
    min-width: 0 !important;
}
.combined-volleyball-court .reception-court-slot { padding-right: 0; }
.combined-volleyball-court .attack-court-slot { padding-left: 0; }
.combined-volleyball-court .continuous-court-frame,
.combined-volleyball-court .attack-target-wrapper {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    min-width: 0 !important;
}
.combined-volleyball-court .reception-court-frame {
    border-right-width: 4px !important;
    border-radius: 0 !important;
}
.combined-volleyball-court .attack-court-frame {
    border-left-width: 4px !important;
    border-radius: 0 !important;
}
/* Nach 90° gegen den Uhrzeigersinn liegen die 3-m-Linien vertikal. */
.combined-volleyball-court .reception-attack-line,
.combined-volleyball-court .attack-line-top {
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    width: 4px !important;
    transform: none !important;
}
.combined-volleyball-court .reception-attack-line { left: calc(100% * 6 / 9) !important; }
.combined-volleyball-court .attack-line-top { left: calc(100% * 3 / 9) !important; }
.combined-volleyball-court .court-title-label {
    font-size: .75rem;
    letter-spacing: .08em;
    text-align: center;
}
/* Angriff-AUS darf nie über das Annahmefeld ragen. */
.combined-volleyball-court .attack-out-left { display: none !important; }
.combined-volleyball-court .attack-out-right { width: 14px !important; left: 100% !important; }
.combined-volleyball-court .attack-out-bottom { height: 14px !important; top: 100% !important; }
.attack-entry-row,
.attack-entry-spacer { display: none !important; }

/* Automatische Annahmeaufstellung: sechs frei positionierte Spielerinnen. */
.continuous-court { position: relative !important; }
.formation-player-token {
    position: absolute;
    z-index: 12;
    transform: translate(-50%, -50%);
    min-width: 0;
    width: clamp(38px, 4.1vw, 58px);
    height: clamp(38px, 4.1vw, 58px);
    padding: 0 3px;
    border-radius: 8px;
    border: 4px solid var(--player-quality-color, #7a8580);
    background:
        linear-gradient(var(--player-quality-soft, rgba(122,133,128,.18)), var(--player-quality-soft, rgba(122,133,128,.18))),
        #fff;
    color: #102018;
    font-size: clamp(1.55rem, 2.6vw, 2.5rem);
    line-height: 1;
    font-weight: 1000;
    box-shadow: 0 2px 7px rgba(0,0,0,.16);
    cursor: pointer;
}
.formation-player-token.selected { outline: 4px solid #111; outline-offset: 2px; }
.formation-player-token.setter-on-court { box-shadow: 0 0 0 4px #1976d2, 0 2px 7px rgba(0,0,0,.16); }

/* Fehler-X nur als großes Symbol. */
.reception-error-button.icon-only-error { border-radius: 8px !important; }
.reception-error-button.icon-only-error .error-cross { font-size: clamp(2.4rem, 3.4vw, 3.5rem) !important; }

/* Statistiken: Anzahl Aktionen + Prozent, größere Ziffern. */
.receiver-stat-summary { grid-template-columns: minmax(38px, auto) 1fr !important; }
.receiver-stat-number { font-size: clamp(1.22rem, 1.8vw, 1.7rem) !important; }
.receiver-stat-points { font-size: clamp(.82rem, 1.1vw, 1rem) !important; }
.receiver-stat-name { font-size: clamp(.72rem, .95vw, .88rem) !important; }

/* Je Rohdatenliste maximal 12 Einträge, dreispaltig und innerhalb der Karte scrollbar. */
.scouting-raw-row { min-height: 86px; max-height: 112px; }
.raw-card { min-height: 0; overflow: hidden; display: grid; grid-template-rows: 20px minmax(0,1fr); }
.compact-recent {
    min-height: 0 !important;
    height: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: 27px !important;
    align-content: start;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.recent-item.compact { min-width: 0; }
.recent-item.compact .recent-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1180px) {
    .compact-recent { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

/* Zoneneditor: immer ein deutlich sichtbares quadratisches Annahmefeld. */
.free-zones-layout { grid-template-columns: minmax(0, 1fr) 240px !important; }
.zone-editor-column { min-height: 0; grid-template-rows: 42px 48px minmax(0,1fr) !important; }
.zone-editor-shell {
    width: 100%;
    min-height: 0;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 4px;
}
.zone-editor-court {
    width: min(68dvh, 72vw, 760px) !important;
    min-width: min(420px, 78vw) !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    flex: 0 0 auto;
}
/* Wie im gedrehten Annahmefeld: 3-m-Linie vertikal. */
.zone-editor-netline {
    top: 0 !important;
    bottom: 0 !important;
    left: calc(100% * 6 / 9) !important;
    width: 4px !important;
    height: 100% !important;
}

/* Startaufstellungen kompakter: aktuell ca. 20 % kleiner, offene deutlich kleiner. */
:root {
    --lineup-played-court-v091: 126px;
    --lineup-future-court-v091: 112px;
    --lineup-current-court-v091: 246px;
}
.lineup-workspace { grid-template-columns: minmax(0, 1fr) 360px !important; }
.lineup-roster-panel { min-width: 340px !important; }
.lineup-player-button { grid-template-columns: 48px minmax(0,1fr) 38px !important; }
.lineup-player-button .name { font-size: .78rem !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lineup-stage-played .lineup-set-card {
    width: calc(var(--lineup-played-court-v091) + 12px) !important;
    min-width: calc(var(--lineup-played-court-v091) + 12px) !important;
    height: auto !important;
}
.lineup-stage-played .mini-rotation {
    width: var(--lineup-played-court-v091) !important;
    height: var(--lineup-played-court-v091) !important;
    min-width: var(--lineup-played-court-v091) !important;
    min-height: var(--lineup-played-court-v091) !important;
}
.lineup-stage-future .lineup-set-card {
    width: calc(var(--lineup-future-court-v091) + 12px) !important;
    min-width: calc(var(--lineup-future-court-v091) + 12px) !important;
    height: auto !important;
}
.lineup-stage-future .mini-rotation {
    width: var(--lineup-future-court-v091) !important;
    height: var(--lineup-future-court-v091) !important;
    min-width: var(--lineup-future-court-v091) !important;
    min-height: var(--lineup-future-court-v091) !important;
}
.lineup-stage-current .lineup-set-card {
    width: calc(var(--lineup-current-court-v091) + 12px) !important;
    min-width: calc(var(--lineup-current-court-v091) + 12px) !important;
    height: auto !important;
}
.lineup-stage-current .mini-rotation {
    width: var(--lineup-current-court-v091) !important;
    height: var(--lineup-current-court-v091) !important;
    min-width: var(--lineup-current-court-v091) !important;
    min-height: var(--lineup-current-court-v091) !important;
}
.lineup-inline-rotate {
    margin-left: auto;
    width: 31px;
    height: 27px;
    padding: 0;
    border: 1px solid var(--primary);
    border-radius: 7px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 1.15rem;
    font-weight: 1000;
}
.lineup-variant-choice {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    font-size: .58rem;
}
.lineup-variant-choice > span { color: var(--muted); font-weight: 800; }
.lineup-variant-choice button {
    min-height: 24px;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    font-size: .58rem;
    font-weight: 800;
}
.lineup-variant-choice button.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
/* In gespielten/offenen Sätzen reicht der blaue Rahmen; kein Z-Badge. */
.lineup-stage-played .lineup-setter-badge,
.lineup-stage-future .lineup-setter-badge { display: none !important; }

/* Einstellungen → Annahmeaufstellungsvarianten. */
.settings-page { height: 100%; min-height: 0; display: grid; grid-template-rows: 42px minmax(0,1fr); gap: 8px; }
.reception-variant-settings {
    min-height: 0;
    display: grid;
    grid-template-columns: 220px minmax(0,1fr);
    gap: 8px;
}
.variant-sidebar { min-height: 0; display: grid; grid-template-rows: 28px minmax(0,1fr) 34px; gap: 5px; }
.variant-buttons { min-height: 0; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.variant-select-button {
    width: 100%; min-height: 34px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 7px; background: #fff; text-align: left; font-weight: 850;
}
.variant-select-button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.variant-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.variant-editor { min-height: 0; display: grid; grid-template-rows: 42px minmax(0,1fr); gap: 6px; overflow: hidden; }
.variant-editor-head { display: grid; grid-template-columns: minmax(180px,260px) 1fr auto; gap: 8px; align-items: end; }
.variant-editor-head label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px; font-size: .66rem; font-weight: 800; }
.variant-editor-head input { min-height: 30px; border:1px solid var(--border); border-radius:7px; padding:3px 7px; }
.reception-variant-courts {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    grid-template-rows: repeat(2, minmax(0,1fr));
    gap: 8px;
    overflow: hidden;
}
.variant-template-card { min-height: 0; display: grid; grid-template-rows: 24px minmax(0,1fr); justify-items: center; }
.variant-template-title { width:100%; font-size:.7rem; font-weight:900; color:var(--primary-dark); }
.variant-template-court {
    position: relative;
    height: 100%;
    max-height: 31dvh;
    aspect-ratio: 1 / 1;
    border: 3px solid var(--court-line);
    background-color: #fff;
    background-image:
        linear-gradient(to right, rgba(52,64,84,.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(52,64,84,.055) 1px, transparent 1px);
    background-size: calc(100% / 9) calc(100% / 9);
    touch-action: none;
}
.variant-template-net { position:absolute; left:0; right:0; bottom:0; height:5px; background:var(--primary); pointer-events:none; }
.variant-position-marker {
    position:absolute;
    transform:translate(-50%,-50%);
    width:34px; height:34px;
    border-radius:50%;
    border:3px solid var(--primary-dark);
    background:#fff;
    color:var(--primary-dark);
    font-size:.9rem;
    font-weight:1000;
    touch-action:none;
    box-shadow:0 1px 4px rgba(0,0,0,.18);
}
.variant-position-marker.setter-marker { border-color:#1976d2; box-shadow:0 0 0 3px rgba(25,118,210,.22); color:#0d5fb1; }

/* iPad-App-Vollbild: genug Sicherheitsabstand für fremde Browser-Overlays. */
html.app-focus-mode .top-nav { padding-left: max(10px, env(safe-area-inset-left)) !important; padding-top: max(4px, env(safe-area-inset-top)) !important; }

/* --------------------------------------------------------------------------
   0.10.0 – Spielstand, Handlungskette und kompakteres Gesamtfeld
   -------------------------------------------------------------------------- */

/* Das zusammenhängende 18x9-Feld wird etwas kleiner, damit rundherum Platz bleibt. */
.combined-volleyball-court {
    width: min(92%, calc((100dvh - 205px) * 2)) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding-right: 20px !important;
    padding-bottom: 34px !important;
}
.combined-volleyball-court .court-slot { min-width: 0 !important; }

/* Qualitätszonen bewusst hinter den Spielerinnen und deutlich blasser. */
.court-zone-overlay {
    z-index: 2 !important;
    opacity: .52 !important;
}
.court-zone-overlay .free-zone-shape { opacity: .56 !important; }
.formation-player-token,
.continuous-court .player-token { z-index: 20 !important; }
.free-zone-q3 { fill: rgba(74, 193, 94, .32) !important; stroke: rgba(26, 139, 48, .48) !important; }
.free-zone-q2 { fill: rgba(255, 220, 50, .34) !important; stroke: rgba(189, 153, 0, .50) !important; }
.free-zone-q1 { fill: rgba(239, 149, 53, .24) !important; stroke: rgba(191, 100, 15, .42) !important; }

/* Schraffur bleibt sichtbar, wird aber heller als in 0.9.1. */
.court-zone-overlay pattern rect { opacity: .48 !important; }
.court-zone-overlay pattern line { opacity: .10 !important; }

/* Startpunkt des Angriffs auf der linken Hälfte. */
.attack-source-marker {
    background: #1976d2 !important;
    width: 20px !important;
    height: 20px !important;
    margin: -10px 0 0 -10px !important;
    box-shadow: 0 0 0 3px rgba(25,118,210,.24), 0 1px 4px rgba(0,0,0,.3) !important;
    z-index: 22 !important;
}

/* AUS-Bereich nur außerhalb der rechten Zielhälfte, ohne Überlappung der linken Hälfte. */
.combined-volleyball-court .attack-out-left { display: none !important; }
.combined-volleyball-court .attack-out-top {
    display: block !important;
    left: 0 !important;
    bottom: 100% !important;
    top: auto !important;
    width: 100% !important;
    height: 18px !important;
}
.combined-volleyball-court .attack-out-right {
    display: block !important;
    left: 100% !important;
    top: 0 !important;
    width: 18px !important;
    height: 100% !important;
}
.combined-volleyball-court .attack-out-bottom {
    display: block !important;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    height: 18px !important;
}
.attack-out-strip { background: rgba(226,70,57,.10) !important; border-color: rgba(201,50,41,.42) !important; }

/* Rechte Spalte: Spielstand oben, Qualitätskarten darunter. */
.scouting-side {
    grid-template-rows: 118px minmax(118px, 1fr) minmax(118px, 1fr) !important;
    gap: 7px !important;
}
.score-card {
    min-height: 0;
    padding: 7px !important;
    display: grid;
    grid-template-rows: 21px minmax(0,1fr) 30px;
    gap: 4px;
    overflow: hidden;
}
.score-card-head { display:flex; align-items:center; justify-content:space-between; gap:6px; font-size:.72rem; }
.score-card-head span { color:var(--muted); font-size:.62rem; font-weight:850; }
.score-board { min-height:0; display:grid; grid-template-columns:minmax(0,1fr) 14px minmax(0,1fr); align-items:center; gap:3px; }
.score-separator { text-align:center; font-size:1.3rem; font-weight:1000; }
.score-team { min-width:0; display:grid; gap:2px; }
.score-team-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-align:center; font-size:.58rem; font-weight:900; color:var(--primary-dark); }
.score-controls { display:grid; grid-template-columns:27px minmax(34px,1fr) 27px; align-items:center; gap:2px; }
.score-controls button {
    width:27px; height:27px; padding:0; border:1px solid var(--border); border-radius:7px; background:#fff; font-size:1.05rem; font-weight:1000;
}
.score-controls strong { text-align:center; font-size:clamp(1.55rem,2.1vw,2.15rem); line-height:1; color:#102018; }
.score-error-buttons { display:grid; grid-template-columns:1fr 1fr; gap:4px; }
.score-error-buttons button { min-width:0; height:29px; padding:2px 4px; border:1px solid #e34d42; border-radius:7px; background:#fff2f0; color:#b5261d; font-size:.57rem; font-weight:900; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Rohdaten nur noch sechs Aktionen; kompakt unten. */
.scouting-raw-row { min-height:68px !important; max-height:82px !important; margin-top:0 !important; }
.compact-recent { grid-template-columns:repeat(3,minmax(0,1fr)) !important; grid-auto-rows:26px !important; overflow-y:auto !important; }
.recent-item.compact { height:26px !important; min-height:26px !important; font-size:.56rem !important; }

/* Annahmeaufstellungsvarianten: zusätzlich die 3-m-Linie. */
.variant-template-three-meter {
    position:absolute;
    left:0;
    right:0;
    top:calc(100% * 6 / 9);
    height:4px;
    background:var(--primary);
    opacity:.88;
    pointer-events:none;
    z-index:2;
}
.variant-template-net { z-index:2; }
.variant-position-marker { z-index:4; }

/* Spielerklicks stehen immer über Raster und Qualitätsflächen. */
.formation-player-token { background-color:rgba(255,255,255,.88) !important; }

/* Das eigene App-Vollbild erhält links oben zusätzlichen Sicherheitsraum; native iPad-Vollbild-UI wird nicht verwendet. */
html.app-focus-mode .top-nav { padding-left:max(48px, env(safe-area-inset-left)) !important; }

@media (max-width: 1180px) {
    .combined-volleyball-court { width:min(90%, calc((100dvh - 195px) * 2)) !important; }
    .scouting-side { grid-template-rows:110px minmax(110px,1fr) minmax(110px,1fr) !important; }
}
/* Reserve oberhalb beider Hälften denselben Raum für den oberen Angriff-AUS-Streifen. */
.combined-volleyball-court .reception-court-frame,
.combined-volleyball-court .attack-target-wrapper { margin-top:18px !important; }

/* --------------------------------------------------------------------------
   0.10.1 – Feldflucht, größere Neben-Sätze und kompaktere Namensdarstellung
   -------------------------------------------------------------------------- */

/* Beide Spielfeldhälften beginnen exakt auf derselben Höhe. Der rote obere
   AUS-Streifen des Angriffs liegt außerhalb des Courts und verschiebt ihn nicht. */
.combined-volleyball-court .reception-court-frame,
.combined-volleyball-court .attack-target-wrapper {
    margin-top: 0 !important;
}
.combined-volleyball-court .reception-court-frame,
.combined-volleyball-court .attack-court-frame {
    align-self: start !important;
}
.combined-volleyball-court .attack-out-top {
    bottom: 100% !important;
    top: auto !important;
}

/* Die manuellen Punktfehler liegen direkt unter den jeweiligen 3-Meter-Bereichen
   und nicht mehr in der Spielstandskarte. */
.combined-volleyball-court .court-slot {
    grid-template-rows: 20px auto 48px 30px !important;
}
.manual-error-anchor {
    width: 33.3333%;
    height: 28px;
    display: flex;
    align-items: center;
}
.reception-manual-error-anchor {
    justify-self: end;
    justify-content: flex-end;
}
.attack-manual-error-anchor {
    justify-self: start;
    justify-content: flex-start;
}
.manual-error-anchor button {
    width: 100%;
    min-width: 0;
    height: 27px;
    padding: 1px 5px;
    border: 1px solid #e34d42;
    border-radius: 7px;
    background: #fff2f0;
    color: #b5261d;
    font-size: .58rem;
    font-weight: 900;
    white-space: nowrap;
}
.manual-error-anchor button:disabled { opacity: .42; }
.score-card {
    grid-template-rows: 21px minmax(0,1fr) !important;
}
.score-error-buttons { display: none !important; }

/* Neben-Sätze dürfen die verfügbare Breite deutlich besser ausnutzen. Maximal
   vier Karten stehen in einer Zeile; alle Volleyballfelder bleiben quadratisch. */
:root {
    --lineup-played-court-v101: 205px;
    --lineup-future-court-v101: 205px;
}
.lineup-stage-played .lineup-stage-cards,
.lineup-stage-future .lineup-stage-cards {
    width: 100%;
    display: flex !important;
    gap: 9px !important;
    overflow: hidden !important;
}
.lineup-stage-played .lineup-set-card,
.lineup-stage-future .lineup-set-card {
    flex: 0 1 calc(25% - 7px) !important;
    width: min(var(--lineup-played-court-v101), calc(25% - 7px)) !important;
    min-width: 150px !important;
    max-width: var(--lineup-played-court-v101) !important;
    height: auto !important;
}
.lineup-stage-future .lineup-set-card {
    max-width: var(--lineup-future-court-v101) !important;
}
.lineup-stage-played .mini-rotation,
.lineup-stage-future .mini-rotation {
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 1 / 1 !important;
}

/* Positionsziffern sind in der Startaufstellung redundant. */
.lineup-pos-number { display: none !important; }

/* Name im Feld: Nachname gut lesbar, Vorname klein in zweiter Zeile. */
.lineup-position-button {
    padding: 4px 3px !important;
    gap: 2px !important;
    overflow: hidden;
}
.lineup-player-name {
    width: 100% !important;
    min-width: 0;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    overflow: hidden !important;
    text-align: center;
    white-space: normal !important;
    line-height: 1.03 !important;
}
.lineup-player-surname {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .61rem;
    font-weight: 850;
    color: var(--ink);
}
.lineup-player-given {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .48rem;
    font-weight: 650;
    color: var(--muted);
}
.lineup-stage-current .lineup-player-surname {
    font-size: .77rem;
}
.lineup-stage-current .lineup-player-given {
    font-size: .61rem;
}
.lineup-stage-played .lineup-player-number,
.lineup-stage-future .lineup-player-number {
    font-size: 1.35rem !important;
}

@media (max-width: 1180px) {
    :root {
        --lineup-played-court-v101: 178px;
        --lineup-future-court-v101: 178px;
    }
    .lineup-stage-played .lineup-set-card,
    .lineup-stage-future .lineup-set-card {
        min-width: 132px !important;
    }
}

/* Bei nur zwei Satz-Zeilen (Satz 1 bzw. Satz 5) dürfen die maximal vier
   Nebenfelder deutlich größer werden. Bei drei Zeilen werden sie kompakter,
   damit die Seite weiterhin ohne vertikales Scrollen auf das Tablet passt. */
.lineup-layout-two-rows .lineup-stage-played .lineup-set-card,
.lineup-layout-two-rows .lineup-stage-future .lineup-set-card {
    max-width: 225px !important;
    min-width: 168px !important;
}
.lineup-layout-three-rows .lineup-stage-played .lineup-set-card,
.lineup-layout-three-rows .lineup-stage-future .lineup-set-card {
    max-width: 145px !important;
    min-width: 118px !important;
}

/* 18 px Reserve für den oberen roten Angriff-AUS-Streifen, ohne die rechte
   Spielfeldhälfte selbst nach unten zu verschieben. */
.combined-volleyball-court .court-slot {
    grid-template-rows: 38px auto 48px 30px !important;
}
.combined-volleyball-court .court-title-label {
    height: 20px;
    align-self: start;
}

/* 0.12.0 – Spielkader-Teilnahme pro laufendem Spiel. */
.roster-row { grid-template-columns: 38px 55px minmax(180px,1fr) 68px 82px 42px 100px; }
.game-roster-toggle { min-width: 0; height: 25px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 6px; border: 1px solid #C7D4C9; border-radius: 999px; background: #F7FAF7; font-size: .52rem; font-weight: 900; color: #4D5C51; cursor: pointer; user-select: none; }
.game-roster-toggle input { appearance: none; -webkit-appearance: none; width: 28px !important; height: 16px !important; min-width: 28px; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 999px; background: #CDD5CF; position: relative; cursor: pointer; }
.game-roster-toggle input::after { content: ''; position: absolute; width: 12px; height: 12px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.22); transition: transform .15s ease; }
.game-roster-toggle input:checked { background: var(--primary); }
.game-roster-toggle input:checked::after { transform: translateX(12px); }
.game-roster-toggle input:disabled { opacity: .55; cursor: default; }
.game-roster-toggle:has(input:not(:checked)) { border-color: #E3B4B0; background: #FFF6F5; color: #A8322A; }
@media (max-width: 900px) {
    .roster-row { grid-template-columns: 28px 46px minmax(120px,1fr) 55px 68px 32px 86px; }
    .game-roster-toggle { padding: 0 4px; gap: 3px; font-size: .48rem; }
}

/* --------------------------------------------------------------------------
   0.12.0 – Rally-Pfeile, vollständiger AUS-Rahmen, Auswertung und Detaildialog
   -------------------------------------------------------------------------- */

/* Qualitätszonen bleiben klar hinter den Spielerinnen, aber noch zurückhaltender. */
.court-zone-overlay { z-index: 2 !important; opacity: .38 !important; }
.court-zone-overlay .free-zone-shape { opacity: .42 !important; }
.free-zone-q3 { fill: rgba(74,193,94,.22) !important; stroke: rgba(26,139,48,.38) !important; }
.free-zone-q2 { fill: rgba(255,220,50,.24) !important; stroke: rgba(189,153,0,.40) !important; }
.free-zone-q1 { fill: rgba(239,149,53,.18) !important; stroke: rgba(191,100,15,.34) !important; }
.formation-player-token,
.continuous-court .player-token { z-index: 24 !important; }

/* Vorderspieler (2/3/4) rund, Hinterspieler (1/6/5) quadratisch. */
.formation-player-token.front-row-player { border-radius: 50% !important; }
.formation-player-token.back-row-player { border-radius: 8px !important; }

/* Das zusätzliche weiße Z wird nicht benötigt: blaue Umrandung reicht. */
.lineup-setter-badge { display: none !important; }

/* Rally-Pfeile liegen über Zonen/Raster, aber unter den Spielerinnen. */
.combined-volleyball-court { position: relative !important; }
.rally-arrow-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 16;
}

/* Etwas kleineres Gesamtfeld und genug Abstand für den komplett umlaufenden AUS-Rahmen. */
.combined-volleyball-court {
    width: min(88%, calc((100dvh - 225px) * 2)) !important;
    column-gap: 36px !important;
    padding: 26px 30px 42px 6px !important;
}
.attack-target-wrapper { overflow: visible !important; }
.combined-volleyball-court .attack-out-strip {
    display: block !important;
    background: rgba(226,70,57,.12) !important;
    border: 1px solid rgba(201,50,41,.48) !important;
    z-index: 7 !important;
}
.combined-volleyball-court .attack-out-left {
    display: block !important;
    right: 100% !important;
    left: auto !important;
    top: -24px !important;
    width: 24px !important;
    height: calc(100% + 48px) !important;
}
.combined-volleyball-court .attack-out-top {
    display: block !important;
    left: -24px !important;
    bottom: 100% !important;
    top: auto !important;
    width: calc(100% + 48px) !important;
    height: 24px !important;
}
.combined-volleyball-court .attack-out-right {
    display: block !important;
    left: 100% !important;
    top: -24px !important;
    width: 24px !important;
    height: calc(100% + 48px) !important;
}
.combined-volleyball-court .attack-out-bottom {
    display: block !important;
    left: -24px !important;
    top: 100% !important;
    width: calc(100% + 48px) !important;
    height: 24px !important;
}

/* Fehlerknöpfe zweizeilig: Fehler / Mannschaft. */
.manual-error-anchor { width: 44% !important; height: 37px !important; }
.manual-error-anchor button {
    height: 36px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    line-height: 1.05;
    white-space: normal !important;
    overflow: hidden;
}
.manual-error-anchor button span { font-size: .54rem; font-weight: 850; text-transform: uppercase; letter-spacing: .02em; }
.manual-error-anchor button strong { width: 100%; font-size: .61rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Zwei Reihen mit je drei Rohdaten-Aktionen sind immer vollständig sichtbar. */
.scouting-raw-row { min-height: 88px !important; max-height: 92px !important; }
.compact-recent {
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
    grid-template-rows: repeat(2,31px) !important;
    grid-auto-rows: 31px !important;
    max-height: 64px !important;
    overflow: hidden !important;
}
.recent-item.compact { height: 31px !important; min-height: 31px !important; }

/* Nicht aktuelle Satzfelder nutzen die verfügbare Breite besser aus. */
.lineup-stage-played .lineup-stage-cards,
.lineup-stage-future .lineup-stage-cards { width: 100% !important; }
.lineup-stage-played .lineup-set-card,
.lineup-stage-future .lineup-set-card,
.lineup-layout-three-rows .lineup-stage-played .lineup-set-card,
.lineup-layout-three-rows .lineup-stage-future .lineup-set-card,
.lineup-layout-two-rows .lineup-stage-played .lineup-set-card,
.lineup-layout-two-rows .lineup-stage-future .lineup-set-card {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 155px !important;
    max-width: 245px !important;
}

/* Detailoverlay für letzte Aktionen. */
.action-detail-card { width: min(430px, calc(100vw - 34px)); }
.action-modal-details { display: grid; gap: 7px; padding: 4px 0 10px; }
.action-modal-details > div { display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 9px; background: #f8faf8; }
.action-modal-details strong { color: var(--muted); font-size: .72rem; }
.action-modal-details span { font-weight: 850; font-size: .82rem; }
.action-modal-actions { display: flex; justify-content: flex-end; }

/* Auswertung: interne Scrollfläche, pro Angreiferin ein Feld, Netz oben. */
.evaluation-page { height: 100%; min-height: 0; display: grid; grid-template-rows: 48px minmax(0,1fr); gap: 7px; }
.evaluation-toolbar { min-width: 0; }
.evaluation-legend { display: flex; align-items: center; gap: 6px; font-size: .63rem; font-weight: 800; color: var(--muted); white-space: nowrap; }
.eval-legend-point { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.eval-legend-point.q3 { background:#14963b; }
.eval-legend-point.q12 { background:#d4a900; }
.eval-legend-point.q0 { background:#d83228; }
.evaluation-grid {
    min-height: 0;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    align-content: start;
    gap: 10px;
    padding: 2px 4px 10px 2px;
}
.evaluation-empty { padding: 18px; border: 1px dashed var(--border); border-radius: 12px; color: var(--muted); background: #fff; }
.evaluation-player-card { min-width: 0; display: grid; grid-template-rows: 39px auto; gap: 5px; padding: 8px; background:#fff; border:1px solid var(--border); border-radius:12px; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.evaluation-player-head { min-width:0; display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:7px; }
.evaluation-player-head strong { font-size:1.45rem; line-height:1; color:var(--primary-dark); text-align:center; }
.evaluation-player-head span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:900; font-size:.76rem; }
.evaluation-player-head small { color:var(--muted); font-size:.58rem; font-weight:800; }
.evaluation-court-svg { width:100%; aspect-ratio:1/1; display:block; overflow:hidden; border-radius:2px; }
.eval-court-bg { fill:#fbfcfb; stroke:#176b35; stroke-width:12; }
.eval-gridline { stroke:#cfd7d1; stroke-width:3; opacity:.55; }
.eval-three-meter { stroke:#00a43b; stroke-width:10; }
.eval-net { stroke:#0a602d; stroke-width:17; }

@media (max-width: 1180px) {
    .combined-volleyball-court { width:min(86%, calc((100dvh - 230px) * 2)) !important; column-gap:32px !important; }
    .evaluation-grid { grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); }
    .lineup-stage-played .lineup-set-card,
    .lineup-stage-future .lineup-set-card { min-width: 142px !important; max-width: 220px !important; }
}

/* Annahmeaufstellungs-Editor: gleiche Symbolik wie im Scouting. */
.variant-position-marker[data-rotation="2"],
.variant-position-marker[data-rotation="3"],
.variant-position-marker[data-rotation="4"] { border-radius: 50% !important; }
.variant-position-marker[data-rotation="1"],
.variant-position-marker[data-rotation="5"],
.variant-position-marker[data-rotation="6"] { border-radius: 8px !important; }

/* --------------------------------------------------------------------------
   0.13.0 final – K1/K2 und präzise Angriff-Aus-Geometrie
   -------------------------------------------------------------------------- */
.no-k1-button {
    min-width: 108px;
    height: 34px;
    border: 1px solid #bf7b00;
    border-radius: 9px;
    background: #fff5d8;
    color: #7b4d00;
    font-weight: 950;
    font-size: .72rem;
    white-space: nowrap;
}
.no-k1-button:not(:disabled):active { transform: translateY(1px); }

.runner-position-badge {
    position: absolute;
    left: 6px;
    top: 6px;
    z-index: 28;
    min-width: 34px;
    height: 28px;
    padding: 0 7px;
    border: 2px solid #08742d;
    border-radius: 7px;
    background: rgba(255,255,255,.92);
    color: #08742d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    line-height: 1;
    font-weight: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,.11);
    pointer-events: none;
}

/* AUS nur oben/rechts/unten. Am Netz (linke Kante) niemals rot. */
.combined-volleyball-court .attack-out-left { display: none !important; }
.combined-volleyball-court .attack-out-strip {
    --attack-out-size: 31px;
    background: #fde9e7 !important;
    border-color: #ef8b82 !important;
    opacity: 1 !important;
}
.combined-volleyball-court .attack-out-top {
    left: 0 !important;
    bottom: 100% !important;
    top: auto !important;
    width: calc(100% + var(--attack-out-size)) !important;
    height: var(--attack-out-size) !important;
}
.combined-volleyball-court .attack-out-right {
    left: 100% !important;
    top: 0 !important;
    width: var(--attack-out-size) !important;
    height: calc(100% + var(--attack-out-size)) !important;
}
.combined-volleyball-court .attack-out-bottom {
    left: 0 !important;
    top: 100% !important;
    width: calc(100% + var(--attack-out-size)) !important;
    height: var(--attack-out-size) !important;
}
/* Die überlappenden Eckflächen sind deckend und daher optisch exakt gleich hell. */
.combined-volleyball-court { padding-right: 42px !important; padding-bottom: 50px !important; }

.evaluation-toolbar-actions { display:flex; align-items:center; gap:12px; min-width:0; }
.evaluation-phase-filter { display:flex; gap:4px; }
.evaluation-phase-filter button {
    height:30px; min-width:44px; padding:0 10px; border:1px solid var(--border);
    border-radius:8px; background:#fff; font-size:.64rem; font-weight:900; color:var(--text);
}
.evaluation-phase-filter button.active { background:#e7f6ec; border-color:#0a8b35; color:#08742d; box-shadow: inset 0 0 0 1px #0a8b35; }
.evaluation-court-svg { aspect-ratio: 1000 / 1140 !important; overflow: visible !important; }
.eval-source-cell { fill:#f6f8f6; stroke:#cfd7d1; stroke-width:2; }

/* Editor-Symbolik: Vorderspieler mit sehr leichter grauer Füllung. */
.variant-position-marker[data-rotation="2"],
.variant-position-marker[data-rotation="3"],
.variant-position-marker[data-rotation="4"] { background:#f0f2f0 !important; }
.variant-position-marker[data-rotation="1"],
.variant-position-marker[data-rotation="5"],
.variant-position-marker[data-rotation="6"] { background:#fff !important; }

/* 0.13.0 – Spielverwaltung / Einstellungen / gekoppelte Aufstellungen */
.game-history-button { width:100%; text-align:left; cursor:pointer; }
.game-history-row small { color:var(--muted); font-size:.55rem; font-weight:750; }
.game-manage-card { width:min(620px,calc(100vw - 32px)); }
.game-manage-fields { margin:4px 0 12px; }
.game-manage-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.game-delete-confirm { margin-top:12px; padding:12px; border:1px solid #e89a94; border-radius:10px; background:#fff3f2; display:grid; gap:7px; }
.game-delete-confirm[hidden] { display:none !important; }
.game-delete-confirm > span { color:#7a3b37; font-size:.7rem; }
.game-delete-confirm > div { display:flex; justify-content:flex-end; gap:8px; }
.settings-toolbar { gap:12px; }
.settings-default-opponent { display:flex; align-items:end; gap:6px; margin-left:auto; }
.settings-default-opponent label { display:grid; gap:2px; font-size:.55rem; font-weight:850; color:var(--muted); }
.settings-default-opponent input { width:190px; height:31px; }
.variant-formation-mode { display:inline-flex; gap:4px; padding:3px; border:1px solid var(--border); border-radius:9px; background:#f5f8f5; }
.variant-formation-mode button { height:30px; min-width:76px; border:1px solid transparent; border-radius:7px; background:transparent; font-size:.68rem; font-weight:900; }
.variant-formation-mode button.active { background:#fff; border-color:#0a8b35; color:#08742d; box-shadow:0 1px 3px rgba(0,0,0,.08); }
.variant-quick-button { min-height:44px !important; font-size:.8rem !important; }
.roster-row.readonly { opacity:.88; background:#f7f8f7; }
.roster-row.readonly input { background:#f1f3f1; color:#485149; }
.readonly-hint { color:var(--muted); font-size:.55rem; font-weight:850; }
.team-button.game-team::after { content:' • Spiel'; font-size:.48rem; color:#08742d; }

/* Variantenwahl des aktuellen Satzes rechts neben dem großen Feld. */
.lineup-set-card.active-set { position:relative; overflow:visible !important; }
.lineup-set-card.active-set .lineup-variant-choice {
    position:absolute;
    left:calc(100% + 14px);
    top:44px;
    width:220px;
    max-height:calc(100% - 54px);
    overflow:auto;
    display:flex !important;
    flex-direction:column;
    align-items:stretch;
    gap:5px;
    padding:8px;
    border:1px solid var(--border);
    border-radius:10px;
    background:#fff;
    box-shadow:0 2px 8px rgba(0,0,0,.07);
    z-index:8;
}
.lineup-set-card.active-set .lineup-variant-choice > span { font-size:.58rem; color:var(--muted); font-weight:900; }
.lineup-set-card.active-set .lineup-variant-choice button { min-height:31px; white-space:normal; text-align:left; }

@media (max-width: 1150px) {
    .lineup-set-card.active-set .lineup-variant-choice { width:180px; left:calc(100% + 8px); }
    .settings-default-opponent input { width:150px; }
}

/* --------------------------------------------------------------------------
   0.14.0 final – Programmeinstellungen, Live-Anzeige und kompakte Tablet-UI
   -------------------------------------------------------------------------- */

/* Einstellungen: eigenes zweites Navigationsniveau. */
.settings-subnav {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    border: 1px solid #bdd8c4;
    border-radius: 10px;
    background: #e8f4eb;
    overflow-x: auto;
    scrollbar-width: none;
}
.settings-subnav::-webkit-scrollbar { display:none; }
.settings-subnav button {
    flex: 0 0 auto;
    height: 29px;
    padding: 0 11px;
    border: 1px solid #a9cdb2;
    border-radius: 8px;
    background: #f8fcf9;
    color: #235e35;
    font-size: .65rem;
    font-weight: 900;
    white-space: nowrap;
}
.settings-subnav button.active { background:#087b31; color:#fff; border-color:#087b31; }
.program-settings-page {
    height: 100%; min-height: 0;
    display: grid;
    grid-template-rows: 38px 44px minmax(0,1fr);
    gap: 8px;
}
.program-settings-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 10px;
    align-content: start;
}
.program-mode-card, .program-default-card, .realtime-info-card { min-height: 135px; display:grid; align-content:start; gap:10px; }
.program-mode-buttons { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.program-mode-buttons button {
    height: 48px; border:2px solid var(--border); border-radius:10px; background:#fff;
    font-size:.9rem; font-weight:950; color:var(--ink);
}
.program-mode-buttons button.active { border-color:var(--primary); background:var(--primary-soft); color:var(--primary-dark); box-shadow:inset 0 0 0 1px var(--primary); }
.program-mode-hint, .realtime-info-card p { margin:0; color:var(--muted); font-size:.7rem; line-height:1.35; }
.realtime-status { display:inline-flex; align-items:center; min-height:28px; width:max-content; max-width:100%; padding:0 9px; border-radius:999px; background:#e8f5eb; color:#08742d; font-size:.64rem; font-weight:900; }
.realtime-status[data-mode="offline"] { background:#f4eeee; color:#9b322c; }
.realtime-status[data-mode="waiting"] { background:#fff5da; color:#876100; }
.program-default-card .settings-default-opponent { margin:0; align-items:end; }
.program-default-card .settings-default-opponent label { flex:1; }
.program-default-card .settings-default-opponent input { width:100%; }

/* Ansichtsversion: nur Scouting, Auswertung und Programmeinstellungen. */
.view-only-mode #view-scouting .scouting-toolbar .toolbar-actions,
.view-only-mode #view-scouting .court-bottom-actions,
.view-only-mode #view-scouting .score-controls,
.view-only-mode #view-scouting .formation-player-token,
.view-only-mode #view-scouting .continuous-court,
.view-only-mode #view-scouting .attack-out-strip {
    pointer-events: none !important;
}
.view-only-mode #view-scouting .scouting-toolbar .toolbar-actions,
.view-only-mode #view-scouting .court-bottom-actions { opacity:.42; }

/* Die beiden Feldhälften bilden optisch wieder ein einziges Feld: keine Lücke am Netz. */
.combined-volleyball-court {
    column-gap: 0 !important;
    padding-top: 34px !important;
}
.combined-volleyball-court .court-slot { grid-template-rows: 0 auto 42px !important; }
.combined-volleyball-court .court-title-label { display:none !important; }
.combined-volleyball-court .reception-court-frame,
.combined-volleyball-court .attack-target-wrapper { margin-top:0 !important; }
.combined-volleyball-court .reception-court-frame { border-right-width:3px !important; }
.combined-volleyball-court .attack-court-frame { border-left-width:0 !important; }

/* Angriff-AUS ausschließlich oben, rechts und unten. Keine rote Kante am Netz. */
.combined-volleyball-court .attack-out-left { display:none !important; }
.combined-volleyball-court .attack-out-strip { --attack-out-size:31px; background:#fde9e7 !important; border:1px solid #ef8b82 !important; opacity:1 !important; }
.combined-volleyball-court .attack-out-top { left:0 !important; width:calc(100% + var(--attack-out-size)) !important; height:var(--attack-out-size) !important; }
.combined-volleyball-court .attack-out-right { left:100% !important; top:0 !important; width:var(--attack-out-size) !important; height:calc(100% + var(--attack-out-size)) !important; }
.combined-volleyball-court .attack-out-bottom { left:0 !important; top:100% !important; width:calc(100% + var(--attack-out-size)) !important; height:var(--attack-out-size) !important; }

/* Alle Aktionen unter dem Feld liegen auf exakt derselben Höhe. */
.court-bottom-actions {
    min-width:0;
    height:38px;
    display:flex;
    align-items:center;
    gap:6px;
    overflow:visible;
    padding-top:4px;
}
.reception-bottom-actions { justify-content:flex-start; }
.attack-bottom-actions { justify-content:flex-end; }
.reception-error-button,
.manual-team-error-button {
    flex:0 0 31%;
    height:34px !important;
    min-width:0;
    border:1px solid #e34d42;
    border-radius:8px;
    background:#fff2f0;
    color:#b5261d;
    font-size:.61rem;
    font-weight:950;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    line-height:1.05;
    overflow:hidden;
}
.manual-team-error-button { flex-direction:column; }
.manual-team-error-button span { font-size:.5rem; text-transform:uppercase; }
.manual-team-error-button strong { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.58rem; }
.reception-error-button span { font-size:.62rem; font-weight:950; }
.no-k1-button { height:34px; flex:0 0 auto; }
.quality-override {
    position:static !important;
    height:34px !important;
    min-height:34px !important;
    display:flex;
    align-items:center;
    gap:4px;
    padding:2px 4px !important;
    border-radius:8px;
    background:#fff;
    box-shadow:0 1px 4px rgba(0,0,0,.08);
    z-index:30;
}
.quality-override[hidden] { display:none !important; }
.quality-override span { font-size:.52rem; }
.quality-override button { width:28px !important; height:28px !important; min-width:28px; padding:0 !important; }
.attack-bottom-actions .quality-override { margin-right:auto; }
.attack-bottom-actions .manual-team-error-button { flex-basis:38%; }

/* Annahmezonen bewusst blass und hinter sämtlichen Spielerinnen. */
.court-zone-overlay { opacity:.30 !important; z-index:2 !important; }
.court-zone-overlay .free-zone-shape { opacity:.34 !important; }
.free-zone-q3 { fill:rgba(74,193,94,.20) !important; stroke:rgba(26,139,48,.35) !important; }
.free-zone-q2 { fill:rgba(255,220,50,.22) !important; stroke:rgba(189,153,0,.36) !important; }
.formation-player-token { z-index:24 !important; }
.formation-player-token.formation-movable { cursor:grab !important; touch-action:none; }
.formation-player-token.formation-movable:active { cursor:grabbing !important; }

/* Startaufstellungen: keine unnötigen vertikalen Leerflächen; 3x2-Spielerblock. */
.lineup-set-card,
.lineup-set-card.active-set,
.lineup-stage-played .lineup-set-card,
.lineup-stage-future .lineup-set-card,
.lineup-stage-current .lineup-set-card {
    height:auto !important;
    min-height:0 !important;
    grid-template-rows:32px auto 7px !important;
    align-self:start !important;
}
.lineup-stage-current .lineup-set-card { width:min(390px, 100%) !important; min-width:300px !important; }
.lineup-stage-current .mini-rotation {
    width:100% !important; height:auto !important; min-width:0 !important; min-height:0 !important;
    max-width:none !important; max-height:none !important; aspect-ratio:3 / 2 !important;
}
.lineup-stage-played .mini-rotation,
.lineup-stage-future .mini-rotation {
    width:100% !important; height:auto !important; min-width:0 !important; min-height:0 !important;
    max-width:none !important; max-height:none !important; aspect-ratio:3 / 2 !important;
}
.lineup-position-button { aspect-ratio:auto !important; min-height:0 !important; }
.lineup-stage-current .lineup-position-button { padding:4px 3px !important; }
.lineup-stage-played .lineup-set-card,
.lineup-stage-future .lineup-set-card { max-width:260px !important; min-width:170px !important; }
.lineup-player-name { white-space:normal !important; }

/* Auswertung: gleiche Pfeilstärke, mehr Raum für echte AUS-Ziele und kompakter Kartenkopf. */
.evaluation-player-card { grid-template-rows:58px auto !important; }
.evaluation-player-head-0140 { display:grid !important; grid-template-columns:1fr !important; grid-template-rows:27px 25px !important; gap:1px !important; }
.eval-head-top { display:grid; grid-template-columns:46px minmax(0,1fr) auto; align-items:center; gap:7px; min-width:0; }
.eval-head-top > strong { font-size:1.45rem; color:var(--primary-dark); text-align:center; }
.eval-head-top > span { overflow:visible !important; text-overflow:clip !important; white-space:nowrap; font-size:.67rem; font-weight:850; color:var(--muted); }
.eval-head-top > b { white-space:nowrap; font-size:.78rem; color:var(--primary-dark); }
.eval-player-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.82rem; font-weight:950; padding-left:3px; }
.evaluation-court-svg { overflow:visible !important; aspect-ratio:1280 / 1360 !important; }

/* Native Vollbild-UI kann links oben eigene Bedienelemente einblenden. */
html.native-fullscreen-safe .top-nav { padding-left:max(74px, env(safe-area-inset-left)) !important; }
html.native-fullscreen-safe .version-stamp { left:max(74px, env(safe-area-inset-left)) !important; }

@media (max-width: 1180px) {
    .program-settings-grid { grid-template-columns:1fr 1fr; }
    .lineup-stage-current .lineup-set-card { min-width:270px !important; }
    .reception-error-button, .manual-team-error-button { flex-basis:29%; }
}

/* --------------------------------------------------------------------------
   0.14.1 – kompakter Spielstart, stabile Aktionsleiste und editierbare Aktionen
   -------------------------------------------------------------------------- */

/* Spiele: Nach dem zusätzlichen Einstellungs-Untermenü gibt es fünf echte Zeilen.
   Keine flexible Zeile darf die Mannschaftsauswahl künstlich auf Seitenhöhe ziehen. */
.games-page {
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: 38px 42px 54px auto minmax(110px, 1fr) !important;
    gap: 7px !important;
    overflow: hidden !important;
}
.games-page > .view-toolbar { min-height: 0 !important; height: 42px !important; }
.active-game-card {
    min-height: 0 !important;
    height: 54px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto auto !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 6px 9px !important;
    overflow: hidden !important;
}
.active-game-card > strong,
.active-game-card > span { min-width: 0; }
.active-game-card > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-game-card .small-action,
.active-game-card .danger-action { height: 30px !important; }
.game-create {
    min-height: 0 !important;
    height: auto !important;
    display: grid !important;
    grid-template-rows: 24px auto 39px !important;
    gap: 6px !important;
    padding: 7px 9px !important;
    align-content: start !important;
    overflow: visible !important;
}
.game-create-head { min-height: 0 !important; height: 24px !important; }
.game-team-buttons {
    min-height: 0 !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-rows: 32px !important;
    gap: 5px !important;
    align-content: start !important;
}
.game-team-button {
    height: 32px !important;
    min-height: 32px !important;
    padding: 3px 7px !important;
    border-radius: 7px !important;
    font-size: .58rem !important;
}
.game-fields {
    min-height: 0 !important;
    height: 39px !important;
    display: grid !important;
    grid-template-columns: minmax(165px, 1.15fr) 132px minmax(150px, .9fr) max-content !important;
    gap: 6px !important;
    align-items: end !important;
}
.game-fields label { gap: 1px !important; }
.game-fields input { height: 29px !important; }
.game-fields .primary-action { height: 29px !important; align-self: end !important; }
.game-history {
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 7px 9px !important;
}
.game-history-list {
    min-height: 0 !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(42px, 1fr) !important;
    overflow-y: auto !important;
}

/* Qualitätskarten: kompakt und ohne rote/orange/grüne Fortschrittsbalken. */
.stats-card { min-height: 0 !important; overflow: hidden !important; }
.receiver-stats { gap: 4px !important; overflow-y: auto !important; }
.receiver-stat-row {
    min-height: 42px !important;
    height: auto !important;
    display: grid !important;
    grid-template-rows: auto auto !important;
    grid-template-columns: 1fr !important;
    gap: 1px !important;
    padding: 4px 6px !important;
}
.receiver-stat-summary { min-height: 19px; }
.receiver-stat-number { font-size: clamp(1.03rem, 1.45vw, 1.32rem) !important; }
.receiver-stat-points { font-size: clamp(.66rem, .9vw, .82rem) !important; }
.receiver-stat-name { font-size: clamp(.61rem, .78vw, .72rem) !important; }
.receiver-stat-bar { display: none !important; }

/* Fehler- und Qualitätsbedienung unter beiden Courts: feste, getrennte Zellen. */
.court-bottom-actions {
    height: 40px !important;
    min-height: 40px !important;
    display: grid !important;
    align-items: center !important;
    gap: 5px !important;
    overflow: visible !important;
    padding-top: 4px !important;
}
.reception-bottom-actions { grid-template-columns: minmax(96px, 1fr) minmax(126px, 1.45fr) minmax(96px, 1fr) !important; }
.attack-bottom-actions { grid-template-columns: minmax(0, 1fr) minmax(112px, .75fr) !important; }
.court-action-center {
    min-width: 0;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: visible;
}
.attack-action-center { justify-content: flex-start; }
.reception-error-button,
.manual-team-error-button {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 34px !important;
    flex: none !important;
}
.quality-override {
    flex: 0 1 auto !important;
    max-width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    margin: 0 !important;
}
.quality-override button { width: 27px !important; min-width: 27px !important; height: 27px !important; }
.no-k1-button { flex: 0 0 auto !important; height: 34px !important; padding: 0 7px !important; font-size: .56rem !important; }
.attack-bottom-actions .manual-team-error-button { grid-column: 2; }

/* Eine einzige, einzeilige und horizontal scrollbar Aktionshistorie. */
.scouting-raw-row.recent-actions-row {
    min-height: 49px !important;
    max-height: 49px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    margin-top: 0 !important;
}
.recent-actions-card {
    min-height: 0 !important;
    height: 49px !important;
    padding: 4px 6px !important;
    display: grid !important;
    grid-template-rows: 17px 25px !important;
    gap: 2px !important;
    overflow: hidden !important;
}
.recent-actions-card .raw-head { line-height: 1; }
.recent-action-strip {
    min-width: 0;
    width: 100%;
    height: 25px;
    display: flex;
    align-items: stretch;
    gap: 5px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
}
.recent-action-item {
    flex: 0 0 auto;
    min-width: 150px;
    max-width: 245px;
    height: 25px;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 2px 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: end;
    font-size: .56rem;
    font-weight: 850;
}
.recent-action-item.reception {
    background: #f2e9fb;
    border-color: #c9a7e8;
    color: #5e2785;
}
.recent-action-item.attack {
    background: #e8f5fc;
    border-color: #9fd3ef;
    color: #165f86;
}
.recent-action-type { font-weight: 1000; }
.recent-action-player {
    min-width: 0;
    max-width: 125px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recent-action-quality {
    flex: 0 0 auto;
    min-width: 23px;
    height: 19px;
    padding: 0 4px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.74);
    font-weight: 1000;
}
.recent-action-empty { color: var(--muted); font-size: .58rem; padding: 5px 2px; }

/* Aktions-Overlay: Spielerin, Qualität und Richtung können in einer Karte geändert werden. */
.action-edit-card { width: min(620px, calc(100vw - 28px)) !important; max-height: calc(100vh - 28px); overflow: hidden; }
.action-edit-body {
    min-height: 0;
    max-height: calc(100vh - 145px);
    overflow-y: auto;
    display: grid !important;
    gap: 8px !important;
    padding: 4px 1px 10px !important;
}
.action-edit-body > div { display: block !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
.action-edit-summary {
    border-radius: 9px !important;
    padding: 8px 10px !important;
    font-size: .72rem;
    font-weight: 900;
}
.action-edit-summary.reception { background: #f2e9fb !important; color: #5e2785; border: 1px solid #c9a7e8 !important; }
.action-edit-summary.attack { background: #e8f5fc !important; color: #165f86; border: 1px solid #9fd3ef !important; }
.action-edit-grid { display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px !important; }
.action-edit-field {
    display: grid !important;
    gap: 4px !important;
    padding: 7px 8px !important;
    border: 1px solid var(--border) !important;
    border-radius: 9px !important;
    background: #f8faf8 !important;
}
.action-edit-field > label,
.action-edit-label { color: var(--muted); font-size: .61rem; font-weight: 900; }
.action-edit-field select { width: 100%; height: 32px; border: 1px solid var(--border); border-radius: 7px; background: #fff; padding: 0 7px; font-size: .7rem; font-weight: 800; }
.action-quality-buttons,
.action-phase-buttons,
.action-out-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.action-quality-buttons button,
.action-phase-buttons button,
.action-out-buttons button {
    min-width: 38px;
    height: 31px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: #fff;
    font-weight: 950;
}
.action-quality-buttons button.active,
.action-phase-buttons button.active,
.action-out-buttons button.active { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.action-coordinate-section { display: grid !important; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px !important; }
.action-coordinate-block { display: grid !important; gap: 5px !important; }
.action-coordinate-pad {
    position: relative;
    width: 100%;
    aspect-ratio: 1.55 / 1;
    border: 2px solid #198f42;
    border-radius: 7px;
    background:
        linear-gradient(to right, transparent calc(33.333% - 1px), rgba(25,143,66,.38) 33.333%, transparent calc(33.333% + 1px)),
        linear-gradient(to right, transparent calc(66.666% - 1px), rgba(25,143,66,.38) 66.666%, transparent calc(66.666% + 1px)),
        linear-gradient(to bottom, transparent calc(50% - 1px), rgba(25,143,66,.38) 50%, transparent calc(50% + 1px)),
        #f7fbf8;
    cursor: crosshair;
    overflow: hidden;
}
.action-coordinate-pad.disabled { opacity: .38; cursor: default; }
.action-coordinate-marker {
    position: absolute;
    width: 13px;
    height: 13px;
    margin: -6.5px 0 0 -6.5px;
    border-radius: 50%;
    background: #17211b;
    box-shadow: 0 0 0 3px rgba(255,255,255,.86);
    pointer-events: none;
}
.action-error-toggle { display: flex !important; align-items: center; gap: 7px; min-height: 31px; font-size: .68rem; font-weight: 850; }
.action-error-toggle input { width: 18px; height: 18px; }
.action-edit-readonly { padding: 7px 9px !important; border-radius: 8px !important; background: #eef2ef !important; color: var(--muted); font-size: .65rem; font-weight: 800; }
.action-modal-actions { display: flex !important; justify-content: space-between !important; gap: 8px !important; }
.action-modal-actions .primary-action { margin-left: auto; }

@media (max-width: 900px) {
    .games-page { grid-template-rows: 38px 42px 54px auto minmax(95px, 1fr) !important; }
    .game-team-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .game-fields { height: auto !important; grid-template-columns: 1fr 120px !important; grid-auto-rows: 37px; }
    .game-fields .game-notes { grid-column: 1; }
    .game-fields .primary-action { grid-column: 2; }
    .game-history-list { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
    .action-edit-grid,
    .action-coordinate-section { grid-template-columns: 1fr !important; }
}

/* --------------------------------------------------------------------------
   0.15.0 – Vollbildnavigation, responsive Startaufstellung, Auswertung,
   Ansichtslink und konfigurierbares Grund-Farbschema
   -------------------------------------------------------------------------- */

/* Im nativen Vollbild liegt links oben ein systemseitiger Schließen-Button.
   Deshalb wird das eigentliche Menü unabhängig von diesem Bereich exakt mittig
   positioniert; Marke und Versionsstempel verschwinden im nativen Vollbild. */
html.native-fullscreen-safe .top-nav {
    padding-left: 8px !important;
    padding-right: 8px !important;
    grid-template-columns: 1fr max-content 1fr !important;
}
html.native-fullscreen-safe .brand,
html.native-fullscreen-safe .version-stamp { visibility: hidden !important; }
html.native-fullscreen-safe .nav-buttons {
    grid-column: 2 !important;
    justify-self: center !important;
    justify-content: center !important;
    width: max-content !important;
    max-width: min(72vw, 820px) !important;
}
html.native-fullscreen-safe .top-actions {
    grid-column: 3 !important;
    justify-self: end !important;
}

/* Annahmezonen wieder klar erkennbar, aber weiterhin unter Spielerinnen und
   Rally-Pfeilen. Die Spielerinnen bleiben mit z-index 24 deutlich darüber. */
.court-zone-overlay { opacity: .72 !important; z-index: 2 !important; }
.court-zone-overlay .free-zone-shape { opacity: .90 !important; }
.free-zone-q3 { fill: rgba(74,193,94,.26) !important; stroke: rgba(26,139,48,.64) !important; }
.free-zone-q2 { fill: rgba(255,220,50,.29) !important; stroke: rgba(189,153,0,.67) !important; }
.court-zone-overlay pattern rect { opacity: .68 !important; }
.court-zone-overlay pattern line { opacity: .15 !important; }
.formation-player-token,
.continuous-court .player-token { z-index: 24 !important; }

/* Startaufstellungen: Die rechte Spielerliste wird responsiv schmaler. Die bis
   zu vier Neben-Sätze teilen sich immer die tatsächlich verfügbare Breite und
   können deshalb nicht mehr rechts aus dem iPad-Viewport herauslaufen. */
.lineup-workspace {
    grid-template-columns: minmax(0, 1fr) clamp(210px, 19vw, 292px) !important;
    gap: clamp(5px, .65vw, 9px) !important;
}
.lineup-set-row { grid-template-columns: 48px minmax(0,1fr) !important; gap: 4px !important; }
.lineup-stage-played .lineup-stage-cards,
.lineup-stage-future .lineup-stage-cards {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    grid-template-columns: none !important;
    gap: clamp(4px, .55vw, 8px) !important;
    overflow: hidden !important;
}
.lineup-stage-played .lineup-set-card,
.lineup-stage-future .lineup-set-card,
.lineup-layout-two-rows .lineup-stage-played .lineup-set-card,
.lineup-layout-two-rows .lineup-stage-future .lineup-set-card,
.lineup-layout-three-rows .lineup-stage-played .lineup-set-card,
.lineup-layout-three-rows .lineup-stage-future .lineup-set-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
}
.lineup-stage-played .mini-rotation,
.lineup-stage-future .mini-rotation {
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    aspect-ratio: 3 / 2 !important;
}
.lineup-stage-current .lineup-stage-cards { display: flex !important; min-width: 0 !important; }
.lineup-stage-current .lineup-set-card {
    width: clamp(270px, 46%, 410px) !important;
    min-width: 0 !important;
    max-width: 100% !important;
}
.lineup-roster-panel { min-width: 0 !important; width: 100% !important; }
.lineup-player-button { grid-template-columns: 39px minmax(0,1fr) 30px !important; gap: 4px !important; }
.lineup-player-button .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1180px) {
    .lineup-workspace { grid-template-columns: minmax(0,1fr) clamp(190px, 19vw, 232px) !important; }
    .lineup-set-row { grid-template-columns: 42px minmax(0,1fr) !important; }
    .lineup-stage-current .lineup-set-card { width: clamp(245px, 48%, 350px) !important; min-width: 0 !important; }
    .lineup-player-button { grid-template-columns: 34px minmax(0,1fr) 27px !important; padding-inline: 4px !important; }
    .lineup-player-button .name { font-size: .65rem !important; }
    .lineup-player-button .num { font-size: .9rem !important; }
    .lineup-toolbar-actions { gap: 3px !important; }
    .lineup-toolbar-actions .small-action { padding-inline: 7px !important; font-size: .58rem !important; }
}

@media (max-width: 980px) {
    .lineup-workspace { grid-template-columns: minmax(0,1fr) 184px !important; }
    .lineup-set-row { grid-template-columns: 36px minmax(0,1fr) !important; }
    .lineup-stage-label { font-size: .52rem !important; }
    .lineup-stage-current .lineup-set-card { width: min(330px, 52%) !important; }
}

/* Auswertung erhält eine zweite Navigationsebene: Angriff / Annahme. */
.evaluation-page {
    grid-template-rows: 48px 38px minmax(0,1fr) !important;
    gap: 7px !important;
}
.evaluation-subnav {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}
.evaluation-subnav button {
    height: 28px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted);
    font-size: .67rem;
    font-weight: 950;
}
.evaluation-subnav button.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.evaluation-panel { min-height: 0; height: 100%; overflow: hidden; }
.evaluation-panel .evaluation-grid { height: 100%; }
#evaluationReceptionPanel { overflow-y: auto; }
.reception-evaluation-head {
    min-height: 38px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px 9px;
    color: var(--ink);
}
.reception-evaluation-head strong { font-size: .82rem; }
.reception-evaluation-head span { color: var(--muted); font-size: .62rem; font-weight: 750; }
.reception-evaluation-list {
    min-height: 0;
    display: grid;
    gap: 6px;
    padding: 0 8px 10px;
}
.reception-evaluation-row {
    min-height: 58px;
    display: grid;
    grid-template-columns: 34px 58px minmax(0,1fr) 92px;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid var(--reception-eval-color);
    border-left: 7px solid var(--reception-eval-color);
    border-radius: 10px;
    background: var(--reception-eval-soft);
}
.reception-eval-rank {
    width: 27px; height: 27px; display: grid; place-items: center;
    border-radius: 999px; background: rgba(255,255,255,.75);
    color: var(--muted); font-size: .68rem; font-weight: 950;
}
.reception-eval-number { font-size: 1.55rem; line-height: 1; font-weight: 1000; color: var(--reception-eval-color); text-align: center; }
.reception-eval-name { min-width: 0; display: grid; gap: 2px; }
.reception-eval-name strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.reception-eval-name small { color: var(--muted); font-size: .61rem; font-weight: 750; }
.reception-eval-percent { justify-self: end; font-size: 1rem; font-weight: 1000; color: var(--reception-eval-color); }

/* Spiele: zusätzlicher Button für den dauerhaften Ansichtslink. */
.active-game-card {
    grid-template-columns: minmax(0,1fr) auto auto auto auto !important;
}
.viewer-link-button { white-space: nowrap; color: var(--primary-dark) !important; border-color: var(--primary) !important; background: var(--primary-soft) !important; }

/* Farbschema als eigener Einstellungs-Unterpunkt. */
.theme-settings-page {
    height: 100%; min-height: 0;
    display: grid;
    grid-template-rows: 38px 44px minmax(0,1fr);
    gap: 8px;
}
.theme-settings-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(250px,.75fr) minmax(420px,1.35fr);
    gap: 10px;
    align-content: start;
}
.theme-presets-card,
.theme-custom-card { min-height: 0; display: grid; align-content: start; gap: 10px; }
.theme-preset-buttons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.theme-preset-buttons button {
    min-height: 46px;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr);
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
}
.theme-preset-buttons button > span {
    width: 38px; height: 30px; border-radius: 7px;
    background: linear-gradient(90deg,var(--preset-primary) 0 68%,var(--preset-accent) 68% 100%);
    border: 1px solid rgba(0,0,0,.13);
}
.theme-preset-buttons button b { font-size: .7rem; }
.theme-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.theme-field-grid > label { display: grid; gap: 4px; color: var(--muted); font-size: .63rem; font-weight: 900; }
.theme-field-grid > label > div { min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 5px; }
.theme-field-grid input[type="color"] { width: 42px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); }
.theme-field-grid input:not([type="color"]) { min-width: 0; height: 34px; padding: 0 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); font-size: .7rem; font-weight: 800; }
.theme-field-grid input.invalid { border-color: #D64545; background: #FFF2F1; }
.theme-save-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.theme-save-row > span { color: var(--muted); font-size: .62rem; font-weight: 750; }

@media (max-width: 1050px) {
    .theme-settings-grid { grid-template-columns: 1fr 1.35fr; }
    .theme-field-grid { grid-template-columns: 1fr; }
}

/* Dynamische Grundfarben auch für bislang fest grün codierte UI-Elemente. */
.settings-subnav { background: var(--primary-soft) !important; border-color: var(--border) !important; }
.settings-subnav button { color: var(--primary-dark) !important; border-color: var(--border) !important; background: var(--surface) !important; }
.settings-subnav button.active { background: var(--primary-dark) !important; color: #fff !important; border-color: var(--primary-dark) !important; }
.evaluation-phase-filter button.active { background: var(--primary-soft) !important; border-color: var(--primary) !important; color: var(--primary-dark) !important; box-shadow: inset 0 0 0 1px var(--primary) !important; }
.realtime-status { background: var(--primary-soft) !important; color: var(--primary-dark) !important; }

/* Externer Spiel-Link: nur Scouting und Auswertung, ohne Eingabewerkzeuge. */
.external-viewer #view-scouting .court-bottom-actions { display: none !important; }
.external-viewer #view-scouting .combined-volleyball-court .court-slot { grid-template-rows: 0 auto 0 !important; }
.external-viewer #view-scouting .quality-override,
.external-viewer #view-scouting .no-k1-button,
.external-viewer #view-scouting .reception-error-button,
.external-viewer #view-scouting .manual-team-error-button { display: none !important; }
.external-viewer #view-scouting .score-controls button { display: none !important; }
.external-viewer #view-scouting .score-controls { justify-content: center !important; }
.external-viewer #view-scouting .formation-player-token,
.external-viewer #view-scouting .continuous-court,
.external-viewer #view-scouting .attack-out-strip,
.external-viewer #view-scouting .scouting-toolbar .toolbar-actions { pointer-events: none !important; }
.external-viewer #view-scouting .scouting-toolbar .toolbar-actions { opacity: .78 !important; }

/* Spielerinnen ohne bewertete Annahme bleiben in der Liste sichtbar, werden
   aber neutral hinter den tatsächlich gerankten Spielerinnen einsortiert. */
.reception-evaluation-row.unrated { opacity: .72; }
.reception-evaluation-row.unrated .reception-eval-number,
.reception-evaluation-row.unrated .reception-eval-percent { color: var(--muted); }

/* Weitere grundlayoutbezogene Grünflächen folgen dem gewählten Theme.
   Qualitäts-/Ampelfarben und die farbliche Angriffsklassifikation bleiben fest. */
.runner-position-badge { border-color: var(--primary-dark) !important; color: var(--primary-dark) !important; }
.variant-formation-mode button.active { border-color: var(--primary) !important; color: var(--primary-dark) !important; }
.team-button.game-team::after { color: var(--primary-dark) !important; }
.eval-court-bg { stroke: var(--court-line) !important; }
.eval-three-meter { stroke: var(--primary) !important; }
.eval-net { stroke: var(--primary-dark) !important; }
.action-coordinate-pad { border-color: var(--court-line) !important; }

/* Exakte Vollbild-Zentrierung unabhängig von den rechten Status-/Vollbildbuttons. */
html.native-fullscreen-safe .brand,
html.native-fullscreen-safe .version-stamp { display: none !important; }
html.native-fullscreen-safe .nav-buttons {
    position: absolute !important;
    left: 50% !important;
    top: calc(env(safe-area-inset-top) + (var(--nav-h) / 2)) !important;
    transform: translate(-50%, -50%) !important;
    max-width: min(64vw, 820px) !important;
}

/* --------------------------------------------------------------------------
   0.15.1 – Layout-Stabilisierung: Scouting-Fußbereich, Annahmeauswertung,
   Annahmeaufstellungen
   -------------------------------------------------------------------------- */

/* Scouting: der Court muss seine echte, aus der Breite abgeleitete Höhe in das
   Grid einbringen. Damit stehen Fehlerzeile und "Letzte Aktionen" garantiert
   unterhalb des Spielfelds und können nicht mehr mitten durch den Court laufen. */
.scouting-main {
    grid-template-rows: 42px auto 49px !important;
    align-content: start !important;
    overflow: visible !important;
}
.combined-volleyball-court {
    grid-row: 2 !important;
    padding-bottom: 0 !important;
}
.combined-volleyball-court .court-slot {
    grid-template-rows: 0 auto 76px !important;
    align-content: start !important;
    overflow: visible !important;
}
.combined-volleyball-court .reception-court-frame,
.combined-volleyball-court .attack-target-wrapper {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    align-self: start !important;
}
.combined-volleyball-court .attack-target-wrapper > .attack-court-frame {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 1 / 1 !important;
}
.court-bottom-actions {
    position: relative !important;
    z-index: 32 !important;
    align-self: start !important;
    margin-top: 34px !important;
    height: 38px !important;
    min-height: 38px !important;
    overflow: visible !important;
}
.reception-error-button,
.manual-team-error-button,
.no-k1-button,
.quality-override {
    visibility: visible;
}
.scouting-raw-row.recent-actions-row {
    grid-row: 3 !important;
    position: relative !important;
    inset: auto !important;
    z-index: 35 !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 49px !important;
    max-height: 49px !important;
    margin: 0 !important;
    align-self: start !important;
}
.recent-actions-card {
    width: 100% !important;
    max-width: 100% !important;
}

/* Annahmeauswertung: maximal 14 Spielkader-Spielerinnen passen ohne Scrollen.
   Die Zeilenhöhe richtet sich am Viewport aus und bleibt bei kleinen Kadern
   kompakt, statt die gesamte freie Höhe aufzublasen. */
#evaluationReceptionPanel {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-rows: 30px minmax(0, 1fr) !important;
    align-content: start !important;
}
#evaluationReceptionPanel[hidden] { display: none !important; }
.reception-evaluation-head {
    min-height: 0 !important;
    height: 30px !important;
    padding: 3px 8px !important;
    gap: 8px !important;
    align-items: center !important;
}
.reception-evaluation-head strong { font-size: .76rem !important; }
.reception-evaluation-head span { font-size: .56rem !important; }
.reception-evaluation-list {
    min-height: 0 !important;
    height: auto !important;
    max-height: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-rows: clamp(28px, calc((100dvh - 220px) / 14), 44px) !important;
    align-content: start !important;
    gap: 3px !important;
    padding: 0 7px 4px !important;
    overflow: hidden !important;
}
.reception-evaluation-row {
    min-height: 0 !important;
    height: 100% !important;
    grid-template-columns: 48px minmax(0, 1fr) 76px !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 2px 8px !important;
    border-left-width: 6px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}
.reception-eval-rank { display: none !important; }
.reception-eval-number {
    font-size: clamp(1rem, 1.45vw, 1.28rem) !important;
    line-height: 1 !important;
}
.reception-eval-name {
    gap: 0 !important;
    align-content: center !important;
}
.reception-eval-name strong {
    font-size: clamp(.66rem, .88vw, .78rem) !important;
    line-height: 1.08 !important;
}
.reception-eval-name small {
    font-size: clamp(.48rem, .65vw, .57rem) !important;
    line-height: 1.08 !important;
}
.reception-eval-percent {
    font-size: clamp(.72rem, 1vw, .88rem) !important;
}

/* Einstellungen → Annahmeaufstellungen: Seit dem Untermenü bestehen drei
   echte Zeilen. Die dritte Zeile bekommt wieder den kompletten Editor, statt
   als implizite Grid-Zeile an den unteren Bildschirmrand gedrückt zu werden. */
#view-formations .settings-page {
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: 38px 42px minmax(0, 1fr) !important;
    gap: 8px !important;
    overflow: hidden !important;
}
#view-formations .settings-page > .settings-subnav { grid-row: 1 !important; }
#view-formations .settings-page > .settings-toolbar { grid-row: 2 !important; }
#view-formations .reception-variant-settings {
    grid-row: 3 !important;
    min-height: 0 !important;
    height: 100% !important;
    align-self: stretch !important;
    overflow: hidden !important;
}
#view-formations .variant-sidebar,
#view-formations .variant-editor {
    min-height: 0 !important;
    height: 100% !important;
}
#view-formations .variant-editor {
    grid-template-rows: 42px minmax(0, 1fr) !important;
}
#view-formations .reception-variant-courts {
    min-height: 0 !important;
    height: 100% !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    overflow: hidden !important;
}
#view-formations .variant-template-card {
    min-height: 0 !important;
    height: 100% !important;
    grid-template-rows: 22px minmax(0, 1fr) !important;
    align-items: start !important;
    overflow: hidden !important;
}
#view-formations .variant-template-court {
    width: min(100%, calc((100dvh - 220px) / 2)) !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    align-self: center !important;
    justify-self: center !important;
}

@media (max-height: 760px) {
    .reception-evaluation-list {
        grid-auto-rows: clamp(26px, calc((100dvh - 205px) / 14), 38px) !important;
        gap: 2px !important;
    }
    .reception-evaluation-head { height: 27px !important; }
    #evaluationReceptionPanel { grid-template-rows: 27px minmax(0,1fr) !important; }
    #view-formations .variant-template-title { font-size: .62rem !important; }
}

/* Die Breite der beiden Court-Hälften wird in 0.15.1 zusätzlich per
   ResizeObserver als Pixelwert gesetzt. Dadurch kann das CSS die Grid-Höhe
   ohne zyklische Prozent-/Aspect-Ratio-Berechnung exakt reservieren. */
.combined-volleyball-court .court-slot {
    grid-template-rows: 0 var(--scouting-court-runtime, auto) 76px !important;
}
.combined-volleyball-court .reception-court-slot .continuous-court-frame,
.combined-volleyball-court .attack-target-wrapper {
    height: var(--scouting-court-runtime, auto) !important;
}

/* In der aktuellen DOM-Struktur gibt es keine eigene Titelzeile mehr im
   court-slot: Frame und Bedienzeile sind die beiden tatsächlichen Grid-Kinder. */
.combined-volleyball-court .court-slot {
    grid-template-rows: var(--scouting-court-runtime, auto) 76px !important;
}

/* Alte 9-Spalten-Regeln aus früheren Scouting-Versionen dürfen die neue
   dreispaltige Bedienzeile nicht mehr in implizite Grid-Spalten verschieben. */
.reception-bottom-actions > .reception-error-button {
    grid-column: 1 !important;
    grid-row: 1 !important;
}
.reception-bottom-actions > .court-action-center {
    grid-column: 2 !important;
    grid-row: 1 !important;
}
.reception-bottom-actions > .manual-team-error-button {
    grid-column: 3 !important;
    grid-row: 1 !important;
}
.attack-bottom-actions > .court-action-center {
    grid-column: 1 !important;
    grid-row: 1 !important;
}
.attack-bottom-actions > .manual-team-error-button {
    grid-column: 2 !important;
    grid-row: 1 !important;
}


/* --------------------------------------------------------------------------
   0.15.2 – Reparaturen: Zonen, kompakte letzte Aktionen, Fehlerbeschriftung
   -------------------------------------------------------------------------- */
#view-zones .zones-page {
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: 38px minmax(0, 1fr) !important;
    gap: 8px !important;
    overflow: hidden !important;
}
#view-zones .zones-page > .settings-subnav {
    grid-row: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
}
#view-zones .zones-layout.free-zones-layout {
    grid-row: 2 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 8px !important;
    overflow: hidden !important;
}
#view-zones .zone-editor-column {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: 42px auto minmax(0, 1fr) !important;
    gap: 7px !important;
    justify-items: stretch !important;
    align-items: stretch !important;
    overflow: hidden !important;
}
#view-zones .zones-toolbar { width: 100% !important; min-width: 0 !important; }
#view-zones .zone-editor-tools {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-content: center !important;
    overflow: visible !important;
}
#view-zones .zone-editor-shell {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    place-items: start center !important;
    overflow: hidden !important;
    padding: 3px !important;
}
#view-zones .zone-editor-court {
    width: min(100%, calc(100dvh - 235px), 760px) !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    aspect-ratio: 1 / 1 !important;
}
#view-zones .zone-side {
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: auto !important;
}

/* Nur die Aktions-Chips, ohne Überschrift oder Zusatztext. */
.scouting-main { grid-template-rows: 42px auto 35px !important; }
.scouting-raw-row.recent-actions-row {
    min-height: 35px !important;
    max-height: 35px !important;
    height: 35px !important;
}
.recent-actions-card {
    height: 35px !important;
    min-height: 35px !important;
    padding: 4px 6px !important;
    grid-template-rows: 27px !important;
    gap: 0 !important;
}
.recent-actions-card .raw-head { display: none !important; }
.recent-action-strip { height: 27px !important; }
.recent-action-item {
    min-width: 112px !important;
    max-width: 180px !important;
    height: 27px !important;
    padding: 2px 6px !important;
    gap: 5px !important;
}
.recent-action-player { max-width: 42px !important; }

/* Fehlerbuttons tragen den vollständigen Mannschaftsnamen in einer Zeile. */
.manual-team-error-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: clamp(.54rem, .72vw, .67rem) !important;
    font-weight: 950 !important;
    padding: 0 6px !important;
}

/* Angriffs-Aufstellungsmarker bleiben beim Ziehen unter dem Finger und werden
   nicht durch Browser-Panning oder Textselektion zurückgesetzt. */
#view-formations .variant-position-marker {
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

@media (max-width: 980px) {
    #view-zones .zones-layout.free-zones-layout {
        grid-template-columns: minmax(0, 1fr) 210px !important;
    }
    #view-zones .zone-editor-court {
        width: min(100%, calc(100dvh - 255px), 680px) !important;
    }
}

/* --------------------------------------------------------------------------
   0.15.3 – Vollbildnavigation, Scouting-Bedienleiste und Zoneneditor
   -------------------------------------------------------------------------- */

/* Vollbild: Das Hauptmenü wird relativ zum VIEWPORT zentriert, nicht relativ
   zu den links/rechts unterschiedlich breiten Kopfbereichen. Damit bleibt es
   auch neben dem systemseitigen Vollbild-Schließen-Button mittig. */
html.native-fullscreen-safe .brand,
html.native-fullscreen-safe .version-stamp,
html.app-focus-mode .brand,
html.app-focus-mode .version-stamp,
html:fullscreen .brand,
html:fullscreen .version-stamp,
html:-webkit-full-screen .brand,
html:-webkit-full-screen .version-stamp {
    display: none !important;
}
html.native-fullscreen-safe .nav-buttons,
html.app-focus-mode .nav-buttons,
html:fullscreen .nav-buttons,
html:-webkit-full-screen .nav-buttons {
    position: fixed !important;
    left: 50vw !important;
    top: calc(env(safe-area-inset-top) + (var(--nav-h) / 2)) !important;
    transform: translate(-50%, -50%) !important;
    width: max-content !important;
    max-width: calc(100vw - 230px) !important;
    justify-content: center !important;
    justify-self: auto !important;
    z-index: 10020 !important;
    overflow: visible !important;
}
html.native-fullscreen-safe .top-actions,
html.app-focus-mode .top-actions,
html:fullscreen .top-actions,
html:-webkit-full-screen .top-actions {
    position: absolute !important;
    right: max(8px, env(safe-area-inset-right)) !important;
    top: env(safe-area-inset-top) !important;
    height: var(--nav-h) !important;
    z-index: 10030 !important;
}
@media (max-width: 1050px) {
    html.native-fullscreen-safe .nav-button,
    html.app-focus-mode .nav-button,
    html:fullscreen .nav-button,
    html:-webkit-full-screen .nav-button {
        padding-inline: 8px !important;
        font-size: .66rem !important;
    }
}

/* Letzte Aktionen: nur Kurztyp, Trikotnummer und Qualität. */
.recent-action-item {
    min-width: 82px !important;
    max-width: 128px !important;
    justify-content: flex-start !important;
}
.recent-action-type { flex: 0 0 auto !important; }
.recent-action-player { flex: 0 0 auto !important; max-width: none !important; }
.recent-action-quality { margin-left: auto !important; }

/* Seitliche Aufschlag-Schalter. Sie liegen außerhalb des gesamten Feldes und
   bleiben unabhängig von den roten AUS-Flächen anklickbar. */
.combined-volleyball-court { overflow: visible !important; }
.serve-side-button {
    position: absolute !important;
    top: 50% !important;
    width: 34px !important;
    height: 112px !important;
    transform: translateY(-50%) !important;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid var(--primary) !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: var(--primary-dark) !important;
    font-size: .66rem !important;
    font-weight: 950 !important;
    letter-spacing: .02em;
    z-index: 55 !important;
    box-shadow: 0 2px 8px rgba(16,24,40,.10);
}
.serve-side-button:hover,
.serve-side-button:active { background: var(--primary-soft) !important; }
.serve-side-button.active {
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}
.serve-side-button:disabled { opacity: .40 !important; cursor: default; }
.serve-side-left { left: -42px !important; transform: translateY(-50%) rotate(180deg) !important; }
.serve-side-right { right: -42px !important; }
.view-only-mode .serve-side-button,
.external-viewer .serve-side-button { display: none !important; }

/* Bedienung unter dem Court entspricht geometrisch den drei 3-m-breiten
   Teilbereichen jeder Feldhälfte. Teamfehler sitzen jeweils unter dem inneren
   3-m-Raum; Annahmefehler bleibt links außen. */
.combined-volleyball-court .court-slot {
    grid-template-rows: var(--scouting-court-runtime, auto) 76px !important;
}
.court-bottom-actions {
    margin-top: 0 !important;
    height: 76px !important;
    min-height: 76px !important;
    padding: 4px 0 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 31px 35px !important;
    gap: 4px 0 !important;
    align-items: stretch !important;
    overflow: visible !important;
}
.reception-bottom-actions > .reception-error-button {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    height: 35px !important;
    margin: 0 !important;
}
.reception-bottom-actions > .reception-action-center {
    grid-column: 2 !important;
    grid-row: 2 !important;
    height: 35px !important;
    padding-inline: 4px;
}
.reception-front-zone-controls {
    grid-column: 3 !important;
    grid-row: 1 / 3 !important;
    min-width: 0;
    display: grid;
    grid-template-rows: 31px 35px;
    gap: 4px;
    align-items: stretch;
}
.reception-front-zone-controls > .manual-team-error-button {
    width: 100% !important;
    height: 35px !important;
    margin: 0 !important;
}
.reception-quick-quality {
    width: 100%;
    height: 31px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
}
.reception-quick-quality[hidden] { display: none !important; }
.reception-quick-quality button {
    min-width: 0 !important;
    width: 100% !important;
    height: 31px !important;
    padding: 0 !important;
    border: 1px solid rgba(16,24,40,.18) !important;
    border-radius: 7px !important;
    font-size: .72rem !important;
    font-weight: 950 !important;
    color: #172018 !important;
}
.reception-quick-quality .q0 { background: #f6c8c4 !important; border-color: #e34d42 !important; }
.reception-quick-quality .q1 { background: #f3f5f3 !important; }
.reception-quick-quality .q2 { background: #ffe23e !important; }
.reception-quick-quality .q3 { background: #58c96a !important; }

.attack-bottom-actions > .attack-front-zone-controls {
    grid-column: 1 !important;
    grid-row: 2 !important;
    min-width: 0;
    height: 35px;
}
.attack-front-zone-controls > .manual-team-error-button {
    width: 100% !important;
    height: 35px !important;
    margin: 0 !important;
}
.attack-bottom-actions > .attack-action-center {
    grid-column: 2 / 4 !important;
    grid-row: 1 / 3 !important;
    height: 70px !important;
    justify-content: center !important;
    padding-inline: 4px;
}
.manual-team-error-button {
    border-radius: 7px !important;
    padding-inline: 4px !important;
}

/* Der Zoneneditor erhält eine echte, quadratische Pixelgröße per JS. CSS
   liefert das vollständig sichtbare Spielfeld samt Raster und 3-m-Linie. */
#view-zones .zones-page {
    grid-template-rows: 38px minmax(0, 1fr) !important;
}
#view-zones .zones-layout.free-zones-layout {
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px) !important;
}
#view-zones .zone-editor-column {
    min-width: 0 !important;
    min-height: 0 !important;
    grid-template-rows: 42px auto minmax(0, 1fr) !important;
}
#view-zones .zone-editor-shell {
    min-width: 0 !important;
    min-height: 280px !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding: 6px !important;
    overflow: hidden !important;
}
#view-zones .zone-editor-court {
    position: relative !important;
    flex: 0 0 auto !important;
    max-width: calc(100% - 4px) !important;
    max-height: calc(100% - 4px) !important;
    aspect-ratio: 1 / 1 !important;
    border: 3px solid var(--court-line) !important;
    background-color: #fff !important;
    background-image:
        linear-gradient(to right, rgba(52,64,84,.10) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(52,64,84,.10) 1px, transparent 1px) !important;
    background-size: calc(100% / 9) calc(100% / 9) !important;
    box-sizing: border-box !important;
    touch-action: none !important;
    overflow: visible !important;
}
#view-zones .zone-editor-svg {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 4 !important;
}
#view-zones .zone-editor-netline {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: calc(100% * 6 / 9) !important;
    width: 4px !important;
    height: 100% !important;
    background: var(--primary) !important;
    z-index: 6 !important;
    pointer-events: none !important;
}
#view-zones .zone-side { overflow: hidden !important; }

@media (max-width: 980px) {
    #view-zones .zones-layout.free-zones-layout {
        grid-template-columns: minmax(0, 1fr) 205px !important;
    }
    .serve-side-button { width: 30px !important; height: 98px !important; font-size: .60rem !important; }
    .serve-side-left { left: -36px !important; }
    .serve-side-right { right: -36px !important; }
}


/* --------------------------------------------------------------------------
   0.15.4 – kompakte Aktionsleiste, bündige Fehlerbuttons, 80%-Zoneneditor,
   sechs Aufstellungsfälle und höhenadaptive Angriffsauswertung
   -------------------------------------------------------------------------- */

/* Alle drei Fehlerbuttons liegen in derselben unteren Bedienzeile. Wenn die
   Schnellqualität ausgeblendet ist, darf der Teamfehler nicht in Zeile 1
   hochrutschen. */
.reception-front-zone-controls > .manual-team-error-button {
    grid-row: 2 !important;
    align-self: stretch !important;
}
.reception-bottom-actions > .reception-error-button,
.reception-front-zone-controls > .manual-team-error-button,
.attack-front-zone-controls > .manual-team-error-button {
    height: 35px !important;
    min-height: 35px !important;
    align-self: end !important;
}

/* Letzte Aktionen: kleinerer horizontaler Abstand; Qualität nur als 0–3 und
   exakt in den bestehenden Qualitäts-/Ampelfarben. */
.recent-action-strip {
    gap: 2px !important;
}
.recent-action-item {
    min-width: 68px !important;
    max-width: 98px !important;
    height: 27px !important;
    padding: 2px 4px !important;
    gap: 3px !important;
}
.recent-action-quality {
    min-width: 20px !important;
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    margin-left: 1px !important;
    border: 1px solid rgba(16,24,40,.13) !important;
    color: #172018 !important;
}
.recent-action-quality.q0 { background: var(--q0) !important; }
.recent-action-quality.q1 { background: var(--q1) !important; }
.recent-action-quality.q2 { background: var(--q2) !important; }
.recent-action-quality.q3 { background: var(--q3) !important; }
.recent-action-quality.qn { background: var(--qn) !important; }

/* Einstellungen → Zonen: keine rechte Bedien-/Legenden-Spalte mehr. Der
   Speichern-Block sitzt direkt in der Werkzeugleiste. */
#view-zones .zones-layout.free-zones-layout {
    grid-template-columns: minmax(0, 1fr) !important;
}
#view-zones .zone-side { display: none !important; }
#view-zones .zone-editor-tools {
    align-items: center !important;
    column-gap: 6px !important;
    row-gap: 5px !important;
}
#view-zones .zone-toolbar-save {
    margin-left: auto;
    display: flex !important;
    align-items: center;
    gap: 7px;
    min-width: 0;
}
#view-zones .zone-toolbar-save .zone-count {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .56rem;
}
#view-zones .zone-toolbar-save .primary-action {
    width: auto !important;
    min-width: 148px;
    height: 31px;
    padding-inline: 10px;
    white-space: nowrap;
}
#view-zones .zone-editor-shell {
    align-items: flex-start !important;
    justify-content: center !important;
}
#view-zones .zone-editor-court {
    max-width: 80% !important;
    max-height: 80% !important;
}

/* Annahmeaufstellungen: beide Modi zeigen wieder alle sechs Läufer als echtes
   3×2-Raster. Die Courts beginnen direkt unter ihrer Überschrift und werden
   aus der verfügbaren Höhe für zwei vollständige Reihen berechnet. */
#view-formations .reception-variant-courts {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    align-content: stretch !important;
    align-items: stretch !important;
}
#view-formations .variant-template-card {
    min-height: 0 !important;
    height: 100% !important;
    display: grid !important;
    grid-template-rows: 22px minmax(0, 1fr) !important;
    align-content: start !important;
    align-items: start !important;
    justify-items: center !important;
    overflow: hidden !important;
}
#view-formations .variant-template-court {
    width: min(100%, calc((100dvh - 255px) / 2)) !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: calc((100dvh - 255px) / 2) !important;
    aspect-ratio: 1 / 1 !important;
    align-self: start !important;
    justify-self: center !important;
}
@media (max-height: 760px) {
    #view-formations .variant-template-court {
        width: min(100%, calc((100dvh - 235px) / 2)) !important;
        max-height: calc((100dvh - 235px) / 2) !important;
    }
}

/* Angriffsauswertung: jede sichtbare Grid-Zeile erhält höchstens die Hälfte
   der verfügbaren Panelhöhe. So sind immer zwei vollständige Felder untereinander
   sichtbar. Das Court-SVG wird innerhalb der Karte zusätzlich etwa 10 % kleiner. */
#evaluationAttackPanel .evaluation-grid {
    height: 100% !important;
    min-height: 0 !important;
    grid-auto-rows: calc((100% - 8px) / 2) !important;
    gap: 8px !important;
    align-content: start !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 2px !important;
}
#evaluationAttackPanel .evaluation-player-card {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    grid-template-rows: 50px minmax(0, 1fr) !important;
    gap: 3px !important;
    padding: 6px !important;
    overflow: hidden !important;
}
#evaluationAttackPanel .evaluation-court-svg {
    width: auto !important;
    height: 90% !important;
    max-width: 90% !important;
    max-height: 90% !important;
    aspect-ratio: auto !important;
    align-self: start !important;
    justify-self: center !important;
}

/* --------------------------------------------------------------------------
   0.15.5 – Qualitätsleiste, Rotationsreihenfolge und Spielhistorie
   -------------------------------------------------------------------------- */

/* Annahme- und Angriffsqualitäten liegen in derselben unteren Zeile wie die
   Fehlerbuttons. Keine Qualitätsgruppe darf mehr über dem Court schweben. */
.reception-bottom-actions > .reception-action-center,
.attack-bottom-actions > .attack-action-center {
    grid-row: 2 !important;
    height: 35px !important;
    min-height: 35px !important;
    align-self: end !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 4px !important;
}
.reception-bottom-actions > .reception-action-center { grid-column: 2 !important; }
.attack-bottom-actions > .attack-action-center { grid-column: 2 / 4 !important; }
.reception-front-zone-controls,
.attack-front-zone-controls {
    grid-row: 2 !important;
    height: 35px !important;
    min-height: 35px !important;
    align-self: end !important;
}
.reception-front-zone-controls {
    grid-column: 3 !important;
    display: block !important;
}
.attack-front-zone-controls { grid-column: 1 !important; }
.reception-front-zone-controls > .manual-team-error-button,
.attack-front-zone-controls > .manual-team-error-button,
.reception-bottom-actions > .reception-error-button {
    height: 35px !important;
    min-height: 35px !important;
    margin: 0 !important;
}
.reception-quick-quality,
.quality-override {
    height: 35px !important;
    min-height: 35px !important;
    align-items: center !important;
}
.reception-quick-quality {
    width: 100% !important;
    grid-template-columns: repeat(4, minmax(0,1fr)) !important;
}
.reception-quick-quality button,
.quality-override button,
.action-quality-buttons button {
    height: 31px !important;
    min-height: 31px !important;
    color: #172018 !important;
    border: 1px solid rgba(16,24,40,.17) !important;
    font-weight: 950 !important;
}

/* Einheitliches Qualitätsfarbsystem für sämtliche Qualitäts-BUTTONS. */
.reception-quick-quality button[data-reception-quick-quality="0"],
.quality-override button[data-quality="0"],
.action-quality-buttons button[data-action-quality="0"] { background: #ef5a50 !important; }
.reception-quick-quality button[data-reception-quick-quality="1"],
.quality-override button[data-quality="1"],
.action-quality-buttons button[data-action-quality="1"] { background: #f5a43b !important; }
.reception-quick-quality button[data-reception-quick-quality="2"],
.quality-override button[data-quality="2"],
.action-quality-buttons button[data-action-quality="2"] { background: #ffe23e !important; }
.reception-quick-quality button[data-reception-quick-quality="3"],
.quality-override button[data-quality="3"],
.action-quality-buttons button[data-action-quality="3"] { background: #58c96a !important; }

/* Die Qualitätszahlen in „Letzte Aktionen“ verwenden exakt dieselben Farben. */
.recent-action-quality.q0 { background: #ef5a50 !important; }
.recent-action-quality.q1 { background: #f5a43b !important; }
.recent-action-quality.q2 { background: #ffe23e !important; }
.recent-action-quality.q3 { background: #58c96a !important; }

/* Aufstellungseditor: immer zwei vollständige Zeilen innerhalb der verfügbaren
   Bildschirmhöhe. Der DOM liefert die Reihenfolge 1,6,5 / 2,3,4. */
#view-formations .variant-editor {
    grid-template-rows: 38px minmax(0,1fr) !important;
    gap: 5px !important;
}
#view-formations .variant-editor-head { min-height: 0 !important; }
#view-formations .reception-variant-courts {
    min-height: 0 !important;
    height: 100% !important;
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    grid-template-rows: repeat(2, minmax(0,1fr)) !important;
    gap: 6px !important;
    align-content: stretch !important;
    overflow: hidden !important;
}
#view-formations .variant-template-card {
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    grid-template-rows: 19px minmax(0,1fr) !important;
    align-items: start !important;
    overflow: hidden !important;
}
#view-formations .variant-template-title {
    height: 19px !important;
    line-height: 18px !important;
    font-size: clamp(.54rem, .72vw, .66rem) !important;
}
#view-formations .variant-template-court {
    height: min(100%, calc((100dvh - 245px) / 2)) !important;
    width: auto !important;
    max-height: calc((100dvh - 245px) / 2) !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    align-self: start !important;
    justify-self: center !important;
}
@media (max-height: 820px) {
    #view-formations .variant-template-court {
        height: min(100%, calc((100dvh - 225px) / 2)) !important;
        max-height: calc((100dvh - 225px) / 2) !important;
    }
    #view-formations .reception-variant-courts { gap: 4px !important; }
}

/* Letzte Spiele: kompakte Karten mit Satzständen und direkten Aktionen. */
.game-history-list {
    grid-auto-rows: 88px !important;
    grid-template-rows: none !important;
    align-content: start !important;
    overflow-y: auto !important;
}
.game-history-card-0155 {
    height: 88px !important;
    min-height: 88px !important;
    align-content: start !important;
    grid-template-rows: 17px 13px 16px 30px !important;
    gap: 2px !important;
    padding: 5px 6px !important;
}
.game-history-date-0155 { line-height: 13px; }
.game-history-scores-0155 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
    font-size: .54rem;
    font-weight: 850;
    line-height: 16px;
}
.game-history-actions-0155 {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 3px;
}
.game-history-actions-0155 .small-action {
    min-width: 0 !important;
    height: 28px !important;
    padding: 0 4px !important;
    font-size: .5rem !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.court-bottom-actions .quality-override span { display: none !important; }

/* --------------------------------------------------------------------------
   0.15.6 – Ansichts-Läuferwahl, Aktionsleiste und Satzabschluss
   -------------------------------------------------------------------------- */

/* Im reinen Ansichtsmodus wird die Historienzeile nicht benötigt. */
.view-only-mode #view-scouting .recent-actions-row,
.external-viewer #view-scouting .recent-actions-row {
    display: none !important;
}

/* Eingabemodus: etwas mehr vertikale Luft für den horizontalen Scrollbalken,
   gleichzeitig schmalere Karten ohne unnötigen Leerraum rechts der Qualität. */
.scouting-raw-row.recent-actions-row {
    min-height: 41px !important;
    max-height: 41px !important;
    height: 41px !important;
}
.recent-actions-card {
    min-height: 41px !important;
    height: 41px !important;
    padding: 3px 5px 2px !important;
    grid-template-rows: 35px !important;
}
.recent-action-strip {
    height: 35px !important;
    gap: 2px !important;
    padding: 1px 0 7px !important;
    align-items: flex-start !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    box-sizing: border-box !important;
    scrollbar-gutter: stable !important;
}
.recent-action-item {
    min-width: 62px !important;
    max-width: 86px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 1px 3px !important;
    gap: 2px !important;
    flex: 0 0 auto !important;
}
.recent-action-quality {
    width: 19px !important;
    min-width: 19px !important;
    height: 19px !important;
    margin-left: 0 !important;
    flex: 0 0 19px !important;
}

/* Läuferwahl in beiden schreibgeschützten Ansichtsarten. Die restlichen
   Scouting-Bedienelemente bleiben gesperrt, die Läuferwahl aber anklickbar. */
.viewer-runner-control {
    display: inline-grid;
    grid-template-columns: repeat(7, minmax(30px, auto));
    gap: 3px;
    align-items: center;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    white-space: nowrap;
}
.viewer-runner-control[hidden] { display: none !important; }
.viewer-runner-control button {
    height: 32px;
    min-width: 32px;
    padding: 0 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: .67rem;
    font-weight: 950;
}
.viewer-runner-control button.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.viewer-runner-control button.live.active {
    background: var(--primary);
    color: #fff;
}
.view-only-mode #view-scouting .scouting-toolbar .toolbar-actions,
.external-viewer #view-scouting .scouting-toolbar .toolbar-actions {
    pointer-events: auto !important;
    opacity: 1 !important;
}
.view-only-mode #view-scouting .scouting-toolbar .toolbar-actions > :not(.viewer-runner-control),
.external-viewer #view-scouting .scouting-toolbar .toolbar-actions > :not(.viewer-runner-control) {
    pointer-events: none !important;
    opacity: .42 !important;
}
.view-only-mode #viewerRunnerControl,
.external-viewer #viewerRunnerControl {
    pointer-events: auto !important;
    opacity: 1 !important;
}

@media (max-width: 1050px) {
    .viewer-runner-control {
        grid-template-columns: repeat(7, 28px);
        gap: 2px;
    }
    .viewer-runner-control button {
        width: 28px;
        min-width: 28px;
        height: 29px;
        padding: 0;
        font-size: .61rem;
    }
    .view-only-mode #view-scouting .scouting-toolbar .toolbar-left .toolbar-note,
    .external-viewer #view-scouting .scouting-toolbar .toolbar-left .toolbar-note {
        display: none !important;
    }
}

/* Bestätigter Satz: visuell als festgeschrieben markieren. */
.score-card.set-finished {
    border-color: var(--primary) !important;
    box-shadow: inset 0 0 0 1px var(--primary-soft);
}
.score-card.set-finished .score-card-head::after {
    content: 'beendet';
    margin-left: auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: .54rem;
    font-weight: 950;
}

/* Satzende-Abfrage. */
.set-end-card {
    width: min(92vw, 470px) !important;
    display: grid;
    gap: 14px;
}
.set-end-body {
    display: grid;
    gap: 12px;
    text-align: center;
}
.set-end-body p {
    margin: 0;
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.42;
}
.set-end-score {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--page);
}
.set-end-score span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .69rem;
    font-weight: 900;
    color: var(--primary-dark);
}
.set-end-score strong {
    font-size: 1.75rem;
    line-height: 1;
}
.set-end-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.set-end-actions button { min-height: 42px; }

/* --------------------------------------------------------------------------
   0.15.7 – Halbellipse am Netz, sofortiges Satzende und stabile Startaufstellung
   -------------------------------------------------------------------------- */

/* Startaufstellung: der obere Bereich enthält nur noch echte Bedienfunktionen.
   Die rechte Spielerinnen-Spalte behält ihre bisherige Breite; lediglich ihr
   Kopf darf nicht mehr mit einem Aktionsbutton kollidieren. */
#view-lineup .lineup-toolbar .toolbar-left {
    min-width: 0 !important;
    gap: 7px !important;
}
#view-lineup .lineup-toolbar-actions {
    min-width: 0 !important;
    gap: 4px !important;
}
#view-lineup .lineup-toolbar-actions .selection-info {
    min-width: 0 !important;
    max-width: clamp(150px, 22vw, 290px) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}
#view-lineup .lineup-roster-head {
    min-width: 0 !important;
    display: block !important;
    height: auto !important;
    min-height: 38px !important;
    padding: 1px 1px 3px !important;
}
#view-lineup .lineup-roster-head > div { min-width: 0 !important; }
#view-lineup .lineup-roster-head .side-title {
    line-height: 1.05 !important;
    white-space: nowrap !important;
}
#view-lineup .lineup-roster-head .side-hint {
    display: block !important;
    margin-top: 3px !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}
#view-lineup .lineup-roster-panel {
    grid-template-rows: 40px minmax(0,1fr) !important;
}

/* Die bisherige responsive Breite der Spielerliste bleibt bestehen. Die
   Satzkarten werden dagegen wieder auf sinnvolle Maximalbreiten begrenzt.
   Dadurch kann ein einzelner bereits gespielter Satz nicht mehr die komplette
   linke Spalte und damit fast die gesamte Bildschirmhöhe belegen. */
#view-lineup .lineup-set-grid {
    min-height: 0 !important;
    align-content: start !important;
    gap: 6px !important;
    overflow: hidden !important;
}
#view-lineup .lineup-set-row {
    min-height: 0 !important;
    grid-template-columns: 42px minmax(0,1fr) !important;
    gap: 5px !important;
}
#view-lineup .lineup-stage-cards,
#view-lineup .lineup-stage-played .lineup-stage-cards,
#view-lineup .lineup-stage-future .lineup-stage-cards,
#view-lineup .lineup-stage-current .lineup-stage-cards {
    min-width: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow: hidden !important;
}
#view-lineup .lineup-stage-played .lineup-set-card,
#view-lineup .lineup-stage-future .lineup-set-card,
#view-lineup .lineup-layout-two-rows .lineup-stage-played .lineup-set-card,
#view-lineup .lineup-layout-two-rows .lineup-stage-future .lineup-set-card,
#view-lineup .lineup-layout-three-rows .lineup-stage-played .lineup-set-card,
#view-lineup .lineup-layout-three-rows .lineup-stage-future .lineup-set-card {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 220px !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-rows: 27px auto 7px !important;
}
#view-lineup .lineup-stage-played .mini-rotation,
#view-lineup .lineup-stage-future .mini-rotation {
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 3 / 2 !important;
}
#view-lineup .lineup-stage-current .lineup-set-card,
#view-lineup .lineup-stage-current .lineup-set-card.active-set {
    flex: 0 1 360px !important;
    width: min(360px, 100%) !important;
    min-width: 240px !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-rows: 29px auto 7px !important;
}
#view-lineup .lineup-stage-current .mini-rotation,
#view-lineup .lineup-stage-current .active-set .mini-rotation {
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    aspect-ratio: 3 / 2 !important;
}
#view-lineup .lineup-set-card.active-set { overflow: hidden !important; }

/* Drei Satzgruppen (gespielt/aktuell/offen) müssen in der verfügbaren Höhe
   bleiben. Die Karten selbst bestimmen die Höhe; keine Gruppe erhält eine
   künstliche Resthöhe. */
#view-lineup .lineup-layout-three-rows {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 5px !important;
}

@media (max-width: 1180px) {
    #view-lineup .lineup-stage-played .lineup-set-card,
    #view-lineup .lineup-stage-future .lineup-set-card { max-width: 185px !important; }
    #view-lineup .lineup-stage-current .lineup-set-card,
    #view-lineup .lineup-stage-current .lineup-set-card.active-set {
        flex-basis: 315px !important;
        width: min(315px,100%) !important;
        min-width: 215px !important;
    }
    #view-lineup .lineup-toolbar-actions .selection-info { max-width: 180px !important; }
}

@media (max-height: 820px) {
    #view-lineup .lineup-stage-played .lineup-set-card,
    #view-lineup .lineup-stage-future .lineup-set-card { max-width: 165px !important; }
    #view-lineup .lineup-stage-current .lineup-set-card,
    #view-lineup .lineup-stage-current .lineup-set-card.active-set {
        flex-basis: 285px !important;
        width: min(285px,100%) !important;
        min-width: 200px !important;
    }
    #view-lineup .lineup-set-grid { gap: 4px !important; }
    #view-lineup .lineup-set-row { gap: 3px !important; }
    #view-lineup .lineup-player-button {
        height: 30px !important;
        min-height: 30px !important;
        flex-basis: 30px !important;
    }
}


/* --------------------------------------------------------------------------
   0.15.9 – Startaufstellung aufräumen
   -------------------------------------------------------------------------- */
/* Die rein beschreibenden Gruppenwörter links werden nicht mehr benötigt. */
#view-lineup .lineup-stage-label {
    display: none !important;
}
#view-lineup .lineup-set-row,
#view-lineup .lineup-set-row.lineup-stage-played,
#view-lineup .lineup-set-row.lineup-stage-current,
#view-lineup .lineup-set-row.lineup-stage-future {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
    width: 100% !important;
}

/* Der Kopf einer Satzkarte reserviert Platz für Titel, Rotation und Übernahme.
   Dadurch bleibt „← übernehmen“ auch am aktuellen Satz ab Satz 2 sichtbar. */
#view-lineup .lineup-set-head {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    gap: 4px !important;
    min-width: 0 !important;
}
#view-lineup .lineup-set-select {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}
#view-lineup .copy-lineup-button,
#view-lineup .lineup-inline-rotate {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* Auswahl der Annahmeaufstellung gehört ins Scouting und erscheint hier nicht. */
#view-lineup .lineup-current-formation,
#view-lineup .lineup-formation-button {
    display: none !important;
}

/* --------------------------------------------------------------------------
   0.16.0 – Read-only Startaufstellung und Punktfolge im Ansichtsmodus
   -------------------------------------------------------------------------- */

/* Im Ansichtsmodus bleibt Startaufstellung erreichbar, ist aber rein lesend. */
.view-only-mode #view-lineup .lineup-toolbar-actions,
.external-viewer #view-lineup .lineup-toolbar-actions,
.view-only-mode #view-lineup .lineup-roster-panel,
.external-viewer #view-lineup .lineup-roster-panel {
    display: none !important;
}
.view-only-mode #view-lineup .lineup-team-button,
.external-viewer #view-lineup .lineup-team-button,
.view-only-mode #view-lineup #lineupTeamButton,
.external-viewer #view-lineup #lineupTeamButton {
    pointer-events: none !important;
}
.view-only-mode #view-lineup .lineup-workspace,
.external-viewer #view-lineup .lineup-workspace {
    grid-template-columns: minmax(0,1fr) !important;
    overflow: hidden !important;
}
.view-only-mode #view-lineup .lineup-set-grid.lineup-viewer-grid,
.external-viewer #view-lineup .lineup-set-grid.lineup-viewer-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, auto) !important;
    gap: 8px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    align-content: start !important;
    overflow: hidden !important;
}
.view-only-mode #view-lineup .lineup-viewer-grid .viewer-lineup-card,
.external-viewer #view-lineup .lineup-viewer-grid .viewer-lineup-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    grid-template-rows: 28px auto 7px !important;
    padding: 5px !important;
    overflow: hidden !important;
}
.view-only-mode #view-lineup .lineup-viewer-grid .viewer-lineup-card .mini-rotation,
.external-viewer #view-lineup .lineup-viewer-grid .viewer-lineup-card .mini-rotation {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 3 / 2 !important;
}
.view-only-mode #view-lineup .lineup-viewer-grid .viewer-lineup-card .lineup-position-button,
.external-viewer #view-lineup .lineup-viewer-grid .viewer-lineup-card .lineup-position-button {
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 3px !important;
    cursor: default !important;
}
.view-only-mode #view-lineup .lineup-viewer-grid .viewer-lineup-card .lineup-player-number,
.external-viewer #view-lineup .lineup-viewer-grid .viewer-lineup-card .lineup-player-number {
    font-size: clamp(1rem, 2.2vw, 1.7rem) !important;
}
.view-only-mode #view-lineup .lineup-viewer-grid .viewer-lineup-card .lineup-player-name,
.external-viewer #view-lineup .lineup-viewer-grid .viewer-lineup-card .lineup-player-name {
    font-size: clamp(.52rem, 1vw, .72rem) !important;
}
.view-only-mode #view-lineup .lineup-viewer-grid .viewer-lineup-card:nth-child(4),
.external-viewer #view-lineup .lineup-viewer-grid .viewer-lineup-card:nth-child(4) { grid-column: 1; grid-row: 2; }
.view-only-mode #view-lineup .lineup-viewer-grid .viewer-lineup-card:nth-child(5),
.external-viewer #view-lineup .lineup-viewer-grid .viewer-lineup-card:nth-child(5) { grid-column: 2; grid-row: 2; }

/* Punktfolge: im Ansichtsmodus direkt unter dem Spielfeld, immer 16 Spalten. */
.viewer-point-sequence-row {
    display: none;
    min-width: 0;
    width: 100%;
}
.view-only-mode #viewerPointSequence,
.external-viewer #viewerPointSequence {
    display: block !important;
}
.viewer-point-sequence-row[hidden] { display: none !important; }
.viewer-point-sequence-grid {
    display: grid;
    grid-template-columns: minmax(92px, 1.35fr) repeat(16, minmax(25px, 1fr));
    grid-template-rows: repeat(2, 27px);
    gap: 2px;
    width: 100%;
    min-width: 0;
    padding: 4px 5px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    box-sizing: border-box;
    overflow: hidden;
}
.viewer-point-sequence-head {
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 0 7px;
    border-radius: 6px;
    background: #F4F7F4;
    color: var(--ink);
    font-size: clamp(.55rem, .9vw, .7rem);
    font-weight: 950;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.viewer-point-sequence-cell {
    min-width: 0;
    display: grid;
    place-items: center;
    border: 1px solid #D7DFD8;
    border-radius: 5px;
    background: #FAFCFA;
    color: #506057;
    font-size: clamp(.58rem, .92vw, .74rem);
    font-weight: 950;
    line-height: 1;
}
.viewer-point-sequence-cell.team.won {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
.viewer-point-sequence-cell.opponent.won {
    border-color: #66736A;
    background: #66736A;
    color: #fff;
}
.viewer-point-sequence-cell.empty { opacity: .38; }

@media (max-width: 900px) {
    .viewer-point-sequence-grid {
        grid-template-columns: minmax(72px, 1.15fr) repeat(16, minmax(19px, 1fr));
        grid-template-rows: repeat(2, 24px);
        gap: 1px;
        padding: 3px;
    }
    .viewer-point-sequence-head { padding-inline: 4px; font-size: .52rem; }
    .viewer-point-sequence-cell { font-size: .57rem; border-radius: 4px; }
    .view-only-mode #view-lineup .lineup-set-grid.lineup-viewer-grid,
    .external-viewer #view-lineup .lineup-set-grid.lineup-viewer-grid { gap: 5px !important; }
}

/* --------------------------------------------------------------------------
   0.16.1 – Spielbericht und Punktfolge unterhalb des Courts
   -------------------------------------------------------------------------- */

/* Court und Punktfolge bilden jetzt eine eigene vertikale Einheit. Damit kann
   die Punktfolge in der Ansicht nicht mehr in den Court hineinrutschen. */
.scouting-court-area {
    grid-row: 2 !important;
    min-width: 0;
    width: 100%;
    display: grid;
    grid-template-rows: auto auto;
    gap: 5px;
    align-content: start;
    overflow: visible;
}
.scouting-court-area > .combined-volleyball-court {
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
}
.scouting-court-area > #viewerPointSequence {
    grid-row: 2 !important;
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    margin: 0 !important;
}
/* Die Aktionsleiste bleibt im Eingabemodus die dritte Hauptzeile. */
.scouting-main > .recent-actions-row { grid-row: 3 !important; }

/* Spielbericht */
.report-page {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: 42px auto auto minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
}
.report-toolbar { min-width: 0; }
.report-match-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 8px 12px !important;
}
.report-match-team {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    align-items: center;
    gap: 10px;
    font-weight: 950;
    line-height: 1.05;
}
.report-match-team span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1.05rem, 2vw, 1.55rem);
}
.report-match-team strong {
    text-align: right;
    font-size: clamp(1.25rem, 2.3vw, 1.8rem);
}
.report-set-card,
.report-player-card {
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}
.report-set-card { padding: 6px 8px 8px !important; }
.report-player-card {
    padding: 6px 8px 8px !important;
    display: grid;
    grid-template-rows: 24px minmax(0, 1fr);
}
.report-set-table-wrap,
.report-player-table-wrap {
    min-width: 0;
    min-height: 0;
    width: 100%;
}
.report-player-table-wrap { overflow: auto; }
.report-set-table,
.report-player-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: var(--ink);
    background: var(--surface);
}
.report-set-table th,
.report-set-table td {
    border: 1px solid var(--border);
    padding: 4px 6px;
    text-align: center;
    font-size: .72rem;
    line-height: 1.05;
}
.report-set-table thead th {
    background: #EEF2EE;
    font-weight: 950;
}
.report-set-table thead th:first-child { width: 56px; }
.report-set-table thead th:last-child { width: 120px; }
.report-set-table tbody th { font-weight: 950; }
.report-set-table tr.unplayed { color: var(--muted); opacity: .58; }
.report-final-score { position: relative; font-weight: 950; font-size: .82rem !important; }
.report-set-table tr.finished .report-final-score { color: var(--primary-dark); }
.report-live-mark {
    margin-left: 5px;
    padding: 1px 4px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: .48rem;
    text-transform: uppercase;
}
.report-player-table { min-width: 900px; }
.report-player-table th,
.report-player-table td {
    border: 1px solid var(--border);
    padding: 3px 4px;
    text-align: center;
    font-size: .62rem;
    line-height: 1.04;
    white-space: nowrap;
}
.report-player-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #EEF2EE;
    font-weight: 950;
}
.report-player-table thead .report-group-head th {
    top: 0;
    background: #E4EAE4;
    font-size: .66rem;
}
.report-player-table thead tr:nth-child(2) th { top: 22px; }
.report-player-table .report-player-number {
    width: 38px;
    font-size: .78rem;
    font-weight: 950;
}
.report-player-table .report-player-name {
    width: 190px;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    font-weight: 800;
}
.report-lineup-cell { width: 34px; }
.report-lineup-cell span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 22px;
    border: 1px solid #707770;
    background: #F7F8F7;
    font-size: .75rem;
    font-weight: 950;
}
.report-stat-number { width: 52px; font-weight: 800; }
.report-percent { width: 76px; font-weight: 950; }
.report-percent.q0 { color: #C93227; background: rgba(231,76,60,.10); }
.report-percent.q1 { color: #B86A00; background: rgba(255,159,28,.11); }
.report-percent.q2 { color: #9C7900; background: rgba(255,215,55,.15); }
.report-percent.q3 { color: #138A31; background: rgba(82,196,91,.12); }
.report-player-table tfoot th {
    background: #EEF2EE;
    font-weight: 950;
}
.report-player-table tfoot th:first-child { text-align: left; padding-left: 8px; }
.report-empty {
    padding: 12px;
    color: var(--muted);
    font-weight: 800;
}

@media (max-height: 820px) {
    .report-page { gap: 5px; }
    .report-match-header { padding: 5px 9px !important; }
    .report-match-team span { font-size: .95rem; }
    .report-match-team strong { font-size: 1.15rem; }
    .report-set-card { padding: 4px 6px !important; }
    .report-set-table th, .report-set-table td { padding-block: 2px; font-size: .62rem; }
    .report-player-card { padding: 4px 6px 5px !important; grid-template-rows: 21px minmax(0,1fr); }
    .report-player-table th, .report-player-table td { padding: 2px 3px; font-size: .56rem; }
    .report-player-table .report-player-number { font-size: .68rem; }
    .report-lineup-cell span { width: 21px; height: 19px; font-size: .66rem; }
    .report-player-table thead tr:nth-child(2) th { top: 19px; }
}

@media (max-width: 900px) {
    .report-player-table { min-width: 820px; }
    .report-player-table .report-player-name { width: 150px; max-width: 150px; }
    .report-player-table th, .report-player-table td { font-size: .54rem; }
}

/* In read-only views gibt es keine Aktionszeile; die Court-Einheit darf deshalb
   die komplette zweite Hauptzeile belegen. */
.view-only-mode #view-scouting .scouting-main,
.external-viewer #view-scouting .scouting-main {
    grid-template-rows: 42px auto !important;
}


/* --------------------------------------------------------------------------
   0.16.2 – Navigation, persistente Sitzung, Libero-Auswahl, Punktfolge und
   kompakter Spielbericht
   -------------------------------------------------------------------------- */

/* Scouting-Kopf: links steht nur noch die gescoutete Mannschaft. */
#view-scouting .scouting-team-toolbar-left {
    gap: 5px !important;
}
#view-scouting #scoutingTeamButton {
    margin-left: 0 !important;
}

/* Startaufstellung: mehr Platz für Namen plus eigene, spielbezogene Libero-Spalte. */
#view-lineup .lineup-workspace {
    grid-template-columns: minmax(0, 1fr) 330px !important;
}
#view-lineup .lineup-roster-titleline {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px;
    align-items: end;
    gap: 5px;
}
#view-lineup .lineup-libero-head {
    text-align: center;
    color: var(--muted);
    font-size: .58rem;
    font-weight: 900;
    line-height: 1;
}
#view-lineup .lineup-player-row {
    flex: 0 0 31px;
    min-height: 31px;
    height: 31px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px;
    align-items: center;
    gap: 4px;
}
#view-lineup .lineup-player-row .lineup-player-button {
    height: 31px !important;
    min-height: 31px !important;
    min-width: 0 !important;
    grid-template-columns: 42px minmax(0, 1fr) 30px !important;
}
#view-lineup .lineup-player-row .lineup-player-button .name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#view-lineup .lineup-libero-toggle {
    position: relative;
    width: 48px;
    height: 25px;
    padding: 2px !important;
    border: 1px solid #B8C4BB !important;
    border-radius: 999px !important;
    background: #EDF1EE !important;
    box-shadow: none !important;
    cursor: pointer;
}
#view-lineup .lineup-libero-toggle .lineup-libero-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #A5B0A8;
    transition: transform .14s ease;
}
#view-lineup .lineup-libero-toggle.active {
    background: var(--primary) !important;
    border-color: var(--primary-dark) !important;
}
#view-lineup .lineup-libero-toggle.active .lineup-libero-knob {
    transform: translateX(23px);
    border-color: #fff;
}
#view-lineup .lineup-libero-toggle:disabled {
    opacity: .45;
    cursor: default;
}
@media (max-width: 1180px) {
    #view-lineup .lineup-workspace { grid-template-columns: minmax(0, 1fr) 310px !important; }
}

/* Punktfolge ist ein echtes Geschwisterelement NACH dem kompletten Court.
   Eingabemodus: Aktionsleiste in Zeile 3. Ansichtsmodus: Punktfolge in Zeile 3. */
.scouting-main > .scouting-court-area {
    grid-row: 2 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
}
.scouting-main > #viewerPointSequence {
    grid-row: 3 !important;
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    margin: 0 !important;
    align-self: start !important;
}
.scouting-main > .recent-actions-row { grid-row: 3 !important; }
.view-only-mode #view-scouting .scouting-main,
.external-viewer #view-scouting .scouting-main {
    grid-template-rows: 42px auto auto !important;
    align-content: start !important;
}
.view-only-mode #view-scouting #viewerPointSequence,
.external-viewer #view-scouting #viewerPointSequence {
    margin-top: 5px !important;
}

/* Spielbericht: Gesamtspielstand + Sätze nebeneinander, damit die
   Spielerinnen-/Qualitätstabelle den überwiegenden Teil der Höhe erhält. */
.report-page {
    grid-template-rows: 42px minmax(118px, 142px) minmax(0, 1fr) !important;
    gap: 7px !important;
}
.report-summary-grid {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(250px, .78fr) minmax(0, 1.55fr);
    gap: 7px;
    overflow: hidden;
}
.report-summary-grid > .side-card {
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
}
.report-match-header {
    align-content: center;
    padding: 8px 12px !important;
}
.report-set-card {
    display: grid;
    grid-template-rows: 22px minmax(0, 1fr);
    padding: 5px 7px !important;
}
.report-set-table-wrap {
    overflow: hidden;
}
.report-set-table th,
.report-set-table td {
    padding: 2px 4px !important;
    height: 18px;
    font-size: .64rem !important;
}
.report-player-card {
    min-height: 0 !important;
    grid-template-rows: 23px minmax(0, 1fr) !important;
}
.report-player-table-wrap {
    min-height: 0;
    overflow: auto;
}
.report-player-table {
    min-width: 900px !important;
    table-layout: fixed !important;
}
.report-player-table col.report-col-number { width: 42px; }
.report-player-table col.report-col-name { width: 270px; }
.report-player-table col.report-col-lineup { width: 31px; }
.report-player-table col.report-col-stat { width: 54px; }
.report-player-table col.report-col-percent { width: 78px; }
.report-player-table .report-player-number {
    width: auto !important;
}
.report-player-table .report-player-name {
    width: auto !important;
    max-width: none !important;
    text-align: left !important;
}
.report-player-table .report-lineup-cell {
    width: auto !important;
    padding-inline: 2px !important;
}
.report-player-table .report-lineup-cell span {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
}
.report-player-table tbody tr {
    height: 30px !important;
}
.report-player-table tbody td {
    height: 30px !important;
    min-height: 30px !important;
    box-sizing: border-box;
    vertical-align: middle;
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}
.report-player-table tbody .report-lineup-cell:empty::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: middle;
}
@media (max-height: 820px) {
    .report-page { grid-template-rows: 42px 116px minmax(0, 1fr) !important; }
    .report-summary-grid { gap: 5px; }
    .report-player-table tbody tr,
    .report-player-table tbody td { height: 26px !important; min-height: 26px !important; }
    .report-player-table .report-lineup-cell span,
    .report-player-table tbody .report-lineup-cell:empty::after {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        min-height: 18px !important;
    }
}
@media (max-width: 900px) {
    .report-summary-grid { grid-template-columns: minmax(220px, .82fr) minmax(0, 1.5fr); }
    .report-player-table { min-width: 860px !important; }
    .report-player-table col.report-col-name { width: 235px; }
    .report-player-table col.report-col-lineup { width: 29px; }
}

/* 0.16.2 Nachkorrektur: Im lokalen Ansichtsmodus sind die Eingabeflächen unter
   dem Court ebenfalls vollständig ausgeblendet. Die Punktfolge sitzt dadurch
   unmittelbar unter der sichtbaren Spielfeldkante. */
.view-only-mode #view-scouting .court-bottom-actions {
    display: none !important;
}
.view-only-mode #view-scouting .combined-volleyball-court .court-slot {
    grid-template-rows: var(--scouting-court-runtime, auto) 0 !important;
}

@media (max-height: 820px) {
    .report-page { grid-template-rows: 42px 130px minmax(0, 1fr) !important; }
    .report-set-table th,
    .report-set-table td {
        height: 15px !important;
        padding: 1px 3px !important;
        font-size: .57rem !important;
    }
}

/* --------------------------------------------------------------------------
   0.16.3 – besser lesbarer Spielbericht und Punktfolge exakt unter dem Feld
   -------------------------------------------------------------------------- */

/* Spielbericht: Zahlenwerte sollen mindestens so gut lesbar sein wie die
   Startpositionsnummern, ohne die kompakte Zeilenhöhe der Tabelle zu ändern. */
.report-player-table tbody .report-stat-number,
.report-player-table tbody .report-percent,
.report-player-table tfoot .report-stat-number,
.report-player-table tfoot .report-percent {
    font-size: .80rem !important;
    line-height: 1 !important;
    font-weight: 950 !important;
}

/* Auch die Satzstände in der oberen rechten Berichtstabelle werden deutlich
   größer. Die Tabellenköpfe bleiben kompakter, damit die Karte niedrig bleibt. */
.report-set-table tbody th,
.report-set-table tbody td {
    font-size: .82rem !important;
    line-height: 1 !important;
    font-weight: 850 !important;
}
.report-set-table tbody .report-final-score {
    font-size: .92rem !important;
    font-weight: 1000 !important;
}

/* Punktfolge: unterhalb der roten AUS-Zone etwas Luft lassen. Die exakte
   Feldbreite und horizontale Ausrichtung werden ergänzend per JS aus den beiden
   grünen Court-Frames berechnet. */
.view-only-mode #view-scouting #viewerPointSequence,
.external-viewer #view-scouting #viewerPointSequence {
    margin-top: 44px !important;
    width: auto;
    max-width: 100%;
}
.viewer-point-sequence-grid {
    max-width: 100%;
}

@media (max-height: 820px) {
    .report-player-table tbody .report-stat-number,
    .report-player-table tbody .report-percent,
    .report-player-table tfoot .report-stat-number,
    .report-player-table tfoot .report-percent {
        font-size: .75rem !important;
    }
    .report-set-table tbody th,
    .report-set-table tbody td {
        font-size: .75rem !important;
    }
    .report-set-table tbody .report-final-score {
        font-size: .84rem !important;
    }
}

/* 0.16.3 Feinschliff: Werte bewusst klar oberhalb der bisherigen Kleinschrift. */
.report-player-table tbody .report-stat-number,
.report-player-table tbody .report-percent {
    font-size: .84rem !important;
}
.report-player-table tfoot th:not(:first-child) {
    font-size: .84rem !important;
    font-weight: 1000 !important;
}
.report-set-table tbody th,
.report-set-table tbody td {
    font-size: .86rem !important;
}
.report-set-table tbody .report-final-score {
    font-size: 1rem !important;
}
@media (max-height: 820px) {
    .report-player-table tbody .report-stat-number,
    .report-player-table tbody .report-percent,
    .report-player-table tfoot th:not(:first-child) {
        font-size: .78rem !important;
    }
    .report-set-table tbody th,
    .report-set-table tbody td {
        font-size: .79rem !important;
    }
    .report-set-table tbody .report-final-score {
        font-size: .90rem !important;
    }
}


/* --------------------------------------------------------------------------
   0.16.4 – Annahmekennzahlen, K1-Läuferauswertung und Punktfolgenfarben
   -------------------------------------------------------------------------- */

/* Annahme: alle geforderten Kennzahlen groß und in exakt einer Zeile. */
.reception-evaluation-row.reception-evaluation-row-0164 {
    grid-template-columns: 48px minmax(150px, 1fr) 92px 82px 92px !important;
    gap: 7px !important;
}
.reception-eval-name-0164 strong {
    font-size: clamp(.72rem, 1vw, .88rem) !important;
    line-height: 1 !important;
}
.reception-eval-metric {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    color: #121713;
    white-space: nowrap;
    line-height: 1;
}
.reception-eval-metric strong {
    font-size: clamp(.82rem, 1.18vw, 1.05rem);
    font-weight: 1000;
}
.reception-eval-metric span {
    font-size: clamp(.52rem, .68vw, .62rem);
    font-weight: 850;
    color: #4e5851;
}
.reception-evaluation-row.reception-evaluation-row-0164 .reception-eval-percent {
    color: #111511 !important;
    font-size: clamp(.88rem, 1.28vw, 1.12rem) !important;
    font-weight: 1000 !important;
    letter-spacing: .01em;
}
.reception-evaluation-row.reception-evaluation-row-0164.unrated .reception-eval-percent,
.reception-evaluation-row.reception-evaluation-row-0164.unrated .reception-eval-metric {
    color: #68736c !important;
}

/* K1-Richtungen nach Läufer: feste Reihenfolge 1–6–5 / 2–3–4. */
#evaluationK1RunnerPanel {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
}
#evaluationK1RunnerPanel[hidden] { display: none !important; }
.k1-runner-grid {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    grid-template-rows: repeat(2, minmax(0,1fr));
    gap: 8px;
    padding: 0 7px 6px;
    overflow: hidden;
}
.k1-runner-card {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: 28px minmax(0,1fr);
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    overflow: hidden;
}
.k1-runner-head {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 3px;
}
.k1-runner-head strong {
    font-size: clamp(.74rem, 1vw, .9rem);
    color: var(--primary-dark);
    font-weight: 1000;
}
.k1-runner-head span {
    font-size: clamp(.52rem, .72vw, .64rem);
    color: var(--muted);
    font-weight: 850;
    white-space: nowrap;
}
.k1-runner-court-wrap {
    min-height: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.k1-runner-court-wrap .evaluation-court-svg {
    width: auto !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    aspect-ratio: 1 / 1 !important;
    overflow: visible !important;
}

/* Punktfolge: obere Mannschaft immer theme-abhängig blau, untere Mannschaft
   verwendet die Hauptfarbe des Farbschemas. */
.viewer-point-sequence-cell.team.won {
    border-color: var(--viewer-team-top, #1976D2) !important;
    background: var(--viewer-team-top, #1976D2) !important;
    color: #fff !important;
}
.viewer-point-sequence-cell.opponent.won {
    border-color: var(--viewer-team-bottom, var(--primary)) !important;
    background: var(--viewer-team-bottom, var(--primary)) !important;
    color: #fff !important;
}

@media (max-width: 900px) {
    .reception-evaluation-row.reception-evaluation-row-0164 {
        grid-template-columns: 42px minmax(118px,1fr) 76px 70px 78px !important;
        gap: 4px !important;
    }
    .reception-eval-metric span { display: none; }
    .k1-runner-grid { gap: 5px; padding-inline: 4px; }
    .k1-runner-card { padding: 4px; grid-template-rows: 24px minmax(0,1fr); }
}

@media (max-height: 760px) {
    .k1-runner-grid { gap: 4px; padding-bottom: 3px; }
    .k1-runner-card { padding: 3px; grid-template-rows: 22px minmax(0,1fr); }
    .k1-runner-head strong { font-size: .7rem; }
    .k1-runner-head span { font-size: .5rem; }
}


/* --------------------------------------------------------------------------
   0.16.5 – K1-Läufercourts wie normale Angriffsrichtungs-Karten
   -------------------------------------------------------------------------- */

/* Exakt drei Courts pro Zeile und zwei vollständige Reihen im verfügbaren
   Auswertungsbereich. */
#evaluationK1RunnerPanel .k1-runner-grid {
    height: 100% !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: 0 !important;
    gap: 8px !important;
    align-content: stretch !important;
    overflow: hidden !important;
    padding: 0 7px 6px !important;
}

/* Höhe, Innenabstände und Court-Skalierung entsprechen der normalen
   Angriffsrichtungs-Auswertung. */
#evaluationK1RunnerPanel .k1-runner-card-0165 {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: 100% !important;
    display: grid !important;
    grid-template-rows: 50px minmax(0, 1fr) !important;
    gap: 3px !important;
    padding: 6px !important;
    overflow: hidden !important;
}

#evaluationK1RunnerPanel .k1-runner-head-0165 {
    min-width: 0 !important;
    height: 50px !important;
}

#evaluationK1RunnerPanel .k1-runner-head-0165 .eval-head-top {
    grid-template-columns: 46px minmax(0, 1fr) auto !important;
}

#evaluationK1RunnerPanel .k1-runner-head-0165 .eval-head-top > strong {
    font-size: 1.45rem !important;
}

#evaluationK1RunnerPanel .k1-runner-head-0165 .eval-head-top > b {
    font-size: .72rem !important;
}

#evaluationK1RunnerPanel .k1-runner-card-0165 > .evaluation-court-svg {
    width: auto !important;
    height: 90% !important;
    max-width: 90% !important;
    max-height: 90% !important;
    aspect-ratio: auto !important;
    align-self: start !important;
    justify-self: center !important;
    overflow: visible !important;
}

@media (max-width: 900px) {
    #evaluationK1RunnerPanel .k1-runner-grid {
        gap: 5px !important;
        padding-inline: 4px !important;
    }
    #evaluationK1RunnerPanel .k1-runner-card-0165 {
        grid-template-rows: 44px minmax(0, 1fr) !important;
        padding: 4px !important;
    }
    #evaluationK1RunnerPanel .k1-runner-head-0165 {
        height: 44px !important;
    }
    #evaluationK1RunnerPanel .k1-runner-card-0165 > .evaluation-court-svg {
        height: 92% !important;
        max-height: 92% !important;
        max-width: 94% !important;
    }
}

@media (max-height: 760px) {
    #evaluationK1RunnerPanel .k1-runner-grid {
        gap: 4px !important;
        padding-bottom: 3px !important;
    }
    #evaluationK1RunnerPanel .k1-runner-card-0165 {
        grid-template-rows: 40px minmax(0, 1fr) !important;
        padding: 3px !important;
    }
    #evaluationK1RunnerPanel .k1-runner-head-0165 {
        height: 40px !important;
    }
    #evaluationK1RunnerPanel .k1-runner-card-0165 > .evaluation-court-svg {
        height: 94% !important;
        max-height: 94% !important;
    }
}

/* =========================================================
   0.16.6 – K1-Läuferkarten: nur L1/L6/L5/L2/L3/L4 im Kopf
   ========================================================= */
#evaluationK1RunnerPanel .k1-runner-card-0165 {
    grid-template-rows: 34px minmax(0, 1fr) !important;
}
#evaluationK1RunnerPanel .k1-runner-head-0165 {
    height: 34px !important;
    display: block !important;
}
#evaluationK1RunnerPanel .k1-runner-head-0165 .eval-head-top {
    height: 100% !important;
    align-items: center !important;
}
@media (max-width: 900px) {
    #evaluationK1RunnerPanel .k1-runner-card-0165 {
        grid-template-rows: 30px minmax(0, 1fr) !important;
    }
    #evaluationK1RunnerPanel .k1-runner-head-0165 {
        height: 30px !important;
    }
}
@media (max-height: 760px) {
    #evaluationK1RunnerPanel .k1-runner-card-0165 {
        grid-template-rows: 28px minmax(0, 1fr) !important;
    }
    #evaluationK1RunnerPanel .k1-runner-head-0165 {
        height: 28px !important;
    }
}


/* 0.16.7 – offizielle Ligen (VBL + DVV/SAMS) */
.team-league-picker { display:flex; align-items:center; gap:5px; font-size:.58rem; font-weight:850; color:var(--muted); white-space:nowrap; }
.team-league-picker select { max-width:220px; height:29px; border:1px solid var(--border); border-radius:7px; background:#fff; color:var(--ink); padding:0 24px 0 7px; font-size:.58rem; font-weight:800; }
.team-grid-empty { grid-column:1/-1; grid-row:1/-1; display:grid; place-items:center; padding:8px; border:1px dashed #B9C5BC; border-radius:9px; background:rgba(255,255,255,.68); color:var(--muted); text-align:center; font-size:.62rem; line-height:1.3; }
@media (max-width: 900px) {
    .team-league-picker span { display:none; }
    .team-league-picker select { max-width:180px; }
}

/* --------------------------------------------------------------------------
   0.16.8 – Integration: sichere seitliche Aufschlag-Gassen aus 0.16.7
   -------------------------------------------------------------------------- */
/* Nur im EINGABEMODUS verkleinern. Die Ansichtsseite bleibt unverändert. */
html:not(.view-only-mode):not(.external-viewer) #view-scouting .scouting-court-area > .combined-volleyball-court {
    width: min(88%, calc(100% - 104px), calc((100dvh - 225px) * 2)) !important;
    max-width: calc(100% - 104px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

html:not(.view-only-mode):not(.external-viewer) #view-scouting .serve-side-left { left: -42px !important; }
html:not(.view-only-mode):not(.external-viewer) #view-scouting .serve-side-right { right: -42px !important; }

@media (max-width: 1180px) {
    html:not(.view-only-mode):not(.external-viewer) #view-scouting .scouting-court-area > .combined-volleyball-court {
        width: min(86%, calc(100% - 92px), calc((100dvh - 215px) * 2)) !important;
        max-width: calc(100% - 92px) !important;
    }
}

@media (max-width: 980px) {
    html:not(.view-only-mode):not(.external-viewer) #view-scouting .scouting-court-area > .combined-volleyball-court {
        width: min(84%, calc(100% - 82px), calc((100dvh - 205px) * 2)) !important;
        max-width: calc(100% - 82px) !important;
    }
    html:not(.view-only-mode):not(.external-viewer) #view-scouting .serve-side-left { left: -36px !important; }
    html:not(.view-only-mode):not(.external-viewer) #view-scouting .serve-side-right { right: -36px !important; }
}


/* --------------------------------------------------------------------------
   0.16.9 – Marker-Zentrierung und Mannschaftsliste
   -------------------------------------------------------------------------- */

/* Zahlen in Kreis und Quadrat optisch exakt zentrieren. Browser-Button-
   Innenabstände dürfen die Ziffern nicht mehr verschieben. */
.formation-player-token {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    text-align: center !important;
    line-height: 1 !important;
    font-variant-numeric: tabular-nums;
}
.formation-player-token.front-row-player {
    width: clamp(41px, 4.4vw, 62px) !important;
    height: clamp(41px, 4.4vw, 62px) !important;
}
.formation-player-token.back-row-player {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Teams-Seite besitzt jetzt eine echte, ausreichend hohe Spaltenkopfzeile. */
.teams-page {
    grid-template-rows: 42px 78px 44px 44px 32px minmax(0, 1fr) !important;
}
.roster-list-head,
.roster-row {
    grid-template-columns: 38px 55px minmax(180px,1fr) 68px 82px 42px 100px !important;
}
.roster-list-head {
    min-width: 0;
    height: 32px;
    display: grid;
    align-items: center;
    gap: 5px;
    padding: 4px 5px;
    border: 1px solid #D6DED8;
    border-radius: 7px;
    background: #EEF2EF;
    color: #172019;
    font-size: .62rem;
    line-height: 1.05;
    font-weight: 950;
    text-align: center;
    overflow: hidden;
}
.roster-list-head span:nth-child(3) { text-align: left; padding-left: 6px; }
.roster-list-head span { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.roster-grid { grid-template-rows: repeat(16, minmax(0,1fr)) !important; }

@media (max-width: 900px) {
    .teams-page { grid-template-rows: 42px 68px 40px 40px 32px minmax(0,1fr) !important; }
    .roster-list-head,
    .roster-row { grid-template-columns: 28px 46px minmax(120px,1fr) 55px 68px 32px 86px !important; }
    .roster-list-head { gap: 3px; padding: 3px; font-size: .54rem; }
}

/* --------------------------------------------------------------------------
   0.16.10 – Spielstand ohne Doppelpunkt, größere umbrechbare Teamnamen
   -------------------------------------------------------------------------- */
.score-board {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 7px !important;
}
.score-separator { display: none !important; }
.score-team {
    min-width: 0;
    grid-template-rows: minmax(1.45rem, auto) auto;
    align-content: center;
}
.score-team-name {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    min-height: 1.42rem;
    max-height: 1.42rem;
    padding: 0 1px;
    text-align: center;
    font-size: .67rem !important;
    line-height: 1.05;
    font-weight: 950;
    color: var(--primary-dark);
}


/* 0.16.15 – Ligaauswahl beim Start eines neuen Spiels */
.game-league-row{display:flex;align-items:center;gap:10px;min-width:0;margin:3px 0 5px;}
.game-league-select-label{display:flex;align-items:center;gap:8px;font-weight:900;white-space:nowrap;}
.game-league-select-label select{min-height:34px;min-width:235px;max-width:360px;padding:5px 34px 5px 10px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font:inherit;font-weight:800;}
.game-team-empty{width:100%;min-height:36px;display:flex;align-items:center;padding:7px 10px;border:1px dashed var(--line);border-radius:10px;color:var(--muted);font-size:.86rem;}
@media(max-width:900px){.game-league-row{align-items:stretch;flex-direction:column;gap:4px}.game-league-select-label{justify-content:space-between}.game-league-select-label select{min-width:0;flex:1}}


/* 0.16.15 – Seitenwahl pro Satz */
.set-side-choice-card{
    width:clamp(190px,24vw,300px); min-width:190px; align-self:stretch;
    border:1px solid var(--line); border-radius:14px; background:var(--surface); padding:9px;
    display:flex; flex-direction:column; gap:8px; box-sizing:border-box;
}
.set-side-choice-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;min-height:24px}
.set-side-choice-head strong{font-size:.9rem}.set-side-choice-head span{font-size:.72rem;color:var(--muted);font-weight:800}
.set-side-mini-court{position:relative;display:grid;grid-template-columns:1fr 1fr;min-height:115px;border:3px solid var(--primary);background:linear-gradient(to bottom,transparent 49.4%,color-mix(in srgb,var(--primary) 42%,transparent) 49.4% 50.6%,transparent 50.6%);overflow:hidden}
.set-side-half{appearance:none;border:0;background:transparent;display:flex;align-items:center;justify-content:center;font:inherit;font-weight:900;color:var(--muted);cursor:pointer;min-width:0}
.set-side-half:first-child{border-right:1px solid color-mix(in srgb,var(--primary) 35%,transparent)}
.set-side-half.active{background:color-mix(in srgb,var(--primary) 22%,white);color:var(--primary)}
.set-side-half span{padding:5px 7px;border-radius:8px;background:color-mix(in srgb,var(--surface) 86%,transparent)}
.set-side-net{position:absolute;left:50%;top:0;bottom:0;width:4px;transform:translateX(-50%);background:var(--primary);pointer-events:none}
.set-side-choice-hint{font-size:.68rem;line-height:1.2;color:var(--muted);font-weight:750}
.lineup-side-compact{margin-left:auto;min-height:28px;padding:3px 7px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--text);font:inherit;font-size:.68rem;font-weight:900;white-space:nowrap}
button.lineup-side-compact{cursor:pointer}
#view-lineup .lineup-stage-current .lineup-stage-cards:has(.set-side-choice-card){align-items:stretch!important;gap:10px!important}
@media(max-width:900px){.set-side-choice-card{width:180px;min-width:165px}.set-side-mini-court{min-height:96px}}

/* 0.16.16 – benutzerspezifischer Standard-Gegner */
.user-card .user-default-opponent { display:grid; gap:3px; align-items:stretch; }
.user-card .user-default-opponent span { font-weight:850; font-size:.58rem; }
.user-card input[type="text"], .user-card input[type="password"] { width:100%; height:30px; border:1px solid var(--border); border-radius:6px; padding:0 7px; font-size:.64rem; min-width:0; }

/* --------------------------------------------------------------------------
   0.16.17 – stabiler Spielstart und Spielkader-Overlay
   -------------------------------------------------------------------------- */

/* Seit 0.16.15 besitzt der Spielstart vier echte Inhaltszeilen. Die alte
   3-Zeilen-Regel zwang die Mannschaftsbuttons in die 39-px-Feldzeile und ließ
   sie dadurch über Gegner/Datum/Notiz laufen. */
.game-create {
    grid-template-rows: 24px 36px auto 39px !important;
    row-gap: 6px !important;
}
.game-create > .game-league-row {
    min-height: 36px !important;
    height: 36px !important;
    margin: 0 !important;
    align-self: stretch;
}
.game-create > .game-team-buttons {
    position: relative !important;
    z-index: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}
.game-create > .game-fields {
    position: relative !important;
    z-index: 2 !important;
    background: var(--surface);
}

.active-roster-nav-button {
    height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(255,220,145,.72);
    border-radius: 7px;
    background: #dfa22f;
    color: #2c2108;
    font: inherit;
    font-size: .61rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
    white-space: nowrap;
}
.active-roster-nav-button:hover,
.active-roster-nav-button:focus-visible { background: #edb343; }
.active-roster-nav-button[hidden] { display: none !important; }

.active-roster-modal-card {
    width: min(1080px, calc(100vw - 36px));
    max-height: min(780px, calc(100vh - 38px));
    display: grid;
    grid-template-rows: auto auto auto auto minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
}
.active-roster-note {
    padding: 7px 9px;
    border-radius: 8px;
    background: var(--page-bg, #f3f6f3);
    color: var(--muted);
    font-size: .68rem;
    line-height: 1.25;
    font-weight: 700;
}
.active-roster-add-row {
    display: grid;
    grid-template-columns: 82px minmax(230px, 1fr) 120px max-content;
    gap: 7px;
    align-items: end;
}
.active-roster-add-row label { display: grid; gap: 2px; font-size: .62rem; font-weight: 900; }
.active-roster-add-row input {
    width: 100%; min-width: 0; height: 34px; padding: 0 8px;
    border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
    font: inherit; font-size: .78rem;
}
.active-roster-add-row .primary-action { min-height: 34px; height: 34px; }
.active-roster-table-head,
.active-roster-row {
    display: grid;
    grid-template-columns: 72px minmax(260px, 1fr) 105px 112px 112px 96px;
    gap: 7px;
    align-items: center;
}
.active-roster-table-head {
    min-height: 30px;
    padding: 0 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary-soft) 48%, var(--surface));
    font-size: .62rem;
    font-weight: 950;
}
.active-roster-list {
    min-height: 0;
    overflow: auto;
    display: grid;
    align-content: start;
    gap: 5px;
    padding-right: 3px;
}
.active-roster-row {
    min-height: 40px;
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
}
.active-roster-row.inactive { opacity: .58; }
.active-roster-row input[type="text"],
.active-roster-row input[type="number"] {
    width: 100%; min-width: 0; height: 31px; padding: 0 7px;
    border: 1px solid var(--line); border-radius: 7px; background: var(--surface);
    font: inherit; font-size: .72rem;
}
.active-roster-switch {
    display: grid;
    grid-template-columns: 34px 1fr;
    grid-template-areas: "track text";
    gap: 6px;
    align-items: center;
    min-width: 0;
    cursor: pointer;
    font-size: .65rem;
    font-weight: 900;
}
.active-roster-switch input { position: absolute; opacity: 0; pointer-events: none; }
.active-roster-switch-track {
    grid-area: track;
    position: relative;
    width: 34px; height: 20px;
    border-radius: 999px;
    background: #cbd2cd;
    border: 1px solid #aeb8b1;
}
.active-roster-switch-track::after {
    content: "";
    position: absolute;
    width: 16px; height: 16px; left: 1px; top: 1px;
    border-radius: 50%; background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform .12s ease;
}
.active-roster-switch input:checked + .active-roster-switch-track { background: var(--primary); border-color: var(--primary); }
.active-roster-switch input:checked + .active-roster-switch-track::after { transform: translateX(14px); }
.active-roster-switch b { grid-area: text; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.active-roster-save {
    min-height: 31px; height: 31px; padding: 3px 7px;
    border: 0; border-radius: 7px; background: var(--primary); color: #fff;
    font: inherit; font-size: .64rem; font-weight: 950; cursor: pointer;
}
.active-roster-save:disabled { opacity: .5; }
.active-roster-empty { padding: 16px; text-align: center; color: var(--muted); font-weight: 800; }

@media (max-width: 900px) {
    .game-create { grid-template-rows: 24px auto auto auto !important; }
    .game-create > .game-league-row { height: auto !important; min-height: 0 !important; }
    .active-roster-modal-card { width: calc(100vw - 18px); max-height: calc(100vh - 18px); }
    .active-roster-add-row { grid-template-columns: 70px minmax(160px, 1fr) 100px; }
    .active-roster-add-row .primary-action { grid-column: 1 / -1; }
    .active-roster-table-head { display: none; }
    .active-roster-row {
        grid-template-columns: 68px minmax(150px, 1fr) 92px;
        grid-template-rows: 31px 29px;
    }
    .active-roster-row > .active-roster-switch.participation { grid-column: 1; grid-row: 2; }
    .active-roster-row > .active-roster-switch.libero { grid-column: 2; grid-row: 2; }
    .active-roster-row > .active-roster-save { grid-column: 3; grid-row: 2; }
}


/* --------------------------------------------------------------------------
   0.16.18 – Modals immer oberhalb der Scouting-Bedienelemente
   -------------------------------------------------------------------------- */

/* Die seitlichen Aufschlagbuttons liegen bewusst über dem Court (z-index 55),
   Vollbildnavigation und Top-Actions reichen bis 10030. Modale Overlays bilden
   deshalb eine eigene oberste UI-Ebene. So werden Aufschlagbuttons und übrige
   Scouting-Bedienelemente in jedem Einstellungs-/Bearbeitungsdialog vollständig
   abgedeckt und können durch ein geöffnetes Overlay nicht versehentlich bedient
   werden. */
body > .modal-layer {
    z-index: 11000 !important;
    isolation: isolate;
}
body > .modal-layer > .modal-card {
    position: relative;
    z-index: 1;
}


/* --------------------------------------------------------------------------
   0.16.19 – kompakter Spielkader-Button im Statusbereich
   -------------------------------------------------------------------------- */
/* Der Spielkader gehört funktional zum laufenden Spielstatus und sitzt deshalb
   direkt rechts neben dem Online-Status. Seine kompaktere Darstellung hält die
   Hauptnavigation ruhig, während die abweichende Farbe die Funktion weiterhin
   schnell auffindbar macht. */
.top-actions > .active-roster-nav-button {
    flex: 0 0 auto;
}


/* --------------------------------------------------------------------------
   0.16.21 – Spielerwechsel oberhalb der linken Feldhälfte
   -------------------------------------------------------------------------- */
.substitution-bench {
    position: absolute;
    left: 0;
    bottom: 100%;
    width: 100%;
    height: 31px;
    z-index: 58;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 2px 3px;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    background: rgba(255,255,255,.94);
    border: 1px solid #d7dfd9;
    border-bottom: 0;
}
.substitution-bench[hidden] { display: none !important; }
.substitution-mode-button,
.substitution-bench-player {
    flex: 0 0 auto;
    height: 25px;
    min-width: 29px;
    padding: 0 7px;
    border-radius: 8px;
    box-sizing: border-box;
    font-weight: 950;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.substitution-mode-button {
    width: 31px;
    min-width: 31px;
    padding: 0;
    border: 2px solid var(--primary);
    background: #fff;
    color: var(--primary-dark);
    font-size: 1.02rem;
    cursor: pointer;
}
.substitution-mode-button.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent);
}
.substitution-mode-button:disabled { opacity: .38; cursor: default; }
.substitution-bench-player {
    border: 1px solid #cbd3cd;
    background: #f3f5f3;
    color: #39413b;
    font-size: .67rem;
}
/* Außerhalb des Wechselmodus bleiben die Bankspieler bewusst neutral und sind
   über das disabled-Attribut technisch nicht anklickbar. */
.substitution-bench-player:disabled {
    opacity: 1;
    cursor: default;
    background: #f3f5f3;
    color: #525a54;
    border-color: #d3dad5;
}
.substitution-bench-player:not(:disabled) {
    cursor: pointer;
    background: #fff;
    border-color: #93ab9a;
}
.substitution-bench-player:not(:disabled):hover { background: var(--primary-soft); }
.substitution-bench-player.selected {
    background: #fff3d5 !important;
    border-color: #e4a31c !important;
    box-shadow: inset 0 0 0 1px #e4a31c;
    color: #6c4800;
}
.formation-player-token.substitution-mode-active {
    cursor: default !important;
}
.formation-player-token.substitution-selectable {
    cursor: pointer !important;
    box-shadow: 0 0 0 3px rgba(228,163,28,.36), 0 2px 7px rgba(0,0,0,.16) !important;
}
.view-only-mode .substitution-bench,
.external-viewer .substitution-bench { display: none !important; }

@media (max-width: 900px) {
    .substitution-bench { gap: 3px; padding-inline: 2px; }
    .substitution-mode-button,
    .substitution-bench-player { height: 25px; min-width: 27px; padding-inline: 6px; }
    .substitution-mode-button { width: 29px; min-width: 29px; }
}

/* --------------------------------------------------------------------------
   0.16.22 – Wechselzustände, größere Aktionshistorie und Punktfolge
   -------------------------------------------------------------------------- */

/* Die Aktionshistorie erhält etwas mehr Höhe; die Punktfolge folgt im
   Eingabemodus direkt darunter als eigene vierte Zeile. */
#view-scouting .scouting-main {
    grid-template-rows: 42px auto 52px auto !important;
    align-content: start !important;
}
#view-scouting .scouting-main > .recent-actions-row {
    grid-row: 3 !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
}
#view-scouting .recent-actions-card {
    height: 52px !important;
    min-height: 52px !important;
    padding: 5px 6px 3px !important;
    grid-template-rows: 43px !important;
}
#view-scouting .recent-action-strip {
    height: 43px !important;
    padding: 2px 0 9px !important;
    align-items: flex-start !important;
}
#view-scouting .recent-action-item {
    height: 29px !important;
    min-height: 29px !important;
}
#view-scouting .scouting-main > #scoutingPointSequence {
    grid-row: 4 !important;
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    align-self: start !important;
    margin-top: 5px !important;
}
.view-only-mode #view-scouting .scouting-main,
.external-viewer #view-scouting .scouting-main {
    grid-template-rows: 42px auto auto !important;
}
.view-only-mode #view-scouting #scoutingPointSequence,
.external-viewer #view-scouting #scoutingPointSequence {
    display: none !important;
}

/* Ein vorhandener Rückwechsel wird erst im aktivierten Wechselmodus orange.
   Damit bleibt die Bank im normalen Scouting vollständig neutral. */
.substitution-bench-player.return-ready:not(:disabled) {
    background: #fff1d2 !important;
    border: 2px solid #e49b13 !important;
    color: #714800 !important;
    box-shadow: inset 0 0 0 1px rgba(228,155,19,.18);
}
.substitution-bench-player.return-ready:not(:disabled):hover {
    background: #ffe7ac !important;
}

/* Nach einem abgeschlossenen Rückwechsel ist die zuvor eingewechselte
   Spielerin für diesen Satz gesperrt. Der rote Rahmen und das diagonale Kreuz
   bleiben auch außerhalb des Wechselmodus sichtbar. */
.substitution-bench-player.locked,
.substitution-bench-player.locked:disabled {
    position: relative;
    overflow: hidden;
    background: #fff8f8 !important;
    border: 2px solid #d53838 !important;
    color: #8a3030 !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
}
.substitution-bench-player.locked::before,
.substitution-bench-player.locked::after {
    content: '';
    position: absolute;
    left: 3px;
    right: 3px;
    top: 50%;
    height: 2px;
    border-radius: 2px;
    background: #d53838;
    pointer-events: none;
    transform-origin: center;
}
.substitution-bench-player.locked::before { transform: rotate(31deg); }
.substitution-bench-player.locked::after { transform: rotate(-31deg); }

/* Wechsel erscheinen als neutrale, klar lesbare Einträge in der gemeinsamen
   Aktionshistorie. */
.recent-action-item.substitution {
    min-width: 96px !important;
    max-width: 150px !important;
    border-color: #b8c0ba !important;
    background: #f6f7f6 !important;
    color: #263129 !important;
}
.recent-action-item.substitution .recent-action-type {
    color: #59625c !important;
}
.recent-action-item.substitution .recent-action-player {
    max-width: 72px !important;
    font-variant-numeric: tabular-nums;
}
.recent-action-substitution-icon {
    display: inline-grid;
    place-items: center;
    width: 19px;
    min-width: 19px;
    height: 19px;
    border-radius: 6px;
    border: 1px solid #aeb7b0;
    background: #fff;
    color: #59625c;
    font-weight: 950;
    line-height: 1;
}
.action-edit-summary.substitution {
    background: #f1f3f1 !important;
    border-color: #c6cdc8 !important;
    color: #28332b !important;
}
.substitution-action-details strong {
    font-size: .78rem;
}

/* Im Spielbericht kennzeichnet ein flaches, leeres Rechteck eine Spielerin,
   die in diesem Satz eingewechselt wurde, ohne Startspielerin zu sein. */
.report-player-table .report-lineup-cell .report-substitution-mark {
    display: inline-block !important;
    width: 20px !important;
    min-width: 20px !important;
    height: 7px !important;
    min-height: 7px !important;
    border: 1px solid #aeb6b0 !important;
    border-radius: 3px !important;
    background: #f7f8f7 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    color: transparent !important;
    line-height: 0 !important;
}

@media (max-height: 820px) {
    .report-player-table .report-lineup-cell .report-substitution-mark {
        width: 18px !important;
        min-width: 18px !important;
        height: 6px !important;
        min-height: 6px !important;
    }
}
#view-scouting #scoutingPointSequence:not([hidden]) {
    display: block !important;
}


/* --------------------------------------------------------------------------
   0.16.23 – kompaktere Aktionshistorie und Benutzer-Passwortsteuerung
   -------------------------------------------------------------------------- */

/* Die Historie bleibt etwas höher, nutzt horizontal aber nicht mehr die
   komplette Scoutingbreite. Bei vielen Aktionen bleibt der interne Scrollbalken. */
#view-scouting .scouting-main > .recent-actions-row {
    width: min(100%, 720px) !important;
    max-width: 720px !important;
    justify-self: start !important;
}
#view-scouting .recent-actions-card {
    width: 100% !important;
    max-width: 720px !important;
}

/* Passwortfelder in der Benutzerverwaltung werden erst auf ausdrücklichen
   Wunsch erzeugt; der Umschaltknopf nimmt den bisherigen Feldplatz ein. */
.user-password-slot {
    width: 100%;
    min-width: 0;
}
.user-password-slot > input,
.user-password-slot > .user-password-toggle {
    width: 100%;
    box-sizing: border-box;
}
.user-password-toggle {
    justify-content: center;
    min-height: 38px;
}

/* --------------------------------------------------------------------------
   0.16.24 – Letzte Aktionen: Kacheln exakt auf Inhaltsbreite
   -------------------------------------------------------------------------- */

/* Die vorherige 720-px-Begrenzung bezog sich versehentlich auf die gesamte
   Historienzeile. Die Historie darf wieder die verfügbare Breite nutzen. */
#view-scouting .scouting-main > .recent-actions-row {
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
}
#view-scouting .recent-actions-card {
    width: 100% !important;
    max-width: none !important;
}

/* Jede einzelne Aktion soll nur so breit sein wie Kurztyp, Spielerangabe und
   Qualitätsfeld bzw. Wechselsymbol. Kein reservierter Leerraum rechts. */
#view-scouting .recent-action-item {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
}
#view-scouting .recent-action-item .recent-action-type,
#view-scouting .recent-action-item .recent-action-player,
#view-scouting .recent-action-item .recent-action-quality,
#view-scouting .recent-action-item .recent-action-substitution-icon {
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
}
#view-scouting .recent-action-item .recent-action-quality {
    margin-left: 0 !important;
}
#view-scouting .recent-action-item.substitution {
    width: fit-content !important;
    min-width: 0 !important;
    max-width: none !important;
}
#view-scouting .recent-action-item.substitution .recent-action-player {
    max-width: none !important;
}


/* --------------------------------------------------------------------------
   0.16.26 – Libero: Achteck, lila Fläche, weiße Schrift
   -------------------------------------------------------------------------- */
:root {
    --libero-purple: #6f2dbd;
    --libero-purple-dark: #4f168c;
}

/* Liberos unterscheiden sich unabhängig von Vorder-/Hinterreihe immer über
   dieselbe achteckige Silhouette. */
#view-scouting .formation-player-token.libero-player,
#view-scouting .formation-player-token.libero-player.front-row-player,
#view-scouting .formation-player-token.libero-player.back-row-player {
    border-radius: 0 !important;
    clip-path: polygon(24% 0, 76% 0, 100% 24%, 100% 76%, 76% 100%, 24% 100%, 0 76%, 0 24%);
    background: var(--libero-purple) !important;
    background-color: var(--libero-purple) !important;
    color: #fff !important;
    border-color: var(--libero-purple-dark) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.24);
}

/* Auswahl/Setter bleiben zusätzlich erkennbar, ohne die Libero-Farbe zu
   ersetzen. */
#view-scouting .formation-player-token.libero-player.selected {
    filter: drop-shadow(0 0 2px #111) drop-shadow(0 0 2px #111);
}
#view-scouting .formation-player-token.libero-player.setter-on-court {
    box-shadow: 0 0 0 4px #1976d2, 0 2px 7px rgba(0,0,0,.16) !important;
}

/* Auch auf der Wechselbank bleibt der Libero immer lila/weiß und achteckig –
   selbst wenn die Karte außerhalb des Wechselmodus deaktiviert ist. */
#view-scouting .substitution-bench-player.libero-player,
#view-scouting .substitution-bench-player.libero-player:disabled,
#view-scouting .substitution-bench-player.libero-player:not(:disabled) {
    border-radius: 0 !important;
    clip-path: polygon(20% 0, 80% 0, 100% 25%, 100% 75%, 80% 100%, 20% 100%, 0 75%, 0 25%);
    background: var(--libero-purple) !important;
    color: #fff !important;
    border-color: var(--libero-purple-dark) !important;
    opacity: 1 !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.22);
}
#view-scouting .substitution-bench-player.libero-player:not(:disabled):hover {
    background: #7d3ac8 !important;
}

/* Rückwechsel/aktuelle Auswahl bleiben orange markiert, die Libero-Grundfarbe
   bleibt dabei erhalten. */
#view-scouting .substitution-bench-player.libero-player.return-ready:not(:disabled),
#view-scouting .substitution-bench-player.libero-player.selected {
    background: var(--libero-purple) !important;
    color: #fff !important;
    border-color: #f0a313 !important;
    box-shadow: inset 0 0 0 1px #f0a313 !important;
}

/* Gesperrte Liberos bleiben lila; roter Rand und Kreuz zeigen zusätzlich, dass
   keine weitere Einwechslung in diesem Satz möglich ist. */
#view-scouting .substitution-bench-player.libero-player.locked,
#view-scouting .substitution-bench-player.libero-player.locked:disabled {
    background: var(--libero-purple) !important;
    color: #fff !important;
    border-color: #e13b3b !important;
}
#view-scouting .substitution-bench-player.libero-player.locked::before,
#view-scouting .substitution-bench-player.libero-player.locked::after {
    background: #ff4b55 !important;
}


/* --------------------------------------------------------------------------
   0.16.27 – Spielkader in der Scouting-Kopfzeile
   -------------------------------------------------------------------------- */
/* Der bisherige laufende Hinweistext entfällt optisch. Sein DOM-Knoten bleibt
   nur als Screenreader-Status bestehen, damit bestehende Zustandslogik keine
   Sonderfälle benötigt. */
.scouting-instruction-sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
#view-scouting .scouting-team-toolbar-left > .scouting-roster-button {
    flex: 0 0 auto;
    height: 30px;
    margin-left: 2px;
    padding-inline: 10px;
}

/* --------------------------------------------------------------------------
   0.17.0 – Spielbesitz und Scouting-Freigaben
   -------------------------------------------------------------------------- */
.game-access-info {
    margin: 2px 0 10px;
    padding: 8px 10px;
    border: 1px solid #D8E2DC;
    border-radius: 10px;
    background: #F7FAF8;
    font-size: .72rem;
    font-weight: 750;
    color: var(--muted);
}
.game-access-info.owner { border-color: rgba(0,155,49,.32); color: var(--primary); }
.game-access-info.shared { border-color: #D8DEE8; }
.game-share-section {
    margin: 0 0 12px;
    padding: 10px;
    border: 1px solid #DCE4DF;
    border-radius: 12px;
    background: #FBFCFB;
}
.game-share-head { display:grid; gap:2px; margin-bottom:8px; }
.game-share-head strong { font-size:.8rem; }
.game-share-head span { color:var(--muted); font-size:.65rem; line-height:1.3; }
.game-share-users {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:6px;
    max-height:180px;
    overflow:auto;
    margin-bottom:8px;
}
.game-share-user {
    display:flex;
    align-items:center;
    gap:7px;
    min-height:34px;
    padding:5px 8px;
    border:1px solid #E1E7E3;
    border-radius:8px;
    background:#FFF;
    font-size:.7rem;
    font-weight:750;
}
.game-share-user input { width:18px; height:18px; accent-color:var(--primary); }
.game-share-empty { color:var(--muted); font-size:.68rem; padding:5px; }
.game-access-badge {
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:.5rem;
    font-weight:850;
    line-height:14px;
}
.game-access-badge.owner { color:var(--primary); }
.game-access-badge.shared { color:#6B4FA3; }
.game-history-card-0155 {
    height:102px !important;
    min-height:102px !important;
    grid-template-rows:17px 13px 16px 14px 30px !important;
}
.game-history-list { grid-auto-rows:102px !important; }

/* --------------------------------------------------------------------------
   0.17.1 – Liberos separat hinter der linken Grundlinie
   -------------------------------------------------------------------------- */
/* Bis zu zwei aktuell nicht im Feld stehende Liberos erhalten eigene feste
   Plätze links hinter der Grundlinie. Der erste sitzt auf Höhe des
   Läufer-Hinweises, der zweite direkt darunter. Ab 0.17.3 dienen sie als
   eigene Libero-Auswahl und bleiben von der normalen ⇄-Wechselsteuerung getrennt. */
#view-scouting .libero-parking {
    position: absolute;
    left: -44px;
    top: 6px;
    z-index: 57;
    width: 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
#view-scouting .libero-parking[hidden] { display: none !important; }
#view-scouting .libero-parking-player {
    width: 34px;
    height: 30px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 2px solid var(--libero-purple-dark);
    border-radius: 0;
    clip-path: polygon(24% 0, 76% 0, 100% 24%, 100% 76%, 76% 100%, 24% 100%, 0 76%, 0 24%);
    background: var(--libero-purple);
    color: #fff;
    font-size: .69rem;
    line-height: 1;
    font-weight: 1000;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 1px 1px rgba(0,0,0,.24);
    box-shadow: 0 2px 5px rgba(0,0,0,.14);
}
.view-only-mode #view-scouting .libero-parking,
.external-viewer #view-scouting .libero-parking { display: none !important; }

@media (max-width: 980px) {
    #view-scouting .libero-parking {
        left: -38px;
        width: 32px;
        gap: 6px;
    }
    #view-scouting .libero-parking-player {
        width: 31px;
        height: 28px;
        font-size: .64rem;
    }
}

/* --------------------------------------------------------------------------
   0.17.3 – Interaktive Libero-Zone und Hinterfeld-Ziele
   -------------------------------------------------------------------------- */
#view-scouting .libero-parking {
    pointer-events: auto;
}
#view-scouting .libero-parking-player {
    appearance: none;
    cursor: pointer;
    pointer-events: auto;
    font-family: inherit;
}
#view-scouting .libero-parking-player:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.07);
}
#view-scouting .libero-parking-player.selected {
    outline: 3px solid #f0a500;
    outline-offset: 2px;
    box-shadow: 0 0 0 5px rgba(240,165,0,.22), 0 2px 5px rgba(0,0,0,.14);
}
#view-scouting .libero-parking-player.preferred:not(.selected) {
    box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 0 5px rgba(103,40,173,.35), 0 2px 5px rgba(0,0,0,.14);
}
#view-scouting .libero-parking-player:disabled {
    cursor: wait;
    opacity: .72;
}
#view-scouting .formation-player-token.libero-target-selectable {
    cursor: pointer;
    outline: 4px solid #f0a500 !important;
    outline-offset: 4px;
    box-shadow: 0 0 0 7px rgba(240,165,0,.20), 0 4px 10px rgba(0,0,0,.18) !important;
}
#view-scouting .formation-player-token.libero-target-invalid {
    opacity: .48;
}
#view-scouting .formation-player-token.libero-target-invalid.libero-player {
    opacity: .68;
}


/* --------------------------------------------------------------------------
   0.17.4 – Ansichtsmodus / Läufer-Vorschau / kompakte Qualitätstabellen
   -------------------------------------------------------------------------- */

/* Die gewählte Annahmeformation wird nicht mehr in der Scouting-Kopfzeile
   wiederholt. Der ehemalige Button ist aus dem Markup entfernt; diese Regel
   schützt zusätzlich ältere gecachte Seitenstände. */
#view-scouting #receiverSetupButton { display: none !important; }

/* Der Mannschaftsname wird im Scouting vollständig dargestellt. */
#view-scouting #scoutingTeamButton {
    max-width: none !important;
    width: max-content !important;
    min-width: max-content !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
}
#view-scouting .scouting-team-toolbar-left { min-width: max-content !important; }

/* Läuferauswahl ist auch im Eingabemodus ein reguläres Toolbar-Element. */
#view-scouting .viewer-runner-control {
    display: inline-grid;
    flex: 0 0 auto;
}
#view-scouting .viewer-runner-control[hidden] { display: none !important; }
#view-scouting .scouting-toolbar .toolbar-actions {
    min-width: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    flex-wrap: nowrap;
}

/* In der Eingabe ist eine manuell gewählte Läuferposition nur Vorschau.
   Dadurch kann keine Aktion versehentlich für eine andere Rotation erfasst
   werden. Live hebt die Sperre wieder auf. */
.runner-preview-mode #view-scouting .combined-volleyball-court .court,
.runner-preview-mode #view-scouting .combined-volleyball-court .formation-player-token,
.runner-preview-mode #view-scouting .substitution-bench,
.runner-preview-mode #view-scouting .libero-parking,
.runner-preview-mode #view-scouting .court-bottom-actions,
.runner-preview-mode #view-scouting .serve-side-button,
.runner-preview-mode #view-scouting .score-controls {
    pointer-events: none !important;
}
.runner-preview-mode #view-scouting .combined-volleyball-court { opacity: .985; }

/* Read-only: keine Meta-/Bearbeitungshinweise und kein Verschieben. */
.view-only-mode #view-scouting #positionModeButton,
.external-viewer #view-scouting #positionModeButton,
.view-only-mode #view-scouting #attackPlayerButton,
.external-viewer #view-scouting #attackPlayerButton,
.view-only-mode #view-scouting .toolbar-note,
.external-viewer #view-scouting .toolbar-note,
.view-only-mode #view-scouting #scoutingInstruction,
.external-viewer #view-scouting #scoutingInstruction {
    display: none !important;
}

/* In der Ansicht bleiben nur echte Anzeigeelemente in der Toolbar voll
   sichtbar. Läuferwahl und Satzwahl dürfen lesbar bleiben. */
.view-only-mode #view-scouting .scouting-toolbar .toolbar-actions,
.external-viewer #view-scouting .scouting-toolbar .toolbar-actions {
    opacity: 1 !important;
}
.view-only-mode #view-scouting .scouting-toolbar .toolbar-actions > *,
.external-viewer #view-scouting .scouting-toolbar .toolbar-actions > * {
    opacity: 1 !important;
}

/* Read-only-Bank und Liberos werden an ihren Scouting-Positionen angezeigt. */
.view-only-mode #view-scouting .substitution-bench,
.external-viewer #view-scouting .substitution-bench {
    display: flex !important;
    pointer-events: none !important;
}
.view-only-mode #view-scouting .substitution-bench[hidden],
.external-viewer #view-scouting .substitution-bench[hidden] { display: none !important; }
.view-only-mode #view-scouting .substitution-bench-player.readonly-player,
.external-viewer #view-scouting .substitution-bench-player.readonly-player {
    cursor: default !important;
    background: #f3f5f3 !important;
    color: #525a54 !important;
    border-color: #d3dad5 !important;
}
.view-only-mode #view-scouting .libero-parking,
.external-viewer #view-scouting .libero-parking {
    display: flex !important;
    pointer-events: none !important;
}
.view-only-mode #view-scouting .libero-parking[hidden],
.external-viewer #view-scouting .libero-parking[hidden] { display: none !important; }

/* Das Spielfeld ist in der Ansicht bewusst etwas kleiner, damit Ersatzbank,
   die beiden Libero-Plätze hinter der Grundlinie und die roten Aus-Bereiche
   vollständig im sichtbaren Hauptbereich bleiben. */
.view-only-mode #view-scouting .scouting-court-area > .combined-volleyball-court,
.external-viewer #view-scouting .scouting-court-area > .combined-volleyball-court {
    width: min(86%, calc(100% - 92px), calc((100dvh - 220px) * 2)) !important;
    max-width: calc(100% - 92px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Spielstand in Read-only: keine unsichtbaren Plus-/Minus-Spalten mehr. Beide
   Werte stehen exakt mittig in zwei gleich breiten Teamspalten und erhalten
   eine eigene klar erkennbare Umrandung. */
.view-only-mode #view-scouting .score-board,
.external-viewer #view-scouting .score-board {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}
.view-only-mode #view-scouting .score-controls,
.external-viewer #view-scouting .score-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px;
}
.view-only-mode #view-scouting .score-controls button,
.external-viewer #view-scouting .score-controls button { display: none !important; }
.view-only-mode #view-scouting .score-controls strong,
.external-viewer #view-scouting .score-controls strong {
    width: 54px;
    height: 46px;
    display: grid !important;
    place-items: center;
    box-sizing: border-box;
    border: 2px solid #c8d3cb;
    border-radius: 10px;
    background: #f8faf8;
    box-shadow: inset 0 0 0 1px #fff;
    font-size: clamp(1.55rem, 2.25vw, 2.2rem) !important;
    line-height: 1 !important;
    text-align: center !important;
}
.view-only-mode #view-scouting .score-team,
.external-viewer #view-scouting .score-team {
    justify-items: center !important;
    align-content: center !important;
}
.view-only-mode #view-scouting .score-team-name,
.external-viewer #view-scouting .score-team-name {
    width: 100%;
    text-align: center !important;
}
.view-only-mode #view-scouting .score-card,
.external-viewer #view-scouting .score-card {
    border: 2px solid #b9c8bd !important;
    border-radius: 12px !important;
}

/* Der separate Annahmefehler entfällt: Qualität 0 der Schnellwahl ist die
   einzige Annahmefehler-Eingabe. Für ältere gecachte DOMs wird er ausgeblendet. */
#view-scouting #receptionErrorButton,
#view-scouting .reception-error-button { display: none !important; }
#view-scouting .reception-bottom-actions {
    grid-template-columns: minmax(0, 1.45fr) minmax(96px, 1fr) !important;
}
#view-scouting .reception-action-center { grid-column: 1; }
#view-scouting .reception-front-zone-controls { grid-column: 2; }

/* Qualitätskarten im Ansichtsmodus: jede Liste passt ihre Zeilenhöhe an die
   Anzahl an Einträgen an. Alle sichtbaren Spielerinnen bleiben ohne Scrollen
   auf einen Blick erreichbar. */
.view-only-mode #view-scouting .scouting-side,
.external-viewer #view-scouting .scouting-side {
    grid-template-rows: 122px minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 6px !important;
}
.view-only-mode #view-scouting .stats-card,
.external-viewer #view-scouting .stats-card {
    padding: 6px !important;
}
.view-only-mode #view-scouting .receiver-stats,
.external-viewer #view-scouting .receiver-stats {
    height: calc(100% - 21px) !important;
    margin-top: 3px !important;
    display: grid !important;
    grid-auto-rows: minmax(15px, 1fr) !important;
    align-content: stretch !important;
    gap: 2px !important;
    overflow: hidden !important;
}
.view-only-mode #view-scouting .receiver-stat-row,
.external-viewer #view-scouting .receiver-stat-row {
    min-height: 0 !important;
    height: auto !important;
    padding: 1px 4px !important;
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) auto !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 4px !important;
    border-left-width: 4px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}
.view-only-mode #view-scouting .receiver-stat-summary,
.external-viewer #view-scouting .receiver-stat-summary { display: contents !important; }
.view-only-mode #view-scouting .receiver-stat-number,
.external-viewer #view-scouting .receiver-stat-number {
    grid-column: 1;
    font-size: .78rem !important;
    line-height: 1 !important;
}
.view-only-mode #view-scouting .receiver-stat-name,
.external-viewer #view-scouting .receiver-stat-name {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    font-size: .54rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.view-only-mode #view-scouting .receiver-stat-points,
.external-viewer #view-scouting .receiver-stat-points {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    font-size: .54rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
.view-only-mode #view-scouting .receiver-stat-bar,
.external-viewer #view-scouting .receiver-stat-bar { display: none !important; }
.view-only-mode #view-scouting .receiver-stats.stats-dense-0174,
.external-viewer #view-scouting .receiver-stats.stats-dense-0174 { gap: 1px !important; }
.view-only-mode #view-scouting .receiver-stats.stats-ultra-0174 .receiver-stat-row,
.external-viewer #view-scouting .receiver-stats.stats-ultra-0174 .receiver-stat-row {
    padding-block: 0 !important;
}
.view-only-mode #view-scouting .receiver-stats.stats-ultra-0174 .receiver-stat-number,
.external-viewer #view-scouting .receiver-stats.stats-ultra-0174 .receiver-stat-number { font-size: .68rem !important; }
.view-only-mode #view-scouting .receiver-stats.stats-ultra-0174 .receiver-stat-name,
.external-viewer #view-scouting .receiver-stats.stats-ultra-0174 .receiver-stat-name,
.view-only-mode #view-scouting .receiver-stats.stats-ultra-0174 .receiver-stat-points,
.external-viewer #view-scouting .receiver-stats.stats-ultra-0174 .receiver-stat-points { font-size: .48rem !important; }

@media (max-width: 1050px) {
    #view-scouting #scoutingTeamButton {
        font-size: .66rem !important;
        padding-inline: 8px !important;
    }
    .view-only-mode #view-scouting .scouting-court-area > .combined-volleyball-court,
    .external-viewer #view-scouting .scouting-court-area > .combined-volleyball-court {
        width: min(83%, calc(100% - 82px), calc((100dvh - 210px) * 2)) !important;
        max-width: calc(100% - 82px) !important;
    }
}

/* 0.17.4 Nachkorrektur: In Read-only gibt es keine dritte Bedienzeile in der
   Spielstandskarte. Ohne die frühere Leerzeile sitzt das Scoreboard auch
   vertikal exakt mittig unter der Überschrift. */
.view-only-mode #view-scouting .score-card,
.external-viewer #view-scouting .score-card {
    grid-template-rows: 21px minmax(0, 1fr) !important;
}

/* --------------------------------------------------------------------------
   0.17.5 – Satz-/Läufer-Mini-Karten, Satzabschluss und Libero-Ampelring
   -------------------------------------------------------------------------- */

/* Satzwahl und Läuferwahl sind zwei eigenständige Mini-Karten. Die Farben
   leiten sich aus dem gewählten App-Farbschema ab. */
#view-scouting .scouting-control-card {
    min-width: 0;
    display: flex;
    align-items: center;
    padding: 4px;
    border: 2px solid color-mix(in srgb, var(--primary) 38%, #d7ded9 62%);
    border-radius: 13px;
    background: color-mix(in srgb, var(--surface, #fff) 92%, var(--primary) 8%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 74%, var(--primary) 26%);
}
#view-scouting .runner-control-card {
    border-color: color-mix(in srgb, var(--primary) 52%, #cfd8d1 48%);
}
#view-scouting .set-control-card {
    border-color: color-mix(in srgb, var(--accent) 45%, var(--primary) 55%);
    background: color-mix(in srgb, var(--surface, #fff) 92%, var(--accent) 8%);
}
#view-scouting .set-control-card.previewing {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 64%, var(--accent) 36%), 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}
#view-scouting .scouting-control-card[hidden] { display: none !important; }
#view-scouting .scouting-control-card .viewer-runner-control,
#view-scouting .scouting-control-card .set-button-group {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Zukünftige Sätze sind optisch und technisch gesperrt. Beendete Sätze
   bleiben anwählbar und werden dezent als abgeschlossen markiert. */
#view-scouting .set-button-group button.set-future-0175,
#view-scouting .set-button-group button:disabled {
    opacity: .34;
    cursor: not-allowed;
    filter: grayscale(.3);
}
#view-scouting .set-button-group button.set-finished-0175:not(.active) {
    border-color: color-mix(in srgb, var(--primary) 48%, #cfd8d1 52%);
    background: color-mix(in srgb, var(--primary) 7%, #fff 93%);
}
#view-scouting .set-button-group button.set-live-0175:not(.active) {
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent);
}

/* Alter Satz = reine Vorschau. Satz- und Läufernavigation bleiben bedienbar,
   alle Scouting-/Score-Eingaben sind geschützt. */
.set-preview-mode #view-scouting .combined-volleyball-court .court,
.set-preview-mode #view-scouting .combined-volleyball-court .formation-player-token,
.set-preview-mode #view-scouting .substitution-bench,
.set-preview-mode #view-scouting .libero-parking,
.set-preview-mode #view-scouting .court-bottom-actions,
.set-preview-mode #view-scouting .serve-side-button,
.set-preview-mode #view-scouting .score-controls {
    pointer-events: none !important;
}
.set-preview-mode #view-scouting .combined-volleyball-court { opacity: .985; }

/* Kleiner eigenständiger Satzende-Button direkt im Spielstand. */
#view-scouting .score-card-head-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
#view-scouting .score-set-end-button {
    min-height: 25px;
    padding: 3px 8px;
    border: 1.5px solid color-mix(in srgb, var(--primary) 48%, #cfd8d1 52%);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface, #fff) 90%, var(--primary) 10%);
    color: var(--primary);
    font: inherit;
    font-size: .57rem;
    font-weight: 900;
    white-space: nowrap;
    cursor: pointer;
}
#view-scouting .score-set-end-button:hover:not(:disabled) {
    background: color-mix(in srgb, var(--surface, #fff) 82%, var(--primary) 18%);
}
#view-scouting .score-set-end-button:disabled { opacity: .5; cursor: wait; }
#view-scouting .score-set-end-button[hidden],
.view-only-mode #view-scouting .score-set-end-button,
.external-viewer #view-scouting .score-set-end-button { display: none !important; }

/* Libero in der Annahmequalität: lila/weißes Achteck plus schraffierter Ring
   in der jeweiligen Ampelfarbe der Annahmestatistik. */
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number {
    position: relative;
    z-index: 0;
    width: 34px;
    height: 31px;
    display: grid !important;
    place-items: center;
    justify-self: start;
    overflow: visible !important;
    color: #fff !important;
    font-weight: 950 !important;
    line-height: 1 !important;
    text-align: center;
    isolation: isolate;
}
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::before,
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::after {
    content: "";
    position: absolute;
    clip-path: polygon(29% 0, 71% 0, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0 71%, 0 29%);
    pointer-events: none;
}
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::before {
    inset: -3px;
    z-index: -2;
    background: repeating-linear-gradient(
        135deg,
        var(--stat-color, var(--traffic-neutral)) 0 4px,
        color-mix(in srgb, var(--stat-color, var(--traffic-neutral)) 34%, #fff 66%) 4px 7px
    );
    box-shadow: 0 1px 4px rgba(0,0,0,.16);
}
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::after {
    inset: 2px;
    z-index: -1;
    background: #6f2dbd;
}

.view-only-mode #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175,
.external-viewer #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 {
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number,
.external-viewer #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number {
    width: 27px;
    height: 24px;
    font-size: .69rem !important;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::before,
.external-viewer #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::before { inset: -2px; }
.view-only-mode #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::after,
.external-viewer #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::after { inset: 2px; }

@media (max-width: 1120px) {
    #view-scouting .scouting-control-card { padding: 3px; border-radius: 11px; }
    #view-scouting .score-set-end-button { padding-inline: 6px; font-size: .53rem; }
}

/* Die zusätzliche Satzende-Schaltfläche braucht im Eingabemodus eine etwas
   höhere Kopfzeile. In Read-only bleibt die kompakte 21px-Zeile bestehen. */
#view-scouting .score-card { grid-template-rows: 30px minmax(0, 1fr) !important; }
.view-only-mode #view-scouting .score-card,
.external-viewer #view-scouting .score-card { grid-template-rows: 21px minmax(0, 1fr) !important; }

/* Die älteren Read-only-Regeln bezogen sich auf viewerRunnerControl als direktes
   Toolbar-Kind. Seit 0.17.5 sind Satz und Läufer jeweils in einer Mini-Karte. */
.view-only-mode #view-scouting .scouting-toolbar .scouting-control-card,
.external-viewer #view-scouting .scouting-toolbar .scouting-control-card {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   0.17.6 – persönliche Libero-Farbe je Benutzer
   -------------------------------------------------------------------------- */
:root {
    --libero-color: #6F2DBD;
    --libero-color-dark: #4F168C;
    --libero-color-light: #8750C8;
}

/* Alle bisherigen Libero-Darstellungen verwenden die persönliche Farbe. */
#view-scouting .formation-player-token.libero-player,
#view-scouting .formation-player-token.libero-player.front-row-player,
#view-scouting .formation-player-token.libero-player.back-row-player,
#view-scouting .substitution-bench-player.libero-player,
#view-scouting .substitution-bench-player.libero-player:disabled,
#view-scouting .substitution-bench-player.libero-player:not(:disabled),
#view-scouting .libero-parking-player {
    background-color: var(--libero-color) !important;
    background: var(--libero-color) !important;
    border-color: var(--libero-color-dark) !important;
}
#view-scouting .substitution-bench-player.libero-player:hover:not(:disabled),
#view-scouting .libero-parking-player:hover:not(:disabled) {
    background: var(--libero-color-light) !important;
}
#view-scouting .libero-parking-player.preferred:not(.selected) {
    box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 0 0 5px color-mix(in srgb, var(--libero-color) 38%, transparent), 0 2px 5px rgba(0,0,0,.14);
}
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::after {
    background: var(--libero-color) !important;
}

.libero-color-card {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
}
.libero-color-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.libero-color-presets button {
    width: 38px;
    height: 38px;
    border: 2px solid color-mix(in srgb, var(--swatch) 58%, #667068 42%);
    border-radius: 10px;
    background: var(--swatch);
    cursor: pointer;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}
.libero-color-presets button:hover { transform: translateY(-1px); }
.libero-color-presets button.active {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
.libero-color-custom {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: end;
    gap: 14px;
}
.libero-color-custom > label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
}
.libero-color-custom > label > div {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 7px;
}
.libero-color-custom input[type="color"] {
    width: 52px;
    height: 38px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}
.libero-color-custom input:not([type="color"]) {
    min-width: 0;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-weight: 850;
}
.libero-color-custom input.invalid { border-color:#D64545; background:#FFF2F1; }
.libero-color-preview {
    --preview-libero-color: #6F2DBD;
    --preview-libero-dark: #4F168C;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    clip-path: polygon(24% 0, 76% 0, 100% 24%, 100% 76%, 76% 100%, 24% 100%, 0 76%, 0 24%);
    background: var(--preview-libero-color);
    border: 4px solid var(--preview-libero-dark);
    color: #fff;
    font-size: 1.35rem;
    font-weight: 1000;
    text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
@media (max-width: 720px) {
    .libero-color-custom { grid-template-columns: 1fr; align-items: start; }
}

/* --------------------------------------------------------------------------
   0.17.7 – administrierbare Spielmodi
   -------------------------------------------------------------------------- */
#view-game-modes { min-height:0; }
.game-modes-page {
    height:100%;
    min-height:0;
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr);
    gap:8px;
    overflow:hidden;
}
.game-mode-settings-grid {
    min-height:0;
    display:grid;
    grid-template-columns:minmax(250px,.78fr) minmax(430px,1.55fr);
    gap:10px;
    overflow:hidden;
}
.game-mode-list-card,
.game-mode-editor-card {
    min-height:0;
    display:flex;
    flex-direction:column;
    gap:9px;
    overflow:hidden;
}
.game-mode-list {
    min-height:0;
    display:grid;
    grid-auto-rows:min-content;
    gap:6px;
    overflow:auto;
    padding:1px 2px 2px;
}
.game-mode-list-item {
    width:100%;
    min-width:0;
    display:grid;
    gap:2px;
    text-align:left;
    padding:9px 10px;
    border:1px solid var(--border);
    border-radius:9px;
    background:var(--surface);
    color:var(--ink);
    cursor:pointer;
}
.game-mode-list-item strong { font-size:.7rem; color:var(--primary-dark); }
.game-mode-list-item span { font-size:.56rem; font-weight:800; color:var(--muted); line-height:1.3; }
.game-mode-list-item:hover { border-color:color-mix(in srgb, var(--primary) 42%, var(--border)); }
.game-mode-list-item.active {
    border-color:var(--primary);
    background:var(--primary-soft);
    box-shadow:inset 3px 0 0 var(--primary);
}
.game-mode-editor-fields {
    display:grid;
    grid-template-columns:minmax(210px,1.3fr) minmax(125px,.65fr) minmax(155px,.8fr);
    gap:8px;
    align-items:end;
}
.game-mode-editor-fields > label,
.game-mode-points > label {
    min-width:0;
    display:grid;
    gap:4px;
    color:var(--muted);
    font-size:.58rem;
    font-weight:900;
}
.game-mode-editor-fields input:not([type="checkbox"]),
.game-mode-editor-fields select,
.game-mode-points input,
.game-fields select,
.game-manage-fields select,
#gameManageMode {
    width:100%;
    min-width:0;
    height:31px;
    border:1px solid var(--border);
    border-radius:7px;
    background:var(--surface);
    color:var(--ink);
    padding:0 8px;
    font:inherit;
    font-size:.64rem;
    font-weight:850;
}
.game-mode-check {
    display:flex !important;
    grid-column:span 1;
    flex-direction:row !important;
    align-items:center;
    gap:7px !important;
    min-height:31px;
    padding:0 8px;
    border:1px solid var(--border);
    border-radius:7px;
    background:var(--page-bg);
}
.game-mode-check input { width:17px; height:17px; margin:0; accent-color:var(--primary); }
.game-mode-check span { color:var(--ink); font-size:.59rem; line-height:1.2; }
.game-mode-points-head {
    display:flex;
    align-items:baseline;
    justify-content:space-between;
    gap:10px;
    padding-top:3px;
    border-top:1px solid var(--border);
}
.game-mode-points-head strong { font-size:.66rem; color:var(--primary-dark); }
.game-mode-points-head span { font-size:.55rem; font-weight:750; color:var(--muted); }
.game-mode-points {
    display:grid;
    grid-template-columns:repeat(5,minmax(76px,1fr));
    gap:7px;
}
.game-mode-points label[hidden] { display:none !important; }
.game-mode-points input { text-align:center; font-size:.75rem; }
.game-mode-editor-actions {
    margin-top:auto;
    display:flex;
    justify-content:flex-end;
    gap:8px;
    padding-top:4px;
}
.game-mode-help {
    margin:0;
    padding:7px 9px;
    border-radius:8px;
    background:var(--page-bg);
    color:var(--muted);
    font-size:.55rem;
    font-weight:750;
    line-height:1.35;
}
/* Das neue Spiel besitzt seit 0.17.7 fünf Felder: Modus, Gegner, Datum,
   Notiz und Start. Alle bleiben in einer Zeile, solange genug Platz da ist. */
.game-create > .game-fields {
    grid-template-columns:minmax(190px,1.2fr) minmax(165px,1fr) 132px minmax(145px,.85fr) max-content !important;
}
.game-fields select { height:29px !important; }
#gameManageModeHint { display:block; margin-top:3px; color:var(--muted); font-size:.54rem; font-weight:750; }

@media (max-width: 1120px) {
    .game-mode-settings-grid { grid-template-columns:minmax(220px,.72fr) minmax(380px,1.35fr); }
    .game-mode-editor-fields { grid-template-columns:1fr 125px; }
    .game-mode-check { grid-column:span 1; }
    .game-create > .game-fields { grid-template-columns:minmax(170px,1fr) minmax(150px,1fr) 125px max-content !important; height:auto !important; }
    .game-create > .game-fields .game-notes { display:none; }
}
@media (max-width: 820px) {
    .game-modes-page { overflow:auto; }
    .game-mode-settings-grid { grid-template-columns:1fr; overflow:visible; }
    .game-mode-list { max-height:230px; }
    .game-mode-editor-fields { grid-template-columns:1fr 1fr; }
    .game-mode-points { grid-template-columns:repeat(3,minmax(72px,1fr)); }
    .game-create > .game-fields {
        grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
        grid-auto-rows:auto !important;
        height:auto !important;
    }
    .game-create > .game-fields .game-notes { display:grid; grid-column:auto !important; }
    .game-create > .game-fields .primary-action { grid-column:2 !important; }
}

/* --------------------------------------------------------------------------
   0.17.8 – Libero: Annahme-Ampelfarbe nur am Feld, nicht in der Statistik
   -------------------------------------------------------------------------- */

/* In der Annahmequalitätsliste ist das Achteck ausschließlich die Libero-
   Kennzeichnung. Die Ampelfarbe der Annahmestatistik wird dort bewusst nicht
   noch einmal als Ring/Schraffur gezeigt. */
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 {
    border-left-color: transparent !important;
}
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::before {
    inset: 0 !important;
    background: var(--libero-color) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.16) !important;
}
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::after {
    display: none !important;
}

/* Auf dem Volleyballfeld entspricht die sichtbare Außenkante des Libero-
   Achtecks dagegen exakt derselben Ampelfarbe wie die Umrandung der übrigen
   Spielerinnen. Die persönliche Libero-Farbe bleibt als innere Fläche
   erhalten. Zwei übereinanderliegende Achtecke erzeugen eine durchgehende,
   nicht schraffierte Qualitätsumrandung. */
#view-scouting .formation-player-token.libero-player,
#view-scouting .formation-player-token.libero-player.front-row-player,
#view-scouting .formation-player-token.libero-player.back-row-player {
    position: absolute;
    isolation: isolate;
    border: 0 !important;
    background: var(--player-quality-color, var(--traffic-neutral)) !important;
    background-color: var(--player-quality-color, var(--traffic-neutral)) !important;
    color: #fff !important;
}
#view-scouting .formation-player-token.libero-player::before,
#view-scouting .formation-player-token.libero-player.front-row-player::before,
#view-scouting .formation-player-token.libero-player.back-row-player::before {
    content: "";
    position: absolute;
    inset: 5px;
    z-index: -1;
    pointer-events: none;
    clip-path: polygon(24% 0, 76% 0, 100% 24%, 100% 76%, 76% 100%, 24% 100%, 0 76%, 0 24%);
    background: var(--libero-color) !important;
}

/* Read-only verwendet dieselbe Feldlogik: keine separate Schraffur in der
   Liste, aber die durchgehende Qualitätskante direkt am Libero im Court. */
.view-only-mode #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::before,
.external-viewer #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::before {
    inset: 0 !important;
}

/* --------------------------------------------------------------------------
   0.17.9 – Libero-Schriftfarbe + Ampelfarbe der Statistik nur an der Kachel
   -------------------------------------------------------------------------- */
:root {
    --libero-text-color: #FFFFFF;
}

/* Die persönliche Schriftfarbe gilt überall, wo die Libero-Nummer erscheint. */
#view-scouting .formation-player-token.libero-player,
#view-scouting .formation-player-token.libero-player.front-row-player,
#view-scouting .formation-player-token.libero-player.back-row-player,
#view-scouting .substitution-bench-player.libero-player,
#view-scouting .substitution-bench-player.libero-player:disabled,
#view-scouting .substitution-bench-player.libero-player:not(:disabled),
#view-scouting .libero-parking-player,
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number {
    color: var(--libero-text-color) !important;
}

/* In der Annahmequalitätsliste bleibt die normale Ampelfarbe links an der
   gesamten Statistik-Kachel erhalten. Das Libero-Achteck selbst bekommt dort
   ausdrücklich KEINEN Ampelring. */
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 {
    border-left: 6px solid var(--stat-color, var(--traffic-neutral)) !important;
}
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::before {
    inset: 0 !important;
    background: var(--libero-color) !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.16) !important;
}
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::after {
    display: none !important;
}

/* Farbverwaltung: Hintergrund und Schrift sind zwei klar getrennte Bereiche. */
.libero-color-section {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--border) 82%, var(--primary) 18%);
    border-radius: 11px;
    background: color-mix(in srgb, var(--surface) 96%, var(--primary) 4%);
}
.libero-color-section > strong {
    font-size: .72rem;
    color: var(--text);
}
.libero-color-preview {
    --preview-libero-text-color: #FFFFFF;
    color: var(--preview-libero-text-color) !important;
}

/* Sehr helle Farbfelder bleiben in der Presetauswahl sichtbar. */
.libero-color-presets button {
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.32), 0 0 0 1px rgba(0,0,0,.08);
}

/* --------------------------------------------------------------------------
   0.17.10 – Annahmetrends, Korridor-Auswertung und Null-Annahme-Kennzeichnung
   -------------------------------------------------------------------------- */

/* Spielerinnen ohne einzige Annahme bleiben bewusst nur sehr fein umrandet.
   Erst nach der ersten Annahme greift wieder die bisherige kräftige Ampelkante. */
#view-scouting .formation-player-token.no-reception-yet-01710:not(.libero-player) {
    border-width: 1.5px !important;
    border-color: var(--traffic-neutral) !important;
}
#view-scouting .formation-player-token.libero-player.no-reception-yet-01710::before,
#view-scouting .formation-player-token.libero-player.front-row-player.no-reception-yet-01710::before,
#view-scouting .formation-player-token.libero-player.back-row-player.no-reception-yet-01710::before {
    inset: 1.5px !important;
}

/* Gleitender Durchschnitt in der rechten Annahmequalitätskarte. */
#view-scouting #receiverStats .receiver-stat-detail-01710 {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 6px;
}
#view-scouting #receiverStats .receiver-stat-detail-01710 .receiver-stat-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#view-scouting #receiverStats .receiver-stat-trend-01710 {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    white-space: nowrap;
    font-size: .62rem;
    line-height: 1;
}
#view-scouting #receiverStats .receiver-stat-trend-01710 strong {
    font-size: .64rem;
    font-weight: 950;
    color: currentColor;
}
#view-scouting #receiverStats .receiver-stat-trend-arrow-01710 {
    font-size: .95rem;
    line-height: .75;
    font-weight: 1000;
}
#view-scouting #receiverStats .receiver-stat-trend-01710.trend-up { color: #138A3D; }
#view-scouting #receiverStats .receiver-stat-trend-01710.trend-flat { color: #B48700; }
#view-scouting #receiverStats .receiver-stat-trend-01710.trend-down { color: #C9342D; }

/* Annahmeauswertung: Spaltenüberschriften stehen einmal oberhalb der Liste. */
#evaluationReceptionPanel {
    min-width: 0;
}
.reception-evaluation-columns {
    display: grid;
    grid-template-columns: 48px minmax(145px,1fr) 78px 70px 88px 104px 104px 104px;
    gap: 7px;
    align-items: end;
    padding: 1px 15px 4px 14px;
    color: var(--muted);
    font-size: .58rem;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}
.reception-evaluation-columns .reception-eval-col-player {
    grid-column: 1 / 3;
    padding-left: 3px;
}
.reception-evaluation-columns span:not(.reception-eval-col-player) {
    text-align: center;
}
.reception-evaluation-row.reception-evaluation-row-01710 {
    grid-template-columns: 48px minmax(145px,1fr) 78px 70px 88px 104px 104px 104px !important;
    gap: 7px !important;
}
.reception-evaluation-row-01710 .reception-eval-metric {
    justify-content: center;
}
.reception-evaluation-row-01710 .reception-eval-metric strong {
    font-size: clamp(.78rem, 1.08vw, .98rem);
}
.reception-evaluation-row-01710 .reception-eval-percent {
    justify-self: center !important;
    text-align: center;
}
.reception-eval-corridor-01710 {
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    font-size: clamp(.62rem, .82vw, .75rem);
    font-weight: 900;
    color: #202720;
}
.reception-evaluation-row-01710.unrated .reception-eval-corridor-01710 {
    color: var(--muted);
}

/* Persönliche Trend-Einstellung. */
.reception-trend-settings-card {
    min-height: 135px;
    display: grid;
    align-content: start;
    gap: 9px;
}
.reception-trend-settings-card > p {
    margin: 0;
    color: var(--muted);
    font-size: .68rem;
    line-height: 1.35;
}
.reception-trend-window-label {
    display: grid;
    grid-template-columns: minmax(0,1fr) 82px;
    align-items: center;
    gap: 8px;
    font-size: .68rem;
    font-weight: 900;
}
.reception-trend-window-label input {
    width: 82px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    text-align: center;
    font: inherit;
    font-size: .76rem;
}
.reception-trend-settings-card .primary-action {
    min-height: 34px;
}

@media (max-width: 1180px) {
    .reception-evaluation-columns,
    .reception-evaluation-row.reception-evaluation-row-01710 {
        grid-template-columns: 42px minmax(120px,1fr) 64px 58px 76px 88px 88px 88px !important;
        gap: 5px !important;
    }
    .reception-eval-corridor-01710 { font-size: .58rem; }
}

@media (max-width: 860px) {
    #evaluationReceptionPanel { overflow-x: auto !important; }
    .reception-evaluation-head,
    .reception-evaluation-columns,
    .reception-evaluation-list { min-width: 720px; }
}

/* In der kompakten Ansichtsseite bleibt der Trend in derselben Zeile wie der
   Name, damit die dynamisch verdichteten Qualitätslisten nicht höher werden. */
.view-only-mode #view-scouting #receiverStats .receiver-stat-detail-01710,
.external-viewer #view-scouting #receiverStats .receiver-stat-detail-01710 {
    grid-column: 2;
    grid-row: 1;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 3px;
    min-width: 0;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-detail-01710 .receiver-stat-name,
.external-viewer #view-scouting #receiverStats .receiver-stat-detail-01710 .receiver-stat-name {
    grid-column: 1 !important;
    grid-row: 1 !important;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-trend-01710,
.external-viewer #view-scouting #receiverStats .receiver-stat-trend-01710 {
    grid-column: 2;
    grid-row: 1;
    font-size: .46rem;
    gap: 1px;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-trend-01710 strong,
.external-viewer #view-scouting #receiverStats .receiver-stat-trend-01710 strong { font-size: .46rem; }
.view-only-mode #view-scouting #receiverStats .receiver-stat-trend-arrow-01710,
.external-viewer #view-scouting #receiverStats .receiver-stat-trend-arrow-01710 { font-size: .68rem; }

/* 0.17.11 – Versionsnummer als ruhige Statusplakette statt gequetscht oben links. */
.version-stamp { display: none !important; }
.app-version-badge {
    height: 28px;
    padding: 0 8px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: rgba(0,0,0,.08);
    color: rgba(255,255,255,.88);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .58rem;
    line-height: 1;
    font-weight: 850;
    letter-spacing: .02em;
    white-space: nowrap;
    flex: 0 0 auto;
}
@media (max-width: 900px) {
    .app-version-badge { padding: 0 6px; font-size: .52rem; }
}

/* --------------------------------------------------------------------------
   0.17.12 – vollständige Annahme-Korrektur 0–3 und kollisionsfreie K1-Leiste
   -------------------------------------------------------------------------- */
/* Die linke Court-Hälfte bekommt drei klar getrennte Bedienbereiche:
   Qualitätskorrektur | Kein-K1-Angriff | eigener Fehler. Dadurch kann der
   Kein-K1-Button nicht mehr unter den Fehlerbutton rutschen. */
#view-scouting .reception-bottom-actions {
    grid-template-columns: minmax(170px, 1fr) minmax(145px, .9fr) minmax(170px, 1fr) !important;
    column-gap: 8px !important;
}
#view-scouting .reception-bottom-actions > .reception-action-center {
    grid-column: 1 / 3 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 35px !important;
    padding: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(170px, 1fr) minmax(145px, .9fr) !important;
    gap: 8px !important;
    align-items: stretch !important;
    overflow: visible !important;
}
#view-scouting .reception-front-zone-controls {
    grid-column: 3 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    height: 35px !important;
    display: block !important;
}
#view-scouting .reception-front-zone-controls > .manual-team-error-button {
    width: 100% !important;
    min-width: 0 !important;
    height: 35px !important;
}
#view-scouting .reception-action-center > .reception-quick-quality,
#view-scouting .reception-action-center > #receptionQualityOverride {
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}
#view-scouting #receptionQualityOverride {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 4px !important;
    padding: 2px !important;
}
#view-scouting #receptionQualityOverride[hidden] { display: none !important; }
#view-scouting #receptionQualityOverride > span { display: none !important; }
#view-scouting #receptionQualityOverride > button {
    width: 100% !important;
    min-width: 0 !important;
    height: 31px !important;
    padding: 0 !important;
}
#view-scouting #noK1AttackButton {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 35px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    position: relative !important;
    z-index: 2 !important;
}
#view-scouting #noK1AttackButton[hidden] { display: none !important; }

/* Auf schmaleren Ansichten bleiben alle vier Qualitätswerte erhalten. Die
   Spalten dürfen schrumpfen, aber kein Wert wird ausgeblendet. */
@media (max-width: 1180px) {
    #view-scouting .reception-bottom-actions {
        grid-template-columns: minmax(132px, 1fr) minmax(118px, .85fr) minmax(132px, 1fr) !important;
        column-gap: 5px !important;
    }
    #view-scouting .reception-bottom-actions > .reception-action-center {
        grid-template-columns: minmax(132px, 1fr) minmax(118px, .85fr) !important;
        gap: 5px !important;
    }
    #view-scouting #noK1AttackButton { font-size: .52rem !important; padding-inline: 5px !important; }
}

/* --------------------------------------------------------------------------
   0.17.14 – Annahmefarben nur in Annahme + dezente K1/K2-Anzeige
   -------------------------------------------------------------------------- */

/* In der Angriffssituation dürfen Annahmequalitäten keinen visuellen Status
   mehr transportieren. Normale Spielerinnen erhalten deshalb unabhängig von
   ihrer bisherigen Annahmestatistik dieselbe neutrale Feldkante. */
#view-scouting .combined-volleyball-court.attack-situation-01713 .formation-player-token:not(.libero-player) {
    --player-quality-color: var(--traffic-neutral) !important;
    --player-quality-soft: rgba(122, 133, 128, .12) !important;
    border-width: 4px !important;
    border-color: var(--traffic-neutral) !important;
    background:
        linear-gradient(rgba(122, 133, 128, .12), rgba(122, 133, 128, .12)),
        #fff !important;
}

/* Die Zuspielerin bleibt als einzige positionsbezogene Hervorhebung blau.
   Ihre innere Spielerfläche ist trotzdem neutral und zeigt keine Annahmefarbe. */
#view-scouting .combined-volleyball-court.attack-situation-01713 .formation-player-token.setter-on-court:not(.libero-player) {
    box-shadow: 0 0 0 4px #1976d2, 0 2px 7px rgba(0,0,0,.16) !important;
}

/* Liberos behalten ihre persönliche Identitätsfarbe und Achteckform, verlieren
   in K1/K2 aber vollständig den Annahmequalitäts-Außenring. */
#view-scouting .combined-volleyball-court.attack-situation-01713 .formation-player-token.libero-player,
#view-scouting .combined-volleyball-court.attack-situation-01713 .formation-player-token.libero-player.front-row-player,
#view-scouting .combined-volleyball-court.attack-situation-01713 .formation-player-token.libero-player.back-row-player {
    border: 0 !important;
    background: var(--libero-color) !important;
    background-color: var(--libero-color) !important;
    color: var(--libero-text-color) !important;
}
#view-scouting .combined-volleyball-court.attack-situation-01713 .formation-player-token.libero-player::before,
#view-scouting .combined-volleyball-court.attack-situation-01713 .formation-player-token.libero-player.front-row-player::before,
#view-scouting .combined-volleyball-court.attack-situation-01713 .formation-player-token.libero-player.back-row-player::before {
    inset: 0 !important;
    background: var(--libero-color) !important;
}

/* K1/K2 steht als reine Orientierung im rechten Hinterfeld. Das Element liegt
   optisch unter Zielmarker/Rally-Pfeilen und fängt niemals Klicks oder Touch ab. */
#view-scouting .attack-court-frame .attack-phase-indicator-01713 {
    position: absolute;
    left: 73%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none !important;
    user-select: none;
    touch-action: none;
    min-width: 1.75em;
    padding: .05em .18em .08em;
    border: 2px solid rgba(80, 94, 87, .10);
    border-radius: .22em;
    background: rgba(225, 229, 226, .12);
    color: rgba(66, 78, 72, .17);
    font-size: clamp(2.8rem, 5.1vw, 5.8rem);
    line-height: 1;
    font-weight: 1000;
    letter-spacing: .025em;
    text-align: center;
}
#view-scouting .attack-court-frame .attack-phase-indicator-01713[hidden] {
    display: none !important;
}

/* --------------------------------------------------------------------------
   0.17.14 – Fehlerbuttons am Netz kollisionsfrei
   -------------------------------------------------------------------------- */
/* Die beiden Teamfehler-Schaltflächen liegen direkt beidseits der Mittellinie.
   Sie bekommen jeweils einen kleinen Innenabstand zur Netz-/Court-Grenze und
   dürfen ihren eigenen Court-Slot nicht mehr überragen. */
#view-scouting .reception-bottom-actions,
#view-scouting .attack-bottom-actions {
    box-sizing: border-box !important;
}
#view-scouting .reception-front-zone-controls,
#view-scouting .attack-front-zone-controls {
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
#view-scouting .reception-front-zone-controls {
    padding-right: 6px !important;
}
#view-scouting .attack-front-zone-controls {
    padding-left: 6px !important;
}
#view-scouting #leftTeamErrorButton,
#view-scouting #rightTeamErrorButton {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    position: relative !important;
    transform: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    padding-inline: 8px !important;
    font-size: clamp(.50rem, .64vw, .63rem) !important;
}
#view-scouting #leftTeamErrorButton { justify-self: stretch !important; }
#view-scouting #rightTeamErrorButton { justify-self: stretch !important; }


/* --------------------------------------------------------------------------
   0.17.18 – persönliche Schriftgröße der Nummer am Angriffspfeil
   -------------------------------------------------------------------------- */
.attack-arrow-label-settings-card {
    min-height: 150px;
    display: grid;
    align-content: start;
    gap: 9px;
}
.attack-arrow-label-settings-card > p {
    margin: 0;
    color: var(--muted);
    font-size: .68rem;
    line-height: 1.35;
}
.attack-arrow-label-size-control {
    display: grid;
    grid-template-columns: minmax(120px,1fr) auto;
    gap: 12px;
    align-items: center;
}
.attack-arrow-label-size-control > input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}
.attack-arrow-label-size-control label {
    display: grid;
    grid-template-columns: auto 62px auto;
    gap: 5px;
    align-items: center;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
}
.attack-arrow-label-size-control input[type="number"] {
    width: 62px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    text-align: center;
    font: inherit;
    font-size: .76rem;
}
.attack-arrow-label-preview {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: color-mix(in srgb, var(--surface) 92%, var(--primary) 8%);
    color: var(--muted);
    font-size: .66rem;
    font-weight: 800;
}
.attack-arrow-label-preview b {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    color: var(--ink);
    line-height: 1;
    font-weight: 950;
    text-shadow: 0 0 2px #fff, 0 0 2px #fff;
}
@media (max-width: 760px) {
    .attack-arrow-label-size-control { grid-template-columns: 1fr; gap: 6px; }
}


/* --------------------------------------------------------------------------
   0.17.19 – kompakte Qualitätskorrektur und kollisionsfreie K1-Fehlerleiste
   -------------------------------------------------------------------------- */
/* Die linke Bedienhälfte darf ihre Court-Breite nie überschreiten. Die drei
   Funktionsbereiche teilen sich den verfügbaren Raum ohne feste Mindestbreiten. */
#view-scouting .reception-bottom-actions {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    grid-template-columns: minmax(0,.92fr) minmax(0,1.02fr) minmax(0,1.28fr) !important;
    column-gap: 6px !important;
    overflow: hidden !important;
}
#view-scouting .reception-bottom-actions > .reception-action-center {
    grid-column: 1 / 3 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(0,.92fr) minmax(0,1.02fr) !important;
    gap: 6px !important;
    padding: 0 !important;
    overflow: hidden !important;
}
#view-scouting .reception-front-zone-controls {
    grid-column: 3 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}
#view-scouting #leftTeamErrorButton {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 35px !important;
    padding: 0 7px !important;
    font-size: clamp(.48rem,.60vw,.60rem) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
#view-scouting #noK1AttackButton {
    grid-column: 2 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 35px !important;
    padding: 0 6px !important;
    box-sizing: border-box !important;
    font-size: clamp(.50rem,.61vw,.60rem) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Nach einer Annahme existieren genau drei alternative Qualitätswerte. Die
   Korrekturkarte schrumpft deshalb auf diese drei Buttons statt eine leere
   vierte Spalte bzw. die komplette Bedienzelle zu reservieren. */
#view-scouting #receptionQualityOverride {
    grid-column: 1 !important;
    grid-row: 1 !important;
    justify-self: start !important;
    width: max-content !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 35px !important;
    padding: 2px 3px !important;
    display: grid !important;
    grid-template-columns: repeat(3, 43px) !important;
    gap: 4px !important;
    border-radius: 9px !important;
    box-sizing: border-box !important;
}
#view-scouting #receptionQualityOverride[hidden] { display: none !important; }
#view-scouting #receptionQualityOverride > button {
    width: 43px !important;
    min-width: 43px !important;
    max-width: 43px !important;
    height: 31px !important;
}
/* Normale Erfassung mit vier Qualitäten bleibt vollständig sichtbar. */
#view-scouting #receptionQuickQuality {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
}

@media (max-width: 1100px) {
    #view-scouting .reception-bottom-actions {
        grid-template-columns: minmax(0,.82fr) minmax(0,.98fr) minmax(0,1.35fr) !important;
        column-gap: 4px !important;
    }
    #view-scouting .reception-bottom-actions > .reception-action-center {
        grid-template-columns: minmax(0,.82fr) minmax(0,.98fr) !important;
        gap: 4px !important;
    }
    #view-scouting #receptionQualityOverride {
        grid-template-columns: repeat(3, 38px) !important;
    }
    #view-scouting #receptionQualityOverride > button {
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
    }
}


/* --------------------------------------------------------------------------
   0.17.24 – Pfeilstil-Legenden und Auswertung nach Zuspielposition
   -------------------------------------------------------------------------- */
.k1-runner-card-01723,
.setter-position-card-01723 {
    position: relative !important;
}

.attack-style-legend-01723 {
    position: absolute;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 3px 5px;
    border: 1px solid rgba(120, 135, 126, .28);
    border-radius: 6px;
    background: rgba(255,255,255,.88);
    box-shadow: 0 2px 7px rgba(35, 48, 40, .08);
    pointer-events: none;
}

.k1-style-legend-01723,
.setter-style-legend-01723 {
    left: 5px;
    top: 42px;
}

.attack-style-legend-item-01723 {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 10px;
    color: #26332d;
    font-size: .52rem;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.attack-style-legend-item-01723 b {
    font-size: .56rem;
    font-weight: 950;
}

.attack-style-swatch-01723 {
    width: 24px;
    height: 0;
    border-top: 3px solid #59665f;
}
.attack-style-swatch-01723.style-1 { border-top-style: dashed; }
.attack-style-swatch-01723.style-2 { border-top-style: dotted; }
.attack-style-swatch-01723.style-3 {
    height: 3px;
    border-top: 0;
    background: repeating-linear-gradient(to right, #59665f 0 8px, transparent 8px 12px, #59665f 12px 14px, transparent 14px 18px);
}

#evaluationSetterPositionPanel {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
}

.setter-position-grid-01723 {
    position: relative;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: 10px;
    padding: 0 7px 6px;
    overflow: hidden;
}

.setter-position-card-01723 {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: 50px minmax(0, 1fr) !important;
    gap: 3px !important;
    padding: 7px !important;
    overflow: hidden !important;
}

.setter-position-head-01723 {
    min-width: 0 !important;
    height: 50px !important;
}

.setter-position-head-01723 .eval-head-top {
    grid-template-columns: minmax(125px, 1fr) auto auto !important;
    gap: 8px !important;
}

.setter-position-head-01723 .eval-head-top > strong {
    font-size: 1rem !important;
    white-space: nowrap;
}

.setter-position-head-01723 .eval-head-top > span {
    font-size: .62rem !important;
    font-weight: 850 !important;
    color: var(--muted) !important;
    white-space: nowrap;
}

.setter-position-head-01723 .eval-head-top > b {
    font-size: .72rem !important;
    white-space: nowrap;
}

.setter-position-card-01723 > .evaluation-court-svg {
    width: auto !important;
    height: 96% !important;
    max-width: 96% !important;
    max-height: 96% !important;
    align-self: start !important;
    justify-self: center !important;
    overflow: visible !important;
}

.setter-position-note-01723 {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    z-index: 6;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: rgba(255,255,255,.92);
    color: var(--muted);
    font-size: .56rem;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .setter-position-grid-01723 { gap: 6px; padding-inline: 4px; }
    .setter-position-card-01723 { padding: 4px !important; grid-template-rows: 44px minmax(0,1fr) !important; }
    .setter-position-head-01723 { height: 44px !important; }
    .setter-position-head-01723 .eval-head-top { grid-template-columns: minmax(95px,1fr) auto !important; }
    .setter-position-head-01723 .eval-head-top > span { display: none; }
    .setter-position-head-01723 .eval-head-top > strong { font-size: .8rem !important; }
    .setter-position-card-01723 > .evaluation-court-svg { max-width: 99% !important; height: 98% !important; }
    .k1-style-legend-01723, .setter-style-legend-01723 { top: 36px; left: 3px; }
}

@media (max-height: 760px) {
    .setter-position-card-01723 { grid-template-rows: 40px minmax(0,1fr) !important; padding: 4px !important; }
    .setter-position-head-01723 { height: 40px !important; }
    .setter-position-card-01723 > .evaluation-court-svg { height: 99% !important; max-height: 99% !important; }
    .attack-style-legend-01723 { padding: 2px 4px; gap: 1px; }
    .k1-style-legend-01723, .setter-style-legend-01723 { top: 33px; }
}

/* --------------------------------------------------------------------------
   0.17.24 – Spielbericht-Farben und Feldeditor für letzte Aktionen
   -------------------------------------------------------------------------- */

.report-player-table .report-stat-error {
    color: #d83228 !important;
    font-weight: 1000 !important;
}
.report-player-table .report-stat-point {
    color: #0b9237 !important;
    font-weight: 1000 !important;
}

/* Der neue Aktionseditor braucht horizontal genügend Platz für ein echtes
   Volleyballfeld. Auf schmalen Geräten fällt er automatisch auf die Viewportbreite zurück. */
.action-edit-card {
    width: min(1080px, calc(100vw - 24px)) !important;
    max-height: calc(100vh - 20px) !important;
}
.action-edit-body {
    max-height: calc(100vh - 132px) !important;
}
.action-edit-grid-01724 {
    grid-template-columns: minmax(280px, 1.5fr) minmax(230px, .85fr) minmax(180px, .65fr) !important;
    align-items: stretch;
}
.action-court-panel {
    margin-top: 8px;
    padding: 10px !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    background: #f8faf8 !important;
    display: grid !important;
    gap: 8px !important;
}
.action-court-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    color: #243029;
}
.action-court-title-row strong {
    font-size: .78rem;
    font-weight: 1000;
}
.action-court-title-row span {
    font-size: .58rem;
    color: var(--muted);
    font-weight: 850;
    text-align: right;
}

/* Angriff: zwei echte 9x9-m-Hälften mit Netz in der Mitte. */
.action-volleyball-pair-01724 {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) 5px minmax(0,1fr);
    width: 100%;
    aspect-ratio: 2 / .78;
    min-height: 260px;
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
}
.action-court-half-01724 {
    position: relative;
    min-width: 0;
    cursor: crosshair;
    border: 3px solid #078531;
    background:
        linear-gradient(to right, transparent calc(33.333% - .7px), rgba(3,130,48,.20) 33.333%, transparent calc(33.333% + .7px)),
        linear-gradient(to right, transparent calc(66.666% - .7px), rgba(3,130,48,.20) 66.666%, transparent calc(66.666% + .7px)),
        linear-gradient(to bottom, transparent calc(33.333% - .7px), rgba(3,130,48,.14) 33.333%, transparent calc(33.333% + .7px)),
        linear-gradient(to bottom, transparent calc(66.666% - .7px), rgba(3,130,48,.14) 66.666%, transparent calc(66.666% + .7px)),
        #f7fbf8;
    z-index: 1;
}
.action-source-half-01724 { border-right-width: 2px; border-radius: 10px 0 0 10px; }
.action-target-half-01724 { border-left-width: 2px; border-radius: 0 10px 10px 0; }
.action-net-01724 {
    position: relative;
    z-index: 5;
    width: 5px;
    background: #083b1b;
    box-shadow: 0 0 0 1px rgba(255,255,255,.8);
}
.action-three-meter-01724 {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(6,139,50,.75);
    pointer-events: none;
}
.action-three-meter-01724.left { left: 66.666%; }
.action-three-meter-01724.right { left: 33.333%; }
.action-half-label-01724 {
    position: absolute;
    top: 7px;
    left: 8px;
    z-index: 7;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255,255,255,.86);
    color: #53615a;
    font-size: .54rem;
    font-weight: 950;
    pointer-events: none;
}
.action-raw-source-01724,
.action-normalized-source-01724,
.action-target-dot-01724 {
    position: absolute;
    transform: translate(-50%,-50%);
    z-index: 8;
    pointer-events: none;
}
.action-raw-source-01724 {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    border: 3px solid #26332d;
    background: rgba(255,255,255,.82);
    box-shadow: 0 0 0 2px rgba(255,255,255,.75);
}
.action-normalized-source-01724 {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #17211b;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,.85);
    font-size: .5rem;
    font-weight: 1000;
}
.action-target-dot-01724 {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #17211b;
    box-shadow: 0 0 0 3px rgba(255,255,255,.88);
}
.action-out-badge-01724 {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 8;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fde9e7;
    color: #be2f27;
    font-size: .58rem;
    font-weight: 1000;
}
.action-arrow-svg-01724 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 6;
    pointer-events: none;
    overflow: visible;
}
.action-main-arrow-01724 {
    stroke-width: 11px;
    stroke-linecap: round;
    opacity: .88;
}
.action-normalization-link-01724 {
    stroke: #59675f;
    stroke-width: 4px;
    stroke-dasharray: 12 10;
    opacity: .58;
}
.action-court-help-01724 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    color: var(--muted);
    font-size: .53rem;
    font-weight: 800;
}
.action-court-help-01724 .raw-key { color: #34433b; }
.action-court-help-01724 .normalized-key { color: #17211b; }
.action-out-buttons-01724 {
    justify-content: flex-end;
}

/* Annahme: Spielerposition und Ziel liegen in derselben Feldhälfte; die
   gespeicherten Annahmezonen werden direkt darunter als SVG eingeblendet. */
.action-reception-mode-01724 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.action-reception-mode-01724 button {
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: .6rem;
    font-weight: 950;
}
.action-reception-mode-01724 button.active {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
}
.action-reception-mode-01724 button:disabled { opacity: .42; }
.action-reception-court-01724 {
    position: relative;
    width: min(760px, 100%);
    aspect-ratio: 1.55 / 1;
    justify-self: start;
    border: 3px solid #078531;
    border-radius: 10px;
    background: #f7fbf8;
    overflow: hidden;
    cursor: crosshair;
}
.action-reception-zones-01724,
.action-reception-line-svg-01724,
.action-reception-grid-01724 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.action-reception-zones-01724 { z-index: 1; opacity: .62; }
.action-reception-grid-01724 {
    z-index: 2;
    background:
        linear-gradient(to right, transparent calc(33.333% - .7px), rgba(4,135,49,.24) 33.333%, transparent calc(33.333% + .7px)),
        linear-gradient(to right, transparent calc(66.666% - .7px), rgba(4,135,49,.24) 66.666%, transparent calc(66.666% + .7px)),
        linear-gradient(to bottom, transparent calc(50% - .7px), rgba(4,135,49,.24) 50%, transparent calc(50% + .7px));
}
.action-reception-line-svg-01724 { z-index: 4; }
.action-reception-line-svg-01724 line {
    stroke: #42544a;
    stroke-width: 5px;
    stroke-dasharray: 11 9;
    opacity: .55;
}
.action-corridor-label-01724 {
    position: absolute;
    right: 6px;
    z-index: 3;
    padding: 2px 5px;
    border-radius: 6px;
    background: rgba(255,255,255,.76);
    color: #738079;
    font-size: .48rem;
    font-weight: 900;
    pointer-events: none;
}
.action-corridor-label-01724.c5 { top: 7%; }
.action-corridor-label-01724.c6 { top: 48%; }
.action-corridor-label-01724.c1 { bottom: 7%; }
.action-reception-player-01724,
.action-reception-target-01724 {
    position: absolute;
    transform: translate(-50%,-50%);
    z-index: 7;
    pointer-events: none;
}
.action-reception-player-01724 {
    min-width: 38px;
    height: 38px;
    padding: 0 7px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 3px solid #818d87;
    background: #fff;
    color: #132018;
    box-shadow: 0 4px 12px rgba(20,34,25,.18);
    font-size: .7rem;
    font-weight: 1000;
}
.action-reception-target-01724 {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #17211b;
    box-shadow: 0 0 0 4px rgba(255,255,255,.9);
}
.action-reception-court-01724.target-disabled .action-reception-target-01724,
.action-reception-court-01724.target-disabled .action-reception-line-svg-01724 { display: none; }

@media (max-width: 900px) {
    .action-edit-card { width: calc(100vw - 14px) !important; }
    .action-edit-grid-01724 { grid-template-columns: 1fr !important; }
    .action-volleyball-pair-01724 { min-height: 210px; aspect-ratio: 1.55 / .78; }
    .action-main-arrow-01724 { stroke-width: 8px; }
    .action-court-title-row { align-items: flex-start; flex-direction: column; gap: 3px; }
    .action-court-title-row span { text-align: left; }
}

/* Höhere Spezifität als die historische Direktkind-Normalisierung des Modals. */
.action-edit-body > .action-edit-grid-01724 {
    display: grid !important;
    grid-template-columns: minmax(280px, 1.5fr) minmax(230px, .85fr) minmax(180px, .65fr) !important;
    gap: 8px !important;
}
.action-edit-body > .action-court-panel {
    display: grid !important;
    gap: 8px !important;
    padding: 10px !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    background: #f8faf8 !important;
}
@media (max-width: 900px) {
    .action-edit-body > .action-edit-grid-01724 { grid-template-columns: 1fr !important; }
}
.action-reception-no-target-01724 {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 8;
    max-width: 78%;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px dashed #8b9690;
    background: rgba(255,255,255,.9);
    color: #59645e;
    text-align: center;
    font-size: .55rem;
    font-weight: 900;
    pointer-events: none;
}
/* 18 x 9 m: der Angriffseditor zeigt das Spielfeld im echten 2:1-Verhältnis.
   Die einzigen kräftigen Innenlinien sind Netz und 3-m-Linien; die bisherige
   generische Rasteroptik wird bewusst entfernt. */
.action-volleyball-pair-01724 {
    aspect-ratio: 2 / 1;
}
.action-court-half-01724 {
    background: #f7fbf8;
}
@media (max-width: 900px) {
    .action-volleyball-pair-01724 { aspect-ratio: 2 / 1; }
}

/* --------------------------------------------------------------------------
   0.17.25 – Angriffe Z-Pos kompakter und im Maßstab der übrigen Courts
   -------------------------------------------------------------------------- */

/* Die Z-Pos-Auswertung hat nur zwei Karten nebeneinander. Würde das SVG wie
   bisher fast die komplette Kartenbreite ausfüllen, wären Court, Nummern,
   Linien und Marker gegenüber den 3-spaltigen K1-Karten optisch vergrößert.
   Das Court wird deshalb bewusst auf ungefähr die dort sichtbare Größe
   begrenzt. Die im SVG definierten Strichstärken und Pfeilspitzen bleiben
   unverändert und erscheinen dadurch wieder im gleichen visuellen Maßstab. */
.setter-position-card-01723 > .evaluation-court-svg {
    width: 70% !important;
    height: auto !important;
    max-width: 70% !important;
    max-height: 82% !important;
    align-self: start !important;
    justify-self: center !important;
}

/* Auf kleineren Displays darf das Court etwas mehr Breite nutzen, bleibt aber
   klar unter der bisherigen Vollbreite. */
@media (max-width: 1100px) {
    .setter-position-card-01723 > .evaluation-court-svg {
        width: 76% !important;
        max-width: 76% !important;
        max-height: 84% !important;
    }
}

@media (max-width: 900px) {
    .setter-position-card-01723 > .evaluation-court-svg {
        width: 82% !important;
        max-width: 82% !important;
        height: auto !important;
        max-height: 86% !important;
    }
}

@media (max-height: 760px) {
    .setter-position-card-01723 > .evaluation-court-svg {
        width: 66% !important;
        max-width: 66% !important;
        height: auto !important;
        max-height: 80% !important;
    }
}

/* --------------------------------------------------------------------------
   0.17.26 – Angriff bearbeiten: Originalstart + klickbare AUS-Flächen
   -------------------------------------------------------------------------- */

/* Der Angriffseditor ist strikt einspaltig. Dadurch kann die Überschrift links
   nicht mehr in den Court hineinlaufen oder vom Court überdeckt werden. */
.action-edit-body > .action-attack-panel-01726,
.action-attack-panel-01726 {
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: visible !important;
}
.action-attack-panel-01726 > * {
    min-width: 0 !important;
    max-width: 100% !important;
}
.action-court-title-row-01726 {
    position: static !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 3px 12px !important;
    padding: 0 2px !important;
    z-index: auto !important;
}
.action-court-title-row-01726 strong,
.action-court-title-row-01726 span {
    position: static !important;
    max-width: 100% !important;
    white-space: normal !important;
}

/* Platz für die drei roten AUS-Streifen der gegnerischen Feldhälfte. */
.action-volleyball-shell-01726 {
    --action-edit-out-size: 20px;
    --action-edit-out-half: 10px;
    --action-edit-out-half-neg: -10px;
    width: 100%;
    box-sizing: border-box;
    padding: var(--action-edit-out-size) var(--action-edit-out-size) var(--action-edit-out-size) 0;
    overflow: visible;
}
.action-volleyball-pair-01726 {
    width: 100% !important;
    min-height: 250px !important;
    aspect-ratio: 2 / 1 !important;
    overflow: visible !important;
    border-radius: 10px !important;
}
.action-target-wrapper-01726 {
    position: relative;
    min-width: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 1;
}
.action-target-wrapper-01726 > .action-target-half-01724 {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

/* Wie auf dem Scouting-Sheet: AUS wird direkt in der roten Außenfläche
   angeklickt. Eine linke AUS-Fläche gibt es wegen des Netzes nicht. */
.action-edit-out-strip-01726 {
    position: absolute;
    z-index: 12;
    box-sizing: border-box;
    border: 1px solid #ef8b82;
    background: #fde9e7;
    cursor: crosshair;
}
.action-edit-out-strip-01726:hover,
.action-edit-out-strip-01726:active,
.action-edit-out-strip-01726.active {
    background: #fbd6d2;
}
.action-edit-out-strip-01726.top {
    left: 0;
    bottom: 100%;
    width: calc(100% + var(--action-edit-out-size));
    height: var(--action-edit-out-size);
}
.action-edit-out-strip-01726.right {
    left: 100%;
    top: 0;
    width: var(--action-edit-out-size);
    height: calc(100% + var(--action-edit-out-size));
}
.action-edit-out-strip-01726.bottom {
    left: 0;
    top: 100%;
    width: calc(100% + var(--action-edit-out-size));
    height: var(--action-edit-out-size);
}
.action-out-target-dot-01726 {
    position: absolute;
    z-index: 14;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #17211b;
    box-shadow: 0 0 0 3px rgba(255,255,255,.9);
    pointer-events: none;
}
.action-out-target-dot-01726.top-dot {
    top: var(--action-edit-out-half-neg);
    transform: translate(-50%, -50%);
}
.action-out-target-dot-01726.right-dot {
    left: calc(100% + var(--action-edit-out-half));
    transform: translate(-50%, -50%);
}
.action-out-target-dot-01726.bottom-dot {
    top: calc(100% + var(--action-edit-out-half));
    transform: translate(-50%, -50%);
}

/* Im Editor wird ausschließlich der echte, gespeicherte Originalstart gezeigt.
   Normalisierung und die zugehörige Hilfslinie/Legende entfallen vollständig. */
.action-original-source-01726 {
    width: 17px !important;
    height: 17px !important;
    border: 0 !important;
    background: #17211b !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,.9) !important;
}
.action-main-arrow-01726 {
    stroke-width: 7px !important;
    stroke-linecap: round !important;
    opacity: .88 !important;
}
.action-arrow-svg-01726 {
    overflow: visible !important;
}

@media (max-width: 900px) {
    .action-volleyball-shell-01726 {
        --action-edit-out-size: 14px;
        --action-edit-out-half: 7px;
        --action-edit-out-half-neg: -7px;
    }
    .action-volleyball-pair-01726 {
        min-height: 205px !important;
        aspect-ratio: 2 / 1 !important;
    }
    .action-main-arrow-01726 {
        stroke-width: 6px !important;
    }
    .action-court-title-row-01726 {
        align-items: flex-start !important;
        flex-direction: column !important;
    }
}

/* --------------------------------------------------------------------------
   0.17.28 – schmale Z-Pos-Pfeile, bündige VF-Reihe, stabiles Stats-Scrolling
             und linker Fehlerbutton exakt in 3-m-Breite
   -------------------------------------------------------------------------- */

/* Die linke Fehler-Schaltfläche belegt – wie die rechte – exakt ein Drittel
   der jeweiligen Feldhälfte. Damit entspricht ihre Breite dem 3-m-Raum. */
#view-scouting .reception-bottom-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
#view-scouting .reception-bottom-actions > .reception-action-center {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
#view-scouting .reception-front-zone-controls {
    grid-column: 3 !important;
}

/* Qualitätslisten dürfen innerhalb ihrer Karten scrollen, ohne den Scroll an
   das Dokument bzw. die Browser-Chrome weiterzugeben. Das ist insbesondere
   im nativen Vollbild und im iPad-Fokusmodus wichtig. */
#view-scouting #receiverStats,
#view-scouting #attackStats {
    overscroll-behavior-y: none !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y !important;
}
html.native-fullscreen-safe #view-scouting #receiverStats,
html.native-fullscreen-safe #view-scouting #attackStats,
html.app-focus-mode #view-scouting #receiverStats,
html.app-focus-mode #view-scouting #attackStats,
html:fullscreen #view-scouting #receiverStats,
html:fullscreen #view-scouting #attackStats {
    overscroll-behavior: none !important;
}

/* --------------------------------------------------------------------------
   0.17.29 – iPad-Fokusmodus und robuste Kopfzeilen der Qualitätskarten
   -------------------------------------------------------------------------- */

/* Die Kopfzeile ist eine echte eigene Grid-Zeile. Damit kann sie auf schmalen
   iPad-Seitenleisten auch zweizeilig werden, ohne dass die erste Spielerzeile
   unter die Überschrift rutscht. */
#view-scouting .stats-card {
    display: grid !important;
    grid-template-rows: max-content minmax(0, 1fr) !important;
    align-content: stretch !important;
    row-gap: 4px !important;
    overflow: hidden !important;
}
#view-scouting .stats-card > .side-title-row {
    min-width: 0 !important;
    min-height: 22px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    align-items: start !important;
    column-gap: 5px !important;
    position: relative !important;
    z-index: 3 !important;
    background: inherit !important;
    line-height: 1.05 !important;
}
#view-scouting .stats-card > .side-title-row .side-title {
    min-width: 0 !important;
    line-height: 1.05 !important;
    overflow-wrap: anywhere;
}
#view-scouting .stats-card > .side-title-row .side-hint {
    align-self: start !important;
    white-space: nowrap !important;
    line-height: 1.05 !important;
}
#view-scouting .stats-card > .receiver-stats {
    min-height: 0 !important;
    height: 100% !important;
    margin-top: 0 !important;
    align-self: stretch !important;
    position: relative !important;
    z-index: 1 !important;
    overflow-y: auto !important;
    overscroll-behavior-y: none !important;
    -webkit-overflow-scrolling: touch;
}

/* Im iPad-Fokusmodus bleibt der Viewport fest an der App verankert. Der
   eigentliche Listen-Scroll findet ausschließlich in den Qualitätslisten
   statt; Pull-/Overscroll wird dort bereits im JS am Listenrand abgefangen. */
html.app-focus-mode,
html.app-focus-mode body,
html.app-focus-mode .app {
    overscroll-behavior: none !important;
    max-width: 100vw !important;
    max-height: 100dvh !important;
}
html.app-focus-mode body {
    position: fixed !important;
    inset: 0 !important;
}

/* Auf typischen iPad-Breiten bleibt die Kopfzeile lesbar, ohne die erste
   Statistikzeile nach oben zu drücken oder zu überlagern. */
@media (min-width: 700px) and (max-width: 1366px) {
    #view-scouting .stats-card > .side-title-row .side-title {
        font-size: clamp(.70rem, 1.15vw, .82rem) !important;
    }
    #view-scouting .stats-card > .side-title-row .side-hint {
        font-size: clamp(.50rem, .82vw, .62rem) !important;
    }
}

/* --------------------------------------------------------------------------
   0.17.30 – Annahme bearbeiten: großes 9x9-m-Annahmefeld
   -------------------------------------------------------------------------- */

/* Explizite Einspaltenstruktur: ältere generische Grid-Regeln dürfen den
   Annahmeeditor nicht mehr in mehrere schmale Spalten zerlegen. */
.action-edit-body > .action-reception-panel-01730,
.action-reception-panel-01730 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
    grid-auto-flow: row !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    align-items: start !important;
    justify-items: stretch !important;
    gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}
.action-reception-panel-01730 > * {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.action-reception-head-01730 {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 6px 14px !important;
    width: 100% !important;
    padding: 0 2px !important;
}
.action-reception-title-01730 {
    display: grid !important;
    gap: 2px !important;
}
.action-reception-title-01730 strong {
    color: #243029;
    font-size: .82rem;
    font-weight: 1000;
}
.action-reception-title-01730 span {
    color: var(--muted);
    font-size: .54rem;
    font-weight: 800;
}
.action-reception-meta-01730 {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-end !important;
    gap: 4px !important;
}
.action-reception-meta-01730 span {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 24px !important;
    padding: 0 7px !important;
    border: 1px solid #d4ddd7 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #435148 !important;
    font-size: .52rem !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}
.action-reception-meta-01730 span.inferred {
    border-style: dashed !important;
    color: #7a6a2e !important;
    background: #fffbea !important;
}

.action-reception-toolbar-01730 {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 6px 12px !important;
    width: 100% !important;
}
.action-reception-mode-01730 {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}
.action-reception-mode-01730 button {
    min-height: 34px !important;
    padding-inline: 12px !important;
}
.action-reception-mode-hint-01730 {
    flex: 1 1 260px !important;
    color: var(--muted) !important;
    font-size: .54rem !important;
    font-weight: 800 !important;
    text-align: right !important;
}

.action-reception-court-wrap-01730 {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    place-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
}

/* Eine Annahmeseite ist 9 x 9 m und deshalb quadratisch. Die Größe orientiert
   sich an der verfügbaren Viewporthöhe, bleibt auf dem iPad aber groß genug. */
.action-reception-court-01730 {
    position: relative !important;
    display: block !important;
    width: min(680px, 100%, 64vh) !important;
    height: auto !important;
    min-width: 280px !important;
    min-height: 280px !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    justify-self: center !important;
    border: 3px solid #078531 !important;
    border-right-width: 6px !important;
    border-radius: 8px !important;
    background: #f7fbf8 !important;
    overflow: hidden !important;
    cursor: crosshair !important;
    box-sizing: border-box !important;
    isolation: isolate !important;
}

/* 9 x 9 Raster wie auf dem Scouting-Sheet. */
.action-reception-grid-01730 {
    position: absolute !important;
    inset: 0 !important;
    z-index: 2 !important;
    pointer-events: none !important;
    background-image:
        linear-gradient(to right, rgba(52,64,84,.18) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(52,64,84,.18) 1px, transparent 1px) !important;
    background-size: calc(100% / 9) 100%, 100% calc(100% / 9) !important;
    background-position: -1px -1px !important;
}
.action-reception-three-meter-01730 {
    position: absolute !important;
    z-index: 5 !important;
    top: 0 !important;
    bottom: 0 !important;
    left: calc(100% * 6 / 9) !important;
    width: 4px !important;
    transform: translateX(-2px) !important;
    background: #078531 !important;
    pointer-events: none !important;
}
.action-reception-net-01730 {
    position: absolute !important;
    z-index: 5 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 4px !important;
    background: #075f29 !important;
    pointer-events: none !important;
}
.action-reception-zones-01730 {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
    opacity: .72 !important;
    pointer-events: none !important;
}

.action-corridor-label-01730 {
    position: absolute !important;
    left: 7px !important;
    z-index: 6 !important;
    transform: translateY(-50%) !important;
    padding: 2px 6px !important;
    border: 1px solid rgba(8,133,49,.20) !important;
    border-radius: 999px !important;
    background: rgba(255,255,255,.88) !important;
    color: #65726b !important;
    font-size: .50rem !important;
    font-weight: 950 !important;
    pointer-events: none !important;
}
.action-corridor-label-01730.c5 { top: calc(100% / 6) !important; }
.action-corridor-label-01730.c6 { top: 50% !important; }
.action-corridor-label-01730.c1 { top: calc(100% * 5 / 6) !important; }

.action-reception-player-01730 {
    min-width: 50px !important;
    height: 50px !important;
    padding: 0 9px !important;
    border: 4px solid #7e8984 !important;
    background: #fff !important;
    color: #132018 !important;
    box-shadow: 0 4px 13px rgba(20,34,25,.22), 0 0 0 3px rgba(255,255,255,.82) !important;
    font-size: .86rem !important;
    font-weight: 1000 !important;
    z-index: 10 !important;
}
.action-reception-target-01730 {
    width: 20px !important;
    height: 20px !important;
    background: #17211b !important;
    box-shadow: 0 0 0 4px rgba(255,255,255,.94) !important;
    z-index: 9 !important;
}
.action-reception-line-svg-01730 {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 7 !important;
    pointer-events: none !important;
}
.action-reception-line-svg-01730 line {
    stroke: #42544a !important;
    stroke-width: 4px !important;
    stroke-dasharray: 10 8 !important;
    opacity: .50 !important;
}
.action-reception-no-target-01730 {
    top: 14px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-width: calc(100% - 28px) !important;
    white-space: normal !important;
    z-index: 11 !important;
}

.action-reception-legend-01730 {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px 18px !important;
    width: 100% !important;
    color: var(--muted) !important;
    font-size: .53rem !important;
    font-weight: 850 !important;
}
.action-reception-legend-01730 > span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}
.action-reception-legend-01730 b {
    flex: 0 0 auto !important;
}
.action-reception-legend-01730 .player-sample {
    min-width: 26px !important;
    height: 26px !important;
    padding: 0 5px !important;
    display: inline-grid !important;
    place-items: center !important;
    border: 2px solid #7e8984 !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #132018 !important;
    font-size: .48rem !important;
}
.action-reception-legend-01730 .target-sample {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: #17211b !important;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #cfd8d2 !important;
}
.action-reception-legend-01730 .zone-sample {
    width: 24px !important;
    height: 14px !important;
    border: 1px solid rgba(26,139,48,.55) !important;
    border-radius: 3px !important;
    background: rgba(74,193,94,.25) !important;
}

@media (max-width: 900px) {
    .action-reception-head-01730,
    .action-reception-toolbar-01730 {
        align-items: flex-start !important;
    }
    .action-reception-meta-01730 { justify-content: flex-start !important; }
    .action-reception-mode-hint-01730 { text-align: left !important; }
    .action-reception-court-01730 {
        width: min(620px, 100%, 58vh) !important;
        min-width: 250px !important;
        min-height: 250px !important;
    }
}

@media (max-height: 650px) and (min-width: 700px) {
    .action-reception-court-01730 {
        width: min(430px, 100%, 58vh) !important;
        min-width: 250px !important;
        min-height: 250px !important;
    }
}

/* --------------------------------------------------------------------------
   0.17.31 – Benutzergebundene eigene Kader, Liga-Metadaten und Button-Eingabe
   -------------------------------------------------------------------------- */
.team-button.shared-team-01731 {
    border-style: dashed;
    background: #f8faf8;
}
.team-edit-bar-01731 {
    flex-wrap: wrap;
    align-items: end;
}
.team-edit-bar-01731 .team-name-editor {
    flex: 1 1 280px;
    min-width: 230px;
}
.team-local-league-fields {
    flex: 2 1 520px;
    min-width: 420px;
    display: grid;
    grid-template-columns: minmax(170px, 1.5fr) minmax(115px, .8fr) 92px;
    gap: 6px;
    align-items: end;
}
.team-local-league-fields[hidden] { display: none !important; }
.team-local-league-fields label {
    min-width: 0;
    display: grid;
    gap: 2px;
    font-size: .58rem;
    font-weight: 850;
    color: var(--muted);
}
.team-local-league-fields select,
.team-local-league-fields input {
    width: 100%;
    min-width: 0;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0 7px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 800;
}
.team-edit-bar-01731 .team-roster-meta {
    flex: 1 1 100%;
    order: 20;
}

.add-player-card-01731 {
    width: min(760px, 94vw);
    max-height: min(90vh, 820px);
    overflow: auto;
    display: grid;
    gap: 12px;
}
.add-player-name-01731,
.local-team-name-01731 {
    display: grid;
    gap: 4px;
    font-size: .67rem;
    font-weight: 900;
}
.add-player-name-01731 input,
.local-team-name-01731 input,
.player-manual-number-01731 input,
.local-team-league-box-01731 select,
.local-team-league-box-01731 input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 0 10px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 800;
}
.player-choice-section-01731 {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8faf8;
}
.player-choice-title-01731 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.player-choice-title-01731 strong { font-size: .78rem; }
.player-choice-title-01731 span { color: var(--muted); font-size: .56rem; font-weight: 750; }
.player-number-buttons-01731 {
    display: grid;
    grid-template-columns: repeat(10, minmax(42px,1fr));
    gap: 5px;
}
.player-number-buttons-01731 button,
.player-position-buttons-01731 button {
    min-width: 0;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    color: var(--text);
    font-weight: 950;
    font-size: .74rem;
}
.player-number-buttons-01731 button.active,
.player-position-buttons-01731 button.active {
    border: 2px solid var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, #fff);
    color: var(--primary-dark, var(--primary));
}
.player-manual-number-01731 {
    display: grid;
    grid-template-columns: 130px minmax(100px, 180px);
    gap: 8px;
    align-items: center;
    font-size: .6rem;
    font-weight: 850;
}
.player-position-buttons-01731 {
    display: grid;
    grid-template-columns: repeat(6, minmax(0,1fr));
    gap: 6px;
}

.local-team-card-01731 {
    width: min(700px, 94vw);
    display: grid;
    gap: 14px;
}
.local-team-league-box-01731 {
    display: grid;
    grid-template-columns: minmax(190px,1.4fr) minmax(120px,.8fr) 100px;
    gap: 9px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8faf8;
}
.local-team-league-box-01731 > div {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.local-team-league-box-01731 > div span {
    color: var(--muted);
    font-size: .57rem;
    font-weight: 750;
}
.local-team-league-box-01731 label {
    display: grid;
    gap: 4px;
    font-size: .6rem;
    font-weight: 850;
}
.local-team-modal-actions-01731 { display: flex; justify-content: flex-end; }

@media (max-width: 850px) {
    .team-local-league-fields { min-width: 100%; grid-template-columns: 1fr 1fr 100px; }
    .player-number-buttons-01731 { grid-template-columns: repeat(6, minmax(42px,1fr)); }
    .player-position-buttons-01731 { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .local-team-league-box-01731 { grid-template-columns: 1fr 1fr 100px; }
}

@media (max-width: 560px) {
    .player-number-buttons-01731 { grid-template-columns: repeat(5, minmax(40px,1fr)); }
    .player-choice-title-01731,
    .local-team-league-box-01731 > div { align-items: flex-start; flex-direction: column; }
    .player-manual-number-01731 { grid-template-columns: 1fr; }
    .team-local-league-fields,
    .local-team-league-box-01731 { grid-template-columns: 1fr; min-width: 100%; }
}

/* --------------------------------------------------------------------------
   0.17.33 – Z-Pos-Filter, Annahmeauswertung, iPad-Bedienung und Ansicht
   -------------------------------------------------------------------------- */

/* Untermenü links, kontextbezogene Z-Pos-Filter rechts auf derselben Höhe. */
.evaluation-subnav {
    justify-content: space-between !important;
    gap: 10px !important;
    overflow: visible !important;
}
.evaluation-subnav-main {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}
.setter-position-filters-01732 {
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    min-width: 0;
}
.setter-position-filters-01732[hidden] { display: none !important; }
.setter-filter-group-01732 {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.setter-filter-group-01732 > span {
    color: var(--muted);
    font-size: .60rem;
    font-weight: 1000;
    padding-right: 2px;
}
.setter-filter-group-01732 button {
    min-width: 31px;
    height: 28px;
    padding: 0 8px;
    font-size: .64rem;
}
.setter-filter-group-01732.reception-filter-01732 button.active {
    border-color: #9b7b00;
    background: #fff4b5;
    color: #665100;
    box-shadow: inset 0 0 0 1px #d6b200;
}
.setter-filter-group-01732.phase-filter-01732 button.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
}
.setter-filter-divider-01732 {
    width: 1px;
    height: 22px;
    background: var(--border);
}
@media (max-width: 920px) {
    .evaluation-subnav { gap: 5px !important; }
    .evaluation-subnav-main { gap: 3px; }
    .evaluation-subnav button { padding-inline: 8px; }
    .setter-position-filters-01732 { gap: 4px; }
    .setter-filter-divider-01732 { display: none; }
    .setter-filter-group-01732 { gap: 2px; }
    .setter-filter-group-01732 button { min-width: 27px; padding-inline: 5px; }
}

/* Annahmeauswertung: drei Korridore plus Vorder-/Hinterspieler. */
.reception-evaluation-columns,
.reception-evaluation-row.reception-evaluation-row-01710,
.reception-evaluation-row.reception-evaluation-row-01732 {
    grid-template-columns:
        50px minmax(145px, 1fr)
        70px 64px 82px
        96px 96px 96px
        108px 108px !important;
    gap: 6px !important;
}
.reception-eval-corridor-01710,
.reception-eval-split-01732 {
    font-size: clamp(.70rem, .92vw, .86rem) !important;
    line-height: 1.05 !important;
    font-weight: 950 !important;
}
.reception-eval-split-01732 {
    color: #26332d;
}
#evaluationReceptionPanel {
    overflow-x: auto !important;
    overflow-y: auto !important;
}
.reception-evaluation-head,
.reception-evaluation-columns,
.reception-evaluation-list {
    min-width: 1010px;
}

/* Libero-Symbol um die Nummer – dieselbe visuelle Sprache wie auf dem Feld. */
.reception-eval-number.reception-eval-libero-01732 {
    position: relative;
    z-index: 0;
    width: 36px;
    height: 36px;
    justify-self: center;
    display: grid !important;
    place-items: center;
    color: var(--libero-text-color, #fff) !important;
    font-size: 1.08rem !important;
    line-height: 1 !important;
    isolation: isolate;
}
.reception-eval-number.reception-eval-libero-01732::before,
.reception-eval-number.reception-eval-libero-01732::after {
    content: "";
    position: absolute;
    pointer-events: none;
    clip-path: polygon(29% 0, 71% 0, 100% 29%, 100% 71%, 71% 100%, 29% 100%, 0 71%, 0 29%);
}
.reception-eval-number.reception-eval-libero-01732::before {
    inset: -3px;
    z-index: -2;
    background: repeating-linear-gradient(
        135deg,
        var(--reception-eval-color, var(--traffic-neutral)) 0 4px,
        color-mix(in srgb, var(--reception-eval-color, var(--traffic-neutral)) 34%, #fff 66%) 4px 7px
    );
    box-shadow: 0 1px 4px rgba(0,0,0,.16);
}
.reception-eval-number.reception-eval-libero-01732::after {
    inset: 3px;
    z-index: -1;
    background: var(--libero-color, #6F2DBD);
}

/* Annahme-Editor: vollständig im Modal sichtbar. Die Feldgröße richtet sich
   primär nach der verfügbaren Höhe, nicht nach der maximalen Kartenbreite. */
.action-reception-court-01730 {
    width: min(500px, 100%, 46dvh) !important;
    min-width: 220px !important;
    min-height: 220px !important;
    max-height: 46dvh !important;
}
.action-reception-panel-01730 {
    gap: 6px !important;
}
.action-reception-toolbar-01730,
.action-reception-head-01730 {
    gap-block: 4px !important;
}
.action-reception-legend-01730 {
    gap: 5px 14px !important;
}
@media (max-height: 760px) and (min-width: 700px) {
    .action-reception-court-01730 {
        width: min(410px, 100%, 42dvh) !important;
        min-width: 210px !important;
        min-height: 210px !important;
        max-height: 42dvh !important;
    }
}

/* Große, iPad-taugliche Range-Controls. */
.ios-range-01732 {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-height: 34px;
    margin: 0;
    padding: 0;
    background: transparent;
    touch-action: none !important;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}
.ios-range-01732::-webkit-slider-runnable-track {
    height: 8px;
    border: 1px solid #bfc9c2;
    border-radius: 999px;
    background: #e7ece8;
}
.ios-range-01732::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    margin-top: -11px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 1px var(--primary-dark), 0 2px 5px rgba(0,0,0,.18);
}
.ios-range-01732::-moz-range-track {
    height: 8px;
    border: 1px solid #bfc9c2;
    border-radius: 999px;
    background: #e7ece8;
}
.ios-range-01732::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 1px var(--primary-dark), 0 2px 5px rgba(0,0,0,.18);
}
.reception-trend-window-control-01732 {
    display: grid;
    grid-template-columns: minmax(150px,1fr) auto;
    gap: 12px;
    align-items: end;
}
.reception-trend-window-label {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 4px !important;
}
.reception-trend-window-number-01732 {
    display: grid;
    grid-template-columns: auto 62px;
    gap: 6px;
    align-items: center;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 900;
}
.reception-trend-window-number-01732 input {
    width: 62px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    text-align: center;
    font: inherit;
}
@media (max-width: 760px) {
    .reception-trend-window-control-01732 { grid-template-columns: 1fr; gap: 6px; }
    .reception-trend-window-number-01732 { justify-self: start; }
}

/* Ansichtsmodus: Läufer-/Satznavigation ist Navigation und deshalb weder
   ausgegraut noch blockiert. */
.view-only-mode #view-scouting .scouting-toolbar .toolbar-actions > .runner-control-card,
.view-only-mode #view-scouting .scouting-toolbar .toolbar-actions > .set-control-card,
.external-viewer #view-scouting .scouting-toolbar .toolbar-actions > .runner-control-card,
.external-viewer #view-scouting .scouting-toolbar .toolbar-actions > .set-control-card {
    pointer-events: auto !important;
    opacity: 1 !important;
    filter: none !important;
}
.view-only-mode #view-scouting .viewer-runner-control button,
.external-viewer #view-scouting .viewer-runner-control button,
.view-only-mode #view-scouting .set-button-group button:not(.set-future-0175),
.external-viewer #view-scouting .set-button-group button:not(.set-future-0175) {
    opacity: 1 !important;
    filter: none !important;
}

/* Qualitätslisten in Ansicht wieder in derselben zweizeiligen Struktur wie in
   der Eingabe. Bei vielen Spielerinnen wird innerhalb der Karte gescrollt. */
.view-only-mode #view-scouting .scouting-side,
.external-viewer #view-scouting .scouting-side {
    grid-template-rows: 122px minmax(0, 1fr) minmax(0, 1fr) !important;
}
.view-only-mode #view-scouting .receiver-stats,
.external-viewer #view-scouting .receiver-stats {
    display: grid !important;
    grid-auto-rows: max-content !important;
    align-content: start !important;
    gap: 4px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}
.view-only-mode #view-scouting .receiver-stat-row,
.external-viewer #view-scouting .receiver-stat-row {
    min-height: 42px !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    gap: 1px !important;
    padding: 4px 6px !important;
    border-left-width: 6px !important;
    border-radius: 7px !important;
    overflow: visible !important;
}
.view-only-mode #view-scouting .receiver-stat-summary,
.external-viewer #view-scouting .receiver-stat-summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 19px !important;
}
.view-only-mode #view-scouting .receiver-stat-number,
.external-viewer #view-scouting .receiver-stat-number {
    grid-column: auto !important;
    grid-row: auto !important;
    font-size: clamp(1.03rem, 1.45vw, 1.32rem) !important;
}
.view-only-mode #view-scouting .receiver-stat-points,
.external-viewer #view-scouting .receiver-stat-points {
    grid-column: auto !important;
    grid-row: auto !important;
    justify-self: auto !important;
    font-size: clamp(.66rem, .9vw, .82rem) !important;
}
.view-only-mode #view-scouting .receiver-stat-name,
.external-viewer #view-scouting .receiver-stat-name {
    grid-column: auto !important;
    grid-row: auto !important;
    font-size: clamp(.61rem, .78vw, .72rem) !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-detail-01710,
.external-viewer #view-scouting #receiverStats .receiver-stat-detail-01710 {
    grid-column: auto !important;
    grid-row: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-detail-01710 .receiver-stat-name,
.external-viewer #view-scouting #receiverStats .receiver-stat-detail-01710 .receiver-stat-name {
    grid-column: auto !important;
    grid-row: auto !important;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-trend-01710,
.external-viewer #view-scouting #receiverStats .receiver-stat-trend-01710 {
    grid-column: auto !important;
    grid-row: auto !important;
    font-size: .60rem !important;
    gap: 2px !important;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-trend-01710 strong,
.external-viewer #view-scouting #receiverStats .receiver-stat-trend-01710 strong {
    font-size: .60rem !important;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-trend-arrow-01710,
.external-viewer #view-scouting #receiverStats .receiver-stat-trend-arrow-01710 {
    font-size: .82rem !important;
}

/* Im Fokusmodus bleibt der Vollbildbutton sicher über allen Inhalten und
   anklickbar. */
html.app-focus-mode .top-actions,
html.native-fullscreen-safe .top-actions,
html:fullscreen .top-actions,
html:-webkit-full-screen .top-actions {
    pointer-events: auto !important;
}
html.app-focus-mode #fullscreenButton,
html.native-fullscreen-safe #fullscreenButton,
html:fullscreen #fullscreenButton,
html:-webkit-full-screen #fullscreenButton {
    display: inline-grid !important;
    place-items: center !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    z-index: 10040 !important;
}

/* --------------------------------------------------------------------------
   0.17.33 – Eigene Kader, Ansichtsmodus und installierte iPad-App
   -------------------------------------------------------------------------- */

/* Modale Dialoge müssen unabhängig von älteren Display-Regeln zuverlässig
   verschwinden. Das behebt insbesondere den Dialog „Neue Mannschaft“. */
.modal-layer[hidden] { display: none !important; }

.team-delete-button-01733 {
    min-height: 30px;
    padding: 0 11px;
    white-space: nowrap;
}
.team-delete-button-01733[hidden] { display: none !important; }

/* Ansichtsmodus: die Kopfzeile des Spielstands bekommt eine echte eigene
   Zeile. Dadurch können „Spielstand“, Satznummer und Score nicht ineinander
   rutschen, auch wenn iPadOS die Schrift etwas größer rendert. */
.view-only-mode #view-scouting .scouting-side,
.external-viewer #view-scouting .scouting-side {
    grid-template-rows: 142px minmax(0, 1fr) minmax(0, 1fr) !important;
}
.view-only-mode #view-scouting .score-card,
.external-viewer #view-scouting .score-card {
    grid-template-rows: minmax(32px, auto) minmax(0, 1fr) !important;
    overflow: hidden !important;
}
.view-only-mode #view-scouting .score-card-head,
.external-viewer #view-scouting .score-card-head {
    min-height: 32px !important;
    position: relative;
    z-index: 2;
    align-items: center !important;
    padding-bottom: 3px;
}
.view-only-mode #view-scouting .score-board,
.external-viewer #view-scouting .score-board {
    min-height: 0 !important;
    position: relative;
    z-index: 1;
}

/* Auswechselspielerinnen in der Ansicht: Nummer deutlich größer und exakt
   mittig in der kleinen Karte. */
.view-only-mode #view-scouting .substitution-bench-player.readonly-player,
.external-viewer #view-scouting .substitution-bench-player.readonly-player {
    width: 36px !important;
    min-width: 36px !important;
    height: 32px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    text-align: center !important;
    font-size: 1.02rem !important;
    line-height: 1 !important;
    font-weight: 950 !important;
}

/* Installierte PWA: kein eigener „Vollbild verlassen“-Zustand. Die App läuft
   bereits ohne Safari-Chrome und bleibt im App-Fokusmodus. */
html.installed-app-mode,
html.installed-app-mode body {
    overscroll-behavior: none !important;
}
html.installed-app-mode #fullscreenButton {
    display: none !important;
}

/* --------------------------------------------------------------------------
   0.17.34 – Libero-Parkplatz und Courts immer schwarz
   -------------------------------------------------------------------------- */
#view-scouting .libero-parking-player.libero-regular-parking {
    clip-path: none !important;
    border-radius: 7px !important;
    border-color: #111 !important;
    background: #fff !important;
    color: #111 !important;
    text-shadow: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,.16) !important;
}
#view-scouting .libero-parking-player.libero-regular-parking:hover:not(:disabled) {
    background: #f3f3f3 !important;
    filter: none !important;
}
#view-scouting .libero-parking-player.libero-regular-parking:disabled {
    opacity: .66 !important;
}

/* Die Geometrie eines Volleyballfelds ist unabhängig vom gewählten Farbschema
   immer schwarz. Qualitätsfarben, Spielerfarben und AUS-Flächen bleiben davon
   ausdrücklich unberührt. */
:root { --court-line: #111111 !important; }
.court,
.mini-rotation,
.variant-template-court,
.action-court-half-01724,
.action-reception-court-01724,
.action-reception-court-01730,
.set-side-mini-court {
    border-color: #111111 !important;
}
.attack-line,
.variant-template-net,
.action-net-01724,
.action-three-meter-01724,
.action-reception-three-meter-01730,
.action-reception-net-01730 {
    background: #111111 !important;
}
.eval-court-bg,
.eval-three-meter,
.eval-net {
    stroke: #111111 !important;
}
.set-side-mini-court {
    background:
        linear-gradient(to bottom, transparent 49.4%, rgba(17,17,17,.42) 49.4% 50.6%, transparent 50.6%) !important;
}

/* --------------------------------------------------------------------------
   0.17.36 – manuelle App-Aktualisierung in den Programmeinstellungen
   -------------------------------------------------------------------------- */
.app-update-card-01736 {
    grid-column: 1 / -1;
}
.app-update-status-row-01736 {
    display: grid;
    grid-template-columns: minmax(125px, .55fr) minmax(260px, 1.65fr) minmax(210px, .8fr);
    gap: 12px;
    align-items: stretch;
    margin-top: 12px;
}
.app-update-version-01736,
.app-update-status-01736 {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(245, 248, 246, .86);
}
.app-update-version-01736 > span,
.app-update-status-01736 > span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}
.app-update-version-01736 strong {
    font-size: 1.18rem;
    color: var(--primary);
}
.app-update-state-01736 {
    font-size: 1rem;
    line-height: 1.15;
}
.app-update-state-01736.current { color: #07862f; }
.app-update-state-01736.available { color: #a66a00; }
.app-update-state-01736.offline,
.app-update-state-01736.error { color: #bf3131; }
.app-update-state-01736.checking { color: var(--muted); }
.app-update-status-01736 small {
    min-height: 1.2em;
    color: var(--muted);
    font-size: .72rem;
    line-height: 1.35;
}
.app-update-status-row-01736 > .primary-action {
    min-height: 54px;
    align-self: center;
}
.app-update-modal-card-01736 {
    width: min(590px, 94vw);
}
.app-update-modal-body-01736 {
    display: grid;
    gap: 14px;
    padding: 12px 4px 4px;
}
.app-update-version-comparison-01736 {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}
.app-update-version-comparison-01736 > div {
    display: grid;
    gap: 4px;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f7faf8;
}
.app-update-version-comparison-01736 span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
}
.app-update-version-comparison-01736 strong {
    color: var(--primary);
    font-size: 1.3rem;
}
.app-update-version-comparison-01736 .app-update-arrow-01736 {
    color: var(--primary);
    font-size: 1.4rem;
}
.app-update-modal-body-01736 p {
    margin: 0;
    color: var(--ink);
    line-height: 1.45;
}
.app-update-progress-01736 {
    min-height: 1.25em;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 750;
}
.app-update-modal-actions-01736 {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
}
@media (max-width: 760px) {
    .app-update-status-row-01736 {
        grid-template-columns: 1fr;
    }
    .app-update-status-row-01736 > .primary-action {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   0.17.37 – Programmeinstellungen ohne Scrollen, robuster unterer AUS-Bereich
             und Pfeilstil-Legende im Scouting
   -------------------------------------------------------------------------- */

/* Programmeinstellungen bleiben vollständig innerhalb der verfügbaren View.
   Auf dem iPad werden alle fünf Karten in einem 3x2-Raster angeordnet. */
#view-settings {
    overflow: hidden !important;
    padding: 6px !important;
}
#view-settings .program-settings-page {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    grid-template-rows: 34px 38px minmax(0, 1fr) !important;
    gap: 6px !important;
}
#view-settings .settings-subnav {
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    padding-block: 2px !important;
}
#view-settings .settings-subnav button {
    height: 27px !important;
    padding-inline: 9px !important;
}
#view-settings .program-settings-toolbar {
    height: 38px !important;
    min-height: 38px !important;
}
#view-settings .program-settings-grid {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(0, 1fr) !important;
    gap: 6px !important;
    align-content: stretch !important;
}
#view-settings .program-settings-grid > .side-card {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 9px 10px !important;
    gap: 6px !important;
    align-content: start !important;
}
#view-settings .program-mode-card,
#view-settings .reception-trend-settings-card,
#view-settings .attack-arrow-label-settings-card,
#view-settings .realtime-info-card,
#view-settings .app-update-card-01736 {
    min-height: 0 !important;
}
#view-settings .app-update-card-01736 {
    grid-column: auto !important;
}
#view-settings .side-title-row {
    min-width: 0 !important;
    gap: 5px !important;
}
#view-settings .side-title,
#view-settings .side-title-row .side-title {
    font-size: .78rem !important;
    line-height: 1.05 !important;
}
#view-settings .side-hint {
    font-size: .54rem !important;
    white-space: nowrap !important;
}
#view-settings .side-card > p,
#view-settings .program-mode-hint,
#view-settings .realtime-info-card p {
    margin: 0 !important;
    font-size: .60rem !important;
    line-height: 1.25 !important;
}
#view-settings .program-mode-buttons {
    gap: 6px !important;
}
#view-settings .program-mode-buttons button {
    height: 40px !important;
    font-size: .78rem !important;
}
#view-settings .reception-trend-window-control-01732,
#view-settings .attack-arrow-label-size-control {
    gap: 7px !important;
}
#view-settings .ios-range-01732 {
    min-height: 30px !important;
}
#view-settings .reception-trend-window-number-01732 input,
#view-settings .attack-arrow-label-size-control input[type="number"] {
    height: 30px !important;
}
#view-settings .attack-arrow-label-preview {
    min-height: 34px !important;
    padding: 4px 7px !important;
}
#view-settings .program-settings-grid .primary-action {
    min-height: 36px !important;
    height: 36px !important;
    padding-block: 0 !important;
    font-size: .65rem !important;
}
#view-settings .realtime-status {
    min-height: 24px !important;
    font-size: .57rem !important;
}
#view-settings .app-update-card-01736 > p {
    max-height: 2.5em !important;
    overflow: hidden !important;
}
#view-settings .app-update-status-row-01736 {
    min-width: 0 !important;
    margin-top: 2px !important;
    display: grid !important;
    grid-template-columns: minmax(76px, .62fr) minmax(0, 1.38fr) !important;
    gap: 6px !important;
    align-items: stretch !important;
}
#view-settings .app-update-version-01736,
#view-settings .app-update-status-01736 {
    padding: 7px 8px !important;
    gap: 2px !important;
}
#view-settings .app-update-version-01736 > span,
#view-settings .app-update-status-01736 > span,
#view-settings .app-update-status-01736 small {
    font-size: .52rem !important;
}
#view-settings .app-update-version-01736 strong {
    font-size: .86rem !important;
}
#view-settings .app-update-state-01736 {
    font-size: .72rem !important;
}
#view-settings .app-update-status-row-01736 > .primary-action {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 34px !important;
    height: 34px !important;
}

/* Selbst bei der kleineren iPad-CSS-Breite bleibt das 3x2-Raster erhalten. */
@media (max-width: 1180px) {
    #view-settings .program-settings-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}
@media (max-height: 760px) {
    #view-settings .program-settings-page {
        grid-template-rows: 31px 34px minmax(0, 1fr) !important;
        gap: 4px !important;
    }
    #view-settings .settings-subnav { height: 31px !important; min-height: 31px !important; }
    #view-settings .settings-subnav button { height: 25px !important; }
    #view-settings .program-settings-toolbar { height: 34px !important; min-height: 34px !important; }
    #view-settings .program-settings-grid { gap: 4px !important; }
    #view-settings .program-settings-grid > .side-card { padding: 6px 8px !important; gap: 4px !important; }
    #view-settings .side-card > p { font-size: .56rem !important; line-height: 1.18 !important; }
    #view-settings .program-mode-buttons button { height: 34px !important; }
    #view-settings .attack-arrow-label-preview { min-height: 29px !important; }
    #view-settings .program-settings-grid .primary-action { height: 31px !important; min-height: 31px !important; }
}

/* Der untere rote AUS-Streifen muss über der Bedienzeile hit-testbar bleiben.
   Top/rechts funktionierten bereits; hier wird insbesondere iPad-Touch robust. */
#view-scouting .attack-target-wrapper {
    position: relative !important;
    z-index: 36 !important;
}
#view-scouting .combined-volleyball-court .attack-out-strip {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    z-index: 44 !important;
}
#view-scouting .combined-volleyball-court .attack-out-bottom {
    pointer-events: auto !important;
    z-index: 46 !important;
}
#view-scouting .attack-bottom-actions {
    z-index: 32 !important;
}

/* Legende für unterschiedliche Spielerinnen am selben normalisierten Start.
   Sie sitzt im freien oberen Streifen der linken Feldhälfte direkt über dem
   netznahen 3-m-Raum und verdeckt damit weder Spielerinnen noch Pfeile. */
.scouting-attack-style-legend-01737 {
    position: absolute;
    z-index: 58;
    top: 2px;
    left: 34%;
    max-width: 15.5%;
    min-height: 25px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px 7px;
    padding: 3px 6px;
    border: 1px solid rgba(104, 121, 111, .34);
    border-radius: 7px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 2px 7px rgba(29, 42, 34, .10);
    color: #26332d;
    pointer-events: none;
}
.scouting-attack-style-legend-01737[hidden] { display: none !important; }
.scouting-attack-style-legend-item-01737 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    white-space: nowrap;
    font-size: .52rem;
    font-weight: 950;
    line-height: 1;
}
.scouting-attack-style-swatch-01737 {
    width: 22px;
    height: 0;
    flex: 0 0 22px;
    border-top: 2px solid #59665f;
}
.scouting-attack-style-swatch-01737.style-1 { border-top-style: dashed; }
.scouting-attack-style-swatch-01737.style-2 { border-top-style: dotted; }
.scouting-attack-style-swatch-01737.style-3 {
    height: 2px;
    border-top: 0;
    background: repeating-linear-gradient(to right, #59665f 0 7px, transparent 7px 10px, #59665f 10px 12px, transparent 12px 16px);
}
@media (max-width: 900px) {
    .scouting-attack-style-legend-01737 {
        left: 33.5%;
        max-width: 16%;
        gap: 2px 5px;
        padding: 2px 4px;
    }
    .scouting-attack-style-swatch-01737 { width: 18px; flex-basis: 18px; }
}

/* --------------------------------------------------------------------------
   0.17.38 – Live-Angriffsfilter, persönliche Listenoptionen und Satzsperre
   -------------------------------------------------------------------------- */

/* Kompakter Live-Filter rechts oben neben dem Court. Er sitzt auf derselben
   Höhenachse wie Wechselbank/oberer AUS-Streifen, aber außerhalb der roten
   Trefferfläche. */
#view-scouting .combined-volleyball-court {
    position: relative !important;
}
.scouting-attack-history-toggle-01738 {
    position: absolute;
    z-index: 64;
    top: 1px;
    right: -101px;
    width: 94px;
    min-height: 30px;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto auto;
    gap: 2px;
    padding: 3px 4px;
    border: 1px solid #cfd8d2;
    border-radius: 8px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 2px 7px rgba(25,41,31,.10);
    color: #213029;
}
.scouting-attack-history-toggle-01738[hidden] { display: none !important; }
.scouting-attack-history-toggle-01738 > span {
    font-size: .46rem;
    font-weight: 900;
    line-height: 1;
    color: var(--muted);
    text-align: center;
}
.scouting-attack-history-buttons-01738 {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 2px;
}
.scouting-attack-history-buttons-01738 button {
    min-width: 0;
    height: 21px;
    padding: 0 3px;
    border: 1px solid #ccd6cf;
    border-radius: 6px;
    background: #fff;
    color: #34453c;
    font-size: .44rem;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    touch-action: manipulation;
}
.scouting-attack-history-buttons-01738 button.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.view-only-mode .scouting-attack-history-toggle-01738,
.external-viewer .scouting-attack-history-toggle-01738 {
    pointer-events: auto !important;
    opacity: 1 !important;
}
@media (max-width: 1180px) {
    .scouting-attack-history-toggle-01738 {
        right: -88px;
        width: 82px;
        padding-inline: 3px;
    }
    .scouting-attack-history-buttons-01738 button { font-size: .40rem; }
}

/* Sechste Karte füllt das bislang freie Feld des 3x2-Programmraster. */
#view-settings .live-scouting-preferences-card-01738 {
    min-height: 0 !important;
    overflow: hidden !important;
}
.live-scouting-setting-row-01738 label {
    display: grid;
    grid-template-columns: minmax(0,1fr) 74px;
    align-items: center;
    gap: 7px;
    font-size: .60rem;
    font-weight: 850;
}
.live-scouting-setting-row-01738 input {
    width: 100%;
    height: 30px;
    min-width: 0;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-weight: 900;
    text-align: center;
    box-sizing: border-box;
}
.live-scouting-setting-block-01738 {
    display: grid;
    gap: 4px;
}
.live-scouting-setting-label-01738 {
    font-size: .58rem;
    font-weight: 900;
    color: var(--ink);
}
.live-scouting-segment-01738 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}
.live-scouting-segment-01738 button {
    height: 31px;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-size: .60rem;
    font-weight: 950;
    cursor: pointer;
    touch-action: manipulation;
}
.live-scouting-segment-01738 button.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.live-scouting-preferences-card-01738 > small {
    font-size: .52rem;
    line-height: 1.15;
    color: var(--muted);
}
@media (max-height: 760px) {
    .live-scouting-setting-row-01738 input,
    .live-scouting-segment-01738 button { height: 27px; }
    .live-scouting-preferences-card-01738 > small { font-size: .48rem; }
}

/* Automatisches Satzende blockiert die gesamte Scouting-Eingabe sofort; der
   Dialog selbst bleibt selbstverständlich bedienbar. */
html.set-end-input-locked-01738 #view-scouting .scouting-court-area,
html.set-end-input-locked-01738 #view-scouting .scouting-toolbar,
html.set-end-input-locked-01738 #view-scouting .score-card .score-controls,
html.set-end-input-locked-01738 #view-scouting .serve-side-button {
    pointer-events: none !important;
}
html.set-end-input-locked-01738 #setEndModal,
html.set-end-input-locked-01738 #setEndModal * {
    pointer-events: auto !important;
}
.set-end-actions {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
}
.set-end-actions > button {
    flex: 1 1 0;
}
.set-end-cancel-01738 {
    border-color: #c9d3cc !important;
    background: #fff !important;
    color: #26332d !important;
}

/* --------------------------------------------------------------------------
   0.17.39 – reparierte Scouting-Ebenen, kompakte Einstellungsseiten,
             kompletter Aktionseditor und persönliche Zuspieler-Farbe
   -------------------------------------------------------------------------- */

:root {
    --setter-color: #1976D2;
    --setter-color-soft: #DDEBFA;
}

/* Die Pfeile liegen wieder ÜBER beiden Court-Flächen, aber UNTER den
   Spielerinnen. Entscheidend: Der komplette rechte attack-target-wrapper darf
   keine eigene hohe Ebene mehr bilden – nur die drei roten AUS-Streifen sind
   als kleine, gezielte Hit-Flächen darübergelegt. */
#view-scouting .attack-target-wrapper {
    position: relative !important;
    z-index: auto !important;
    isolation: auto !important;
}
#view-scouting .rally-arrow-overlay {
    z-index: 30 !important;
    pointer-events: none !important;
}
#view-scouting .formation-player-token,
#view-scouting .continuous-court .player-token {
    position: absolute;
    z-index: 52 !important;
}
#view-scouting .substitution-bench,
#view-scouting .libero-parking {
    z-index: 54 !important;
}
#view-scouting .combined-volleyball-court .attack-out-strip {
    z-index: 42 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
}
#view-scouting .combined-volleyball-court .attack-out-bottom { z-index: 44 !important; }
#view-scouting .attack-bottom-actions { position: relative; z-index: 18 !important; }
#view-scouting .scouting-attack-style-legend-01737 { z-index: 56 !important; }
#view-scouting .scouting-attack-history-toggle-01738 { z-index: 58 !important; }

/* Zuspieler-Markierung: dieselbe persönliche Farbe im Scouting und in der
   Startaufstellung. Feldlinien bleiben davon unabhängig immer schwarz. */
.formation-player-token.setter-on-court,
#view-scouting .combined-volleyball-court.attack-situation-01713 .formation-player-token.setter-on-court:not(.libero-player) {
    box-shadow: 0 0 0 4px var(--setter-color) !important, 0 2px 7px rgba(0,0,0,.16) !important;
}
.lineup-position-button.setter-player {
    border-color: var(--setter-color) !important;
    box-shadow: inset 0 0 0 4px var(--setter-color) !important;
}
.active-set .lineup-position-button.setter-player {
    box-shadow: inset 0 0 0 6px var(--setter-color) !important;
}
.variant-position-marker.setter-marker {
    border-color: var(--setter-color) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--setter-color) 25%, transparent) !important;
    color: var(--setter-color) !important;
}

/* Live-Scouting-Einstellungen optisch identisch zu den übrigen Slider-Karten. */
#view-settings .live-scouting-preferences-card-01739 {
    min-height: 0 !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-rows: auto auto auto auto !important;
    align-content: start !important;
    gap: 6px !important;
}
.live-scouting-range-control-01739 { display: grid; gap: 4px; min-width: 0; }
.live-scouting-control-title-01739 {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    font-size: .58rem; color: var(--ink);
}
.live-scouting-control-title-01739 strong { font-weight: 950; }
.live-scouting-control-title-01739 span { color: var(--muted); font-weight: 850; }
.live-scouting-range-row-01739 {
    display: grid;
    grid-template-columns: minmax(0,1fr) 92px;
    gap: 8px;
    align-items: center;
}
.live-scouting-range-row-01739 > input[type="range"] { width: 100%; min-width: 0; }
.live-scouting-range-row-01739 label {
    min-width: 0; display: grid; grid-template-columns: auto 48px; gap: 5px; align-items: center;
    color: var(--muted); font-size: .52rem; font-weight: 900;
}
.live-scouting-range-row-01739 input[type="number"] {
    width: 48px; height: 30px; box-sizing: border-box; padding: 0 4px;
    border: 1px solid var(--border); border-radius: 8px; background: #fff;
    color: var(--ink); text-align: center; font: inherit; font-size: .62rem; font-weight: 950;
}
.live-scouting-setting-block-01739 { display: grid; gap: 4px; }
.live-scouting-setting-label-01739 { color: var(--ink); font-size: .58rem; font-weight: 950; }
.live-scouting-segment-01739 {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.live-scouting-segment-01739 button {
    min-width: 0; min-height: 36px; padding: 4px 7px;
    display: grid; align-content: center; gap: 1px;
    border: 1px solid var(--border); border-radius: 9px; background: #fff; color: var(--ink);
    cursor: pointer; touch-action: manipulation;
}
.live-scouting-segment-01739 button strong { font-size: .62rem; font-weight: 1000; line-height: 1.05; }
.live-scouting-segment-01739 button small { font-size: .45rem; color: var(--muted); font-weight: 800; line-height: 1.05; }
.live-scouting-segment-01739 button.active {
    border-color: var(--primary) !important;
    background: var(--primary-soft) !important;
    color: var(--primary-dark) !important;
    box-shadow: inset 0 0 0 1px var(--primary) !important;
}
.live-scouting-segment-01739 button.active small { color: var(--primary-dark); }

/* Farbschema: keine Seiten-Scrollbar. Vier Karten nutzen die vorhandene Höhe
   in einem 2x2-Raster. Die Libero- und Zuspieler-Karten sind bewusst kompakt. */
#view-theme,
#view-theme .theme-settings-page {
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
}
#view-theme .theme-settings-page {
    grid-template-rows: 34px 38px minmax(0,1fr) !important;
    gap: 5px !important;
}
#view-theme .settings-subnav { min-height: 34px !important; height: 34px !important; }
#view-theme .settings-subnav button { height: 28px !important; padding-block: 2px !important; }
#view-theme .settings-toolbar { min-height: 38px !important; height: 38px !important; }
#view-theme .theme-settings-grid {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-columns: minmax(240px,.72fr) minmax(390px,1.28fr) !important;
    grid-template-rows: minmax(0,.78fr) minmax(0,1.22fr) !important;
    gap: 6px !important;
    align-content: stretch !important;
}
#view-theme .theme-settings-grid > .side-card {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    padding: 7px 9px !important;
    gap: 5px !important;
    align-content: start !important;
}
#view-theme .theme-presets-card { grid-column:1; grid-row:1; }
#view-theme .theme-custom-card { grid-column:2; grid-row:1; }
#view-theme .setter-color-card-01739 { grid-column:1; grid-row:2; }
#view-theme .libero-color-card { grid-column:2; grid-row:2; }
#view-theme .theme-preset-buttons { gap: 4px !important; }
#view-theme .theme-preset-buttons button { min-height: 35px !important; padding: 3px 6px !important; grid-template-columns: 32px 1fr !important; gap: 5px !important; }
#view-theme .theme-preset-buttons button > span { width:30px !important; height:23px !important; }
#view-theme .theme-field-grid { gap: 5px !important; }
#view-theme .theme-field-grid > label { gap:2px !important; font-size:.52rem !important; }
#view-theme .theme-field-grid input[type="color"],
#view-theme .theme-field-grid input:not([type="color"]) { height:28px !important; }
#view-theme .libero-color-card { display:grid !important; grid-template-columns:1fr 1fr !important; grid-template-rows:auto minmax(0,1fr) auto !important; column-gap:6px !important; }
#view-theme .libero-color-card > .side-title-row { grid-column:1 / -1; }
#view-theme .libero-color-card > .libero-color-section { min-height:0; padding:5px !important; gap:4px !important; }
#view-theme .libero-color-card > .theme-save-row { grid-column:1 / -1; }
#view-theme .libero-color-section > strong { font-size:.56rem !important; }
#view-theme .libero-color-presets { gap:3px !important; }
#view-theme .libero-color-presets button { width:22px !important; height:22px !important; }
#view-theme .libero-color-custom { gap:4px !important; }
#view-theme .libero-color-custom > label { font-size:.48rem !important; gap:2px !important; }
#view-theme .libero-color-custom input[type="color"],
#view-theme .libero-color-custom input:not([type="color"]) { height:27px !important; }
#view-theme .theme-save-row { gap:6px !important; }
#view-theme .theme-save-row > span { font-size:.48rem !important; line-height:1.08 !important; }
#view-theme .theme-save-row .primary-action { min-height:28px !important; height:28px !important; padding:2px 8px !important; font-size:.53rem !important; }

.setter-color-card-01739 p { margin:0; color:var(--muted); font-size:.52rem; line-height:1.15; }
.setter-color-presets-01739 { display:flex; flex-wrap:wrap; gap:5px; }
.setter-color-presets-01739 button {
    width:28px; height:28px; padding:0; border:2px solid #fff; border-radius:8px;
    background:var(--swatch); box-shadow:0 0 0 1px var(--border); cursor:pointer;
}
.setter-color-presets-01739 button.active { box-shadow:0 0 0 2px var(--primary); transform:scale(1.05); }
.setter-color-custom-01739 { display:grid; grid-template-columns:minmax(0,1fr) 50px; gap:7px; align-items:end; }
.setter-color-custom-01739 label { display:grid; gap:3px; color:var(--muted); font-size:.52rem; font-weight:900; }
.setter-color-custom-01739 label > div { display:grid; grid-template-columns:38px minmax(0,1fr); gap:4px; }
.setter-color-custom-01739 input[type="color"] { width:38px; height:29px; padding:2px; border:1px solid var(--border); border-radius:7px; background:#fff; }
.setter-color-custom-01739 input:not([type="color"]) { min-width:0; height:29px; padding:0 6px; border:1px solid var(--border); border-radius:7px; font-size:.55rem; font-weight:850; }
.setter-color-custom-01739 input.invalid { border-color:#D64545; background:#FFF2F1; }
.setter-color-preview-01739 {
    --preview-setter-color:#1976D2;
    width:42px; height:42px; display:grid; place-items:center; justify-self:end;
    border-radius:50%; border:2px solid #d7ded9; background:#fff;
    box-shadow:0 0 0 4px var(--preview-setter-color); color:#102018; font-size:.78rem; font-weight:1000;
}

/* Aktionseditor: das Overlay selbst scrollt nie. Der komplette Angriffscourt
   (beide 9x9-Hälften plus rote AUS-Zonen) skaliert in die verfügbare Höhe. */
#actionModal .action-detail-card.action-edit-card {
    width: min(1120px, calc(100vw - 12px)) !important;
    height: calc(100dvh - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0,1fr) auto !important;
    overflow: hidden !important;
    padding: 7px !important;
}
#actionModal .action-edit-body {
    min-height: 0 !important;
    height: 100% !important;
    max-height: none !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-rows: auto auto minmax(0,1fr) !important;
    gap: 5px !important;
    padding: 2px 0 !important;
}
#actionModal .action-edit-summary { padding:5px 8px !important; }
#actionModal .action-edit-grid-01724 { gap:5px !important; }
#actionModal .action-edit-field { padding:4px 6px !important; gap:2px !important; }
#actionModal .action-edit-field select { height:28px !important; }
#actionModal .action-quality-buttons button,
#actionModal .action-phase-buttons button { min-height:28px !important; height:28px !important; }
#actionModal .action-court-panel { min-height:0 !important; height:100% !important; margin-top:0 !important; padding:5px !important; gap:4px !important; overflow:hidden !important; }
#actionModal .action-attack-panel-01726 { grid-template-rows:auto minmax(0,1fr) !important; }
#actionModal .action-volleyball-shell-01726 {
    min-height:0 !important; height:100% !important; width:100% !important;
    display:grid !important; place-items:center !important;
    padding:14px 14px 14px 0 !important; overflow:visible !important;
    --action-edit-out-size:14px; --action-edit-out-half:7px; --action-edit-out-half-neg:-7px;
}
#actionModal .action-volleyball-pair-01726 {
    width:100% !important;
    height:min(100%, 52dvh) !important;
    max-height:52dvh !important;
    min-height:0 !important;
    aspect-ratio:2 / 1 !important;
    overflow:visible !important;
}
#actionModal .action-modal-actions { min-height:34px !important; padding-top:4px !important; }
#actionModal .action-modal-actions button { min-height:32px !important; height:32px !important; }

@media (max-height: 700px) {
    #view-theme .theme-settings-page { grid-template-rows:31px 34px minmax(0,1fr) !important; gap:4px !important; }
    #view-theme .theme-settings-grid { gap:4px !important; }
    #view-theme .theme-settings-grid > .side-card { padding:5px 7px !important; gap:3px !important; }
    #view-theme .libero-color-section { padding:4px !important; }
    #actionModal .action-volleyball-pair-01726 { height:min(100%, 48dvh) !important; max-height:48dvh !important; }
}

@media (max-width: 900px) {
    #view-theme .theme-settings-grid {
        grid-template-columns:minmax(190px,.72fr) minmax(0,1.28fr) !important;
    }
    #view-theme .theme-field-grid { grid-template-columns:1fr 1fr !important; }
    #actionModal .action-edit-grid-01724 { grid-template-columns:1.35fr .85fr .65fr !important; }
}
/* 0.17.39 Feinschliff: Court-Seitenverhältnis im Editor nie verzerren. */
#actionModal .action-volleyball-pair-01726 {
    width: min(100%, 104dvh) !important;
    height: auto !important;
    max-height: 52dvh !important;
    aspect-ratio: 2 / 1 !important;
    justify-self: center !important;
}
@media (max-height:700px) {
    #actionModal .action-volleyball-pair-01726 { width:min(100%, 96dvh) !important; max-height:48dvh !important; }
}
/* Eine manuell gewählte Läuferposition ist im Eingabemodus jetzt voll
   bedienbar. Damit können Annahme, Angriff, normaler Wechsel und Libero-Wechsel
   auch nach einer bewussten Läuferwahl durchgeführt werden. */
.runner-preview-mode #view-scouting .combined-volleyball-court .court,
.runner-preview-mode #view-scouting .combined-volleyball-court .formation-player-token,
.runner-preview-mode #view-scouting .substitution-bench,
.runner-preview-mode #view-scouting .libero-parking,
.runner-preview-mode #view-scouting .court-bottom-actions,
.runner-preview-mode #view-scouting .serve-side-button,
.runner-preview-mode #view-scouting .score-controls {
    pointer-events: auto !important;
}

/* --------------------------------------------------------------------------
   0.17.40 – Interaktionsebenen, kompakte Live-Controls und Layoutkorrekturen
   -------------------------------------------------------------------------- */

/* Scouting-Layer von Grund auf eindeutig ordnen. Nur echte interaktive
   Flächen nehmen Pointer-Ereignisse an. Unsichtbare Wrapper können dadurch
   weder Annahmespielerinnen noch Wechsel/Libero oder Aufschlag blockieren. */
#view-scouting .combined-volleyball-court {
    isolation: isolate !important;
    position: relative !important;
    overflow: visible !important;
}
#view-scouting .combined-volleyball-court .court-slot,
#view-scouting .combined-volleyball-court .continuous-court-frame,
#view-scouting .combined-volleyball-court .attack-court-frame {
    z-index: auto !important;
    isolation: auto !important;
}
#view-scouting .reception-court-frame,
#view-scouting .attack-target-wrapper,
#view-scouting .attack-court-frame {
    pointer-events: none !important;
}
#view-scouting #scoutingCourt,
#view-scouting #attackCourt,
#view-scouting .formation-player-token,
#view-scouting .substitution-bench,
#view-scouting .substitution-bench *,
#view-scouting .libero-parking,
#view-scouting .libero-parking *,
#view-scouting .court-bottom-actions,
#view-scouting .court-bottom-actions *,
#view-scouting .serve-side-button,
#view-scouting .scouting-attack-history-toggle-01738,
#view-scouting .scouting-attack-history-toggle-01738 * {
    pointer-events: auto !important;
}
#view-scouting .court-zone-overlay,
#view-scouting .target-marker,
#view-scouting .attack-phase-indicator-01713,
#view-scouting .scouting-attack-style-legend-01737 {
    pointer-events: none !important;
}

/* Pfeile garantiert oberhalb der Feldflächen, Spielerinnen und Bedienung aber
   weiterhin darüber. */
#view-scouting .rally-arrow-overlay {
    z-index: 70 !important;
    pointer-events: none !important;
    overflow: visible !important;
}
#view-scouting .formation-player-token,
#view-scouting .continuous-court .player-token {
    z-index: 82 !important;
    pointer-events: auto !important;
}
#view-scouting .substitution-bench,
#view-scouting .libero-parking {
    position: absolute !important;
    z-index: 88 !important;
    pointer-events: auto !important;
}
#view-scouting .combined-volleyball-court .attack-out-strip {
    z-index: 78 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
}
#view-scouting .combined-volleyball-court .attack-out-bottom { z-index: 79 !important; }
#view-scouting .serve-side-button { z-index: 92 !important; opacity: 1 !important; }
#view-scouting .serve-side-button:disabled { opacity: .42 !important; }
#view-scouting .scouting-attack-style-legend-01737 { z-index: 90 !important; }
#view-scouting .scouting-attack-history-toggle-01738 { z-index: 94 !important; }

/* Der Live-Umschalter bleibt schmal und stapelt seine beiden Optionen. */
.scouting-attack-history-toggle-01738 {
    width: 82px !important;
    right: -89px !important;
    min-height: 66px !important;
    grid-template-rows: auto 1fr !important;
    gap: 4px !important;
    padding: 5px !important;
}
.scouting-attack-history-toggle-01738 > span {
    font-size: .53rem !important; /* ca. +15 % */
    line-height: 1.05 !important;
}
.scouting-attack-history-buttons-01738 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: repeat(2, 24px) !important;
    gap: 4px !important;
}
.scouting-attack-history-buttons-01738 button {
    width: 100% !important;
    height: 24px !important;
    font-size: .51rem !important; /* ca. +15 % */
    padding-inline: 3px !important;
}
@media (max-width:1180px) {
    .scouting-attack-history-toggle-01738 { right:-82px !important; width:76px !important; }
    .scouting-attack-history-buttons-01738 button { font-size:.48rem !important; }
}

/* Live-Scouting-Karte: klare vertikale Abstände, Speichern immer in eigener
   letzter Zeile statt in die Sortierbuttons zu rutschen. */
#view-settings .live-scouting-preferences-card-01739 {
    grid-template-rows: auto auto auto auto !important;
    row-gap: 8px !important;
}
#view-settings .live-scouting-preferences-card-01739 > .primary-action {
    margin-top: 4px !important;
    align-self: end !important;
}
.live-scouting-setting-block-01739 { margin-top: 1px !important; }

/* Libero in der Live-Annahmequalitätsliste: kleines, sauberes Achteck ohne
   Überlagerung der Statistik oder des Namens. */
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number {
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    font-size: .72rem !important;
}
#view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number::before {
    inset: 0 !important;
    box-shadow: none !important;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175,
.external-viewer #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 {
    grid-template-columns: 28px minmax(0,1fr) auto !important;
}
.view-only-mode #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number,
.external-viewer #view-scouting #receiverStats .receiver-stat-row.libero-stat-row-0175 .receiver-stat-number {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    font-size: .64rem !important;
}

/* Annahmeauswertung: Libero ohne schraffierte Hinterlegung. Text darf weder
   an der Ober- noch an der Unterkante abgeschnitten werden. */
.reception-eval-number.reception-eval-libero-01732 {
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
}
.reception-eval-number.reception-eval-libero-01732::before { display: none !important; }
.reception-eval-number.reception-eval-libero-01732::after {
    inset: 0 !important;
    z-index: -1 !important;
    background: var(--libero-color, #6F2DBD) !important;
    box-shadow: none !important;
}
.reception-evaluation-row.reception-evaluation-row-01732 {
    overflow: visible !important;
}
.reception-eval-name strong,
.reception-eval-corridor-01710,
.reception-eval-split-01732 {
    line-height: 1.16 !important;
    overflow: visible !important;
}

/* Eigene Mannschaften: Editierleiste bekommt echte Höhe und ein stabiles Grid.
   Mannschaft, Liga, Speichern/Löschen sowie Spielerin+ bleiben immer sichtbar. */
#view-teams .teams-page {
    grid-template-rows: 42px 54px 54px 92px 32px minmax(0,1fr) !important;
    gap: 6px !important;
    overflow: hidden !important;
}
#view-teams .teams-toolbar { min-height:54px !important; height:54px !important; }
#view-teams .team-button-grid {
    min-height:0 !important;
    height:54px !important;
    grid-template-rows: repeat(2, minmax(0,1fr)) !important;
    align-content:stretch !important;
    overflow:hidden !important;
}
#view-teams .team-edit-bar-01731 {
    min-height:92px !important;
    height:92px !important;
    display:grid !important;
    grid-template-columns: minmax(240px,1.1fr) minmax(430px,1.55fr) auto auto auto !important;
    grid-template-rows: 48px 30px !important;
    gap:5px 7px !important;
    align-items:end !important;
    overflow:visible !important;
    padding:5px 7px !important;
}
#view-teams .team-edit-bar-01731 .team-name-editor { grid-column:1; grid-row:1; min-width:0 !important; }
#view-teams .team-edit-bar-01731 .team-local-league-fields { grid-column:2; grid-row:1; min-width:0 !important; width:100% !important; }
#view-teams #saveTeamNameButton { grid-column:3; grid-row:1; }
#view-teams #deleteLocalTeamButton,
#view-teams #copyLocalTeamButton { grid-column:4; grid-row:1; }
#view-teams #addPlayerButton { grid-column:5; grid-row:1; min-width:96px !important; }
#view-teams .team-edit-bar-01731 .team-roster-meta {
    grid-column:1 / span 3 !important;
    grid-row:2 !important;
    order:unset !important;
    align-self:center !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
}
#view-teams #rosterPrevPage { grid-column:4; grid-row:2; justify-self:end; }
#view-teams #rosterPageInfo { grid-column:5; grid-row:2; justify-self:start; align-self:center; padding-left:2px; }
#view-teams #rosterNextPage { grid-column:5; grid-row:2; justify-self:end; }
#view-teams .roster-list-head { height:32px !important; }
#view-teams .roster-grid { overflow:hidden !important; }
@media (max-width:1180px) {
    #view-teams .team-edit-bar-01731 {
        grid-template-columns:minmax(200px,1fr) minmax(330px,1.4fr) auto auto !important;
    }
    #view-teams #addPlayerButton { grid-column:4; grid-row:2; justify-self:end; }
    #view-teams #deleteLocalTeamButton,
    #view-teams #copyLocalTeamButton { grid-column:4; grid-row:1; }
    #view-teams .team-edit-bar-01731 .team-roster-meta { grid-column:1 / span 2 !important; }
    #view-teams #rosterPrevPage { grid-column:3; grid-row:2; }
    #view-teams #rosterPageInfo { grid-column:3; grid-row:2; justify-self:center; }
    #view-teams #rosterNextPage { grid-column:3; grid-row:2; justify-self:end; }
}

/* Spielbericht: die Satzkarte ist hoch genug für alle fünf Satzzeilen. Die
   Spielerinnen-Tabelle beginnt erst darunter. */
#view-report .report-page {
    grid-template-rows: 42px clamp(176px, 24dvh, 220px) minmax(0,1fr) !important;
}
#view-report .report-summary-grid { overflow: visible !important; }
#view-report .report-set-card { overflow: visible !important; }
#view-report .report-set-table-wrap { overflow: visible !important; }
#view-report .report-set-table th,
#view-report .report-set-table td { height: 22px !important; padding-block:3px !important; }

/* Aktionseditor: niemals scrollen; der komplette 18x9-Court bleibt inklusive
   roter AUS-Zonen innerhalb des Overlays sichtbar. */
#actionModal,
#actionModal .action-detail-card.action-edit-card,
#actionModal .action-edit-body,
#actionModal .action-court-panel {
    overflow: hidden !important;
}
#actionModal .action-volleyball-shell-01726 {
    min-height:0 !important;
    height:100% !important;
    padding:12px 18px 18px 2px !important;
}
#actionModal .action-volleyball-pair-01726 {
    width:min(100%, 92dvh) !important;
    max-height:46dvh !important;
    height:auto !important;
    aspect-ratio:2 / 1 !important;
}

/* Z-Pos-Auswertung: Startnummern bewusst kleiner als in der Läufer-K1-
   Detailauswertung. */
#evaluationSetterPositionGrid .evaluation-court-svg text.attack-player-number-01740 {
    font-size: 36px !important;
}

/* Startaufstellung: der kleine redundante „aktuell links/rechts“-Hinweis ist
   entfernt; die große Links/Rechts-Fläche bleibt die eindeutige Anzeige. */
.set-side-choice-head > span { display:none !important; }

/* Seitliche Aufschlagtasten etwas höher zentrieren, damit sie nicht in die
   untere Aktions-/Punktfolgenzone rutschen. */
#view-scouting .serve-side-button { top:46% !important; }

/* Unter runner-preview bleiben sämtliche Eingabeelemente ausdrücklich aktiv. */
.runner-preview-mode #view-scouting .combined-volleyball-court .formation-player-token,
.runner-preview-mode #view-scouting .substitution-bench,
.runner-preview-mode #view-scouting .substitution-bench *,
.runner-preview-mode #view-scouting .libero-parking,
.runner-preview-mode #view-scouting .libero-parking *,
.runner-preview-mode #view-scouting .serve-side-button,
.runner-preview-mode #view-scouting #scoutingCourt,
.runner-preview-mode #view-scouting #attackCourt {
    pointer-events:auto !important;
    opacity:1 !important;
}

/* 0.17.40 finaler Layer-Fix: Die linke Feldhälfte ist die zentrale
   Eingabeoberfläche. Auf iPadOS bleibt ihr Frame deshalb selbst pointer-fähig;
   nur rein dekorative Overlays sind pointer-transparent. Das vermeidet das
   Safari-Verhalten, bei dem pointer-events:none auf einem Elternknoten trotz
   pointer-events:auto am Kind Touch-Ziele unzuverlässig machen kann. */
#view-scouting .reception-court-slot,
#view-scouting .reception-court-frame,
#view-scouting .scouting-court-frame,
#view-scouting #scoutingCourt {
    pointer-events: auto !important;
}
#view-scouting .reception-court-frame {
    position: relative !important;
    z-index: 10 !important;
}
#view-scouting .attack-target-wrapper,
#view-scouting .attack-court-frame {
    pointer-events: none !important;
}
#view-scouting #attackCourt,
#view-scouting .attack-out-strip {
    pointer-events: auto !important;
}
#view-scouting .court-zone-overlay,
#view-scouting .rally-arrow-overlay,
#view-scouting .target-marker,
#view-scouting .attack-line,
#view-scouting .attack-phase-indicator-01713,
#view-scouting .scouting-attack-style-legend-01737 {
    pointer-events: none !important;
}
#view-scouting .formation-player-token {
    position: absolute !important;
    z-index: 110 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
}
#view-scouting .substitution-bench,
#view-scouting .libero-parking {
    z-index: 114 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
}
#view-scouting .rally-arrow-overlay { z-index: 80 !important; }
#view-scouting .attack-out-strip { z-index: 90 !important; }
#view-scouting .serve-side-button {
    z-index: 118 !important;
    top: 43% !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    touch-action: manipulation !important;
}

/* Live-Angriffsfilter: kleine Hochformatkarte; Titel, Alle und Letzte N stehen
   wirklich untereinander. Die Typografie ist gegenüber der alten Karte ca.
   15 % größer. */
#view-scouting .scouting-attack-history-toggle-01738 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto !important;
    width: 84px !important;
    right: -91px !important;
    min-height: 82px !important;
    padding: 6px !important;
    gap: 5px !important;
    align-content: start !important;
}
#view-scouting .scouting-attack-history-toggle-01738 > span {
    display: block !important;
    text-align: center !important;
    font-size: .61rem !important;
    line-height: 1.05 !important;
}
#view-scouting .scouting-attack-history-buttons-01738 {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    width: 100% !important;
}
#view-scouting .scouting-attack-history-buttons-01738 button {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 27px !important;
    min-height: 27px !important;
    padding: 0 3px !important;
    font-size: .58rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

/* Programmeinstellungen – Live-Scouting: Speichern steht in einer eigenen
   Zeile mit ausreichend Abstand zu den Segment-Buttons. */
#view-settings .live-scouting-preferences-card-01739 {
    display: grid !important;
    grid-template-rows: auto auto auto auto !important;
    align-content: start !important;
    gap: 9px !important;
}
#view-settings .live-scouting-preferences-card-01739 #saveLiveScoutingPreferences01738 {
    margin-top: 7px !important;
    width: 100% !important;
    align-self: end !important;
}
#view-settings .live-scouting-setting-block-01739,
#view-settings .live-scouting-range-control-01739 { min-height: 0 !important; }

/* Eigene Mannschaften: genügend Platz für Team-Auswahl, Liga-Daten und die
   komplette Bearbeitungsleiste. Spielerin+ bleibt immer sichtbar. */
#view-teams .teams-page {
    grid-template-rows: 42px 56px 72px 118px 34px minmax(0,1fr) !important;
    gap: 6px !important;
}
#view-teams .team-button-grid {
    height: 72px !important;
    min-height: 72px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}
#view-teams .team-edit-bar-01731 {
    height: 118px !important;
    min-height: 118px !important;
    display: grid !important;
    grid-template-columns: minmax(250px,1.1fr) minmax(470px,1.55fr) auto auto auto !important;
    grid-template-rows: 54px 42px !important;
    gap: 8px !important;
    align-items: end !important;
    overflow: visible !important;
    padding: 8px !important;
}
#view-teams .team-edit-bar-01731 .team-name-editor,
#view-teams .team-edit-bar-01731 .team-local-league-fields { align-self: stretch !important; }
#view-teams #addPlayerButton {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 104px !important;
    justify-content: center !important;
}
#view-teams .roster-grid { min-height: 0 !important; overflow: auto !important; }

/* Spielbericht: Satzkarte erhält ausreichend feste Höhe für alle fünf Sätze
   und sämtliche Zwischenstände; die Spielerinnentabelle beginnt darunter. */
#view-report .report-page {
    grid-template-rows: 42px clamp(230px, 29dvh, 290px) minmax(0,1fr) !important;
}
#view-report .report-summary-grid,
#view-report .report-set-card,
#view-report .report-set-table-wrap,
#view-report .report-set-table { min-height: 0 !important; overflow: visible !important; }
#view-report .report-set-table th,
#view-report .report-set-table td {
    height: 27px !important;
    min-height: 27px !important;
    padding-block: 4px !important;
}

/* Annahmeauswertung: keine abgeschnittenen Glyphen und keine Schraffur beim
   Libero. Das Achteck bleibt kompakt und rein einfarbig. */
#evaluationReceptionPanel .reception-evaluation-row,
#evaluationReceptionPanel .reception-eval-name,
#evaluationReceptionPanel .reception-eval-name strong,
#evaluationReceptionPanel .reception-eval-number,
#evaluationReceptionPanel .reception-eval-corridor-01710,
#evaluationReceptionPanel .reception-eval-split-01732 {
    overflow: visible !important;
    line-height: 1.22 !important;
}
#evaluationReceptionPanel .reception-evaluation-row { min-height: 47px !important; padding-block: 5px !important; }
#evaluationReceptionPanel .reception-eval-number.reception-eval-libero-01732 {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
}
#evaluationReceptionPanel .reception-eval-number.reception-eval-libero-01732::before {
    display: none !important;
    background: none !important;
}
#evaluationReceptionPanel .reception-eval-number.reception-eval-libero-01732::after {
    inset: 0 !important;
    background: var(--libero-color, #6F2DBD) !important;
    box-shadow: none !important;
}

/* Angriffe Z-Pos: Trikotnummern am Start bewusst kleiner als in AgRi K1. */
#evaluationSetterPositionGrid .evaluation-court-svg text { text-rendering: geometricPrecision; }

/* Aktionseditor Angriff: die vollständige 18x9-m-Fläche inklusive AUS-Zonen
   passt in das Modal; das Modal selbst scrollt nie. */
#actionModal .action-detail-card.action-edit-card,
#actionModal .action-edit-body,
#actionModal .action-court-panel,
#actionModal .action-volleyball-shell-01726 { overflow: hidden !important; }
#actionModal .action-volleyball-pair-01726 {
    width: min(100%, 86dvh) !important;
    max-width: 100% !important;
    max-height: 43dvh !important;
    height: auto !important;
    aspect-ratio: 2 / 1 !important;
}
@media (max-height: 720px) {
    #actionModal .action-volleyball-pair-01726 {
        width: min(100%, 78dvh) !important;
        max-height: 39dvh !important;
    }
}
/* Manuelle Läuferposition = echte Eingabeansicht, nicht Read-only-Vorschau. */
.runner-preview-mode #view-scouting .court-bottom-actions,
.runner-preview-mode #view-scouting .court-bottom-actions *,
.runner-preview-mode #view-scouting .score-controls,
.runner-preview-mode #view-scouting .score-controls * {
    pointer-events: auto !important;
    opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   0.17.41 – eindeutige Feld-Layer, 3×2-Einstellungsraster, kompakte
             Farbkarten, aktiver Live-Angriffsfilter und scrollfreier Spielkader
   -------------------------------------------------------------------------- */

/* Feld-Layer: Die Rally-Pfeile sind die oberste rein grafische Ebene des
   Courts. Sie fangen NIE Pointer-Ereignisse ab, dürfen also Spielerinnen,
   Wechsel, Aufschlag und AUS-Flächen visuell überzeichnen, ohne sie zu blockieren. */
#view-scouting .combined-volleyball-court { isolation:isolate !important; }
#view-scouting .court-zone-overlay,
#view-scouting .target-marker,
#view-scouting .attack-line,
#view-scouting .attack-phase-indicator-01713 { z-index:20 !important; pointer-events:none !important; }
#view-scouting .combined-volleyball-court .attack-out-strip {
    z-index:90 !important;
    pointer-events:auto !important;
}
#view-scouting .formation-player-token,
#view-scouting .continuous-court .player-token {
    z-index:120 !important;
    pointer-events:auto !important;
}
#view-scouting .substitution-bench,
#view-scouting .libero-parking {
    z-index:130 !important;
    pointer-events:auto !important;
}
#view-scouting .serve-side-button {
    z-index:140 !important;
    pointer-events:auto !important;
}
#view-scouting .rally-arrow-overlay {
    z-index:240 !important;
    pointer-events:none !important;
    overflow:visible !important;
}

/* Live-Filter als schmale, komplett außerhalb des Spielfelds stehende Karte.
   Alle Inhalte stehen untereinander; die Legende ist Teil derselben Karte und
   kann daher niemals Court oder roten AUS-Rahmen überdecken. */
#view-scouting .scouting-attack-filter-card-01741 {
    position:absolute !important;
    top:4px !important;
    right:-96px !important;
    width:88px !important;
    min-height:0 !important;
    max-height:226px !important;
    padding:6px !important;
    display:grid !important;
    grid-template-columns:1fr !important;
    grid-auto-rows:auto !important;
    align-content:start !important;
    gap:6px !important;
    box-sizing:border-box !important;
    border:1px solid var(--border) !important;
    border-radius:10px !important;
    background:var(--surface) !important;
    box-shadow:0 3px 10px rgba(0,0,0,.10) !important;
    z-index:300 !important;
    pointer-events:auto !important;
    overflow:hidden !important;
}
#view-scouting .scouting-attack-filter-title-01741 {
    display:block !important;
    text-align:center !important;
    font-size:.64rem !important;
    line-height:1 !important;
    font-weight:1000 !important;
    color:var(--muted) !important;
}
#view-scouting .scouting-attack-filter-group-01741 {
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:3px !important;
    min-width:0 !important;
}
#view-scouting .scouting-attack-filter-group-01741 > small {
    text-align:center !important;
    font-size:.51rem !important;
    line-height:1 !important;
    font-weight:900 !important;
    color:var(--muted) !important;
}
#view-scouting .scouting-attack-player-buttons-01741,
#view-scouting .scouting-attack-history-buttons-01738 {
    display:flex !important;
    flex-direction:column !important;
    gap:3px !important;
    width:100% !important;
}
#view-scouting .scouting-attack-player-buttons-01741 button,
#view-scouting .scouting-attack-history-buttons-01738 button {
    width:100% !important;
    min-width:0 !important;
    height:25px !important;
    min-height:25px !important;
    padding:0 3px !important;
    border:1px solid var(--border) !important;
    border-radius:7px !important;
    background:#fff !important;
    color:var(--ink) !important;
    font:inherit !important;
    font-size:.59rem !important;
    line-height:1 !important;
    font-weight:950 !important;
    white-space:nowrap !important;
    cursor:pointer !important;
    touch-action:manipulation !important;
}
#view-scouting .scouting-attack-player-buttons-01741 button.active,
#view-scouting .scouting-attack-history-buttons-01738 button.active {
    border-color:var(--primary) !important;
    background:var(--primary-soft) !important;
    color:var(--primary-dark) !important;
    box-shadow:inset 0 0 0 1px var(--primary) !important;
}
#view-scouting .scouting-attack-style-legend-01737 {
    position:static !important;
    inset:auto !important;
    width:100% !important;
    max-width:100% !important;
    max-height:70px !important;
    margin:0 !important;
    padding:4px !important;
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:2px 3px !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
    border:1px solid var(--border) !important;
    border-radius:7px !important;
    background:color-mix(in srgb, var(--surface) 94%, transparent) !important;
    box-shadow:none !important;
    z-index:auto !important;
    pointer-events:none !important;
}
#view-scouting .scouting-attack-style-legend-01737[hidden] { display:none !important; }
#view-scouting .scouting-attack-style-legend-item-01737 {
    min-width:0 !important;
    display:grid !important;
    grid-template-columns:18px minmax(0,1fr) !important;
    gap:2px !important;
    align-items:center !important;
    padding:0 !important;
    font-size:.48rem !important;
    line-height:1 !important;
}
#view-scouting .scouting-attack-style-legend-item-01737 b {
    min-width:0 !important;
    text-align:center !important;
    font-size:.50rem !important;
    line-height:1 !important;
}
#view-scouting .scouting-attack-style-swatch-01737 {
    width:18px !important;
    min-width:18px !important;
}
@media (max-width:1180px) {
    #view-scouting .scouting-attack-filter-card-01741 { right:-88px !important; width:82px !important; }
    #view-scouting .scouting-attack-player-buttons-01741 button,
    #view-scouting .scouting-attack-history-buttons-01738 button { font-size:.54rem !important; }
}

/* Programmeinstellungen: sechs definierte Plätze, exakt 3×2. Keine Karte darf
   die Seite über die verfügbare Höhe hinaus vergrößern. */
#view-settings .program-settings-page {
    height:100% !important;
    max-height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
}
#view-settings .program-settings-grid {
    min-height:0 !important;
    height:100% !important;
    overflow:hidden !important;
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    grid-template-rows:repeat(2,minmax(0,1fr)) !important;
    gap:6px !important;
    align-content:stretch !important;
}
#view-settings .program-settings-grid > .side-card {
    min-width:0 !important;
    min-height:0 !important;
    height:100% !important;
    overflow:hidden !important;
    padding:8px 10px !important;
    gap:5px !important;
    align-content:start !important;
    box-sizing:border-box !important;
}
#view-settings .program-settings-grid .side-title { font-size:.68rem !important; }
#view-settings .program-settings-grid .side-hint { font-size:.48rem !important; }
#view-settings .program-settings-grid p,
#view-settings .program-settings-grid .program-mode-hint { font-size:.52rem !important; line-height:1.18 !important; margin-block:2px !important; }
#view-settings .program-settings-grid .primary-action { min-height:30px !important; height:30px !important; font-size:.55rem !important; }
#view-settings .live-scouting-preferences-card-01739 { row-gap:7px !important; }
#view-settings .live-scouting-preferences-card-01739 #saveLiveScoutingPreferences01738 { margin-top:9px !important; }
#view-settings .live-scouting-range-row-01739 { grid-template-columns:minmax(0,1fr) 82px !important; gap:6px !important; }
#view-settings .live-scouting-segment-01739 button { min-height:31px !important; height:31px !important; padding:3px 5px !important; }
#view-settings .live-scouting-segment-01739 button strong { font-size:.56rem !important; }
#view-settings .live-scouting-segment-01739 button small { font-size:.40rem !important; }

/* Farbschema: ebenfalls 3×2. Die vier vorhandenen Karten belegen bewusst die
   ersten vier Rasterzellen; Zellen 5/6 bleiben als Reserve frei. */
#view-theme .theme-settings-grid {
    min-height:0 !important;
    height:100% !important;
    overflow:hidden !important;
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    grid-template-rows:repeat(2,minmax(0,1fr)) !important;
    gap:6px !important;
    align-content:stretch !important;
}
#view-theme .theme-settings-grid > .side-card {
    min-width:0 !important;
    min-height:0 !important;
    height:100% !important;
    overflow:hidden !important;
    padding:7px 8px !important;
    gap:4px !important;
    align-content:start !important;
    box-sizing:border-box !important;
}
#view-theme .theme-presets-card { grid-column:1 !important; grid-row:1 !important; }
#view-theme .theme-custom-card { grid-column:2 !important; grid-row:1 !important; }
#view-theme .libero-color-card { grid-column:3 !important; grid-row:1 !important; }
#view-theme .setter-color-card-01739 { grid-column:1 !important; grid-row:2 !important; }

/* Libero-Karte deutlich kleiner: beide Farbbereiche nebeneinander, kleine
   Swatches/Inputs und nur eine kompakte Speichern-Zeile. */
#view-theme .libero-color-card {
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    grid-template-rows:auto minmax(0,1fr) auto !important;
    column-gap:5px !important;
    row-gap:4px !important;
}
#view-theme .libero-color-card > .side-title-row { grid-column:1 / -1 !important; }
#view-theme .libero-color-card > .libero-color-section {
    min-width:0 !important;
    min-height:0 !important;
    padding:3px !important;
    gap:3px !important;
    border-radius:7px !important;
}
#view-theme .libero-color-section > strong { font-size:.50rem !important; }
#view-theme .libero-color-presets { gap:2px !important; }
#view-theme .libero-color-presets button {
    width:17px !important;
    height:17px !important;
    min-width:17px !important;
    min-height:17px !important;
    border-radius:5px !important;
}
#view-theme .libero-color-custom { gap:2px !important; }
#view-theme .libero-color-custom > label { gap:1px !important; font-size:.42rem !important; line-height:1 !important; }
#view-theme .libero-color-custom > label > div { grid-template-columns:28px minmax(0,1fr) !important; gap:3px !important; }
#view-theme .libero-color-custom input[type="color"] { width:28px !important; height:23px !important; padding:1px !important; }
#view-theme .libero-color-custom input:not([type="color"]) { height:23px !important; min-width:0 !important; padding:0 4px !important; font-size:.46rem !important; }
#view-theme .libero-color-preview { width:28px !important; height:28px !important; min-width:28px !important; font-size:.58rem !important; }
#view-theme .libero-color-card > .theme-save-row {
    grid-column:1 / -1 !important;
    min-height:28px !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:5px !important;
    align-items:center !important;
}
#view-theme .libero-color-card > .theme-save-row > span { font-size:.40rem !important; line-height:1.05 !important; }
#view-theme .libero-color-card > .theme-save-row .primary-action { min-height:26px !important; height:26px !important; padding:2px 7px !important; font-size:.48rem !important; }

/* Zuspieler-Farbe: keine überlappenden Zeilen mehr. */
#view-theme .setter-color-card-01739 {
    display:grid !important;
    grid-template-rows:auto auto auto auto auto !important;
    align-content:start !important;
    gap:5px !important;
}
#view-theme .setter-color-card-01739 p {
    margin:0 !important;
    font-size:.48rem !important;
    line-height:1.12 !important;
}
#view-theme .setter-color-presets-01739 {
    display:grid !important;
    grid-template-columns:repeat(6,24px) !important;
    gap:4px !important;
    align-items:center !important;
}
#view-theme .setter-color-presets-01739 button {
    width:24px !important;
    height:24px !important;
    min-width:24px !important;
    min-height:24px !important;
    border-radius:7px !important;
}
#view-theme .setter-color-custom-01739 {
    min-width:0 !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) 42px !important;
    gap:5px !important;
    align-items:end !important;
}
#view-theme .setter-color-custom-01739 label { min-width:0 !important; font-size:.45rem !important; gap:2px !important; }
#view-theme .setter-color-custom-01739 label > div { grid-template-columns:31px minmax(0,1fr) !important; gap:3px !important; }
#view-theme .setter-color-custom-01739 input[type="color"] { width:31px !important; height:25px !important; padding:1px !important; }
#view-theme .setter-color-custom-01739 input:not([type="color"]) { height:25px !important; padding:0 4px !important; font-size:.48rem !important; }
#view-theme .setter-color-preview-01739 { width:36px !important; height:36px !important; min-width:36px !important; font-size:.65rem !important; }
#view-theme .setter-color-card-01739 > .theme-save-row {
    min-height:28px !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:5px !important;
    align-items:center !important;
}
#view-theme .setter-color-card-01739 > .theme-save-row > span { font-size:.40rem !important; line-height:1.05 !important; }
#view-theme .setter-color-card-01739 > .theme-save-row .primary-action { min-height:26px !important; height:26px !important; padding:2px 7px !important; font-size:.48rem !important; }

/* Spielkader: Das Modal und die Liste selbst scrollen nicht. Die vorhandene
   Höhe wird auf sämtliche Spielerzeilen gleichmäßig verteilt. */
#activeRosterModal { padding:7px !important; overflow:hidden !important; }
#activeRosterModal .active-roster-modal-card {
    width:calc(100vw - 14px) !important;
    max-width:none !important;
    height:calc(100dvh - 14px) !important;
    max-height:calc(100dvh - 14px) !important;
    min-height:0 !important;
    display:grid !important;
    grid-template-rows:34px 34px 38px 25px minmax(0,1fr) !important;
    gap:4px !important;
    padding:7px !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
}
#activeRosterModal .modal-head { min-height:34px !important; height:34px !important; }
#activeRosterModal .active-roster-note {
    min-height:0 !important;
    height:34px !important;
    padding:4px 7px !important;
    font-size:.50rem !important;
    line-height:1.12 !important;
    overflow:hidden !important;
}
#activeRosterModal .active-roster-add-row {
    height:38px !important;
    min-height:38px !important;
    display:grid !important;
    grid-template-columns:112px minmax(220px,1fr) 150px 132px !important;
    gap:5px !important;
    align-items:center !important;
}
#activeRosterModal .active-roster-add-row label {
    min-width:0 !important;
    display:grid !important;
    grid-template-columns:auto minmax(0,1fr) !important;
    gap:4px !important;
    align-items:center !important;
    font-size:.50rem !important;
    line-height:1 !important;
}
#activeRosterModal .active-roster-add-row input {
    min-width:0 !important;
    height:28px !important;
    padding:0 5px !important;
    font-size:.58rem !important;
}
#activeRosterModal .active-roster-add-row .primary-action {
    min-height:28px !important;
    height:28px !important;
    padding:2px 7px !important;
    font-size:.52rem !important;
}
#activeRosterModal .active-roster-table-head {
    height:25px !important;
    min-height:25px !important;
    padding:0 5px !important;
    font-size:.50rem !important;
    border-radius:6px !important;
}
#activeRosterModal .active-roster-list {
    min-height:0 !important;
    height:100% !important;
    overflow:hidden !important;
    display:grid !important;
    align-content:stretch !important;
    gap:2px !important;
    padding:0 !important;
}
#activeRosterModal .active-roster-row {
    min-height:0 !important;
    height:100% !important;
    padding:1px 5px !important;
    gap:5px !important;
    border-radius:6px !important;
    overflow:hidden !important;
}
#activeRosterModal .active-roster-table-head,
#activeRosterModal .active-roster-row {
    grid-template-columns:64px minmax(190px,1fr) 98px 104px 104px 88px !important;
}
#activeRosterModal .active-roster-row input[type="text"],
#activeRosterModal .active-roster-row input[type="number"] {
    height:min(26px, 100%) !important;
    min-height:20px !important;
    padding:0 5px !important;
    font-size:.54rem !important;
    border-radius:5px !important;
}
#activeRosterModal .active-roster-switch {
    grid-template-columns:28px 1fr !important;
    gap:4px !important;
    font-size:.50rem !important;
}
#activeRosterModal .active-roster-switch-track { width:28px !important; height:17px !important; }
#activeRosterModal .active-roster-switch-track::after { width:13px !important; height:13px !important; }
#activeRosterModal .active-roster-switch input:checked + .active-roster-switch-track::after { transform:translateX(11px) !important; }
#activeRosterModal .active-roster-save {
    min-height:20px !important;
    height:min(26px,100%) !important;
    padding:1px 5px !important;
    font-size:.49rem !important;
}
@media (max-height:700px) {
    #activeRosterModal .active-roster-modal-card {
        grid-template-rows:31px 29px 34px 23px minmax(0,1fr) !important;
        gap:3px !important;
        padding:5px !important;
    }
    #activeRosterModal .active-roster-note { height:29px !important; font-size:.45rem !important; }
    #activeRosterModal .active-roster-add-row { height:34px !important; min-height:34px !important; }
    #activeRosterModal .active-roster-table-head { height:23px !important; min-height:23px !important; }
}

/* iPadOS/Safari: keine interaktiven Kinder unter einem pointer-transparenten
   Elternknoten. Wrapper und Court-Frames bleiben deshalb selbst interaktiv;
   ausschließlich grafische SVG/Marker sind pointer-transparent. */
#view-scouting .reception-court-frame,
#view-scouting .attack-target-wrapper,
#view-scouting .attack-court-frame,
#view-scouting #scoutingCourt,
#view-scouting #attackCourt {
    pointer-events:auto !important;
}

/* --------------------------------------------------------------------------
   0.17.43 – Live-Angriffsfilter unter der Punktfolge, einzeilig
   -------------------------------------------------------------------------- */

/* Der Filter ist kein Court-Overlay mehr. Er steht als eigene letzte Zeile
   unter Punktfolge/Aktionshistorie und kann dadurch weder Spielstand noch
   Annahmequalitätskarte überdecken. */
#view-scouting .scouting-main > .scouting-attack-filter-bottom-01742 {
    grid-row: 5 !important;
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    margin: 4px 0 0 !important;
    padding: 4px 7px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    border: 1px solid var(--border) !important;
    border-radius: 9px !important;
    background: var(--surface) !important;
    box-shadow: none !important;
    z-index: 8 !important;
    pointer-events: auto !important;
}
#view-scouting .scouting-main > .scouting-attack-filter-bottom-01742[hidden] {
    display: none !important;
}

#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-filter-title-01741 {
    flex: 0 0 auto !important;
    display: block !important;
    margin: 0 2px 0 0 !important;
    text-align: left !important;
    font-size: .68rem !important;
    line-height: 1 !important;
    font-weight: 1000 !important;
    color: var(--muted) !important;
    white-space: nowrap !important;
}

/* Beide Filtergruppen laufen horizontal. Die entbehrliche Beschriftung
   „Spielerinnen“ ist aus dem Markup entfernt. */
#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-filter-group-01741 {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
}
/* 0.17.43 – Der Umfang-Filter ist optisch klar vom Spielerinnenfilter getrennt. */
#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-scope-filter-01742 {
    margin-left: 22px !important;
}

#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-filter-group-01741 > small {
    flex: 0 0 auto !important;
    margin: 0 !important;
    text-align: left !important;
    font-size: .56rem !important;
    line-height: 1 !important;
    font-weight: 900 !important;
    color: var(--muted) !important;
    white-space: nowrap !important;
}
#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-player-buttons-01741,
#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-history-buttons-01738 {
    flex: 0 0 auto !important;
    width: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 3px !important;
}
#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-player-buttons-01741 button,
#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-history-buttons-01738 button {
    width: auto !important;
    min-width: 57px !important;
    height: 27px !important;
    min-height: 27px !important;
    padding: 0 9px !important;
    border-radius: 7px !important;
    font-size: .61rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}
#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-history-buttons-01738 button:last-child {
    min-width: 74px !important;
}

/* Bei „Alle Spielerinnen“ darf die Stillegende nur den verbleibenden Platz
   rechts in derselben Zeile nutzen. Sie vergrößert die Zeile nicht. */
#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-style-legend-01737 {
    position: static !important;
    inset: auto !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    height: 27px !important;
    max-height: 27px !important;
    margin: 0 0 0 auto !important;
    padding: 2px 5px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    overflow: hidden !important;
    border-radius: 6px !important;
    pointer-events: none !important;
}
#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-style-legend-01737[hidden] {
    display: none !important;
}
#view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-style-legend-item-01737 {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    font-size: .51rem !important;
    line-height: 1 !important;
}

/* Die neue fünfte Zeile ist bewusst kompakt. */
#view-scouting .scouting-main {
    grid-template-rows: 42px auto 52px auto 40px !important;
}
.view-only-mode #view-scouting .scouting-main,
.external-viewer #view-scouting .scouting-main {
    grid-template-rows: 42px auto auto 40px !important;
}
.view-only-mode #view-scouting .scouting-main > .scouting-attack-filter-bottom-01742,
.external-viewer #view-scouting .scouting-main > .scouting-attack-filter-bottom-01742 {
    grid-row: 4 !important;
}

@media (max-width: 1180px) {
    #view-scouting .scouting-main > .scouting-attack-filter-bottom-01742 {
        gap: 5px !important;
        padding-inline: 5px !important;
    }
    #view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-filter-title-01741 {
        font-size: .62rem !important;
    }
    #view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-player-buttons-01741 button,
    #view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-history-buttons-01738 button {
        min-width: 51px !important;
        padding-inline: 6px !important;
        font-size: .56rem !important;
    }
    #view-scouting .scouting-attack-filter-bottom-01742 .scouting-attack-history-buttons-01738 button:last-child {
        min-width: 68px !important;
    }
}


/* 0.18.2 – systemweite Spieleübersicht: fremde Spiele sind nur lesbar */
.game-access-badge.view { color:#5F6B66; }
.game-history-card-0155 .game-history-actions-0155 button:only-child { min-width:82px; }

/* --------------------------------------------------------------------------
   0.18.2 – stabile Mannschaftsliste und eindeutiger Neues-Spiel-Zustand
   -------------------------------------------------------------------------- */
#view-teams .roster-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: none !important;
    grid-auto-rows: minmax(36px, 36px) !important;
    align-content: start !important;
    gap: 4px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding-right: 2px !important;
}
#view-teams .roster-row {
    min-height: 36px !important;
    height: 36px !important;
    overflow: visible !important;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
}
#view-teams .roster-row input {
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
}
#view-teams .game-roster-toggle,
#view-teams .roster-list-actions button {
    height: 28px !important;
}
#view-teams .team-edit-bar-01731 {
    overflow: hidden !important;
}
@media (max-width: 1280px) {
    #view-teams .team-edit-bar-01731 {
        grid-template-columns: minmax(205px, .9fr) minmax(360px, 1.55fr) auto auto !important;
        grid-template-rows: 52px 42px !important;
    }
    #view-teams #addPlayerButton {
        grid-column: 4 !important;
        grid-row: 2 !important;
        justify-self: end !important;
    }
    #view-teams .team-edit-bar-01731 .team-roster-meta {
        grid-column: 1 / span 2 !important;
    }
}

/* --------------------------------------------------------------------------
   0.18.3 – Hilfe, kompakte Farbkarten und Spielstart unabhängig von fremden
             Nur-Ansicht-Partien
   -------------------------------------------------------------------------- */

/* Mit dem zusätzlichen Hilfe-Punkt bleibt die Einstellungsnavigation auf
   Tablet-Breite vollständig in einer Zeile und benötigt keine horizontale
   Scrollbewegung. */
.settings-subnav {
    display:grid !important;
    grid-template-columns:1.45fr .62fr .78fr 1fr .52fr .72fr 1.25fr .52fr !important;
    gap:4px !important;
    overflow:hidden !important;
}
.settings-subnav button {
    min-width:0 !important;
    width:100% !important;
    padding-inline:5px !important;
    font-size:.56rem !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
}

/* Libero-Farben: Die beiden Farbgruppen stehen untereinander. Vorgefertigte
   Farben dürfen umbrechen; Eingaben bleiben immer innerhalb der Karte. */
#view-theme .libero-color-card {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:auto auto auto auto !important;
    gap:4px !important;
    align-content:start !important;
    overflow:hidden !important;
}
#view-theme .libero-color-card > .side-title-row,
#view-theme .libero-color-card > .libero-color-section,
#view-theme .libero-color-card > .theme-save-row {
    grid-column:1 !important;
    min-width:0 !important;
}
#view-theme .libero-color-card > .libero-color-section {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:3px !important;
    padding:3px 4px !important;
    overflow:hidden !important;
}
#view-theme .libero-color-presets {
    display:flex !important;
    flex-wrap:wrap !important;
    align-content:flex-start !important;
    gap:3px !important;
    width:100% !important;
    min-width:0 !important;
    overflow:visible !important;
}
#view-theme .libero-color-presets button {
    flex:0 0 18px !important;
    width:18px !important;
    height:18px !important;
    min-width:18px !important;
    min-height:18px !important;
    border-radius:5px !important;
}
#view-theme .libero-color-custom {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    width:100% !important;
    min-width:0 !important;
    gap:3px !important;
}
#view-theme .libero-color-custom > label {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    min-width:0 !important;
    gap:2px !important;
    font-size:.42rem !important;
}
#view-theme .libero-color-custom > label > div {
    display:grid !important;
    grid-template-columns:26px minmax(0,1fr) !important;
    min-width:0 !important;
    gap:3px !important;
}
#view-theme .libero-color-custom input[type="color"] {
    width:26px !important;
    height:22px !important;
    min-width:26px !important;
}
#view-theme .libero-color-custom input:not([type="color"]) {
    width:100% !important;
    min-width:0 !important;
    height:22px !important;
    box-sizing:border-box !important;
    padding-inline:4px !important;
    font-size:.43rem !important;
}
#view-theme .libero-color-preview {
    width:25px !important;
    height:25px !important;
    min-width:25px !important;
    font-size:.52rem !important;
    justify-self:end !important;
}
#view-theme .libero-color-card > .theme-save-row {
    min-height:26px !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    gap:4px !important;
    align-items:center !important;
}
#view-theme .libero-color-card > .theme-save-row > span {
    min-width:0 !important;
    font-size:.38rem !important;
    line-height:1.05 !important;
}
#view-theme .libero-color-card > .theme-save-row .primary-action {
    min-height:25px !important;
    height:25px !important;
    padding:2px 6px !important;
    font-size:.44rem !important;
    white-space:nowrap !important;
}

/* Hilfe: sechs kompakte Karten, vollständig im Einstellungsbereich. */
#view-help { min-height:0 !important; overflow:hidden !important; }
.help-settings-page-0183 {
    height:100% !important;
    min-height:0 !important;
    display:grid !important;
    grid-template-rows:34px 38px minmax(0,1fr) !important;
    gap:6px !important;
    overflow:hidden !important;
}
.help-toolbar-0183 { min-height:38px !important; height:38px !important; }
.help-grid-0183 {
    min-height:0 !important;
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    grid-template-rows:repeat(2,minmax(0,1fr)) !important;
    gap:6px !important;
    overflow:hidden !important;
}
.help-card-0183 {
    min-width:0 !important;
    min-height:0 !important;
    height:100% !important;
    padding:8px 10px !important;
    display:grid !important;
    align-content:start !important;
    gap:5px !important;
    overflow:hidden !important;
}
.help-card-0183 .side-title { font-size:.70rem !important; }
.help-card-0183 ul,
.help-card-0183 ol {
    margin:0 !important;
    padding-left:17px !important;
    display:grid !important;
    gap:3px !important;
    font-size:.51rem !important;
    line-height:1.23 !important;
}
.help-card-0183 li { padding-left:1px !important; }
.help-note-0183 {
    margin:1px 0 0 !important;
    padding:5px 6px !important;
    border-radius:7px !important;
    background:var(--primary-soft) !important;
    color:var(--ink) !important;
    font-size:.47rem !important;
    line-height:1.2 !important;
    font-weight:720 !important;
}

@media (max-width:1100px) {
    .settings-subnav { grid-template-columns:1.35fr .58fr .72fr .92fr .48fr .68fr 1.12fr .48fr !important; }
    .settings-subnav button { font-size:.51rem !important; padding-inline:3px !important; }
    .help-card-0183 { padding:6px 7px !important; gap:3px !important; }
    .help-card-0183 ul, .help-card-0183 ol { font-size:.47rem !important; gap:2px !important; }
    .help-note-0183 { font-size:.43rem !important; }
}

/* --------------------------------------------------------------------------
   0.18.4 – schnelle Kaderanlage nur über Trikotnummern
   -------------------------------------------------------------------------- */
.optional-hint-0184 {
    color: var(--muted);
    font-size: .52rem;
    font-weight: 750;
    margin-left: .25rem;
}
.player-number-buttons-01731 button:disabled {
    opacity: .34;
    cursor: not-allowed;
    background: #eef1ee;
}
.add-player-batch-hint-0184 {
    padding: 9px 12px;
    border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 8%, #fff);
    color: var(--primary-dark, var(--primary));
    font-size: .62rem;
    font-weight: 850;
    text-align: center;
}
.add-player-card-01731:has(.add-player-batch-hint-0184:not([hidden])) {
    gap: 10px;
}

/* --------------------------------------------------------------------------
   0.18.5 – Mannschaftseditor und Kaderliste sauber ausgerichtet
   -------------------------------------------------------------------------- */
#view-teams .teams-page {
    grid-template-rows: 42px 56px 72px 104px 36px minmax(0, 1fr) !important;
    gap: 6px !important;
}

/* Der Mannschaftseditor besteht bewusst aus einer Formular- und einer
   Steuerzeile. Dadurch können die Liga-Felder nicht mehr in Meta/Pagination
   hineinragen. */
#view-teams .team-edit-bar-0185 {
    height: 104px !important;
    min-height: 104px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 56px 32px !important;
    gap: 6px !important;
    padding: 6px 8px !important;
    align-items: stretch !important;
    overflow: hidden !important;
}
#view-teams .team-edit-main-0185 {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(235px, .9fr) minmax(500px, 1.55fr) auto;
    gap: 8px;
    align-items: end;
}
#view-teams .team-edit-main-0185:has(.team-local-league-fields[hidden]) {
    grid-template-columns: minmax(280px, 1fr) auto;
}
#view-teams .team-edit-main-0185:has(.team-local-league-fields[hidden]) .team-edit-actions-0185 {
    grid-column: 2;
}
#view-teams .team-edit-bar-0185 .team-name-editor {
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 17px 34px !important;
    gap: 3px !important;
    align-items: stretch !important;
    font-size: .59rem !important;
    color: var(--muted) !important;
}
#view-teams .team-edit-bar-0185 .team-name-editor span,
#view-teams .team-local-league-fields label > span {
    display: flex;
    align-items: center;
    min-height: 17px;
    line-height: 1;
    font-weight: 900;
}
#view-teams .team-edit-bar-0185 .team-name-editor input,
#view-teams .team-local-league-fields select,
#view-teams .team-local-league-fields input {
    box-sizing: border-box;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    margin: 0 !important;
    border-radius: 8px !important;
    font-size: .64rem !important;
}
#view-teams .team-local-league-fields {
    min-width: 0 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(175px, 1.45fr) minmax(120px, .85fr) minmax(92px, .55fr) !important;
    gap: 7px !important;
    align-items: end !important;
}
#view-teams .team-local-league-fields[hidden] { display: none !important; }
#view-teams .team-local-league-fields label {
    grid-template-rows: 17px 34px !important;
    gap: 3px !important;
    font-size: .59rem !important;
}
#view-teams .team-edit-actions-0185 {
    min-width: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 7px;
    padding-bottom: 0;
}
#view-teams .team-edit-actions-0185 > button {
    height: 34px !important;
    min-height: 34px !important;
    padding-inline: 13px !important;
    white-space: nowrap !important;
}
#view-teams .team-edit-footer-0185 {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
#view-teams .team-edit-footer-0185 .team-roster-meta {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    order: unset !important;
    grid-column: auto !important;
    grid-row: auto !important;
    align-self: center !important;
    font-size: .56rem !important;
    line-height: 1.1 !important;
}
#view-teams .team-roster-controls-0185 {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
#view-teams .team-roster-pagination-0185 {
    display: grid;
    grid-template-columns: 34px minmax(36px, auto) 34px;
    align-items: center;
    gap: 4px;
}
#view-teams .team-roster-pagination-0185 > * {
    grid-column: auto !important;
    grid-row: auto !important;
    justify-self: stretch !important;
}
#view-teams .team-roster-pagination-0185 .small-action,
#view-teams #addPlayerButton {
    height: 30px !important;
    min-height: 30px !important;
}
#view-teams #addPlayerButton {
    min-width: 132px !important;
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    grid-column: auto !important;
    grid-row: auto !important;
}
#view-teams .roster-page-info {
    min-width: 36px;
    padding: 0 !important;
    text-align: center;
}

/* Kader-Tabelle: Name bewusst etwas schmaler, Änderungen deutlich breiter. */
#view-teams .roster-list-head,
#view-teams .roster-row {
    grid-template-columns: 70px 96px minmax(280px, 1fr) 150px 150px minmax(140px, .32fr) 120px !important;
    gap: 6px !important;
}
#view-teams .roster-list-head {
    height: 36px !important;
    min-height: 36px !important;
    padding: 4px 8px !important;
    font-size: .59rem !important;
}
#view-teams .roster-list-head span:nth-child(3) {
    padding-left: 7px !important;
}
#view-teams .roster-grid {
    grid-auto-rows: 40px !important;
    gap: 5px !important;
}
#view-teams .roster-row {
    min-height: 40px !important;
    height: 40px !important;
    padding: 4px 8px !important;
    overflow: hidden !important;
}
#view-teams .roster-row input,
#view-teams .roster-row select.roster-list-position {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    margin: 0;
    border: 1px solid #D7DED8;
    border-radius: 6px;
    background: #FCFDFC;
    color: var(--ink);
    padding: 0 7px;
    font-size: .61rem;
}
#view-teams .roster-list-name {
    font-size: .59rem !important;
}
#view-teams select.roster-list-position {
    appearance: auto;
    -webkit-appearance: menulist;
    text-align: left !important;
    text-transform: none !important;
    font-weight: 850 !important;
    cursor: pointer;
}
#view-teams select.roster-list-position:disabled {
    cursor: default;
    color: #485149;
    background: #F1F3F1;
}
#view-teams .roster-change-state {
    font-size: .54rem !important;
    white-space: nowrap;
}

/* Ohne laufendes Spiel ist „Kader“ eine statische Statusanzeige und kein
   deaktivierter Schalter. Im laufenden Spiel bleibt der echte Toggle erhalten. */
#view-teams .game-roster-toggle {
    box-sizing: border-box;
    width: 100%;
    min-width: 0 !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 9px !important;
    gap: 6px !important;
    overflow: hidden;
    font-size: .55rem !important;
}
#view-teams .game-roster-toggle.static {
    cursor: default;
    pointer-events: none;
    border-color: #C7D4C9;
    background: #F7FAF7;
    color: #4D5C51;
}
#view-teams .game-roster-toggle.static::before {
    content: '';
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--primary);
    opacity: .72;
}
#view-teams .game-roster-toggle input {
    flex: 0 0 30px;
    width: 30px !important;
    min-width: 30px !important;
    height: 17px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    padding: 0 !important;
}
#view-teams .game-roster-toggle input::after {
    width: 13px !important;
    height: 13px !important;
    top: 2px !important;
    left: 2px !important;
}
#view-teams .game-roster-toggle input:checked::after {
    transform: translateX(13px) !important;
}
#view-teams .roster-list-actions {
    min-width: 0;
    justify-content: stretch !important;
}
#view-teams .roster-list-actions button.save {
    width: 100%;
    min-width: 0;
    height: 30px !important;
    padding: 0 8px !important;
}

@media (max-width: 1280px) {
    #view-teams .team-edit-main-0185 {
        grid-template-columns: minmax(205px, .8fr) minmax(390px, 1.45fr) auto;
        gap: 6px;
    }
    #view-teams .team-edit-actions-0185 { gap: 5px; }
    #view-teams .team-edit-actions-0185 > button { padding-inline: 9px !important; font-size: .55rem !important; }
    #view-teams .roster-list-head,
    #view-teams .roster-row {
        grid-template-columns: 52px 70px minmax(200px, 1fr) 125px 120px minmax(105px, .3fr) 102px !important;
        gap: 5px !important;
    }
}

@media (max-width: 1180px) {
    #view-teams .teams-page {
        grid-template-rows: 42px 56px 66px 142px 34px minmax(0, 1fr) !important;
    }
    #view-teams .team-edit-bar-0185 {
        height: 142px !important;
        min-height: 142px !important;
        grid-template-rows: 94px 34px !important;
    }
    #view-teams .team-edit-main-0185 {
        grid-template-columns: minmax(190px, .75fr) minmax(370px, 1.4fr);
        grid-template-rows: 51px 36px;
    }
    #view-teams .team-edit-actions-0185 {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-end;
        align-items: center;
    }
    #view-teams .team-edit-main-0185:has(.team-local-league-fields[hidden]) {
        grid-template-columns: minmax(220px, 1fr) auto;
        grid-template-rows: 51px;
    }
    #view-teams .team-edit-main-0185:has(.team-local-league-fields[hidden]) .team-edit-actions-0185 {
        grid-column: 2;
        grid-row: 1;
    }
    #view-teams .roster-list-head,
    #view-teams .roster-row {
        grid-template-columns: 42px 62px minmax(165px, 1fr) 108px 104px 92px 92px !important;
        gap: 4px !important;
    }
    #view-teams .roster-list-head { font-size: .53rem !important; }
    #view-teams .roster-row { padding-inline: 5px !important; }
    #view-teams .game-roster-toggle { padding-inline: 5px !important; gap: 4px !important; font-size: .49rem !important; }
}

/* --------------------------------------------------------------------------
   0.18.6 – gemeinsame Kaderspeicherung und Positionskürzel A
   -------------------------------------------------------------------------- */
#view-teams .team-roster-controls-0185 {
    gap: 7px !important;
}
#view-teams #saveRosterChangesButton {
    min-width: 176px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
}
#view-teams #saveRosterChangesButton:disabled {
    opacity: .42;
    cursor: default;
}
#view-teams .roster-row.dirty {
    border-color: color-mix(in srgb, var(--primary) 48%, #D7DED8) !important;
    background: color-mix(in srgb, var(--primary) 4%, #FFFFFF) !important;
}
#view-teams .roster-row.dirty .roster-change-state {
    color: var(--primary-dark, var(--primary)) !important;
    font-weight: 900 !important;
}
#view-teams .roster-list-actions {
    justify-content: center !important;
    align-items: center !important;
}
#view-teams .roster-list-actions button:not(.save) {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
}
#view-teams .roster-list-head,
#view-teams .roster-row {
    grid-template-columns: 70px 96px minmax(280px, 1fr) 150px 150px minmax(160px, .34fr) 72px !important;
}

@media (max-width: 1280px) {
    #view-teams #saveRosterChangesButton { min-width: 158px !important; padding-inline: 10px !important; }
    #view-teams .roster-list-head,
    #view-teams .roster-row {
        grid-template-columns: 52px 70px minmax(200px, 1fr) 125px 120px minmax(118px, .32fr) 64px !important;
    }
}

@media (max-width: 1180px) {
    #view-teams .team-roster-controls-0185 { gap: 5px !important; }
    #view-teams #saveRosterChangesButton { min-width: 148px !important; font-size: .5rem !important; }
    #view-teams #addPlayerButton { min-width: 112px !important; padding-inline: 10px !important; }
    #view-teams .roster-list-head,
    #view-teams .roster-row {
        grid-template-columns: 42px 62px minmax(165px, 1fr) 108px 104px 104px 58px !important;
    }
}

/* --------------------------------------------------------------------------
   0.18.8 – lesbare Positionsauswahl und Spielkader-Vorauswahl
   -------------------------------------------------------------------------- */
#view-teams .roster-list-head,
#view-teams .roster-row {
    grid-template-columns: 70px 96px minmax(250px, 1fr) 190px 150px minmax(160px, .34fr) 72px !important;
}
#view-teams select.roster-list-position {
    min-width: 190px !important;
    padding-right: 28px !important;
    white-space: nowrap !important;
}
#view-teams .game-roster-toggle:not(.static) {
    cursor: pointer;
}
#view-teams .game-roster-toggle:not(.static) span {
    min-width: 0;
    white-space: nowrap;
}

@media (max-width: 1280px) {
    #view-teams .roster-list-head,
    #view-teams .roster-row {
        grid-template-columns: 52px 70px minmax(170px, 1fr) 180px 120px minmax(110px, .32fr) 64px !important;
    }
    #view-teams select.roster-list-position {
        min-width: 180px !important;
    }
}

@media (max-width: 1180px) {
    #view-teams .roster-list-head,
    #view-teams .roster-row {
        grid-template-columns: 42px 62px minmax(145px, 1fr) 175px 104px 100px 58px !important;
    }
    #view-teams select.roster-list-position {
        min-width: 175px !important;
        font-size: .57rem !important;
    }
}

/* --------------------------------------------------------------------------
   0.18.9 – Mannschafts-Toggle verwendet die Hauptfarbe am Schaltknopf
   -------------------------------------------------------------------------- */
#view-teams .game-roster-toggle:not(.static) input {
    border: 1px solid color-mix(in srgb, var(--primary) 28%, #C7D4C9) !important;
    background: color-mix(in srgb, var(--primary) 10%, #FFFFFF) !important;
}
#view-teams .game-roster-toggle:not(.static) input::after {
    background: #B8C1BA !important;
}
#view-teams .game-roster-toggle:not(.static) input:checked {
    border-color: color-mix(in srgb, var(--primary) 42%, #C7D4C9) !important;
    background: color-mix(in srgb, var(--primary) 14%, #FFFFFF) !important;
}
#view-teams .game-roster-toggle:not(.static) input:checked::after {
    background: var(--primary) !important;
}
#view-teams .game-roster-toggle:not(.static):has(input:checked) {
    border-color: color-mix(in srgb, var(--primary) 28%, #C7D4C9) !important;
    background: color-mix(in srgb, var(--primary) 4%, #FFFFFF) !important;
}

/* --------------------------------------------------------------------------
   0.18.10 – Passwortlinks für Benutzer
   -------------------------------------------------------------------------- */
.auth-success {
    padding: 9px 11px;
    margin-bottom: 12px;
    border-radius: 9px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-weight: 800;
}
.auth-link-button {
    width: 100%;
    display: grid;
    place-items: center;
    text-decoration: none;
}
.password-reset-card { width: min(470px, 92vw); }
.user-reset-link-button {
    width: 100%;
    min-height: 32px;
    height: 32px !important;
}
.user-reset-link-panel {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--primary-soft);
}
.user-reset-link-hint {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: .52rem;
    line-height: 1.25;
    font-weight: 750;
}
.user-reset-link-panel > input[type="text"] {
    width: 100%;
    min-width: 0;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 6px;
    background: white;
    font-size: .5rem;
}
.user-reset-link-panel > .user-reset-copy-button {
    height: 28px !important;
    padding: 0 8px;
}
@media (max-width: 760px) {
    .user-reset-link-panel { grid-template-columns: 1fr; }
    .user-reset-link-panel > .user-reset-copy-button { width: 100%; }
}

/* --------------------------------------------------------------------------
   0.18.11 – E-Mail-basierter Passwort-Reset
   -------------------------------------------------------------------------- */
.auth-secondary-link {
    display: block;
    margin-top: 12px;
    text-align: center;
    color: var(--primary-dark);
    font-size: .75rem;
    font-weight: 850;
    text-decoration: none;
}
.auth-secondary-link:hover { text-decoration: underline; }
.user-new-bar input[type="email"] {
    height: 29px;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0 7px;
    min-width: 0;
}
.user-card .user-email {
    display: grid;
    gap: 3px;
    align-items: stretch;
}
.user-card .user-email span {
    font-weight: 850;
    font-size: .58rem;
}
.user-card input[type="email"] {
    width: 100%;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 7px;
    font-size: .64rem;
    min-width: 0;
}
.user-reset-email-button {
    width: 100%;
    min-height: 32px;
    height: 32px !important;
}
