:root {
    --peach: #d5a89a;
    --peach-soft: #e7c7bc;
    --ink: #1f171d;
    --ink-mid: #2b2028;
    --ink-soft: #3d2c36;
    --copper: #a8634f;
    --sand: #f4e1d9;
    --mist: #f6ece7;
    --success: #5a8d65;
    --error: #9d4b46;
    --info: #4d6b8a;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background: linear-gradient(180deg, var(--peach) 0%, #ba8f84 20%, #342730 42%, #1d171d 100%);
    color: var(--mist);
    min-height: 100%;
}

.bg-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(130% 80% at 80% 20%, rgba(45, 30, 37, 0.28) 0, transparent 55%),
        linear-gradient(170deg, transparent 36%, rgba(31, 23, 29, 0.78) 37%),
        linear-gradient(180deg, transparent 63%, rgba(15, 12, 16, 0.7) 64%);
}

body.intro-playing {
    overflow: hidden;
}

body.intro-playing .bg-layer,
body.intro-playing .topbar,
body.intro-playing .container,
body.intro-playing .footer {
    visibility: hidden;
}

.first-visit-intro {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: block;
    background: #000;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: auto;
}

.first-visit-intro[hidden] {
    display: none !important;
}

.first-visit-gate {
    position: absolute;
    inset: 0;
    display: none;
    place-content: center;
    gap: 0.5rem;
    text-align: center;
    padding: 1rem;
    background:
        radial-gradient(120% 120% at 50% 35%, rgba(34, 24, 31, 0.9), rgba(8, 6, 9, 0.94)),
        linear-gradient(180deg, rgba(33, 23, 29, 0.9), rgba(8, 6, 9, 0.95));
    z-index: 2;
}

.first-visit-intro.is-gated .first-visit-gate {
    display: grid;
}

.first-visit-gate-eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 700;
    color: #e8c6ba;
}

.first-visit-gate-logo {
    width: clamp(120px, 28vw, 210px);
    height: auto;
    margin: 0 auto 0.2rem;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}

.first-visit-gate h2 {
    margin: 0;
    font-size: clamp(1.4rem, 4vw, 2rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.first-visit-gate p {
    margin: 0 0 0.4rem;
}

.first-visit-intro.is-active {
    opacity: 1;
}

.first-visit-intro.is-fading,
.first-visit-intro.is-hidden {
    opacity: 0;
}

.first-visit-intro.is-loading {
    opacity: 1;
    background: #050505;
}

.first-visit-intro-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: opacity 0.6s ease;
}

.first-visit-intro.is-fading .first-visit-intro-video,
.first-visit-intro.is-loading .first-visit-intro-video {
    opacity: 0;
}

.first-visit-intro.is-gated .first-visit-intro-video {
    opacity: 0;
}

.first-visit-intro.is-loading .first-visit-intro-video {
    transition: none;
}

.first-visit-loader {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 0.7rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.first-visit-intro.is-loading .first-visit-loader {
    opacity: 1;
}

.first-visit-loader-crest {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.42));
    animation: firstVisitCrestPulse 1.6s ease-in-out infinite;
}

.first-visit-loader-text {
    text-align: center;
    letter-spacing: 0.08em;
    font-weight: 800;
    text-transform: uppercase;
    color: #f8efeb;
}

@keyframes firstVisitCrestPulse {
    from {
        transform: scale(0.96) rotate(-1deg);
        filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
    }
    50% {
        transform: scale(1.04) rotate(1deg);
        filter: drop-shadow(0 10px 18px rgba(255, 195, 145, 0.45));
    }
    to {
        transform: scale(0.96) rotate(-1deg);
        filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
    }
}

@keyframes crestSweep {
    from {
        transform: translateX(-180%) rotate(18deg);
    }
    to {
        transform: translateX(320%) rotate(18deg);
    }
}

@keyframes logoNudge {
    0% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    20% {
        transform: translateY(-2px) rotate(-1.6deg) scale(1.02);
    }
    45% {
        transform: translateY(0) rotate(1.5deg) scale(1.01);
    }
    70% {
        transform: translateY(-1px) rotate(-0.9deg) scale(1.015);
    }
    100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    background: linear-gradient(180deg, rgba(18, 13, 18, 0.95), rgba(28, 19, 25, 0.85));
    border-bottom: 1px solid rgba(244, 225, 217, 0.18);
    backdrop-filter: blur(4px);
}

