/* DTTF_V2 modular stylesheet: tournament.css */

.tournament-result-tabs { display:flex; gap:24px; border-bottom:1px solid #dce3eb; margin-bottom:22px; }
.tournament-result-tabs a { display:block; border-bottom:3px solid transparent; padding:12px 0; min-height:44px; box-sizing:border-box; font-weight:700; color:#596b7d; text-decoration:none; }
.tournament-result-tabs a[aria-selected="true"] { color:#146847; border-bottom-color:#146847; }
.tournament-results-card [hidden] { display:none !important; }

   TOURNAMENT REGISTRATION / CHECK-IN
   Append to assets/css/dttf.css
   ========================================================= */

.tournament-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1rem;
}

.tournament-actions .button {
    margin: 0;
}

.tournament-state {
    cursor: default;
    pointer-events: none;
    background: var(--dttf-green-soft);
    border-color: var(--dttf-green);
    color: var(--dttf-green-dark);
}

.tournament-state.is-complete {
    font-weight: 700;
}

.tournament-action-message {
    flex-basis: 100%;
    min-height: 1.2em;
    font-size: 0.82rem;
}

.tournament-action-message:empty {
    min-height: 0;
}

.tournament-action-message.is-success {
    color: var(--dttf-green-dark);
}

.tournament-action-message.is-error {
    color: var(--dttf-danger);
}

.tournament-actions button.is-loading {
    opacity: 0.7;
    cursor: wait;
}

.game-card-actions {
    margin-top: 0.9rem;
}

.next-tournament-actions {
    margin-top: 1rem;
}

@media (max-width: 699px) {
    .tournament-actions .button {
        flex: 1 1 auto;
        text-align: center;
    }
}

/* =========================================================
   TOURNAMENT DETAIL
   ========================================================= */

.tournament-detail-page {
    display: grid;
    grid-template-columns:minmax(0, 1fr);
    gap: 1rem;
}

.tournament-detail-page > *,
.tournament-detail-page [data-tournament-tabs],
.tournament-detail-page [role="tabpanel"],
.tournament-detail-page .content-card {
    min-width:0;
    max-width:100%;
}

.tournament-recap-card,
.tournament-event-details {
    overflow-wrap:anywhere;
}

.tournament-detail-card h1 {
    margin: 0.25rem 0 0.35rem;
}

.tournament-detail-datetime {
    font-weight: 700;
    color: var(--dttf-text);
}

.tournament-detail-description {
    margin: 0.8rem 0 0;
}

.tournament-detail-notice {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--dttf-radius-sm);
    background: #fff1f1;
    color: var(--dttf-danger);
    font-weight: 700;
}

.tournament-roster-count {
    color: var(--dttf-text-muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.tournament-roster {
    overflow-x: auto;
}

.tournament-roster-row {
    display: grid;
    grid-template-columns: minmax(130px, 1.4fr) minmax(125px, 1fr) minmax(125px, 1fr);
    gap: 0.75rem;
    align-items: center;
    min-width: 440px;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--dttf-border);
}

.tournament-roster-row:last-child {
    border-bottom: 0;
}

.tournament-roster-header {
    padding-top: 0;
    color: var(--dttf-text-muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tournament-roster-player {
    font-weight: 800;
}

.roster-time {
    display: block;
    color: var(--dttf-text-muted);
    font-size: 0.82rem;
}

@media (min-width: 700px) {
    .roster-time {
        display: inline;
        margin-left: 0.25rem;
    }
}

/* Tournament venue address / directions */
.tournament-detail-location {
    margin-top: 0.65rem;
}

.tournament-detail-address {
    font-weight: 600;
    color: var(--dttf-text);
}

.tournament-directions-link {
    display: inline-block;
    margin-top: 0.25rem;
    font-weight: 800;
    color: var(--dttf-green-dark);
    text-decoration: none;
}

.tournament-directions-link:hover,
.tournament-directions-link:focus-visible {
    text-decoration: underline;
}

/* =========================================================
   TOURNAMENT ACTION STATUS BUTTONS
   ========================================================= */

.tournament-view-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-decoration: none;
}

.tournament-view-button.is-registered {
    background: #fff;
    border: 2px solid var(--dttf-green-dark);
    color: var(--dttf-green-dark);
}

.tournament-view-button.is-checked-in {
    background: var(--dttf-green-dark);
    border: 2px solid var(--dttf-green-dark);
    color: #fff;
}

.tournament-view-button.is-neutral {
    background: #f5f7f8;
    border: 1px solid var(--dttf-border);
    color: var(--dttf-text);
}

.tournament-status-icon {
    display: inline-grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    flex: 0 0 1.45rem;
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 900;
}

.is-registered .tournament-status-icon {
    background: var(--dttf-green-dark);
    color: #fff;
}

.is-checked-in .tournament-status-icon {
    background: #fff;
    color: var(--dttf-green-dark);
}

/* Tournament detail status banner */
.tournament-detail-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 0.9rem;
    margin-bottom: 0.75rem;
    border-radius: var(--dttf-radius-sm);
    border: 1px solid var(--dttf-border);
}

.tournament-detail-status strong,
.tournament-detail-status span {
    display: block;
}

.tournament-detail-status strong {
    font-size: 0.95rem;
}

.tournament-detail-status > div > span {
    margin-top: 0.1rem;
    font-size: 0.85rem;
}

.tournament-detail-status-icon {
    display: grid !important;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
    border-radius: 50%;
    font-weight: 900;
}

.tournament-detail-status.is-registered {
    background: #eef9eb;
    border-color: #ccebc3;
    color: var(--dttf-green-dark);
}

.tournament-detail-status.is-registered .tournament-detail-status-icon {
    border: 2px solid var(--dttf-green-dark);
}

.tournament-detail-status.is-checked-in {
    background: #e8f7e5;
    border-color: #bfe5b5;
    color: var(--dttf-green-dark);
}

.tournament-detail-status.is-checked-in .tournament-detail-status-icon {
    background: var(--dttf-green-dark);
    color: #fff;
}

.tournament-detail-status.is-checkin-open {
    background: #fff3e8;
    border-color: #ffd3ad;
    color: #b84a00;
}

.tournament-detail-status.is-checkin-open .tournament-detail-status-icon {
    background: #ff6b00;
    color: #fff;
}

.tournament-detail-status.is-not-registered {
    background: #edf5ff;
    border-color: #c9ddf7;
    color: #1659b7;
}

.tournament-detail-status.is-not-registered .tournament-detail-status-icon {
    background: #1e6ee8;
    color: #fff;
}

@media (max-width: 520px) {
    .game-card-actions .tournament-view-button span:not(.tournament-status-icon) {
        white-space: nowrap;
    }
}
/* =========================================================
   NEXT TOURNAMENT HERO - ACTION BUTTON OVERRIDES
   ========================================================= */

.next-tournament-actions .tournament-view-button.is-neutral {
    background: #ffffff;
    border: 2px solid #ffffff;
    color: #142333;
}

.next-tournament-actions .tournament-view-button.is-neutral:hover {
    background: #f2f5f6;
    border-color: #f2f5f6;
    color: #142333;
}

.next-tournament-actions .tournament-view-button.is-registered {
    background: #ffffff;
    border: 2px solid var(--dttf-green);
    color: var(--dttf-green-dark);
}

.next-tournament-actions .tournament-view-button.is-checked-in {
    background: var(--dttf-green);
    border: 2px solid var(--dttf-green);
    color: #142333;
}

/* =========================================================
   TOURNAMENT DETAIL EXPERIENCE
   ========================================================= */

.tournament-detail-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .45rem;
}

.tournament-status-badge,
.roster-status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    border-radius: 999px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.tournament-status-badge {
    padding: .45rem .7rem;
    font-size: .75rem;
    letter-spacing: .02em;
}

.tournament-status-badge.is-registration,
.tournament-status-badge.is-checkin {
    background: var(--dttf-green-soft);
    color: var(--dttf-green-dark);
}

.tournament-status-badge.is-upcoming {
    background: #eef2f4;
    color: var(--dttf-text);
}

.tournament-status-badge.is-complete {
    background: #e8edf0;
    color: var(--dttf-text);
}

.tournament-status-badge.is-canceled {
    background: #f8e8e8;
    color: var(--dttf-danger);
}

.tournament-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin: 1.15rem 0;
}

