.competition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.2rem;
    margin: 0 0 2.2rem;
}

.competition-card {
    position: relative;
    overflow: hidden;
    padding: 1.3rem;
}

.competition-feedback {
    margin: 0 0 1rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
    background: color-mix(in srgb, var(--ok) 12%, transparent);
    color: #d8ffe9;
}

.competition-subscription-note {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
    padding: 0.95rem 1.05rem;
    border-radius: 14px;
    border: 1px solid rgba(129, 205, 236, 0.26);
    background: linear-gradient(135deg, rgba(16, 32, 43, 0.94), rgba(10, 24, 33, 0.84));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.competition-subscription-note--active {
    border-color: color-mix(in srgb, var(--ok) 32%, transparent);
    background: linear-gradient(135deg, rgba(12, 34, 28, 0.96), rgba(10, 24, 22, 0.88));
}

.competition-subscription-note__eyebrow {
    color: #8fe7ff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.competition-subscription-note--active .competition-subscription-note__eyebrow {
    color: #90f2c1;
}

.competition-subscription-note__body {
    margin: 0;
    color: #eef8ff;
    font-size: 1rem;
    line-height: 1.55;
}

.competition-subscription-note__body strong {
    color: #ffffff;
    font-weight: 800;
}

/* ---------- Status hero banner ---------- */
.comp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.25rem 1.5rem;
    align-items: center;
    padding: 1.15rem 1.4rem;
    margin: 0 0 1.2rem;
    border-radius: var(--radius);
    border: 1px solid rgba(129, 205, 236, 0.2);
    border-left: 5px solid rgba(129, 205, 236, 0.6);
    background: linear-gradient(135deg, rgba(8, 22, 35, 0.92), rgba(12, 35, 55, 0.82));
}

.comp-hero--active {
    border-color: color-mix(in srgb, var(--ok) 35%, transparent);
    border-left-color: var(--ok);
    background: linear-gradient(135deg, rgba(10, 46, 31, 0.85), rgba(20, 92, 62, 0.6));
}

.comp-hero--inactive {
    border-color: rgba(255, 111, 125, 0.38);
    border-left-color: #ff6f7d;
    background: linear-gradient(135deg, rgba(56, 14, 22, 0.85), rgba(126, 33, 50, 0.55));
}

.comp-hero-main {
    min-width: 0;
}

.comp-hero-top {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.45rem;
}

.comp-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid currentColor;
}

.comp-status-badge--active {
    color: #b6ffd4;
    background: color-mix(in srgb, var(--ok) 16%, transparent);
}

.comp-status-badge--inactive {
    color: #ffc4cb;
    background: rgba(255, 111, 125, 0.16);
}

.comp-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.comp-hero h1 {
    margin: 0 0 0.4rem;
    font-size: 1.5rem;
    line-height: 1.15;
    color: var(--text-strong);
}

.comp-hero p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 62ch;
}

.comp-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 0.9rem;
    max-width: 460px;
}

.comp-hero-stat {
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(129, 205, 236, 0.18);
    background: rgba(8, 18, 26, 0.5);
}

.comp-hero-stat-label {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.comp-hero-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-strong);
    line-height: 1;
}

.comp-hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.comp-hero-cta {
    min-width: 200px;
    justify-content: center;
    font-size: 1rem;
    padding: 0.8rem 1.4rem;
}

html[data-theme="light"] .comp-hero {
    border-color: color-mix(in srgb, var(--text) 16%, transparent);
    border-left-color: color-mix(in srgb, var(--accent) 50%, transparent);
    background: linear-gradient(135deg, rgba(253, 251, 249, 0.95), rgba(245, 240, 235, 0.9));
}

html[data-theme="light"] .comp-hero--active {
    border-color: rgba(90, 138, 74, 0.3);
    border-left-color: var(--ok);
    background: linear-gradient(135deg, rgba(253, 251, 249, 0.95), rgba(240, 245, 235, 0.9));
}

html[data-theme="light"] .comp-hero--inactive {
    border-color: color-mix(in srgb, var(--danger) 30%, transparent);
    border-left-color: var(--danger);
    background: linear-gradient(135deg, rgba(253, 251, 249, 0.95), rgba(245, 238, 235, 0.9));
}

/* The gradient-clipped headings are gone from here too. Same four-stop rainbow as
   .ui-modal h3 in chrome.css, with a burgundy/olive/blue twin for light theme —
   the treatment this codebase removed elsewhere because it made headings
   unreadable. The colour now comes from the token, as it does on every other
   page heading. */
html[data-theme="light"] .comp-hero h1 {
    color: var(--text-strong);
}

