/* TMS – Turnier Management System · Design: Dragon Sport (Rot/Schwarz)
   Die Markenfarbe wird in config.php unter 'theme' => ['color' => …] eingestellt. */
:root {
    --brand: #e3000f;        /* Dragon-Rot (aus dem Logo) */
    --brand-2: #e0283f;      /* helleres Rot für Verläufe/Hover */
    --brand-dark: #8f0b20;   /* dunkles Rot für Ränder */
    --brand-light: #fbeaec;  /* zartes Rot für Markierungen */
    --black: #0d0d0d;
    --black-2: #1c1c1c;
    --ink: #1d1d1f;
    --muted: #6e6e73;
    --line: #dcdcdf;
    --bg: #f2f2f3;
    --panel: #ffffff;
    --danger: #b3261e;
    --display: "Oswald", "Bebas Neue", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
    --warn-bg: #fff4e0;
    --warn: #8a5300;
    --ok-bg: #e5f5ea;
    --ok: #1b6b35;
    --radius: 6px;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); font-size: 14px; line-height: 1.45; }
a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 600; }
h2, h3 { font-family: var(--display); letter-spacing: .5px; }
.muted { color: var(--muted); }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.inline { display: inline; margin: 0; }
.nowrap { white-space: nowrap; }

/* Kopfzeile */
.topbar {
    display: flex; align-items: center; gap: 16px; padding: 10px 24px; min-height: 120px;
    background-color: var(--black); color: #fff; border-bottom: 4px solid var(--brand);
    position: relative; z-index: 20; isolation: isolate; overflow: hidden;
}
/* Hintergrundbild wie auf der Website, links/rechts abgedunkelt für gut lesbare Schrift */
.topbar::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 28%, rgba(0,0,0,.25) 50%, rgba(0,0,0,.55) 72%, rgba(0,0,0,.9) 100%),
        var(--header-image, none) center 32% / cover no-repeat;
}
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.logo img { height: 96px; width: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text strong { font: 700 38px/1 var(--display); letter-spacing: 4px; text-transform: uppercase; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.logo-text strong span { color: var(--brand); }
.logo-text small { font: 500 12px/1.2 var(--display); letter-spacing: 2px; text-transform: uppercase; color: #d1d1d6; margin-top: 5px; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.logo.big { flex-direction: column; gap: 10px; color: var(--ink); }
.logo.big img { height: 150px; filter: none; }
.logo.big .logo-text strong, .logo.big .logo-text small { text-shadow: none; }
.logo.big .logo-text small { color: var(--muted); }
.logo.big .logo-text { align-items: center; }
.logo.big .logo-text strong { font-size: 42px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.tournament-select { display: flex; align-items: center; gap: 6px; margin: 0; }
.tournament-select label { font: 600 13px var(--display); letter-spacing: 1px; text-transform: uppercase; color: #d1d1d6; }
.tournament-select select { max-width: 300px; padding: 6px 8px; border-radius: 3px; border: 1px solid #3a3a3c; background: rgba(20,20,20,.85); color: #fff; font-weight: 600; }
.tournament-select select:focus { outline: 2px solid var(--brand); }
.who { color: #c7c7cc; }
.who strong { color: #fff; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font: inherit; font-weight: 600; }
.topbar .link-btn { color: #fff; background: rgba(0,0,0,.5); border: 1px solid var(--brand); border-radius: 3px; padding: 5px 10px; font: 600 12px var(--display); letter-spacing: 1px; text-transform: uppercase; }
.topbar .link-btn:hover { background: var(--brand); }
.menu-toggle { display: none; background: none; border: 0; color: #fff; padding: 6px; cursor: pointer; }
.menu-toggle .icon { width: 24px; height: 24px; }

/* Grundlayout */
.shell { display: flex; gap: 12px; padding: 12px; align-items: flex-start; }
.sidebar {
    width: 210px; flex: 0 0 210px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; position: sticky; top: 12px;
}
.sidebar { background: var(--black); border-color: var(--black); }
.nav-title { background: var(--black); color: var(--brand); padding: 12px 14px 6px; font: 600 13px var(--display); letter-spacing: 1.5px; text-transform: uppercase; }
.sidebar a, .sidebar .soon { display: block; padding: 7px 14px; color: #e5e5ea; text-decoration: none; font-size: 13px; border-left: 3px solid transparent; }
.sidebar a:hover { background: var(--black-2); color: #fff; }
.sidebar a.active { background: var(--brand); color: #fff; font-weight: 600; border-left-color: var(--brand-dark); }
.sidebar .soon { color: #5a5a5e; cursor: default; }
.nav-section:last-child { padding-bottom: 8px; }
.sidebar .soon small { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.content { flex: 1; min-width: 0; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 0 12px; }

/* Panels */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.panel-head {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 12px;
    background: var(--black); color: #fff; border-bottom: 3px solid var(--brand);
}
.panel-head h1 { font: 600 19px var(--display); letter-spacing: 1px; text-transform: uppercase; margin: 0; }
.panel-head h1 small { font-weight: 400; color: var(--brand-2); font-size: 13px; margin-left: 6px; }
.panel-head .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.panel-body { padding: 14px; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 4px; border: 1px solid var(--line);
    background: #fff; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--brand-2); }
.panel-head .btn { background: var(--black-2); color: #fff; border-color: #3a3a3c; }
.panel-head .btn:hover { border-color: var(--brand); }
.panel-head .btn.primary, .btn.primary { background: var(--brand); color: #fff; border-color: var(--brand-dark); font-weight: 600; }
.btn.primary:hover { background: var(--brand-2); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.panel-head .btn.danger-outline { background: transparent; border-color: #e58c86; color: #ffb4ae; }
.btn.block { width: 100%; justify-content: center; padding: 10px; font-size: 15px; }
.btn-icon {
    display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 26px; border-radius: 4px;
    background: var(--black-2); color: #fff; border: 0; cursor: pointer; text-decoration: none; margin: 0 1px;
}
.btn-icon:hover { background: var(--brand); }
.btn-icon.danger:hover { background: var(--danger); }

/* Export-Menü */
.export-menu { position: relative; }
.export-menu summary { list-style: none; }
.export-menu summary::-webkit-details-marker { display: none; }
.export-menu summary::after { content: "▾"; font-size: 10px; margin-left: 2px; }
.export-list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 25; background: #fff; border: 1px solid var(--line);
    border-top: 3px solid var(--brand); border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.25); min-width: 180px; }
.export-list a { display: block; padding: 9px 14px; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 13px; }
.export-list a:hover { background: var(--brand-light); color: var(--brand); }

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
    background: var(--black-2); color: #fff; font-weight: 600; text-align: left; padding: 7px 8px;
    border-right: 1px solid #333; border-bottom: 3px solid var(--brand); vertical-align: top; white-space: nowrap; user-select: none;
}
table.data th[data-filter] { cursor: pointer; }
table.data th .th-label::after { content: ""; margin-left: 4px; font-size: 10px; }
table.data th.sort-asc .th-label::after { content: "▲"; }
table.data th.sort-desc .th-label::after { content: "▼"; }
table.data th input.col-filter {
    display: block; width: 100%; min-width: 60px; margin-top: 4px; padding: 3px 5px; border: 0; border-radius: 3px; font: inherit; font-weight: 400; color: var(--ink);
}
table.data td { padding: 6px 8px; border-top: 1px solid #ececee; vertical-align: middle; }
table.data tbody tr:nth-child(even) { background: #fafafa; }
table.data tbody tr:hover { background: #f0f0f2; }
table.data tr.selected td { background: var(--brand-light); font-weight: 600; }
table.data tr.unassigned td { background: #fdeceb; }
table.data tr.unassigned td:first-child { box-shadow: inset 4px 0 0 var(--brand); }
table.data tr.empty td { text-align: center; color: var(--muted); padding: 24px; }
table.data .center { text-align: center; }
table.data .num { text-align: right; }
.perm-list { font-size: 12px; color: #48484a; }
.badge { display: inline-block; background: var(--black-2); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 600; }
.error-text { color: var(--danger); font-size: 12px; }

/* Formulare */
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
.form input:not([type=checkbox]):not([type=file]), .form select, .login-card input {
    font: inherit; font-weight: 400; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; background: #fff; width: 100%;
}
.form input:focus, .form select:focus, .login-card input:focus { outline: 2px solid var(--brand-2); outline-offset: -1px; border-color: transparent; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-bottom: 14px; }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
label.check { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; }
fieldset { border: 1px solid var(--line); border-radius: 4px; padding: 10px 14px 12px; margin: 0 0 14px; }
legend { font-weight: 600; padding: 0 6px; }
.hint { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.perm-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--brand); margin-bottom: 4px; }

/* Meldungen */
.flash { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 12px; border: 1px solid; }
.flash-success { background: var(--ok-bg); color: var(--ok); border-color: #b9e0c5; }
.flash-error { background: #fdeceb; color: var(--danger); border-color: #f2c1bd; }
.flash-warning { background: var(--warn-bg); color: var(--warn); border-color: #f1d8a8; }
.flash.floating { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50; }
.notice { padding: 8px 12px; border-radius: 4px; background: var(--brand-light); margin: 0 0 10px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }

/* Übersicht */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 14px 0 20px; }
.stat { display: flex; flex-direction: column; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); border-top: 4px solid var(--brand); }
.stat:hover { border-color: var(--brand); }
.stat strong { font: 700 34px/1.1 var(--display); color: var(--black); }
.stat span { text-transform: uppercase; font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.stat.warn { border-top-color: #e0a030; }
.stat.warn strong { color: var(--warn); }
.steps li { margin: 4px 0; }
.steps li.done { color: var(--ok); }
.steps li.done::marker { content: "✔  "; }

/* Dialoge */
.dialog { border: 0; border-radius: 8px; padding: 0; max-width: 520px; width: calc(100% - 32px); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.dialog form { padding: 20px; }
.dialog::backdrop { background: rgba(0,0,0,.45); }
.dialog code { background: var(--brand-light); padding: 0 4px; border-radius: 3px; }
.dialog input[name=confirm] { width: 100%; padding: 8px; font: inherit; border: 1px solid var(--line); border-radius: 4px; }

/* Anmeldung */
body.plain { min-height: 100vh; background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.85)), var(--header-image, none) center / cover no-repeat fixed, var(--black); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { background: #fff; padding: 28px; border-radius: 10px; border-top: 5px solid var(--brand); width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.login-card label { display: flex; flex-direction: column; gap: 4px; text-align: left; font-weight: 600; }
.login-card .logo { align-self: center; }
.login-card p { margin: -8px 0 6px; }

/* Handy / Tablet (PWA) */
@media (max-width: 860px) {
    .menu-toggle { display: inline-flex; }
    .topbar { padding: 8px 12px; min-height: 60px; flex-wrap: wrap; }
    .topbar::before { background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.8)), var(--header-image-sm, none) center 30% / cover no-repeat; }
    .logo img { height: 56px; }
    .logo-text strong { font-size: 24px; }
    .logo-text small { display: none; }
    .topbar-right { width: 100%; justify-content: space-between; gap: 8px; font-size: 13px; }
    .tournament-select select { max-width: 200px; }
    .shell { display: block; padding: 8px; }
    .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .2s; border-radius: 0; overflow-y: auto; }
    .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
    .grid, .grid.four { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .panel-head .actions { margin-left: 0; width: 100%; }
    .panel-head .btn { padding: 5px 9px; font-size: 12px; }
    .panel-body { padding: 8px; }
    table.data td { white-space: nowrap; }
    table.data th input.col-filter { min-width: 70px; }
}

@media print {
    .topbar, .sidebar, .actions, .footer, th input, .btn-icon, form.inline { display: none !important; }
    .shell { display: block; padding: 0; }
    .panel { border: 0; }
}

/* ===================== Kampfbäume ===================== */
.stats.compact { margin: 0 0 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stats.compact .stat { padding: 10px 12px; }
.stats.compact .stat strong { font-size: 26px; }
.status { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.status-ready { background: #ececee; color: #48484a; }
.status-running { background: var(--brand); color: #fff; }
.status-finished { background: var(--ok-bg); color: var(--ok); }
.status-warn { background: var(--warn-bg); color: var(--warn); margin-left: 4px; }
.bracket-title { display: flex; flex-direction: column; }
.bracket-title .meta { color: #c7c7cc !important; font: 400 12px/1.4 inherit !important; text-transform: none; letter-spacing: 0; margin: 2px 0 0 !important; }

.bracket-layout { display: flex; flex-direction: column; gap: 16px; }
.bracket-main { flex: 1; min-width: 0; }
.bracket-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 28px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.bracket-side > div { min-width: 0; }
.bracket-side h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid var(--brand); padding-bottom: 4px; }
.places { list-style: none; padding: 0; margin: 0 0 16px; }
.places li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f0f0f2; align-items: flex-start; }
.places .pl { flex: 0 0 62px; font-weight: 700; font-size: 12px; text-transform: uppercase; }
.places .place-1 .pl { color: #b8860b; } .places .place-2 .pl { color: #7d7d82; } .places .place-3 .pl { color: #a0522d; }
.facts { list-style: none; padding: 0; margin: 0 0 10px; }
.facts li { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed #ececee; }

.tree-scroll { overflow: auto; padding-bottom: 6px; }
.tree { position: relative; font-size: 12px; transform-origin: top left; }
.tree-lines { position: absolute; inset: 0; pointer-events: none; }
.tree-lines path { fill: none; stroke: #c7c7cc; stroke-width: 2; }
.tree-lines path.won { stroke: var(--brand); }
.tree-lines path.bye { stroke-dasharray: 4 4; }
.round-title { position: absolute; top: 0; font: 600 12px var(--display); text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); border-bottom: 2px solid #e5e5ea; padding-bottom: 4px; }
.match { position: absolute; display: flex; flex-direction: column; }
.fighter { height: var(--name-h); display: flex; flex-direction: column; justify-content: flex-end; line-height: 1.15; padding-left: 8px; border-left: 3px solid transparent; overflow: hidden; }
.fighter.blue { justify-content: flex-start; }
.fighter.red { border-left-color: #d0021b; }
.fighter.blue { border-left-color: #1e5bd8; }
.fighter .fname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fighter .fname.empty { font-weight: 400; color: #a1a1a6; font-style: italic; }
.fighter .fclub { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fighter.winner .fname { color: var(--ink); }
.fighter.winner .fname::after { content: " ✔"; color: var(--brand); }
.fighter.loser .fname { color: #a1a1a6; font-weight: 400; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.box { width: var(--box-w); height: var(--box-h); border-radius: 6px; background: var(--black-2); color: #fff; border: 0; font: inherit;
       display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 0; position: relative; }
button.box, a.box { cursor: pointer; text-decoration: none; }
a.box:hover { outline: 3px solid var(--brand); outline-offset: 1px; }
.box.live { box-shadow: 0 0 0 3px #ffcc00; }
button.box:hover { outline: 3px solid var(--brand); outline-offset: 1px; }
.box .score { font: 700 20px/1 var(--display); letter-spacing: 1px; }
.box .score .sr { color: #ff6b6b; } .box .score .sb { color: #7aa7ff; }
.box .fnum, .box .fstate { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: #a1a1a6; }
.box.done { background: var(--brand); }
.box.done .score .sr, .box.done .score .sb { color: #fff; }
.box.done .fnum, .box.done .fstate { color: rgba(255,255,255,.8); }
.box.bye { background: #f2f2f3; color: #a1a1a6; border: 1px dashed #c7c7cc; }
.box.bye .score { font-size: 13px; text-transform: uppercase; }
.match.is-bye .fighter.blue .fname.empty, .match.is-bye .fighter.red .fname.empty { color: #c7c7cc; }
.champion { position: absolute; width: 200px; border: 2px solid #e5e5ea; border-radius: 8px; padding: 6px 10px; display: flex; flex-direction: column; }
.champion.has { border-color: #b8860b; background: #fffaf0; }
.champion .ctitle { font: 600 10px var(--display); text-transform: uppercase; letter-spacing: 2px; color: #b8860b; }
.champion .cname { font: 700 15px var(--display); }

/* Ergebnis-Dialog */
.result-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; margin: 10px 0 14px; }
.result-grid .vs { font: 700 28px var(--display); padding-bottom: 6px; }
.corner { display: flex; flex-direction: column; gap: 6px; font-weight: 600; padding: 8px; border-radius: 6px; }
.corner.red { background: #fdeceb; border-left: 4px solid #d0021b; }
.corner.blue { background: #eaf0fd; border-left: 4px solid #1e5bd8; }
.corner input { font: 700 26px var(--display); text-align: center; padding: 6px; border: 1px solid var(--line); border-radius: 4px; width: 100%; }
.dialog label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; margin-bottom: 10px; }
.dialog select { font: inherit; padding: 7px; border: 1px solid var(--line); border-radius: 4px; }
.btn.danger-outline-light { border-color: var(--danger); color: var(--danger); margin-right: auto; }

/* Druck */
.tree-print .box { background: #fff; color: #000; border: 1.5px solid #000; }
.tree-print .box .score .sr, .tree-print .box .score .sb { color: #000; }
.tree-print .box.done { background: #fff; border-width: 2.5px; }
.tree-print .box.done .fnum, .tree-print .box.done .fstate, .tree-print .box .fnum, .tree-print .box .fstate { color: #444; }
.tree-print .box.bye { border-style: dashed; }
.tree-print .tree-lines path { stroke: #888; }
.tree-print .tree-lines path.won { stroke: #000; }
@media print { body { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Monitor an der Kampffläche */
.monitor-body { background: #0d0d0d; color: #fff; height: 100vh; overflow: hidden; display: flex; flex-direction: column; margin: 0; }
.monitor-head { display: flex; align-items: center; gap: 18px; padding: 12px 24px; border-bottom: 4px solid var(--brand);
    background: linear-gradient(90deg, rgba(0,0,0,.92), rgba(0,0,0,.4) 50%, rgba(0,0,0,.92)), var(--header-image-sm, none) center 32% / cover; }
.monitor-head img { height: 64px; }
.monitor-head h1 { font: 700 30px var(--display); text-transform: uppercase; letter-spacing: 2px; margin: 0; }
.monitor-head p { margin: 2px 0 0; color: #c7c7cc; }
.monitor-clock { margin-left: auto; font: 700 34px var(--display); }
.monitor-main { flex: 1; padding: 20px 28px; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; }
.monitor-main .tree-scroll { overflow: hidden; }
.tree-monitor { font-size: 15px; }
.tree-monitor .fighter .fname { color: #fff; font-size: 16px; }
.tree-monitor .fighter.loser .fname { color: #636366; }
.tree-monitor .fighter .fclub { color: #a1a1a6; font-size: 12px; }
.tree-monitor .fighter.winner .fname { color: #fff; }
.tree-monitor .box { background: #2c2c2e; }
.tree-monitor .box.done { background: var(--brand); }
.tree-monitor .box.bye .score, .box.bye .score { font-size: 12px; letter-spacing: 2px; }
.tree-monitor .box .score { font-size: 26px; }
.tree-monitor .box.bye { background: transparent; border-color: #48484a; color: #636366; }
.tree-monitor .round-title { color: #a1a1a6; border-color: #3a3a3c; font-size: 14px; }
.tree-monitor .tree-lines path { stroke: #48484a; }
.tree-monitor .champion { border-color: #3a3a3c; }
.tree-monitor .champion.has { background: #2a2210; border-color: #d4a017; }
.tree-monitor .champion .cname { color: #fff; font-size: 20px; }
.monitor-empty { font-size: 24px; color: #a1a1a6; }



/* Vereinstrennung */
.sep-ok { color: var(--ok); font-weight: 600; white-space: nowrap; }
.sep-bad { color: var(--warn); font-weight: 600; white-space: nowrap; }
.separation { list-style: none; padding: 0; margin: 0 0 8px; }
.separation li { padding: 6px 0 6px 10px; border-bottom: 1px solid #f0f0f2; border-left: 3px solid var(--ok); margin-bottom: 4px; }
.separation li.bad { border-left-color: #e0a030; }
.separation .sep-ok, .separation .sep-bad { display: inline-block; margin-left: 4px; font-size: 12px; }
.same-club { position: absolute; top: -9px; right: -8px; background: #e0a030; color: #000; font-size: 8px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .5px; padding: 1px 5px; border-radius: 8px; white-space: nowrap; }
.tree-print .same-club { background: #fff; border: 1px solid #000; }
.dup-list { margin: 6px 0 0; padding-left: 18px; }
.dup-list li { margin: 2px 0; }

/* ===================== Kampfmodus ===================== */
.section-title { font: 600 16px var(--display); text-transform: uppercase; letter-spacing: 1px; margin: 4px 0 10px; }
.section-title + .table-wrap, .class-cards + .section-title { margin-top: 18px; }
.mat-select { display: flex; align-items: center; gap: 6px; }
.mat-select label { font: 600 12px var(--display); text-transform: uppercase; letter-spacing: 1px; color: #d1d1d6; }
.mat-select select { padding: 6px 8px; border-radius: 3px; border: 1px solid #3a3a3c; background: var(--black-2); color: #fff; font-weight: 600; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.class-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.class-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line); border-left: 5px solid #c7c7cc; border-radius: var(--radius);
    text-decoration: none; color: var(--ink); background: #fff; position: relative; }
.class-card:hover { border-color: var(--brand); }
.class-card.current { border-left-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }
.class-card.status-card-finished { opacity: .65; border-left-color: var(--ok); }
.cc-num { font: 700 12px var(--display); color: var(--muted); }
.cc-name { font: 700 16px var(--display); }
.cc-meta { font-size: 12px; color: var(--muted); }
.cc-progress { height: 5px; background: #ececee; border-radius: 3px; overflow: hidden; margin: 4px 0; }
.cc-progress span { display: block; height: 100%; background: var(--brand); }
.cc-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.cc-live { margin-left: auto; color: var(--brand); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; }
.cc-live::before { content: "● "; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.mat-badge { background: var(--brand); color: #fff; padding: 5px 10px; border-radius: 4px; font-weight: 600; font-size: 13px; }

.tabs { display: flex; flex-wrap: wrap; gap: 2px; background: var(--black); padding: 0 8px; border-bottom: 3px solid var(--brand); }
.tab { padding: 10px 14px; color: #d1d1d6; text-decoration: none; font: 600 13px var(--display); text-transform: uppercase; letter-spacing: .5px; border-radius: 4px 4px 0 0; }
.tab:hover { color: #fff; background: var(--black-2); }
.tab.active { background: var(--brand); color: #fff; }
.tab.disabled { color: #5a5a5e; cursor: not-allowed; }
.tab.attention { color: #ffcc66; }
.tab-count { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 10px; background: rgba(255,255,255,.18); font-size: 11px; text-align: center; }
.place-form { max-width: 520px; }
.facts-box { max-width: 520px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 16px; }
.facts-box h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 1px; border-bottom: 2px solid var(--brand); padding-bottom: 4px; }
.fights-table td { vertical-align: middle; }
.fights-table tr.next-fight td { background: var(--brand-light); }
.fights-table tr.waiting td { color: var(--muted); }
.corner-cell { border-left: 4px solid transparent; }
.corner-cell.red { border-left-color: #d0021b; }
.corner-cell.blue { border-left-color: #1e5bd8; }
.corner-cell.won { font-weight: 700; }
.corner-cell.lost { color: var(--muted); }
.vs-cell { color: var(--muted); font-size: 11px; }
.score-cell { font: 700 16px var(--display); white-space: nowrap; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 10px 0 20px; }
.podium-step { width: 220px; text-align: center; border-radius: 8px 8px 0 0; padding: 14px 10px; color: #fff; display: flex; flex-direction: column; gap: 4px; }
.podium-step .pp { font: 700 13px var(--display); text-transform: uppercase; letter-spacing: 1px; opacity: .9; }
.podium-step b { font: 700 18px var(--display); }
.podium-step small { opacity: .85; }
.podium-step.p1 { background: linear-gradient(#d4a017, #a87d0c); min-height: 170px; }
.podium-step.p2 { background: linear-gradient(#9a9aa0, #6e6e73); min-height: 130px; }
.podium-step.p3 { background: linear-gradient(#b0703c, #8a5326); min-height: 100px; }

/* ===================== Anzeigetafel (Punkt 8.4) ===================== */
.board-body { margin: 0; background: #000; color: #fff; height: 100vh; display: flex; flex-direction: column; overflow: hidden; user-select: none; -webkit-user-select: none; }
.board-top { display: flex; align-items: center; gap: 16px; padding: 6px 14px; background: #0d0d0d; border-bottom: 3px solid var(--brand); font-size: 14px; }
.board-info { flex: 1; text-align: center; color: #d1d1d6; font-weight: 600; }
.board-link { color: #fff; text-decoration: none; border: 1px solid #3a3a3c; border-radius: 4px; padding: 5px 10px; }
.board-link:hover { border-color: var(--brand); }
.board-logo { height: 40px; }
.board-clock { font: 700 22px var(--display); }
.scoreboard { flex: 1; display: flex; flex-direction: column; padding: 10px 14px 12px; gap: 10px; min-height: 0; }
.sb-names { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch; }
.sb-name { display: flex; flex-direction: column; justify-content: center; padding: 6px 18px; min-width: 0; }
.sb-name span { font: 600 clamp(22px, 3.6vw, 52px)/1.1 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-name small { font-size: clamp(12px, 1.2vw, 18px); opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-name.red { background: #d0021b; }
.sb-name.blue { background: #1592c4; text-align: right; }
.sb-vs { font: 600 clamp(22px, 3vw, 44px) var(--display); padding: 0 28px; display: flex; align-items: center; }
.sb-field { flex: 1; display: grid; grid-template-columns: minmax(80px, 10%) 1fr 1fr minmax(80px, 10%); gap: 14px; min-height: 0; }
.sb-warn-col, .sb-main-col { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.sb-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sb-btns button { height: clamp(34px, 5vh, 54px); border: 0; border-radius: 4px; font: 700 clamp(20px, 2.6vw, 34px)/1 var(--display); color: #fff; cursor: pointer; touch-action: manipulation; }
.sb-btns .minus { background: linear-gradient(#707074, #48484a); }
.sb-btns .plus { background: linear-gradient(#3fae3f, #237a23); }
.sb-btns button:active, .sb-btns button.pressed { filter: brightness(1.35); transform: translateY(1px); }
.sb-tile { border: 0; border-radius: 18px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: Arial, Helvetica, sans-serif; }
.sb-tile.main { flex: 1; min-height: 0; cursor: pointer; touch-action: manipulation; }
.sb-tile.main span { font-size: clamp(120px, 26vh, 420px); line-height: 1; }
.sb-tile.warn { aspect-ratio: 1 / 1.1; border-radius: 10px; }
.sb-tile.warn span { font-size: clamp(36px, 7vh, 96px); line-height: 1; }
.sb-tile.warn small { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; opacity: .85; }
.sb-tile.red { background: linear-gradient(#e3000f 0%, #b0000b 55%, #5a0006 100%); }
.sb-tile.blue { background: linear-gradient(#18a5d8 0%, #0d6f97 55%, #073a52 100%); }
.sb-tile.main.pressed { filter: brightness(1.25); }
.sb-bottom { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.sb-hint { color: #8e8e93; font-size: 12px; }
.sb-hint kbd { background: #2c2c2e; border-radius: 3px; padding: 0 5px; font-family: inherit; color: #fff; }
.sb-end { justify-self: center; padding: 10px 26px; font-size: 16px; }
.sb-status { justify-self: end; font-size: 12px; color: #8e8e93; }
.sb-status.ok { color: #5ad35a; }
.sb-status.err { color: #ff6b6b; font-weight: 700; }
.finish-score { display: flex; align-items: center; justify-content: center; gap: 14px; font-weight: 600; }
.finish-score b { font: 700 32px var(--display); }
.finish-score .red { color: #d0021b; } .finish-score .blue { color: #1592c4; }
/* Zuschauer */
.display-body .sb-field { grid-template-columns: minmax(90px, 11%) 1fr 1fr minmax(90px, 11%); }
.display-body .sb-warn-col { justify-content: flex-start; }
.sb-winner { text-align: center; font: 700 clamp(26px, 4vw, 60px) var(--display); text-transform: uppercase; padding: 10px; border-radius: 10px; }
.sb-winner.red { background: #d0021b; } .sb-winner.blue { background: #1592c4; }
.sb-waiting { text-align: center; color: #8e8e93; font-size: 22px; }
.flash-change { animation: flashc .5s; }
@keyframes flashc { 0% { filter: brightness(2); } 100% { filter: none; } }
@media (max-width: 760px) {
    .sb-field { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; }
    .sb-warn-col { order: -1; flex-direction: row; align-items: center; }
    .sb-warn-col .sb-btns { flex: 1; }
    .sb-tile.warn { aspect-ratio: auto; width: 70px; height: 54px; }
    .sb-tile.main span { font-size: 26vw; }
    .sb-hint { display: none; }
    .sb-bottom { grid-template-columns: 1fr auto; }
}

/* ===================== Urkunden ===================== */
.cert-opts { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: flex-end; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fafafa; }
.cert-opts label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px; }
.cert-opts select { padding: 7px; border: 1px solid var(--line); border-radius: 4px; font: inherit; min-width: 280px; }
.cert-opts label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.cert-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.disabled { opacity: .55; }
.muted-row td { color: var(--muted); }
.places-cell span { display: block; font-size: 12px; white-space: nowrap; }
.places-cell .pl-1 { font-weight: 700; color: #a87d0c; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tpl-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.tpl-card.is-default { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }
.tpl-thumb { display: flex; align-items: center; justify-content: center; background: #f2f2f3; height: 220px; padding: 10px; text-decoration: none; color: var(--muted); }
.tpl-thumb img { max-height: 100%; max-width: 100%; box-shadow: 0 2px 8px rgba(0,0,0,.2); background: #fff; }
.tpl-info { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 2px; }
.tpl-actions { padding: 8px 12px 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* Editor */
.ce-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.ce-stage { background: #3a3a3c; border-radius: var(--radius); padding: 12px; }
.ce-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #d1d1d6; font-size: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.ce-toolbar .muted { color: #a1a1a6; }
.ce-toolbar label.check { color: #fff; }
.ce-page-wrap { display: flex; justify-content: center; }
.ce-page { position: relative; width: min(100%, 620px); background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.45); overflow: hidden; touch-action: none; user-select: none; }
.ce-page.landscape { width: 100%; }
.ce-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.ce-field { position: absolute; line-height: 1.2; font-synthesis: none; white-space: pre; font-kerning: none; font-variant-ligatures: none; font-feature-settings: "kern" 0, "liga" 0; letter-spacing: 0; word-spacing: 0; text-rendering: optimizeSpeed; cursor: move; outline: 1px dashed rgba(0,120,255,.45); min-height: 1em; }
.ce-field:hover { outline-color: rgba(0,120,255,.9); background: rgba(0,120,255,.05); }
.ce-field.selected { outline: 2px solid #007aff; background: rgba(0,122,255,.08); z-index: 2; }
.ce-resize { position: absolute; right: -5px; top: 0; bottom: 0; width: 10px; cursor: ew-resize; }
.ce-field.selected .ce-resize { background: #007aff; border-radius: 3px; opacity: .8; }
.ce-tag { position: absolute; left: 0; top: -15px; font: 600 9px/13px Arial, sans-serif; color: #fff; background: #007aff; padding: 0 5px; border-radius: 3px 3px 0 0; display: none; white-space: nowrap; font-style: normal; }
.ce-field.selected .ce-tag, .ce-field:hover .ce-tag { display: block; }
.ce-guide { position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed #e3000f; pointer-events: none; }
.ce-side fieldset { margin-bottom: 12px; }
.ce-side label { margin-bottom: 8px; }
.ce-side textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; width: 100%; resize: vertical; }
.ce-side input[type=color] { height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: 4px; width: 100%; }
.ce-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.ce-row.three { grid-template-columns: 1fr 1fr 1fr; }
.ce-row .btn { justify-content: center; }
@media (max-width: 1100px) { .ce-layout { grid-template-columns: 1fr; } }

/* ===================== Auswertung ===================== */
.place-badge { display: inline-block; min-width: 30px; padding: 1px 6px; border-radius: 10px; background: #ececee; font-weight: 700; text-align: center; }
.place-badge.p1 { background: #f5c518; color: #3d2f00; }
.place-badge.p2 { background: #c9ccd1; color: #26282b; }
.place-badge.p3 { background: #d58b4c; color: #fff; }
.podium-row td { background: #fffaf0; }
.search-hit td { background: var(--brand-light) !important; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot.red { background: var(--brand); }
.dot.blue { background: #1d4ed8; }
td.winner { font-weight: 700; }
td.winner small { font-weight: 400; }
.win-mark { color: var(--brand); }
.eval-search { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.eval-search input[type=search] { flex: 1 1 320px; max-width: 520px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; align-items: start; }
.rank-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; scroll-margin-top: 80px; }
.rank-card.focus { outline: 3px solid var(--brand); }
.rank-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--black); color: #fff; border-bottom: 3px solid var(--brand); }
.rank-card header h3 { margin: 0; font: 600 16px var(--display); text-transform: uppercase; letter-spacing: .5px; }
.rank-card header small { color: #c7c7cc; }
.rank-card .rank-table { margin: 0; border: 0; }
.rank-card footer { padding: 6px 12px; font-size: 12px; border-top: 1px solid var(--line); }
.print-only { display: none; }
@media (max-width: 560px) { .rank-grid { grid-template-columns: 1fr; } }
@media print {
    .print-only { display: block; font-size: 16px; margin: 0 0 10px; }
    .no-print, .tabs, .eval-search, .hint, .export-menu { display: none !important; }
    .rank-grid { display: block; }
    .rank-card { break-inside: avoid; page-break-inside: avoid; margin-bottom: 10px; }
    .rank-card header { background: #fff; color: #000; }
    .rank-card header small { color: #444; }
    tr[hidden] { display: none !important; }
}

/* Ranglisten je Klasse: aufklappbare Zeilen */
.rank-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.rank-item + .rank-item { border-top: 1px solid var(--line); }
.rank-item > summary { list-style: none; display: grid; grid-template-columns: 18px 44px minmax(200px, 1.2fr) minmax(0, 2fr) auto auto; gap: 12px; align-items: center;
    padding: 10px 14px; cursor: pointer; }
.rank-item > summary::-webkit-details-marker { display: none; }
.rank-item > summary:hover { background: #f7f7f8; }
.rank-item[open] > summary { background: var(--black); color: #fff; border-bottom: 3px solid var(--brand); }
.rank-item[open] > summary .muted { color: #c7c7cc; }
.ri-arrow::before { content: "▸"; color: var(--brand); font-size: 16px; display: inline-block; transition: transform .15s; }
.rank-item[open] .ri-arrow::before { transform: rotate(90deg); }
.ri-num { font: 700 18px var(--display); color: var(--brand); text-align: right; }
.ri-name strong { display: block; font: 600 15px var(--display); text-transform: uppercase; letter-spacing: .4px; }
.ri-podium { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; }
.ri-podium span { white-space: nowrap; }
.ri-podium .pl-1::before { content: "🥇 "; } .ri-podium .pl-2::before { content: "🥈 "; } .ri-podium .pl-3::before { content: "🥉 "; }
.ri-podium .pl-1, .ri-podium .pl-2, .ri-podium .pl-3 { font-weight: 600; }
.rank-item[open] .ri-podium { visibility: hidden; }
.ri-print { white-space: nowrap; }
.ri-body { padding: 0 0 6px; }
.ri-body .rank-table { margin: 0; border: 0; }
.ri-links { margin: 6px 14px 4px; font-size: 12px; }
@media (max-width: 900px) {
    .rank-item > summary { grid-template-columns: 16px 34px 1fr auto; }
    .ri-podium { grid-column: 3 / -1; order: 5; }
    .rank-item > summary .status { display: none; }
}
@media print {
    .rank-list { border: 0; }
    .rank-item { break-inside: avoid; page-break-inside: avoid; margin-bottom: 8px; border: 1px solid #ccc !important; }
    .rank-item > summary, .rank-item[open] > summary { background: #fff !important; color: #000; grid-template-columns: 0 44px 1fr auto; }
    .ri-print, .ri-arrow, .ri-podium { display: none !important; }
}
a.btn.disabled { pointer-events: none; }

/* Saison-Rangliste / Kader */
.season-bar { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; padding: 10px 16px; background: #f7f7f8; border-bottom: 1px solid var(--line); }
.season-bar > label { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.season-bar select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; font: inherit; }
.season-tournaments { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.kader-tag { display: inline-block; padding: 0 6px; border-radius: 3px; background: var(--brand); color: #fff; font: 600 10px/16px var(--display); text-transform: uppercase; letter-spacing: .6px; vertical-align: 1px; }
.kader-row td { background: #fff6f6; }
.season-table .t-col { font-size: 12px; white-space: nowrap; }
.season-table th.t-col small, .data th.t-col small { font-weight: 400; opacity: .8; }
tr.group-start td { border-top: 2px solid var(--ink); }
.rank-item[open] .ri-podium .muted { color: #c7c7cc; }
.sub-head { font: 600 16px var(--display); text-transform: uppercase; letter-spacing: .5px; margin: 18px 0 6px; border-left: 4px solid var(--brand); padding-left: 8px; }

/* Sprachauswahl */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lang-select select { background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; padding: 5px 8px; font: 600 12px/1.2 inherit; cursor: pointer; }
.lang-select select option { color: #000; background: #fff; }
.plain-lang { position: fixed; top: 12px; right: 14px; z-index: 5; }
@media print { .lang-select, .plain-lang { display: none !important; } }
.badge.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: #f0c070; }

/* Kampfmodus: Kampffläche muss gewählt werden */
.mat-required { border: 3px solid var(--brand); background: #fff1f2; border-radius: var(--radius); padding: 28px 24px; text-align: center; margin: 6px 0 10px; }
.mat-required .mr-icon { font-size: 56px; line-height: 1; color: var(--brand); }
.mat-required h2 { font: 700 30px var(--display); text-transform: uppercase; letter-spacing: 1px; color: var(--brand); margin: 10px 0 6px; }
.mat-required p { font-size: 16px; margin: 0 0 18px; color: var(--ink); }
.mr-buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn.big { font-size: 18px; padding: 14px 26px; flex-direction: column; gap: 2px; }
.btn.big small { font-size: 12px; font-weight: 400; opacity: .85; }
select.needs-choice { border: 2px solid var(--brand); box-shadow: 0 0 0 3px rgba(227,0,15,.25); animation: pulse-sel 1.6s ease-in-out infinite; }
@keyframes pulse-sel { 50% { box-shadow: 0 0 0 6px rgba(227,0,15,.08); } }

/* Zugangspasswort */
.gate-lock { text-align: center; font: 600 15px var(--display); text-transform: uppercase; letter-spacing: 1px; color: var(--brand); margin: 0 0 6px; }
.gate-public { text-align: center; font-size: 13px; margin: 12px 0 0; color: var(--muted); }

/* Öffentliche Live-Ansicht */
body.public { background: var(--bg); }
.public-main { max-width: 1400px; margin: 0 auto; padding: 16px; }
.public-brand { text-decoration: none; color: inherit; display: flex; align-items: center; }
.live-dot { color: #ff3b30; font: 700 12px var(--display); letter-spacing: 1.5px; animation: livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse { 50% { opacity: .35; } }
.live-list { display: grid; gap: 10px; }
.live-tournament { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--panel); }
.live-tournament:hover { border-color: var(--brand); }
.live-tournament strong { font: 600 18px var(--display); text-transform: uppercase; }
a.rank-item.live-class { display: grid; grid-template-columns: 44px minmax(180px, 1.2fr) minmax(0, 2fr) auto; gap: 12px; align-items: center; padding: 10px 14px; color: var(--ink); text-decoration: none; }
a.rank-item.live-class:hover { background: #f7f7f8; }
.live-mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.live-mat { border-radius: var(--radius); overflow: hidden; background: #0d0d0d; color: #fff; min-height: 150px; }
.lm-head { padding: 10px 14px; border-bottom: 3px solid var(--brand); font: 600 16px var(--display); text-transform: uppercase; letter-spacing: .5px; }
.lm-head small { color: #a1a1a6; text-transform: none; font-weight: 400; }
.lm-meta { padding: 6px 14px; font-size: 12px; color: #c7c7cc; }
.lm-live { color: #ff3b30; }
.lm-idle { padding: 30px 14px; color: #a1a1a6; text-align: center; }
.lm-side { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.lm-side.red { background: linear-gradient(90deg, #b3000c, #e3000f); }
.lm-side.blue { background: linear-gradient(90deg, #0b3a9e, #1d4ed8); }
.lm-side.win .lm-name::after { content: " ✔"; }
.lm-name { flex: 1; font: 600 18px var(--display); text-transform: uppercase; display: flex; flex-direction: column; }
.lm-name small { font: 400 12px system-ui, sans-serif; text-transform: none; opacity: .85; }
.lm-warn { font-size: 13px; background: rgba(0,0,0,.25); padding: 2px 7px; border-radius: 10px; }
.lm-score { font: 700 40px var(--display); min-width: 60px; text-align: right; }
@media (max-width: 700px) {
    a.rank-item.live-class { grid-template-columns: 34px 1fr auto; }
    a.rank-item.live-class .ri-podium { grid-column: 2 / -1; order: 5; }
    .live-mats { grid-template-columns: 1fr; }
    .public-main { padding: 8px; }
}
