:root {
    --ink: #25171a;
    --muted: #75666a;
    --paper: #f5f0f1;
    --surface: #fffdfd;
    --line: #e1d4d7;
    --field: #b4001b;
    --field-dark: #760012;
    --accent: #efb5be;
    --danger: #970017;
    --radius: 4px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--paper);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.site-header {
    width: min(1120px, calc(100% - 40px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 750;
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
}

.brand-mark {
    width: 14px;
    height: 20px;
    background: var(--field);
    border-radius: 1px;
    transform: skew(-12deg);
}

.text-link,
.text-button {
    color: var(--ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid currentColor;
    padding: 2px 0;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-actions form {
    margin: 0;
}

.page-shell {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0 90px;
}

.scoreboard {
    position: relative;
    overflow: hidden;
    color: white;
    background: var(--field-dark);
    border-radius: var(--radius);
    box-shadow: 0 18px 50px rgba(21, 37, 27, .14);
}

.scoreboard::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(255, 255, 255, .08);
}

.match-meta {
    position: relative;
    z-index: 1;
    min-height: 62px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #c5cec8;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    font-size: 13px;
    letter-spacing: .02em;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.status i {
    width: 8px;
    height: 8px;
    display: block;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(216, 255, 79, .12);
    animation: pulse 2s infinite;
}

.status--finished,
.status--upcoming {
    color: #c5cec8;
}

.scoreline {
    position: relative;
    z-index: 1;
    min-height: 330px;
    padding: 48px 7%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 7%;
}

.team h1 {
    max-width: 280px;
    margin: 0;
    font-size: clamp(21px, 3vw, 38px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.team--away {
    text-align: right;
}

.team--away h1 {
    margin-left: auto;
}

.score {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 26px);
    font-variant-numeric: tabular-nums;
}

.score strong {
    min-width: .65em;
    font-size: clamp(72px, 12vw, 142px);
    font-weight: 760;
    line-height: .8;
    letter-spacing: -.08em;
}

.score span {
    color: var(--accent);
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 300;
}

.updated {
    position: relative;
    z-index: 1;
    margin: 0;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: #9ba8a0;
    background: rgba(0, 0, 0, .13);
    font-size: 12px;
}

.update-dot {
    width: 5px;
    height: 5px;
    background: #9ba8a0;
    border-radius: 50%;
}

.events-panel {
    margin-top: 28px;
    padding: 28px 30px 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.section-heading h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -.02em;
}

.section-heading > span {
    color: var(--muted);
    font-size: 13px;
}

.goal-row,
.admin-goal-row {
    min-height: 72px;
    display: grid;
    grid-template-columns: 52px 1fr auto;
    align-items: center;
    gap: 14px;
    border-top: 1px solid var(--line);
}

.goal-minute {
    color: var(--muted);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
}

.goal-row strong,
.goal-row small,
.admin-goal-row strong,
.admin-goal-row small {
    display: block;
}

.goal-row small,
.admin-goal-row small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.goal-ball {
    padding: 4px 7px;
    color: var(--field-dark);
    background: var(--accent);
    border-radius: 2px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
}

.empty-state {
    margin: 0;
    padding: 30px 0 42px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.login-card {
    width: min(440px, 100%);
    margin: 50px auto 0;
    padding: 38px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.login-card h1,
.admin-heading h1 {
    margin: 4px 0 8px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
    letter-spacing: -.045em;
}

.login-card > p:not(.eyebrow) {
    margin: 0 0 26px;
    color: var(--muted);
}

.eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.stack-form {
    display: grid;
    gap: 9px;
}

.stack-form label,
.team-choice legend {
    margin-top: 8px;
    color: #3d473f;
    font-size: 13px;
    font-weight: 650;
}

.stack-form label small {
    color: var(--muted);
    font-weight: 400;
}

.stack-form input,
.stack-form select {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    color: var(--ink);
    background: white;
    border: 1px solid #c9ccc4;
    border-radius: 3px;
    outline: none;
}

.stack-form input:focus,
.stack-form select:focus {
    border-color: var(--field);
    box-shadow: 0 0 0 3px rgba(180, 0, 27, .1);
}

.button {
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.stack-form .button {
    margin-top: 14px;
}

.button--primary {
    color: white;
    background: var(--field);
    border-color: #920016;
}

.button--secondary {
    color: white;
    background: var(--field-dark);
}

.button--danger-quiet {
    min-height: 36px;
    color: var(--danger);
    background: transparent;
    border-color: #dfc3be;
    font-size: 12px;
}

.messages {
    margin: -35px 0 24px;
}

.message {
    margin: 8px 0;
    padding: 12px 15px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--field);
    font-size: 14px;
}

.message--error {
    border-left-color: var(--danger);
}

.admin-heading {
    margin-bottom: 34px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.compact-score {
    min-width: 330px;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 15px;
    color: white;
    background: var(--field-dark);
    border-radius: 3px;
    font-size: 12px;
}

.compact-score strong {
    color: var(--accent);
    font-size: 22px;
    font-variant-numeric: tabular-nums;
}

.compact-score span:last-child {
    text-align: right;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.admin-card {
    position: relative;
    padding: 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.admin-card--goal {
    border-top: 4px solid var(--field);
}

.admin-card--wide {
    margin-top: 22px;
}

.card-number {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #a4aaa4;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
}

.card-heading {
    margin-bottom: 22px;
    padding-right: 34px;
}

.card-heading h2 {
    margin: 0 0 4px;
    font-size: 21px;
    letter-spacing: -.025em;
}

.card-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.team-choice {
    margin: 0 0 6px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border: 0;
}

.team-choice legend {
    margin: 0 0 8px;
}

.team-choice label {
    position: relative;
    margin: 0;
}

.team-choice input {
    position: absolute;
    opacity: 0;
}

.team-choice span {
    min-height: 48px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #c9ccc4;
    border-radius: 3px;
    text-align: center;
    cursor: pointer;
}

.team-choice input:checked + span {
    color: white;
    background: var(--field);
    border-color: var(--field);
}

.team-choice input:focus-visible + span {
    box-shadow: 0 0 0 3px rgba(180, 0, 27, .16);
}

.admin-card--wide .section-heading {
    align-items: flex-end;
}

.admin-card--wide .section-heading h2 {
    margin-top: 4px;
    font-size: 22px;
}

.admin-goal-row:first-child,
.admin-goals .empty-state {
    border-top: 1px solid var(--line);
}

.delete-button {
    padding: 4px 0;
    color: var(--danger);
    background: transparent;
    border: 0;
    border-bottom: 1px solid #d7aaa4;
    font-size: 12px;
    cursor: pointer;
}

/* Saisonübersicht */
.public-heading {
    margin-bottom: 38px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.public-heading h1 {
    margin: 4px 0 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -.055em;
}

.public-heading > p {
    max-width: 320px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    text-align: right;
}

.public-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, .85fr);
    align-items: start;
    gap: 24px;
}

.match-list-section,
.scorer-section {
    padding: 28px 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.match-list {
    display: grid;
    gap: 10px;
}

.match-card {
    padding: 17px 18px 14px;
    display: block;
    color: var(--ink);
    background: #f8f8f3;
    border: 1px solid var(--line);
    border-left: 3px solid var(--field);
    border-radius: 3px;
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}

.match-card:hover {
    border-color: #aeb4ab;
    transform: translateY(-1px);
}

.match-card-meta {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-size: 11px;
}

.match-card .status {
    color: var(--muted);
    font-size: 10px;
}

.match-card .status--live {
    color: var(--field);
}

.match-card-score {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
}

.match-card-score div span {
    display: block;
    padding: 4px 0;
    font-size: 16px;
    font-weight: 650;
}

.match-card-score > strong {
    font-size: 24px;
    line-height: 1.2;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.match-card-link {
    margin-top: 12px;
    display: block;
    color: var(--muted);
    font-size: 11px;
    text-align: right;
}

.empty-card {
    padding: 35px 24px;
    display: grid;
    gap: 5px;
    color: var(--muted);
    background: #f8f8f3;
    border: 1px dashed #cbd0c8;
    border-radius: 3px;
    font-size: 13px;
}

.empty-card strong {
    color: var(--ink);
    font-size: 15px;
}

.scorer-list {
    border-top: 1px solid var(--line);
}

.scorer-row {
    min-height: 67px;
    display: grid;
    grid-template-columns: 24px 42px 1fr auto;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--line);
}

.scorer-photo,
.goal-player-photo,
.player-photo {
    overflow: hidden;
    display: grid;
    place-items: center;
    color: white;
    background: var(--field);
    border-radius: 50%;
    font-weight: 800;
}

.scorer-photo {
    width: 40px;
    height: 40px;
    font-size: 15px;
}

.scorer-photo img,
.goal-player-photo img,
.player-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.scorer-rank {
    color: #9aa19b;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.scorer-row > div strong,
.scorer-row > div small {
    display: block;
}

.scorer-row > div strong {
    font-size: 14px;
}

.scorer-row > div small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.goal-total {
    min-width: 28px;
    color: var(--field-dark);
    font-size: 23px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Admin-Stammdaten */
.admin-note {
    color: var(--muted);
    font-size: 13px;
}

.admin-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.season-list {
    min-height: 49px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.season-list > strong,
.season-button {
    padding: 7px 9px;
    color: var(--ink);
    background: #f8f1f2;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-size: 12px;
}

.season-list > strong small {
    color: var(--field);
    font-size: 9px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.season-button {
    cursor: pointer;
}

.season-form {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.team-admin-list,
.admin-match-list {
    border-top: 1px solid var(--line);
}

.team-admin-row {
    border-bottom: 1px solid var(--line);
}

.team-admin-row summary {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    cursor: pointer;
    list-style: none;
}

.team-admin-row summary::-webkit-details-marker {
    display: none;
}

.team-admin-row summary::before {
    content: "+";
    width: 20px;
    color: var(--muted);
}

.team-admin-row[open] summary::before {
    content: "–";
}

.team-admin-row summary strong {
    margin-right: auto;
}

.team-admin-row summary span {
    color: var(--muted);
    font-size: 12px;
}

.roster-list {
    padding: 2px 0 14px 40px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.player-admin-card {
    padding: 12px;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
    background: #faf5f6;
    border: 1px solid var(--line);
    border-radius: 3px;
}

.player-photo {
    width: 54px;
    height: 54px;
    font-size: 20px;
}

.player-admin-name strong,
.player-admin-name small {
    display: block;
}

.player-admin-name strong {
    font-size: 14px;
}

.player-admin-name small {
    margin-top: 2px;
    color: var(--field);
    font-size: 11px;
    font-weight: 750;
}

.player-edit-link {
    grid-column: 1 / -1;
    justify-self: end;
    color: var(--field);
    border-bottom: 1px solid rgba(180, 0, 27, .3);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.roster-list > small {
    grid-column: 1 / -1;
    color: var(--muted);
}

.inline-player-form {
    padding: 0 0 20px 40px;
    display: grid;
    grid-template-columns: 70px minmax(180px, 1fr) auto;
    gap: 8px;
}

.inline-player-form input {
    min-width: 0;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #c9ccc4;
    border-radius: 3px;
}

.inline-player-form .button {
    min-height: 42px;
}

.admin-match-row {
    min-height: 72px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 56px 84px;
    align-items: center;
    gap: 16px;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    text-decoration: none;
}

.admin-match-row:hover {
    background: #fafaf6;
}

.admin-match-row div strong,
.admin-match-row div small {
    display: block;
}

.admin-match-row div small,
.admin-match-row > span:last-child {
    color: var(--muted);
    font-size: 11px;
}

.admin-match-row > b {
    font-size: 19px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.status-text {
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.status-text--live {
    color: var(--field);
}

.goal-player {
    display: flex;
    align-items: center;
    gap: 11px;
}

.goal-player-photo {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    font-size: 14px;
}

.scorer-name-link {
    color: var(--ink);
    text-decoration: none;
}

.scorer-name-link:hover {
    color: var(--field);
}

/* Spieler bearbeiten */
.player-edit-heading {
    align-items: center;
}

.player-edit-photo {
    width: 136px;
    height: 136px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: white;
    background: var(--field);
    border: 7px solid white;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(80, 0, 12, .14);
    font-size: 48px;
    font-weight: 850;
}

.player-edit-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.player-edit-layout {
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
    align-items: start;
}

.player-edit-form {
    display: grid;
    gap: 9px;
}

.player-edit-form > label,
.form-pair label {
    margin-top: 8px;
    display: block;
    color: #554348;
    font-size: 13px;
    font-weight: 650;
}

.player-edit-form input,
.player-edit-form select,
.player-edit-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    color: var(--ink);
    background: white;
    border: 1px solid #d1c3c6;
    border-radius: 3px;
    outline: none;
}

.player-edit-form textarea {
    min-height: 130px;
    resize: vertical;
}

.player-edit-form input:focus,
.player-edit-form select:focus,
.player-edit-form textarea:focus {
    border-color: var(--field);
    box-shadow: 0 0 0 3px rgba(180, 0, 27, .1);
}

.player-edit-form > .button {
    margin-top: 16px;
}

.form-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.player-photo-card {
    position: sticky;
    top: 24px;
}

.privacy-note {
    margin: 20px 0 0;
    padding-top: 16px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 11px;
}

/* Öffentliches Spielerprofil */
.player-profile-hero {
    padding: clamp(28px, 5vw, 58px);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(24px, 5vw, 65px);
    color: white;
    background: var(--field);
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(90, 0, 14, .14);
}

.player-profile-photo {
    width: clamp(130px, 17vw, 210px);
    height: clamp(130px, 17vw, 210px);
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--field);
    background: white;
    border: 7px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    font-size: clamp(50px, 8vw, 90px);
    font-weight: 900;
}

.player-profile-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.player-profile-title p {
    margin: 0 0 7px;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
}

.player-profile-title h1 {
    margin: 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: .95;
    letter-spacing: -.055em;
}

.player-profile-title > span {
    margin-top: 15px;
    display: inline-block;
    padding: 5px 8px;
    color: var(--field-dark);
    background: white;
    border-radius: 2px;
    font-size: 11px;
    font-weight: 750;
}

.player-goal-stat {
    min-width: 150px;
    padding-left: 34px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-left: 1px solid rgba(255, 255, 255, .25);
}

.player-goal-stat strong {
    font-size: clamp(58px, 8vw, 92px);
    line-height: .8;
    letter-spacing: -.07em;
}

.player-goal-stat span {
    color: rgba(255, 255, 255, .72);
    font-size: 11px;
    line-height: 1.35;
}

.player-facts {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.player-facts div {
    min-height: 92px;
    padding: 19px 22px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    border-right: 1px solid var(--line);
}

.player-facts div:last-child {
    border-right: 0;
}

.player-facts span,
.player-facts strong {
    display: block;
}

.player-facts span {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.player-facts strong {
    font-size: 17px;
}

.player-bio,
.player-goals-panel {
    margin-top: 22px;
    padding: 28px 30px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.player-bio > p:last-child {
    max-width: 760px;
    margin: 12px 0 0;
    font-size: 17px;
    line-height: 1.65;
    white-space: pre-line;
}

.player-goal-row {
    min-height: 64px;
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 16px;
    color: var(--ink);
    border-top: 1px solid var(--line);
    text-decoration: none;
}

.player-goal-row > span,
.player-goal-row > small {
    color: var(--muted);
    font-size: 11px;
}

.player-goal-row:hover strong {
    color: var(--field);
}

.match-admin-heading {
    align-items: center;
}

.match-admin-heading h1 {
    font-size: clamp(27px, 4vw, 44px);
}

.large-compact-score {
    min-width: 150px;
    padding: 13px 18px;
    color: var(--accent);
    background: var(--field-dark);
    border-radius: 3px;
    font-size: 34px;
    font-weight: 750;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.quick-goal-section {
    border-top: 4px solid var(--field);
}

.quick-goal-board {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-team-goal {
    position: relative;
    min-width: 0;
    min-height: 245px;
    padding: 22px 16px 18px;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    justify-items: center;
    gap: 8px;
    color: white;
    background: var(--field);
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

.quick-team-goal:hover {
    background: #9c0017;
    transform: translateY(-2px);
}

.quick-team-logo {
    width: 62px;
    height: 62px;
    padding: 8px;
    display: grid;
    place-items: center;
    color: var(--field);
    background: white;
    border-radius: 50%;
    font-size: 25px;
    font-weight: 850;
}

.quick-team-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.quick-team-name {
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    font-weight: 750;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-team-goal > strong {
    align-self: center;
    font-size: 48px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.quick-team-goal > i {
    align-self: end;
    justify-self: center;
    color: white;
    background: transparent;
    border: 0;
    font-size: 38px;
    font-style: normal;
    font-weight: 300;
    line-height: 1;
}

.goal-dialog {
    width: min(680px, calc(100% - 28px));
    max-height: min(82vh, 760px);
    margin: auto;
    padding: 0;
    color: var(--ink);
    background: var(--surface);
    border: 0;
    border-radius: 6px;
    box-shadow: 0 28px 90px rgba(56, 0, 9, .35);
}

.goal-dialog::backdrop {
    background: rgba(39, 0, 6, .72);
    backdrop-filter: blur(3px);
}

.goal-dialog-head {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: white;
    background: var(--field);
}

.goal-dialog-head small {
    color: rgba(255, 255, 255, .7);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.goal-dialog-head h2 {
    margin: 2px 0 0;
    font-size: 25px;
    letter-spacing: -.03em;
}

.goal-dialog-head > button {
    width: 38px;
    height: 38px;
    color: white;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.goal-dialog-hint {
    margin: 0;
    padding: 17px 24px 0;
    color: var(--muted);
    font-size: 12px;
}

.player-tap-grid {
    padding: 16px 24px 26px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    overflow-y: auto;
}

.player-tap-button {
    width: 100%;
    min-height: 150px;
    padding: 15px 10px;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 8px;
    color: var(--ink);
    background: #faf5f6;
    border: 1px solid var(--line);
    border-radius: 4px;
    cursor: pointer;
}

.player-tap-button:hover {
    color: var(--field);
    background: #fff;
    border-color: #c8949c;
}

.player-tap-photo {
    width: 70px;
    height: 70px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: white;
    background: var(--field);
    border-radius: 50%;
    font-size: 24px;
    font-weight: 850;
}

.player-tap-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.player-tap-button strong {
    max-width: 100%;
    font-size: 13px;
    line-height: 1.15;
    text-align: center;
}

.player-tap-button small {
    color: var(--muted);
    font-size: 10px;
}

.player-tap-grid > .empty-state {
    grid-column: 1 / -1;
}

.public-match-link {
    margin-top: 24px;
    display: inline-block;
    color: var(--ink);
    border-bottom: 1px solid currentColor;
    font-size: 12px;
    text-decoration: none;
}

/* Öffentliche VfV-06-Spielgrafik */
.match-page {
    overflow: hidden;
    background: #a80018;
}

.match-page .site-header {
    display: none;
}

.match-page .page-shell {
    width: 100%;
    padding: 0;
}

.match-hero {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(28px, 5vw, 72px);
    display: grid;
    grid-template-rows: 1fr;
    overflow: hidden;
    color: white;
    background: #b4001b;
    isolation: isolate;
}

.football-field,
.football-field::before,
.football-field::after,
.center-spot,
.penalty-box {
    position: absolute;
    pointer-events: none;
}

.football-field {
    z-index: -1;
    inset: clamp(22px, 4vw, 58px);
    border: 2px solid rgba(255, 255, 255, .12);
}

.football-field::before {
    content: "";
    top: 0;
    bottom: 0;
    left: 50%;
    border-left: 2px solid rgba(255, 255, 255, .1);
}

.football-field::after {
    content: "";
    top: 50%;
    left: 50%;
    width: min(26vw, 330px);
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.center-spot {
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    background: rgba(255, 255, 255, .15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.penalty-box {
    top: 50%;
    width: 18%;
    height: 48%;
    border: 2px solid rgba(255, 255, 255, .1);
    transform: translateY(-50%);
}

.penalty-box--left {
    left: -2px;
}

.penalty-box--right {
    right: -2px;
}

.match-hero-score {
    width: min(1500px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    align-items: center;
    gap: clamp(28px, 6vw, 100px);
}

.hero-team {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: clamp(20px, 3vh, 34px);
    text-align: center;
}

.hero-logo {
    width: clamp(140px, 17vw, 250px);
    height: clamp(140px, 17vw, 250px);
    padding: clamp(18px, 2vw, 30px);
    display: grid;
    place-items: center;
    background: white;
    border: 5px solid rgba(255, 255, 255, .38);
    border-radius: 50%;
    box-shadow: 0 24px 50px rgba(74, 0, 11, .28);
}

.hero-team img,
.logo-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    object-fit: contain;
}

.logo-placeholder {
    color: #b4001b;
    font-size: clamp(58px, 8vw, 110px);
    font-weight: 900;
}

.hero-team h1 {
    max-width: 380px;
    margin: 0;
    font-size: clamp(23px, 3.2vw, 48px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    text-shadow: 0 3px 18px rgba(70, 0, 10, .25);
}

.hero-score {
    display: flex;
    align-items: center;
    gap: clamp(15px, 2.5vw, 38px);
    font-variant-numeric: tabular-nums;
}

.hero-score strong {
    min-width: .66em;
    color: white;
    font-size: clamp(125px, 18vw, 275px);
    font-weight: 850;
    line-height: .76;
    letter-spacing: -.09em;
    text-shadow: 0 18px 40px rgba(74, 0, 11, .3);
}

.hero-score span {
    color: rgba(255, 255, 255, .62);
    font-size: clamp(58px, 7vw, 110px);
    font-weight: 250;
}

/* Bildverwaltung */
.team-logo-admin {
    margin: 0 0 18px 40px;
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #faf4f5;
    border: 1px solid var(--line);
    border-radius: 3px;
}

.team-logo-admin > img {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    object-fit: contain;
}

.team-logo-admin form {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
}

.team-logo-admin label {
    grid-column: 1 / -1;
    font-size: 12px;
    font-weight: 650;
}

.team-logo-admin input {
    min-width: 0;
    font-size: 12px;
}

.team-logo-admin .button {
    min-height: 38px;
    font-size: 12px;
}

.team-logo-admin > div {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.team-logo-admin > div strong {
    font-size: 14px;
}

.team-edit-link {
    width: fit-content;
    color: var(--field);
    border-bottom: 1px solid rgba(180, 0, 27, .3);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.button--danger {
    color: white;
    background: var(--danger);
    border-color: #7f0013;
}

.danger-zone {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #e5b9c0;
}

.danger-zone h2,
.danger-zone h3 {
    margin: 0 0 5px;
    color: var(--danger);
}

.danger-zone h3 {
    font-size: 15px;
}

.danger-zone p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 12px;
}

.team-edit-heading {
    align-items: center;
}

.team-edit-logo {
    width: 136px;
    height: 136px;
    padding: 16px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: white;
    background: var(--field);
    border: 7px solid white;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(80, 0, 12, .14);
    font-size: 48px;
    font-weight: 850;
}

.team-edit-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.team-edit-layout {
    align-items: start;
}

.team-edit-roster {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.team-edit-roster > a {
    min-height: 76px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    background: #faf5f6;
    border: 1px solid var(--line);
    border-radius: 3px;
    text-decoration: none;
}

.team-edit-roster .player-photo {
    width: 50px;
    height: 50px;
}

.team-edit-roster strong,
.team-edit-roster small {
    display: block;
}

.team-edit-roster small,
.team-edit-roster > a > span {
    color: var(--muted);
    font-size: 10px;
}

.team-edit-roster > a:hover {
    border-color: #c89da4;
}

.danger-zone--team {
    border-top: 4px solid var(--danger);
}

.danger-zone--team .button {
    min-width: 190px;
}

.match-admin-links {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.match-admin-links .public-match-link {
    margin-top: 0;
}

/* Moderatoransicht */
.moderator-page {
    background: #eee8e9;
}

.moderator-page .page-shell {
    width: min(1380px, calc(100% - 40px));
    padding-top: 34px;
}

.moderator-scorebar {
    min-height: 132px;
    padding: 24px clamp(22px, 4vw, 55px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 30px;
    color: white;
    background: var(--field);
    border-radius: 4px;
    box-shadow: 0 16px 40px rgba(80, 0, 12, .15);
}

.moderator-team {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: clamp(18px, 2vw, 28px);
    font-weight: 800;
    letter-spacing: -.025em;
}

.moderator-team--away {
    justify-content: flex-end;
    text-align: right;
}

.moderator-team img {
    width: 70px;
    height: 70px;
    padding: 7px;
    object-fit: contain;
    background: white;
    border-radius: 50%;
}

.moderator-score {
    display: flex;
    align-items: center;
    gap: 13px;
    font-variant-numeric: tabular-nums;
}

.moderator-score strong {
    min-width: .65em;
    font-size: clamp(54px, 7vw, 88px);
    line-height: .8;
    text-align: center;
    letter-spacing: -.07em;
}

.moderator-score span {
    color: rgba(255, 255, 255, .55);
    font-size: 35px;
    font-weight: 250;
}

.moderator-meta {
    margin: 34px 0 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.moderator-meta h1 {
    margin: 3px 0 0;
    font-size: clamp(28px, 4vw, 43px);
    line-height: 1;
    letter-spacing: -.045em;
}

.moderator-meta > span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
}

.moderator-meta > span i {
    width: 7px;
    height: 7px;
    background: var(--field);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(180, 0, 27, .1);
    animation: pulse 2s infinite;
}

.moderator-rosters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 20px;
}

.moderator-roster {
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 4px;
}

.moderator-roster-title {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.moderator-roster-title h2 {
    margin: 0;
    font-size: 20px;
}

.moderator-roster-title span {
    color: var(--muted);
    font-size: 10px;
}

.moderator-player-list {
    display: grid;
    gap: 8px;
}

.moderator-player {
    min-height: 84px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    background: #faf6f7;
    border: 1px solid var(--line);
    border-radius: 3px;
}

.moderator-player-photo {
    width: 58px;
    height: 58px;
    overflow: hidden;
    display: grid;
    place-items: center;
    color: white;
    background: var(--field);
    border-radius: 50%;
    font-size: 20px;
    font-weight: 850;
}

.moderator-player-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.moderator-player-main {
    min-width: 0;
}

.moderator-player-main p {
    margin: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.moderator-player-main p b {
    margin-right: 3px;
    color: var(--field);
}

.moderator-player-main > span {
    margin-top: 3px;
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.moderator-goals {
    display: flex;
    align-items: stretch;
    gap: 5px;
}

.moderator-goals > div {
    min-width: 62px;
    padding: 8px 7px;
    display: grid;
    place-items: center;
    background: white;
    border: 1px solid var(--line);
    border-radius: 3px;
}

.moderator-goals strong,
.moderator-goals span {
    display: block;
    text-align: center;
}

.moderator-goals strong {
    color: var(--field);
    font-size: 25px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.moderator-goals span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.moderator-today:not(.is-zero) {
    color: white;
    background: var(--field);
    border-color: var(--field);
}

.moderator-today:not(.is-zero) strong,
.moderator-today:not(.is-zero) span {
    color: white;
}

@keyframes pulse {
    50% { opacity: .45; }
}

@media (max-width: 760px) {
    .site-header,
    .page-shell {
        width: min(100% - 28px, 1120px);
    }

    .page-shell {
        padding-top: 34px;
    }

    .scoreline {
        min-height: 270px;
        padding: 35px 22px;
        grid-template-columns: 1fr 1.15fr 1fr;
        gap: 8px;
    }

    .team h1 {
        font-size: clamp(16px, 5vw, 25px);
    }

    .score strong {
        font-size: clamp(58px, 18vw, 92px);
    }

    .score {
        gap: 7px;
    }

    .match-meta,
    .updated {
        padding-left: 18px;
        padding-right: 18px;
    }

    .events-panel,
    .admin-card,
    .login-card {
        padding-left: 20px;
        padding-right: 20px;
    }

    .admin-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .compact-score {
        min-width: 0;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .player-edit-layout {
        grid-template-columns: 1fr;
    }

    .player-photo-card {
        position: static;
    }

    .public-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .public-heading > p {
        text-align: left;
    }

    .public-grid {
        grid-template-columns: 1fr;
    }

    .match-list-section,
    .scorer-section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .inline-player-form {
        padding-left: 0;
        grid-template-columns: 58px 1fr;
    }

    .inline-player-form .button {
        grid-column: 1 / -1;
    }

    .roster-list {
        padding-left: 0;
        grid-template-columns: 1fr;
    }

    .player-profile-hero {
        grid-template-columns: auto 1fr;
    }

    .player-goal-stat {
        grid-column: 1 / -1;
        padding: 20px 0 0;
        border-top: 1px solid rgba(255, 255, 255, .25);
        border-left: 0;
    }

    .player-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-facts div:nth-child(2) {
        border-right: 0;
    }

    .player-facts div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .player-tap-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-edit-roster {
        grid-template-columns: 1fr;
    }

    .moderator-page .page-shell {
        width: min(100% - 20px, 1380px);
    }

    .moderator-scorebar {
        padding: 20px 14px;
        gap: 10px;
    }

    .moderator-team {
        align-items: center;
        flex-direction: column;
        gap: 8px;
        font-size: 14px;
        text-align: center;
    }

    .moderator-team--away {
        flex-direction: column-reverse;
    }

    .moderator-team img {
        width: 52px;
        height: 52px;
    }

    .moderator-rosters {
        grid-template-columns: 1fr;
    }

    .match-hero {
        padding: 26px 18px 22px;
    }

    .match-hero-score {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 10px;
    }

    .hero-logo {
        width: clamp(82px, 23vw, 126px);
        height: clamp(82px, 23vw, 126px);
        padding: 12px;
        border-width: 3px;
    }

    .hero-team h1 {
        font-size: clamp(16px, 5vw, 25px);
    }

    .hero-score {
        gap: 6px;
    }

    .hero-score strong {
        font-size: clamp(68px, 20vw, 110px);
    }

    .hero-score span {
        font-size: 38px;
    }

    .team-logo-admin {
        margin-left: 0;
        align-items: flex-start;
    }

    .team-logo-admin form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 440px) {
    .site-header {
        height: 66px;
    }

    .header-actions {
        gap: 12px;
    }

    .scoreline {
        min-height: 245px;
    }

    .score strong {
        font-size: 56px;
    }

    .score span {
        font-size: 32px;
    }

    .quick-team-goal {
        min-height: 215px;
        padding-left: 9px;
        padding-right: 9px;
    }

    .quick-team-logo {
        width: 54px;
        height: 54px;
    }

    .quick-team-name {
        font-size: 11px;
    }

    .player-tap-grid {
        padding: 14px;
    }

    .moderator-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .moderator-player {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .moderator-player-photo {
        width: 48px;
        height: 48px;
    }

    .moderator-goals {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .section-heading {
        align-items: flex-start;
    }

    .team-choice {
        grid-template-columns: 1fr;
    }

    .admin-match-row {
        padding: 12px 0;
        grid-template-columns: 50px minmax(0, 1fr) 48px;
    }

    .admin-match-row > span:last-child {
        display: none;
    }

    .match-admin-heading {
        align-items: stretch;
    }

    .player-edit-heading {
        align-items: center;
    }

    .team-edit-heading {
        align-items: center;
    }

    .player-edit-photo {
        width: 100px;
        height: 100px;
    }

    .team-edit-logo {
        width: 100px;
        height: 100px;
    }

    .form-pair,
    .player-profile-hero {
        grid-template-columns: 1fr;
    }

    .player-profile-photo {
        width: 130px;
        height: 130px;
    }

    .player-goal-stat {
        grid-column: auto;
    }

    .player-facts {
        grid-template-columns: 1fr;
    }

    .player-facts div,
    .player-facts div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .player-facts div:last-child {
        border-bottom: 0;
    }

    .player-goal-row {
        grid-template-columns: 38px 1fr;
    }

    .player-goal-row small {
        grid-column: 2;
    }

}