.brand {
    text-decoration: none;
    color: var(--sand);
    font-weight: 900;
    letter-spacing: 0.04em;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    line-height: 0.9;
    text-transform: uppercase;
}

.brand strong {
    font-size: 1.05rem;
}

.brand-spacer {
    min-height: 1px;
}

.topbar-logo {
    position: absolute;
    left: 0.9rem;
    top: 0.5rem;
    transform: none;
    z-index: 24;
}

.topnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.topnav a {
    color: var(--sand);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(244, 225, 217, 0.24);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, background 0.2s ease;
}

.topnav a:hover {
    background: rgba(168, 99, 79, 0.32);
    transform: translateY(-1px);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    justify-self: end;
    justify-content: flex-end;
}

.site-logo-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(244, 225, 217, 0.3);
    border-radius: 16px;
    width: 120px;
    height: 120px;
    padding: 0;
    background:
        radial-gradient(120% 120% at 30% 20%, rgba(255, 219, 180, 0.24), transparent 45%),
        linear-gradient(165deg, rgba(77, 52, 60, 0.95), rgba(26, 19, 24, 0.96));
    box-shadow:
        inset 0 0 0 1px rgba(255, 238, 219, 0.15),
        0 12px 26px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease, filter 0.35s ease;
}

.site-logo-link::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: 12px;
    border: 1px solid rgba(255, 220, 188, 0.35);
    pointer-events: none;
}

.site-logo-link::after {
    content: "";
    position: absolute;
    top: -130%;
    left: -40%;
    width: 55%;
    height: 330%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 35%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.06) 65%,
        transparent 100%
    );
    transform: rotate(18deg);
    pointer-events: none;
    opacity: 0;
}

.site-logo-link:hover {
    transform: translateY(-3px) scale(1.04) rotate(-1.5deg);
    border-color: rgba(255, 222, 196, 0.7);
    box-shadow:
        inset 0 0 0 1px rgba(255, 242, 226, 0.24),
        0 18px 36px rgba(0, 0, 0, 0.45),
        0 0 24px rgba(255, 183, 132, 0.3);
    filter: saturate(1.08);
}

.site-logo-link:hover::after {
    opacity: 1;
    animation: crestSweep 0.9s ease;
}

.site-logo-link:hover .site-logo {
    transform: scale(1.07) rotate(1.5deg);
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35));
}

.site-logo-link.logo-nudge {
    animation: logoNudge 0.9s ease;
}

.site-logo {
    width: 102px;
    height: 102px;
    object-fit: contain;
    object-position: center center;
    display: block;
    margin: 0 auto;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.container {
    position: relative;
    z-index: 5;
    width: min(1150px, 96%);
    margin: 2.9rem auto 2rem;
}

.page-admin .container {
    width: 100%;
    max-width: none;
    margin: 2.6rem auto 1.3rem;
    padding: 0 0.9rem;
}

.page-player .container {
    width: 100%;
    max-width: none;
    margin: 2.6rem auto 1.3rem;
    padding: 0 0.9rem;
}

.page-home .container {
    width: 100%;
    max-width: none;
    margin: 2.6rem auto 1.3rem;
    padding: 0 0.9rem;
}

.page-rules .container {
    width: 100%;
    max-width: none;
    margin: 2.6rem auto 1.3rem;
    padding: 0 0.9rem;
}

.page-player .footer {
    width: 100%;
    max-width: none;
    padding: 0 0.9rem;
}

.player-board {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.7rem;
    align-items: start;
}

.home-board {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.7rem;
    align-items: start;
}

.home-hero {
    grid-column: span 12;
    margin-top: 0;
}

.home-feed {
    grid-column: span 8;
    margin-top: 0;
}

.home-side {
    grid-column: span 4;
    margin-top: 0;
}

.home-post-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-post {
    height: 100%;
}

.page-home .home-hero,
.page-home .home-feed,
.page-home .home-side,
.page-home .home-post,
.page-home .home-side .card {
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
    transform: translateY(0);
    will-change: transform;
}

.page-home .home-post:hover,
.page-home .home-side .card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 223, 198, 0.36);
}

.page-home .home-hero:hover,
.page-home .home-feed:hover,
.page-home .home-side:hover {
    transform: translateY(-2px);
}