.tournament-info-item {
    min-width: 0;
    padding: .8rem .85rem;
    background: var(--dttf-page-bg);
    border: 1px solid var(--dttf-border);
    border-radius: 10px;
}

.tournament-info-item strong {
    display: block;
    margin-top: .25rem;
    font-size: .95rem;
    color: var(--dttf-text);
}

.tournament-info-label {
    display: block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #667785;
}

.tournament-roster-summary {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
    font-size: .82rem;
    color: #667785;
}

.tournament-roster-summary strong {
    color: var(--dttf-text);
}

.tournament-roster-summary-divider {
    opacity: .55;
}

.tournament-roster-player {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.roster-status-badge {
    padding: .28rem .45rem;
    font-size: .65rem;
}

.roster-status-badge.is-checked-in {
    background: var(--dttf-green);
    color: #142333;
}

.roster-status-badge.is-registered {
    background: var(--dttf-green-soft);
    color: var(--dttf-green-dark);
}

@media (max-width: 699px) {
    .tournament-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tournament-roster-header {
        display: none;
    }

    .tournament-roster-row:not(.tournament-roster-header) {
        grid-template-columns: 1fr;
        gap: .4rem;
        padding: .8rem 0;
    }

    .tournament-roster-row:not(.tournament-roster-header) > div:nth-child(2),
    .tournament-roster-row:not(.tournament-roster-header) > div:nth-child(3) {
        font-size: .75rem;
        color: #667785;
    }

    .tournament-roster-row:not(.tournament-roster-header) > div:nth-child(2)::before {
        content: "Registered: ";
        font-weight: 700;
    }

    .tournament-roster-row:not(.tournament-roster-header) > div:nth-child(3)::before {
        content: "Checked in: ";
        font-weight: 700;
    }
}

@media (max-width: 420px) {
    .tournament-detail-heading-row {
        align-items: flex-start;
    }

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

    .tournament-roster-summary-divider {
        display: none;
    }

    .tournament-roster-summary {
        gap: .35rem .65rem;
    }
}
/* TOURNAMENT DETAIL - WHO'S PLAYING */
.tournament-player-list { display:flex; flex-direction:column; }
.tournament-player-row { padding:.9rem 0; border-bottom:1px solid var(--dttf-border); }
.tournament-player-row:last-child { border-bottom:0; }
.tournament-player-main { display:flex; align-items:center; gap:.55rem; flex-wrap:wrap; }
.tournament-player-name { font-size:.98rem; font-weight:800; color:var(--dttf-text); }
.tournament-player-meta { display:flex; gap:.35rem 1rem; flex-wrap:wrap; margin-top:.35rem; font-size:.74rem; color:#667785; }
@media (min-width:700px) {
  .tournament-player-row { display:flex; align-items:center; justify-content:space-between; gap:1.25rem; }
  .tournament-player-meta { justify-content:flex-end; margin-top:0; text-align:right; }
}
/* =========================================================
   DTTF TOURNAMENT RESULTS
   Replace the ENTIRE previous Tournament Results CSS with this block.
   Requires:
     /assets/images/winner-chips-bg.png
     /assets/images/default-poker-player.jpg
   ========================================================= */

/* ----- Results section/card ----- */

.tournament-results-card {
    width: 100%;
    overflow: visible;
}

.tournament-results-card .section-heading {
    margin-bottom: 0.75rem;
}


/* ----- Champion hero ----- */

.tournament-winner-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    display: flex;
    align-items: center;
    gap: 1.35rem;

    min-height: 160px;
    margin: 0 0 1rem;
    padding: 1.1rem;

    border: 0;
    border-radius: var(--dttf-radius);
    background-color: #0b4439;

    box-shadow: 0 6px 18px rgba(20, 35, 51, 0.12);
}

/* Chips image occupies the right side only. */
.tournament-winner-hero::before {
    content: "";
    position: absolute;
    z-index: -2;
    top: 0;
    right: 0;
    bottom: 0;

    width: 58%;

    background-image: url("../images/winner-chips-bg.png");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: cover;
}

/* Smoothly blends the chips into the green left side. */
.tournament-winner-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;

    background:
        linear-gradient(
            90deg,
            #073b32 0%,
            #0b4439 32%,
            rgba(11, 68, 57, 0.98) 43%,
            rgba(11, 68, 57, 0.82) 52%,
            rgba(11, 68, 57, 0.34) 67%,
            rgba(11, 68, 57, 0.04) 84%
        );
    pointer-events: none;
}


/* ----- Champion portrait ----- */

.tournament-winner-photo-wrap {
    position: relative;
    z-index: 1;

    flex: 0 0 118px;
    width: 118px;
    height: 118px;
}

.tournament-winner-photo {
    display: block;

    width: 118px;
    height: 118px;

    border: 4px solid #ffffff;
    border-radius: 50%;

    object-fit: cover;
    object-position: center;

    background: #07110f;

    box-shadow:
        0 0 0 3px rgba(123, 220, 92, 0.30),
        0 5px 18px rgba(0, 0, 0, 0.30);
}

/* Used when the player has no profile picture. */
.tournament-profile-fallback {
    object-fit: cover;
    object-position: center;
    background: #07110f;
}


/* ----- Champion copy ----- */

.tournament-winner-content {
    position: relative;
    z-index: 1;

    min-width: 0;
    max-width: 320px;

    padding-right: 0.5rem;
}

.tournament-winner-crown {
    display: none;
}

.tournament-winner-label {
    display: block;
    position: relative;
    width: fit-content;
    min-width: 210px;

    margin: 0 0 0.55rem;
    padding-bottom: 0.38rem;

    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.24em;

    color: var(--dttf-green);
    text-shadow: 0 0 10px rgba(123, 220, 92, 0.18);
}

.tournament-winner-label::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 1px;

    background: linear-gradient(
        90deg,
        var(--dttf-green) 0%,
        rgba(123, 220, 92, 0.75) 72%,
        rgba(123, 220, 92, 0) 100%
    );

    box-shadow: 0 0 6px rgba(123, 220, 92, 0.35);
}

.tournament-winner-content h3 {
    margin: 0;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.08;

    color: #ffffff;
}

.tournament-winner-team {
    margin-top: 0.25rem;

    font-size: 0.72rem;
    font-weight: 600;

    color: rgba(255, 255, 255, 0.72);
}

.tournament-winner-points {
    margin-top: 0.45rem;

    font-size: 0.78rem;
    font-weight: 750;

    color: #ffffff;
}

.tournament-winner-points sup {
    color: var(--dttf-green);
}


/* ----- Results table shell ----- */

.tournament-results-table {
    width: 100%;

    overflow: hidden;

    border: 1px solid var(--dttf-border);
    border-radius: var(--dttf-radius);

    background: #ffffff;
}


/* ----- Table header and rows ----- */

.tournament-results-table-header,
.tournament-result-compact-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 64px;
    align-items: center;
    column-gap: 0.7rem;
}

