* {
    box-sizing: border-box;
}

html {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #111827;
}

body {
    margin: 0;
}

.container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding: 16px;
}

.card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

h1 {
    font-size: 28px;
    margin: 0 0 10px;
}

h2 {
    font-size: 22px;
    margin: 0 0 12px;
}

h3 {
    font-size: 18px;
    margin: 0 0 10px;
}

p {
    line-height: 1.5;
}

a {
    color: inherit;
}

ul {
    padding-left: 20px;
}

.button-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.button,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    width: 100%;
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    background: #111827;
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button-secondary,
button.secondary {
    background: #e5e7eb;
    color: #111827;
}

.button-danger,
button.danger {
    background: #991b1b;
    color: #ffffff;
}

.button-small,
button.small {
    min-height: 40px;
    font-size: 15px;
    padding: 8px 12px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    background: #ffffff;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.form-grid {
    display: grid;
    gap: 14px;
}

.form-row {
    margin-bottom: 14px;
}

.notice,
.success,
.error {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.notice {
    background: #fef3c7;
}

.success {
    background: #dcfce7;
}

.error {
    background: #fee2e2;
}

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
    background: #ffffff;
}

.muted {
    color: #6b7280;
    font-size: 14px;
}

.meta {
    color: #6b7280;
    font-size: 14px;
    margin-top: 4px;
}

.nav {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.match-card {
    display: grid;
    gap: 12px;
}

.score-row {
    display: grid;
    grid-template-columns: 1fr 74px 22px 74px 1fr;
    align-items: center;
    gap: 8px;
}

.score-input {
    min-height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
}

.team-name {
    font-weight: 700;
}

.team-name.left {
    text-align: right;
}

.team-name.right {
    text-align: left;
}

.phase-title {
    margin-top: 24px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

th {
    font-size: 14px;
    color: #374151;
}

.footer-links {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin: 24px 0 8px;
    color: #6b7280;
    font-size: 14px;
}

@media (min-width: 720px) {
    .button-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav {
        grid-template-columns: repeat(3, 1fr);
    }
}