/* Schriften des Vereins (Bebas Neue, DM Sans · SIL OFL) – eingebettet, damit alles offline funktioniert */
@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap; src: url(fonts/bebas-neue.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 300 800; font-display: swap; src: url(fonts/dm-sans.woff2) format("woff2"); }

/* =========================================================
   Design Tokens
   ========================================================= */
:root {
    /* TV Oberndorf: Rot & Weiß auf Anthrazit (wie tv-oberndorf.de) */
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --line: #e5e7eb;
    --line-2: #d1d5db;
    --ink: #111827;
    --ink-2: #4b5563;
    --ink-3: #9ca3af;

    --dark-950: #0b0f19;
    --dark-900: #111827;
    --dark-800: #1f2937;
    --dark-700: #374151;
    --brand: #dc2626;
    --brand-700: #b91c1c;
    --brand-800: #991b1b;
    --brand-50: #fef2f2;
    --brand-100: #fee2e2;
    --brand-200: #fecaca;
    --brand-300: #fca5a5;
    --accent: #dc2626;
    --ring: rgba(220, 38, 38, .16);

    --gA: #dc2626;
    --gA-50: #fef2f2;
    --gA-100: #fee2e2;
    --gB: #374151;
    --gB-50: #f3f4f6;
    --gB-100: #e5e7eb;

    --win: #16a34a;
    --win-50: #ecfdf3;
    --win-ink: #166534;
    --warn: #d97706;
    --warn-50: #fff8eb;
    --danger: #b91c1c;

    --gold: #d4a017;
    --silver: #9aa4b2;
    --bronze: #b8763e;

    --r-xl: 20px;
    --r-lg: 16px;
    --r: 12px;
    --r-sm: 8px;

    --sh-1: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
    --sh-2: 0 10px 30px -12px rgba(15, 23, 42, .18), 0 2px 6px rgba(15, 23, 42, .05);
    --sh-3: 0 24px 60px -20px rgba(6, 18, 41, .45);

    --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Bebas Neue", "Oswald", "Arial Narrow", Impact, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.5;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "cv11", "ss01";
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

.ic {
    width: 18px; height: 18px; flex: none;
    fill: none; stroke: currentColor; stroke-width: 2;
    stroke-linecap: round; stroke-linejoin: round;
}

.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 28px; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 14px;
    border-radius: 10px;
    font-size: 13.5px; font-weight: 600;
    border: 1px solid var(--line-2);
    background: var(--surface);
    color: var(--ink);
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
    white-space: nowrap;
    user-select: none;
}
.btn:hover { background: var(--surface-2); border-color: #c3cbd8; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(220, 38, 38, .25); }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: rgba(15, 23, 42, .05); border-color: transparent; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--brand-800); border-color: var(--brand-800); }
.btn-icon { width: 38px; padding: 0; justify-content: center; }

/* =========================================================
   Topbar
   ========================================================= */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(17, 24, 39, .94);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: #fff;
    transition: box-shadow .2s;
}
.topbar.scrolled { box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6); }
.topline { position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--brand); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.topbar .btn { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .2); }
.topbar .btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); }
.topbar .btn-cta { background: #fff; color: var(--brand); border-color: #fff; }
.topbar .btn-cta:hover { background: var(--brand-50); border-color: var(--brand-50); color: var(--brand-700); }
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; min-width: 0; }
.mark {
    width: 42px; height: 42px; border-radius: 50%; flex: none;
    display: grid; place-items: center; overflow: hidden;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .15), 0 4px 12px -4px rgba(0, 0, 0, .5);
}
.mark img { width: 92%; height: 92%; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text b { font-family: var(--font-display); font-size: 21px; font-weight: 400; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.brand-text span { font-size: 10.5px; color: rgba(255, 255, 255, .5); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

.nav { display: flex; gap: 4px; margin: 0 auto; }
.nav a {
    position: relative; padding: 8px 12px;
    font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .72);
    text-decoration: none; transition: color .15s;
}
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--brand); transform: scaleX(0); transition: transform .2s; }
.nav a:hover { color: #fff; }
.nav a.active { color: #fff; }
.nav a.active::after, .nav a:hover::after { transform: scaleX(1); }

.actions { display: flex; align-items: center; gap: 8px; }
.save-state {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: rgba(255, 255, 255, .5); font-weight: 500; margin-right: 4px;
    white-space: nowrap;
}
.save-state .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--win); box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.save-state.flash .dot { animation: flash .6s ease; }
@keyframes flash { 0% { transform: scale(1.8); } 100% { transform: scale(1); } }

/* Dropdown menu */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
    min-width: 280px; padding: 6px; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; box-shadow: var(--sh-3);
    animation: pop .14s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.menu-item {
    display: flex; align-items: flex-start; gap: 12px; width: 100%;
    padding: 10px 12px; border-radius: 10px; text-align: left;
    transition: background .12s;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item .ic { margin-top: 2px; color: var(--ink-2); }
.menu-item b { display: block; font-size: 13.5px; font-weight: 600; }
.menu-item small { display: block; font-size: 12px; color: var(--ink-3); }
.menu-item.danger, .menu-item.danger .ic { color: var(--brand); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }
kbd {
    font: 600 11px/1 var(--font); padding: 3px 6px; border-radius: 5px;
    background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
    position: relative; overflow: hidden;
    color: #fff;
    background: var(--dark-900);
}
.hero-deco { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-deco .stripe { position: absolute; top: -20%; right: -6%; width: 34%; height: 140%; background: var(--brand); opacity: .13; transform: skewX(-12deg); }
.hero-deco .line { position: absolute; top: -20%; right: 9%; width: 3px; height: 140%; background: var(--brand); opacity: .35; transform: skewX(-12deg); }
.hero-deco .dots { position: absolute; top: 14%; right: 30%; width: 200px; height: 160px; background-image: radial-gradient(circle, rgba(220, 38, 38, .35) 1px, transparent 1.5px); background-size: 20px 20px; }
.hero-deco .wm { position: absolute; right: 2%; bottom: -70px; width: 340px; opacity: .05; }
.hero-deco .fade { position: absolute; inset: 0; background: linear-gradient(135deg, var(--dark-900) 0%, transparent 55%), linear-gradient(180deg, transparent 55%, rgba(17, 24, 39, .85) 100%); }
.hero::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 400' fill='none' stroke='white' stroke-opacity='.07' stroke-width='2'%3E%3Crect x='40' y='40' width='920' height='320' rx='2'/%3E%3Cline x1='500' y1='40' x2='500' y2='360' stroke-opacity='.14' stroke-width='3'/%3E%3Cline x1='440' y1='40' x2='440' y2='360' stroke-dasharray='8 8'/%3E%3Cline x1='560' y1='40' x2='560' y2='360' stroke-dasharray='8 8'/%3E%3Cline x1='40' y1='200' x2='960' y2='200' stroke-opacity='.04'/%3E%3C/svg%3E") center / cover no-repeat;
    mask-image: linear-gradient(180deg, rgba(0,0,0,1), rgba(0,0,0,.35));
    opacity: .7;
}
.hero .wrap { position: relative; padding-top: 46px; padding-bottom: 34px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: start; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 999px;
    background: rgba(220, 38, 38, .15); border: 1px solid rgba(220, 38, 38, .32);
    font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--brand-300);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--brand); border-radius: 50%; animation: pulse 2s infinite; }

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(52px, 7.4vw, 104px);
    line-height: .92; font-weight: 400; letter-spacing: .01em;
    text-transform: uppercase;
    margin: 18px 0 20px;
    text-wrap: balance;
}
.hero h1 .dot { color: var(--brand); }

.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; color: rgba(255, 255, 255, .78); font-size: 14.5px; font-weight: 500; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .ic { width: 17px; height: 17px; color: var(--brand); }
.hero-meta .muted { color: rgba(255, 255, 255, .45); font-style: italic; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
    display: inline-flex; align-items: baseline; gap: 6px;
    padding: 7px 12px; border-radius: 999px;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
    font-size: 12.5px; color: rgba(255, 255, 255, .7); font-weight: 500;
}
.chip b { color: #fff; font-size: 14px; font-weight: 700; }

/* Hero right: status cards */
.hero-side { display: grid; gap: 14px; }
.glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .05));
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: var(--r-lg);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.progress-card { display: flex; align-items: center; gap: 18px; padding: 16px 20px; }
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 6; }
.ring .track { stroke: rgba(255, 255, 255, .12); }
.ring .bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.2, .8, .2, 1); }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.progress-card .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .55); font-weight: 700; }
.progress-card .val { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.progress-card .sub { font-size: 13px; color: rgba(255, 255, 255, .65); }

.next-card { padding: 16px 20px 18px; }
.nc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.badge-next { background: rgba(220, 38, 38, .18); color: var(--brand-300); border: 1px solid rgba(220, 38, 38, .4); }
.badge-live { background: var(--brand); color: #fff; border: 1px solid var(--brand); }
.badge-live::before, .pill-live::before {
    content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
    animation: pulse 1.4s ease-in-out infinite;
}
.badge-done { background: rgba(22, 163, 74, .18); color: #86efac; border: 1px solid rgba(22, 163, 74, .4); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
.nc-meta { font-size: 12.5px; color: rgba(255, 255, 255, .62); font-weight: 600; }
.nc-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; }
.nc-team { font-size: 19px; font-weight: 750; letter-spacing: -.01em; line-height: 1.2; }
.nc-team small { display: block; font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .5); letter-spacing: 0; margin-bottom: 2px; }
.nc-team.r { text-align: right; }
.nc-vs {
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    font-size: 11px; font-weight: 800; color: rgba(255, 255, 255, .6);
    border: 1px solid rgba(255, 255, 255, .2);
}
.nc-foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; color: rgba(255, 255, 255, .65); }
.nc-foot .ic { width: 15px; height: 15px; }
.nc-foot b { color: #fff; font-weight: 650; }
.nc-champ { display: flex; align-items: center; gap: 14px; }
.nc-champ .ic { width: 36px; height: 36px; color: var(--brand); stroke-width: 1.6; }
.nc-champ b { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 400; letter-spacing: .02em; line-height: 1; text-transform: uppercase; }
.nc-champ small { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255, 255, 255, .55); font-weight: 700; }

/* Phase timeline */
.phases { display: grid; grid-template-columns: 8fr 8fr 2.2fr; gap: 6px; margin-top: 34px; }
.phase { min-width: 0; }
.phase-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.phase-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand-700), #f87171); border-radius: inherit; transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.phase.pause .phase-bar { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .14) 0 4px, transparent 4px 8px); }
.phase.ceremony .phase-bar { background: rgba(220, 38, 38, .25); }
.phase-txt { display: flex; justify-content: space-between; gap: 8px; margin-top: 9px; font-size: 12px; white-space: nowrap; }
.phase-txt b { font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; }
.phase-txt span { color: rgba(255, 255, 255, .5); font-variant-numeric: tabular-nums; }
.phase.pause .phase-txt, .phase.ceremony .phase-txt { flex-direction: column; gap: 0; }

/* =========================================================
   Panels
   ========================================================= */
main.wrap { padding-top: 28px; padding-bottom: 60px; }
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-1);
    margin-bottom: 26px;
}
.panel-head {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    padding: 22px 26px 18px;
}
.ph-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ph-icon {
    width: 42px; height: 42px; border-radius: 12px; flex: none;
    display: grid; place-items: center;
    background: var(--brand-50); color: var(--brand);
    border: 1px solid var(--brand-100);
}
.ph-icon .ic { width: 20px; height: 20px; }
.ph-step { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.panel h2 { position: relative; display: inline-block; font-family: var(--font-display); font-size: 32px; font-weight: 400; letter-spacing: .02em; line-height: 1; text-transform: uppercase; padding-bottom: 6px; margin-top: 2px; }
.panel h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 36px; height: 3px; background: var(--brand); }
.panel-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 8px; }
.panel-body { padding: 0 26px 26px; }

