:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #667085;
    --border: #d0d5dd;
    --primary: #ffd800;
    --primary-dark: #e4bf00;
    --primary-text: #111827;
    --black: #050505;
    --success-bg: #e8f7ef;
    --success: #087443;
    --danger-bg: #fff0f0;
    --danger: #b42318;
    --warning-bg: #fff8e6;
    --warning: #946200;
    --info-bg: #eef6ff;
    --info: #175cd3;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.45; }
a { color: #775f00; text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 24px; background: var(--black); border-bottom: 4px solid var(--primary); position: sticky; top: 0; z-index: 20; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
.brand a { display: inline-flex; align-items: center; gap: 12px; font-weight: 900; font-size: 19px; color: #fff; white-space: nowrap; letter-spacing: .01em; }
.brand a:hover { text-decoration: none; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
nav a { color: #fff; font-weight: 800; font-size: 14px; padding: 8px 10px; border-radius: 999px; }
nav a:hover { background: rgba(255,216,0,.16); color: #fff; text-decoration: none; }
.container { max-width: 1180px; margin: 30px auto; padding: 0 18px; }
h1 { margin: 0 0 20px; font-size: 30px; }
h2 { margin-top: 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: 0 6px 20px rgba(16, 24, 40, 0.04); margin-bottom: 18px; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.kpi { font-size: 34px; font-weight: 900; }
.muted { color: var(--muted); }
.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 18px; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-danger { background: var(--danger-bg); color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-info { background: var(--info-bg); color: var(--info); }

/* v19: Deutlich sichtbare Systemhinweise, auch wenn die Seite zu Formularen springt */
.flash-stack {
    position: fixed;
    top: 84px;
    left: 50%;
    transform: translateX(-50%);
    width: min(960px, calc(100% - 28px));
    z-index: 9999;
    pointer-events: none;
}
.flash-stack .alert {
    margin: 0 0 10px;
    border: 1px solid rgba(15, 23, 42, .10);
    box-shadow: 0 18px 40px rgba(0,0,0,.22);
    font-weight: 900;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.flash-stack .alert::before {
    content: 'ℹ';
    display: inline-grid;
    place-items: center;
    width: 22px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    font-weight: 950;
}
.flash-stack .alert-success::before { content: '✓'; }
.flash-stack .alert-danger::before { content: '!'; }
.flash-stack .alert-warning::before { content: '⚠'; }
@media (max-width: 760px) {
    .flash-stack {
        top: 72px;
        width: calc(100% - 18px);
    }
    .flash-stack .alert {
        font-size: 14px;
        line-height: 1.35;
    }
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 14px; }
label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
small { display: block; margin-top: 5px; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); font: inherit; }
textarea { min-height: 92px; resize: vertical; }
input[type="checkbox"] { width: auto; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: var(--primary); color: var(--primary-text); padding: 10px 14px; border-radius: 10px; font-weight: 900; cursor: pointer; font: inherit; box-shadow: 0 2px 0 rgba(0,0,0,.16); }
button:hover, .btn:hover { background: var(--primary-dark); color: var(--primary-text); text-decoration: none; }
button:disabled, .btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-secondary { background: #1d2939; color: #fff; }
.btn-secondary:hover { background: #111827; color: #fff; }
.btn-light { background: #f4f4f5; color: #1d2939; border: 1px solid #e4e7ec; }
.btn-light:hover { background: #eaecf0; color: #1d2939; }
.btn-danger { background: #d92d20; color: #fff; }
.btn-danger:hover { background: #b42318; color: #fff; }
.btn-small { padding: 8px 10px; font-size: 13px; border-radius: 8px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 999px; background: #f4f4f5; color: #1d2939; font-weight: 900; box-shadow: none; border: 1px solid #e4e7ec; }
.btn-icon:hover { background: #ffe45c; color: #111827; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.table-actions { min-width: 260px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 10px; border-bottom: 1px solid #eaecf0; text-align: left; vertical-align: middle; }
th { font-size: 13px; background: #f8fafc; color: #475467; text-transform: uppercase; letter-spacing: .03em; }
.numeric { text-align: right; }
.small-input { max-width: 120px; }
.status { display: inline-flex; padding: 3px 8px; border-radius: 999px; background: #fff3a5; font-size: 12px; font-weight: 800; color: #3d3200; }
.login-box { max-width: 480px; margin: 42px auto; }
.login-logo { display: block; width: 122px; height: 122px; object-fit: contain; margin: 0 auto 14px; }
.login-title { text-align: center; margin-bottom: 18px; }
.footer { text-align: center; padding: 30px; color: var(--muted); font-size: 13px; }
.print-toolbar { margin-bottom: 18px; }
.sort-controls { display: flex; gap: 6px; min-width: 86px; }
.sort-controls form, .table-actions form { margin: 0; }
.portal-hero { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; background: linear-gradient(135deg, #050505 0%, #1f1f1f 58%, #373000 100%); color: #fff; border: 0; overflow: hidden; }
.portal-hero-logo { width: 118px; height: 118px; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0,0,0,.4)); }
.portal-hero h2 { margin: 0 0 6px; font-size: 28px; }
.portal-hero p { margin: 0; color: #f5f5f5; }
.module-card { position: relative; overflow: hidden; }
.module-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--primary); }
.module-card h3 { margin: 0 0 8px; font-size: 20px; }
.module-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #fff3a5; color: #443800; font-size: 12px; font-weight: 900; margin-bottom: 10px; }
.module-badge-muted { background: #f2f4f7; color: #667085; }

@media (max-width: 760px) {
    body { background: #fff; }
    .topbar { align-items: stretch; flex-direction: column; gap: 10px; padding: 10px 14px; }
    .brand a { font-size: 17px; }
    .brand-logo { width: 40px; height: 40px; }
    nav { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; margin: 0 -2px; }
    nav a { flex: 0 0 auto; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
    h1 { font-size: 24px; margin-bottom: 14px; }
    h2 { font-size: 19px; }
    .container { margin: 16px auto; padding: 0 12px; }
    .card { border-radius: 12px; padding: 15px; margin-bottom: 14px; box-shadow: none; }
    .grid { gap: 12px; grid-template-columns: 1fr; }
    .kpi { font-size: 30px; }
    .form-row { grid-template-columns: 1fr; gap: 12px; }
    .actions { align-items: stretch; flex-direction: column; }
    .actions > .btn, .actions > button, .actions > form, .actions > form button { width: 100%; }
    .portal-hero { grid-template-columns: 1fr; text-align: center; gap: 12px; }
    .portal-hero-logo { width: 102px; height: 102px; margin: 0 auto; }
    .portal-hero h2 { font-size: 23px; }

    .table-wrap { overflow: visible; }
    .table-wrap table { background: transparent; }
    .table-wrap thead { display: none; }
    .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
    .table-wrap tr { background: #fff; border: 1px solid var(--border); border-radius: 13px; padding: 10px 12px; margin-bottom: 12px; box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06); }
    .table-wrap td { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #f2f4f7; padding: 9px 0; text-align: right; }
    .table-wrap td:last-child { border-bottom: 0; }
    .table-wrap td::before { content: attr(data-label); color: var(--muted); font-weight: 800; text-align: left; flex: 1 1 auto; padding-right: 10px; }
    .table-wrap td[data-label="Artikel"] { align-items: flex-start; font-size: 16px; }
    .table-wrap td[data-label="Artikel"] strong { font-size: 16px; }
    .table-wrap td.numeric { text-align: right; }
    .table-wrap .small-input { max-width: none; width: 130px; text-align: right; }
    .table-wrap td.table-actions, .table-wrap td.actions { align-items: stretch; justify-content: flex-start; text-align: left; flex-direction: column; }
    .table-wrap td.table-actions::before, .table-wrap td.actions::before { margin-bottom: 4px; }
    .table-actions { min-width: 0; }
    .table-actions > .btn, .table-actions > form, .table-actions > form button { width: 100%; }
    .sort-controls { justify-content: flex-end; min-width: 0; }
    .sort-controls::before { margin-right: auto; }
    .footer { padding: 20px; }
}

@media print {
    .topbar, .footer, .print-toolbar, nav { display: none !important; }
    body { background: #fff; }
    .container { max-width: none; margin: 0; padding: 0; }
    .card { border: 0; box-shadow: none; }
}
.module-permissions { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.module-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fff; font-weight: 400; margin: 0; }
.module-check input { margin-top: 4px; flex: 0 0 auto; }
.module-check strong { display: block; font-weight: 900; margin-bottom: 3px; }
.module-check small { color: var(--muted); margin: 0; }
.landing-hero .landing-actions { margin-top: 14px; }
@media (max-width: 760px) {
    .module-permissions { grid-template-columns: 1fr; }
}

/* WM-Tippspiel */
.wm-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 22px; align-items: center; overflow: hidden; background: radial-gradient(circle at 15% 10%, rgba(255,216,0,.34), transparent 35%), linear-gradient(135deg, #050505 0%, #151515 52%, #6c5a00 100%); color: #fff; border: 0; }
.wm-hero::after { content: ""; position: absolute; width: 360px; height: 360px; right: -135px; bottom: -170px; border-radius: 50%; border: 34px solid rgba(255,216,0,.18); }
.wm-hero-content, .wm-hero-scoreboard { position: relative; z-index: 1; }
.wm-kicker { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(255,216,0,.16); color: #fff6a8; font-weight: 900; margin-bottom: 12px; }
.wm-hero h2 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 52px); line-height: 1.02; }
.wm-hero p { color: #fff; font-size: 17px; max-width: 780px; }
.wm-hero-scoreboard { border: 1px solid rgba(255,255,255,.22); background: rgba(0,0,0,.25); border-radius: 22px; padding: 18px; text-align: center; box-shadow: inset 0 0 34px rgba(255,216,0,.08); }
.wm-hero-scoreboard strong, .wm-hero-scoreboard span { display: block; }
.wm-hero-scoreboard strong { font-size: 22px; margin-top: 8px; }
.wm-ball { width: 108px; height: 108px; margin: 0 auto; display: grid; place-items: center; background: #ffd800; color: #050505; border-radius: 50%; font-size: 52px; box-shadow: 0 14px 28px rgba(0,0,0,.28); }
.wm-kpis .card { border-left: 6px solid var(--primary); }
.wm-main-grid { grid-template-columns: minmax(0, 1fr) 350px; align-items: start; }
.wm-side { display: grid; gap: 18px; }
.wm-playerbar { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.wm-day { position: sticky; top: 82px; z-index: 3; background: #fff8d0; color: #3d3200; padding: 9px 12px; border-radius: 12px; border: 1px solid #ffe45c; margin: 18px 0 12px; }
.wm-match-list { display: grid; gap: 12px; }
.wm-match-card { border: 1px solid #e4e7ec; border-radius: 16px; padding: 14px; background: linear-gradient(180deg, #fff 0%, #fffdf0 100%); box-shadow: 0 6px 18px rgba(16,24,40,.05); }
.wm-match-card.is-locked { background: #f8fafc; }
.wm-match-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.wm-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; font-size: 18px; }
.wm-teams .wm-vs { background: #111827; color: #fff; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; font-size: 12px; font-weight: 900; text-transform: uppercase; }
.wm-teams strong:last-child { text-align: right; }
.wm-tip-row { display: grid; grid-template-columns: minmax(180px, 1fr) 105px 90px; gap: 12px; align-items: end; margin-top: 14px; }
.wm-score-fields { display: inline-flex; align-items: center; gap: 7px; }
.wm-score-input { width: 58px; text-align: center; font-weight: 900; font-size: 18px; padding: 10px 6px; }
.wm-result-box, .wm-points-box { border: 1px solid #e4e7ec; border-radius: 12px; padding: 8px 10px; background: #fff; text-align: center; }
.wm-result-box span, .wm-points-box span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.wm-result-box strong, .wm-points-box strong { font-size: 18px; }
.wm-points-box strong { color: #946200; }
.wm-lock { margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: #f2f4f7; color: #475467; font-size: 13px; font-weight: 800; }
.wm-lock.is-open { background: #e8f7ef; color: #087443; }
.sticky-save { position: sticky; bottom: 12px; display: flex; justify-content: flex-end; padding-top: 12px; }
.sticky-save button { box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.wm-podium { display: grid; gap: 10px; }
.wm-podium-place { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid #e4e7ec; background: #fff; }
.wm-podium-place span { font-size: 28px; }
.wm-podium-place strong { overflow-wrap: anywhere; }
.wm-podium-place em { font-style: normal; font-weight: 900; color: #946200; }
.wm-podium-place.place-1 { background: linear-gradient(90deg, #fff3a5 0%, #fff 100%); border-color: #ffe45c; }
.wm-mini-match { padding: 10px 0; border-bottom: 1px solid #eaecf0; }
.wm-mini-match:last-child { border-bottom: 0; }
.wm-mini-match > strong, .wm-mini-match > span { display: block; }
.wm-mini-match > span { color: var(--muted); font-size: 13px; margin-top: 3px; }
.wm-rules-text { white-space: normal; }
.wm-table tr.is-me { background: #fff8d0; }
.wm-admin-table input { min-width: 86px; }
.wm-admin-table .wm-score-input { min-width: 54px; }

@media (max-width: 960px) {
    .wm-hero { grid-template-columns: 1fr; }
    .wm-main-grid { grid-template-columns: 1fr; }
    .wm-side { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
    .wm-day { top: 105px; }
}

@media (max-width: 760px) {
    .wm-hero { text-align: center; }
    .wm-hero-actions { align-items: stretch; }
    .wm-hero-scoreboard { max-width: 280px; margin: 0 auto; }
    .wm-playerbar { flex-direction: column; }
    .wm-teams { grid-template-columns: 1fr; text-align: center; }
    .wm-teams strong:last-child { text-align: center; }
    .wm-teams .wm-vs { margin: 0 auto; }
    .wm-match-meta { flex-direction: column; text-align: center; }
    .wm-tip-row { grid-template-columns: 1fr; text-align: center; }
    .wm-score-fields { justify-content: center; }
    .wm-score-input { width: 74px; }
    .sticky-save { position: static; }
    .wm-day { position: static; }
    .wm-podium-place { grid-template-columns: 36px 1fr; }
    .wm-podium-place em { grid-column: 2; }
}

/* WM v7: E-Mail-Registrierung, K.-o.-Hinweise */
.wm-notice { border-left: 6px solid var(--primary); background: linear-gradient(90deg, #fff8d0 0%, #fff 100%); }
.wm-notice strong { color: #3d3200; }
.wm-match-card.is-placeholder { background: linear-gradient(180deg, #f8fafc 0%, #fff 100%); border-style: dashed; }
.wm-match-card.is-placeholder .wm-teams strong { color: #667085; }
.check { display: inline-flex; align-items: flex-start; gap: 8px; margin: 10px 0 14px; font-weight: 800; color: var(--text); }
.check input { margin-top: 3px; }

.soft-card {
    background: rgba(255,255,255,0.72);
    box-shadow: none;
    border: 1px solid rgba(18,18,18,0.08);
}

/* WM v11: Teilnehmerstatus */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.warn { background: #fff7d6; color: #7a5b00; }

/* WM v12: stärkeres WM-Design, Flaggen, Spielplan & Turnierbaum */
body.wm-page {
    /* WM v18: neutraler Fußball-/Stadionlook mit SV18-Branding statt Länderfarben */
    background:
        radial-gradient(circle at 16% -7%, rgba(255,255,255,.36) 0 2%, rgba(255,255,255,.16) 3%, transparent 23%),
        radial-gradient(circle at 84% -8%, rgba(255,255,255,.34) 0 2%, rgba(255,255,255,.14) 3%, transparent 24%),
        linear-gradient(116deg, rgba(4,8,16,.96) 0 34%, rgba(15,23,42,.94) 34% 72%, rgba(5,12,21,.98) 72% 100%),
        linear-gradient(180deg, #07111f 0%, #111827 48%, #06080d 100%);
    background-attachment: fixed;
}
body.wm-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        /* Flutlichtkegel */
        linear-gradient(104deg, transparent 0 14%, rgba(255,255,255,.13) 14% 15%, transparent 40%),
        linear-gradient(256deg, transparent 0 14%, rgba(255,255,255,.11) 14% 15%, transparent 41%),
        /* Tornetz-/Stadionraster */
        repeating-linear-gradient(90deg, rgba(255,255,255,.055) 0 1px, transparent 1px 74px),
        repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 58px),
        /* Spielfeld-Andeutung unten */
        radial-gradient(ellipse at 50% 105%, rgba(30,150,80,.42) 0 18%, rgba(30,150,80,.13) 36%, transparent 63%);
    opacity: 1;
}
body.wm-page::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 180px;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 65%, rgba(255,255,255,.22) 0 28px, transparent 30px),
        radial-gradient(circle at 82% 58%, rgba(255,255,255,.18) 0 20px, transparent 22px),
        linear-gradient(90deg, transparent 0 14%, rgba(255,255,255,.24) 14% 15%, transparent 15% 85%, rgba(255,255,255,.24) 85% 86%, transparent 86% 100%),
        linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.72) 78%);
    opacity: .38;
    clip-path: polygon(0 55%, 12% 48%, 25% 54%, 38% 46%, 50% 53%, 63% 45%, 76% 54%, 88% 47%, 100% 54%, 100% 100%, 0 100%);
}
body.wm-page .container { max-width: 1260px; }
body.wm-page h1 { color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
body.wm-page .card { border-color: rgba(255,255,255,.18); box-shadow: 0 16px 38px rgba(0,0,0,.25); }
.wm-page .topbar { background: linear-gradient(90deg, #050505 0%, #111827 62%, #ffd800 100%); border-bottom-color: rgba(255,255,255,.75); }
.wm-page .topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: linear-gradient(90deg, #ffd800 0 45%, rgba(255,255,255,.9) 45% 55%, #111827 55% 100%); }
.wm-page .footer { color: rgba(255,255,255,.78); }
.wm-hero {
    min-height: 320px;
    background:
        radial-gradient(circle at 80% 16%, rgba(255,255,255,.25), transparent 22%),
        radial-gradient(circle at 18% 12%, rgba(255,255,255,.18), transparent 18%),
        radial-gradient(ellipse at 52% 103%, rgba(30,150,80,.45) 0 24%, transparent 49%),
        linear-gradient(128deg, rgba(5,8,16,.98) 0 45%, rgba(22,32,52,.93) 45% 76%, rgba(7,10,18,.92) 76% 100%);
}
.wm-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 11% 14%, rgba(255,255,255,.33), transparent 8%),
        radial-gradient(circle at 31% 8%, rgba(255,255,255,.22), transparent 7%),
        radial-gradient(circle at 69% 8%, rgba(255,255,255,.22), transparent 7%),
        radial-gradient(circle at 91% 15%, rgba(255,255,255,.30), transparent 8%),
        /* Netzoptik */
        repeating-linear-gradient(90deg, rgba(255,255,255,.105) 0 2px, transparent 2px 92px),
        repeating-linear-gradient(0deg, rgba(255,255,255,.075) 0 2px, transparent 2px 70px),
        linear-gradient(0deg, rgba(0,0,0,.48) 0 18%, transparent 18% 100%);
    mix-blend-mode: screen;
    opacity: .56;
}
.wm-hero h2 { letter-spacing: -.04em; text-transform: uppercase; }
.wm-kicker { border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(8px); background: rgba(255,216,0,.14); color: #fff7bf; }
.wm-hero-scoreboard { backdrop-filter: blur(10px); }
.wm-hero::after {
    content: "⚽";
    position: absolute;
    right: 32px;
    bottom: 20px;
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.94);
    color: #111827;
    font-size: 46px;
    box-shadow: 0 18px 34px rgba(0,0,0,.34);
    transform: rotate(-10deg);
    opacity: .95;
}
.wm-match-card, .wm-schedule-card, .wm-group-card, .wm-bracket-match {
    position: relative;
    overflow: hidden;
}
.wm-match-card::before, .wm-schedule-card::before, .wm-group-card::before, .wm-bracket-match::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #ffd800 0 38%, #fff 38% 50%, #111827 50% 100%);
}
.wm-schedule-badge img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 9px 18px rgba(0,0,0,.36)); }
.wm-schedule-badge strong { font-size: 28px; text-transform: uppercase; }
.wm-flag { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: rgba(255,255,255,.86); box-shadow: 0 2px 8px rgba(0,0,0,.12); font-size: 20px; flex: 0 0 auto; }
.wm-team-name { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.wm-team-name.is-right { justify-content: flex-end; }
.wm-teams strong, .wm-teams .wm-team-name { font-weight: 950; }
.wm-teams .wm-team-name.is-right { text-align: right; }
.wm-mini-match .wm-team-name { gap: 5px; }
.wm-mini-match .wm-flag { width: 24px; height: 24px; font-size: 16px; }
.wm-mini-dash { color: var(--muted); margin: 0 4px; }
.wm-schedule-list { display: grid; gap: 10px; }
.wm-schedule-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 170px;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 18px;
    background: linear-gradient(90deg, #fff 0%, #fffdf1 100%);
    border: 1px solid #e4e7ec;
    box-shadow: 0 6px 18px rgba(16,24,40,.06);
}
.wm-schedule-card.status-finished { border-left: 7px solid #16a34a; }
.wm-schedule-card.status-open { border-left: 7px solid #ffce00; }
.wm-schedule-card.status-locked { border-left: 7px solid #64748b; }
.wm-schedule-card.status-waiting { border-left: 7px solid #9ca3af; border-style: dashed; }
.wm-schedule-time strong, .wm-schedule-time span { display: block; }
.wm-schedule-time strong { font-size: 22px; }
.wm-schedule-time span { color: var(--muted); font-size: 13px; font-weight: 800; }
.wm-schedule-teams { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); gap: 10px; align-items: center; font-size: 18px; font-weight: 950; }
.wm-schedule-vs { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: #111827; color: #fff; font-weight: 900; }
.wm-schedule-result { text-align: right; }
.wm-schedule-result strong { display: block; font-size: 24px; }
.wm-status-pill { display: inline-flex; margin-top: 6px; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.wm-status-pill.status-finished { background: #dcfce7; color: #166534; }
.wm-status-pill.status-open { background: #fff7d6; color: #7a5b00; }
.wm-status-pill.status-locked { background: #e5e7eb; color: #374151; }
.wm-status-pill.status-waiting { background: #f3f4f6; color: #6b7280; }
.wm-quicklinks { justify-content: center; }
.wm-group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.wm-group-card { border: 1px solid #e4e7ec; border-radius: 18px; padding: 16px; background: linear-gradient(180deg, #fff 0%, #fffaf0 100%); }
.wm-group-card h3 { margin-top: 0; color: #1f2937; }
.wm-group-match { display: grid; grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr); gap: 8px; align-items: center; padding: 9px 0; border-top: 1px solid #eef2f7; }
.wm-group-match strong { text-align: center; font-size: 18px; }
.wm-bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(245px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.wm-bracket-column { display: grid; gap: 10px; align-content: start; min-width: 245px; }
.wm-bracket-column h3 { position: sticky; left: 0; margin: 0; padding: 10px 12px; border-radius: 12px; background: #111827; color: #fff; font-size: 16px; }
.wm-bracket-match { position: relative; padding: 12px; border: 1px solid #e4e7ec; border-radius: 14px; background: #fff; }
.wm-bracket-match::after { content: ""; position: absolute; top: 50%; right: -17px; width: 17px; border-top: 2px dashed rgba(255,206,0,.8); }
.wm-bracket-column:last-child .wm-bracket-match::after { display: none; }
.wm-bracket-match > div { padding: 6px 0; font-weight: 900; }
.wm-bracket-match footer { border-top: 1px solid #eef2f7; margin-top: 6px; padding-top: 8px; display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.wm-bracket-match footer strong { color: #111827; font-size: 16px; }
.wm-detail-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 18px; }
.wm-detail-grid > div { padding: 12px; border: 1px solid #eef2f7; border-radius: 12px; background: #fff; }
.wm-detail-grid label { color: var(--muted); margin-bottom: 4px; }

@media (max-width: 900px) {
    .wm-schedule-card { grid-template-columns: 1fr; text-align: center; }
    .wm-schedule-result { text-align: center; }
}
@media (max-width: 760px) {
    body.wm-page .container { margin-top: 14px; }
    .wm-hero { min-height: auto; }
    .wm-schedule-teams { grid-template-columns: 1fr; text-align: center; }
    .wm-team-name, .wm-team-name.is-right { justify-content: center; text-align: center; }
    .wm-group-grid { grid-template-columns: 1fr; }
    .wm-group-match { grid-template-columns: 1fr; text-align: center; }
    .wm-bracket { grid-auto-flow: row; grid-template-columns: 1fr; overflow-x: visible; }
    .wm-bracket-match::after { display: none; }
}


/* WM v13: bessere Team-/Flaggen-Darstellung */
.wm-team-name {
    min-width: 0;
    color: #111827;
    line-height: 1.15;
    overflow-wrap: anywhere;
}
.wm-team-name > span:last-child {
    min-width: 0;
}
.wm-team-name.is-right {
    flex-direction: row;
}
.wm-team-name.is-right .wm-flag {
    order: 2;
}
.wm-flag {
    border: 1px solid rgba(17,24,39,.08);
    background: #ffffff;
}
.wm-teams .wm-team-name,
.wm-schedule-teams .wm-team-name,
.wm-group-match .wm-team-name,
.wm-bracket-match .wm-team-name {
    display: inline-flex;
}
.wm-match-card .wm-teams {
    grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
}
.wm-match-card .wm-teams .wm-team-name:first-child {
    justify-self: start;
}
.wm-match-card .wm-teams .wm-team-name.is-right {
    justify-self: end;
}
@media (max-width: 760px) {
    .wm-match-card .wm-teams {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .wm-match-card .wm-teams .wm-team-name,
    .wm-match-card .wm-teams .wm-team-name.is-right {
        justify-self: center;
        flex-direction: row;
    }
    .wm-match-card .wm-teams .wm-team-name.is-right .wm-flag {
        order: 0;
    }
}

/* WM v14: echte Flaggenbilder statt Emoji-Flaggen (Windows zeigt Emoji-Flaggen oft nur als Initialen an) */
.wm-flag {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 24px;
    border-radius: 7px;
    overflow: hidden;
    padding: 0;
    background: #fff;
    border: 1px solid rgba(17,24,39,.12);
    box-shadow: 0 2px 8px rgba(0,0,0,.14);
    flex: 0 0 34px;
    font-size: 16px;
}
.wm-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.wm-flag-fallback {
    border-radius: 999px;
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    font-size: 15px;
}
.wm-mini-match .wm-flag,
.wm-group-match .wm-flag,
.wm-bracket-match .wm-flag {
    width: 30px;
    height: 22px;
    flex-basis: 30px;
    border-radius: 6px;
}
.wm-mini-match .wm-flag-fallback,
.wm-group-match .wm-flag-fallback,
.wm-bracket-match .wm-flag-fallback {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
    border-radius: 999px;
}

/* WM-Admin Ergebnis-Autosave */
.wm-result-autosave { flex-wrap: wrap; max-width: 190px; }
.wm-autosave-status { display: block; width: 100%; margin-top: 4px; font-size: 11px; line-height: 1.2; color: var(--muted); font-weight: 900; text-align: center; }
.wm-autosave-status[data-state="pending"] { color: #946200; }
.wm-autosave-status[data-state="ok"] { color: #087443; }
.wm-autosave-status[data-state="warn"] { color: #a15c00; }
.wm-autosave-status[data-state="error"] { color: #b42318; }
.wm-result-autosave.is-saving .wm-score-input { opacity: .72; }
.wm-admin-help { align-self: center; font-size: 13px; }

@media (max-width: 760px) {
    .wm-result-autosave { max-width: none; justify-content: flex-start; }
    .wm-autosave-status { text-align: left; }
}

/* WM v16: robustes Auto-Speichern + mobile Zentrierung */
.wm-tip-autosave {
    flex-wrap: wrap;
    justify-content: center;
    max-width: 170px;
}
.wm-tip-autosave-status {
    display: block;
    width: 100%;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--muted);
    font-weight: 900;
    text-align: center;
}
.wm-tip-autosave-status[data-state="pending"] { color: #946200; }
.wm-tip-autosave-status[data-state="ok"] { color: #087443; }
.wm-tip-autosave-status[data-state="warn"] { color: #a15c00; }
.wm-tip-autosave-status[data-state="error"] { color: #b42318; }
.wm-tip-autosave.is-saving .wm-score-input { opacity: .72; }
.wm-tip-save-help { align-self: center; font-size: 12px; font-weight: 800; margin-left: 10px; }
.sticky-save { gap: 10px; align-items: center; flex-wrap: wrap; }

@media (max-width: 760px) {
    .wm-match-card .wm-teams,
    .wm-schedule-card .wm-schedule-teams {
        justify-items: center;
    }
    .wm-match-card .wm-teams .wm-team-name,
    .wm-match-card .wm-teams .wm-team-name.is-right,
    .wm-schedule-teams .wm-team-name,
    .wm-schedule-teams .wm-team-name.is-right {
        width: 100%;
        justify-content: center !important;
        justify-self: center !important;
        text-align: center !important;
        margin-left: auto;
        margin-right: auto;
    }
    .wm-match-card .wm-teams .wm-team-name.is-right .wm-flag,
    .wm-schedule-teams .wm-team-name.is-right .wm-flag {
        order: 0;
    }
    .wm-team-name > span:last-child {
        text-align: center;
    }
    .wm-tip-autosave {
        max-width: none;
        width: 100%;
        justify-content: center;
    }
    .wm-tip-save-help {
        display: block;
        width: 100%;
        margin-left: 0;
        text-align: center;
    }
}


/* v20: Teilnehmerkonten & Mitgliedschaftshinweise */
.wm-eligibility {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
}
.wm-checkline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 0 16px;
    line-height: 1.4;
    font-weight: 700;
}
.wm-checkline input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex: 0 0 auto;
}
.inline-form { display: inline-flex; margin: 0; }
.wm-table-actions { gap: 6px; align-items: center; flex-wrap: nowrap; }
.wm-table-actions .btn-small { min-width: auto; }
@media (max-width: 760px) {
    .wm-table-actions { justify-content: flex-start; flex-wrap: wrap; }
}

/* v21: Echtes Pokalfoto statt Emoji im Preisbereich */
.wm-prize-card {
    overflow: hidden;
}
.wm-trophy-photo {
    width: min(180px, 100%);
    height: 145px;
    margin: 0 auto 12px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.42)),
        url('/assets/wm/wm-trophy.jpg') center 46% / cover no-repeat;
    box-shadow: 0 16px 34px rgba(0,0,0,.38), inset 0 0 0 1px rgba(255,255,255,.20);
    border: 1px solid rgba(255,255,255,.20);
}
.wm-photo-credit {
    display: block;
    margin-top: 10px;
    font-size: 10px;
    line-height: 1.25;
    color: rgba(255,255,255,.58);
}
@media (max-width: 760px) {
    .wm-trophy-photo {
        width: min(220px, 88vw);
        height: 160px;
    }
}

/* WM v24: Startgeld, Preisgeld-Karte, Schnellscrollen und kompakter Turnierbaum */
html { scroll-behavior: smooth; }
.wm-payment-notice {
    border-left: 6px solid #ffd800;
    background: linear-gradient(90deg, #fff7d6 0%, #ffffff 76%);
    color: #1f2937;
}
.wm-payment-notice a { font-weight: 950; }
.wm-payment-alert a { font-weight: 950; }
.wm-prize-card-v24 {
    background:
        radial-gradient(circle at 70% 25%, rgba(255,216,0,.42), transparent 34%),
        linear-gradient(145deg, rgba(15,23,42,.82), rgba(0,0,0,.58));
}
.wm-prize-card-v24 .wm-photo-credit { display: none !important; }
.wm-flag-collage {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: min(180px, 100%);
    margin: 0 auto 14px;
    padding: 10px;
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,255,255,.76)),
        repeating-linear-gradient(45deg, rgba(255,216,0,.22) 0 8px, rgba(17,24,39,.12) 8px 16px);
    box-shadow: 0 16px 34px rgba(0,0,0,.34), inset 0 0 0 1px rgba(255,255,255,.60);
    border: 1px solid rgba(255,255,255,.30);
}
.wm-flag-collage img {
    width: 100%;
    height: 31px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 3px 10px rgba(15,23,42,.10);
}
.wm-prize-card-v24 strong { margin-top: 0; }
.wm-scroll-rail {
    position: fixed;
    right: max(14px, calc((100vw - 1260px) / 2 + 10px));
    bottom: 88px;
    z-index: 80;
    display: grid;
    gap: 8px;
}
.wm-scroll-rail a {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #ffd800;
    color: #111827;
    font-size: 24px;
    font-weight: 950;
    box-shadow: 0 12px 28px rgba(0,0,0,.32);
    border: 1px solid rgba(255,255,255,.55);
    text-decoration: none;
}
.wm-scroll-rail a:hover { background: #ffe45c; text-decoration: none; transform: translateY(-1px); }
.wm-bracket-help {
    display: inline-flex;
    margin: 0 0 10px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
    font-weight: 800;
}
.wm-bracket-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 12px;
    -webkit-overflow-scrolling: touch;
}
.wm-bracket-modern {
    display: grid;
    grid-template-columns: repeat(6, minmax(160px, 1fr));
    grid-auto-flow: unset;
    grid-auto-columns: unset;
    gap: 12px;
    min-width: 1040px;
    overflow: visible;
    padding-bottom: 0;
}
.wm-bracket-modern .wm-bracket-column {
    min-width: 0;
    gap: 9px;
}
.wm-bracket-modern .wm-bracket-column h3 {
    position: static;
    text-align: center;
    padding: 9px 8px;
    font-size: 14px;
    border-radius: 12px 12px 6px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wm-bracket-modern .wm-bracket-column:nth-child(2) { padding-top: 26px; }
.wm-bracket-modern .wm-bracket-column:nth-child(3) { padding-top: 66px; }
.wm-bracket-modern .wm-bracket-column:nth-child(4) { padding-top: 112px; }
.wm-bracket-modern .wm-bracket-column:nth-child(5) { padding-top: 156px; }
.wm-bracket-modern .wm-bracket-column:nth-child(6) { padding-top: 216px; }
.wm-bracket-modern .wm-bracket-match {
    padding: 10px;
    border-radius: 13px;
    min-height: 118px;
}
.wm-bracket-modern .wm-bracket-match::after {
    right: -13px;
    width: 13px;
    border-top-style: solid;
    opacity: .85;
}
.wm-bracket-modern .wm-bracket-team {
    padding: 5px 0;
    min-height: 31px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f2f4f7;
}
.wm-bracket-modern .wm-bracket-team:nth-child(2) { border-bottom: 0; }
.wm-bracket-modern .wm-team-name { font-size: 13px; font-weight: 950; }
.wm-bracket-modern footer {
    margin-top: 5px;
    padding-top: 7px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
}
.wm-bracket-modern footer strong { font-size: 16px; }
.wm-bracket-modern footer span { font-size: 11px; }

@media (max-width: 760px) {
    .wm-scroll-rail {
        right: 10px;
        bottom: 74px;
    }
    .wm-scroll-rail a {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
    .wm-flag-collage { width: min(235px, 88vw); grid-template-columns: repeat(6, 1fr); }
    .wm-flag-collage img { height: 28px; }
    .wm-bracket-scroll { margin-left: -4px; margin-right: -4px; }
    .wm-bracket-modern {
        grid-template-columns: repeat(6, minmax(150px, 1fr));
        min-width: 980px;
    }
    .wm-bracket-modern .wm-bracket-column:nth-child(n) { padding-top: 0; }
}

/* v25: übersichtlicher Login/Registrierung, schließbare Hinweise, Pfeile links */
.flash-stack .alert.is-hiding {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease;
}
.flash-stack .flash-message { flex: 1; min-width: 0; }
.flash-close {
    margin: -3px -5px -3px 8px;
    width: 30px;
    height: 30px;
    min-width: 30px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    color: #111827;
    box-shadow: none;
    border: 1px solid rgba(15,23,42,.10);
    font-size: 22px;
    line-height: 1;
}
.flash-close:hover { background: #fff; color: #111827; }
.wm-auth-layout {
    display: grid;
    grid-template-columns: minmax(260px, .9fr) minmax(300px, 1.1fr);
    gap: 18px;
    align-items: start;
}
.wm-auth-card {
    margin-bottom: 0;
    border: 1px solid rgba(15,23,42,.10);
    box-shadow: 0 16px 40px rgba(15,23,42,.08);
}
.wm-auth-card h3 {
    margin: 6px 0 8px;
    font-size: 24px;
}
.wm-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff7ca;
    color: #4d3f00;
    font-size: 13px;
    font-weight: 950;
}
.wm-auth-form label { margin-top: 12px; }
.wm-auth-form button { margin-top: 14px; width: 100%; }
.wm-auth-login {
    background: linear-gradient(180deg, #ffffff, #fffdf2);
}
.wm-auth-register {
    border-left: 6px solid #ffd800;
}
.wm-auth-tools {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 12px;
}
.wm-auth-details {
    margin-bottom: 0;
    padding: 0;
    overflow: hidden;
}
.wm-auth-details summary {
    cursor: pointer;
    padding: 15px 18px;
    font-weight: 950;
    color: #172033;
    list-style: none;
}
.wm-auth-details summary::-webkit-details-marker { display: none; }
.wm-auth-details summary::after {
    content: '+';
    float: right;
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #ffd800;
    color: #111827;
}
.wm-auth-details[open] summary::after { content: '–'; }
.wm-auth-details p,
.wm-auth-details form { padding: 0 18px 18px; }
.wm-inline-auth-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: end;
}
.wm-inline-auth-form label { grid-column: 1 / -1; margin-bottom: -4px; }
.wm-scroll-rail {
    left: max(14px, calc((100vw - 1260px) / 2 + 10px));
    right: auto;
}
.wm-prize-card-v24 span {
    max-width: 220px;
    margin-inline: auto;
}
@media (max-width: 760px) {
    .wm-auth-layout,
    .wm-auth-tools {
        grid-template-columns: 1fr;
    }
    .wm-auth-register { border-left: 0; border-top: 6px solid #ffd800; }
    .wm-inline-auth-form { grid-template-columns: 1fr; }
    .wm-inline-auth-form button { width: 100%; }
    .wm-scroll-rail {
        left: 10px;
        right: auto;
    }
    .flash-close {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }
}

/* v26: Regeln um Beispiele zur Punktevergabe erweitert. */

/* v27: Regeltexte werden bei bestehenden Installationen automatisch aktualisiert. */


/* v28: E-Mail-Felder in den Hilfeformularen auf Desktop breiter anzeigen. */
.wm-inline-auth-form {
    grid-template-columns: 1fr;
}
.wm-inline-auth-form input[type="email"] {
    width: 100%;
}
.wm-inline-auth-form button {
    justify-self: start;
}
@media (max-width: 760px) {
    .wm-inline-auth-form button { width: 100%; justify-self: stretch; }
}

/* v30: Gruppierte Navigation nach Modulen mit Dropdowns und mobilem Menü */
.topbar {
    padding: 0;
    display: block;
    background: #050505;
    border-bottom: 4px solid var(--primary);
}
.topbar-inner {
    width: 100%;
    max-width: none;
    min-height: 72px;
    padding: 10px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.brand { min-width: 0; }
.brand a { font-size: 18px; }
.brand a span { overflow: hidden; text-overflow: ellipsis; }
.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: nowrap;
    min-width: 0;
}
.main-nav a,
.main-nav button {
    font-family: inherit;
}
.main-nav .nav-link,
.main-nav .nav-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    font-weight: 900;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    cursor: pointer;
    white-space: nowrap;
}
.main-nav .nav-link:hover,
.main-nav .nav-trigger:hover,
.main-nav .nav-group:focus-within > .nav-trigger,
.main-nav .nav-group.is-open > .nav-trigger,
.main-nav .nav-link.is-active,
.main-nav .nav-group.is-active > .nav-trigger {
    color: #111827;
    background: #ffd800;
    border-color: #ffd800;
    text-decoration: none;
}
.nav-group { position: relative; }
.nav-trigger::after {
    content: "▾";
    margin-left: 7px;
    font-size: 12px;
    line-height: 1;
    opacity: .95;
}
.nav-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 230px;
    padding: 8px;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(255,255,255,.65);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0,0,0,.24);
    display: none;
    z-index: 50;
}
.nav-menu::before {
    content: "";
    position: absolute;
    top: -10px;
    right: 18px;
    width: 18px;
    height: 18px;
    background: rgba(255,255,255,.98);
    transform: rotate(45deg);
    border-left: 1px solid rgba(255,255,255,.65);
    border-top: 1px solid rgba(255,255,255,.65);
}
.nav-group:hover .nav-menu,
.nav-group:focus-within .nav-menu,
.nav-group.is-open .nav-menu {
    display: grid;
    gap: 3px;
}
.nav-menu a {
    display: block;
    color: #172033;
    font-weight: 850;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    white-space: nowrap;
}
.nav-menu a:hover,
.nav-menu a:focus {
    background: #fff3a5;
    color: #111827;
    text-decoration: none;
}
.nav-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: #ffd800;
    color: #111827;
    padding: 9px 12px;
    border-radius: 12px;
    box-shadow: none;
}
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #111827;
    content: "";
}
.nav-toggle-icon { position: relative; }
.nav-toggle-icon::before { position: absolute; top: -6px; left: 0; }
.nav-toggle-icon::after { position: absolute; top: 6px; left: 0; }
.wm-page .topbar {
    background: #050505;
    border-bottom-color: #ffd800;
}
.wm-page .topbar::after { display: none; }

@media (max-width: 1180px) {
    .brand a { font-size: 16px; }
    .brand-logo { width: 42px; height: 42px; }
    .main-nav .nav-link,
    .main-nav .nav-trigger { font-size: 13px; padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 900px) {
    .topbar { align-items: stretch; flex-direction: initial; gap: 0; padding: 0; }
    .topbar-inner {
        min-height: 0;
        padding: 10px 12px;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 10px;
    }
    .brand a { font-size: 16px; max-width: calc(100vw - 115px); }
    .brand-logo { width: 40px; height: 40px; }
    .nav-toggle { display: inline-flex; }
    .main-nav {
        grid-column: 1 / -1;
        display: none;
        overflow: visible;
        margin: 0;
        padding: 8px;
        background: rgba(255,255,255,.08);
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 7px;
        width: 100%;
    }
    .main-nav.is-open { display: flex; }
    .main-nav .nav-link,
    .main-nav .nav-trigger {
        width: 100%;
        justify-content: space-between;
        min-height: 44px;
        padding: 11px 13px;
        font-size: 15px;
        background: rgba(255,255,255,.10);
        border-color: rgba(255,255,255,.12);
        color: #fff;
        border-radius: 12px;
    }
    .main-nav .nav-link.is-active,
    .main-nav .nav-group.is-active > .nav-trigger,
    .main-nav .nav-group.is-open > .nav-trigger {
        color: #111827;
        background: #ffd800;
        border-color: #ffd800;
    }
    .nav-group { width: 100%; }
    .nav-menu {
        position: static;
        min-width: 0;
        width: 100%;
        margin-top: 6px;
        padding: 6px;
        border-radius: 12px;
        box-shadow: none;
        background: rgba(255,255,255,.95);
    }
    .nav-menu::before { display: none; }
    .nav-group:hover .nav-menu { display: none; }
    .nav-group.is-open .nav-menu,
    .nav-group:focus-within .nav-menu { display: grid; }
    .nav-menu a {
        white-space: normal;
        padding: 10px 11px;
    }
}

/* v32: Artikelübersicht kompakter + EK-Preis inline pflegen */
.article-overview-actions {
    margin: 6px 0 12px;
    gap: 10px;
}
.article-table th,
.article-table td {
    padding: 8px 8px;
}
.article-table th {
    font-size: 12px;
}
.article-table .btn-small {
    padding: 6px 8px;
    font-size: 12px;
    border-radius: 7px;
}
.article-table .btn-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
}
.article-row-actions {
    min-width: 230px;
    gap: 7px;
}
.article-price-cell {
    min-width: 125px;
}
.article-price-field {
    display: inline-grid;
    grid-template-columns: minmax(82px, 1fr) auto;
    align-items: center;
    gap: 6px;
    max-width: 125px;
}
.article-price-input {
    padding: 7px 8px;
    border-radius: 8px;
    text-align: right;
}
.article-price-currency {
    color: var(--muted);
    font-weight: 900;
}
.article-price-status {
    min-height: 15px;
    font-size: 11px;
    text-align: right;
}
.article-price-status[data-state="ok"] { color: var(--success); font-weight: 800; }
.article-price-status[data-state="pending"] { color: var(--warning); font-weight: 800; }
.article-price-status[data-state="error"] { color: var(--danger); font-weight: 800; }
@media (max-width: 760px) {
    .article-overview-actions { align-items: stretch; }
    .article-price-cell { min-width: 0; }
    .article-price-field { width: min(170px, 55vw); max-width: none; }
    .article-row-actions { min-width: 0; gap: 8px; }
    .article-table th,
    .article-table td { padding: 9px 0; }
}

/* v33: Artikelsortierung sofort sichtbar machen */
.sort-controls {
    min-width: 86px;
}
.article-sort-status {
    display: block;
    min-height: 14px;
    margin-top: 3px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
}
.article-sort-status[data-state="ok"] { color: var(--success); }
.article-sort-status[data-state="pending"] { color: var(--warning); }
.article-sort-status[data-state="error"] { color: var(--danger); }
.article-row-moving {
    opacity: .72;
    outline: 2px solid rgba(255, 216, 0, .55);
    outline-offset: -2px;
}
.article-table tbody tr {
    transition: opacity .15s ease, outline-color .15s ease;
}


/* v35: E-Mail-Zustellhinweise und Deliverability-Update */
.wm-mail-hint {
    border: 1px solid rgba(23,92,211,.18);
    font-weight: 700;
}

/* v37: Admin kann unbestätigte WM-Teilnehmer manuell aktivieren. */

/* v38: Manuelle WM-Teilnehmeraktivierung per E-Mail im Adminbereich sichtbarer. */
#manuelle-aktivierung .form-grid-compact {
  align-items: end;
}
#manuelle-aktivierung .form-actions {
  display: flex;
  align-items: end;
}

/* v39: Tagestipp per QR-Code */
.tagestipp-page { max-width: 860px; margin: 0 auto; }
.tagestipp-hero { display: grid; grid-template-columns: minmax(0, 1fr) 120px; align-items: center; gap: 18px; background: linear-gradient(135deg, rgba(8, 18, 38, .98), rgba(20, 28, 48, .96)); color: #fff; border: 1px solid rgba(255,255,255,.10); overflow: hidden; }
.tagestipp-hero h2 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 58px); line-height: 1; }
.tagestipp-hero p { color: rgba(255,255,255,.88); margin: 0; font-size: 17px; }
.tagestipp-ball { width: 108px; height: 108px; display: grid; place-items: center; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-size: 54px; box-shadow: inset 0 0 40px rgba(255,255,255,.08); }
.tagestipp-card { border: 1px solid rgba(17,24,39,.12); box-shadow: 0 16px 40px rgba(16,24,40,.10); }
.tagestipp-center { text-align: center; }
.tagestipp-match-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-weight: 900; margin-bottom: 16px; }
.tagestipp-teams { display: grid; grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr); align-items: center; gap: 14px; }
.tagestipp-team { font-size: clamp(20px, 3vw, 30px); font-weight: 950; }
.tagestipp-team:last-child { text-align: right; }
.tagestipp-vs { width: 54px; height: 54px; border-radius: 999px; display: grid; place-items: center; background: #111827; color: #fff; font-weight: 950; text-transform: uppercase; }
.tagestipp-form label { font-weight: 900; }
.tagestipp-form input[type="text"] { font-size: 22px; padding: 15px; }
.tagestipp-score-entry { display: grid; grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr); align-items: end; gap: 12px; margin: 18px 0; }
.tagestipp-score-entry strong { font-size: 32px; text-align: center; padding-bottom: 14px; }
.tagestipp-score-entry input { text-align: center; font-weight: 950; font-size: 34px; padding: 16px 8px; }
.tagestipp-submit { width: 100%; justify-content: center; font-size: 20px; padding: 16px 22px; }
.tagestipp-small-note { text-align: center; margin: 12px 0 0; }
.tagestipp-done { background: linear-gradient(180deg, #fffef5 0%, #fff 100%); border-color: #ffe45c; }
.tagestipp-big-result { font-size: clamp(48px, 8vw, 82px); line-height: 1; font-weight: 950; margin: 14px 0; color: #111827; }
.tagestipp-footer-info { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.tagestipp-footer-info span { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: rgba(255,255,255,.84); border: 1px solid rgba(17,24,39,.10); font-weight: 900; color: #111827; }
.tagestipp-admin-top { grid-template-columns: minmax(0,1fr) 300px; align-items: start; }
.tagestipp-qr-card { text-align: center; }
.tagestipp-qr { width: 230px; max-width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--border); background: #fff; padding: 10px; }
.tagestipp-admin-table input { min-width: 84px; }
.tagestipp-winner-list { display: flex; flex-wrap: wrap; gap: 10px; }
.tagestipp-winner-list span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 999px; background: #fff8d0; border: 1px solid #ffe45c; font-weight: 900; }
.tagestipp-winner-list small { color: #8a6d00; }
tr.is-winner { background: #fff8d0; }
.inline-check { display: inline-flex; gap: 8px; align-items: center; margin: 10px 16px 0 0; font-weight: 800; }
.small-text { font-size: 13px; overflow-wrap: anywhere; }

@media (max-width: 760px) {
    .tagestipp-page { max-width: none; }
    .tagestipp-hero { grid-template-columns: 1fr; text-align: center; }
    .tagestipp-ball { margin: 0 auto; }
    .tagestipp-match-meta { flex-direction: column; text-align: center; }
    .tagestipp-teams { grid-template-columns: 1fr; text-align: center; }
    .tagestipp-team:last-child { text-align: center; }
    .tagestipp-vs { margin: 0 auto; }
    .tagestipp-score-entry { grid-template-columns: 1fr; }
    .tagestipp-score-entry strong { padding: 0; }
    .tagestipp-admin-top { grid-template-columns: 1fr; }
    .inline-check { display: flex; margin-right: 0; }
}