.page-home .home-post:active,
.page-home .home-side .card:active {
    transform: translateY(-1px) scale(1.005);
}

.home-post-meta {
    margin: 0 0 0.3rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.82;
}

.home-post-list {
    margin: 0.35rem 0 0.55rem;
    padding-left: 1.05rem;
}

.home-post-list li {
    margin: 0.2rem 0;
}

.home-post-video {
    width: 100%;
    margin-top: 0.55rem;
    border-radius: 10px;
    border: 1px solid rgba(242, 214, 203, 0.2);
    background: #000;
}

.home-top-list {
    margin: 0;
    padding-left: 1.1rem;
}

.home-top-list li {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin: 0.35rem 0;
}

.home-top-sub {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    opacity: 0.82;
}

.rules-hero {
    margin-top: 0;
}

.rules-grid-wrap {
    margin-top: 0.7rem;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.rules-card h2 {
    margin-top: 0;
    margin-bottom: 0.45rem;
    font-size: 1.05rem;
}

.rules-card p {
    margin: 0.32rem 0 0.5rem;
    line-height: 1.4;
}

.rules-card ul {
    margin: 0.2rem 0 0.55rem;
    padding-left: 1.05rem;
}

.rules-card li {
    margin: 0.2rem 0;
}

.player-block {
    margin-top: 0;
}

.player-block-leaderboard {
    grid-column: span 4;
}

.player-block-header {
    grid-column: span 8;
}

.player-block-waiting {
    grid-column: span 12;
}

.player-block-team {
    grid-column: span 5;
}

.player-block-captain {
    grid-column: span 7;
}

.player-block-cards {
    grid-column: span 12;
}

.player-hero-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: start;
}

.player-hero-head p {
    margin: 0.2rem 0;
}

.player-hero-image-box {
    width: 170px;
    min-height: 92px;
    border-radius: 10px;
    border: 1px solid rgba(247, 227, 219, 0.28);
    background: rgba(36, 27, 34, 0.62);
    display: grid;
    place-items: center;
    justify-self: end;
}

.player-hero-image {
    width: 138px;
    height: auto;
    object-fit: contain;
    display: block;
}

.player-row-highlight td {
    background: rgba(255, 214, 138, 0.18);
}

.page-admin .admin-board {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.7rem;
    align-items: start;
}

.page-admin .admin-block {
    margin-top: 0;
}

.page-admin .admin-block-intro {
    grid-column: span 4;
}

.page-admin .admin-block-overview {
    grid-column: span 8;
}

.page-admin .admin-block-setup {
    grid-column: span 12;
}

.page-admin .admin-block-teams {
    grid-column: span 4;
}

.page-admin .admin-block-rounds {
    grid-column: span 8;
}

.page-admin .admin-block-round-current {
    grid-column: span 8;
}

.page-admin .admin-block-preview {
    grid-column: span 4;
}

.page-admin .admin-block-reset {
    grid-column: span 12;
}

.hero {
    padding: 1.6rem 1.4rem;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(31, 23, 29, 0.92), rgba(59, 42, 52, 0.9));
    border: 1px solid rgba(231, 199, 188, 0.24);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.28);
}

.hero .eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--peach-soft);
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 0.55rem;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: clamp(1.7rem, 2.7vw, 2.7rem);
}

.hero p {
    margin: 0;
    color: #f8efeb;
}

.live-note {
    margin-top: 0.6rem;
    font-size: 0.84rem;
    opacity: 0.86;
}

.winner-splash {
    margin-top: 1rem;
    padding: 1.3rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 233, 168, 0.55);
    background:
        radial-gradient(120% 120% at 80% 0%, rgba(255, 211, 120, 0.25), transparent 50%),
        linear-gradient(155deg, rgba(95, 58, 32, 0.94), rgba(48, 31, 22, 0.92));
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.36);
    text-align: center;
    animation: winnerReveal 0.6s ease-out;
}

.winner-splash .eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ffe39a;
    font-weight: 800;
}