html[data-theme="light"] .comp-hero p {
    color: var(--text-muted);
}

html[data-theme="light"] .comp-status-badge--active {
    color: var(--ok);
    background: rgba(90, 138, 74, 0.14);
}

html[data-theme="light"] .comp-status-badge--inactive {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 14%, transparent);
}

html[data-theme="light"] .comp-hero-stat {
    background: rgba(253, 251, 249, 0.7);
    border-color: color-mix(in srgb, var(--text) 12%, transparent);
}

html[data-theme="light"] .comp-hero-stat-label {
    color: var(--text-muted);
}

html[data-theme="light"] .comp-hero-stat-value {
    color: var(--accent);
}

@media (max-width: 760px) {
    .comp-hero {
        grid-template-columns: 1fr;
    }

    .comp-hero-actions {
        align-items: stretch;
    }

    .comp-hero-cta {
        width: 100%;
    }
}

.competition-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(96deg, var(--brand-2), var(--accent));
}

.competition-card.upcoming {
    border-left: 3px solid var(--accent);
}

.competition-card.active {
    border-left: 3px solid var(--ok);
}

.competition-card.ended {
    border-left: 3px solid var(--warn);
}

.competition-title {
    margin: 0 0 0.65rem;
    color: var(--text-strong);
    font-size: 1.34rem;
}

.competition-description {
    margin: 0 0 1rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

.competition-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin: 0 0 1rem;
}

.competition-dates,
.competition-participants {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(130, 202, 232, 0.2);
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
    color: #c9dfeb;
    font-size: 0.84rem;
}

.competition-dates {
    display: grid;
    gap: 0.2rem;
}

.competition-countdown {
    font-weight: 700;
    color: #f6fbff;
}

.competition-status {
    position: absolute;
    right: 1rem;
    top: 1rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-upcoming {
    border: 1px solid rgba(121, 222, 255, 0.4);
    background: rgba(121, 222, 255, 0.18);
    color: #d6f6ff;
}

.status-active {
    border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
    background: color-mix(in srgb, var(--ok) 18%, transparent);
    color: #d5ffe8;
}

.status-ended {
    border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
    background: color-mix(in srgb, var(--warn) 16%, transparent);
    color: #fff1d2;
}

.competition-actions {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: center;
}

.competition-actions--center {
    justify-content: center;
}

.competition-actions--active-joined {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto max-content;
    align-items: center;
}

.competition-play-now {
    margin-top: 0.9rem;
}

.competition-play-now .btn {
    width: 100%;
    justify-content: center;
}

.competition-join-form {
    display: inline-flex;
}

.btn-competition-join {
    background: linear-gradient(135deg, #ffd166, #ffb347) !important;
    border-color: rgba(255, 209, 102, 0.68) !important;
    color: #3b2408 !important;
}

.btn-static {
    pointer-events: none;
}

.btn-success {
    background: color-mix(in srgb, var(--ok) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--ok) 45%, transparent);
    color: #d5ffe8;
}

.btn-joined-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 4.5rem;
    aspect-ratio: 1;
    padding: 0.55rem;
    border-radius: 50% !important;
    text-align: center;
    line-height: 1.05;
    font-size: 0.88rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.btn-subscribe-cta {
    position: relative;
    display: inline-flex;
    flex: 1 1 100%;
    width: 100%;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 0.45rem;
    min-height: 4rem;
    padding: 0.9rem 1.1rem 1rem;
    /* Make room on the right for the "Premium" badge so the label isn't obscured */
    padding-right: 4rem;
    overflow: hidden;
    border: 1px solid rgba(140, 208, 255, 0.62) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 40%),
        linear-gradient(135deg, #0c2947 0%, #14548a 34%, #2990d1 68%, #7ecbff 100%) !important;
    box-shadow:
        0 12px 26px rgba(0, 0, 0, 0.28),
        0 0 0 1px rgba(212, 239, 255, 0.08),
        inset 0 1px 0 rgba(232, 246, 255, 0.38),
        inset 0 -1px 0 rgba(7, 42, 74, 0.32);
    color: #f4fbff !important;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 0 rgba(6, 28, 51, 0.34);
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, border-color 180ms ease;
    animation: subscribeCtaPulse 2.8s ease-in-out infinite;
}

.btn-subscribe-cta__eyebrow,
.btn-subscribe-cta__label {
    position: relative;
    /* Ensure label/eyebrow sit above decorative pseudo elements */
    z-index: 2;
}

.btn-subscribe-cta__eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(228, 245, 255, 0.9);
}

.btn-subscribe-cta__label {
    font-size: 1rem;
    line-height: 1.1;
    color: #f8fdff;
}

