@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-style: normal; font-display: swap; src: url('fonts/barlow-condensed-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 400; font-style: normal; font-display: swap; src: url('fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 500; font-style: normal; font-display: swap; src: url('fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-style: normal; font-display: swap; src: url('fonts/barlow-latin-600-normal.woff2') format('woff2'); }
/* Layout: teal court-colored header band with live status, sticky tab strip, white match cards, optic-yellow only for what is live. */
:root {
  --bg: #EDF2F3; --surface: #FFFFFF; --surface2: #E3EBED; --ink: #10272E; --muted: #546A71; --line: #CAD8DC;
  --hero: #0F4C59; --hero-ink: #F2FAFB; --hero-muted: #A9CDD4;
  --accent: #14697A; --accent-ink: #FFFFFF;
  --ball: #D4EE2F; --ball-ink: #222C06;
  --good: #1B7A47; --warn: #A8540C; --bad: #B3261E; --q: #E3F1D2;
  --f-display: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --f-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B171B; --surface: #13242A; --surface2: #1A2F36; --ink: #E5EFF1; --muted: #8FA6AD; --line: #27404A;
    --hero: #0F2E37; --hero-ink: #F2FAFB; --hero-muted: #8DB4BC;
    --accent: #5BC0D3; --accent-ink: #052229;
    --good: #5FD08B; --warn: #F0A25C; --bad: #FF8A80; --q: #1D3A28;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0B171B; --surface: #13242A; --surface2: #1A2F36; --ink: #E5EFF1; --muted: #8FA6AD; --line: #27404A;
  --hero: #0F2E37; --hero-ink: #F2FAFB; --hero-muted: #8DB4BC;
  --accent: #5BC0D3; --accent-ink: #052229;
  --good: #5FD08B; --warn: #F0A25C; --bad: #FF8A80; --q: #1D3A28;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--f-body); -webkit-text-size-adjust: 100%; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--hero); z-index: 30; }
.wrap { max-width: 980px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 700; margin: 0; letter-spacing: .01em; text-wrap: balance; }
.num, .sc, td, th { font-variant-numeric: tabular-nums; }

/* header */
.hero { background: var(--hero); color: var(--hero-ink); }
.hero .wrap { padding-block: 18px 16px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand svg { flex: none; }
.brand h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1; text-transform: uppercase; }
.brand p { margin: 2px 0 0; color: var(--hero-muted); font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 6px 14px; font-weight: 600; font-size: 14px; }
.status.live { background: var(--ball); color: var(--ball-ink); border-color: transparent; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.status.live .dot { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .status.live .dot { animation: none; } }
.notice { background: var(--ball); color: var(--ball-ink); font-weight: 600; }
.notice .wrap { padding-block: 9px; }

/* tabs */
.tabs { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.tabs .wrap { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tab { appearance: none; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font: 700 17px/1 var(--f-display); letter-spacing: .04em; text-transform: uppercase; padding: 14px 12px 11px; cursor: pointer; white-space: nowrap; }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.tab:focus-visible, .btn:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

main.wrap { padding-block: 18px 110px; display: grid; gap: 22px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.sec-h h2 { font-size: 24px; text-transform: uppercase; }
.sec-h small { color: var(--muted); }
.muted { color: var(--muted); }

/* cards and tiles */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; min-width: 0; }
.grid3 { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-width: 0; }
.tile.live { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.tile.mine { background: var(--q); }
.tile-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); }
.tile-h .field { font: 700 18px/1 var(--f-display); letter-spacing: .04em; color: var(--ink); }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--line); min-width: 0; }
.trow:first-of-type { border-top: 0; }
.tn { min-width: 0; overflow-wrap: anywhere; }
.tn em { color: var(--muted); font-style: normal; }
.sc { font: 700 26px/1 var(--f-display); min-width: 1.6em; text-align: right; color: var(--muted); }
.trow.win .tn { font-weight: 700; }
.trow.win .sc { color: var(--ink); }
.tile-f { padding: 7px 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface2); color: var(--muted); }
.chip.live { background: var(--ball); color: var(--ball-ink); }
.chip.ok { background: var(--q); color: var(--good); }

/* my team */
.my { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.my select { flex: 1 1 220px; }
select, input[type="text"], input[type="time"], input[type="number"] { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-height: 42px; min-width: 0; }
.nextbox { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--q); display: grid; gap: 2px; }
.nextbox b { font: 700 22px/1.15 var(--f-display); }

/* tables */
.tw { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 330px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; text-align: right; padding: 4px 6px; }
td { padding: 8px 6px; border-top: 1px solid var(--line); text-align: right; }
th:nth-child(2), td:nth-child(2) { text-align: left; width: 100%; }
th:first-child, td:first-child { text-align: center; width: 1%; }
td.team { overflow-wrap: anywhere; }
tr.q td { background: var(--q); }
tr.q td:first-child { font-weight: 700; color: var(--good); }
td.pts { font-weight: 700; }
.gh { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.gh h3 { font-size: 22px; text-transform: uppercase; }
.glist { display: grid; gap: 0; margin-top: 10px; }
.gm { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.gm .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
.gm .res { font: 700 18px/1 var(--f-display); white-space: nowrap; }
.gm.mine { background: var(--q); margin-inline: -14px; padding-inline: 14px; }
.legend { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* schedule */
.slot { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.slot.live { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.slot-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface2); }
.slot-h b { font: 700 19px/1 var(--f-display); text-transform: uppercase; letter-spacing: .03em; }
.slot-m { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); align-items: center; min-width: 0; }
.slot-m.mine { background: var(--q); }
.slot-m .f { font: 700 15px/1 var(--f-display); color: var(--muted); text-transform: uppercase; }
.slot-m .vs { min-width: 0; overflow-wrap: anywhere; }
.slot-m .vs small { display: block; color: var(--muted); font-size: 12px; }
.slot-m .res { font: 700 18px/1 var(--f-display); white-space: nowrap; }
.slot.past { opacity: .72; }

/* KO */
.ko { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); align-items: start; }
.ko h3 { font-size: 20px; text-transform: uppercase; margin-bottom: 8px; color: var(--muted); }
.ko .stack { display: grid; gap: 10px; }
.podium { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.pod { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.pod.first { background: var(--ball); color: var(--ball-ink); border-color: transparent; }
.pod .r { font: 700 14px/1 var(--f-display); text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.pod .n { font: 700 24px/1.1 var(--f-display); margin-top: 6px; overflow-wrap: anywhere; }

/* admin */
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; }
.btn { appearance: none; font: 600 15px/1 var(--f-body); border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 11px 14px; min-height: 42px; cursor: pointer; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.on { background: var(--ink); color: var(--bg); border-color: transparent; }
.btn[disabled] { opacity: .5; cursor: default; }
.arow { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.arow.cur { border-color: var(--accent); }
.arow-h { padding: 7px 12px; background: var(--surface2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.ateam { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); }
.ateam:first-of-type { border-top: 0; }
.ateam input.num { width: 76px; text-align: center; font: 700 20px/1 var(--f-display); }
.aw { padding: 7px 12px; border-top: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.slotgroup { display: grid; gap: 10px; }
.slotgroup + .slotgroup { margin-top: 8px; }
.slotgroup > h3 { font-size: 18px; text-transform: uppercase; color: var(--muted); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.form .two { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stepper { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stepper .big { font: 700 34px/1 var(--f-display); min-width: 2.2em; text-align: center; }
.tg { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.trow-a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); }
.trow-a.sel { background: var(--q); margin-inline: -14px; padding-inline: 14px; }
.trow-a span { min-width: 0; overflow-wrap: anywhere; }
.btn.s { padding: 7px 10px; min-height: 34px; font-size: 13px; }
.rn { display: grid; gap: 8px; grid-template-columns: 1fr 90px; align-items: center; margin-top: 6px; }
.rn input { width: 100%; }
.confirm { border: 1px solid var(--warn); background: var(--surface); border-radius: 10px; padding: 12px; display: grid; gap: 10px; }
.msg { padding: 10px 12px; border-radius: 8px; background: var(--surface2); border-left: 4px solid var(--warn); font-size: 14px; }

.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--ink); color: var(--bg); padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: center; }
.savebar span { font-weight: 600; flex: 1 1 200px; }
.savebar .btn { min-height: 40px; }
.savebar .btn.primary { background: var(--ball); color: var(--ball-ink); }
.savebar .btn.ghost { background: transparent; color: var(--bg); border-color: rgba(128,128,128,.6); }
.empty { padding: 22px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; }

/* ---- standalone site additions ---- */
input[type="password"] { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; min-height: 42px; min-width: 0; width: 100%; }
.form input[type="text"] { width: 100%; }
.login { max-width: 420px; margin: 0 auto; }
.login form { display: grid; gap: 12px; }
.err { color: var(--bad); font-weight: 600; font-size: 14px; }
.offline { background: var(--warn); color: #fff; font-weight: 600; }
.offline .wrap { padding-block: 8px; }
.adminbar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
footer.foot { color: var(--muted); font-size: 12px; text-align: center; padding-bottom: 20px; }

/* ---- print ---- */
#printarea { display: none; }
@page { size: A4 landscape; margin: 9mm; }
@media print {
  body.printing { background: #fff !important; color: #000 !important; font-size: 10pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.printing::before { display: none !important; }
  body.printing #app { display: none !important; }
  body.printing #printarea { display: block; }
}
#printarea { color: #000; background: #fff; font-family: var(--f-body); }
.ppage { break-after: page; page-break-after: always; }
.ppage:last-child { break-after: auto; page-break-after: auto; }
.ph { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 3mm solid #0F4C59; padding-bottom: 2mm; margin-bottom: 4mm; }
.ph h1 { font: 700 30pt/1 var(--f-display); text-transform: uppercase; color: #0F4C59; }
.ph p { margin: 0; font-size: 11pt; font-weight: 600; text-align: right; }
.pgrid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4mm; }
.pgrid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5mm; }
.pbox { border: 0.4mm solid #0F4C59; border-radius: 2mm; overflow: hidden; break-inside: avoid; }
.pbox h2 { font: 700 18pt/1 var(--f-display); text-transform: uppercase; background: #0F4C59; color: #fff; padding: 2.5mm 3mm; display: flex; justify-content: space-between; align-items: baseline; }
.pbox h2 small { font: 600 10pt var(--f-body); text-transform: none; }
.pbox ol { margin: 0; padding: 2mm 3mm 3mm 9mm; font-size: 12pt; line-height: 1.7; }
.pnote { margin-top: 5mm; font-size: 10.5pt; line-height: 1.6; }
.ptable { width: 100%; min-width: 0; border-collapse: collapse; font-size: 9.5pt; }
.ptable th { background: #E3EBED; color: #000; font-size: 9pt; text-align: left; padding: 1.5mm 2mm; border: 0.2mm solid #888; text-transform: none; letter-spacing: 0; }
.ptable td { text-align: left; padding: 1.4mm 2mm; border: 0.2mm solid #888; vertical-align: middle; }
.ptable tr { break-inside: avoid; }
.ptable tbody tr:nth-child(even) td { background: #F1F5F6; }
.ptable td.tm { width: 26mm; font-weight: 700; white-space: nowrap; }
.ptable td.tm span { font-weight: 400; color: #333; }
.gt { display: inline-block; min-width: 6mm; text-align: center; background: #0F4C59; color: #fff; border-radius: 1mm; font: 700 8.5pt/1.3 var(--f-body); padding: 0 1.2mm; margin-right: 1.5mm; }
.gt.ko { background: #B8860B; }
.ptable i { color: #555; font-style: normal; font-size: 8.5pt; margin: 0 1mm; }
.pcol { display: grid; gap: 3mm; align-content: start; }
.pcol h3 { font: 700 15pt/1 var(--f-display); text-transform: uppercase; color: #0F4C59; }
.pm { border: 0.3mm solid #0F4C59; border-radius: 1.5mm; padding: 2mm 3mm; break-inside: avoid; font-size: 10.5pt; }
.pm small { display: block; color: #444; font-size: 8.5pt; margin-bottom: 1mm; }
.pm div { display: flex; justify-content: space-between; gap: 3mm; }
.pm b { font: 700 13pt/1.2 var(--f-display); }
.pkt { font-size: 8.5pt; }
.pkt td, .pkt th { padding: 1mm 1.5mm; }
.pml { font-size: 8.5pt; margin-top: 1.5mm; }
.pml div { display: flex; justify-content: space-between; gap: 3mm; border-top: 0.2mm solid #bbb; padding: 0.6mm 0; }

/* print fixes: equal field columns on one page, compact result lists */
.ptable.plan { table-layout: fixed; font-size: 10pt; }
.ptable.plan th, .ptable.plan td { width: auto; text-align: left; padding: 1.7mm 2.2mm; }
.ptable.plan td:first-child, .ptable.plan th:first-child { text-align: left; }
.ptable.plan td.tm { width: auto; white-space: nowrap; line-height: 1.25; }
.ptable.plan td.tm span { font-size: 8pt; }
.ptable.plan th { font-size: 11pt; background: #0F4C59; color: #fff; }
.ptable.plan td { line-height: 1.3; }
.pml { columns: 2; column-gap: 4mm; }
.pml div { break-inside: avoid; }
.pbox ol { font-size: 15pt; line-height: 1.9; }
.pnote { font-size: 12pt; }

/* print: one page each */
.ptable.plan { font-size: 11pt; }
.ptable.plan th, .ptable.plan td { padding: 1.3mm 2.2mm; }
.ptable.plan td.tm { font-size: 11.5pt; }
.ptable.plan td.tm span { font-size: 8.5pt; margin-left: 1.5mm; }
.pkt td, .pkt th { padding: .6mm 1.5mm; line-height: 1.2; }
.pml { line-height: 1.2; }
.pml div { padding: .35mm 0; }
.pgrid2 .pbox h2 { font-size: 15pt; padding: 1.8mm 3mm; }
.pgrid2 { gap: 4mm; }

/* ---- Übersicht, Assistent ---- */
.heroside { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ghostw { background: rgba(255,255,255,.12); color: var(--hero-ink); border-color: rgba(255,255,255,.3); text-decoration: none; display: inline-flex; align-items: center; }
.back { display: inline-block; color: var(--hero-muted); font-size: 13px; text-decoration: none; margin-bottom: 4px; }
.back:hover { color: var(--hero-ink); text-decoration: underline; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.tc-main { display: grid; gap: 8px; padding: 14px; color: inherit; text-decoration: none; flex: 1; align-content: start; }
.tc-main:hover { background: var(--surface2); }
.tc-main:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tc-main h3 { font-size: 26px; text-transform: uppercase; line-height: 1.05; overflow-wrap: anywhere; }
.tc-main p { margin: 0; }
.tc-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.tc-go { color: var(--accent); font-weight: 600; font-size: 14px; }
.tc-act { display: flex; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--surface2); }
a.btn { text-decoration: none; display: inline-flex; align-items: center; }
textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; width: 100%; min-width: 0; resize: vertical; }
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.form select, .form input[type="number"], .form input[type="time"] { width: 100%; }
.form label.chk { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 42px; color: var(--ink); font-size: 15px; }
.form label.chk input { width: 20px; height: 20px; }
.cmp th, .cmp td { text-align: center; }
.cmp th:nth-child(2), .cmp td:nth-child(2) { text-align: center; width: auto; }
.cmp th:first-child, .cmp td:first-child { width: auto; }
.cmp tr.sel td { background: var(--q); font-weight: 600; }
.plist { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.sec-h .btn.primary { text-decoration: none; }

/* ---- Druck: allgemein ---- */
.pgrid4.dense .pbox ol { font-size: 10.5pt; line-height: 1.5; }
.pko .pm { padding: 1.4mm 2.4mm; font-size: 9.5pt; }
.pko .pm b { font-size: 11pt; }
.ptable.plan.narrow { font-size: 9pt; }
.ptable.plan.narrow th, .ptable.plan.narrow td { padding: 1mm 1.4mm; }