.winner-splash h2 {
    margin: 0 0 0.45rem;
    font-size: clamp(1.35rem, 2.8vw, 2.15rem);
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.winner-list {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.55rem 0 0;
}

.winner-list span {
    border: 1px solid rgba(255, 227, 153, 0.6);
    background: rgba(255, 224, 135, 0.12);
    border-radius: 999px;
    padding: 0.26rem 0.65rem;
    font-weight: 800;
}

.panel {
    margin-top: 1rem;
    border-radius: 14px;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(30, 22, 29, 0.95), rgba(39, 29, 37, 0.93));
    border: 1px solid rgba(236, 207, 197, 0.16);
}

.panel h2 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: 1.45rem;
}

.panel h3 {
    margin: 0 0 0.6rem;
}

.panel-logo {
    display: block;
    width: min(320px, 100%);
    height: auto;
    margin: 0 auto 0.7rem;
    object-fit: contain;
}

.page-admin .admin-block-intro {
    display: grid;
    align-content: start;
}

.admin-intro-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: start;
}

.admin-intro-copy p {
    margin: 0;
}

.admin-logo-box {
    width: 120px;
    min-height: 84px;
    border-radius: 10px;
    border: 1px solid rgba(247, 227, 219, 0.28);
    background: rgba(36, 27, 34, 0.62);
    display: grid;
    place-items: center;
    justify-self: end;
}

.admin-panel-logo {
    width: 86px;
    height: auto;
    object-fit: contain;
    display: block;
}

.admin-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.38rem;
    margin-top: 0.4rem;
}

.admin-quick-links a {
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid rgba(247, 227, 219, 0.28);
    border-radius: 999px;
    padding: 0.28rem 0.56rem;
    background: rgba(86, 59, 72, 0.44);
}

.admin-quick-links a:hover {
    background: rgba(167, 103, 81, 0.4);
}

.admin-live-banner {
    margin-top: 0.55rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.55rem;
    border-radius: 9px;
    border: 1px solid rgba(255, 214, 138, 0.58);
    background: rgba(126, 84, 55, 0.34);
    font-size: 0.82rem;
    font-weight: 700;
}

.grid {
    display: grid;
    gap: 0.9rem;
}

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

.admin-settings-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}

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

.kpi-card {
    padding: 0.56rem 0.62rem;
    background: linear-gradient(160deg, rgba(86, 59, 72, 0.88), rgba(36, 28, 35, 0.95));
    border: 1px solid rgba(242, 214, 203, 0.2);
}

.kpi-label {
    margin: 0;
    color: #f2d8ce;
    font-size: 0.76rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}

.kpi-value {
    margin: 0.2rem 0 0;
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 900;
    color: #fff8f4;
}

.admin-team-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: start;
}

.admin-round-manage-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.95fr);
    align-items: start;
}

.admin-round-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.admin-score-sheet input,
.admin-score-sheet select {
    min-width: 90px;
}

.admin-score-sheet td,
.admin-score-sheet th {
    white-space: nowrap;
}

.admin-bonus-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-manual-rucksack-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-score-summary {
    margin-top: 0.6rem;
}

.admin-card-compact {
    min-height: 100%;
}

.admin-card-full {
    grid-column: 1 / -1;
}

.admin-settings-grid .card {
    height: 100%;
}

.card {
    padding: 0.9rem;
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(66, 47, 57, 0.86), rgba(37, 28, 34, 0.94));
    border: 1px solid rgba(242, 214, 203, 0.16);
}

.card-deck-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    margin: 0.8rem 0 1rem;
}

.deck-card {
    border: 1px solid rgba(242, 214, 203, 0.18);
}

.deck-card h3 {
    margin-bottom: 0.4rem;
}

.deck-card p {
    margin: 0.2rem 0;
}

.deck-card.is-active {
    border-color: rgba(255, 214, 138, 0.85);
    box-shadow: 0 0 0 1px rgba(255, 214, 138, 0.35), 0 8px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(165deg, rgba(118, 73, 43, 0.96), rgba(54, 36, 24, 0.94));
}

.clean-list {
    margin: 0;
    padding-left: 1.1rem;
}

.clean-list li {
    margin: 0.32rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
    background: rgba(21, 15, 20, 0.36);
    border-radius: 10px;
    overflow: hidden;
}

th,
td {
    padding: 0.56rem;
    border-bottom: 1px solid rgba(237, 211, 202, 0.16);
    text-align: left;
}