.btn-subscribe-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(112deg, transparent 0%, rgba(255, 255, 255, 0.08) 36%, rgba(222, 245, 255, 0.24) 50%, rgba(255, 255, 255, 0.08) 64%, transparent 100%);
    transform: translateX(-120%);
    transition: transform 380ms ease;
}

.btn-subscribe-cta::after {
    content: 'Premium';
    position: absolute;
    top: 0.5rem;
    right: 0.7rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #dff3ff, #9ddcff);
    color: #0f4978;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
    /* Keep the badge visually behind the label text */
    z-index: 1;
}

.btn-subscribe-cta:hover {
    transform: translateY(-1px);
    border-color: rgba(177, 225, 255, 0.84) !important;
    box-shadow:
        0 16px 30px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(223, 244, 255, 0.12),
        0 0 24px rgba(88, 178, 237, 0.28),
        inset 0 1px 0 rgba(240, 250, 255, 0.46),
        inset 0 -1px 0 rgba(7, 42, 74, 0.34);
    filter: brightness(1.03);
}

.btn-subscribe-cta:hover::before {
    transform: translateX(110%);
}

.btn-subscribe-cta:focus-visible {
    outline: none;
    box-shadow:
    0 0 0 3px rgba(127, 203, 255, 0.22),
        0 14px 28px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(240, 250, 255, 0.42),
    inset 0 -1px 0 rgba(7, 42, 74, 0.34);
}

.btn-subscribe-cta:active {
    transform: translateY(0);
    animation: none;
}

.btn-play-now {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.4rem;
    padding: 0.9rem 1.1rem;
    overflow: hidden;
    border: 1px solid rgba(246, 217, 160, 0.58) !important;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, #b8833f 0%, #e5c082 34%, #f5ddb1 52%, #d3a35e 100%) !important;
    box-shadow:
        0 10px 24px rgba(12, 8, 3, 0.34),
        0 0 0 1px rgba(255, 236, 205, 0.08),
        inset 0 1px 0 rgba(255, 249, 238, 0.48),
        inset 0 -1px 0 rgba(92, 56, 15, 0.26);
    color: #241404 !important;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 245, 229, 0.35);
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, border-color 180ms ease;
}

.btn-play-now::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 0%, rgba(255, 250, 239, 0.08) 34%, rgba(255, 247, 235, 0.34) 50%, rgba(255, 250, 239, 0.08) 66%, transparent 100%);
    transform: translateX(-120%);
    transition: transform 420ms ease;
}

.btn-play-now:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 232, 190, 0.78) !important;
    box-shadow:
        0 14px 28px rgba(12, 8, 3, 0.4),
        0 0 0 1px rgba(255, 240, 215, 0.12),
        inset 0 1px 0 rgba(255, 250, 242, 0.56),
        inset 0 -1px 0 rgba(92, 56, 15, 0.3);
    filter: brightness(1.02);
}

.btn-play-now:hover::before {
    transform: translateX(105%);
}

.btn-play-now:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(245, 213, 155, 0.2),
        0 12px 28px rgba(12, 8, 3, 0.34),
        inset 0 1px 0 rgba(255, 250, 242, 0.52),
        inset 0 -1px 0 rgba(92, 56, 15, 0.26);
}

.btn-play-now:active {
    transform: translateY(0);
    box-shadow:
        0 8px 18px rgba(12, 8, 3, 0.3),
        inset 0 1px 0 rgba(255, 250, 242, 0.42),
        inset 0 -1px 0 rgba(92, 56, 15, 0.28);
}

@keyframes subscribeCtaPulse {
    0%,
    100% {
        box-shadow:
            0 12px 26px rgba(0, 0, 0, 0.28),
            0 0 0 1px rgba(212, 239, 255, 0.08),
            0 0 0 0 rgba(88, 178, 237, 0),
            inset 0 1px 0 rgba(232, 246, 255, 0.38),
            inset 0 -1px 0 rgba(7, 42, 74, 0.32);
    }
    50% {
        box-shadow:
            0 15px 30px rgba(0, 0, 0, 0.32),
            0 0 0 1px rgba(212, 239, 255, 0.1),
            0 0 0 10px rgba(88, 178, 237, 0.1),
            inset 0 1px 0 rgba(232, 246, 255, 0.42),
            inset 0 -1px 0 rgba(7, 42, 74, 0.32);
    }
}

