:root {
    color-scheme: light;
    --navy: #172d50;
    --rose: #e85d91;
    --rose-light: #fff0f5;
    --ink: #202938;
    --muted: #697586;
    --line: #e0e5ec;
    --background: #f5f7fb;
    --white: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    line-height: 1.5;
}

a { color: var(--navy); overflow-wrap: anywhere; }
.container { width: min(100% - 32px, 960px); margin: 0 auto; }
.narrow { max-width: 620px; padding-top: 40px; }

.site-header {
    padding: 36px 0 32px;
    color: white;
    background: var(--navy);
    border-bottom: 5px solid var(--rose);
}

.site-header h1, .result-card h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
}

.site-header p { margin-bottom: 0; }
.eyebrow {
    margin: 0 0 8px;
    color: var(--rose);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.site-header .eyebrow { color: var(--rose); }
.intro { padding: 24px 0 12px; }
.intro h2 { margin-bottom: 6px; }
.intro p { color: var(--muted); margin-top: 0; }

.match-card, .result-card, .empty-state {
    margin: 16px 0;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 3px 12px rgb(23 45 80 / 5%);
}

.match-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: .9rem;
}

.championship {
    padding: 4px 10px;
    color: var(--navy);
    background: #edf2fa;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}

.teams { margin: 14px 0 4px; font-size: 1.15rem; }
.teams span { color: var(--rose); }
.venue { margin: 0 0 18px; color: var(--muted); font-size: .9rem; }

.roles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 12px;
    margin-top: 18px;
}

.role {
    padding: 14px;
    background: #fafbfe;
    border: 1px solid var(--line);
    border-radius: 10px;
    min-width: 0;
}

.role-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.role h4 { margin: 0; color: var(--navy); }
.count { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.people { padding-left: 20px; margin: 12px 0; }
.nobody { color: var(--muted); font-size: .9rem; margin: 12px 0; }

.signup { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.signup summary { color: var(--navy); font-weight: 700; cursor: pointer; }
.signup form { display: grid; gap: 12px; margin-top: 14px; }
label { display: grid; gap: 5px; font-size: .9rem; font-weight: 650; }

input {
    width: 100%;
    min-width: 0;
    padding: 10px 11px;
    font: inherit;
    border: 1px solid #c9d1de;
    border-radius: 7px;
    background: white;
}

input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
    outline: 3px solid #f3a1bf;
    outline-offset: 2px;
}

button {
    padding: 11px 14px;
    color: white;
    background: var(--navy);
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

button:hover { filter: brightness(1.12); }
button.secondary { margin-top: 8px; color: var(--navy); background: #edf2fa; }
button.danger { background: #a51d3d; }

.notice {
    margin: 18px 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
}
.notice.error { border-color: #d65a6c; background: #fff1f2; }
.notice.warning { border-color: #edc4d3; background: var(--rose-light); }
.notice p:last-child { margin-bottom: 0; }

.summary {
    margin: 18px 0;
    padding: 16px;
    background: #f6f8fc;
    border-radius: 9px;
}
.summary p { margin: 5px 0; }

.site-footer {
    padding: 28px 16px;
    color: var(--muted);
    text-align: center;
    font-size: .85rem;
}

@media (max-width: 520px) {
    .match-card, .result-card, .empty-state { padding: 15px; }
    .match-top { align-items: flex-start; flex-direction: column; gap: 5px; }
    .teams { font-size: 1.05rem; }
}
