/* ReScore – Verwaltung & Livestream (dunkel, für Regieplätze) */
:root {
  --bg: #0e1014; --bg2: #161920; --bg3: #1e222b; --line: #2a2f3a; --line2: #363c49;
  --text: #e8eaef; --muted: #8b92a3; --accent: #e3263a; --accent2: #ff4d5e;
  --ok: #2fbf71; --warn: #f2b53b; --bad: #ef4444; --idle: #5b6273; --info: #4ea1ff;
  --r: 8px; --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); }
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .6em; line-height: 1.2; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; } h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 1.2em; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; }
code { font-family: var(--mono); font-size: 12px; background: var(--bg3); padding: 2px 6px; border-radius: 4px; word-break: break-all; }
code.copy { cursor: pointer; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- Kopf ---------- */
.top { display: flex; align-items: center; gap: 20px; padding: 0 20px; height: 54px; background: var(--bg2); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--text); }
.brand span { color: var(--accent); }
.brand.big { font-size: 40px; text-align: center; margin-bottom: 20px; }
.top .main { display: flex; gap: 4px; }
.top .main a { color: var(--muted); padding: 8px 14px; border-radius: var(--r); font-weight: 600; }
.top .main a.on, .top .main a:hover { color: var(--text); background: var(--bg3); text-decoration: none; }
.top .right { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.orgname { color: var(--text); font-weight: 600; }
.wrap { max-width: 1500px; margin: 0 auto; padding: 22px 20px 40px; }
.foot { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--idle); font-size: 12px; padding: 28px 20px 24px; }
.foot a { color: var(--idle); }
/* Powered by kerscher.events (gleich wie Kommentar-Seite) */
.powered { display: inline-flex; align-items: center; gap: 12px; color: rgba(255,255,255,.72); text-decoration: none; font-weight: 800; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; line-height: 1; }
.powered img { display: block; height: 22px; width: auto; }
a.powered:hover { color: #fff; }
.center-card .powered { margin: 22px auto 0; display: flex; justify-content: center; }
.brand .app-logo { display: block; height: 15px; width: auto; }
.brand.big .app-logo { height: 30px; max-width: 100%; margin: 0 auto 6px; }

/* ---------- Bausteine ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line2); background: var(--bg3); color: var(--text); padding: 8px 14px; border-radius: var(--r); font: 600 13px var(--font); cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .12s, border-color .12s; }
.btn:hover { background: #262b36; border-color: #4a5160; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent2); }
.btn.danger { color: #ffb4b4; border-color: #5b2a2f; background: #2a1518; }
.btn.danger:hover { background: #3a1a1f; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.xs { padding: 2px 8px; font-size: 11px; }
.btn.big { padding: 14px 22px; font-size: 20px; min-width: 90px; }
.btn.onair-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.panel { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.bar h1, .bar h2, .bar h3 { margin: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid2.wide-left { grid-template-columns: 1.6fr 1fr; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.card:hover { border-color: var(--line2); text-decoration: none; }
.card small { display: block; color: var(--muted); }
.team-card { border-left: 5px solid var(--a); }
.tlogo { width: 46px; height: 46px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, var(--a), var(--b)); font-weight: 800; color: #fff; overflow: hidden; flex: none; }
.tlogo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.empty { color: var(--muted); padding: 30px; text-align: center; border: 1px dashed var(--line2); border-radius: 12px; }
.tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line2); color: var(--muted); text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
.warn { color: var(--warn); }
.ok-line { color: var(--ok); }

/* Formulare */
.form { display: flex; flex-direction: column; gap: 12px; }
.form label, label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-weight: 500; font-size: 13px; }
input, select, textarea { font: 14px var(--font); color: var(--text); background: var(--bg); border: 1px solid var(--line2); border-radius: 6px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
input[type=color] { padding: 2px; height: 36px; }
input[type=file] { padding: 6px; font-size: 12px; }
input.tiny { width: 60px; padding: 3px 6px; display: inline-block; }
.form small { color: var(--idle); font-weight: 400; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.actions { display: flex; gap: 8px; margin-top: 4px; }
form.inline { display: inline; }
.center-card { max-width: 420px; margin: 8vh auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.flash { padding: 10px 14px; border-radius: var(--r); margin-bottom: 14px; background: #10301f; border: 1px solid #1d5a3a; color: #b6f0cf; }
.flash.err { background: #2c1316; border-color: #6b2730; color: #ffc4c9; }
.flash.warn { background: #2d2412; border-color: #6b5420; color: #ffe3a3; }
.danger-zone { margin-top: 20px; text-align: right; }

/* Tabellen */
.tbl { width: 100%; border-collapse: collapse; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--bg3); }
.tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.inactive td { opacity: .45; }
.tbl tr.editing td { background: #1d2230; }
.tbl tr.past td { opacity: .55; }
.tbl tr.is-live td { background: #2a1519; }
.tbl td.acts { text-align: right; white-space: nowrap; }
.tbl td.acts > * { margin-left: 4px; }
.tbl td.nr { font-weight: 800; font-size: 16px; width: 40px; }
.thumb { width: 40px; height: 52px; object-fit: cover; object-position: top; border-radius: 4px; background: var(--bg3); display: block; }
.thumb.big { width: 90px; height: 120px; }
.thumb.logo { width: 60px; height: 60px; object-fit: contain; background: #fff; padding: 4px; }
.nophoto { display: grid; place-items: center; width: 40px; height: 52px; border-radius: 4px; border: 1px dashed var(--line2); color: var(--muted); }
.origin { font-size: 11px; padding: 2px 7px; border-radius: 10px; background: var(--bg3); color: var(--muted); }
.origin.o-importiert { color: #9ec9ff; }
.origin.o-bearbeitet { color: #b6f0cf; }
.photo-row, .logo-row { display: flex; gap: 14px; align-items: center; }
.pwreset input { width: 140px; padding: 4px 8px; font-size: 12px; display: inline-block; }
.mini-log { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; margin-bottom: 12px; max-height: 180px; overflow: auto; font-family: var(--mono); font-size: 12px; }
.mini-log .ok { color: var(--ok); } .mini-log .err { color: var(--bad); }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 16px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs a:hover { color: var(--text); text-decoration: none; }

/* Badges / Chips */
.badge { display: inline-block; font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 10px; text-transform: uppercase; letter-spacing: .05em; background: var(--idle); color: #fff; }
.b-live, .b-on { background: var(--ok); color: #04210f; }
.b-stale { background: var(--warn); color: #2a1d00; }
.b-off { background: var(--bad); }
.b-idle { background: var(--line2); color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 14px; font-size: 12px; font-weight: 600; background: var(--bg3); border: 1px solid var(--line2); white-space: nowrap; }
.chip.ok { border-color: #1d5a3a; color: #8fe3b4; background: #10261b; }
.chip.warn { border-color: #6b5420; color: #ffd36e; background: #2a2210; }
.chip.bad { border-color: #6b2730; color: #ff9aa4; background: #2c1316; }
.chip.idle { color: var(--muted); }

/* Start */
.home-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
.tile { display: block; padding: 34px; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; color: var(--text); }
.tile b { display: block; font-size: 26px; margin-bottom: 6px; }
.tile span { color: var(--muted); }
.tile.accent { border-color: #5b2a2f; background: linear-gradient(135deg, #2a1418, var(--bg2)); }
.tile:hover { text-decoration: none; border-color: var(--accent); }

/* Spielauswahl */
.game-list { display: flex; flex-direction: column; gap: 8px; }
.game { display: grid; grid-template-columns: 170px 1fr auto 90px; align-items: center; gap: 14px; text-align: left; padding: 16px 18px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: inherit; cursor: pointer; }
.game:hover { border-color: var(--accent); }
.game.today { border-color: #5b2a2f; background: linear-gradient(90deg, #2a1418, var(--bg2) 50%); }
.game.is-live { border-color: var(--ok); }
.game .when { font-weight: 700; color: var(--muted); }
.game.today .when { color: var(--accent2); }
.game .teams { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.game .teams em { color: var(--muted); font-style: normal; font-weight: 400; font-size: 13px; }
.game .teams i { width: 10px; height: 22px; border-radius: 2px; display: inline-block; }
.game .meta { color: var(--muted); font-size: 12px; }
.game .go { color: var(--accent2); font-weight: 700; text-align: right; }
.game-list.small .game { grid-template-columns: 170px 1fr 90px; padding: 10px 14px; }
.game-list.small .teams { font-size: 14px; }
.past-games { margin-top: 24px; }
.past-games summary { cursor: pointer; color: var(--muted); margin-bottom: 10px; }

/* ---------- Livestream-Steuerung ---------- */
.live-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
.live-head .match { display: flex; align-items: center; gap: 8px; font-size: 18px; }
.live-head .match em { color: var(--muted); font-style: normal; font-size: 13px; }
.live-head .match small { color: var(--muted); margin-left: 8px; }
.live-head .dot { width: 10px; height: 22px; border-radius: 2px; }
.live-head .ready { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.live-head .head-acts { display: flex; gap: 6px; }
.live-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 16px; align-items: start; }
.ph { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ph h3 { margin: 0; flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; }
.seg button { background: transparent; border: 0; color: var(--muted); padding: 6px 12px; font: 600 12px var(--font); cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }
.bigscore { display: grid; grid-template-columns: minmax(0, 1fr) 44px 70px 18px 70px 44px minmax(0, 1fr); gap: 4px; align-items: center; background: #07080a; border-radius: 10px; padding: 16px 12px 10px; text-align: center; }
.bs-team { grid-row: 1; grid-column: 1 / 4; min-width: 0; font-size: 18px; line-height: 1.2; font-weight: 800; display: flex; align-items: center; gap: 8px; justify-content: flex-start; text-align: left; }
.bs-team.r { grid-column: 5 / 8; }
.bigscore > .bs-sets, .bigscore > .bs-pts, .bigscore > .bs-sep { grid-row: 2; }
.bigscore > :nth-child(3) { grid-column: 2; } .bigscore > :nth-child(4) { grid-column: 3; } .bigscore > :nth-child(5) { grid-column: 4; } .bigscore > :nth-child(6) { grid-column: 5; } .bigscore > :nth-child(7) { grid-column: 6; }
.bs-team.r { text-align: right; }
.bs-team i { flex: none; }
.bs-team.r { justify-content: flex-end; }
.bs-team i { width: 8px; height: 26px; border-radius: 2px; }
.bs-team.has-logo i { height: 52px; }
.bs-logo { height: 56px; max-width: 140px; width: auto; object-fit: contain; background: #fff; border-radius: 8px; padding: 5px; box-sizing: border-box; }
.bs-team .srv { color: var(--accent, #e3263a); font-size: 14px; }
.bs-sets { font-size: 26px; font-weight: 800; color: var(--muted); }
.bs-pts { font-size: 48px; font-weight: 900; font-variant-numeric: tabular-nums; }
.bs-sep { font-size: 30px; color: var(--muted); }
.bs-meta { grid-row: 3; grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: 6px; }
.bs-meta b.bad { color: var(--warn); }
.srv { color: var(--warn); font-size: 14px; }
.sources { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.src { display: grid; grid-template-columns: 70px 110px 90px 1fr; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 6px; background: var(--bg); border: 1px solid transparent; font-size: 12px; }
.src.active { border-color: var(--ok); }
.src small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.manual { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 12px; border: 1px dashed var(--line2); border-radius: 10px; opacity: .45; }
.manual.active { opacity: 1; border-color: var(--warn); background: #1d190f; }
.mside { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.mside .mt { font-size: 13px; }
.mbtns { display: flex; gap: 6px; }
.mbtns .btn { flex: 1; }
.mfoot { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.out-toggle { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.onair { font-size: 11px; font-weight: 800; color: var(--muted); }
.onair.on { color: #fff; background: var(--accent); padding: 3px 8px; border-radius: 4px; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .7; } }
.gfx-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wechsel { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.wechsel select:first-child { grid-column: 1 / -1; }
.wechsel .btn { grid-column: 1 / -1; }
.hint { margin-top: 8px; padding: 8px 10px; border-radius: 6px; background: #13243a; border: 1px solid #22476e; font-size: 12px; }
.lineup-tabs { margin-bottom: 8px; }
.lineup { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.lineup label { flex-direction: row; align-items: center; gap: 6px; }
.lineup label span { width: 26px; font-weight: 800; color: var(--text); }
.lineup select { padding: 5px 6px; font-size: 12px; }
#lowerSearch { margin: 10px 0; }
.lower-list { display: flex; flex-direction: column; gap: 4px; max-height: 470px; overflow: auto; margin-bottom: 10px; }
.lower-list .li { display: grid; grid-template-columns: 70px 1fr; grid-template-rows: auto auto; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; color: var(--text); font: inherit; cursor: pointer; }
.lower-list .li:hover { border-color: var(--accent); }
.lower-list .li .tag { grid-row: 1 / 3; align-self: center; justify-self: start; border-left-width: 3px; }
.lower-list .li small { color: var(--muted); }
details summary { cursor: pointer; color: var(--muted); }
.previews .pv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pv-label { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 6px; font-size: 13px; }
.pv-label .btn { margin-left: auto; }
.pv-note { color: var(--muted); font-size: 12px; padding: 20px; border: 1px dashed var(--line2); border-radius: 8px; aspect-ratio: 16 / 9; display: grid; place-items: center; text-align: center; }
.preview-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); background: #000; }
.preview-stage.checker { background: repeating-conic-gradient(#1a1d24 0 25%, #12141a 0 50%) 0 0 / 24px 24px; }
.preview-stage iframe { position: absolute; top: 0; left: 0; width: 1920px; height: 1080px; border: 0; transform-origin: 0 0; transform: scale(var(--s, .2)); pointer-events: none; }

/* Logs */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 6px; }
.filters select, .filters input { width: auto; }
.filters input { min-width: 260px; }
.log-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.log-summary .sum { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 8px; color: var(--text); border: 1px solid; }
.log-summary .sum.warn { border-color: #6b5420; background: #221c0f; }
.log-summary .sum.err { border-color: #6b2730; background: #2c1316; }
.log-summary .sum small { color: var(--muted); }
.tbl.logs td { font-size: 12px; vertical-align: top; }
.tbl.logs pre { font-size: 11px; background: var(--bg); padding: 8px; border-radius: 4px; overflow: auto; max-width: 700px; }
.lvl { font-size: 10px; font-weight: 800; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; }
.lvl-debug { color: var(--idle); } .lvl-info { color: var(--info); }
.lvl-warn { background: #3a2c0e; color: var(--warn); } .lvl-error { background: #3d1418; color: #ff8c97; }
tr.lv-error td { background: #1f1012; }

/* Toasts */
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { padding: 10px 16px; border-radius: 8px; background: #10301f; border: 1px solid #1d5a3a; color: #b6f0cf; font-weight: 600; box-shadow: 0 8px 30px #0008; transition: opacity .5s; }
.toast.err { background: #2c1316; border-color: #6b2730; color: #ffc4c9; }
.toast.out { opacity: 0; }

@media (max-width: 1200px) { .live-grid { grid-template-columns: 1fr 1fr; } .previews .pv-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) {
  .grid2, .grid2.wide-left, .live-grid, .home-tiles { grid-template-columns: 1fr; }
  .game { grid-template-columns: 1fr; gap: 4px; }
  .top { gap: 10px; padding: 0 12px; } .top .user { display: none; }
  .tbl { display: block; overflow-x: auto; }
}

.import-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
.import-row small { display: block; }

/* v2 */
.team-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 1px solid var(--line2); border-radius: 20px; }
.team-chip img { width: 28px; height: 28px; object-fit: contain; background: #fff; border-radius: 50%; padding: 2px; }
.team-chip small { color: var(--muted); font-weight: 700; }
.top .btn.on { background: var(--bg3); border-color: var(--line2); }
.center-card.login { max-width: 460px; }
.btn.big-login { padding: 12px; font-size: 15px; }
.crumbs { font-size: 18px; } .crumbs a { color: var(--muted); }
.sport-h { margin-top: 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.panel.league .bar h3 small { font-weight: 500; margin-left: 6px; }
.add-card { border-style: dashed; gap: 6px; }
.add-card input { padding: 6px 8px; font-size: 13px; }
.bar .acts { display: flex; gap: 8px; align-items: center; }

/* ---------- v2 Livestream ---------- */
.live-head .match img { width: 32px; height: 32px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.live-tabs { align-items: center; }
.live-tabs a { font-size: 15px; padding: 12px 20px; }
.onair-strip { margin-left: auto; display: flex; gap: 8px; }
.onair:empty { display: none; }
.start-grid { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 16px; align-items: start; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile-btn { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 84px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg3); color: var(--text); font: inherit; cursor: pointer; text-align: left; border-left: 6px solid var(--tc, var(--line2)); transition: background .12s, transform .08s; }
.tile-btn b { font-size: 20px; font-weight: 800; }
.tile-btn small { color: var(--muted); font-size: 13px; }
.tile-btn:hover { background: #262b36; }
.tile-btn:active { transform: scale(.98); }
.tile-btn.live { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 0 0 3px #e3263a55; }
.tile-btn.live small { color: #ffe1e4; }
.tile-btn.live::after { content: "ON AIR · klicken = aus"; position: absolute; top: 8px; right: 10px; font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.btn.live { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.huge { padding: 16px 28px; font-size: 20px; min-width: 200px; }
.lq-carousel { display: grid; grid-template-columns: 56px 1fr 56px; gap: 8px; align-items: stretch; }
.lq-nav { font-size: 20px; }
.lq-card { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 110px; padding: 14px 18px; background: #07080a; border-radius: 10px; border-left: 6px solid var(--accent); }
.lq-card b { font-size: 22px; } .lq-card span { color: var(--muted); font-size: 15px; } .lq-card small { color: var(--idle); }
.lq-card.live { box-shadow: 0 0 0 3px var(--accent); } .lq-card em { color: var(--accent2); font-style: normal; font-weight: 800; }
.lq-acts { display: flex; align-items: center; gap: 14px; margin: 12px 0; flex-wrap: wrap; }
.lq-list { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; margin-bottom: 12px; }
.lq-item { text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; color: var(--text); font: inherit; cursor: pointer; }
.lq-item.sel { border-color: var(--info); } .lq-item.live { border-color: var(--accent); background: #2a1519; }
.lq-item small { color: var(--muted); }
.lq-new { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 6px; }
.lower-table { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.lt-row { display: grid; grid-template-columns: 1fr 1fr auto auto auto; gap: 6px; padding: 6px; border-radius: 8px; border: 1px solid transparent; }
.lt-row.live { border-color: var(--accent); background: #2a1519; }
.crew-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.crew-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }
.seg.big button { padding: 10px 18px; font-size: 14px; }
.seg button:disabled { opacity: .4; cursor: default; }
.lineup-bar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 16px; }
.courts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.court-panel { border-top: 5px solid var(--tc); }
.court { position: relative; background: linear-gradient(#c96a2b, #b85d22); border: 3px solid #f4f1ea; border-radius: 6px; padding: 34px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.court .net { position: absolute; top: 0; left: -3px; right: -3px; height: 22px; background: repeating-linear-gradient(90deg, #f4f1ea 0 2px, #222 2px 8px); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .3em; text-align: center; line-height: 22px; text-shadow: 0 0 3px #000; }
.court .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.court .row.front { padding-bottom: 12px; border-bottom: 2px solid #f4f1ea; }
.slot { min-height: 128px; border-radius: 8px; border: 2px dashed rgba(255,255,255,.45); display: flex; align-items: stretch; justify-content: center; position: relative; }
.slot::before { content: attr(data-pos); position: absolute; top: 4px; right: 6px; font-size: 11px; font-weight: 800; color: rgba(255,255,255,.75); z-index: 1; }
.slot[data-pos="1"]::before { content: "I"; } .slot[data-pos="2"]::before { content: "II"; } .slot[data-pos="3"]::before { content: "III"; }
.slot[data-pos="4"]::before { content: "IV"; } .slot[data-pos="5"]::before { content: "V"; } .slot[data-pos="6"]::before { content: "VI"; }
.slot.filled { border-style: solid; border-color: rgba(255,255,255,.8); }
.slot.over, .bench.over { outline: 3px solid var(--warn); outline-offset: 2px; }
.slot .empty { align-self: center; color: rgba(255,255,255,.7); font-size: 12px; }
.libs { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.libs > span { width: 60px; color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; }
.slot.lib { flex: 1; min-height: 72px; background: #1d2230; border-color: var(--line2); }
.slot.lib::before { content: "L"; }
.bench { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; min-height: 60px; padding: 8px; border-radius: 8px; background: var(--bg); }
.pchip { display: grid; grid-template-columns: 38px auto 1fr; align-items: center; gap: 6px; width: 100%; padding: 4px; border-radius: 6px; background: rgba(10,11,14,.85); border: 1px solid var(--line2); color: var(--text); cursor: grab; user-select: none; }
.slot .pchip { grid-template-columns: 1fr; grid-template-rows: 1fr auto; text-align: center; padding: 0; overflow: hidden; }
.slot .pchip img, .slot .pchip .ph { width: 100%; height: 84px; object-fit: cover; object-position: top; }
.slot .pchip b { position: absolute; left: 4px; bottom: 30px; background: var(--tc); padding: 0 6px; font-size: 18px; border-radius: 3px; }
.slot.lib .pchip { grid-template-columns: 38px auto 1fr; text-align: left; padding: 4px; }
.slot.lib .pchip img, .slot.lib .pchip .ph { width: 38px; height: 46px; }
.slot.lib .pchip b { position: static; }
.pchip img, .pchip .ph { width: 38px; height: 46px; object-fit: cover; object-position: top; border-radius: 4px; background: #2a2f3a; display: block; }
.pchip b { font-size: 16px; }
.pchip span { font-size: 13px; font-weight: 700; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 2px; }
.pchip small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.pchip.sel { outline: 3px solid var(--warn); }
.pchip.dragging { opacity: .4; }
@media (max-width: 1300px) { .start-grid { grid-template-columns: 1fr 1fr; } .start-grid .lower-quick { grid-column: 1 / -1; } }
@media (max-width: 900px) { .start-grid, .courts { grid-template-columns: 1fr; } }
.game .teams img { width: 30px; height: 30px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }

/* v2.1 – grössere Eingaben für neue Bauchbinden, Teamfarbe */
.lq-new { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.lq-new input { font-size: 18px; padding: 15px 16px; min-height: 56px; border-radius: 8px; }
.lq-new .btn { font-size: 16px; padding: 14px 18px; }
.lower-quick .lq-new { grid-template-columns: 1fr; }
.lower-quick .lq-new .btn { width: 100%; }
.lt-row input { font-size: 16px; padding: 11px 12px; }
.teamcolor { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.teamcolor .big-color { width: 120px; height: 52px; }
.tc-preview { display: flex; align-items: center; height: 52px; background: #111; border-radius: 6px; overflow: hidden; font-weight: 800; font-size: 22px; color: #fff; }
.tc-preview i { width: 10px; align-self: stretch; background: var(--a); }
.tc-preview b { padding: 0 16px; } .tc-preview span { background: var(--a); align-self: stretch; display: grid; place-items: center; padding: 0 16px; font-size: 26px; border-left: 4px solid var(--b); }

/* ---------- v3 – Livestream: Inhalt links/Mitte, Einblendungen rechts (auf allen Seiten gleich) ---------- */
.sec-livestream .wrap { max-width: 1920px; }
.live-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.live-main { min-width: 0; }
.live-main > .panel:last-child, .live-main .grid2 > .panel { margin-bottom: 18px; }
.live-aside { position: sticky; top: 66px; max-height: calc(100vh - 80px); overflow: auto; padding: 16px; border-color: #3a2228; }
.live-aside h4 { margin: 14px 0 8px; }
.live-aside .off-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; }
.live-aside .off-row .btn { padding: 12px 8px; font-size: 14px; font-weight: 800; }
.live-aside .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.live-aside .tile-btn { min-height: 76px; padding: 12px 14px; min-width: 0; overflow: hidden; }
.live-aside .tile-btn b { font-size: 18px; line-height: 1.15; max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }
.live-aside .tile-btn.live b { padding-right: 46px; }
.live-aside .tile-btn.wide { grid-column: 1 / -1; min-height: 64px; }
.live-aside .tile-btn.live::after { content: "ON AIR"; }
.team-tiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.tcol { display: flex; flex-direction: column; gap: 8px; }
.tcol-h { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: var(--bg); border-left: 6px solid var(--tc); font-weight: 800; font-size: 15px; overflow: hidden; white-space: nowrap; }
.tcol-h img { width: 26px; height: 26px; object-fit: contain; background: #fff; border-radius: 5px; padding: 2px; }
.tcol .tile-btn { min-height: 64px; border-left-color: var(--tc); }
.as-lower { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.as-lower select { font-size: 15px; padding: 12px 10px; min-height: 52px; }
.as-lower .btn { padding: 12px 18px; font-size: 16px; font-weight: 800; }
.start-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.start-grid.solo { grid-template-columns: minmax(0, 1fr); }
.lq-new-acts { display: flex; gap: 8px; }
.lq-new-acts .btn { flex: 1; }
.lq-new { grid-template-columns: 1fr; }
.lq-new input { font-size: 20px; padding: 16px 18px; min-height: 60px; }
.previews .pv-grid.n1 { grid-template-columns: minmax(0, 520px); }
.previews .pv-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.previews .pv-grid.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1300px) { .start-grid { grid-template-columns: 1fr; } .start-grid .lower-quick { grid-column: auto; } }
@media (max-width: 1100px) {
  .live-layout { grid-template-columns: 1fr; }
  .live-aside { position: static; max-height: none; }
}

/* ---------- v3 – Ordnerhinweise, Module, Kommentar-Einstellungen ---------- */
.folder { font-family: var(--mono); font-size: 12px; color: var(--muted); font-weight: 400; }
.modules .ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pkg-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 10px 0; }
.mod { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); cursor: pointer; }
.mod.on { border-color: var(--ok); background: #13241b; }
.mod.fixed { cursor: default; opacity: .85; }
.mod input { margin-top: 3px; width: 18px; height: 18px; }
.mod b { display: block; } .mod small { color: var(--muted); }
.views-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin: 8px 0 12px; }

/* ---------- v3.6 – Handy (≤ 640 px) ---------- */
.grid2 > *, .grid3 > *, .live-layout > *, .live-grid > *, .start-grid > *, .home-tiles > *, .panel { min-width: 0; }
@media (max-width: 640px) {
  .wrap { padding: 14px 12px 32px; }
  .top { flex-wrap: wrap; height: auto; min-height: 50px; padding: 8px 12px; row-gap: 6px; column-gap: 10px; position: static; }
  .top .brand .app-logo { height: 13px; }
  .top .team-chip { padding: 2px 10px 2px 2px; font-size: 13px; max-width: 46vw; }
  .top .team-chip b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .top .team-chip small { display: none; }
  .top .main { order: 3; width: 100%; overflow-x: auto; }
  .top .main a { padding: 6px 10px; }
  .top .right { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .top .right .btn { padding: 5px 9px; }
  .panel { padding: 14px 12px; border-radius: 10px; }
  .ph { flex-wrap: wrap; }
  .tabs a { padding: 9px 12px; }
  .bar, .bar .acts, .acts, .row-acts { flex-wrap: wrap; }
  .tbl td.acts { white-space: normal; }
  .tbl td.acts > * { margin: 2px 0 2px 4px; }
  .tile { padding: 20px; } .tile b { font-size: 21px; }
  .tile-btn { min-height: 70px; padding: 12px 12px 12px 14px; }
  .tile-btn b, .live-aside .tile-btn b { font-size: 15px; overflow-wrap: break-word; hyphens: auto; }
  .tile-btn.live::after, .live-aside .tile-btn.live::after { content: "ON AIR"; top: 5px; right: 7px; font-size: 9px; }
  .tile-btn.live { padding-top: 20px; }
  .live-head { gap: 10px; }
  .live-head .match { font-size: 16px; flex-wrap: wrap; }
  .live-head .match small { margin-left: 0; flex-basis: 100%; }
  .live-head .ready { flex: 1 1 100%; }
  .live-head .head-acts { flex: 1 1 100%; } .live-head .head-acts .btn { flex: 1; }
  .bigscore { grid-template-columns: minmax(0, 1fr) 30px 54px 14px 54px 30px minmax(0, 1fr); padding: 12px 8px 8px; }
  .bs-pts { font-size: 38px; } .bs-sets { font-size: 20px; } .bs-team { font-size: 15px; }
  .bs-logo { height: 46px; }
  input, select, textarea { font-size: 16px; }   /* iOS zoomt sonst beim Antippen */
  .mbtns { flex-wrap: wrap; } .mbtns .btn { padding-left: 6px; padding-right: 6px; min-width: 0; }
  .manual { padding: 8px; gap: 8px; }
  .previews .pv-grid, .previews .pv-grid.n2, .previews .pv-grid.n3 { grid-template-columns: 1fr; }
  .foot { flex-wrap: wrap; justify-content: center; text-align: center; }
}

/* v3.8.1 – Auswahl Wechsel-Grafik */
.sub-styles { margin-top: 14px; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.sub-styles > b, .sub-styles > small { grid-column: 1 / -1; }
.sub-styles > small { margin-top: -6px; }
.sub-style { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); cursor: pointer; }
.sub-style.on, .sub-style:has(input:checked) { border-color: var(--accent); background: #2a1418; }
.sub-style input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); }
.sub-style b { display: block; } .sub-style small { color: var(--muted); }
.sub-styles-form .sub-styles { margin-top: 0; }
.sub-styles-form label.sub-style { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; margin: 0; }
.sub-styles-form label.sub-style input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; }
.sub-styles-form label.sub-style span { display: block; min-width: 0; }
.league-opt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 12px; }
.league-opt label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.league-opt select { width: auto; }
.panel form.league-opt label { display: flex; flex-direction: row; align-items: center; gap: 10px; margin: 0; }
.panel form.league-opt select { width: auto; min-width: 260px; margin: 0; }

/* v3.9 Datenschutz-Seite */
.legal { max-width: 860px; margin: 0 auto; line-height: 1.6; }
.legal h1 { font-size: 26px; margin: 0 0 6px; }
.legal h2 { font-size: 17px; margin: 22px 0 6px; }
.legal ul { padding-left: 20px; }
.legal li { margin: 4px 0; }
.legal em { color: var(--warn); font-style: normal; }