.comp-puzzle-btns {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.comp-puzzle-btn {
    font-size: 0.78rem;
    padding: 0.28rem 0.52rem;
    border-radius: 999px;
    border: 1px solid rgba(130, 202, 232, 0.28);
    background: rgba(255, 255, 255, 0.04);
    color: #dff4ff;
    text-decoration: none;
}

.comp-puzzle-btn--active:hover {
    background: rgba(121, 222, 255, 0.2);
}

.comp-puzzle-btn--disabled {
    opacity: 0.55;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 14px;
    border: 1px dashed rgba(130, 202, 232, 0.35);
    background: rgba(11, 21, 28, 0.64);
    color: #b5cedb;
}

.admin-container,
.wrap {
    width: min(1320px, calc(100% - 2.6rem));
    margin: 0 auto;
    padding: 1.1rem 0 2rem;
}

.admin-header,
.wrap > div[style*='display:flex'] {
    margin-bottom: 1rem;
}

.stats-grid,
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.stat-card {
    padding: 0.85rem;
}

.stat-value,
.stat-val {
    font-size: 1.55rem;
    font-weight: 800;
}

.stat-label,
.stat-lbl {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.68rem;
}

.competitions-table,
.panel table {
    width: 100%;
    border-collapse: collapse;
}

.competitions-table th,
.competitions-table td,
.panel th,
.panel td {
    padding: 0.62rem 0.65rem;
    border-bottom: 1px solid rgba(130, 202, 232, 0.18);
    text-align: left;
    vertical-align: top;
}

.competitions-table th,
.panel th {
    color: var(--accent);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge,
.badge,
.mode-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.16rem 0.5rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    border: 1px solid rgba(130, 202, 232, 0.34);
    background: rgba(255, 255, 255, 0.05);
    color: #d8f2ff;
}

.b-active,
.status-active {
    border-color: color-mix(in srgb, var(--ok) 44%, transparent);
}

.b-upcoming,
.status-upcoming {
    border-color: rgba(121, 222, 255, 0.44);
}

.b-ended,
.status-ended {
    border-color: color-mix(in srgb, var(--warn) 45%, transparent);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.72rem;
}

.form-group {
    display: grid;
    gap: 0.36rem;
}

.puzzle-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.52rem;
    max-height: 300px;
    overflow: auto;
    padding: 0.55rem;
}

.puzzle-option {
    padding: 0.6rem;
}

.puzzle-meta,
.cw,
.hint {
    color: #9cbac9;
    font-size: 0.76rem;
}

.chips,
.assigned-preview-chips {
    display: flex;
    gap: 0.34rem;
    flex-wrap: wrap;
}

.chip,
.assigned-chip {
    display: inline-block;
    max-width: 180px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    padding: 0.1rem 0.42rem;
    font-size: 0.68rem;
    border-radius: 999px;
    border: 1px solid rgba(130, 202, 232, 0.32);
    background: rgba(255, 255, 255, 0.06);
    color: #e1f5ff;
}