.tournament-results-table-header {
    min-height: 42px;
    padding: 0.5rem 0.75rem;

    border-bottom: 1px solid var(--dttf-border);

    background: #e6ecef;

    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.055em;

    color: #596b78;
}

.tournament-results-table-header span:first-child {
    text-align: center;
}

.tournament-results-table-header span:last-child {
    text-align: right;
}

.tournament-result-compact-row {
    min-height: 56px;
    padding: 0.45rem 0.75rem;

    border: 0;

    background: #ffffff;
}

/*
   Header is the first child inside .tournament-results-table,
   therefore result rows alternate correctly using even/odd child positions.
*/
.tournament-result-compact-row:nth-child(odd) {
    background: #eef2f4;
}

.tournament-result-compact-row:nth-child(even) {
    background: #ffffff;
}


/* ----- Place ----- */

.tournament-result-place {
    text-align: center;

    font-size: 0.92rem;
    font-weight: 800;

    color: var(--dttf-text);
}


/* ----- Player ----- */

.tournament-result-player-compact {
    display: flex;
    align-items: center;
    gap: 0.65rem;

    min-width: 0;
}

.tournament-result-avatar {
    display: block;

    width: 38px;
    height: 38px;
    flex: 0 0 38px;

    border: 1px solid rgba(20, 35, 51, 0.12);
    border-radius: 50%;

    object-fit: cover;
    object-position: center;

    background: #07110f;
}

.tournament-result-player-copy {
    display: flex;
    flex-direction: column;

    min-width: 0;
}

.tournament-result-player-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 0.92rem;
    font-weight: 800;

    color: var(--dttf-text);
}

.tournament-result-player-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    margin-top: 0.05rem;

    font-size: 0.67rem;

    color: #778793;
}


/* ----- Points ----- */

.tournament-result-points-compact {
    text-align: right;
}

.tournament-result-points-compact strong {
    font-size: 0.92rem;
    font-weight: 800;

    color: var(--dttf-text);
}

.tournament-result-points-compact sup {
    margin-left: 1px;
    color: #d23a32;
}


/* ----- Late-entry note ----- */

.tournament-results-footnote {
    margin-top: 0.7rem;
    padding: 0.65rem 0.75rem;

    border: 0;
    border-radius: 8px;

    background: #fff0ef;

    font-size: 0.72rem;
    font-weight: 600;

    color: #b4312a;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 699px) {

    .tournament-winner-hero {
        gap: 0.85rem;

        min-height: 128px;
        padding: 0.85rem;
    }

    .tournament-winner-hero::before {
        width: 48%;
        opacity: 0.90;
    }

    .tournament-winner-hero::after {
        background:
            linear-gradient(
                90deg,
                #073b32 0%,
                #0b4439 42%,
                rgba(11, 68, 57, 0.94) 55%,
                rgba(11, 68, 57, 0.50) 72%,
                rgba(11, 68, 57, 0.08) 92%
            );
    }

    .tournament-winner-photo-wrap {
        flex-basis: 82px;
        width: 82px;
        height: 82px;
    }

    .tournament-winner-photo {
        width: 82px;
        height: 82px;
        border-width: 3px;
    }

    .tournament-winner-content {
        max-width: 48%;
    }

    .tournament-winner-label {
        min-width: 145px;
        margin-bottom: 0.42rem;
        padding-bottom: 0.28rem;
        font-size: 0.72rem;
        letter-spacing: 0.16em;
    }

    .tournament-winner-content h3 {
        font-size: 1.35rem;
    }

    .tournament-winner-team {
        font-size: 0.65rem;
    }

    .tournament-winner-points {
        margin-top: 0.3rem;
        font-size: 0.70rem;
    }

    .tournament-results-table-header,
    .tournament-result-compact-row {
        grid-template-columns: 38px minmax(0, 1fr) 48px;
        column-gap: 0.45rem;
    }

    .tournament-results-table-header {
        min-height: 38px;
        padding: 0.42rem 0.45rem;
    }

    .tournament-result-compact-row {
        min-height: 50px;
        padding: 0.38rem 0.45rem;
    }

    .tournament-result-avatar {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .tournament-result-player-compact {
        gap: 0.5rem;
    }

    .tournament-result-player-copy strong,
    .tournament-result-points-compact strong,
    .tournament-result-place {
        font-size: 0.85rem;
    }
}


/* =========================================================

/* =========================================================
   TOURNAMENT DIRECTORY
   Upcoming schedule + weekly league results.
   Mobile-first and isolated from Tournament Detail styles.
   ========================================================= */

.tournament-directory {
    display: grid;
    gap: 1.25rem;
}

.tournament-directory-header {
    padding: 0.25rem 0;
}

.tournament-directory-header h1 {
    margin: 0;
    font-size: clamp(1.75rem, 5vw, 2.35rem);
    line-height: 1.1;
    color: var(--dttf-text);
}

.tournament-directory-header p {
    margin: 0.4rem 0 0;
    color: var(--dttf-text-muted);
    font-size: 0.92rem;
}


/* =========================================================
   DIRECTORY SECTION CARDS
   ========================================================= */

.tournament-directory-section {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--dttf-border);
    border-radius: var(--dttf-radius);
    box-shadow: 0 4px 14px rgba(20, 35, 51, 0.06);
}

.tournament-directory-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--dttf-border);
}

.tournament-directory-section-heading h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--dttf-text);
}

.tournament-directory-section-heading p {
    margin: 0.2rem 0 0;
    color: var(--dttf-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.tournament-directory-empty {
    margin: 0;
    padding: 1.25rem 1rem;
    color: var(--dttf-text-muted);
}


/* =========================================================
   UPCOMING TOURNAMENTS
   ========================================================= */

.tournament-upcoming-list {
    display: flex;
    flex-direction: column;
}

.tournament-upcoming-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
        "date main"
        "date action";
    gap: 0.45rem 0.85rem;
    align-items: center;
    padding: 0.9rem 1rem;
}

.tournament-upcoming-card + .tournament-upcoming-card {
    border-top: 1px solid var(--dttf-border);
}

.tournament-upcoming-date {
    grid-area: date;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding-right: 0.85rem;
    border-right: 1px solid var(--dttf-border);
    text-align: center;
}

.tournament-upcoming-day {
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dttf-green-dark);
}

a.tournament-upcoming-date:hover strong,
a.tournament-upcoming-date:focus-visible strong { text-decoration: underline; }
a.tournament-upcoming-date:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.tournament-upcoming-details { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--navy); font-size: 1.4rem; }
.tournament-upcoming-details:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.tournament-upcoming-date strong {
    margin-top: 0.08rem;
    font-size: 0.92rem;
    color: var(--dttf-text);
}

.tournament-upcoming-date > span:last-child {
    margin-top: 0.1rem;
    font-size: 0.67rem;
    font-weight: 700;
    color: var(--dttf-text-muted);
}

.tournament-upcoming-main {
    grid-area: main;
    min-width: 0;
}