th {
    background: rgba(168, 99, 79, 0.24);
    font-weight: 700;
    color: #fff2ec;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

a {
    color: #ffdbc8;
}

.btn {
    display: inline-block;
    border: 0;
    border-radius: 9px;
    padding: 0.56rem 0.88rem;
    background: linear-gradient(180deg, #c87e68, #9f5746);
    color: #fff5f1;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    cursor: pointer;
}

.btn.secondary {
    background: linear-gradient(180deg, #8f796f, #685148);
}

.btn.danger {
    background: linear-gradient(180deg, #a1504b, #7f3d39);
}

.btn:hover {
    filter: brightness(1.05);
}

.flash {
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 0.9rem;
    border: 1px solid transparent;
}

.flash-success {
    background: rgba(90, 141, 101, 0.22);
    border-color: rgba(90, 141, 101, 0.8);
}

.flash-error {
    background: rgba(157, 75, 70, 0.22);
    border-color: rgba(157, 75, 70, 0.82);
}

.flash-info {
    background: rgba(77, 107, 138, 0.24);
    border-color: rgba(77, 107, 138, 0.76);
}

.stack {
    display: grid;
    gap: 0.62rem;
}

.inline-form {
    display: inline-flex;
    align-items: end;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.inline-form.compact input,
.inline-form.compact select {
    width: auto;
}

.grid-form {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
    display: grid;
    gap: 0.3rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fceee7;
}

label.checkbox {
    grid-template-columns: auto 1fr;
    align-items: center;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(255, 222, 210, 0.35);
    border-radius: 8px;
    padding: 0.52rem 0.58rem;
    font: inherit;
    color: #190f14;
    background: #f6e4dc;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(200, 126, 104, 0.6);
    outline-offset: 1px;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tabs a {
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.43rem 0.62rem;
    border-radius: 8px;
    border: 1px solid rgba(235, 201, 189, 0.3);
    background: rgba(60, 42, 52, 0.42);
}

.tabs a.active {
    background: rgba(168, 99, 79, 0.52);
    border-color: rgba(255, 222, 210, 0.5);
}

.footer {
    position: relative;
    z-index: 5;
    width: min(1150px, 96%);
    margin: 0 auto 1.5rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

.page-admin .footer {
    width: 100%;
    max-width: none;
    padding: 0 0.9rem;
}

.page-admin .panel {
    margin-top: 0.75rem;
    padding: 0.8rem;
}

.page-admin .card {
    padding: 0.7rem;
}

.page-admin .panel h2 {
    font-size: 1.2rem;
    margin-bottom: 0.45rem;
}

.page-admin .panel h3 {
    margin-bottom: 0.45rem;
    font-size: 1rem;
}

.page-admin table {
    font-size: 0.87rem;
}

.page-admin th,
.page-admin td {
    padding: 0.44rem 0.46rem;
}

.page-admin .btn {
    padding: 0.48rem 0.72rem;
}

.page-admin input,
.page-admin select,
.page-admin textarea {
    padding: 0.42rem 0.5rem;
}

code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.12rem 0.36rem;
    border-radius: 6px;
}

@keyframes winnerReveal {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 1200px) {
    .page-admin .admin-block-intro,
    .page-admin .admin-block-overview,
    .page-admin .admin-block-teams,
    .page-admin .admin-block-rounds,
    .page-admin .admin-block-round-current,
    .page-admin .admin-block-preview {
        grid-column: span 12;
    }

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

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

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

    .admin-round-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-block-leaderboard,
    .player-block-header,
    .player-block-team,
    .player-block-captain,
    .player-block-cards {
        grid-column: span 12;
    }

    .home-feed,
    .home-side {
        grid-column: span 12;
    }

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

@media (max-width: 900px) {
    .brand-spacer {
        display: none;
    }

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

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

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

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

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

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

    .home-post-grid {
        grid-template-columns: 1fr;
    }

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

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

    .player-hero-image-box {
        justify-self: start;
    }

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

    .admin-logo-box {
        justify-self: start;
    }

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

    .topbar {
        position: static;
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .topbar-right {
        width: 100%;
        justify-content: flex-start;
    }

    .topbar-logo {
        left: 0.6rem;
        top: 0.4rem;
        justify-self: auto;
        margin: 0;
    }

    .site-logo {
        width: 78px;
        height: 78px;
    }

    .site-logo-link {
        width: 92px;
        height: 92px;
    }
}