/* Collapsible setup */
details.panel > summary { list-style: none; cursor: pointer; }
details.panel > summary::-webkit-details-marker { display: none; }
.chev { transition: transform .2s; color: var(--ink-3); }
details.panel[open] .chev { transform: rotate(180deg); }
.setup-status { font-size: 12.5px; color: var(--ink-2); font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }

.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card {
    border: 1px solid var(--line); border-radius: var(--r-lg);
    background: var(--surface-2);
    padding: 18px;
}
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; font-size: 14px; }
.card-title .ic { color: var(--ink-3); width: 17px; height: 17px; }
.card-title .gdot { width: 10px; height: 10px; border-radius: 3px; }
.gdot.gA { background: var(--gA); } .gdot.gB { background: var(--gB); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.field-row { display: grid; gap: 12px; }
.field-row.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-row.c2 { grid-template-columns: 1.4fr 1fr; }
.input {
    height: 40px; padding: 0 12px; width: 100%;
    border: 1px solid var(--line-2); border-radius: 10px;
    background: var(--surface); font-size: 14.5px;
    transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--ink-3); }
.input:hover { border-color: #bcc5d3; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 44px; }
.input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink-3); font-weight: 600; pointer-events: none; }
.field-hint { font-size: 12px; color: var(--ink-3); margin-top: 10px; display: flex; gap: 6px; align-items: center; }
.field-hint .ic { width: 14px; height: 14px; }

.team-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.team-row:last-child { margin-bottom: 0; }
.avatar {
    width: 40px; height: 40px; border-radius: 11px; flex: none;
    display: grid; place-items: center;
    font-size: 13px; font-weight: 800; letter-spacing: .02em;
}
.avatar.gA { background: var(--gA-100); color: var(--gA); }
.avatar.gB { background: var(--gB-100); color: var(--gB); }
.team-row .code { width: 26px; font-size: 12px; font-weight: 750; color: var(--ink-3); flex: none; }

/* =========================================================
   Segmented control
   ========================================================= */
