:root {
    --bg: #f6f2e9;
    --surface: #fffaf1;
    --surface-2: #ffffff;
    --text: #241b13;
    --muted: #735f4c;
    --line: rgba(66, 44, 25, .14);
    --lion: #d88718;
    --lion-dark: #7a3f00;
    --rooster: #c92d22;
    --rooster-dark: #751a15;
    --good: #207245;
    --warn: #b26b00;
    --danger: #b3261e;
    --shadow: 0 18px 45px rgba(75, 49, 21, .12);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(216, 135, 24, .17), transparent 28rem),
        radial-gradient(circle at top right, rgba(201, 45, 34, .13), transparent 24rem),
        var(--bg);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(246, 242, 233, .92);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 12px 18px;
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}
.brand strong { display: block; font-size: 1rem; }
.brand small { display: block; color: var(--muted); font-size: .76rem; }
.brand__icon { font-size: 1.6rem; }
.main-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.main-nav a {
    padding: 8px 10px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 700;
    font-size: .9rem;
}
.main-nav a:hover, .main-nav .nav-admin {
    background: var(--surface);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line);
}
.page-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 18px 60px;
}
.site-footer {
    border-top: 1px solid var(--line);
    padding: 24px 18px;
    color: var(--muted);
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    flex-wrap: wrap;
}
.site-footer strong { color: var(--text); display: block; }

.hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 22px;
    align-items: stretch;
    margin-top: 12px;
}
.hero-card, .card, .panel {
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,250,241,.95));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.hero-card { padding: clamp(22px, 4vw, 42px); }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(216, 135, 24, .13);
    color: var(--lion-dark);
    font-weight: 800;
    font-size: .85rem;
}
h1 { font-size: clamp(2.1rem, 6vw, 4.7rem); line-height: .95; margin: 18px 0; letter-spacing: -0.06em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 14px; letter-spacing: -0.035em; }
h3 { margin: 0 0 10px; font-size: 1.1rem; }
p { line-height: 1.6; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 68ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}
.btn--primary { background: var(--text); color: #fff; border-color: var(--text); }
.btn--lion { background: var(--lion); color: #fff; border-color: var(--lion); }
.btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--small { min-height: 34px; padding: 7px 10px; font-size: .86rem; }
.btn:hover { transform: translateY(-1px); }

.poster {
    min-height: 360px;
    overflow: hidden;
    position: relative;
}
.poster img, .poster-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 360px;
}
.poster-placeholder {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, rgba(216,135,24,.95), rgba(201,45,34,.9));
    color: #fff;
}
.poster-placeholder strong { font-size: clamp(2rem, 5vw, 4rem); line-height: .9; display: block; }
.poster-placeholder span { margin-top: 10px; display: block; font-weight: 800; opacity: .9; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section { margin-top: 24px; }
.card, .panel { padding: 18px; }
.card--lion { border-top: 5px solid var(--lion); }
.card--rooster { border-top: 5px solid var(--rooster); }
.muted { color: var(--muted); }
.kpi { font-size: 2.3rem; font-weight: 900; letter-spacing: -0.04em; margin: 0; }
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(36, 27, 19, .07);
    color: var(--muted);
    font-size: .8rem;
    font-weight: 800;
}
.badge--open { background: rgba(32,114,69,.12); color: var(--good); }
.badge--closed { background: rgba(179,38,30,.12); color: var(--danger); }
.badge--draft { background: rgba(178,107,0,.12); color: var(--warn); }
.scoreboard {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: center;
}
.score-team {
    padding: 18px;
    border-radius: 16px;
    background: rgba(255,255,255,.72);
    border: 1px solid var(--line);
}
.score-team:last-child { text-align: right; }
.score-number { font-size: clamp(2.8rem, 8vw, 5rem); font-weight: 950; line-height: .9; letter-spacing: -0.07em; }
.vs { font-size: 1rem; color: var(--muted); font-weight: 900; }

.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: var(--surface-2); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 11px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: rgba(36, 27, 19, .05); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
.round-title { margin: 22px 0 10px; display: flex; align-items: center; gap: 10px; }
.result { font-weight: 900; white-space: nowrap; }
.result--pending { color: var(--muted); }

.player-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.player-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.65);
}
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery figure { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { padding: 10px 12px; color: var(--muted); font-size: .9rem; }

.flash { padding: 12px 14px; border-radius: 14px; margin: 0 0 16px; font-weight: 800; border: 1px solid var(--line); background: var(--surface-2); }
.flash--ok { color: var(--good); background: rgba(32,114,69,.08); }
.flash--error { color: var(--danger); background: rgba(179,38,30,.08); }

.admin-layout { display: grid; grid-template-columns: 230px 1fr; gap: 18px; align-items: start; }
.admin-menu { position: sticky; top: 78px; display: grid; gap: 8px; }
.admin-menu a { padding: 11px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font-weight: 800; color: var(--muted); }
.admin-menu a:hover { color: var(--text); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row { display: grid; gap: 6px; margin-bottom: 12px; }
label { font-weight: 850; color: var(--text); }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 10px 11px;
    font: inherit;
    color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; }
.help { font-size: .9rem; color: var(--muted); margin-top: 4px; }
.status-dot { width: 10px; height: 10px; display: inline-block; border-radius: 999px; background: var(--muted); }
.status-dot.played { background: var(--good); }
.status-dot.cancelled { background: var(--danger); }

@media (max-width: 860px) {
    .site-header__inner { align-items: flex-start; flex-direction: column; }
    .main-nav { justify-content: flex-start; }
    .hero, .grid-2, .grid-3, .grid-4, .admin-layout, .form-grid { grid-template-columns: 1fr; }
    .scoreboard { grid-template-columns: 1fr; }
    .score-team:last-child { text-align: left; }
    .vs { display: none; }
    .gallery { grid-template-columns: 1fr; }
    .admin-menu { position: static; }
    h1 { font-size: 2.6rem; }
}
