/* === UTOURNAMENT PAGE === */

/* ── Tournament header card ── */
.tn-header {
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border-left: 4px solid #e53e3e;
}

.tn-header-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.6rem;
}

.tn-header-toggle {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.tn-header-toggle:hover {
    border-color: #cbd5e0;
    color: #1a202c;
    background: #f7fafc;
}

.tn-header-hidden .tn-header {
    display: none;
}

.tn-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.tn-header-main {
    flex: 1;
    min-width: 0;
}

.tn-header-qr {
    flex: 0 0 auto;
    width: 156px;
    min-height: 156px;
    padding: 6px;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tn-header-qr svg {
    width: 144px;
    height: 144px;
    display: block;
}

.tn-header .tn-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.25rem;
}

.tn-header .tn-date {
    color: #718096;
    font-size: 0.95rem;
    font-weight: 500;
}

.tn-header .tn-desc {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #4a5568;
    line-height: 1.6;
}

/* ── Quill output fix (read-only, outside editor) ── */
.tn-desc .ql-ui {
    display: none;
}
.tn-desc ol,
.tn-desc ul {
    padding-left: 1.5em;
    margin: 0.4em 0;
}
.tn-desc li[data-list="bullet"] {
    list-style-type: disc;
}
.tn-desc li[data-list="ordered"] {
    list-style-type: decimal;
}
.tn-desc ol {
    list-style: none;
    counter-reset: list-0;
}
.tn-desc ol li[data-list="bullet"] {
    list-style-type: disc;
    counter-increment: none;
}
.tn-desc ol li[data-list="ordered"] {
    list-style-type: decimal;
}

.tn-header .tn-cta {
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .tn-header {
        flex-direction: column;
    }

    .tn-header-qr {
        width: 144px;
        min-height: 144px;
        align-self: flex-start;
    }

    .tn-header-qr svg {
        width: 132px;
        height: 132px;
    }
}

.tn-header .tn-cta .tag.is-primary {
    background: #e53e3e;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 6px;
    padding: 0.5em 1.2em;
    transition: background 0.2s, box-shadow 0.2s;
}

.tn-header .tn-cta .tag.is-primary:hover {
    background: #c53030;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

/* ── Tabs ── */
.tn-tabs .tabs {
    margin-bottom: 1.5rem;
}

.tn-tabs .tabs ul {
    border-bottom-color: #e2e8f0;
}

.tn-tabs .tabs li a {
    color: #718096;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom-width: 2px;
    padding: 0.75em 1.25em;
    transition: color 0.15s, border-color 0.15s;
}

.tn-tabs .tabs li a:hover {
    color: #1a202c;
    border-bottom-color: #a0aec0;
}

.tn-tabs .tabs li.is-active a {
    color: #e53e3e;
    border-bottom-color: #e53e3e;
    font-weight: 600;
}

/* ── Round sub-tabs (matches) ── */
.tn-round-tabs .tabs ul {
    border-bottom-color: #edf2f7;
}

.tn-round-tabs {
    margin-bottom: 10px;
}

.tn-round-tabs .tabs li a {
    font-size: 0.88rem;
    padding: 0.5em 1em;
    color: #a0aec0;
    border-bottom-width: 2px;
}

.tn-round-tabs .tabs li.is-active a {
    color: #1a202c;
    border-bottom-color: #1a202c;
    font-weight: 600;
}

/* ── Tables ── */
.tn-table-wrap {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.tn-table-wrap .table {
    width: 100%;
    font-size: 0.95rem;
    background: transparent;
    margin-bottom: 0;
}

.tn-table-wrap .table thead th:first-child,
.tn-table-wrap .table tbody td:first-child {
    width: 40px;
    min-width: 40px;
    max-width: 60px;
    text-align: center;
}

.tn-table-wrap .table thead th {
    background: #f7fafc;
    color: #4a5568;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid #e2e8f0;
    padding: 0.85em 1em;
    white-space: nowrap;
}

.tn-table-wrap .table tbody td {
    padding: 0.75em 1em;
    border-bottom: 1px solid #edf2f7;
    color: #2d3748;
    vertical-align: middle;
}

.tn-table-wrap .table tbody tr:last-child td {
    border-bottom: none;
}

.tn-table-wrap .table tbody tr:hover {
    background: #f7fafc;
}

.tn-table-wrap .table tbody td a {
    color: #2d3748;
    font-weight: 500;
    transition: color 0.15s;
}

.tn-table-wrap .table tbody td a:hover {
    color: #e53e3e;
}

/* ── Medal rows ── */
.tn-table-wrap .table tbody tr.medal-gold {
    background: #fef9c3 !important;
    border-left: 4px solid #d69e2e;
}

.tn-table-wrap .table tbody tr.medal-gold:hover {
    background: #fef08a !important;
}

.tn-table-wrap .table tbody tr.medal-gold td {
    font-weight: 700;
    color: #713f12;
}

.tn-table-wrap .table tbody tr.medal-silver {
    background: #e2e8f0 !important;
    border-left: 4px solid #94a3b8;
}

.tn-table-wrap .table tbody tr.medal-silver:hover {
    background: #cbd5e1 !important;
}

.tn-table-wrap .table tbody tr.medal-silver td {
    font-weight: 600;
    color: #334155;
}

.tn-table-wrap .table tbody tr.medal-bronze {
    background: #ffedd5 !important;
    border-left: 4px solid #ea580c;
}

.tn-table-wrap .table tbody tr.medal-bronze:hover {
    background: #fed7aa !important;
}

.tn-table-wrap .table tbody tr.medal-bronze td {
    font-weight: 600;
    color: #7c2d12;
}

.medal-icon {
    font-size: 1.05rem;
    opacity: 1;
}

.medal-gold .medal-icon { color: #ca8a04; }
.medal-silver .medal-icon { color: #64748b; }
.medal-bronze .medal-icon { color: #ea580c; }

/* ── Matches table ── */
.tn-match-header td {
    background: #1a202c !important;
    color: #e2e8f0 !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.7em 0.75em;
    border-bottom: none !important;
}

.tn-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Matches table (colgroup controls widths) ── */
.tn-matches-table {
    table-layout: fixed;
    width: auto;
    min-width: 100%;
}

.tn-matches-table col.col-player {
    width: 180px;
}

.tn-matches-table col.col-court-edge {
    width: 40px;
    min-width: 40px;
}

.tn-matches-table col.col-setpts {
    width: 68px;
}

.tn-matches-table td.player {
    font-weight: 500;
    line-height: 1.3;
}

@media (min-width: 769px) {
    .tn-matches-table td.player {
        overflow: hidden;
        word-break: break-word;
    }
}

.tn-matches-table td.player-right {
    text-align: right !important;
}

.tn-matches-table td.player:not(.player-right) {
    text-align: left;
}

.tn-matches-table td.setpts {
    text-align: center;
    font-size: 0.9rem;
    color: #4a5568;
    white-space: nowrap;
}

.tn-matches-table td.tn-col-court-edge {
    width: 40px;
    min-width: 40px;
    text-align: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.tn-court-badge {
    width: 28px;
    height: 28px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.82rem;
    color: #ffffff;
    background: linear-gradient(135deg, #e53e3e 0%, #0b0b0b 100%);
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.15);
    user-select: none;
}

.tn-match-header td.tn-col-court-edge {
    padding-left: 0.25em !important;
    padding-right: 0.25em !important;
    text-align: center !important;
}

/* ≤1100px */
@media (max-width: 1100px) {
    .tn-matches-table td.setpts {
        font-size: 0.85rem;
    }
    .tn-matches-table td.player {
        font-size: 0.9rem;
    }
    .tn-match-header td {
        font-size: 0.72rem;
        padding: 0.5em 0.4em;
    }
}

/* ≤768px — matches table stays table; cards below */
@media (max-width: 768px) {
    .tn-matches-table td.player {
        font-size: 0.82rem;
    }
    .tn-matches-table td.setpts {
        font-size: 0.78rem;
        padding: 0.35em 0.25em;
    }
    .tn-match-header td {
        font-size: 0.65rem;
        padding: 0.4em 0.3em;
    }
}

/* ≤768px — public matches: card layout */
@media (max-width: 768px) {
    .tn-matches-wrap.tn-table-wrap {
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        overflow-x: visible;
    }

    .tn-matches-table,
    .tn-matches-table tbody {
        display: block !important;
        width: 100%;
        border: none;
        background: transparent;
    }

    .tn-matches-table tbody {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
    }

    .tn-matches-table colgroup {
        display: none;
    }

    .tn-matches-table .tn-match-header {
        display: none !important;
    }

    .tn-matches-table .tn-group-header {
        display: block !important;
        width: 100%;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
    }

    .tn-matches-table .tn-group-header td {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        background: #f7fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        padding: 0.5rem 0.75rem !important;
        margin: 0.25rem 0 0.35rem !important;
        text-align: center !important;
        font-size: 0.85rem !important;
        color: #4a5568 !important;
        white-space: nowrap !important;
    }

    .tn-matches-table .tn-match-row {
        display: flex !important;
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        background: #fff;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 12px 14px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .tn-matches-table .tn-match-row td {
        display: block !important;
        box-sizing: border-box;
        border: none !important;
        background: transparent !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
        text-align: center !important;
        padding: 0.2rem 0 !important;
    }

    .tn-matches-table .tn-match-row td.player,
    .tn-matches-table .tn-match-row td.player-right {
        text-align: center !important;
    }

    .tn-matches-table .tn-col-p1 {
        order: 1 !important;
        font-weight: 600;
        font-size: 0.92rem;
        line-height: 1.35;
        padding-top: 0.1rem !important;
    }

    .tn-matches-table .tn-col-p2 {
        order: 3 !important;
        font-weight: 600;
        font-size: 0.92rem;
        line-height: 1.35;
        padding-bottom: 0.1rem !important;
    }

    .tn-matches-table .tn-col-court-edge {
        order: 4 !important;
        padding-top: 0.05rem !important;
        padding-bottom: 0.05rem !important;
    }

    .tn-matches-table .tn-col-score {
        order: 2 !important;
        font-size: 1.45rem;
        font-weight: 700;
        color: #1a202c;
        padding: 0.35rem 0 !important;
        letter-spacing: 0.06em;
        white-space: nowrap !important;
    }

    .tn-matches-table.tn-format-mx .tn-col-score {
        background: #f7fafc;
        border-radius: 8px;
        margin: 0.25rem 0 !important;
        padding: 0.45rem 0.75rem !important;
    }

    .tn-matches-table .tn-col-set {
        order: 2 !important;
        padding: 0.3rem 0 !important;
        font-size: 1.05rem;
        font-weight: 600;
        color: #2d3748;
    }

    .tn-matches-table .tn-col-set::before {
        content: attr(data-set-label);
        display: block;
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #718096;
        margin-bottom: 2px;
    }

    .tn-matches-table .tn-col-set-empty {
        display: none !important;
    }

    .tn-matches-table.tn-format-rr .tn-col-pts,
    .tn-matches-table.tn-format-standard .tn-col-pts {
        display: none !important;
    }

    .tn-matches-table .tn-col-p1.winner,
    .tn-matches-table .tn-col-p2.winner {
        background-color: #c6f6d5 !important;
        border: none !important;
        border-left: none !important;
        border-radius: 8px;
        padding: 0.45rem 0.65rem !important;
        margin: 0.15rem 0 !important;
        width: 100% !important;
    }

    .tn-matches-table .tn-col-p1.both,
    .tn-matches-table .tn-col-p2.both {
        background-color: #fefcbf !important;
        border: none !important;
        border-left: none !important;
        border-radius: 8px;
        padding: 0.45rem 0.65rem !important;
        margin: 0.15rem 0 !important;
        width: 100% !important;
    }

    .tn-matches-table .tn-col-p1.winner a,
    .tn-matches-table .tn-col-p2.winner a {
        color: #22543d !important;
        font-weight: 700 !important;
    }

    .tn-matches-table .tn-col-p1.both a,
    .tn-matches-table .tn-col-p2.both a {
        color: #744210 !important;
        font-weight: 600 !important;
    }

    /* Override global .winner/.both that come later in the file */
    .tn-matches-wrap .tn-match-row .winner,
    .tn-matches-wrap .tn-match-row .both {
        border: none !important;
        border-left: none !important;
    }

    /* Player stats — round label at top of each card */
    .tn-player-matches-table .tn-col-round {
        order: 0 !important;
        font-size: 0.78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #e53e3e;
        padding-bottom: 0.4rem !important;
        margin-bottom: 0.25rem;
        border-bottom: 1px solid #edf2f7;
    }

    .tn-player-matches-table .tn-col-round::before {
        content: attr(data-round-label) ' ';
    }
}

/* Winner/draw highlight in matches — desktop table */
@media (min-width: 769px) {
    .tn-matches-table .winner {
        background-color: #c6f6d5 !important;
        border-left: 3px solid #38a169;
    }

    .tn-matches-table .winner a {
        color: #22543d !important;
        font-weight: 700 !important;
    }

    .tn-matches-table .both {
        background-color: #fefcbf !important;
        border-left: 3px solid #d69e2e;
    }

    .tn-matches-table .both a {
        color: #744210 !important;
        font-weight: 600 !important;
    }
}

/* Legacy winner class (other pages) */
.winner {
    background-color: #c6f6d5 !important;
    border-left: 3px solid #38a169;
}

.winner a {
    color: #22543d !important;
    font-weight: 700 !important;
}

.both {
    background-color: #fefcbf !important;
    border-left: 3px solid #d69e2e;
}

.both a {
    color: #744210 !important;
    font-weight: 600 !important;
}

/* ── Category heading ── */
.tn-category {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    margin: 1.5rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tn-category::before {
    content: '';
    width: 4px;
    height: 1.1em;
    background: #e53e3e;
    border-radius: 2px;
    flex-shrink: 0;
}

/* ── QR section ── */
.tn-qr {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    text-align: center;
}

.tn-qr a {
    color: #e53e3e;
    word-break: break-all;
}

.tn-qr #container {
    margin: 1.5rem auto 0;
}

/* ── Player stats ── */
.tn-player-back {
    margin-bottom: 1rem;
}

.tn-player-back a {
    color: #e53e3e;
    font-weight: 500;
    font-size: 0.95rem;
}

.tn-player-back a:hover {
    text-decoration: underline;
}

.tn-player-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
}

/* ── Select dropdown ── */
.tn-table-wrap .select select {
    border-color: #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #4a5568;
}

.tn-round-select {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding: 0 1rem;
}

.tn-league-round-select {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.35rem;
    margin-bottom: 1rem;
}

.tn-league-round-select-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
}

.tn-league-round-select .select select {
    border-color: #e2e8f0;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #2d3748;
    min-width: 12rem;
    position: relative;
    top: -2px;
}

.tn-league-round-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    margin-top: 0.15rem;
}

/* ── Tournament not found / not finished ── */
.tn-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #718096;
    font-size: 1rem;
}

/* ── View list ── */
.tn-table-wrap .table tbody td .fas {
    color: #718096;
    font-size: 0.9rem;
    transition: color 0.15s;
}

.tn-table-wrap .table tbody td a:hover .fas {
    color: #e53e3e;
}

/* ── Pagination ── */
.pagination .pagination-link {
    border-color: #e2e8f0;
    color: #4a5568;
    border-radius: 6px;
    font-size: 0.9rem;
}

.pagination .pagination-link.is-current {
    background-color: #e53e3e;
    border-color: #e53e3e;
    color: #fff;
}

.pagination .pagination-link:hover {
    border-color: #cbd5e0;
    color: #1a202c;
}

/* ── Responsive ── */
@media screen and (max-width: 768px) {
    .tn-header {
        padding: 1.25rem 1.25rem;
    }
    .tn-header .tn-title {
        font-size: 1.25rem;
    }
    .tn-table-wrap .table {
        font-size: 0.88rem;
    }
    .tn-table-wrap .table thead th,
    .tn-table-wrap .table tbody td {
        padding: 0.6em 0.6em;
    }
    .tn-tabs .tabs li a {
        font-size: 0.85rem;
        padding: 0.5em 0.75em;
    }
}

/* ── PDF buttons ── */
.tn-pdf-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

/* ── Share button (per-row) ── */
.th-share { width: 36px; padding: 0 4px !important; }
.td-share  { width: 36px; padding: 0 2px !important; text-align: center; }

.tn-share-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    font-size: 0.85rem;
    padding: 5px 7px;
    border-radius: 4px;
    line-height: 1;
    transition: color 0.15s, background 0.15s;
}
.tn-share-btn:hover { color: #e53e3e; background: #fff5f5; }

/* ── Share modal overlay ── */
.tn-share-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.tn-share-overlay.is-open { display: flex; }

.tn-share-modal {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.tn-share-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.75rem;
}
.tn-share-canvas-wrap {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    background: #0e0e0e;
}
.tn-share-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: auto;
}
.tn-share-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.tn-share-actions .button { font-size: 0.9rem; }

/* ── Share hint below table ── */
.tn-share-hint {
    margin-top: 0.65rem;
    font-size: 0.82rem;
    color: #a0aec0;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    line-height: 1.5;
}
.tn-share-hint i { color: #e53e3e; flex-shrink: 0; margin-top: 2px; }

/* Ranking: hint + row labels — mobile only (see @media below) */
.tn-ranking-hint,
.tn-ranking-pts-label {
    display: none;
}

/* ── Standings table: mobile expandable rows (≤768px only) ── */
@media (max-width: 768px) {
    .tn-standings-wrap {
        overflow-x: visible !important;
    }

    .tn-standings-table thead { display: none; }

    .tn-standings-table,
    .tn-standings-table tbody { display: block; }

    /* Main row: single-line flex, never wraps */
    .tn-standings-table tbody tr:not(.tn-detail-row) {
        display: flex;
        align-items: center;
        border-bottom: 1px solid #e2e8f0 !important;
        cursor: pointer;
    }

    /* Chevron — fixed slot so collapsed/expanded icons stay aligned */
    .tn-standings-table tbody tr:not(.tn-detail-row)::after {
        content: "\f054";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 1.35rem;
        margin-right: 0.85rem;
        margin-left: 0.15rem;
        padding: 0;
        color: #a0aec0;
        font-size: 0.6rem;
        flex-shrink: 0;
        line-height: 1;
        box-sizing: border-box;
    }

    .tn-standings-table tbody tr.is-expanded::after {
        content: "\f078";
        color: #4a5568;
    }

    /* Detail row: block layout, no chevron */
    .tn-detail-row {
        display: block !important;
    }

    /* Detail cells: hidden data containers (read by JS) */
    .tn-standings-table .td-mob-detail {
        display: none !important;
    }

    /* Reset default td */
    .tn-standings-table tbody td {
        padding: 0;
        border: none !important;
        box-shadow: none;
    }

    /* Main cells */
    .tn-standings-table .td-mob-main {
        display: flex;
        align-items: center;
        padding: 0.6em 0.3em;
    }

    /* Medal icon cell */
    .tn-standings-table .td-mob-main:first-child {
        width: 26px;
        min-width: 26px;
        padding-left: 0.55em;
        justify-content: center;
    }

    /* Position number cell */
    .tn-standings-table .td-mob-main:nth-child(2) {
        width: 22px;
        min-width: 22px;
        font-size: 0.82rem;
        font-weight: 700 !important;
        justify-content: center;
        padding: 0.6em 0.15em;
    }

    /* Name cell — grows */
    .tn-standings-table .td-mob-name {
        flex: 1 1 0 !important;
        min-width: 0;
        font-size: 0.86rem;
        overflow: hidden;
        padding: 0.6em 0.4em;
    }

    .tn-standings-table .td-mob-name a {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        max-width: 100%;
    }

    /* Points cell */
    .tn-standings-table .td-mob-pts {
        font-size: 0.96rem;
        font-weight: 700 !important;
        color: #1a202c;
        flex-shrink: 0;
        padding: 0.6em 0.35em;
    }

    /* Ranking points cell (league, finished round) */
    .tn-standings-table .td-mob-rank {
        font-size: 0.88rem;
        font-weight: 700 !important;
        color: #c53030;
        flex-shrink: 0;
        padding: 0.6em 0.35em;
        min-width: 2.2rem;
        text-align: center;
    }

    .tn-standings-table.has-ranking-col .td-mob-name {
        flex: 1 1 0 !important;
    }

    /* ── Injected detail row ── */
    .tn-detail-row td {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        box-sizing: border-box;
    }

    .tn-detail-inner {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
        gap: 4px;
        padding: 0.35em 0.5em 0.55em;
        background: rgba(0, 0, 0, 0.025);
    }

    .tn-detail-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0.25em 0.1em;
    }

    .tn-detail-label {
        font-size: 0.58rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #718096;
        white-space: nowrap;
        display: block;
        margin-bottom: 1px;
    }

    .tn-detail-val {
        font-size: 0.84rem;
        font-weight: 600;
        color: #2d3748;
    }

    /* Share button in detail row */
    .tn-detail-inner .tn-share-btn {
        flex: 0 0 auto;
        align-self: center;
    }

    /* Ranking table: details side by side */
    .tn-ranking-detail-inner {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem 1rem;
        padding: 0.4em 0.65em 0.55em;
        align-items: flex-start;
        width: 100%;
        box-sizing: border-box;
        background: rgba(0, 0, 0, 0.025);
    }

    .tn-ranking-detail-item {
        flex: 1 1 0;
        min-width: 0;
        max-width: 50%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.15em 0.25em;
    }

    .tn-ranking-detail-inner .tn-ranking-detail-item:only-child {
        max-width: 100%;
    }

    .tn-ranking-detail-label {
        font-size: 0.58rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #718096;
        line-height: 1.2;
        white-space: normal;
    }

    .tn-ranking-detail-val {
        font-size: 0.84rem;
        font-weight: 600;
        color: #2d3748;
        white-space: nowrap;
        margin-top: 2px;
    }

    /* Ranking: mobile hint + pts column label */
    .tn-ranking-hint {
        display: flex;
        align-items: flex-start;
        gap: 0.4rem;
        margin: 0;
        padding: 0.65rem 0.85rem 0.55rem;
        font-size: 0.78rem;
        line-height: 1.45;
        color: #718096;
        border-bottom: 1px solid #edf2f7;
        background: #f7fafc;
    }

    .tn-ranking-hint::before {
        content: "\f05a";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        color: #e53e3e;
        flex-shrink: 0;
        margin-top: 2px;
        font-size: 0.82rem;
    }

    .tn-ranking-table .tn-ranking-pts {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 3.6rem;
        max-width: 5rem;
        padding: 0.4em 0.2em;
        text-align: center;
    }

    .tn-ranking-table .tn-ranking-pts-label {
        display: block;
        font-size: 0.5rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: #718096;
        line-height: 1.15;
        white-space: normal;
        margin-bottom: 2px;
    }

    .tn-ranking-table .tn-ranking-pts-val {
        font-size: 0.96rem;
        font-weight: 700;
        color: #1a202c;
        line-height: 1;
    }
}