:root {
    --h96-green: #007a3d;
    --h96-green-dark: #00562c;
    --h96-black: #111111;
    --h96-white: #ffffff;
    --h96-light: #f3f7f1;
    --h96-border: #d7e3d4;
    --h96-muted: #667268;
    --danger: #b71c1c;
    --ok: #0f7d3b;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.10);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--h96-light);
    color: var(--h96-black);
    position: relative;
    overflow-x: hidden;
    isolation: isolate;
}
body::after {
    content: "";
    position: fixed;
    right: clamp(-360px, -24vw, -150px);
    bottom: clamp(-420px, -26vw, -180px);
    width: clamp(760px, 72vw, 1500px);
    aspect-ratio: 1 / 1;
    background: url('../img/96logo.svg') no-repeat center / contain;
    opacity: 0.08;
    transform: rotate(-16deg);
    transform-origin: center;
    pointer-events: none;
    z-index: 0;
}
a { color: inherit; }
.topbar {
    min-height: 76px;
    background: linear-gradient(90deg, var(--h96-green-dark), var(--h96-green));
    color: var(--h96-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem clamp(1rem, 4vw, 3rem);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}
.brand-logo, .login-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    background: var(--h96-white);
    border-radius: 999px;
    padding: 0.25rem;
}
.logo-fallback {
    width: 54px;
    height: 54px;
    display: none;
    place-items: center;
    background: var(--h96-white);
    color: var(--h96-green);
    border-radius: 999px;
    font-weight: 900;
    font-size: 1.35rem;
}
.brand small {
    display: block;
    opacity: 0.86;
    font-size: 0.8rem;
}
.nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}
.nav a {
    text-decoration: none;
    padding: 0.55rem 0.75rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
}
.nav a:hover { background: rgba(255,255,255,0.22); }
.container {
    width: min(1180px, calc(100% - 2rem));
    margin: 2rem auto;
}
.footer {
    text-align: center;
    color: var(--h96-muted);
    padding: 2rem 1rem;
}
.topbar,
.container,
.footer {
    position: relative;
    z-index: 1;
}
.hero, .panel, .login-card, .card, .match-card, .big-link {
    background: rgba(255,255,255,0.94);
    border: 1px solid var(--h96-border);
    box-shadow: var(--shadow);
    border-radius: 24px;
}
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 1.5rem;
    border-left: 8px solid var(--h96-green);
}
.admin-hero { border-left-color: var(--h96-black); }
.eyebrow {
    margin: 0 0 0.35rem;
    color: var(--h96-green);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
}
h1, h2 { margin: 0 0 0.75rem; line-height: 1.15; }
p { line-height: 1.55; }
.muted, .hint { color: var(--h96-muted); }
.grid { display: grid; gap: 1rem; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.5rem; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1.5rem; }
.season-summary-cards .card { padding: 1rem; }
.season-summary-cards .card strong { font-size: clamp(1.15rem, 2vw, 1.45rem); }
.card { padding: 1.25rem; }
.card-label { color: var(--h96-muted); display: block; margin-bottom: 0.35rem; }
.card strong { display: block; font-size: clamp(1.4rem, 3vw, 2rem); }
.panel { padding: clamp(1.1rem, 3vw, 1.7rem); margin-bottom: 1.5rem; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.85rem; text-align: left; border-bottom: 1px solid var(--h96-border); vertical-align: middle; }
th { background: #eef6eb; color: var(--h96-green-dark); }

.match-result-cell {
    text-align: center;
}
.match-result-cell .match-line {
    margin-inline: auto;
}

.match-line {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 34px auto 34px minmax(120px, 1fr);
    align-items: center;
    gap: .5rem;
    min-width: 420px;
}

.match-team-home { text-align: right; }
.match-team-away { text-align: left; }
.match-logo { display: flex; justify-content: center; align-items: center; }
.team-logo {
    width: 28px;
    height: 28px;
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
    flex: 0 0 28px;
}
.team-logo-fallback {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #e4efe4;
    color: var(--h96-green-dark);
    font-size: .75rem;
    font-weight: 900;
}
.match-score {
    min-width: 3.1rem;
    text-align: center;
    font-weight: 900;
    white-space: nowrap;
}
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}
.badge.ok { background: #dff4e7; color: var(--ok); }
.badge.locked { background: #f8dddd; color: var(--danger); }
.btn {
    border: 1px solid var(--h96-border);
    background: var(--h96-white);
    color: var(--h96-black);
    border-radius: 999px;
    padding: 0.7rem 1rem;
    cursor: pointer;
    font-weight: 800;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}
.btn.primary {
    background: var(--h96-green);
    color: var(--h96-white);
    border-color: var(--h96-green);
}
.btn.small { padding: 0.45rem 0.7rem; font-size: 0.88rem; }
.btn:disabled, input:disabled { opacity: 0.55; cursor: not-allowed; }
.form { display: grid; gap: 1rem; }
.grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
label { display: grid; gap: 0.35rem; font-weight: 700; }
input, select {
    width: 100%;
    border: 1px solid var(--h96-border);
    border-radius: 14px;
    padding: 0.75rem 0.85rem;
    font: inherit;
    background: var(--h96-white);
}
.check { display: flex; align-items: center; gap: 0.55rem; }
.check input { width: auto; }
.inline-form { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.inline-form input { width: 8rem; }
.login-card {
    width: min(420px, 100%);
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
}
.login-logo-wrap { display: flex; justify-content: center; margin-bottom: 1rem; }
.login-logo { width: 86px; height: 86px; }
.error, .notice {
    padding: 0.85rem 1rem;
    border-radius: 16px;
    margin-bottom: 1rem;
}
.error { background: #f8dddd; color: var(--danger); }
.notice { background: #dff4e7; color: var(--ok); }
.tip-list { display: grid; gap: 1rem; }
.match-card {
    padding: 1rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}
.match-meta {
    margin: 0 0 0.85rem;
    color: var(--h96-muted);
}
.match-meta strong {
    display: inline;
    font-size: inherit;
    line-height: inherit;
    color: var(--h96-green-dark);
}
.dashboard-tips {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 0.75rem;
    flex-wrap: wrap;
    width: auto;
}
.dashboard-tip-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.dashboard-tip-player {
    min-height: 2.9rem;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--h96-border);
    border-radius: 16px;
    padding: 0.7rem 1rem;
    font-weight: 900;
    background: var(--h96-white);
}
.dashboard-tip-value {
    min-width: 3.6rem;
    min-height: 2.9rem;
    display: inline-grid;
    place-items: center;
    text-align: center;
    border: 1px solid var(--h96-border);
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-weight: 900;
    background: var(--h96-soft);
}
.dashboard-tip-value.is-submitted {
    color: var(--h96-green-dark);
    background: #e2f5e9;
    border-color: #c8ead4;
}
.dashboard-tip-value.is-missing {
    color: #b11226;
    background: #ffe3e6;
    border-color: #ffd0d6;
}
.tip-form { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.tip-form input { width: 5.5rem; text-align: center; font-weight: 900; }

.tip-competition-list {
    display: grid;
    gap: 1rem;
}
.tip-competition-card {
    display: grid;
    gap: 0.9rem;
}
.tip-competition-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.tip-competition-head h2 {
    margin: 0;
    color: var(--h96-green-dark);
}
.tip-competition-matches {
    display: grid;
}
.tip-competition-match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.35rem 1rem;
    padding: 0.95rem 0;
    border-top: 1px solid var(--h96-border);
}
.tip-competition-match:first-child {
    border-top: 0;
    padding-top: 0;
}
.tip-competition-match:last-child {
    padding-bottom: 0;
}
.tip-competition-match .match-meta {
    grid-column: 1 / -1;
    grid-row: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.95rem;
}
.tip-competition-match .match-line {
    grid-column: 1;
    grid-row: 2;
}
.tip-competition-match .tip-form {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
}

.dashboard-competition-match .dashboard-tips {
    grid-column: 2;
    grid-row: 2;
    justify-self: stretch;
    align-self: center;
    max-width: 34rem;
}
.admin-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.big-link {
    padding: 1.25rem;
    text-decoration: none;
    font-weight: 900;
    border-left: 6px solid var(--h96-green);
}
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
@media (max-width: 860px) {

    .tip-competition-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .tip-competition-match {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .tip-competition-match .match-meta,
    .tip-competition-match .match-line,
    .tip-competition-match .tip-form,
    .dashboard-competition-match .dashboard-tips {
        grid-column: 1;
        grid-row: auto;
    }
    .tip-competition-match .tip-form {
        justify-self: stretch;
        justify-content: center;
    }
    .dashboard-competition-match .dashboard-tips {
        max-width: none;
        justify-content: center;
    }
    .topbar, .hero, .match-card, .panel-head { align-items: flex-start; flex-direction: column; }
    .nav { justify-content: flex-start; }
    .cards-2, .cards-3, .grid-form, .admin-links { grid-template-columns: 1fr; }
    .container { width: min(100% - 1rem, 1180px); margin-top: 1rem; }
}
@media (max-width: 620px) {
    .match-line {
        width: 100%;
        min-width: 0;
        grid-template-columns: 44px auto 44px;
        justify-content: center;
        grid-template-areas: "homeLogo score awayLogo";
        gap: 0.45rem;
    }
    .match-line .match-team {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
    .match-logo-home { grid-area: homeLogo; }
    .match-logo-away { grid-area: awayLogo; }
    .match-score {
        grid-area: score;
        display: inline-grid;
        place-items: center;
        min-width: 2.4rem;
    }
    .team-logo {
        width: 34px;
        height: 34px;
        max-width: 34px;
        max-height: 34px;
        flex-basis: 34px;
    }
    .tip-form {
        width: 100%;
        justify-content: center;
    }
}
@media (max-width: 420px) {
    .match-card { padding: 0.85rem; }
    .dashboard-tips {
        justify-content: center;
    }
    .dashboard-tip-value {
        min-width: 2.75rem;
        padding-inline: 0.65rem;
    }
}

.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1.5rem; }
.season-switch select { min-width: 11rem; }
.hof-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 1.5rem; }
.hof-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 1rem;
    color: #fff;
    min-height: 420px;
    box-shadow: 0 18px 45px rgba(0,0,0,.16);
    background: linear-gradient(160deg, #46505a, #23292f 58%, #15191d);
}
.hof-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.28), transparent 32%), radial-gradient(circle at bottom left, rgba(255,255,255,0.12), transparent 28%);
    pointer-events: none;
}
.hof-card > * { position: relative; z-index: 1; }
.hof-card-top { display:flex; justify-content:space-between; align-items:center; gap:.5rem; margin-bottom: .5rem; }
.hof-rank, .hof-rarity { background: rgba(255,255,255,.16); border:1px solid rgba(255,255,255,.24); border-radius:999px; padding:.3rem .65rem; font-size:.82rem; font-weight:800; }
.hof-avatar-wrap { display:flex; justify-content:center; margin: .75rem 0; }
.hof-avatar, .profile-avatar-large {
    width: 118px;
    height: 118px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,.9);
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
    background:#fff;
}
.hof-avatar-fallback, .profile-avatar-fallback {
    display:grid;
    place-items:center;
    font-size:2rem;
    font-weight:900;
    color:#fff;
    background: rgba(255,255,255,.14);
}
.hof-name { text-align:center; margin:.25rem 0; }
.hof-stars { text-align:center; font-size:1.1rem; letter-spacing:.15em; margin:.15rem 0; }
.hof-titles { text-align:center; margin:.2rem 0 1rem; opacity:.92; }
.hof-stats { display:grid; grid-template-columns: 1fr 1fr; gap:.75rem; }
.hof-stats div { background: rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.15); border-radius:18px; padding:.8rem; }
.hof-stats span { display:block; font-size:.78rem; opacity:.84; margin-bottom:.2rem; }
.hof-stats strong { font-size:1.05rem; }
.hof-card-normal { background: linear-gradient(160deg, #edf7ef, #cde7d2 58%, #95c29f); color:#173122; }
.hof-card-blue { background: linear-gradient(160deg, #46a0ff, #0057c7 58%, #0d2f70); }
.hof-card-yellow { background: linear-gradient(160deg, #ffe888, #d5a600 58%, #876f00); color:#1a1a1a; }
.hof-card-orange { background: linear-gradient(160deg, #ffc07a, #e36b00 58%, #853300); }
.hof-card-gold { background: linear-gradient(160deg, #edd8a8, #b78a39 58%, #7a5a18); }
.hof-card-violet { background: linear-gradient(160deg, #cf9fff, #7a35d8 58%, #42136f); }
.hof-card-yellow .hof-rank, .hof-card-yellow .hof-rarity, .hof-card-yellow .hof-stats div { color:#1a1a1a; border-color: rgba(0,0,0,.12); background: rgba(255,255,255,.22); }
.profile-grid { display:grid; grid-template-columns: 220px 1fr; gap:1.25rem; align-items:start; }
.profile-avatar-box { display:flex; justify-content:center; }
.profile-remove-form { margin-top:1rem; }
.avatar-chip { width: 32px; height: 32px; border-radius:50%; object-fit:cover; }
.avatar-chip-fallback { width:32px; height:32px; border-radius:50%; display:grid; place-items:center; font-size:.78rem; font-weight:900; background:#e4efe4; color:var(--h96-green-dark); }
@media (max-width: 860px) {
    .cards-4, .profile-grid, .hof-stats { grid-template-columns: 1fr; }
}

.profile-avatar-fallback, .hof-avatar-fallback {
    background: linear-gradient(160deg, var(--h96-green), var(--h96-green-dark)) !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}
.avatar-uploader { min-width: 0; }
.avatar-camera-label[hidden] { display: none !important; }
.avatar-crop-controls { display: flex; align-items: flex-end; gap: 0.75rem; flex-wrap: wrap; }
.avatar-crop-controls label { flex: 1 1 220px; margin: 0; }
#crop-mirror.is-active { background: var(--h96-green); color: var(--h96-white); border-color: var(--h96-green); }
.avatar-cropper { display: grid; gap: 1rem; margin: 1rem 0; }
.crop-stage {
    width: min(320px, 100%);
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    border: 2px solid var(--h96-border);
    background: #111;
    touch-action: none;
    cursor: grab;
    box-shadow: var(--shadow);
}
.crop-stage:active { cursor: grabbing; }
.crop-stage img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center center;
    user-select: none;
    pointer-events: none;
}
.crop-mask {
    position: absolute;
    inset: 0;
    border: 999px solid rgba(0, 0, 0, .22);
    box-shadow: inset 0 0 0 3px rgba(255,255,255,.9);
    border-radius: 50%;
    pointer-events: none;
}
.avatar-cropper input[type="range"] { max-width: 320px; }
.profile-grid { align-items: start; }
@media (max-width: 860px) {
    .crop-stage { width: 100%; max-width: 320px; }
}

#crop-image[hidden] { display: none !important; }


/* Zentrale Geldfarben */
.amount-negative,
.negative,
td.negative,
.card.negative strong,
.card-negative strong,
.money-negative {
    color: var(--danger) !important;
}

.amount-positive,
.positive,
td.positive,
.card.positive strong,
.card-positive strong,
.money-positive {
    color: var(--ok) !important;
}

.card.negative,
.card-negative {
    border-left: 6px solid var(--danger);
}

.card.positive,
.card-positive {
    border-left: 6px solid var(--ok);
}


/* Profilbild und Zuschnitt */
.profile-avatar-fallback,
.hof-avatar-fallback,
.avatar-chip-fallback {
    background: var(--h96-green) !important;
    color: #ffffff !important;
}

.avatar-cropper[hidden],
#crop-image[hidden] {
    display: none !important;
}

.crop-stage {
    position: relative;
    width: min(320px, 100%);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 50%;
    background: #111111;
    border: 2px solid var(--h96-border);
    touch-action: none;
    user-select: none;
}

#crop-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
}

.crop-mask {
    position: absolute;
    inset: 0;
    border: 3px solid rgba(255,255,255,.9);
    border-radius: 50%;
    box-shadow: inset 0 0 0 999px rgba(0,0,0,.08);
    pointer-events: none;
}

.profile-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.profile-avatar-box {
    display: flex;
    justify-content: center;
}

.profile-remove-form {
    margin-top: 1rem;
}

@media (max-width: 860px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}


.hof-card-normal .hof-rank,
.hof-card-normal .hof-rarity,
.hof-card-normal .hof-stats div {
    color: #173122;
    border-color: rgba(23,49,34,.14);
    background: rgba(255,255,255,.30);
}

.hof-card-normal .hof-titles,
.hof-card-normal .hof-stats span {
    color: rgba(23,49,34,.82);
}


/* Hall of Fame: ruhiger Kartenstil passend zur App */
.hof-card {
    --hof-accent: var(--h96-green);
    --hof-bg-1: #ffffff;
    --hof-bg-2: #edf7ef;
    --hof-bg-3: #dceee0;
    background: linear-gradient(160deg, var(--hof-bg-1), var(--hof-bg-2) 58%, var(--hof-bg-3)) !important;
    color: var(--h96-black) !important;
    border: 1px solid var(--h96-border);
    border-top: 8px solid var(--hof-accent);
    box-shadow: 0 18px 45px rgba(0,0,0,.08);
}

.hof-card::before {
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--hof-accent) 18%, transparent), transparent 34%),
        radial-gradient(circle at bottom left, rgba(255,255,255,.60), transparent 36%) !important;
    opacity: .9;
}

.hof-card-normal {
    --hof-accent: var(--h96-green);
    --hof-bg-1: #ffffff;
    --hof-bg-2: #f1f8f2;
    --hof-bg-3: #dceee0;
}

.hof-card-blue {
    --hof-accent: #2f80d0;
    --hof-bg-1: #ffffff;
    --hof-bg-2: #edf6ff;
    --hof-bg-3: #d7eafb;
}

.hof-card-yellow {
    --hof-accent: #d8a900;
    --hof-bg-1: #ffffff;
    --hof-bg-2: #fff8df;
    --hof-bg-3: #f3e5a6;
}

.hof-card-orange {
    --hof-accent: #e27618;
    --hof-bg-1: #ffffff;
    --hof-bg-2: #fff1e5;
    --hof-bg-3: #f0c6a0;
}

.hof-card-gold {
    --hof-accent: #9c7534;
    --hof-bg-1: #ffffff;
    --hof-bg-2: #f7f0e4;
    --hof-bg-3: #dcc49a;
}

.hof-card-violet {
    --hof-accent: #7b45c4;
    --hof-bg-1: #ffffff;
    --hof-bg-2: #f3ecff;
    --hof-bg-3: #dac8f4;
}

.hof-rank,
.hof-rarity,
.hof-card-yellow .hof-rank,
.hof-card-yellow .hof-rarity {
    color: var(--h96-black) !important;
    background: rgba(255,255,255,.68) !important;
    border: 1px solid color-mix(in srgb, var(--hof-accent) 34%, var(--h96-border)) !important;
}

.hof-rarity {
    color: var(--hof-accent) !important;
}

.hof-avatar,
.hof-avatar-fallback {
    border-color: #ffffff !important;
    box-shadow: 0 12px 28px rgba(0,0,0,.14);
}

.hof-avatar-fallback {
    background: linear-gradient(160deg, var(--hof-accent), var(--h96-green-dark)) !important;
    color: #ffffff !important;
}

.hof-name,
.hof-stars,
.hof-titles,
.hof-stats strong,
.hof-card-yellow .hof-stats strong {
    color: var(--h96-black) !important;
}

.hof-stars {
    color: var(--hof-accent) !important;
}

.hof-titles,
.hof-stats span,
.hof-card-normal .hof-titles,
.hof-card-normal .hof-stats span {
    color: var(--h96-muted) !important;
}

.hof-stats div,
.hof-card-yellow .hof-stats div,
.hof-card-normal .hof-stats div {
    color: var(--h96-black) !important;
    background: rgba(255,255,255,.62) !important;
    border: 1px solid rgba(0,0,0,.07) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}


/* Mobiles Hauptmenü */
.menu-toggle {
    display: none;
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.14);
    color: var(--h96-white);
    border-radius: 999px;
    padding: 0.62rem 0.85rem;
    cursor: pointer;
    font-weight: 900;
    align-items: center;
    gap: 0.55rem;
}

.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--h96-white);
    border-radius: 999px;
    content: "";
}

.menu-toggle-icon {
    position: relative;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    position: absolute;
    left: 0;
}

.menu-toggle-icon::before { top: -6px; }
.menu-toggle-icon::after { top: 6px; }

.nav-logout {
    border: 1px solid rgba(255,255,255,0.18);
}

@media (max-width: 860px) {
    .topbar {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 0.75rem;
    }

    .brand {
        min-width: 0;
    }

    .brand span:last-child {
        min-width: 0;
    }

    .brand strong,
    .brand small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .nav {
        display: none;
        grid-column: 1 / -1;
        width: 100%;
        background: rgba(0,0,0,0.28);
        border: 1px solid rgba(255,255,255,0.18);
        border-radius: 22px;
        padding: 0.6rem;
        margin-top: 0.15rem;
        box-shadow: 0 18px 35px rgba(0,0,0,0.16);
    }

    .nav.is-open {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.55rem;
    }

    .nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 46px;
        border-radius: 16px;
        background: var(--h96-white);
        color: var(--h96-black);
        font-weight: 900;
        text-align: center;
    }

    .nav a:hover {
        background: #e8f7ed;
    }

    .nav a.nav-logout {
        grid-column: 1 / -1;
        background: var(--h96-black);
        color: var(--h96-white);
        border-color: var(--h96-black);
    }
}

@media (max-width: 420px) {
    .brand-logo, .logo-fallback {
        width: 46px;
        height: 46px;
    }

    .brand small {
        display: none;
    }

    .nav.is-open {
        grid-template-columns: 1fr;
    }
}


/* Hall of Fame Podium und kompakte Karten */
.hof-stage {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.hof-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.hof-field {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.hof-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.hof-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(0,0,0,.13);
}

.hof-card-podium {
    width: 100%;
}

.hof-rank-1 {
    min-height: 520px;
    padding: 1.35rem;
}

.hof-rank-2 {
    min-height: 475px;
    padding: 1.18rem;
}

.hof-rank-3 {
    min-height: 435px;
    padding: 1.05rem;
}

.hof-rank-1 .hof-avatar {
    width: 150px;
    height: 150px;
}

.hof-rank-2 .hof-avatar {
    width: 132px;
    height: 132px;
}

.hof-rank-3 .hof-avatar {
    width: 116px;
    height: 116px;
}

.hof-rank-1 .hof-name {
    font-size: 1.55rem;
}

.hof-rank-2 .hof-name {
    font-size: 1.38rem;
}

.hof-rank-3 .hof-name {
    font-size: 1.22rem;
}

.hof-card-compact {
    padding: .95rem;
    min-height: 0;
}

.hof-card-compact .hof-card-top {
    margin-bottom: .7rem;
}

.hof-card-compact .hof-avatar {
    width: 82px;
    height: 82px;
}

.hof-card-compact .hof-name {
    font-size: 1.02rem;
    margin: .18rem 0;
}

.hof-card-compact .hof-stars {
    font-size: .95rem;
    letter-spacing: .1em;
}

.hof-card-compact .hof-titles {
    margin-bottom: .75rem;
}

.hof-details-toggle {
    width: 100%;
    justify-content: center;
    margin-top: .25rem;
}

.hof-stats-collapsible {
    margin-top: .75rem;
}

.hof-stats-collapsible[hidden] {
    display: none !important;
}

@media (max-width: 1080px) {
    .hof-field {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .hof-podium,
    .hof-field {
        grid-template-columns: 1fr;
    }

    .hof-rank-1,
    .hof-rank-2,
    .hof-rank-3 {
        min-height: 0;
        padding: 1rem;
    }

    .hof-rank-1 .hof-avatar,
    .hof-rank-2 .hof-avatar,
    .hof-rank-3 .hof-avatar {
        width: 108px;
        height: 108px;
    }

    .hof-rank-1 .hof-name,
    .hof-rank-2 .hof-name,
    .hof-rank-3 .hof-name {
        font-size: 1.18rem;
    }
}



/* Profilbild-Zuschnitt: Vorschau und gespeicherter Avatar müssen denselben Ausschnitt zeigen */
#crop-image {
    position: absolute;
    max-width: none;
    max-height: none;
    object-fit: fill;
}

.pwa-box {
    position: fixed;
    left: 50%;
    bottom: 1rem;
    width: min(680px, calc(100% - 2rem));
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--h96-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
}
.pwa-box[hidden] { display: none; }
.pwa-box p { margin: 0.2rem 0 0; }
.pwa-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    flex: 0 0 auto;
}

@media (max-width: 720px) {
    .pwa-box {
        align-items: stretch;
        flex-direction: column;
    }
    .pwa-actions {
        justify-content: stretch;
    }
    .pwa-actions .btn {
        flex: 1 1 auto;
    }
}

.profile-push-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0 0.5rem;
}

@media (max-width: 720px) {
    .profile-push-actions .btn {
        flex: 1 1 100%;
    }
}