.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.seg button { padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 650; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

/* =========================================================
   Prelim match list
   ========================================================= */
.mlist { border-top: 1px solid var(--line); }
.mlist[data-filter="A"] .mrow[data-group="B"],
.mlist[data-filter="B"] .mrow[data-group="A"] { display: none; }

.mrow {
    position: relative;
    display: grid;
    grid-template-columns: 86px 108px minmax(0, 1fr) 136px minmax(0, 1fr) minmax(210px, .9fr);
    align-items: center; gap: 16px;
    padding: 14px 26px;
    border-bottom: 1px solid var(--line);
    transition: background .15s;
}
.mrow:hover { background: #fbfcfe; }
.mrow::before {
    content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0;
    background: transparent; transition: background .2s;
}
.mrow.done::before { background: var(--win); }
.mrow.next::before { background: var(--brand); }
.mrow.live::before { background: var(--brand); width: 5px; }
.mrow.next, .mrow.live { background: linear-gradient(90deg, rgba(220, 38, 38, .06), transparent 55%); }

.m-time { display: flex; flex-direction: column; line-height: 1.15; }
.m-time b { font-size: 17px; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.m-time span { font-size: 11.5px; color: var(--ink-3); font-weight: 600; margin-top: 3px; }

.m-tag { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.gpill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px; border-radius: 7px;
    font-size: 11.5px; font-weight: 750; letter-spacing: .01em;
}
.gpill::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: currentColor; }
.gpill.gA { background: var(--gA-50); color: var(--gA); }
.gpill.gB { background: var(--gB-50); color: var(--gB); }
.spill { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 5px; }
.pill-done { color: var(--win); }
.pill-next { color: var(--brand); }
.pill-live { color: #fff; background: var(--brand); padding: 3px 8px; border-radius: 6px; }
.pill-skip { color: #92400e; background: #fff4e0; padding: 3px 8px; border-radius: 6px; }
.mrow.skipped::before { background: #f0b44c; }

.m-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 650; font-size: 15px; }
.m-team.t1 { justify-content: flex-end; text-align: right; flex-direction: row-reverse; }
.m-team.t1 { flex-direction: row; }
.tname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tname.ph { color: var(--ink-3); font-weight: 550; }
.tcode {
    flex: none; font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 5px;
    background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3);
}
.m-team.win .tname { color: var(--ink); font-weight: 800; }
.m-team.lose .tname { color: var(--ink-3); font-weight: 550; }
.wchk { width: 16px; height: 16px; color: var(--win); stroke-width: 3; }

.score {
    justify-self: center;
    display: inline-flex; align-items: center; gap: 2px; padding: 4px;
    border-radius: 13px; background: var(--surface-2); border: 1px solid var(--line);
    transition: background .2s, border-color .2s;
}
.sc {
    width: 50px; height: 42px; border: 0; border-radius: 9px;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
    text-align: center; font-size: 19px; font-weight: 800; color: var(--ink);
    font-variant-numeric: tabular-nums; letter-spacing: -.01em;
    transition: box-shadow .15s, background .15s, color .15s;
    -moz-appearance: textfield; appearance: textfield;
}
.sc::-webkit-outer-spin-button, .sc::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sc::placeholder { color: #c7cfdb; font-weight: 600; }
.sc:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand), 0 0 0 4px var(--ring); }
.colon { width: 12px; text-align: center; font-weight: 900; color: var(--ink-3); font-size: 17px; }

.is-done .score { background: var(--dark-900); border-color: var(--dark-900); }
.is-done .sc { background: transparent; color: #fff; box-shadow: none; }
.is-done .sc.lose { color: rgba(255, 255, 255, .5); }
.is-done .sc:focus { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.is-done .colon { color: rgba(255, 255, 255, .45); }
.is-draw .score { background: var(--dark-700); border-color: var(--dark-700); }

.m-ref { display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 16px; border-left: 1px solid var(--line); }
.m-ref > div { flex: 1; }
.m-ref .ic { width: 16px; height: 16px; color: var(--ink-3); }
.m-ref div { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.m-ref small { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.m-ref b { font-size: 13.5px; font-weight: 600; color: var(--ink-2); overflow-wrap: anywhere; line-height: 1.25; }

.pause-strip {
    display: flex; align-items: center; gap: 16px;
    margin: 18px 26px 24px; padding: 14px 18px;
    border-radius: 14px;
    background:
        repeating-linear-gradient(135deg, rgba(17, 24, 39, .035) 0 10px, transparent 10px 20px),
        var(--surface-2);
    border: 1px dashed var(--line-2);
}
.pause-strip .pi { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100); flex: none; }
.pause-strip b { font-size: 14.5px; display: block; }
.pause-strip span { font-size: 13px; color: var(--ink-2); }
.pause-strip .ptime { margin-left: auto; font-family: var(--font-display); font-weight: 400; font-size: 24px; letter-spacing: .03em; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* =========================================================
   Standings
   ========================================================= */
.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.gcard { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.gcard-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; position: relative;
}
.gcard-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
.gA .gcard-head { background: linear-gradient(90deg, var(--gA-50), transparent); }
.gB .gcard-head { background: linear-gradient(90deg, var(--gB-50), transparent); }
.gcard-head h3 { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 24px; font-weight: 400; letter-spacing: .03em; text-transform: uppercase; }
.gletter {
    width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
    color: #fff; font-family: var(--font-display); font-weight: 400; font-size: 20px; padding-top: 2px;
}
.gA .gletter { background: var(--gA); box-shadow: 0 4px 10px -4px var(--gA); }
.gB .gletter { background: var(--gB); box-shadow: 0 4px 10px -4px var(--gB); }
.gstate { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.gstate.prov { background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.gstate.final { background: var(--win-50); color: var(--win-ink); border: 1px solid #bbe5c8; }

.stbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stbl th {
    font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ink-3); padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}
.stbl td { padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.stbl tr:last-child td { border-bottom: 0; }
.stbl th.l, .stbl td.l { text-align: left; }
.stbl td:first-child, .stbl th:first-child { padding-left: 18px; }
.stbl td:last-child, .stbl th:last-child { padding-right: 18px; }
.stbl .pos {
    display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
    font-weight: 800; font-size: 13px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.stbl tr.z-hf .pos { background: var(--brand); color: #fff; border-color: var(--brand); }
.stbl tr.z-hf td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.stbl tr.z-pl td:first-child { box-shadow: inset 3px 0 0 var(--ink-3); }
.stbl tr.cut td { border-bottom: 2px dashed var(--line-2); }
.stbl td.team { font-weight: 700; color: var(--ink); max-width: 0; width: 38%; }
.stbl td.team .tname { display: block; }
.stbl td.pts b {
    display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 6px; border-radius: 8px;
    background: var(--dark-900); color: #fff; font-weight: 800; font-size: 13.5px;
}
.stbl .dpos { color: var(--win); font-weight: 700; }
.stbl .dneg, .rtbl .dneg { color: var(--ink-3); font-weight: 700; }
.zone { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px; white-space: nowrap; }
.zone.hf { background: var(--brand-50); color: var(--brand-700); }
.zone.pl { background: var(--gB-50); color: var(--ink-2); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .rule { margin-left: auto; color: var(--ink-3); }

.warning {
    display: flex; gap: 10px; align-items: flex-start;
    margin: 12px 14px 14px; padding: 10px 12px; border-radius: 10px;
    background: var(--warn-50); border: 1px solid #f3d8a6; color: #8a4b00; font-size: 13px;
}
.warning .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--warn); }

/* =========================================================
   Final round
   ========================================================= */
.order {
    display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px;
    margin-bottom: 24px;
}
.ord {
    position: relative; padding: 10px 12px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--surface-2);
    font-size: 12px; line-height: 1.3; min-width: 0;
    transition: border-color .2s, background .2s;
}
.ord b { display: block; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ord span { color: var(--ink-3); font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ord em { position: absolute; top: 9px; right: 10px; font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--ink-3); }
.ord.done { background: var(--win-50); border-color: #c4e8cf; }
.ord.done em { color: var(--win); }
.ord.next { background: var(--brand-50); border-color: var(--brand-200); box-shadow: 0 0 0 3px var(--ring); }
.ord.next em { color: var(--brand); }
.ord.final { border-color: var(--brand-200); }
.ord.final b { color: var(--brand); }

.brackets { display: grid; gap: 22px; }
.bk-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px 22px; background: var(--surface-2); }
.bk-card.main {
    background:
        radial-gradient(600px 220px at 100% 0%, rgba(220, 38, 38, .08), transparent 70%),
        var(--surface-2);
}
.bk-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.bk-title .ti { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.bk-card.main .ti { background: linear-gradient(145deg, #ef4444, var(--brand-800)); color: #fff; box-shadow: 0 6px 14px -6px rgba(220, 38, 38, .8); }
.bk-card.place .ti { background: var(--dark-900); color: #fff; }
.bk-title h3 { font-family: var(--font-display); font-size: 24px; font-weight: 400; letter-spacing: .03em; text-transform: uppercase; line-height: 1.05; }
.bk-title p { font-size: 13px; color: var(--ink-2); }

.bk-heads, .bk { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); }
.bk-heads { margin-bottom: 10px; }
.bk-heads span { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.bk-heads span:last-child { grid-column: 3; }
.bk-r1 { display: grid; grid-template-rows: 1fr 1fr; gap: 22px; }
.bk-r2 { display: flex; flex-direction: column; justify-content: center; }
.bk-conn { position: relative; }
.bk-conn::before {
    content: ""; position: absolute; left: 0; width: 50%;
    top: calc(25% - 5.5px); bottom: calc(25% - 5.5px);
    border: 2px solid var(--line-2); border-left: 0; border-radius: 0 12px 12px 0;
}
.bk-conn::after { content: ""; position: absolute; left: 50%; right: 0; top: 50%; border-top: 2px solid var(--line-2); }
.bk-extra { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); margin-top: 16px; }
.bk-extra > div { grid-column: 3; }
.bk-extra-label { display: flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.bk-extra-label::after { content: ""; flex: 1; border-top: 1px dashed var(--line-2); }

.kcard {
    position: relative; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--sh-1);
    transition: box-shadow .2s, border-color .2s;
}
.kcard:hover { box-shadow: var(--sh-2); }
.kc-head {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 9px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line);
}
.kc-round { font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-meta { font-size: 12px; color: var(--ink-3); font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.kc-meta b { color: var(--ink); font-variant-numeric: tabular-nums; }
.kc-slot {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px 9px 14px; border-bottom: 1px solid var(--line);
    transition: background .2s;
}
.kc-team { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.kc-seed { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.kc-name { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 700; min-width: 0; }
.kc-name .tbd { color: #b4bdca; font-weight: 500; font-style: italic; font-size: 14px; }
.kc-slot.win { background: var(--win-50); }
.kc-slot.win .kc-name { color: var(--win-ink); font-weight: 800; }
.kc-slot.lose .kc-name { color: var(--ink-3); font-weight: 550; }
.kc-slot .sc { width: 50px; height: 40px; font-size: 18px; }
.kc-slot.win .sc { box-shadow: inset 0 0 0 2px var(--win); color: var(--win-ink); }
.kc-slot.lose .sc { color: var(--ink-3); }
.kc-foot { display: flex; align-items: center; gap: 7px; padding: 8px 14px; font-size: 12.5px; color: var(--ink-3); min-width: 0; }
.kc-foot .ic { width: 14px; height: 14px; }
.kc-foot b { color: var(--ink-2); font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-warn { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--warn-50); color: #8a4b00; font-size: 12.5px; font-weight: 600; border-top: 1px solid #f3d8a6; }
.kc-warn .ic { width: 15px; height: 15px; color: var(--warn); }
.kcard.next { border-color: var(--brand-200); box-shadow: 0 0 0 3px var(--ring), var(--sh-1); }
.kcard.is-final { border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring), var(--sh-2); }
.kcard.is-final .kc-head { background: linear-gradient(100deg, var(--brand) 0%, var(--brand-800) 100%); border-bottom-color: var(--brand-800); }
.kcard.is-final .kc-round { color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.kcard.is-final .kc-meta, .kcard.is-final .kc-meta b { color: #fff; }
.kcard.is-final .kc-round .ic { width: 14px; height: 14px; }

/* =========================================================
   Final standings / podium
   ========================================================= */
.final-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 26px; align-items: end; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 10px; padding: 10px 6px 0; }
.pod { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.medal {
    width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
    font-weight: 900; font-size: 20px; color: #fff; margin-bottom: 10px;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15), inset 0 2px 0 rgba(255, 255, 255, .4), 0 8px 18px -8px rgba(0, 0, 0, .4);
}
.p1 .medal { width: 66px; height: 66px; font-size: 24px; background: linear-gradient(145deg, #ffe08a, #d4a017 60%, #b58500); }
.p2 .medal { background: linear-gradient(145deg, #eef1f5, #a7b0bd 60%, #858f9c); }
.p3 .medal { background: linear-gradient(145deg, #f2c49b, #b8763e 60%, #94592a); }
.pod-name { font-weight: 800; font-size: 15px; letter-spacing: -.01em; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.pod-name.ph { color: var(--ink-3); font-weight: 500; font-style: italic; }
.pod-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; min-height: 18px; }
.pod-block {
    width: 100%; margin-top: 12px; border-radius: 12px 12px 0 0;
    display: grid; place-items: start center; padding-top: 12px;
    font-family: var(--font-display); font-weight: 400; font-size: 52px; line-height: 1; color: rgba(255, 255, 255, .92);
}
.p1 .pod-block { height: 150px; background: linear-gradient(180deg, var(--brand), var(--brand-800)); }
.p2 .pod-block { height: 110px; background: linear-gradient(180deg, var(--dark-700), var(--dark-900)); }
.p3 .pod-block { height: 82px; background: linear-gradient(180deg, var(--dark-800), var(--dark-950)); }
.p1 .pod-name { font-size: 17px; }

.rtbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; border-collapse: separate; border-spacing: 0; }
.rtbl th { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); text-align: center; }
.rtbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; font-size: 14px; color: var(--ink-2); }
.rtbl tr:last-child td { border-bottom: 0; }
.rtbl .l { text-align: left; }
.rtbl td.team { font-weight: 700; color: var(--ink); }
.rtbl td.team > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rtbl .rk { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.rtbl tr.r1 .rk { background: linear-gradient(145deg, #ffe08a, #d4a017); color: #4a3300; border: 0; }
.rtbl tr.r2 .rk { background: linear-gradient(145deg, #eef1f5, #a7b0bd); color: #2f3843; border: 0; }
.rtbl tr.r3 .rk { background: linear-gradient(145deg, #f2c49b, #b8763e); color: #3f2510; border: 0; }
.rtbl tr.r1 td { background: var(--brand-50); }
.rtbl .tbd { color: #b4bdca; font-weight: 500; font-style: italic; }

footer.foot { text-align: center; color: var(--ink-3); font-size: 12.5px; padding: 6px 0 36px; }
footer.foot kbd { margin: 0 2px; }

/* =========================================================
   Toasts & dialog
   ========================================================= */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; border-radius: 12px;
    background: var(--dark-950); color: #fff; font-size: 13.5px; font-weight: 600;
    box-shadow: var(--sh-3);
    animation: tin .25s cubic-bezier(.2, .8, .2, 1);
}
.toast .ic { width: 16px; height: 16px; color: #86efac; }
.toast.out { animation: tout .25s ease forwards; }
@keyframes tin { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateY(6px); } }

dialog.dlg {
    margin: auto; border: 0; border-radius: 20px; padding: 0; width: min(440px, calc(100vw - 32px));
    box-shadow: var(--sh-3); color: var(--ink);
}
dialog.dlg::backdrop { background: rgba(11, 15, 25, .55); backdrop-filter: blur(3px); }
.dlg form { padding: 26px; }
.dlg-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); margin-bottom: 16px; }
.dlg-icon.info { background: var(--gB-50); color: var(--ink); }
.dlg h3 { font-size: 18px; font-weight: 750; letter-spacing: -.01em; margin-bottom: 6px; }
.dlg p { color: var(--ink-2); font-size: 14px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* =========================================================
   Beamer / Hallen-Anzeige
   ========================================================= */
.beamer {
    position: fixed; inset: 0; z-index: 150;
    display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 3.2vh;
    padding: 3.5vh 3.5vw;
    color: #fff; font-size: clamp(14px, 1.15vw, 24px);
    background: linear-gradient(160deg, var(--dark-900), var(--dark-950) 80%);
    overflow: hidden;
}
.bm-top { display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.bm-brand { display: flex; align-items: center; gap: 1em; min-width: 0; }
.bm-brand .mark { width: 2.8em; height: 2.8em; border-radius: .8em; }

.bm-brand b { display: block; font-family: var(--font-display); font-size: 2.6em; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-brand span { color: rgba(255, 255, 255, .6); font-weight: 600; }
.bm-clock { font-family: var(--font-display); font-size: 5em; font-weight: 400; letter-spacing: .02em; font-variant-numeric: tabular-nums; line-height: 1; }

.bm-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3vw; min-height: 0; }
.bm-col { display: flex; flex-direction: column; gap: 2.4vh; min-height: 0; }
.bm-box { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: 1.3em; padding: 2.6vh 2vw; }
.bm-label { font-size: .8em; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .5); margin-bottom: 1.6vh; display: flex; align-items: center; gap: .8em; }
.bm-now .badge { font-size: .72em; }
.bm-now-meta { font-size: 1.05em; color: rgba(255, 255, 255, .7); font-weight: 600; margin-bottom: 2.4vh; }
.bm-now-meta b { color: #fff; font-size: 1.5em; font-variant-numeric: tabular-nums; margin-right: .4em; }
.bm-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 2vw; }
.bm-team { font-family: var(--font-display); font-size: 3.8em; font-weight: 400; letter-spacing: .02em; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.bm-team small { display: block; font-family: var(--font); font-size: .36em; font-weight: 700; letter-spacing: .02em; color: rgba(255, 255, 255, .5); margin-bottom: .4em; }
.bm-team.r { text-align: right; }
.bm-sep { font-size: 1.1em; font-weight: 800; color: #fff; width: 3em; height: 3em; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 6px rgba(220, 38, 38, .2); display: grid; place-items: center; }
.bm-ref { margin-top: 2.6vh; padding-top: 2vh; border-top: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .7); display: flex; align-items: center; gap: .6em; }
.bm-ref b { color: #fff; }
.bm-list { display: grid; gap: 1vh; }
.bm-li { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1em; padding: 1.2vh 1em; border-radius: .8em; background: rgba(255, 255, 255, .04); }
.bm-li .t { font-weight: 800; font-variant-numeric: tabular-nums; color: #f87171; }
.bm-li .a { text-align: right; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-li .b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-li .s { font-weight: 800; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .45); min-width: 3.4em; text-align: center; }
.bm-li.done .s { color: #fff; }
.bm-li.done .a.w, .bm-li.done .b.w { color: #86efac; }
.bm-li.done .a.l, .bm-li.done .b.l { color: rgba(255, 255, 255, .5); }
.bm-tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.bm-tbl td { padding: 1vh .5em; border-bottom: 1px solid rgba(255, 255, 255, .08); text-align: center; color: rgba(255, 255, 255, .75); }
.bm-tbl tr:last-child td { border-bottom: 0; }
.bm-tbl td.n { text-align: left; color: #fff; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; width: 60%; }
.bm-tbl td.p { font-weight: 900; color: #fff; }
.bm-tbl td.k { width: 2.2em; font-weight: 800; color: rgba(255, 255, 255, .5); }
.bm-tbl tr.hf td.k { color: #f87171; }
.bm-gh { display: flex; align-items: center; gap: .6em; font-weight: 800; margin-bottom: .6vh; }
.bm-gh i { width: .7em; height: .7em; border-radius: .2em; }
.bm-bottom { display: flex; align-items: center; gap: 1.6vw; color: rgba(255, 255, 255, .6); font-weight: 600; }
.bm-prog { flex: 1; height: .5em; border-radius: 1em; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bm-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-700), #f87171); border-radius: inherit; transition: width .6s; }
.bm-champ { text-align: center; display: grid; place-items: center; align-content: center; gap: 2vh; height: 100%; }
.bm-champ .ic { width: 6em; height: 6em; color: var(--brand); stroke-width: 1.3; }
.bm-champ b { font-family: var(--font-display); font-size: 6em; font-weight: 400; letter-spacing: .02em; line-height: 1; text-transform: uppercase; }

#print-root { display: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
    .nav { display: none; }
    .actions { margin-left: auto; }
    .mrow { grid-template-columns: 70px 100px minmax(0, 1fr) 128px minmax(0, 1fr); }
    .m-ref { grid-column: 3 / -1; border-left: 0; padding-left: 0; justify-content: center; margin-top: -6px; }
    .m-ref div { flex-direction: row; gap: 6px; align-items: baseline; }
    .order { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .final-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .wrap { padding: 0 16px; }
    .hero-grid { grid-template-columns: 1fr; gap: 26px; }
    .phases { grid-template-columns: 1fr 1fr; row-gap: 16px; }
    .setup-grid, .groups { grid-template-columns: 1fr; }
    .save-state { display: none; }
    .bk-heads, .bk-conn { display: none; }
    .bk, .bk-extra { grid-template-columns: 1fr; gap: 14px; }
    .bk-r1 { gap: 14px; }
    .bk-extra > div { grid-column: 1; }
    .panel-head { padding: 18px; }
    .panel-body { padding: 0 18px 18px; }
    .pause-strip { margin: 16px 18px 20px; flex-wrap: wrap; }
    .mrow { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: 14px 18px; gap: 10px 12px; }
    .m-time { grid-column: 1; flex-direction: row; gap: 8px; align-items: baseline; }
    .m-tag { grid-column: 2 / 4; flex-direction: row; justify-content: flex-end; align-items: center; }
    .m-team.t1 { grid-column: 1; }
    .score { grid-column: 2; }
    .m-team.t2 { grid-column: 3; }
    .m-ref { grid-column: 1 / -1; margin-top: 0; }
    .stbl .hide-sm { display: none; }
    .field-row.c3 { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* =========================================================
   PRINT
   ========================================================= */
@media print {
    @page { size: A4 landscape; margin: 10mm 12mm; }
    @page overview { size: A4 portrait; margin: 9mm 10mm; }
    body.print-overview, body.print-qr { page: overview; }

    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    html, body { background: #fff; font-size: 9pt; }
    .app, .beamer, .toasts, dialog, .login, .tabbar { display: none !important; }
    #print-root { display: block; color: #0f172a; }

    .pp { height: 188mm; display: flex; flex-direction: column; overflow: hidden; break-after: page; page-break-after: always; }
    .pp:last-child { break-after: auto; page-break-after: auto; }
    body.print-overview .pp, body.print-qr .pp { height: 277mm; }

    .pp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8mm; padding-bottom: 3mm; border-bottom: .7mm solid #111827; position: relative; margin-bottom: 5mm; }
    .pp-head::after { content: ""; position: absolute; left: 0; bottom: -1.6mm; width: 36mm; height: .9mm; background: #dc2626; }
    .pp-brand { display: flex; align-items: center; gap: 3.5mm; min-width: 0; }
    .pp-mark { width: 14mm; height: 14mm; flex: none; }
    .pp-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
    .pp-name { font-family: var(--font-display); font-size: 22pt; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
    .pp-meta { font-size: 8pt; color: #5b6676; margin-top: .8mm; }
    .pp-title { text-align: right; line-height: 1.1; }
    .pp-title span { display: block; font-size: 7pt; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #dc2626; }
    .pp-title b { font-family: var(--font-display); font-size: 26pt; font-weight: 400; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
    .pp-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 5mm; }
    .pp-foot { margin-top: auto; padding-top: 2.5mm; border-top: .3mm solid #cfd6e1; display: flex; justify-content: space-between; font-size: 7pt; color: #6b7686; }

    .pt { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
    .pt th { background: #111827; color: #fff; font-size: 6.8pt; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2.2mm 2.5mm; text-align: left; }
    .pt th.c, .pt td.c { text-align: center; }
    .pt th.r, .pt td.r { text-align: right; }
    .pt td { padding: 0 2.5mm; height: 13mm; border-bottom: .3mm solid #cfd6e1; font-size: 10pt; vertical-align: middle; }
    .pt tbody tr:nth-child(even) td { background: #f5f7fb; }
    .pt .no { width: 10mm; font-weight: 800; color: #dc2626; }
    .pt .tm { width: 15mm; font-weight: 700; }
    .pt .tn { font-weight: 700; }
    .pt .rf { color: #475569; width: 46mm; }
    .pt .sc-cell { width: 34mm; text-align: center; white-space: nowrap; }
    .pt .sc-cell b { display: inline-block; min-width: 9mm; font-size: 12pt; font-weight: 800; }
    .pt .sc-cell i { font-style: normal; font-weight: 900; margin: 0 1.5mm; color: #475569; }
    .pbox { display: inline-block; width: 11mm; height: 8mm; border: .35mm solid #334155; border-radius: 1.2mm; vertical-align: middle; background: #fff; }
    .pg { display: inline-block; width: 6mm; height: 6mm; line-height: 6mm; text-align: center; border-radius: 1.4mm; color: #fff; font-weight: 800; font-size: 7.5pt; }
    .pg.A { background: #dc2626; } .pg.B { background: #374151; }
    .plbl { display: block; font-size: 6.8pt; color: #64748b; font-weight: 600; margin-bottom: .6mm; }
    .pline { display: block; min-height: 5.5mm; border-bottom: .3mm solid #1e293b; font-weight: 700; font-size: 10pt; line-height: 5.5mm; }
    .pt.ko td { height: 15mm; }
    .pt .round { font-size: 7.5pt; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #334155; width: 38mm; white-space: nowrap; }
    .pt tr.fin td { background: #fef2f2 !important; }
    .pt tr.fin td.round { color: #dc2626; }
    .pt tr.pause td { height: 7mm; background: repeating-linear-gradient(135deg, #f3f4f6 0 2mm, #fff 2mm 4mm) !important; font-size: 7.5pt; font-weight: 700; color: #374151; text-align: center; letter-spacing: .05em; }

    .pboxes { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
    .pgroup { border: .3mm solid #cfd6e1; border-radius: 2.5mm; overflow: hidden; }
    .pgroup h4 { display: flex; align-items: center; gap: 2.5mm; font-size: 9pt; padding: 2mm 3mm; border-bottom: .3mm solid #cfd6e1; background: #f5f7fb; }
    .pgroup ol { list-style: none; display: grid; grid-template-columns: 1fr 1fr; }
    .pgroup li { padding: 1.8mm 3mm; font-size: 9pt; font-weight: 600; border-bottom: .2mm solid #e5e9f0; }
    .pgroup li small { color: #64748b; font-weight: 800; margin-right: 2mm; }

    .pst td { height: 12mm; }
    .pst .pos { width: 10mm; font-weight: 800; font-size: 11pt; }
    .pst .zn { width: 24mm; font-size: 7pt; font-weight: 800; }
    .pst tr.hf td:first-child { box-shadow: inset 1.2mm 0 0 #dc2626; }
    .pst tr.pl td:first-child { box-shadow: inset 1.2mm 0 0 #9ca3af; }
    .pst .wr { color: transparent; }
    .pst-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 8mm; }
    .pst-wrap h3 { display: flex; align-items: center; gap: 2.5mm; font-size: 11pt; margin-bottom: 2.5mm; }

    .pseed { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
    .pseed > div { border: .3mm solid #cfd6e1; border-radius: 2.5mm; padding: 3mm 4mm; }
    .pseed h4 { font-size: 7pt; letter-spacing: .12em; text-transform: uppercase; color: #dc2626; margin-bottom: 2mm; }
    .pseed p { display: grid; grid-template-columns: 30mm 1fr auto 1fr; gap: 2mm; align-items: end; font-size: 8.5pt; padding: 1.5mm 0; }
    .pseed p span { color: #64748b; font-weight: 700; }
    .pseed p i { font-style: normal; color: #64748b; font-size: 7.5pt; }
    .pseed p em { font-style: normal; border-bottom: .3mm solid #1e293b; min-height: 5mm; font-weight: 700; }

    .prk td { height: 14mm; font-size: 11pt; }
    .prk .pl { width: 20mm; font-weight: 900; font-size: 13pt; }
    .prk tr.m1 td { background: #fef2f2 !important; }
    .prk tr.m2 td { background: #eef1f5 !important; }
    .prk tr.m3 td { background: #f8e6d6 !important; }
    .pmedal { display: inline-grid; place-items: center; width: 8mm; height: 8mm; border-radius: 50%; color: #fff; font-size: 10pt; font-weight: 900; }
    .m1 .pmedal { background: #d4a017; } .m2 .pmedal { background: #8f99a6; } .m3 .pmedal { background: #b8763e; }
    .m0 .pmedal { background: #e5e9f0; color: #334155; }
    .psign { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12mm; margin-top: 6mm; }
    .psign div { border-top: .3mm solid #1e293b; padding-top: 1.5mm; font-size: 7.5pt; color: #64748b; }

    /* Overview (portrait, one page) */
    .ov .pt td { height: 8.6mm; font-size: 8.6pt; }
    .ov .pt.ko td { height: 9.4mm; }
    .ov .pt th { padding: 1.7mm 2mm; font-size: 6.4pt; }
    .ov .pt td { padding: 0 2mm; }
    .ov .rf { width: 32mm; font-size: 8pt; }
    .ov .sc-cell { width: 22mm; }
    .ov .pbox { width: 8mm; height: 6mm; }
    .ov .plbl { font-size: 6.2pt; margin: 0; }
    .ov .round { width: 30mm; font-size: 6.4pt; letter-spacing: .02em; }
    .ov .pp-body { gap: 3.5mm; }
    .ov h3.sec { font-size: 9.5pt; font-weight: 800; display: flex; align-items: center; gap: 2mm; margin-bottom: 1.5mm; }
    .ov h3.sec span { font-size: 7pt; color: #64748b; font-weight: 600; }
    .ov .pgroup li { padding: 1.4mm 3mm; font-size: 8.4pt; }
    .ov .rules { font-size: 7pt; color: #475569; border: .3mm solid #cfd6e1; border-radius: 2mm; padding: 2mm 3mm; display: grid; grid-template-columns: 1fr 1fr; gap: 1mm 6mm; }
    .ov .rules b { color: #0f172a; }
}
    
/* =========================================================
   ONLINE-VERSION: Live, Login, Tab-Leiste
   ========================================================= */
a.menu-item, a.btn { color: inherit; text-decoration: none; }
.topbar a.btn-cta { color: var(--brand); }
body.locked { overflow: hidden; }

/* read-only score (public web view) */
.sc.ro { display: inline-grid; place-items: center; user-select: text; }
.sc.ro.empty { color: var(--ink-3); font-weight: 600; }
.is-done .sc.ro { box-shadow: none; }

/* live indicator */
.live-state {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; color: rgba(255, 255, 255, .6); white-space: nowrap; margin-right: 6px;
}
.live-state b { color: #fff; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(220, 38, 38, .6); animation: livepulse 2s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .55); } 70% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); } 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); } }
.live-state.off .live-dot { background: var(--ink-3); animation: none; }

/* admin save state */
.save-state[data-s="pending"] .dot, .save-state[data-s="saving"] .dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }
.save-state[data-s="error"] .dot { background: var(--brand); box-shadow: 0 0 0 3px rgba(220, 38, 38, .25); animation: pulse 1.2s infinite; }
.save-state[data-s="error"] { color: #fca5a5; }

.foot a { color: var(--ink-2); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-2); }
.foot a:hover { color: var(--brand); border-color: var(--brand); }
.foot-logo { display: block; width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.foot-logo img { width: 100%; height: 100%; object-fit: contain; }

/* login */
.login {
    position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px;
    background:
        linear-gradient(102deg, transparent 0 70%, rgba(220, 38, 38, .14) 70% 90%, transparent 90%),
        var(--dark-900);
    color: #fff;
}
.login-card { width: min(400px, 100%); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.login-mark { width: 64px; height: 64px; }
.login h1 { font-family: var(--font-display); font-weight: 400; font-size: 54px; line-height: .95; letter-spacing: .01em; text-transform: uppercase; }
.login h1 .dot { color: var(--brand); }
.login p { color: rgba(255, 255, 255, .62); font-size: 14px; }
.login .field { width: 100%; gap: 8px; margin-top: 6px; }
.login .field span { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.login .input { height: 50px; font-size: 17px; background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: #fff; }
.login .input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(220, 38, 38, .25); }
.btn-block { width: 100%; height: 50px; justify-content: center; font-size: 15px; }
.login-error { width: 100%; padding: 10px 12px; border-radius: 10px; background: rgba(220, 38, 38, .15); border: 1px solid rgba(220, 38, 38, .4); color: #fecaca; font-size: 13.5px; font-weight: 600; }
.login-back { color: rgba(255, 255, 255, .5); font-size: 13px; text-decoration: none; align-self: center; margin-top: 6px; }
.login-back:hover { color: #fff; }

/* bottom tab bar (phones) */
.tabbar { display: none; }
@media screen and (max-width: 860px) {
    .tabbar {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        background: rgba(17, 24, 39, .97); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(255, 255, 255, .08);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    }
    .tabbar a {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 0;
        color: rgba(255, 255, 255, .55); text-decoration: none; font-size: 10.5px; font-weight: 600; border-radius: 10px;
    }
    .tabbar a .ic { width: 20px; height: 20px; }
    .tabbar a.active { color: #fff; }
    .tabbar a.active .ic { color: var(--brand); }
    body[data-mode] { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
    html { scroll-padding-top: 72px; }

    .topbar .wrap { gap: 10px; height: 58px; }
    .topbar .btn .lbl, .brand-text span { display: none; }
    .topbar .btn { padding: 0 10px; }
    .brand-text b { font-size: 18px; max-width: 150px; }
    .mark { width: 36px; height: 36px; }
    .live-state span:last-child { display: none; }
    .save-state { display: inline-flex; margin: 0; }
    .save-state #save-text { display: none; }
    .menu-pop { position: fixed; left: 10px; right: 10px; top: 64px; min-width: 0; }

    .hero .wrap { padding-top: 26px; padding-bottom: 22px; }
    .hero h1 { font-size: 52px; margin: 12px 0 14px; }
    .hero-meta { font-size: 13px; gap: 6px 14px; }
    .chips, .phases, .hero-deco .dots, .hero-deco .wm { display: none; }
    .progress-card { padding: 12px 16px; }
    .panel { border-radius: 16px; margin-bottom: 16px; }
    .panel h2 { font-size: 27px; }
    .ph-icon { display: none; }
    .seg { width: 100%; }
    .seg button { flex: 1; justify-content: center; }
    .sc { width: 54px; height: 46px; font-size: 21px; }
    .kc-slot .sc { width: 54px; height: 44px; }
    .order { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
    .ord { padding: 8px; }
    .podium { padding-top: 0; }
    .p1 .pod-block { height: 110px; } .p2 .pod-block { height: 80px; } .p3 .pod-block { height: 60px; }
    .pod-block { font-size: 36px; }
    .rtbl th:nth-child(4), .rtbl td:nth-child(4), .rtbl th:nth-child(3), .rtbl td:nth-child(3) { display: none; }
    .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
    .mrow .tcode { display: none; }
    .login .login-mark { width: 64px; height: 64px; }
}

/* "Meine Mannschaft" (public view) */
.mine-bar {
    display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap;
    margin-bottom: 18px; padding: 12px 16px; border-radius: 16px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1);
}
.mine-bar.on { border-color: var(--brand-200); background: linear-gradient(90deg, var(--brand-50), var(--surface) 70%); }
.mine-select { position: relative; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14px; }
.mine-select .ic { width: 18px; height: 18px; color: var(--brand); }
.mine-bar.on .mine-select .ic { fill: var(--brand); }
.mine-select select {
    height: 40px; min-width: 220px; padding: 0 36px 0 12px; border-radius: 10px; border: 1px solid var(--line-2);
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
    font: 600 14.5px var(--font); color: var(--ink); appearance: none; -webkit-appearance: none;
}
.mine-select select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.mine-hint { font-size: 13.5px; color: var(--ink-2); }
.mine-hint b { color: var(--ink); }
.mlist[data-filter="mine"] .mrow:not(.mine):not(.ref-mine) { display: none; }
.seg button .ic { width: 14px; height: 14px; color: var(--brand); fill: var(--brand); }
.mrow.mine { background: linear-gradient(90deg, var(--brand-50), transparent 70%); }
.m-team.me .tname::after, .kc-slot.me .tname::after { content: " ★"; color: var(--brand); }
.you { flex: none; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--brand); padding: 3px 7px; border-radius: 6px; margin-left: 6px; }
.kcard.mine { border-color: var(--brand-200); box-shadow: 0 0 0 3px var(--ring); }
.stbl tr.me td, .rtbl tr.me td { background: var(--brand-50); }

/* =========================================================
   SMARTPHONE: Spiele als gestapelte Karten (Name links, Ergebnis rechts)
   ========================================================= */
@media screen and (max-width: 860px) {
    .desktop-only { display: none !important; }
    .mrow {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "time tag" "t1 s1" "t2 s2" "ref ref";
        gap: 0 12px; padding: 12px 16px 10px 18px;
    }
    .mrow .m-time { grid-area: time; flex-direction: row; gap: 8px; align-items: baseline; margin-bottom: 6px; }
    .mrow .m-tag { grid-area: tag; flex-direction: row; justify-content: flex-end; align-items: center; margin-bottom: 6px; }
    .mrow .m-team { padding: 5px 0; font-size: 16px; }
    .mrow .m-team .tname { white-space: normal; overflow-wrap: anywhere; }
    .mrow .m-team.t1 { grid-area: t1; flex-direction: row-reverse; justify-content: flex-end; text-align: left; }
    .mrow .m-team.t2 { grid-area: t2; }
    .mrow .score { display: contents; }
    .mrow .colon { display: none; }
    .mrow .sc[data-n="1"] { grid-area: s1; }
    .mrow .sc[data-n="2"] { grid-area: s2; }
    .mrow .sc { align-self: center; margin: 2px 0; }
    .mrow .m-ref { grid-area: ref; justify-content: flex-start; margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
    .mrow .m-ref div { flex-direction: row; gap: 6px; align-items: baseline; }
    .mrow .you { margin-left: auto; }
    /* finished games: plain numbers, winner in red (no dark score pill on phones) */
    .mrow.is-done .sc { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
    .mrow.is-done .sc.win { color: var(--brand); }
    .mrow.is-done .sc.lose { color: var(--ink-3); }
    .sc.ro, .mrow.is-done .sc.ro { width: auto; min-width: 44px; height: auto; padding: 0; background: none; box-shadow: none; justify-items: end; font-size: 24px; }
    .kc-slot .sc.ro { font-size: 22px; }

    .hero .eyebrow, .progress-card { display: none; }
    .hero h1 { font-size: 44px; margin: 0 0 10px; }
    .hero-grid { gap: 16px; }
    .mine-bar { margin: 0 0 14px; padding: 12px 14px; }
    .mine-select { width: 100%; }
    .mine-select span { display: none; }
    .mine-select select { flex: 1; min-width: 0; height: 44px; font-size: 16px; }
    .mine-hint { width: 100%; font-size: 13px; }
    .seg button { padding: 7px 6px; }
    main.wrap { padding-top: 16px; }
    .hero-side { gap: 10px; }
    .nc-team { font-size: 17px; }
    .kc-head { flex-wrap: wrap; gap: 2px 10px; }
    .stbl td { padding: 11px 6px; }
    .stbl td:first-child, .stbl th:first-child { padding-left: 12px; }
    .stbl td:last-child, .stbl th:last-child { padding-right: 12px; }
    .stbl td.team { width: auto; }
    .stbl td.team .tname { white-space: normal; }
    .legend .rule { margin-left: 0; }
    .final-grid { gap: 18px; }
}

/* =========================================================
   HALLENANSICHT
   ========================================================= */
.halle-page { overflow: hidden; background: var(--dark-950); }
.halle-page.idle { cursor: none; }
.beamer.halle { position: fixed; }
.halle .bm-col { min-height: 0; overflow: hidden; }
.halle .bm-team { font-size: 3.2em; }
.halle .bm-team.long { font-size: 2.4em; }
.beamer.halle { padding: 3vh 3.5vw 2.6vh; gap: 2.4vh; }
.halle .bm-col { gap: 2vh; }
.halle .bm-box { padding: 2.2vh 2vw; }
.halle .bm-label { margin-bottom: 1.2vh; }
.halle .bm-li { padding: 1vh 1em; }
.halle .bm-tbl td { padding: .75vh .5em; }
.halle .bm-now-meta { margin-bottom: 1.8vh; }
.halle .bm-ref { margin-top: 2vh; padding-top: 1.6vh; }
.halle .bm-team { font-size: 2.6em; }
.halle .bm-team.long { font-size: 2.1em; }
.bm-last { padding-top: 1.8vh; padding-bottom: 1.8vh; border-color: rgba(34, 197, 94, .28); background: linear-gradient(90deg, rgba(34, 197, 94, .10), rgba(255, 255, 255, .04) 60%); }
.bm-last .bm-label { margin-bottom: 1vh; color: #86efac; }
.bm-last .bm-label .ic { width: 1.1em; height: 1.1em; stroke-width: 3; }
.bm-last .bm-label span { margin-left: auto; letter-spacing: .06em; color: rgba(255, 255, 255, .5); font-weight: 700; text-transform: none; }
.bm-last-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1.4em; }
.bm-last-row .a, .bm-last-row .b { font-size: 1.45em; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-last-row .a { text-align: right; }
.bm-last-row .w { color: #fff; }
.bm-last-row .l { color: rgba(255, 255, 255, .5); }
.bm-last-score { font-family: var(--font-display); font-size: 2.6em; line-height: 1; letter-spacing: .02em; display: flex; gap: .2em; color: rgba(255, 255, 255, .55); }
.bm-last-score b { font-weight: 400; }
.bm-last-score b.w { color: #fff; }
.bm-last-score i { font-style: normal; color: rgba(255, 255, 255, .35); }
.bm-last.fresh { animation: freshResult 2.4s ease-out; }
@keyframes freshResult { 0%, 30% { box-shadow: 0 0 0 4px rgba(34, 197, 94, .7); background-color: rgba(34, 197, 94, .25); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.bm-loading { display: grid; place-items: center; grid-row: 1 / -1; font-family: var(--font-display); font-size: 3em; color: rgba(255, 255, 255, .4); }
.bm-brand .mark img { width: 92%; height: 92%; object-fit: contain; }
.bm-top-right { display: flex; align-items: center; gap: 1.6vw; }
.bm-conn { display: inline-flex; align-items: center; gap: .5em; font-size: .8em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .6); }
.bm-conn i { width: .7em; height: .7em; border-radius: 50%; background: var(--brand); animation: livepulse 2s infinite; }
.bm-conn.off { color: #fca5a5; }
.bm-conn .ic { width: 1.2em; height: 1.2em; }
.bm-gh { justify-content: flex-start; }
.bm-gh span { margin-left: auto; font-size: .75em; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.bm-gh i.gA { background: var(--brand); }
.bm-gh i.gB { background: #9ca3af; }
.bm-tbl tr.th td { font-size: .7em; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .4); padding-top: 0; }
.bm-li.cur { background: rgba(220, 38, 38, .16); box-shadow: inset 3px 0 0 var(--brand); }
.bm-li.fin .t { color: #fff; }
.bm-podium { display: flex; gap: 2em; justify-content: center; color: rgba(255, 255, 255, .7); font-weight: 700; font-size: 1.2em; }
.bm-podium i { font-style: normal; color: #f87171; margin-right: .4em; }
.bm-bottom { gap: 1.4vw; }
.bm-qr { display: flex; align-items: center; gap: .9em; padding: .5em .9em .5em .5em; border-radius: .8em; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.bm-qr img { width: 4.6em; height: 4.6em; border-radius: .3em; background: #fff; padding: .2em; }
.bm-qr b { display: block; color: #fff; font-size: 1em; }
.bm-qr span { display: block; font-size: .78em; color: rgba(255, 255, 255, .6); line-height: 1.35; }
.bm-hint { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 200; font-size: 12px; color: rgba(255, 255, 255, .35); transition: opacity .3s; }
.halle-page.idle .bm-hint { opacity: 0; }

/* =========================================================
   PRINT: QR-Code-Aushang
   ========================================================= */
@media print {
    .qrp { align-items: center; text-align: center; }
    .qrp-top { width: 100%; display: flex; align-items: center; gap: 4mm; padding-bottom: 5mm; border-bottom: .8mm solid #111827; text-align: left; position: relative; }
    .qrp-top::after { content: ""; position: absolute; left: 0; bottom: -1.8mm; width: 40mm; height: 1mm; background: #dc2626; }
    .qrp-logo { width: 20mm; height: 20mm; }
    .qrp-logo img { width: 100%; height: 100%; object-fit: contain; }
    .qrp-top b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 24pt; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
    .qrp-top span { display: block; font-size: 11pt; color: #4b5563; margin-top: 1mm; }
    .qrp-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6mm; }
    .qrp-eyebrow { font-size: 11pt; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #dc2626; }
    .qrp h1 { font-family: var(--font-display); font-weight: 400; font-size: 46pt; line-height: .95; letter-spacing: .01em; text-transform: uppercase; }
    .qrp h1 span { color: #dc2626; }
    .qrp-code { width: 110mm; height: 110mm; padding: 5mm; border: 1.2mm solid #111827; border-radius: 6mm; }
    .qrp-code img { width: 100%; height: 100%; display: block; }
    .qrp-hint { font-size: 13pt; color: #374151; max-width: 150mm; }
    .qrp-url { font-size: 17pt; font-weight: 800; color: #111827; }
    .qrp-foot { width: 100%; padding-top: 3mm; border-top: .3mm solid #d1d5db; font-size: 10pt; color: #6b7280; }
}

body[data-mode="admin"] .mrow { grid-template-columns: 86px 108px minmax(0, 1fr) 136px minmax(0, 1fr) minmax(270px, 1fr); }

/* Hero before the first game: the day's plan instead of progress / next game */
body.pre-start #hero-meta { display: none; }
/* on phones the info chips are hidden, so the play time goes into the plan card */
.phone-only { display: none; }
@media screen and (max-width: 860px) { .phone-only { display: inline; } }
@media screen and (min-width: 861px) { body:not(.pre-start) #hero-meta { display: none; } }
.plan-card { padding: 16px 20px 14px; }
.pc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 10px; font-size: 12.5px; color: rgba(255, 255, 255, .6); font-weight: 600; }
.eyebrow-s { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-300); }
.pc-row { display: grid; grid-template-columns: 58px 1fr; align-items: baseline; gap: 12px; padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .08); }
.pc-t { font-family: var(--font-display); font-size: 24px; line-height: 1; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.pc-row b { display: block; font-size: 15px; font-weight: 700; }
.pc-row small { display: block; font-size: 12.5px; color: rgba(255, 255, 255, .6); margin-top: 1px; }
.pc-row.muted .pc-t, .pc-row.muted b { color: rgba(255, 255, 255, .5); font-weight: 600; }
.pc-row.muted { padding: 5px 0; }
.pc-row.muted .pc-t { font-size: 18px; }
.pc-row.gold .pc-t, .pc-row.gold b { color: #fff; }
.pc-row.gold b::before { content: "🏆 "; }
.input-ro { display: flex; align-items: center; background: var(--surface-2); color: var(--ink); font-weight: 700; }
.ceremony-strip { margin-top: 0; }
.ceremony-strip .pi { background: #fff4cc; color: #9a6b00; border-color: #f3e2a6; }

/* Final round: game list (same rows as the group stage) */
.gpill.ko { background: var(--dark-900); color: #fff; }
.gpill.ko::before { display: none; }
.gpill.ko.fin { background: var(--brand); }
#ko-list { margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.bk-section-title { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }

/* =========================================================
   HALLE · Vorrunde: Zeitstrahl aller Spiele + Tabellen
   ========================================================= */
/* smaller header -> more height for the games */
.halle .bm-top .mark { width: 2.3em; height: 2.3em; }
.halle .bm-brand b, .halle .bm-brand span, .halle .bm-qr b, .halle .bm-qr span { white-space: nowrap; }
.halle .bm-brand { min-width: 0; }
.halle .pg-ref { max-width: 12em; overflow: hidden; text-overflow: ellipsis; }
.halle .bm-brand b { font-size: 2em; }
.halle .bm-brand span { font-size: .9em; }
.halle .bm-clock { font-size: 3.4em; }
.beamer.halle { gap: 2vh; padding-top: 2.4vh; grid-template-rows: auto minmax(0, 1fr); }
.halle .bm-top-right { gap: 1.4vw; }
.halle .bm-qr { padding: .35em .8em .35em .35em; }
.halle .bm-qr img { width: 3.6em; height: 3.6em; }
.halle .bm-now-meta { margin: 0 0 0 auto; font-size: 1em; }
.halle .bm-now-meta b { font-size: 1.3em; }
.halle .bm-label { align-items: center; }

.pg-row { display: grid; grid-template-columns: 3.4em auto minmax(0, 1fr) 3.6em minmax(0, 1fr) auto; align-items: center; gap: .8em; padding: .45vh .9em; border-radius: .6em; background: rgba(255, 255, 255, .04); }
.pg-row + .pg-row { margin-top: .6vh; }
.pg-t { font-weight: 800; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .5); }
.pg-g { display: grid; place-items: center; width: 1.5em; height: 1.5em; border-radius: .35em; font-size: .8em; font-weight: 800; color: #fff; }
.pg-g.gA { background: var(--brand); } .pg-g.gB { background: #4b5563; }
.pg-a, .pg-b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-a { text-align: right; }
.pg-a.w, .pg-b.w { color: #fff; }
.pg-a.l, .pg-b.l { color: rgba(255, 255, 255, .45); font-weight: 600; }
.pg-s { text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .4); }
.pg-row.done .pg-s { color: #fff; }
.pg-s.live { color: #f87171; }
.pg-ref { font-size: .78em; color: rgba(255, 255, 255, .45); white-space: nowrap; min-width: 0; }
.pg-row:not(:has(.pg-g)) { grid-template-columns: 3.4em minmax(0, 1fr) 3.6em minmax(0, 1fr) auto; }
.pg-row:not(:has(.pg-ref)) { grid-template-columns: 3.4em auto minmax(0, 1fr) 3.6em minmax(0, 1fr); }
.pg-row.live, .pg-row.next { background: rgba(220, 38, 38, .16); box-shadow: inset 3px 0 0 var(--brand); }

/* timeline left (played · current · later), tables right */
.pv-a { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.pv-timeline { gap: 1.2vh; }
.pv-list { padding: 1.1vh 1.4vw 1.2vh; }
.pv-list .bm-label { margin-bottom: .8vh; }
.pv-list .bm-label .ic { width: 1em; height: 1em; color: #86efac; }
/* group stage: referee in a small second line (saves width -> larger font) */
.pv-list .pg-row { grid-template-columns: 3.4em auto minmax(0, 1fr) 3.6em minmax(0, 1fr); row-gap: 0; }
.pv-list .pg-ref { grid-column: 3 / 6; text-align: center; max-width: none; line-height: 1.2; }
.pv-list .pg-ref:empty { display: none; }
/* fill the full height: boxes share the space, content centred */
.pv-a .bm-col > .bm-box { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.pv-a .pv-list { justify-content: space-evenly !important; }
.pv-a .bm-group .bm-tbl { flex: 1; }
.halle .pv-now { padding: 1.8vh 1.8vw; border-color: rgba(220, 38, 38, .5); background: linear-gradient(90deg, rgba(220, 38, 38, .14), rgba(255, 255, 255, .05) 60%); }
.halle .pv-now .bm-team { font-size: 2.4em; }
.halle .pv-now .bm-team.long { font-size: 1.9em; }
.halle .pv-now .bm-livescore { font-size: 3.8em; }
.halle .pv-now .bm-sep { width: 2.4em; height: 2.4em; }
.halle .pv-now .bm-ref { margin-top: 1.2vh; padding-top: 1vh; }

/* =========================================================
   HALLE · Endrunde: Infoleiste + beide Turnierbäume nebeneinander
   ========================================================= */
.bm-ko { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1.6vh; min-height: 0; }
.bm-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 2vw; }
.bm-order { padding: 1.2vh 1.4vw; }
.bm-order .bm-label span { margin-left: auto; color: #f87171; letter-spacing: .06em; }
.ko-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.6vw; }
.ko-row { display: grid; grid-template-columns: 1.6em minmax(0, 1fr); align-items: center; gap: .4em; }
.ko-row .bm-order-n { text-align: right; }
.ko-row + .ko-row { margin-top: .25vh; }
.bm-order .bm-label { margin-bottom: .5vh; }
.ko-row .pg-row { grid-template-columns: 3.2em 7em minmax(0, 1fr) 3.2em minmax(0, 1fr) 13em; padding: .12vh .9em; font-size: .95em; }
.ko-row .pg-ref { overflow: hidden; text-overflow: ellipsis; text-align: right; }
.ko-row.cur .pg-row { background: rgba(220, 38, 38, .2); box-shadow: inset 3px 0 0 var(--brand); }
.ko-row.cur .bm-order-n { color: #f87171; }
.ko-row.cur .pg-s { color: #fff; font-size: 1.15em; }
.bm-order-n { font-weight: 800; color: rgba(255, 255, 255, .45); }
.pg-rd { font-size: .78em; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #f87171; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-rd.fin { color: #fff; background: var(--brand); padding: .1em .5em; border-radius: .3em; justify-self: start; }
.bm-last.compact, .bm-nowstrip { padding: 1.4vh 1.6vw; }
.bm-last.compact .bm-label, .bm-nowstrip .bm-label { margin-bottom: .6vh; }
.bm-last.compact .bm-last-row .a, .bm-last.compact .bm-last-row .b,
.bm-nowstrip .bm-last-row .a, .bm-nowstrip .bm-last-row .b { font-size: 1.25em; }
.bm-last.compact .bm-last-score, .bm-nowstrip .bm-last-score { font-size: 2.2em; }
.bm-last.empty { visibility: hidden; }
.bm-nowstrip { border-color: rgba(220, 38, 38, .45); background: linear-gradient(90deg, rgba(220, 38, 38, .14), rgba(255, 255, 255, .04) 60%); }
.bm-nowstrip .bm-label span:last-child { margin-left: auto; color: rgba(255, 255, 255, .6); letter-spacing: .04em; text-transform: none; font-weight: 700; }
.bm-nowstrip .bm-last-score i { font-size: .55em; color: rgba(255, 255, 255, .45); }

.bm-brackets { display: grid; grid-template-columns: 1fr 1fr; gap: 2vw; min-height: 0; }
.hb { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: 1.2em; padding: 1.2vh 1.4vw; min-height: 0; display: flex; flex-direction: column; }
.hb.main { border-color: rgba(220, 38, 38, .35); }
.hb-title { display: flex; align-items: center; gap: .6em; margin-bottom: .2vh; }
.hb-title b { font-family: var(--font-display); font-weight: 400; font-size: 1.6em; letter-spacing: .03em; text-transform: uppercase; line-height: 1; }
.hb-title span { margin-left: auto; font-size: .8em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .45); }
.hb-title .ic { width: 1.4em; height: 1.4em; color: var(--brand); }
.hb-grid { display: grid; grid-template-columns: minmax(0, 1fr) 2.2em minmax(0, 1fr); grid-template-rows: auto auto; row-gap: .5vh; align-content: center; flex: 1; }
.hb-lab { font-size: .7em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(255, 255, 255, .45); margin-bottom: .2vh; }
.hb-r1 { display: grid; grid-template-rows: auto auto; gap: 1.2vh; }
.hb-r2 > .hb-card { align-self: stretch; }
.hb-r2 { display: flex; flex-direction: column; justify-content: center; }
.hb-conn { position: relative; }
.hb-conn::before { content: ""; position: absolute; left: 0; width: 50%; top: calc(25% - .4vh); bottom: calc(25% - .4vh); border: 2px solid rgba(255, 255, 255, .25); border-left: 0; border-radius: 0 .6em .6em 0; }
.hb-conn::after { content: ""; position: absolute; left: 50%; right: 0; top: 50%; border-top: 2px solid rgba(255, 255, 255, .25); }
.hb-extra { margin-top: .6vh; }
.hb-card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: .7em; overflow: hidden; }
.hb-card.live, .hb-card.next { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(220, 38, 38, .35); background: rgba(220, 38, 38, .12); }
.hb-card.fin { border-color: rgba(220, 38, 38, .6); }
.hb-h { display: flex; justify-content: space-between; align-items: center; padding: .25em .8em; font-size: .72em; font-weight: 700; color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .05); }
.hb-tag { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.hb-tag.live { color: #fff; background: var(--brand); padding: .1em .5em; border-radius: .3em; }
.hb-tag.next { color: #f87171; }
.hb-tag.done { color: #86efac; }
.hb-r { display: flex; align-items: center; gap: .6em; padding: .18em .8em; border-top: 1px solid rgba(255, 255, 255, .07); }
.hb-r b { flex: 1; min-width: 0; font-size: 1.02em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-r b i { font-style: normal; font-weight: 500; color: rgba(255, 255, 255, .4); font-size: .85em; }
.hb-r em { font-style: normal; font-family: var(--font-display); font-size: 1.3em; line-height: 1; min-width: 1.4em; text-align: right; color: rgba(255, 255, 255, .85); }
.hb-r.w b, .hb-r.w em { color: #fff; }
.hb-r.w b::after { content: " ✓"; color: #86efac; }
.hb-r.l b, .hb-r.l em { color: rgba(255, 255, 255, .4); }
.hb-card.live .hb-r em { color: #f87171; }

/* HALLE · Turnierende: Podest + komplette Endrangliste */
.bm-final { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3vw; min-height: 0; }
.bmf-left { display: flex; flex-direction: column; min-height: 0; }
.bmf-title { display: grid; justify-items: center; gap: .4vh; text-align: center; }
.bmf-title .ic { width: 3.4em; height: 3.4em; color: var(--brand); stroke-width: 1.4; }
.bmf-title span { font-size: .85em; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }
.bmf-title b { font-family: var(--font-display); font-weight: 400; font-size: 4.2em; line-height: 1; letter-spacing: .02em; text-transform: uppercase; }
.bmf-podium { flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 1vw; margin-top: 2vh; min-height: 0; }
.bmf-pod { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.bmf-pod b { font-size: 1.25em; font-weight: 800; margin: .8vh 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmf-medal { width: 2.6em; height: 2.6em; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 1.3em; color: #fff; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .2); }
.p1 .bmf-medal { background: linear-gradient(145deg, #ffe08a, #d4a017 60%, #b58500); width: 3.2em; height: 3.2em; }
.p2 .bmf-medal { background: linear-gradient(145deg, #eef1f5, #a7b0bd 60%, #858f9c); }
.p3 .bmf-medal { background: linear-gradient(145deg, #f2c49b, #b8763e 60%, #94592a); }
.bmf-block { width: 100%; border-radius: .8em .8em 0 0; display: grid; place-items: start center; padding-top: 1vh; font-family: var(--font-display); font-size: 3em; color: rgba(255, 255, 255, .9); }
.p1 .bmf-block { height: 26vh; background: linear-gradient(180deg, var(--brand), var(--brand-800)); }
.p2 .bmf-block { height: 19vh; background: linear-gradient(180deg, #4b5563, #1f2937); }
.p3 .bmf-block { height: 14vh; background: linear-gradient(180deg, #374151, #111827); }
.bmf-table { align-self: center; }
.bmf-tbl td { padding: 1.15vh .6em; font-size: 1.15em; }
.bmf-tbl td.n { width: 50%; }
.bmf-tbl td.k span { display: inline-grid; place-items: center; width: 1.8em; height: 1.8em; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 800; font-size: .9em; }
.bmf-tbl tr.r1 td.k span { background: linear-gradient(145deg, #ffe08a, #d4a017); color: #4a3300; }
.bmf-tbl tr.r2 td.k span { background: linear-gradient(145deg, #eef1f5, #a7b0bd); color: #1f2937; }
.bmf-tbl tr.r3 td.k span { background: linear-gradient(145deg, #f2c49b, #b8763e); color: #3f2510; }
.bmf-tbl tr.r1 td.n { font-family: var(--font-display); font-weight: 400; font-size: 1.7em; letter-spacing: .02em; text-transform: uppercase; }

/* Live score from the referee's digital sheet */
.sc.livev { color: var(--brand); }
input.sc.livev::placeholder { color: var(--brand); opacity: .55; font-weight: 800; }
.sc.ro.livev { animation: pulse 2s infinite; }
.pill-live { color: #fff; background: var(--brand); padding: 3px 8px; border-radius: 6px; }
.kc-meta .pill-live { font-size: 10.5px; }
.nc-live { font-family: var(--font-display); font-size: 40px; line-height: 1; color: #fff; display: flex; gap: 6px; }
.nc-live i { font-style: normal; color: var(--brand); }
.bm-li .s.live { color: #f87171; }
.bm-livescore { font-family: var(--font-display); font-size: 4.4em; line-height: 1; display: flex; gap: .15em; color: #fff; }
.bm-livescore i { font-style: normal; color: var(--brand); }
.bm-live-hint { font-size: .85em; letter-spacing: .06em; color: rgba(255, 255, 255, .5); text-transform: none; font-weight: 600; }

/* Admin: "Bogen" button + score-sheet dialog */
.sheet-btn { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12px; font-weight: 700; color: var(--ink-2); flex: none; }
.sheet-btn:hover { border-color: var(--brand); color: var(--brand); }
.sheet-btn .ic { width: 14px; height: 14px; }
dialog.mdlg { width: min(860px, calc(100vw - 20px)); max-height: calc(100vh - 20px); }
.mdlg #mdlg-body { padding: 20px 22px 22px; }
.md-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.md-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 30px; letter-spacing: .02em; text-transform: uppercase; line-height: 1; margin-top: 4px; }
.md-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; background: var(--dark-900); color: #fff; }
.md-team small { display: block; font-size: 11px; color: rgba(255, 255, 255, .5); font-weight: 700; }
.md-team b { font-size: 17px; overflow-wrap: anywhere; }
.md-team.r { text-align: right; }
.md-num { font-family: var(--font-display); font-size: 46px; line-height: 1; display: flex; gap: 6px; }
.md-num i { font-style: normal; color: var(--brand); }
.md-status { display: flex; align-items: center; gap: 10px; margin: 10px 2px; font-size: 13px; color: var(--ink-2); }
.md-grid { max-height: 190px; overflow: auto; border: 1.5px solid #111; margin-bottom: 14px; font-family: Arial, Helvetica, sans-serif; }
.md-grid .sg-block { grid-template-rows: 28px 28px; }
.md-grid .sg-c { font-size: 13px; }
.md-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.md-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface-2); }
.md-lab { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; margin-bottom: 10px; }
.md-lab .ic { width: 16px; height: 16px; color: var(--brand); }
.md-qr { display: grid; place-items: center; min-height: 180px; background: #fff; border-radius: 10px; border: 1px solid var(--line); padding: 8px; }
.md-qr svg { width: 180px; height: 180px; }
.md-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.md-final { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 8px; }
.md-final label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); min-width: 0; }
.md-final label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md-final .input { height: 52px; text-align: center; font-size: 24px; font-weight: 800; }
.md-final > b { font-size: 24px; padding-bottom: 10px; }
.md-note { font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.md-list { display: grid; gap: 8px; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); }
.muted { color: var(--ink-3); font-size: 13px; }
@media screen and (max-width: 700px) {
    .md-cols { grid-template-columns: 1fr; }
    .mdlg #mdlg-body { padding: 16px; }
    .sheet-btn span { display: none; }
}

/* Print: referee QR cards + score sheets */
@media print {
    body.print-refqr, body.print-reports { page: overview; }
    body.print-refqr .pp, body.print-reports .pp { height: auto; overflow: visible; }
    .rq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin: 4mm 0; }
    .rq-card { border: .5mm solid #111; border-radius: 3mm; padding: 4mm; height: 75mm; display: grid; grid-template-columns: 1fr 38mm; grid-template-rows: auto 1fr auto auto; column-gap: 4mm; break-inside: avoid; }
    .rq-top { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 3mm; border-bottom: .3mm solid #111; padding-bottom: 2mm; margin-bottom: 2mm; }
    .rq-top b { font-family: var(--font-display); font-weight: 400; font-size: 22pt; line-height: 1; color: #dc2626; }
    .rq-top span { font-size: 9pt; color: #374151; }
    .rq-teams { font-size: 11pt; font-weight: 700; display: grid; grid-template-columns: 6mm 1fr; row-gap: 2mm; align-content: start; }
    .rq-teams span { display: inline-grid; place-items: center; width: 5mm; height: 5mm; border: .3mm solid #111; border-radius: 50%; font-size: 8pt; }
    .rq-qr { grid-row: 2 / 5; grid-column: 2; align-self: center; }
    .rq-qr svg { width: 38mm; height: 38mm; display: block; }
    .rq-ref { font-size: 9pt; color: #374151; }
    .rq-hint { font-size: 7.5pt; color: #6b7280; margin-top: 1mm; }
    .rqp { break-after: page; }
    .sr { border: .4mm solid #111; margin-bottom: 5mm; break-inside: avoid; font-family: Arial, Helvetica, sans-serif; }
    .sr-head { display: flex; align-items: baseline; gap: 3mm; padding: 2mm 3mm; border-bottom: .4mm solid #111; font-size: 9pt; }
    .sr-head b { font-size: 12pt; }
    .sr-head em { margin-left: auto; font-style: normal; font-weight: 700; }
    .sr-teams { display: grid; grid-template-columns: 1fr 1fr; border-bottom: .4mm solid #111; font-size: 10pt; font-weight: 700; }
    .sr-teams span { padding: 1.5mm 3mm; } .sr-teams span + span { border-left: .4mm solid #111; }
    .sr-teams i { font-style: normal; color: #6b7280; margin-right: 2mm; }
    .sr .sg-block { grid-template-rows: 6mm 6mm; }
    .sr .sg-c { font-size: 8.5pt; }
    .sr .sg-c.last, .sr .sg-c.cur { background: none; box-shadow: none; color: #111; }
    .sr-none { padding: 3mm; font-size: 9pt; color: #6b7280; }
}

/* =========================================================
   DIGITALER SPIELBERICHTSBOGEN (Schiri)
   Optisch an das Papierformular angelehnt: schwarze Linien,
   Formularkopf, A/B-Zeilen mit einer Spalte pro Punkt.
   ========================================================= */
.rf-page {
    background: #e9eaee; color: #111; font-family: Arial, Helvetica, sans-serif;
    padding: 12px 12px calc(190px + env(safe-area-inset-bottom));
    touch-action: manipulation; -webkit-user-select: none; user-select: none;
}
.rf-wrap { max-width: 1000px; margin: 0 auto; }
.rf-msg { margin-top: 30vh; text-align: center; color: #555; font-size: 16px; }
.rf-error { display: grid; gap: 8px; max-width: 420px; margin: 25vh auto 0; padding: 24px; background: #fff; border: 2px solid #b91c1c; }
.rf-error b { font-size: 19px; color: #b91c1c; }

.rf-paper { background: #fff; border: 1.5px solid #111; box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .35); }
.rf-paper > * + * { border-top: 1.5px solid #111; }

.rf-head { display: grid; grid-template-columns: 64px 1fr 1fr; }
.rf-logo { grid-row: span 3; display: grid; place-items: center; border-right: 1px solid #111; padding: 6px; }
.rf-logo img { width: 100%; max-width: 52px; }
.rf-title { grid-column: 2 / 4; display: flex; flex-direction: column; justify-content: center; padding: 6px 10px; border-bottom: 1px solid #111; }
.rf-title b { font-size: 18px; letter-spacing: .01em; }
.rf-title span { font-size: 11px; color: #b91c1c; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.rf-kv { display: flex; align-items: baseline; gap: 6px; padding: 5px 10px; font-size: 13px; min-width: 0; border-bottom: 1px solid #d0d0d0; }
.rf-head .rf-kv:nth-of-type(odd) { border-right: 1px solid #d0d0d0; }
.rf-kv span { font-weight: 700; white-space: nowrap; }
.rf-kv b { font-weight: 400; overflow-wrap: break-word; min-width: 0; }
.rf-head .rf-wide { grid-column: 1 / 4; border-right: 0 !important; border-bottom: 0; }

.rf-teams { display: grid; grid-template-columns: 1fr 1fr; }
.rf-team { padding: 6px 10px 9px; text-align: center; }
.rf-team + .rf-team { border-left: 1.5px solid #111; }
.rf-team span { display: block; font-size: 12px; font-weight: 700; border-bottom: 1px solid #d0d0d0; padding-bottom: 3px; margin-bottom: 5px; }
.rf-team b { font-size: 19px; line-height: 1.15; overflow-wrap: anywhere; }

.rf-sheet { display: grid; grid-template-columns: 34px 1fr; }
.rf-sheet-lab { display: grid; place-items: center; writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 700; font-size: 13px; border-left: 1px solid #111; background: #f3f3f3; }
.rf-grid { position: relative; max-height: 46vh; overflow-y: auto; overscroll-behavior: contain; }
.sg-block { display: grid; grid-template-columns: 26px repeat(var(--cols), minmax(0, 1fr)); grid-template-rows: 34px 34px; border-bottom: 1px solid #111; }
.sg-block:last-child { border-bottom: 0; }
.sg-lab { display: grid; place-items: center; font-weight: 700; font-size: 13px; border-right: 1px solid #111; background: #f3f3f3; }
.sg-lab:nth-of-type(1) { border-bottom: 1px solid #9a9a9a; }
.sg-c { display: grid; place-items: center; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; border-right: 1px dashed #b5b5b5; }
.sg-c.ra { border-bottom: 1px solid #9a9a9a; }
.sg-c.end { border-right: 0; }
.sg-c.on { color: #111; }
.sg-c.last { background: #fde2e2; color: #b91c1c; box-shadow: inset 0 0 0 2px #dc2626; }
.sg-c.cur { background: repeating-linear-gradient(135deg, #f6f6f6 0 4px, #fff 4px 8px); }

.rf-result { display: grid; grid-template-columns: 124px 1fr auto; align-items: center; gap: 10px; padding: 6px 10px 6px 0; }
.rf-result .rf-kv { border: 0; font-size: 14px; white-space: nowrap; background: #f3f3f3; align-self: stretch; align-items: center; border-right: 1px solid #111; }
.rf-score { display: flex; align-items: baseline; justify-content: center; gap: 10px; font-size: 38px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rf-score i { font-style: normal; color: #888; }
.rf-st { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 4px 6px; border: 1px solid #999; color: #555; text-align: center; max-width: 92px; line-height: 1.2; }
.rf-st.live { border-color: #dc2626; color: #fff; background: #dc2626; }
.rf-st.done { border-color: #166534; color: #166534; }

.rf-sync { margin: 8px 2px 0; font-size: 12.5px; color: #555; }
.rf-sync.ok { color: #166534; }
.rf-sync.wait { color: #92400e; font-weight: 700; }
.rf-done { margin-top: 10px; padding: 12px 14px; background: #ecfdf3; border: 1.5px solid #166534; font-size: 15px; }

/* Controls: only "+1 A", "+1 B", "Korrektur", "Spiel beenden" */
.rf-controls {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1.5px solid #111; box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, .4);
}
.rf-plus-row, .rf-sub-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 1000px; margin: 0 auto; }
.rf-sub-row { margin-top: 8px; }
.rf-plus {
    display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 12px;
    height: 104px; padding: 0 16px; text-align: left;
    background: #111827; color: #fff; border: 0; border-radius: 10px; font-family: inherit;
    transition: transform .06s;
}
.rf-plus:active { transform: scale(.97); background: #dc2626; }
.rf-plus-l { grid-row: span 2; display: grid; place-items: center; width: 52px; height: 52px; border: 2px solid #fff; border-radius: 50%; font-size: 24px; font-weight: 700; }
.rf-plus b { font-size: 34px; line-height: 1; }
.rf-plus-n { font-size: 14px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-undo, .rf-end { height: 46px; border-radius: 10px; font: 700 15px Arial, Helvetica, sans-serif; }
.rf-undo { background: #fff; color: #111; border: 1.5px solid #111; }
.rf-undo:disabled { opacity: .35; }
.rf-end { background: #fff; color: #b91c1c; border: 1.5px solid #b91c1c; }

.rf-qr-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border: 1.5px solid #111; border-radius: 8px; background: #fff; font: 700 14px Arial, Helvetica, sans-serif; color: #111; }
.rf-qr-btn .ic { width: 18px; height: 18px; }
.rf-qr { display: grid; place-items: center; margin: 4px 0 12px; }
.rf-qr svg { width: min(300px, 70vw); height: auto; border: 1.5px solid #111; }
.rf-next { display: block; width: 100%; max-width: 1000px; margin: 0 auto; height: 72px; border: 0; border-radius: 10px; background: #dc2626; color: #fff; font: 700 20px Arial, Helvetica, sans-serif; }
.rf-page.rf-no-controls { padding-bottom: 24px; }
.rf-start { display: grid; justify-items: center; gap: 10px; padding: 26px 16px 22px; text-align: center; }
.rf-start-lab { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #b91c1c; }
.rf-start > b { font-size: 20px; }
.rf-start p { font-size: 14px; color: #444; }
.rf-start-teams { display: grid; grid-template-columns: 26px auto; align-items: center; gap: 8px 10px; font-size: 22px; font-weight: 700; text-align: left; }
.rf-start-teams span { display: grid; place-items: center; width: 26px; height: 26px; border: 1.5px solid #111; border-radius: 50%; font-size: 13px; }
.rf-start-btn { width: min(420px, 100%); height: 72px; margin-top: 6px; border: 0; border-radius: 10px; background: #111827; color: #fff; font: 700 21px Arial, Helvetica, sans-serif; }
.rf-start-other { background: none; border: 0; color: #555; font: 600 14px Arial, Helvetica, sans-serif; text-decoration: underline; padding: 6px; }
.rf-open { display: grid; gap: 8px; width: min(520px, 100%); }
.rf-open button { display: grid; gap: 2px; text-align: left; padding: 10px 14px; border: 1.5px solid #111; border-radius: 10px; background: #fff; font-family: Arial, Helvetica, sans-serif; }
.rf-open button b { font-size: 15px; }
.rf-open button span { font-size: 13px; color: #444; }
.rf-next-card { display: grid; gap: 3px; margin: 10px 0 4px; padding: 12px; border: 1.5px solid #111; }
.rf-next-card span { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #b91c1c; }
.rf-next-card b { font-size: 17px; }
.rf-next-card em { font-style: normal; font-size: 15px; }
.rf-dlg { margin: auto; width: min(440px, calc(100vw - 24px)); border: 1.5px solid #111; border-radius: 12px; padding: 0; font-family: Arial, Helvetica, sans-serif; }
.rf-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.rf-dlg form { padding: 20px; }
.rf-dlg h3 { font-size: 19px; margin-bottom: 10px; }
.rf-dlg p { font-size: 15px; color: #333; margin-bottom: 8px; }
.rf-dlg-score { font-size: 17px !important; }
.rf-dlg-warn { color: #b91c1c !important; font-weight: 700; }
.rf-final { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; margin: 12px 0; }
.rf-final label { display: grid; gap: 4px; font-size: 12px; font-weight: 700; min-width: 0; }
.rf-final label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-final input { height: 56px; width: 100%; text-align: center; font: 700 28px Arial, Helvetica, sans-serif; border: 1.5px solid #111; border-radius: 8px; }
.rf-final > b { font-size: 26px; padding-bottom: 12px; }
.rf-dlg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.rf-dlg-actions.single { grid-template-columns: 1fr; }
.rf-confirm { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; margin: 6px 0 14px; padding: 12px; border: 1.5px solid #111; }
.rf-confirm > div:not(.rf-confirm-score) { display: grid; gap: 2px; text-align: center; min-width: 0; }
.rf-confirm span { font-size: 11px; font-weight: 700; color: #555; }
.rf-confirm b { font-size: 15px; overflow-wrap: break-word; }
.rf-confirm-score { font-size: 40px; font-weight: 700; font-variant-numeric: tabular-nums; display: flex; gap: 6px; }
.rf-confirm-score i { font-style: normal; color: #888; }
.rf-btn { height: 48px; border-radius: 10px; border: 1.5px solid #111; background: #fff; font: 700 15px Arial, Helvetica, sans-serif; }
.rf-btn-main { background: #dc2626; border-color: #dc2626; color: #fff; }

@media (min-width: 700px) {
    .rf-head { grid-template-columns: 76px 1fr 1fr; }
    .rf-title b { font-size: 22px; }
    .rf-kv { font-size: 14px; }
    .rf-team b { font-size: 24px; }
    .rf-plus { height: 120px; }
    .rf-plus b { font-size: 40px; }
    .rf-plus-n { font-size: 16px; }
    .rf-page { padding-bottom: calc(210px + env(safe-area-inset-bottom)); }
    .rf-grid { max-height: 52vh; }
    .sg-block { grid-template-rows: 40px 40px; }
}
