body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.rsg-toast { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 2000; min-width: 260px; text-align: center; }
.blink { animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.table td, .table th { vertical-align: middle; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.input-order { width: 80px; }
.table-sm .form-control-sm { min-width: 70px; }

/* Kampfrichter-Eingabe: kompakt fürs Smartphone */
.judge-athlete { font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
.judge-meta { font-size: .95rem; }
.judge-app { font-size: 1rem; }
.score-input { font-size: 2rem; height: auto; padding: .2rem .5rem; text-align: center; font-variant-numeric: tabular-nums; }
.score-input[readonly] { background: #fff; caret-color: transparent; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.keypad button { font-size: 1.45rem; padding: .4rem 0; }
.seat-card .card-title { font-size: 1rem; }
.seat-card .send { padding: .45rem 1rem; font-size: 1.15rem; }
.seat-card.saved .card-header { background: #28a745; color: #fff; }
.seat-card.dirty .card-header { background: #ffc107; }
.seat-card.warn .card-header { background: #dc3545; color: #fff; }
.seat-card.submitted .keypad, .seat-card.submitted .ded-grid, .seat-card.submitted .mode-switch { opacity: .35; pointer-events: none; }
.spread-warn .btn { font-size: 1.1rem; }
/* Abzug-Tasten */
.ded-display { text-align: center; border: 1px solid #ced4da; border-radius: .25rem; padding: .2rem; margin-bottom: .4rem; }
.ded-result { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ded-chips { min-height: 1.6rem; display: flex; flex-wrap: wrap; gap: .25rem; justify-content: center; }
.ded-chip { font-size: .9rem; padding: .35em .55em; cursor: pointer; }
.ded-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem; }
.ded-grid .ded-undo { grid-column: 1 / -1; font-size: 1rem; padding: .35rem 0; }
.ded-grid button { font-size: 1.3rem; padding: .45rem 0; font-variant-numeric: tabular-nums; }

/* OKR-Steuerung */
.matrix td, .matrix th { text-align: center; }
.matrix input { width: 80px; text-align: center; margin: auto; }
.routine-list { max-height: 70vh; overflow-y: auto; }
.routine-list tr.current { background: #fff3cd; font-weight: 600; }  /* Design: themes.css */
.routine-list tr { cursor: pointer; }
.big-total { font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Anzeigetafel */
body.scoreboard { background: #0b1d3a; color: #fff; overflow: hidden; }
.sb-wrap { height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 3vh 4vw 6vh; box-sizing: border-box; }
.sb-head { font-size: 2.2vw; opacity: .8; display: flex; justify-content: space-between; }
.sb-main { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.sb-name { font-size: 5vw; font-weight: 700; line-height: 1.1; }
.sb-club { font-size: 2.6vw; opacity: .85; }
.sb-app { font-size: 2.6vw; color: var(--rsg-sb-accent, #ffd54f); }
.sb-scores { display: flex; gap: 2vw; margin-top: 3vh; flex-wrap: wrap; }
.sb-part { background: rgba(255,255,255,.08); border-radius: 1vw; padding: 1.5vh 2vw; text-align: center; min-width: 11vw; }
.sb-part .l { font-size: 1.6vw; opacity: .7; }
.sb-part .v { font-size: 3.4vw; font-variant-numeric: tabular-nums; }
.sb-total { font-size: 9vw; font-weight: 800; color: var(--rsg-sb-accent, #ffd54f); font-variant-numeric: tabular-nums; line-height: 1; }
.sb-main:has(.sb-table) { justify-content: flex-start; padding-top: 2vh; }
.sb-ttitle { display: flex; justify-content: space-between; font-size: 3vw; font-weight: 700; color: var(--rsg-sb-accent, #ffd54f); margin-bottom: 1vh; }
.sb-ttitle span:last-child { font-size: 1.8vw; font-weight: 400; opacity: .7; color: #fff; align-self: flex-end; }
.sb-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums;
            font-size: min(2.6vw, calc((68vh / (var(--rows) + 1) - 1vh) / 1.25)); line-height: 1.25; }
.sb-table th { font-size: .7em; font-weight: 400; opacity: .7; text-align: left; padding: .3vh .8vw; border-bottom: 1px solid rgba(255,255,255,.3); }
.sb-table td { padding: .5vh .8vw; }
.sb-table tbody tr:nth-child(odd) { background: rgba(255,255,255,.06); }
.sb-table .tx { max-width: 0; width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-table .cl { width: 28%; opacity: .8; }
.sb-table .rk { width: 1%; font-weight: 700; }
.sb-table .ap { width: 1%; opacity: .85; }
.sb-table .sum { width: 1%; font-weight: 800; color: var(--rsg-sb-accent, #ffd54f); }
.sb-table th.num { text-align: right; }
.sb-foot { flex-shrink: 0; font-size: 2.2vw; opacity: .85; min-height: 1.3em; border-top: 1px solid rgba(255,255,255,.2); padding-top: 1.5vh; }

@media print {
  .main-header, .main-sidebar, .no-print, .content-header .col-auto { display: none !important; }
  .content-wrapper { margin-left: 0 !important; background: #fff; }
  .page-break { page-break-after: always; }
  .card { box-shadow: none; border: 0; }
}

/* Musik */
.music-bar .lh-sm { line-height: 1.2; }
@media (max-width: 767px) { .music-bar { display: flex !important; margin: 0 0 .5rem 0 !important; } }

/* Wettkampf-Abschluss */
.finish-table td { vertical-align: top; }
.bg-danger-soft { background: #f8d7da !important; }

/* Vereine: Teilnehmerinnen aufklappen */
.club-row.has-members { cursor: pointer; }
.club-row.open { background: #eef3fb; }
.club-members { background: #f8f9fb; }
.club-members th, .club-members td { padding-left: 2.2rem; font-size: .9rem; }
.club-members thead th { border-top: 0; font-weight: 500; color: #6c757d; }

/* Startliste: Blockreihenfolge */
.block-list li { cursor: grab; user-select: none; }
.block-list li.dragging { opacity: .5; background: #eef3fb; }
.block-list .drag-handle { cursor: grab; }

/* Musikplayer */
.player-title { font-size: 1.5rem; font-weight: 600; }
.player-controls .btn { min-width: 3.2rem; }
.player-progress { height: 10px; background: #e9ecef; border-radius: 5px; cursor: pointer; overflow: hidden; }
.player-progress > div { height: 100%; width: 0; background: #28a745; transition: width .25s linear; }
.playlist .pl-item { cursor: grab; }
.playlist .pl-item.dragging { opacity: .5; }
.playlist .pl-item.playing, .library-list li.playing { background: #e8f5e9; font-weight: 600; }
.library-list { max-height: 60vh; overflow-y: auto; }

/* Musik: Zuordnung Kategorie × Handgerät */
.music-matrix th, .music-matrix td { vertical-align: middle; }
.music-matrix .mcell { cursor: pointer; position: relative; min-width: 120px; max-width: 200px; font-size: .85rem; color: #adb5bd; }
.music-matrix .mcell:hover { background: #e9f2ff; }
.music-matrix .mcell.used { background: #f2f7ff; }
.music-matrix .mcell.has { color: #212529; }
.music-matrix .mcell.has .mtitle { font-weight: 500; }
.music-matrix .mtitle { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 1.4rem; }
.music-matrix .mcount { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); }
#multi-grid td, #multi-grid th { vertical-align: middle; }

/* Zentraler Server: keine Hardware am Gerät (Drucker usw.) */
[data-server] [data-print-source], [data-server] .pi-only { display: none !important; }