@media (max-width: 860px) {
    .competition-actions {
        flex-direction: column;
    }

    .competition-actions--active-joined {
        display: flex;
    }

    .competitions-table,
    .panel {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Competition details modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10050;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.8);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative; /* anchors .modal-close (absolutely positioned) */
    background: var(--surface-grad), var(--panel);
    border-radius: 16px;
    width: min(600px, 90vw);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Now a real <button> (was a bare <span>, unkeyboardable): reset the UA
   chrome the span never had, keep the same visual. */
.modal-close {
    color: var(--text-muted);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 1rem;
    line-height: 1;
    background: none;
    border: 0;
    font-family: inherit;
    position: absolute;
    top: 0;
    right: 0;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(121, 222, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-header h2 {
    margin: 0;
    color: var(--text-strong);
    font-size: 1.5rem;
    flex: 1;
}

.modal-status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.modal-status-badge.active {
    background: color-mix(in srgb, var(--ok) 20%, transparent);
    color: var(--ok);
    border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
}

.modal-status-badge.upcoming {
    background: rgba(121, 222, 255, 0.2);
    color: var(--accent);
    border: 1px solid rgba(121, 222, 255, 0.4);
}

.modal-status-badge.ended {
    background: color-mix(in srgb, var(--warn) 20%, transparent);
    color: var(--warn);
    border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
}

.modal-body {
    padding: 2rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    color: var(--accent);
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.modal-section p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    white-space: pre-wrap;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.modal-info-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-info-item span:last-child {
    color: var(--text);
    font-size: 0.95rem;
}

.modal-puzzles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-puzzle-chip {
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(81, 214, 255, 0.1);
    border: 1px solid rgba(81, 214, 255, 0.3);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.modal-puzzles-list.empty {
    color: var(--text-muted);
    font-style: italic;
}

/* Admin actions and compact buttons */
.admin-actions,
.action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 8px;
    text-decoration: none;
}

.btn-edit {
    background: linear-gradient(125deg, rgba(81, 214, 255, 0.25), rgba(42, 84, 104, 0.36));
    color: var(--text);
    border: 1px solid rgba(81, 214, 255, 0.45);
}

.btn-delete {
    background: linear-gradient(125deg, rgba(255, 111, 125, 0.24), rgba(112, 39, 50, 0.4));
    color: #ffd3da;
    border: 1px solid rgba(255, 111, 125, 0.45);
}

.btn-view {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Edit page shared classes */
.row {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.field label {
    color: var(--text);
    font-size: 0.86rem;
}

.field input,
.field select,
.field textarea {
    padding: 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(104, 188, 226, 0.4);
    background: rgba(10, 18, 24, 0.82);
    color: var(--text);
}

.field select,
.field select option {
    background: rgba(10, 18, 24, 0.95);
    color: var(--text);
}

.field textarea {
    min-height: 90px;
}

.picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
    max-height: 300px;
    overflow: auto;
    border: 1px solid rgba(152, 208, 233, 0.22);
    border-radius: 8px;
    padding: 0.7rem;
}

.item {
    border: 1px solid rgba(152, 208, 233, 0.18);
    border-radius: 8px;
    padding: 0.65rem;
    background: rgba(10, 18, 24, 0.5);
}

.meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.msg {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.ok {
    color: #d9ffe9;
    border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent);
    background: color-mix(in srgb, var(--ok) 12%, transparent);
}

.err {
    color: #ffd7dc;
    border: 1px solid rgba(255, 111, 125, 0.4);
    background: rgba(255, 111, 125, 0.12);
}

@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 1rem 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-info-grid {
        grid-template-columns: 1fr;
    }
}

.admin-section {
    border-radius: 20px;
    padding: 2.5rem;
    margin-top: 3rem;
    border: 1px solid rgba(121, 222, 255, 0.3);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.admin-section h2 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
}

.admin-section p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.info-section {
    background: var(--panel-soft);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    border: 1px solid rgba(152, 208, 233, 0.22);
}

.info-section h3 {
    color: var(--text-strong);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.info-item {
    padding: 1.5rem;
    background: rgba(10, 18, 24, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(152, 208, 233, 0.16);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
    border-color: rgba(81, 214, 255, 0.4);
}

.info-item h4 {
    color: var(--accent);
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-item p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Progress bar for active competitions */
.progress-container {
    margin: 1.5rem 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    border-radius: 4px;
    transition: width 1s ease;
}

/* Countdown timer */
.countdown-timer {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    justify-content: center;
}

.countdown-unit {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(152, 208, 233, 0.18);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-align: center;
    min-width: 60px;
}

.countdown-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    display: block;
}

.countdown-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive design */
@media (max-width: 768px) {
    .competitions-container {
        padding: 1rem;
    }
    
    .page-header h1 {
        font-size: 2.2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .competition-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .competition-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .competition-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-section {
        padding: 1.5rem;
    }
}

/* Animation for competition cards */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.competition-card {
    animation: slideIn 0.5s ease forwards;
}

.competition-card:nth-child(1) { animation-delay: 0.1s; }
.competition-card:nth-child(2) { animation-delay: 0.2s; }
.competition-card:nth-child(3) { animation-delay: 0.3s; }
.competition-card:nth-child(4) { animation-delay: 0.4s; }
.competition-card:nth-child(5) { animation-delay: 0.5s; }

/* Trophy icon for winners */
.trophy-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: linear-gradient(45deg, var(--warn), var(--warn));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L15 9H22L17 14L19 21L12 17L5 21L7 14L2 9H9L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2L15 9H22L17 14L19 21L12 17L5 21L7 14L2 9H9L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 1rem;
}

.skeleton-description {
    height: 60px;
    width: 100%;
    margin-bottom: 1.5rem;
}

.skeleton-meta {
    height: 20px;
    width: 50%;
    margin-bottom: 1rem;
}

.skeleton-button {
    height: 40px;
    width: 100%;
    margin-top: 1rem;
}

.competition-mode-chip {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    text-transform: uppercase;
    background: rgba(255, 209, 102, 0.18);
    color: var(--warn);
    border: 1px solid rgba(255, 209, 102, 0.4);
}

.competition-title--offset {
    margin-top: 1.6rem;
}

.competition-campaign-line {
    color: var(--warn);
    font-size: 0.8rem;
}

.admin-section-expired {
    border-color: rgba(255, 111, 125, 0.4);
    margin-top: 3rem;
}

.admin-section-expired h2 {
    color: var(--danger);
}

.expired-note {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.expired-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.expired-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    background: rgba(255, 111, 125, 0.08);
    border: 1px solid rgba(255, 111, 125, 0.24);
    border-radius: 10px;
    gap: 1rem;
    flex-wrap: wrap;
}

.expired-item-main {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.expired-title {
    color: var(--text-strong);
    font-weight: 600;
}

.expired-date {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.expired-form {
    margin: 0;
    flex-shrink: 0;
}

.btn-expired-end {
    padding: 0.4rem 1.1rem;
    font-size: 0.85rem;
    flex: none;
    background: linear-gradient(125deg, rgba(255, 111, 125, 0.24), rgba(112, 39, 50, 0.4));
    border-color: rgba(255, 111, 125, 0.5);
    color: #ffd3da;
}

.muted-inline {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.how-works {
    margin-top: 3rem;
    padding: 1.8rem;
    background: var(--panel-soft);
    border: 1px solid rgba(152, 208, 233, 0.22);
    border-radius: var(--radius);
}

.how-works h3 {
    color: var(--text-strong);
    margin: 0 0 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(121, 222, 255, 0.28);
}

.how-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.how-works-grid > div {
    background: rgba(10, 18, 24, 0.5);
    border: 1px solid rgba(152, 208, 233, 0.16);
    border-left: 3px solid var(--brand-2);
    border-radius: 12px;
    padding: 1.1rem 1.2rem;
    transition: transform 0.2s ease, border-left-color 0.2s ease;
}

.how-works-grid > div:hover {
    transform: translateY(-3px);
    border-left-color: var(--brand);
}

.how-works-grid h4 {
    color: var(--accent);
    margin: 0 0 0.5rem;
}

.how-works-grid p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0;
}

.reports-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.reports-head-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.report-filter-panel {
    margin-bottom: 1.2rem;
}

.report-filter-form {
    display: flex;
    gap: 0.9rem;
    align-items: end;
    justify-content: space-between;
    flex-wrap: wrap;
}

.report-filter-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    flex: 1 1 320px;
}

.report-filter-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.stat-val--active { color: var(--red); }
.stat-val--upcoming { color: var(--teal); }
.stat-val--ended { color: var(--blue); }
.stat-val--campaign { color: var(--gold); }
.stat-val--challenge { color: var(--text-muted); }

.report-empty {
    color: var(--text-muted);
}

.report-title {
    color: var(--text-strong);
}

.report-sub {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.report-campaign-code {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.report-dash {
    color: rgba(255, 255, 255, 0.25);
}

.report-rate--high { color: var(--ok); }
.report-rate--mid { color: #ffd57e; }
.report-rate--low { color: #ff8a8a; }

.edit-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.8rem;
}

.mt-1 { margin-top: 1rem; }
.mt-08 { margin-top: 0.8rem; }
.mt-12 { margin-top: 1.2rem; }

.actions-end {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 1rem;
}

.text-muted-soft {
    color: #a8bcc5;
}

.mr-04 {
    margin-right: 0.4rem;
}

.inline-form {
    display: inline;
}

.desc-preview {
    color: var(--text-muted);
}

/* Accessibility: Focus indicators */
.btn:focus-visible,
.btn-small:focus-visible,
.btn-sm-edit:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-danger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

table a:focus-visible,
.admin-section a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Light-mode overrides */
html[data-theme="light"] .competition-title {
    color: #3d3d3d;
}

html[data-theme="light"] .competition-description {
    color: var(--text-muted);
}

html[data-theme="light"] .competition-dates,
html[data-theme="light"] .competition-participants {
    background: color-mix(in srgb, var(--text) 4%, transparent);
    border-color: color-mix(in srgb, var(--text) 14%, transparent);
    color: var(--text-muted);
}

html[data-theme="light"] .competition-countdown {
    color: var(--accent);
}

html[data-theme="light"] .competition-subscription-note {
    border-color: color-mix(in srgb, var(--text) 16%, transparent);
    background: linear-gradient(135deg, rgba(253, 251, 249, 0.95), rgba(245, 240, 235, 0.9));
}

html[data-theme="light"] .competition-subscription-note__eyebrow {
    color: var(--accent);
}

html[data-theme="light"] .competition-subscription-note__body {
    color: #3d3d3d;
}

html[data-theme="light"] .competition-subscription-note__body strong {
    color: #3d3d3d;
}

html[data-theme="light"] .competition-subscription-note--active {
    border-color: rgba(90, 138, 74, 0.3);
    background: linear-gradient(135deg, rgba(253, 251, 249, 0.95), rgba(240, 245, 235, 0.9));
}

html[data-theme="light"] .competition-subscription-note--active .competition-subscription-note__eyebrow {
    color: var(--ok);
}

html[data-theme="light"] .empty-state {
    border-color: color-mix(in srgb, var(--text) 16%, transparent);
    background: rgba(253, 251, 249, 0.8);
    color: var(--text-muted);
}

html[data-theme="light"] .modal-header h2 {
    color: #3d3d3d;
}

html[data-theme="light"] .modal-header {
    border-bottom-color: color-mix(in srgb, var(--text) 12%, transparent);
}

html[data-theme="light"] .modal-section h3 {
    color: #4a4a4a;
}

html[data-theme="light"] .modal-puzzle-chip {
    background: color-mix(in srgb, var(--accent) 8%, transparent);
    border-color: color-mix(in srgb, var(--accent) 22%, transparent);
    color: var(--accent);
}

html[data-theme="light"] .admin-section h2 {
    color: #3d3d3d;
}

html[data-theme="light"] .info-section h3 {
    color: #4a4a4a;
}

html[data-theme="light"] .info-item {
    background: rgba(253, 251, 249, 0.85);
    border-color: color-mix(in srgb, var(--text) 12%, transparent);
}

html[data-theme="light"] .info-item h4 {
    color: #4a4a4a;
}

html[data-theme="light"] .info-item:hover {
    border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

html[data-theme="light"] .how-works h3 {
    color: #4a4a4a;
    border-bottom-color: color-mix(in srgb, var(--text) 15%, transparent);
}

html[data-theme="light"] .how-works-grid > div {
    background: rgba(253, 251, 249, 0.85);
    border-color: color-mix(in srgb, var(--text) 12%, transparent);
}

html[data-theme="light"] .how-works-grid h4 {
    color: #4a4a4a;
}

html[data-theme="light"] .status-badge,
html[data-theme="light"] .badge,
html[data-theme="light"] .mode-badge {
    background: rgba(253, 251, 249, 0.9);
    border-color: color-mix(in srgb, var(--text) 16%, transparent);
    color: #5a5a5a;
}

html[data-theme="light"] .comp-puzzle-btn {
    border-color: color-mix(in srgb, var(--text) 16%, transparent);
    background: rgba(253, 251, 249, 0.85);
    color: #3d3d3d;
}

html[data-theme="light"] .comp-puzzle-btn--active:hover {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

html[data-theme="light"] .field label {
    color: #3d3d3d;
}

html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea {
    border-color: color-mix(in srgb, var(--text) 22%, transparent);
    background: rgba(253, 251, 249, 0.9);
}

html[data-theme="light"] .progress-bar {
    background: color-mix(in srgb, var(--text) 10%, transparent);
}

html[data-theme="light"] .countdown-unit {
    background: rgba(253, 251, 249, 0.85);
    border-color: color-mix(in srgb, var(--text) 14%, transparent);
}

html[data-theme="light"] .countdown-value {
    color: var(--accent);
}

html[data-theme="light"] .puzzle-meta,
html[data-theme="light"] .cw,
html[data-theme="light"] .hint {
    color: var(--text-muted);
}

html[data-theme="light"] .chip,
html[data-theme="light"] .assigned-chip {
    border-color: color-mix(in srgb, var(--text) 16%, transparent);
    background: rgba(253, 251, 249, 0.85);
    color: #5a5a5a;
}

html[data-theme="light"] .report-title {
    color: #3d3d3d;
}

html[data-theme="light"] .report-dash {
    color: color-mix(in srgb, var(--text) 20%, transparent);
}

html[data-theme="light"] .btn-edit {
    background: linear-gradient(125deg, color-mix(in srgb, var(--ok) 14%, transparent), color-mix(in srgb, var(--ok) 8%, transparent));
    color: #4a6237;
    border-color: color-mix(in srgb, var(--ok) 30%, transparent);
}

html[data-theme="light"] .btn-delete {
    color: var(--danger);
}

html[data-theme="light"] .btn-view {
    background: color-mix(in srgb, var(--text) 4%, transparent);
    border-color: color-mix(in srgb, var(--text) 15%, transparent);
    color: var(--text);
}

html[data-theme="light"] .expired-title {
    color: #3d3d3d;
}

html[data-theme="light"] .btn-expired-end {
    color: var(--danger);
}

html[data-theme="light"] .competitions-table th,
html[data-theme="light"] .panel th {
    color: #3d3d3d;
}

html[data-theme="light"] .competitions-table th,
html[data-theme="light"] .competitions-table td,
html[data-theme="light"] .panel th,
html[data-theme="light"] .panel td {
    border-bottom-color: color-mix(in srgb, var(--text) 12%, transparent);
}

html[data-theme="light"] .competition-feedback {
    color: var(--ok);
}

html[data-theme="light"] .text-muted-soft {
    color: var(--text-muted);
}

html[data-theme="light"] .btn-success {
    color: var(--ok);
}

html[data-theme="light"] .competition-card {
    border-color: color-mix(in srgb, var(--text) 14%, transparent);
}

/* =========================================================================
   COMPETITION GATE (logged-out view)
   -------------------------------------------------------------------------
   This was a bare "Not Logged In / you cannot view competitions" card centred
   in roughly 700px of empty space — a dead end that explained nothing and
   offered only a mid-sentence link. It now states what a competition actually
   is, what determines your placing, and gives one clear primary action.

   Deliberately no numbers: the competitions table is empty, and inventing
   "1,204 players competing" would be dishonest content.
   ========================================================================= */
.competition-gate {
    max-width: 62ch;
    text-align: left;
    padding: clamp(1.6rem, 4vw, 2.6rem);
}

.competition-gate__eyebrow {
    margin: 0 0 0.6rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
}

.competition-gate h1 {
    margin: 0 0 0.9rem;
    font-size: clamp(1.7rem, 3.6vw, 2.4rem);
    color: var(--text-strong);
}

.competition-gate__lede {
    margin: 0 0 1.3rem;
    font-size: var(--fs-body);
    line-height: 1.65;
    color: var(--text);
}

.competition-gate__list {
    margin: 0 0 1.8rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.6rem;
}

.competition-gate__list li {
    position: relative;
    padding-left: 1.4rem;
    font-size: var(--fs-sm);
    line-height: 1.5;
    color: var(--text-muted);
}

.competition-gate__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--accent);
}

.competition-gate__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem 1.4rem;
}

.competition-gate__cta {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: var(--accent-contrast);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--fs-sm);
    text-decoration: none;
    transition: background-color var(--dur-fast) linear;
}

.competition-gate__cta:hover {
    background: var(--accent-hover);
    color: var(--accent-contrast);
}

.competition-gate__link {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.competition-gate__link:hover {
    color: var(--accent-hover);
}

/* Mobile: the gate listed its three supporting points before its call to action,
   and at 390x844 that pushed the CTA to y=874 — 30px past the fold, so a phone
   visitor saw the headline, a paragraph and a bullet list and no way to act.
   Ordering the actions second puts the CTA in the first screen while leaving the
   desktop reading order (headline, explanation, detail, action) untouched.
   A `ch`-measured column narrows on a phone; `max-width` is for the measure, not
   the screen, so the card still needs its own padding here. */
@media (max-width: 768px) {
    .competition-gate {
        display: flex;
        flex-direction: column;
    }
    .competition-gate__eyebrow { order: 0; }
    .competition-gate h1        { order: 1; }
    .competition-gate__lede     { order: 2; }
    .competition-gate__actions  { order: 3; margin-top: 1.4rem; }
    .competition-gate__list     { order: 4; }
}

/* ============================================================================
   RICH EMPTY STATE — "no competitions running"
   Calendar rows, an illustrative event sample and real next actions, so the
   page keeps its structure (dates, list, results) even between events.
   ============================================================================ */
.empty-state--rich {
    grid-column: 1 / -1;
    display: grid;
    justify-items: center;
    gap: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
    padding: 2.25rem 1.5rem;
    border: 1px dashed color-mix(in srgb, var(--text) 22%, transparent);
    border-radius: 16px;
}

.empty-state--rich i {
    color: var(--brand-2);
}

.empty-state--rich h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.2rem;
}

.empty-state--rich p {
    margin: 0;
    line-height: 1.6;
    max-width: 52ch;
}

.empty-state__calendar {
    display: grid;
    gap: 0.5rem;
    width: 100%;
    max-width: 440px;
}

.empty-state__cal-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
    border-radius: 10px;
}

.empty-state__cal-month {
    font-weight: 800;
    color: var(--text);
}

.empty-state__cal-status {
    font-size: 0.85rem;
    font-weight: 600;
}

.empty-state__cal-status.is-quiet {
    color: var(--text-muted);
}

.empty-state__cal-status.is-open {
    color: var(--ok);
}

.empty-state__sample {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.empty-state__sample caption {
    caption-side: top;
    text-align: left;
    padding: 0 0 0.4rem;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.empty-state__sample th,
.empty-state__sample td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
    text-align: left;
}

.empty-state__sample th {
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.empty-state__sample td {
    color: var(--text);
}

.empty-state__actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.comp-hero-cta--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--text) 24%, transparent);
}

html[data-theme="light"] .comp-hero-cta--ghost {
    color: var(--text);
    border-color: color-mix(in srgb, var(--text) 30%, transparent);
}