.tournament-upcoming-venue {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    color: var(--dttf-text);
    font-size: 0.98rem;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tournament-upcoming-venue:hover,
.tournament-upcoming-venue:focus-visible {
    color: var(--dttf-green-dark);
    text-decoration: underline;
}

.tournament-upcoming-location {
    margin-top: 0.12rem;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.15;
    color: var(--dttf-text-muted);
}

.tournament-upcoming-status {
    margin-top: 0.35rem;
}

.tournament-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.tournament-status-registration {
    background: var(--dttf-green-soft);
    color: var(--dttf-green-dark);
}

.tournament-status-checkin {
    background: #fff3e8;
    color: #b84a00;
}

.tournament-status-upcoming {
    background: #eef2f4;
    color: var(--dttf-text);
}

.tournament-upcoming-link {
    grid-area: action;
    width: fit-content;
    color: var(--dttf-green-dark);
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

.tournament-upcoming-link:hover,
.tournament-upcoming-link:focus-visible {
    text-decoration: underline;
}


/* =========================================================
   WEEK SELECTOR
   ========================================================= */

.tournament-results-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.tournament-results-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.tournament-season-form {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.tournament-season-form label {
    color: var(--dttf-text-muted);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.tournament-season-form select {
    min-height: 32px;
    max-width: 180px;
    padding: 0.25rem 1.8rem 0.25rem 0.55rem;
    border: 1px solid var(--dttf-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--dttf-text);
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
}

.tournament-week-navigation {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
}

.tournament-week-button {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--dttf-text);
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
}

.tournament-week-previous {
    justify-content: flex-start;
}

.tournament-week-next {
    justify-content: flex-end;
}

.tournament-week-button:hover,
.tournament-week-button:focus-visible {
    color: var(--dttf-green-dark);
    text-decoration: underline;
}

.tournament-week-button.is-disabled {
    color: var(--dttf-text-muted);
    opacity: 0.45;
    cursor: default;
    text-decoration: none;
}

.tournament-week-form {
    position: relative;
    min-width: 92px;
    min-height: 32px;
}

.tournament-week-form label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.tournament-week-range {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 0.6rem;
    border: 1px solid var(--dttf-border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--dttf-text);
    font-size: 0.76rem;
    font-weight: 800;
    white-space: nowrap;
}

.tournament-week-form input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}


/* =========================================================
   WEEKLY RESULTS
   Mirrors the Venue Profile result concept while adding venue.
   ========================================================= */

.tournament-results-list {
    display: flex;
    flex-direction: column;
}

.tournament-result-card {
    padding: 0;
}

.tournament-result-card + .tournament-result-card {
    border-top: 1px solid var(--dttf-border);
}

.tournament-result-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    background: #f5f7f8;
}

.tournament-result-heading-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tournament-result-venue {
    overflow: hidden;
    color: var(--dttf-text);
    font-size: 0.9rem;
    font-weight: 850;
    line-height: 1.2;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tournament-result-venue:hover,
.tournament-result-venue:focus-visible {
    color: var(--dttf-green-dark);
    text-decoration: underline;
}

.tournament-result-date {
    margin-top: 0.18rem;
    color: var(--dttf-text-muted);
    font-size: 0.69rem;
    font-weight: 650;
    text-decoration: none;
}

.tournament-result-date:hover,
.tournament-result-date:focus-visible {
    text-decoration: underline;
}

.tournament-result-entries {
    flex: 0 0 auto;
    color: var(--dttf-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.tournament-result-entries:hover,
.tournament-result-entries:focus-visible {
    color: var(--dttf-green-dark);
}

.tournament-result-places {
    display: grid;
    grid-template-columns: 1fr;
}

.tournament-result-player {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px 38px minmax(0, 1fr);
    gap: 0.6rem;
    align-items: center;
    min-height: 54px;
    padding: 0.45rem 1rem;
    color: var(--dttf-text);
    text-decoration: none;
}

.tournament-result-player + .tournament-result-player {
    border-top: 1px solid #edf0f2;
}

.tournament-result-player:hover,
.tournament-result-player:focus-visible {
    background: #f8faf9;
}

.tournament-result-place {
    text-align: center;
    color: var(--dttf-text-muted);
    font-size: 0.72rem;
    font-weight: 900;
}

.tournament-result-player img {
    display: block;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(20, 35, 51, 0.12);
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
}

.tournament-result-player > span:last-child {
    overflow: hidden;
    font-size: 0.88rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   TABLET / DESKTOP
   ========================================================= */

@media (min-width: 700px) {

    .tournament-directory {
        gap: 1.5rem;
    }

    .tournament-directory-section-heading {
        padding: 1rem 1.15rem;
    }

    /* Compact desktop schedule: date | venue + status | action */
    .tournament-upcoming-card {
        grid-template-columns: 90px minmax(0, 1fr) auto;
        grid-template-areas: "date main action";
        gap: 1rem;
        min-height: 0;
        padding: 0.7rem 1.15rem;
    }

    .tournament-upcoming-date {
        align-self: center;
        align-items: flex-start;
        justify-content: center;
        padding-right: 1rem;
        text-align: left;
    }

    .tournament-upcoming-day {
        font-size: 0.62rem;
    }

    .tournament-upcoming-date strong {
        font-size: 0.86rem;
    }

    .tournament-upcoming-date > span:last-child {
        font-size: 0.64rem;
    }

    .tournament-upcoming-main {
        align-self: center;
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }

    .tournament-upcoming-venue {
        font-size: 0.94rem;
    }

    .tournament-upcoming-location {
        flex: 0 0 auto;
        margin-top: 0;
        margin-left: -0.35rem;
        white-space: nowrap;
    }

    .tournament-upcoming-status {
        flex: 0 0 auto;
        margin-top: 0;
    }

    .tournament-upcoming-link {
        align-self: center;
        padding: 0;
        border: 0;
        border-radius: 0;
        white-space: nowrap;
    }

    .tournament-upcoming-link:hover,
    .tournament-upcoming-link:focus-visible {
        border-color: transparent;
        text-decoration: underline;
    }

    .tournament-results-heading {
        flex-direction: row;
        align-items: center;
    }

    .tournament-week-navigation {
        width: auto;
        min-width: 310px;
    }

    .tournament-result-heading {
        padding: 0.75rem 1.15rem;
    }

    .tournament-result-places {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding: 0.55rem 0.65rem;
    }

    .tournament-result-player {
        grid-template-columns: 32px 38px minmax(0, 1fr);
        padding: 0.35rem 0.5rem;
        border-radius: 8px;
    }

    .tournament-result-player + .tournament-result-player {
        border-top: 0;
        border-left: 1px solid #edf0f2;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */



@media (max-width: 520px) {
    .tournament-results-title {
        align-items: flex-end;
    }

    .tournament-season-form {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .tournament-season-form select {
        max-width: 150px;
    }
}

/* Weekly results: full-width season control on phones. */
@media (max-width:700px) {
  .tournament-results-title { flex-direction:column; align-items:stretch; }
  .tournament-season-form { flex-direction:column; align-items:stretch; width:100%; }
  .tournament-season-form select { width:100%; max-width:none; min-height:44px; }
}
/* Completed tournament tabs, recap and existing gallery media. */
.tournament-detail-page [hidden] { display:none !important; }
.completed-entry-count { margin:1rem 0 0; color:var(--text-muted, #596b7d); }
.completed-entry-count strong { color:var(--text-primary, #172338); font-size:1.5rem; }
.completed-tournament-tabs { display:flex; gap:1.5rem; margin:1.25rem 0; border-bottom:1px solid #dce3eb; overflow-x:auto; }
.completed-tournament-tabs a { padding:.9rem .15rem; min-height:44px; color:#596b7d; font-weight:700; text-decoration:none; white-space:nowrap; border-bottom:3px solid transparent; }
.completed-tournament-tabs a[aria-selected="true"] { color:#146847; border-bottom-color:#146847; }
.completed-tournament-tabs a:focus-visible, .tournament-disclosure summary:focus-visible { outline:3px solid #2875a8; outline-offset:3px; }
.tournament-recap-card .section-heading h2, .tournament-results-card .section-heading h2 { font-size:1.5rem; line-height:1.25; }
.tournament-recap-card {
    background:#fff;
    border:1px solid #dce3eb;
    border-radius:var(--dttf-radius, 14px);
    padding:clamp(1rem, 3vw, 1.5rem);
    margin-bottom:1.25rem;
    box-shadow:0 3px 12px rgba(20, 35, 51, .06);
}
.tournament-recap-title { font-size:1.2rem; margin:1rem 0 .75rem; }
.tournament-recap-excerpt {
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    line-clamp:3;
    line-height:1.6;
    max-height:4.8em;
    overflow:hidden;
    overflow-wrap:anywhere;
}
.tournament-featured-photo { margin:0; }
.tournament-featured-photo img { display:block; width:100%; max-height:560px; object-fit:contain; border-radius:12px; }
.tournament-featured-photo a { display:block; min-width:0; }
.tournament-featured-photo img { max-width:100%; height:auto; }
.tournament-disclosure { margin:1.25rem 0; }
.tournament-disclosure summary { padding:.85rem; min-height:44px; cursor:pointer; font-weight:700; color:#146847; border:1px solid #dce3eb; border-radius:8px; }
.tournament-disclosure [data-open-label], .tournament-disclosure[open] [data-closed-label] { display:none; }
.tournament-disclosure[open] [data-open-label] { display:inline; }
.tournament-recap-card:has([data-recap-disclosure][open]) .tournament-recap-excerpt { display:none; }
.tournament-recap-body { line-height:1.75; overflow-wrap:anywhere; padding-top:1rem; }
.tournament-recap-body a { text-decoration:underline; }
.completed-second-chance { margin-top:2rem; padding-top:1.5rem; border-top:1px solid #dce3eb; scroll-margin-top:1rem; }
.tournament-gallery-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:1rem; }
.tournament-gallery-card { position:relative; display:flex; flex-direction:column; min-width:0; overflow:visible; background:#fff; border:1px solid #dce3eb; border-radius:12px; box-shadow:0 3px 12px rgba(20,35,51,.06); }
.tournament-gallery-card:has(.tournament-gallery-reaction:hover), .tournament-gallery-card:has(.tournament-gallery-reaction:focus) { z-index:3; }
.tournament-gallery-card-image { position:relative; display:block; background:#edf0f2; }
.tournament-gallery-card-winner .tournament-gallery-card-image { overflow:hidden; border-radius:12px 12px 0 0; }
.tournament-gallery-card-winner .tournament-gallery-card-image::after { position:absolute; z-index:2; inset:0; border:2px solid #c9921a; border-radius:12px 12px 0 0; content:""; pointer-events:none; }
.tournament-gallery-winner-mark { position:absolute; z-index:3; right:.45rem; bottom:.45rem; display:grid; place-items:center; width:1.65rem; height:1.65rem; border:1px solid rgba(255,255,255,.9); border-radius:50%; background:#c9921a; color:#fff; box-shadow:0 2px 6px rgba(10,24,43,.25); }
.tournament-gallery-winner-mark svg { width:1rem; height:1rem; }
.tournament-gallery-card-image img { display:block; width:100%; aspect-ratio:4 / 3; object-fit:cover; border-radius:11px 11px 0 0; }
.tournament-gallery-moderation-placeholder { display:flex; align-items:center; justify-content:center; width:100%; aspect-ratio:4 / 3; border-radius:11px 11px 0 0; background:#dfe4e8; color:#526475; font-size:.85rem; font-weight:700; text-align:center; }
.tournament-gallery-moderation-badge, .tournament-photo-moderation-badge { display:block; width:max-content; max-width:100%; margin:.35rem 0 0; padding:.15rem .35rem; border-radius:4px; background:#fff3cd; color:#664d03; font-size:.7rem; font-weight:700; line-height:1.25; }
.tournament-gallery-report, .tournament-photo-report { margin-top:.6rem; color:var(--text-muted, #596b7d); font-size:.78rem; }
.tournament-gallery-report summary, .tournament-photo-report summary { cursor:pointer; font-weight:700; }
.tournament-gallery-report form, .tournament-photo-report form { display:flex; flex-wrap:wrap; align-items:end; gap:.45rem; margin-top:.45rem; }
.tournament-gallery-report label, .tournament-photo-report label { display:flex; flex-direction:column; gap:.2rem; font-weight:700; }
.tournament-gallery-report label select, .tournament-photo-report label select { font-weight:400; }
.tournament-gallery-report select, .tournament-photo-report select { min-height:2rem; }
.tournament-gallery-card-actions .tournament-gallery-report[open] { position:relative; }
.tournament-gallery-card-actions .tournament-gallery-report[open] form { position:absolute; right:0; bottom:calc(100% + .35rem); z-index:5; width:220px; padding:.65rem; margin:0; border:1px solid #d8e0e6; border-radius:8px; background:#fff; box-shadow:0 5px 16px rgba(20,35,51,.15); }
.tournament-gallery-card-actions .tournament-gallery-report[open] label, .tournament-gallery-card-actions .tournament-gallery-report[open] select { width:100%; min-width:0; }
.tournament-gallery-card-actions .tournament-gallery-report[open] .button { min-height:2rem; padding:.35rem .6rem; font-size:.75rem; white-space:nowrap; }
.tournament-gallery-report-close { position:absolute; top:.35rem; right:.35rem; width:1.5rem; height:1.5rem; padding:0; border:0; background:transparent; color:var(--text-muted,#596b7d); font-size:1.15rem; line-height:1; cursor:pointer; }
.tournament-gallery-report-close:hover { color:var(--text); }
.tournament-gallery-delete { position:relative; }
.tournament-gallery-caption-edit { position:relative; }
.tournament-gallery-caption-edit summary { cursor:pointer; list-style:none; }
.tournament-gallery-caption-edit summary::-webkit-details-marker { display:none; }
.tournament-gallery-caption-edit[open] form { position:absolute; right:0; bottom:calc(100% + .35rem); z-index:5; display:grid; gap:.45rem; width:240px; padding:.65rem; margin:0; border:1px solid #d8e0e6; border-radius:8px; background:#fff; box-shadow:0 5px 16px rgba(20,35,51,.15); }
.tournament-gallery-caption-edit[open] label { color:var(--text); font-size:.78rem; font-weight:700; }
.tournament-gallery-caption-edit[open] input[type=text] { width:100%; box-sizing:border-box; min-height:2rem; padding:.35rem .5rem; border:1px solid #ccd6df; border-radius:5px; font:inherit; }
.tournament-gallery-caption-edit-actions { display:flex; justify-content:flex-end; gap:.45rem; }
.tournament-gallery-caption-edit-actions .button { min-height:2rem; padding:.35rem .6rem; font-size:.75rem; white-space:nowrap; }
.tournament-gallery-delete summary { cursor:pointer; list-style:none; }
.tournament-gallery-delete summary::-webkit-details-marker { display:none; }
.tournament-gallery-delete[open] form { position:absolute; right:0; bottom:calc(100% + .35rem); z-index:5; display:block; width:240px; padding:.65rem; padding-top:2rem; margin:0; border:1px solid #d8e0e6; border-radius:8px; background:#fff; box-shadow:0 5px 16px rgba(20,35,51,.15); }
.tournament-gallery-delete[open] form p { margin:0 0 .65rem; color:var(--text); font-size:.78rem; line-height:1.35; }
.tournament-gallery-delete-actions { display:flex; align-items:center; justify-content:center; gap:.45rem; }
.tournament-gallery-delete-actions .button { min-height:2rem; padding:.35rem .6rem; font-size:.75rem; white-space:nowrap; }
.tournament-gallery-delete-actions .button-danger { color:#842029; background:#f8d7da; border-color:#f1aeb5; }
.tournament-gallery-card-actions { display:flex; width:max-content; justify-content:flex-end; align-items:center; gap:0; margin-top:auto; margin-left:auto; padding-top:.75rem; }
.tournament-gallery-card-actions .tournament-gallery-delete-form, .tournament-gallery-card-actions .tournament-gallery-report { display:flex; margin:0; padding:0; }
.button.tournament-gallery-icon-action, .tournament-gallery-caption-edit summary, .tournament-gallery-delete summary, .tournament-gallery-report summary, .tournament-photo-report summary { display:flex; flex:0 0 2rem; align-items:center; justify-content:center; box-sizing:border-box; width:2rem; height:2rem; min-width:2rem; min-height:2rem; margin:0; padding:0; border:0 !important; border-radius:4px; background:transparent; color:var(--text-muted,#596b7d); font-size:1rem; line-height:1; list-style:none; cursor:pointer; }
.button.tournament-gallery-icon-action:hover, .tournament-gallery-caption-edit summary:hover, .tournament-gallery-delete summary:hover, .tournament-gallery-report summary:hover, .tournament-photo-report summary:hover { background:var(--surface-alt,#f5f7f9); color:var(--text); }
.tournament-gallery-action-icon { display:block; width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.tournament-gallery-report summary::-webkit-details-marker, .tournament-photo-report summary::-webkit-details-marker { display:none; }
.tournament-photo-moderation-placeholder { display:flex; align-items:center; justify-content:center; width:min(100%, 720px); min-height:280px; padding:2rem; background:#2b3542; color:#fff; font-size:1rem; font-weight:700; text-align:center; }
.tournament-gallery-card-body { display:flex; flex:1; flex-direction:column; padding:.75rem; border-top:1px solid #dce3eb; }
.tournament-gallery-visibility-badge, .tournament-photo-visibility-badge { display:block; width:max-content; max-width:100%; margin:.35rem 0 0; padding:.15rem .35rem; border-radius:4px; background:#f5f7f9; color:var(--text-muted, #596b7d); font-size:.7rem; font-weight:600; line-height:1.25; }
.tournament-gallery-card-caption { margin:0 0 .65rem; font-size:.82rem; line-height:1.45; overflow-wrap:anywhere; }
.tournament-gallery-card-meta { margin:.55rem 0 0; padding-top:.55rem; border-top:1px solid #edf0f2; color:var(--text-muted, #596b7d); font-size:.82rem; line-height:1.45; }
.tournament-gallery-card-meta a { color:#146847; font-weight:700; }
.tournament-gallery-card-reactions { margin-top:.65rem; padding-top:.6rem; border-top:1px solid #edf0f2; color:var(--text-muted, #596b7d); font-size:.75rem; }
.tournament-gallery-reaction-summary { margin-bottom:.25rem; }
.tournament-gallery-reaction-total { font-weight:700; }
.tournament-gallery-reaction-list { display:flex; flex-wrap:nowrap; gap:.2rem; align-items:center; }
.tournament-gallery-reaction { position:relative; display:inline-flex; align-items:center; justify-content:center; gap:.2rem; min-width:28px; min-height:28px; padding:.05rem .1rem; border:1px solid #dce3eb; border-radius:7px; background:#fff; color:#172338; cursor:pointer; text-decoration:none; }
button.tournament-gallery-reaction:hover, button.tournament-gallery-reaction:focus-visible, a.tournament-gallery-reaction:hover, a.tournament-gallery-reaction:focus-visible, .tournament-gallery-reaction.is-selected { border-color:#16844b; background:#eaf6ef; }
.tournament-gallery-reaction:disabled { opacity:.6; cursor:wait; }
.tournament-gallery-reaction img { width:24px; height:24px; object-fit:contain; }
.tournament-gallery-reaction-tooltip { position:absolute; z-index:2; left:50%; bottom:calc(100% + .4rem); display:none; width:max-content; max-width:220px; padding:.35rem .5rem; border-radius:5px; background:#172338; color:#fff; font-size:.72rem; line-height:1.3; text-align:left; transform:translateX(-50%); pointer-events:none; }
.tournament-gallery-reaction:hover .tournament-gallery-reaction-tooltip, .tournament-gallery-reaction:focus .tournament-gallery-reaction-tooltip, .tournament-gallery-reaction:focus-within .tournament-gallery-reaction-tooltip { display:block; }
.tournament-gallery-reaction-empty { margin:0; font-size:.75rem; }
.tournament-gallery-empty { margin:0; color:var(--text-muted, #596b7d); }
.tournament-gallery-upload-result { margin:0 0 1rem; padding:.85rem 1rem; border-radius:8px; line-height:1.5; }
.tournament-gallery-upload-result.is-success { background:#eaf6ef; color:#145c38; }
.tournament-gallery-upload-result.is-error { background:#fff0f0; color:#8a1f2d; }
.tournament-gallery-upload-result ul { margin:.5rem 0 0 1.25rem; padding:0; }
.tournament-gallery-heading { align-items:center; justify-content:space-between; gap:1rem; }
.tournament-gallery-upload-dialog { width:min(680px, calc(100% - 2rem)); max-height:calc(100vh - 2rem); padding:0; border:0; border-radius:14px; box-shadow:0 18px 60px rgba(20,35,51,.28); color:inherit; }
.tournament-gallery-upload-dialog::backdrop { background:rgba(20,35,51,.58); }
.tournament-gallery-upload { padding:clamp(1rem, 4vw, 1.5rem); overflow:auto; }
.tournament-gallery-upload .section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.tournament-gallery-upload h3 { margin:0; font-size:1.2rem; }
.tournament-gallery-dialog-close { flex:0 0 auto; min-width:44px; min-height:44px; border:1px solid #ccd6df; border-radius:8px; background:#fff; color:#172338; font-size:1.5rem; line-height:1; cursor:pointer; }
.tournament-gallery-upload-form { display:grid; gap:.85rem; max-width:680px; }
.tournament-gallery-upload-form input[type=file] { width:100%; box-sizing:border-box; padding:.75rem; border:1px dashed #b5c5cf; border-radius:8px; background:#f5f8fa; }
.tournament-gallery-upload-help { margin:0; color:var(--text-muted, #596b7d); font-size:.88rem; line-height:1.5; }
.tournament-gallery-caption-list { display:grid; gap:.75rem; }
.tournament-gallery-caption-item { display:grid; gap:.35rem; }
.tournament-gallery-caption-item input[type=text] { width:100%; box-sizing:border-box; min-height:44px; padding:.65rem .75rem; border:1px solid #ccd6df; border-radius:8px; font:inherit; }
.tournament-gallery-caption-counter { color:var(--text-muted, #596b7d); font-size:.8rem; }
.tournament-gallery-visibility { display:flex; flex-wrap:wrap; gap:1rem; margin:0; padding:0; border:0; }
.tournament-gallery-visibility legend { width:100%; font-weight:700; }
.tournament-gallery-visibility label { display:flex; align-items:center; gap:.45rem; min-height:44px; }
.tournament-gallery-release { display:flex; gap:.6rem; align-items:flex-start; font-size:.9rem; line-height:1.4; }
.tournament-gallery-release input { flex:0 0 auto; margin-top:.25rem; }
.tournament-gallery-upload-form button:disabled { background:#c7ced4; border-color:#c7ced4; color:#fff; cursor:not-allowed; opacity:1; }
.tournament-photo-viewer { max-width:1100px; margin:0 auto 1.5rem; }
.tournament-photo-viewer.is-loading { opacity:.55; pointer-events:none; }
.tournament-photo-venue-title { font-size:1.45rem; }
.tournament-photo-subheading { margin:.35rem 0 0; color:var(--text-muted, #596b7d); font-weight:700; }
.tournament-photo-header { margin-bottom:.75rem; }
.tournament-photo-back { display:inline-block; margin-bottom:.4rem; color:#146847; font-size:.85rem; font-weight:700; text-decoration:none; }
.tournament-photo-back:hover, .tournament-photo-back:focus-visible { text-decoration:underline; }
.tournament-photo-viewer figure { margin:.75rem 0 0; }
.tournament-photo-stage { position:relative; display:flex; align-items:center; justify-content:center; min-height:240px; padding:1rem 3.25rem; background:#17202b; border-radius:12px; touch-action:pan-y; }
.tournament-photo-display { position:relative; display:flex; align-items:center; justify-content:center; max-width:100%; }
.tournament-photo-display img { display:block; width:auto; max-width:100%; height:auto; max-height:60vh; object-fit:contain; }
.tournament-photo-fullscreen { position:absolute; right:.65rem; bottom:.65rem; display:inline-flex; align-items:center; justify-content:center; width:2.25rem; height:2.25rem; border:1px solid rgba(255,255,255,.55); border-radius:6px; background:rgba(23,32,43,.75); color:#fff; font-size:1.1rem; cursor:pointer; }
.tournament-photo-fullscreen:hover, .tournament-photo-fullscreen:focus-visible { background:#16844b; }
.tournament-photo-arrow { position:absolute; top:50%; z-index:1; display:inline-flex; align-items:center; justify-content:center; width:2.4rem; height:2.4rem; border:1px solid rgba(255,255,255,.55); border-radius:50%; background:rgba(23,32,43,.75); color:#fff; font-size:0; line-height:1; text-decoration:none; transform:translateY(-50%); }
.tournament-photo-arrow::before { display:block; width:.65rem; height:.65rem; border-top:2px solid currentColor; border-right:2px solid currentColor; content:""; }
.tournament-photo-arrow-previous::before { transform:rotate(-135deg); }
.tournament-photo-arrow-next::before { transform:rotate(45deg); }
.tournament-photo-arrow:hover, .tournament-photo-arrow:focus-visible { background:#16844b; }
.tournament-photo-arrow-previous { left:.65rem; }
.tournament-photo-arrow-next { right:.65rem; }
.tournament-photo-counter { position:absolute; bottom:.65rem; left:50%; padding:.2rem .5rem; border-radius:4px; background:rgba(23,32,43,.75); color:#fff; font-size:.75rem; transform:translateX(-50%); }
.tournament-photo-viewer figcaption { line-height:1.6; }
.tournament-photo-viewer figcaption p { margin:.5rem 0; }
.tournament-photo-viewer figcaption a { color:#146847; font-weight:700; }
.tournament-photo-meta-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.tournament-photo-meta-row > p { margin:.5rem 0; font-size:.92rem; }
.tournament-photo-meta-row .tournament-photo-reactions { flex:0 0 auto; margin-top:0; text-align:right; }
.tournament-photo-meta-row .tournament-gallery-reaction-list { justify-content:flex-end; }
.tournament-photo-action-row { display:flex; justify-content:flex-end; align-items:center; gap:0; margin-top:.5rem; }
.tournament-photo-action-row .tournament-photo-report, .tournament-photo-action-row .tournament-gallery-delete, .tournament-photo-action-row .tournament-gallery-caption-edit { display:flex; margin:0; }
.tournament-photo-action-row .tournament-gallery-caption-edit[open] { position:relative; }
.tournament-photo-action-row .tournament-photo-report[open] { position:relative; }
.tournament-photo-action-row .tournament-photo-report[open] form { position:absolute; right:0; bottom:calc(100% + .35rem); z-index:5; width:220px; padding:.65rem; margin:0; border:1px solid #d8e0e6; border-radius:8px; background:#fff; box-shadow:0 5px 16px rgba(20,35,51,.15); }
.tournament-photo-caption { margin:.5rem 0 !important; padding:.45rem .7rem; border-left:3px solid #146847; background:#f5f7f9; color:#394b5c; font-size:.92rem; font-style:italic; line-height:1.4; }

@media (max-width:699px) {
    .tournament-gallery-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:.65rem; }
    .tournament-gallery-card-actions .tournament-gallery-report[open] form, .tournament-gallery-card-actions .tournament-gallery-delete[open] form, .tournament-gallery-card-actions .tournament-gallery-caption-edit[open] form, .tournament-photo-action-row .tournament-gallery-caption-edit[open] form { position:fixed; left:50%; right:auto; bottom:1rem; width:min(240px,calc(100vw - 2rem)); transform:translateX(-50%); }
    .tournament-photo-stage { min-height:180px; padding: .65rem 2.65rem; }
    .tournament-photo-display img { max-height:52vh; }
    .tournament-photo-arrow { width:2rem; height:2rem; font-size:1.1rem; }
    .tournament-photo-arrow-previous { left:.35rem; }
    .tournament-photo-arrow-next { right:.35rem; }
    .tournament-gallery-card-reactions { min-width:0; }
    .tournament-gallery-reaction-list { width:100%; gap:.1rem; justify-content:space-between; }
    .tournament-gallery-reaction { flex:1 1 0; width:0; min-width:0; min-height:28px; padding:.05rem 0; }
    .tournament-gallery-reaction img { width:22px; height:22px; }
    .tournament-photo-meta-row { align-items:flex-start; gap:.5rem; }
    .tournament-photo-meta-row .tournament-photo-reactions { max-width:58%; }
    .tournament-photo-meta-row .tournament-gallery-reaction-list { width:auto; gap:.1rem; }
    .tournament-photo-meta-row .tournament-gallery-reaction { flex:0 0 28px; width:28px; min-width:28px; padding:.05rem; }
    .tournament-photo-meta-row .tournament-gallery-reaction img { width:22px; height:22px; }
    .completed-tournament-tabs { gap:1rem; }
    .tournament-result-tabs { gap:1rem; }
    .tournament-result-tabs a { flex:1 1 0; min-width:0; overflow-wrap:anywhere; }
    .tournament-recap-card { padding:1rem; }
    .tournament-detail-page .tournament-winner-content { min-width:0; max-width:none; flex:1; }
    .tournament-detail-page .tournament-winner-label { min-width:0; }
    .tournament-detail-page .tournament-winner-content h3 { overflow-wrap:anywhere; }
}
.tournament-event-details dt { font-weight:700; margin-top:1rem; }
.tournament-event-details dd { margin:.25rem 0 0; }
.recap-admin-editor.ql-container { min-height:280px; font:inherit; background:#fff; }
.recap-admin-editor .ql-editor { min-height:280px; line-height:1.7; }
.recap-admin-editor .ql-tooltip { z-index:2; }
.recap-review-warning { padding:1rem; border-left:4px solid #ac6b00; background:#fff3d6; margin:1rem 0; }
.recap-admin-preview { border:1px solid #dce3eb; padding:1rem; border-radius:8px; }

.tournament-group-photo { margin:0 0 20px; padding:12px; border-radius:14px; background:#edf0f2; text-align:center; }
.tournament-group-photo img { display:block; width:100%; max-height:560px; object-fit:contain; border-radius:8px; }

/* Upcoming tournament redesign. Keep completed results and gallery styling isolated. */
.tournament-detail-page:has(> .upcoming-details) { gap:.65rem; }
.site-main:has(> .tournament-detail-page > .upcoming-details) { padding-bottom:1rem; }
.upcoming-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:.55rem 1rem; }
.upcoming-heading > div { min-width:0; }
.upcoming-heading h1 { font-size:clamp(1.35rem, 3vw, 2rem); line-height:1.18; overflow-wrap:anywhere; }
.upcoming-heading.tournament-detail-card h1 { margin:.15rem 0; }
.upcoming-heading h1 a { color:inherit; text-decoration:none; }
.upcoming-heading .upcoming-event-type { display:block; margin-top:.15rem; font-size:.65em; line-height:1.25; font-weight:600; }
.upcoming-heading .tournament-detail-datetime { margin:.3rem 0 0; }
.upcoming-heading-tools { display:flex; align-items:flex-end; flex-direction:column; gap:.25rem; flex-shrink:0; max-width:100%; }
.upcoming-heading-tools .page-share { margin:0; }
.upcoming-details { display:grid; gap:.75rem; min-width:0; }
.upcoming-overview { display:grid; grid-template-columns:minmax(0, 1.05fr) minmax(0, 1fr); align-items:start; gap:.75rem; }
.upcoming-overview.without-teaser { grid-template-columns:1fr; }
.upcoming-teaser { min-width:0; margin:0; }
.upcoming-teaser a { display:block; }
.upcoming-teaser img { display:block; width:100%; height:auto; border-radius:12px; }
.upcoming-sidebar { display:grid; gap:.65rem; min-width:0; }
.upcoming-sidebar .content-card { margin:0; padding:.85rem; background:var(--surface, #fff); border:1px solid var(--border, #dce3e7); border-radius:12px; }
.upcoming-sidebar h2, .upcoming-roster h2 { font-size:1.15rem; line-height:1.25; margin:0 0 .25rem; }
.upcoming-sidebar h3 { font-size:1rem; margin:0; }
.upcoming-sidebar p { margin:.2rem 0; }
.upcoming-personal-card .upcoming-attendance-note { margin:.55rem 0 0; padding:0; color:#52606c; font-size:.78rem; line-height:1.45; }
.upcoming-checkin-closed { margin-top:.55rem; font-size:.78rem; line-height:1.45; color:#52606c; }
.upcoming-checkin-closed strong { display:block; color:#142333; }
.upcoming-personal-card .upcoming-checkin-closed p { margin:.1rem 0 0; font-size:inherit; }
.upcoming-status-dot { display:inline-flex; justify-content:center; align-items:center; flex:0 0 auto; width:1.05rem; height:1.05rem; border-radius:50%; background:#138308; color:#fff; font-weight:900; font-family:Arial,sans-serif; font-size:.8rem; line-height:1; }
.upcoming-window { margin:.6rem 0 0; padding:0; border:1px solid #d4e2e7; border-radius:8px; background:#f4f8f9; overflow-wrap:anywhere; }
.upcoming-window:empty { display:none; }
.upcoming-window-row { padding:.5rem .6rem; border-left:3px solid transparent; }
.upcoming-window-row + .upcoming-window-row { border-top:1px solid #d4e2e7; }
.upcoming-window-row dt { display:flex; align-items:center; gap:.4rem; font-size:.78rem; font-weight:800; color:#244958; }
.upcoming-window-row dt svg { flex-shrink:0; }
.upcoming-window-row dd { margin:.15rem 0 0 1.5rem; font-size:.78rem; line-height:1.45; color:#52606c; }
.upcoming-window-row.is-active { border-left-color:#138308; background:#edf9e9; }
.upcoming-window-row.is-active dd { color:#142333; font-size:.88rem; font-weight:700; }
.upcoming-step-actions > .upcoming-window { margin:0; }
.upcoming-step-indicator { display:inline-flex; flex:0 0 18px; width:18px; height:18px; border:2px solid #7c8792; border-radius:50%; align-items:center; justify-content:center; background:transparent; color:#fff; font:900 13px/1 Arial,sans-serif; }
.upcoming-step-indicator.is-complete { background:#138308; border-color:#138308; }
.upcoming-step-indicator > span { line-height:1; }
.upcoming-step-actions .button { display:flex; align-items:center; width:fit-content; max-width:100%; min-height:44px; margin-top:.4rem; }
.upcoming-personal-card .upcoming-step-unavailable { margin:.25rem 0 0; font-size:.78rem; line-height:1.45; color:#52606c; }
.upcoming-step-actions .tournament-action-message:not(:empty) { margin-top:.45rem; }
.upcoming-heading .upcoming-header-director { margin:.3rem 0 0; font-size:.82rem; line-height:1.4; overflow-wrap:anywhere; }
.upcoming-header-director span { color:#52606c; }
.upcoming-header-director strong { font-weight:700; color:#142333; }
.upcoming-venue-card h3 { line-height:1.3; overflow-wrap:anywhere; }
.upcoming-venue-card p { margin:.1rem 0; font-size:.9rem; line-height:1.4; }
.upcoming-venue-card .tournament-directions-link { display:inline-flex; align-items:flex-start; gap:.35rem; min-height:44px; margin:0; padding-top:.15rem; line-height:1.35; }
.upcoming-venue-card .tournament-directions-link svg { flex-shrink:0; }
.upcoming-roster { margin:0; padding:0; }
.upcoming-roster .section-heading { display:flex; justify-content:space-between; flex-wrap:wrap; gap:.2rem .65rem; align-items:baseline; margin-bottom:.25rem; }
.upcoming-roster .tournament-roster-summary { margin:0; }
.upcoming-status-legend { display:flex; flex-wrap:wrap; gap:.4rem 1rem; margin:0 0 .4rem; font-size:.8rem; }
.upcoming-status-legend > span { display:inline-flex; align-items:center; gap:.4rem; }
.upcoming-player-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap:.6rem; }
.upcoming-player-card { position:relative; min-width:0; padding:.7rem 2rem .7rem .8rem; border:1px solid var(--border-dark, #cbd5da); border-radius:10px; background:var(--surface, #fff); }
.upcoming-player-card.is-you { border-color:#138308; }
.upcoming-player-name { font-weight:800; line-height:1.3; overflow-wrap:anywhere; }
.upcoming-player-name a { color:var(--text, #142333); text-decoration:none; }
.upcoming-player-name a:hover { text-decoration:underline; }
.upcoming-player-time { margin:.25rem 0 0; font-size:.78rem; line-height:1.4; color:#52606c; }
.upcoming-player-card > .upcoming-status-dot { position:absolute; top:.8rem; right:.6rem; }
.upcoming-you { display:inline-block; font-size:.7rem; padding:.1rem .35rem; border-radius:12px; color:#145312; background:#dcf5d7; }
.upcoming-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
.upcoming-details a:focus-visible, .upcoming-details button:focus-visible, .upcoming-heading a:focus-visible, .upcoming-heading summary:focus-visible { outline:3px solid #2875a8; outline-offset:3px; }
@media (max-width: 760px) {
    .upcoming-overview { grid-template-columns:minmax(0, 1fr); }
    .upcoming-heading { flex-wrap:wrap; }
    .upcoming-heading-tools { flex-direction:row; flex-wrap:wrap; align-items:center; justify-content:space-between; width:100%; }
    .upcoming-player-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
    .upcoming-player-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
    .upcoming-player-card { padding:.6rem 1.7rem .6rem .55rem; }
    .upcoming-player-time { font-size:.75rem; }
    .upcoming-player-card > .upcoming-status-dot { right:.4rem; width:.9rem; height:.9rem; font-size:.7rem; }
}
@media (max-width: 350px) {
    .upcoming-player-grid { grid-template-columns:minmax(0, 1fr); }
}
