.related-tournaments-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 20px 0;
}

.tournament-filters-sidebar {
    flex: 0 0 250px;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.tournament-content-area {
    flex: 1;
    min-width: 300px;
}

.tournament-filter-form .filter-group {
    margin-bottom: 20px;
}

.tournament-filter-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.tournament-filter-form input[type="number"],
.tournament-filter-form input[type="text"],
.tournament-filter-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.filter-submit {
    background: var(--tms-color-wp-blue-bright);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-submit:hover {
    background: #005a87;
}

.filter-reset {
    display: inline-block;
    text-align: center;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background: white;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-reset:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tournament-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tournament-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tournament-thumb {
    width: 100%;
    max-height: none;
    overflow: hidden;
}

.tournament-thumb img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.tournament-thumb:hover img {
    transform: scale(1.05);
}

.tournament-details {
    padding: 20px;
}

.tournament-title {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    line-height: 1.4;
}

.tournament-title a {
    color: #333;
    text-decoration: none;
}

.tournament-title a:hover {
    color: var(--tms-color-wp-blue-bright);
    text-decoration: underline;
}

.tournament-meta {
    display: grid;
    gap: 10px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.meta-label {
    font-weight: bold;
    color: #666;
}

.meta-value {
    color: #333;
    text-align: right;
}

.tournament-pagination {
    margin-top: 40px;
    text-align: center;
}

.tournament-pagination ul.page-numbers {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.tournament-pagination ul.page-numbers li {
    margin: 0;
}

.tournament-pagination ul.page-numbers a,
.tournament-pagination ul.page-numbers span {
    display: block;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    min-width: 40px;
    text-align: center;
}

.tournament-pagination ul.page-numbers .current {
    background: var(--tms-color-wp-blue-bright);
    color: white;
    border-color: var(--tms-color-wp-blue-bright);
}

.tournament-pagination ul.page-numbers a:hover {
    background: #f5f5f5;
}

.tournament-pagination ul.page-numbers .prev,
.tournament-pagination ul.page-numbers .next {
    padding: 10px 20px;
}

.no-tournaments {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.no-tournaments p {
    margin: 10px 0;
    font-size: 16px;
    color: #666;
}

.clear-filters-link {
    color: var(--tms-color-wp-blue-bright);
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
}

.clear-filters-link:hover {
    text-decoration: underline;
}

.tournament-filters-sidebar h3 {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--tms-color-wp-blue-bright);
    color: #333;
    font-size: 1.4em;
}



@media (max-width: 768px) {
    .related-tournaments-container {
        flex-direction: column;
        gap: 20px;
    }

    .tournament-filters-sidebar {
        flex: 0 0 auto;
        width: 100%;
    }

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

    .tournament-pagination ul.page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {

    .tournament-pagination ul.page-numbers a,
    .tournament-pagination ul.page-numbers span {
        padding: 8px 12px;
        min-width: 35px;
    }

    .tournament-pagination ul.page-numbers .prev,
    .tournament-pagination ul.page-numbers .next {
        padding: 8px 15px;
    }

    .filter-submit,
    .filter-reset {
        padding: 10px 12px;
        font-size: 13px;
    }
}






.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #444;
    line-height: 8px !important;
}




/*frontend scf form width fix */
.wp-container-core-group-is-layout-1160982f> :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 90%;
    margin-left: auto !important;
    margin-right: auto !important;
}


@media (max-width: 768px) {

    .wp-block-group-is-layout-constrained {
        padding-left: 0px !important;
        padding-right: 0px !important;
    }

}

/* Tournament Details Display Styles */
.tms-tournament-details {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.tms-featured-image {
    margin-bottom: 30px;
    text-align: center;
}

.tms-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tms-tournament-title {
    font-size: 2em;
    margin: 0 0 30px 0;
    color: #333;
    border-bottom: 3px solid var(--tms-color-wp-blue);
    padding-bottom: 15px;
}

.tms-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid var(--tms-color-wp-blue);
}

.tms-section-title {
    font-size: 1.4em;
    margin: 0 0 20px 0;
    color: #333;
    font-weight: bold;
}

.tms-field-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.tms-field-list li {
    padding: 12px 15px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid var(--tms-color-wp-blue);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tms-field-list li strong {
    color: var(--tms-color-wp-blue);
    min-width: 150px;
}

.tms-register-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--tms-color-wp-blue);
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
    margin-top: 5px;
}

.tms-register-btn:hover {
    background: var(--tms-color-wp-blue-hover);
    text-decoration: none;
}

.tms-moderators {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid var(--tms-color-wp-blue);
}

.tms-moderators strong {
    color: var(--tms-color-wp-blue);
    margin-right: 10px;
}

.tms-sponsors {
    margin-top: 20px;
}

.tms-sponsors h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
}

.tms-sponsors-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.tms-sponsor-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tms-sponsor-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tms-sponsor-item img {
    max-width: 150px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
}

.tms-sponsor-item p {
    margin: 10px 0 0 0;
    font-size: 14px;
}

.tms-sponsor-item p a {
    color: var(--tms-color-wp-blue);
    text-decoration: none;
    font-weight: bold;
}

.tms-sponsor-item p a:hover {
    text-decoration: underline;
}

.tms-rules {
    margin-top: 30px;
}

.tms-rules-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--tms-color-wp-blue);
    line-height: 1.8;
}

.tms-rules-content p {
    margin-bottom: 15px;
}

.tms-rules-content ul,
.tms-rules-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.tms-rules-content h1,
.tms-rules-content h2,
.tms-rules-content h3,
.tms-rules-content h4,
.tms-rules-content h5,
.tms-rules-content h6 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #333;
}

/* Responsive Styles for Tournament Details */
@media (max-width: 768px) {
    .tms-tournament-details {
        padding: 0 15px;
    }

    .tms-tournament-title {
        font-size: 1.6em;
    }

    .tms-section {
        padding: 20px;
    }

    .tms-field-list li {
        flex-direction: column;
    }

    .tms-field-list li strong {
        min-width: auto;
    }

    .tms-sponsors-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .tms-tournament-title {
        font-size: 1.4em;
    }

    .tms-section {
        padding: 15px;
    }

    .tms-sponsors-list {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------------------------- */
/* Tournament Single Page (tms_tournament_details) - Dark UI (CMG-like)        */
/* Scoped under .tms-single to avoid breaking other pages.                    */
/* -------------------------------------------------------------------------- */

.tms-single {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.tms-hero {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    background-size: cover;
    background-position: center;
    min-height: 260px;
}

.tms-hero-overlay {
    position: absolute;
    inset: 0;
    background: #000000a3;
    /*background: linear-gradient(90deg, rgba(0,0,0,.75) 0%, rgba(0,0,0,.80) 45%, rgba(0,0,0,.35) 100%);*/
}

.tms-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 18px;
    padding: 18px;
    align-items: flex-start;
}

.tms-hero-left {
    width: 160px;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.tms-game-thumb {
    width: 140px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);

    /* The Magic Happens Here */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px)
}

.tms-game-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tms-hero-badge {
    background: rgba(0, 0, 0, .7);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 10px;
    padding: 10px 12px;
    color: #fff;
    width: 140px;
}

.tms-hero-badge-amount {
    font-weight: 800;
    font-size: 22px;
    line-height: 1.1;
}

.tms-hero-badge-label {
    font-size: 12px;
    opacity: .8;
}

.tms-hero-pill {
    display: inline-flex;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .14);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tms-hero-location {
    max-width: min(100%, 280px);
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tms-hero-main {
    flex: 1;
    min-width: 260px;
    color: #fff;
}

.tms-hero-title {
    color: white !important;
    margin: 0 0 8px 0;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 900;
}

.tms-hero-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
    font-size: 13px;
    color: rgba(255, 255, 255, .82);
}

.tms-hero-subtitle a {
    color: rgba(255, 255, 255, .95);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .25);
}

.tms-hero-subtitle a:hover {
    border-bottom-color: rgba(255, 255, 255, .6);
}

.tms-hero-subsep {
    opacity: .6;
}

.tms-hero-match-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(15, 23, 42, 0.45);
    color: #e2e8f0;
}

.tms-hero-match-status-badge.is-pending {
    background: rgba(51, 65, 85, 0.55);
    border-color: rgba(148, 163, 184, 0.55);
    color: #e2e8f0;
}

.tms-hero-match-status-badge.is-live {
    background: rgba(22, 101, 52, 0.55);
    border-color: rgba(134, 239, 172, 0.7);
    color: #dcfce7;
}

.tms-hero-match-status-badge.is-disputed {
    background: rgba(127, 29, 29, 0.58);
    border-color: rgba(252, 165, 165, 0.75);
    color: #fee2e2;
}

.tms-hero-match-status-badge.is-completed {
    background: rgba(30, 64, 175, 0.56);
    border-color: rgba(147, 197, 253, 0.7);
    color: #dbeafe;
}

.tms-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.tms-stat {
    background: rgb(0 0 0 / 30%);
    border: 1px solid rgb(0 255 118 / 53%);
    border-radius: 10px;
    padding: 10px 12px;
    min-height: 56px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.tms-stat-label {
    font-size: 11px;
    opacity: .75;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 6px;
}

.tms-stat-value {
    font-size: 14px;
    font-weight: 800;
}

.tms-muted {
    opacity: .75;
    font-weight: 700;
}

.tms-hero .tms-muted,
.tms-hero-main .tms-muted {
    width: 100%;
}

.tms-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.tms-hero-actions .tms-notice {
    width: 100%;
    margin-top: 0;
}

.tms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 800;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .14);
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.tms-btn:hover {
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(10px);
}



/* Disabled buttons (used for invite-only private tournaments) */
.tms-btn[disabled],
.tms-btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(0.15);
}

.tms-private-hint {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 800;
    color: rgba(255, 255, 255, .92);
    opacity: .9;
}

.tms-btn-primary {
    background: #22c55e;
    /* green */
    border-color: rgba(0, 0, 0, .15);
    color: #ffffff;
}

.tms-btn-primary:hover {
    filter: brightness(0.95);
}

.tms-btn-primary.is-enrolled {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .24);
    color: #fff;
}

.tms-btn-ghost {
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

}

.tms-notice {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(0, 0, 0, .35);
    color: rgba(255, 255, 255, .92);
    font-weight: 700;
}

.tms-notice.is-ok {
    border-color: rgba(34, 197, 94, .55);
}

.tms-notice.is-err {
    border-color: rgba(239, 68, 68, .55);
}

.tms-toast-stack {
    position: fixed;
    bottom: 18px;
    left: 18px;
    top: auto;
    right: auto;
    z-index: 100100;
    display: none;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 10px;
    width: min(92vw, 380px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    pointer-events: none;
}

.tms-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #000000;
    font-weight: 650;
    font-size: 14px;
    line-height: 1.35;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15), 0 0 0 1px rgba(0, 0, 0, .08);
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: auto;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.tms-toast__body {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 1px;
}

.tms-toast__close {
    flex: 0 0 auto;
    margin: -4px -4px -4px 0;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: rgba(0, 0, 0, .08);
    color: rgba(0, 0, 0, .6);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
}

.tms-toast__close:hover {
    background: rgba(0, 0, 0, .15);
    color: rgba(0, 0, 0, .9);
}

.tms-toast.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.tms-toast.is-ok {
    background: #ecfdf5;
    border-color: rgb(34 197 94 / 55%);
    color: #166534;
}

.tms-toast.is-err {
    background: #fef2f2;
    border-color: rgb(248 113 113 / 88%);
    color: #991b1b;
}

.tms-confirm-modal {
    max-width: 460px;
}

.tms-confirm-copy {
    font-size: 14px;
}

.tms-mini-btn-danger {
    background: #dc2626;
    border-color: rgba(127, 29, 29, .35);
    color: #fff;
}

.tms-mini-btn-danger:hover {
    filter: brightness(.95);
}

/* Tabs */
.tms-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    margin: 14px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.tms-tabs .tms-tab,
.tms-tabs button.tms-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fff;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    line-height: 1.1;
}

.tms-tabs .tms-tab.is-active,
.tms-tabs button.tms-tab.is-active {
    background: #111;
    border-color: #111;
    color: #fff;
}

.tms-results-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.tms-results-filter {
    border: 1px solid #d6d6d6;
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 160px;
    max-width: 100%;
}

.tms-results-wrap.is-loading {
    opacity: .7;
}

.tms-results-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.tms-results-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: 13px;
}

.tms-results-table th,
.tms-results-table td {
    border-bottom: 1px solid #ececec;
    padding: 10px 8px;
    text-align: left;
    vertical-align: middle;
}

.tms-results-table th {
    position: sticky;
    top: 0;
    background: #fafafa;
    z-index: 1;
    font-weight: 800;
}

.tms-results-table tr.tms-team-row--mine td {
    background: #ecfeff;
}

.tms-results-status,
.tms-results-dispute {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 800;
    text-transform: capitalize;
}

.tms-results-status.is-pending {
    background: #eef2f7;
    color: #334155;
}

.tms-results-status.is-live {
    background: #e0f2fe;
    color: #0369a1;
}

.tms-results-status.is-disputed {
    background: #fef3c7;
    color: #92400e;
}

.tms-results-status.is-completed {
    background: #dcfce7;
    color: #166534;
}

.tms-results-dispute.is-disputed {
    background: #ffedd5;
    color: #9a3412;
}

.tms-results-dispute.is-resolved {
    background: #e2e8f0;
    color: #334155;
}

.tms-results-footer {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.tms-table-pager__arrow {
    min-width: 36px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.tms-table-pager__arrow:hover:not(:disabled) {
    border-color: #94a3b8;
    background: #f8fafc;
}

.tms-table-pager__arrow:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.tms-table-pager__status {
    min-width: 96px;
    text-align: center;
}

.tms-table-pager__jump {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
    font-size: 13px;
    color: #475569;
}

.tms-table-pager__input {
    width: 56px;
    padding: 4px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-align: center;
}

/* Panels / Cards */
.tms-panels {
    margin-top: 12px;
}

.tms-panel {
    display: none;
}

.tms-panel.is-active {
    display: block;
}

.tms-panel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.tms-card {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0px 7px 10px 2px rgb(0 0 0 / 20%);
    display: flex;
    flex-direction: column;
    height: 100%;

}

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

.tms-card-title {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 900;
    color: #222;
}

.tms-kv {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.tms-kv li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.tms-kv li span:first-child {
    color: #666;
    font-weight: 800;
}

.tms-kv li span:last-child {
    color: #222;
    text-align: right;
    font-weight: 800;
}

.tms-kv-value-location {
    max-width: 65%;
    overflow-wrap: anywhere;
    word-break: break-word;
}


.tms-panel-grid-duel-info {
    align-items: start;
}

.tms-card-subtitle {
    margin: 14px 0 10px;
    padding-top: 12px;
    border-top: 1px solid #ececec;
    font-size: 13px;
    font-weight: 900;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.tms-kv-compact {
    gap: 8px;
}

.tms-kv-compact li {
    padding-bottom: 6px;
}

.tms-duel-pool-card .tms-kv li span:first-child,
.tms-duel-pool-card .tms-kv-compact li span:first-child {
    max-width: 56%;
}

.tms-duel-pool-card .tms-kv li span:last-child,
.tms-duel-pool-card .tms-kv-compact li span:last-child {
    max-width: 44%;
    overflow-wrap: anywhere;
}

.tms-empty {
    padding: 14px;
    border-radius: 10px;
    background: #f7f7f7;
    border: 1px dashed #ddd;
    color: #555;
    font-weight: 700;
}

.tms-richtext {
    line-height: 1.7;
    color: #222;
}

.tms-richtext h1,
.tms-richtext h2,
.tms-richtext h3,
.tms-richtext h4 {
    margin-top: 18px;
}

/* Prizes */
.tms-prizes {
    margin: 0;
}

.tms-prize-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.tms-prize-card {
    border: 1px solid #ababab;
    border-radius: 12px;
    padding: 14px;
    background: #fafafa;
}

.tms-prize-place {
    font-weight: 900;
    color: #222;
    margin-bottom: 6px;
}

.tms-prize-value {
    font-weight: 900;
    font-size: 18px;
    color: #111;
}

.tms-prize-extra {
    margin-top: 12px;
}

.tms-prize-extra h4 {
    margin: 0 0 8px 0;
    font-weight: 900;
}

/* Teams grid */
.tms-team-grid {
    display: flex;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    flex-wrap: wrap !important;
}

.tms-team-card {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    width: 100%;
}

.tms-team-name {
    font-weight: 900;
    color: #222;
    width: 40%;
}

.tms-team-summary-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.tms-team-summary-item {
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.tms-team-summary-item strong {
    font-size: 16px;
}

.tms-teams-toolbar {
    margin-bottom: 10px;
}

.tms-team-view-btn {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Admins */
.tms-admins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.tms-admin-card {
    text-align: center;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.tms-admin-avatar {
    border-radius: 999px;
}

.tms-admin-name {
    margin-top: 8px;
    font-weight: 900;
}

/* Sponsors (re-uses existing sponsor styles if already loaded) */
.tms-sponsors-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.tms-sponsor-item {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
}

/* Bracket */
.tms-bracket {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.tms-bracket-round {
    min-width: 220px;
    flex: 0 0 auto;
}

.tms-bracket-round-title {
    font-weight: 900;
    margin: 0 0 10px 0;
}

.tms-bracket-round-gate-meta {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    margin: -4px 0 10px 0;
    line-height: 1.35;
}

.tms-bracket-match {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    margin-bottom: 10px;
}

.tms-bracket-team {
    font-weight: 900;
    padding: 6px 0;
    border-bottom: 1px solid #f1f1f1;
}

.tms-bracket-team:last-of-type {
    border-bottom: none;
}

.tms-bracket-meta {
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-weight: 800;
}

/* Groups */
.tms-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.tms-group {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.tms-group-title {
    font-weight: 900;
    margin-bottom: 8px;
}

.tms-group-members {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
    display: grid;
    gap: 6px;
}

.tms-group-members li {
    padding: 6px 8px;
    border-radius: 10px;
    background: #f8f8f8;
    font-weight: 800;
}

.tms-group-matches h4 {
    margin: 0 0 8px 0;
    font-weight: 900;
}

.tms-group-matches ul {
    margin: 0;
    padding-left: 18px;
}

.tms-group-matches li {
    margin: 6px 0;
    font-weight: 800;
}

/* Responsive */
@media (max-width: 900px) {
    .tms-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tms-panel-grid {
        grid-template-columns: 1fr;
    }

    .tms-hero-left {
        width: 140px;
        min-width: 140px;
    }
}

@media (max-width: 640px) {
    .tms-hero-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .tms-hero-left {
        width: 100%;
        min-width: 0;
        flex-direction: row;
        align-items: center;
    }

    .tms-game-thumb {
        width: 84px;
        height: 84px;
    }

    .tms-hero-badge {
        width: auto;
    }

    .tms-hero-title {
        font-size: 22px;
    }

    .tms-prize-grid {
        grid-template-columns: 1fr;
    }
}









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

.related-tournaments-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 20px 0;
}

.tournament-filters-sidebar {
    flex: 0 0 250px;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.tournament-content-area {
    flex: 1;
    min-width: 300px;
}

.tournament-filter-form .filter-group {
    margin-bottom: 20px;
}

.tournament-filter-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.tournament-filter-form input[type="number"],
.tournament-filter-form input[type="text"],
.tournament-filter-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.filter-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
}

.filter-submit {
    background: var(--tms-color-wp-blue-bright);
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-submit:hover {
    background: #005a87;
}

.filter-reset {
    display: inline-block;
    text-align: center;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background: white;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-reset:hover {
    background: #f5f5f5;
    text-decoration: none;
}

.tournament-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tournament-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tournament-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tournament-thumb {
    width: 100%;
    max-height: none;
    overflow: hidden;
}

.tournament-thumb img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.tournament-thumb:hover img {
    transform: scale(1.05);
}

.tournament-details {
    padding: 20px;
}

.tournament-title {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    line-height: 1.4;
}

.tournament-title a {
    color: #333;
    text-decoration: none;
}

.tournament-title a:hover {
    color: var(--tms-color-wp-blue-bright);
    text-decoration: underline;
}

.tournament-meta {
    display: grid;
    gap: 10px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.meta-label {
    font-weight: bold;
    color: #666;
}

.meta-value {
    color: #333;
    text-align: right;
}

.tournament-pagination {
    margin-top: 40px;
    text-align: center;
}

.tournament-pagination ul.page-numbers {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.tournament-pagination ul.page-numbers li {
    margin: 0;
}

.tournament-pagination ul.page-numbers a,
.tournament-pagination ul.page-numbers span {
    display: block;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    min-width: 40px;
    text-align: center;
}

.tournament-pagination ul.page-numbers .current {
    background: var(--tms-color-wp-blue-bright);
    color: white;
    border-color: var(--tms-color-wp-blue-bright);
}

.tournament-pagination ul.page-numbers a:hover {
    background: #f5f5f5;
}

.tournament-pagination ul.page-numbers .prev,
.tournament-pagination ul.page-numbers .next {
    padding: 10px 20px;
}

.no-tournaments {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.no-tournaments p {
    margin: 10px 0;
    font-size: 16px;
    color: #666;
}

.clear-filters-link {
    color: var(--tms-color-wp-blue-bright);
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
}

.clear-filters-link:hover {
    text-decoration: underline;
}

.tournament-filters-sidebar h3 {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--tms-color-wp-blue-bright);
    color: #333;
    font-size: 1.4em;
}



@media (max-width: 768px) {
    .related-tournaments-container {
        flex-direction: column;
        gap: 20px;
    }

    .tournament-filters-sidebar {
        flex: 0 0 auto;
        width: 100%;
    }

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

    .tournament-pagination ul.page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {

    .tournament-pagination ul.page-numbers a,
    .tournament-pagination ul.page-numbers span {
        padding: 8px 12px;
        min-width: 35px;
    }

    .tournament-pagination ul.page-numbers .prev,
    .tournament-pagination ul.page-numbers .next {
        padding: 8px 15px;
    }

    .filter-submit,
    .filter-reset {
        padding: 10px 12px;
        font-size: 13px;
    }
}






.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #444;
    line-height: 8px !important;
}




/*frontend scf form width fix */
.wp-container-core-group-is-layout-1160982f> :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 90%;
    margin-left: auto !important;
    margin-right: auto !important;
}


@media (max-width: 768px) {

    .wp-block-group-is-layout-constrained {
        padding-left: 0px !important;
        padding-right: 0px !important;
    }

}

/* Tournament Details Display Styles */
.tms-tournament-details {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.tms-featured-image {
    margin-bottom: 30px;
    text-align: center;
}

.tms-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tms-tournament-title {
    font-size: 2em;
    margin: 0 0 30px 0;
    color: #333;
    border-bottom: 3px solid var(--tms-color-wp-blue);
    padding-bottom: 15px;
}

.tms-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid var(--tms-color-wp-blue);
}

.tms-section-title {
    font-size: 1.4em;
    margin: 0 0 20px 0;
    color: #333;
    font-weight: bold;
}

.tms-field-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.tms-field-list li {
    padding: 12px 15px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid var(--tms-color-wp-blue);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tms-field-list li strong {
    color: var(--tms-color-wp-blue);
    min-width: 150px;
}

.tms-register-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--tms-color-wp-blue);
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s ease;
    margin-top: 5px;
}

.tms-register-btn:hover {
    background: var(--tms-color-wp-blue-hover);
    text-decoration: none;
}

.tms-moderators {
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid var(--tms-color-wp-blue);
}

.tms-moderators strong {
    color: var(--tms-color-wp-blue);
    margin-right: 10px;
}

.tms-sponsors {
    margin-top: 20px;
}

.tms-sponsors h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.2em;
}

.tms-sponsors-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.tms-sponsor-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ddd;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tms-sponsor-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tms-sponsor-item img {
    max-width: 150px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 10px;
}

.tms-sponsor-item p {
    margin: 10px 0 0 0;
    font-size: 14px;
}

.tms-sponsor-item p a {
    color: var(--tms-color-wp-blue);
    text-decoration: none;
    font-weight: bold;
}

.tms-sponsor-item p a:hover {
    text-decoration: underline;
}

.tms-rules {
    margin-top: 30px;
}

.tms-rules-content {
    background: white;
    padding: 25px;
    border-radius: 8px;
    border-left: 4px solid var(--tms-color-wp-blue);
    line-height: 1.8;
}

.tms-rules-content p {
    margin-bottom: 15px;
}

.tms-rules-content ul,
.tms-rules-content ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.tms-rules-content h1,
.tms-rules-content h2,
.tms-rules-content h3,
.tms-rules-content h4,
.tms-rules-content h5,
.tms-rules-content h6 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #333;
}

/* Responsive Styles for Tournament Details */
@media (max-width: 768px) {
    .tms-tournament-details {
        padding: 0 15px;
    }

    .tms-tournament-title {
        font-size: 1.6em;
    }

    .tms-section {
        padding: 20px;
    }

    .tms-field-list li {
        flex-direction: column;
    }

    .tms-field-list li strong {
        min-width: auto;
    }

    .tms-sponsors-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .tms-tournament-title {
        font-size: 1.4em;
    }

    .tms-section {
        padding: 15px;
    }

    .tms-sponsors-list {
        grid-template-columns: 1fr;
    }
}

/* === Tournament cards (CMG-like) === */
.related-tournaments-container .tms-section-title {
    margin: 0 0 10px;
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.92);
}

.related-tournaments-container .tournament-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (max-width: 900px) {
    .related-tournaments-container {
        flex-direction: column;
        gap: 18px;
        margin: 16px 0;
    }

    .tournament-filters-sidebar {
        flex: 1 1 auto !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        box-sizing: border-box;
    }

    .tournament-content-area {
        width: 100%;
        min-width: 0;
    }
}

.related-tournaments-container .tms-tournament-card.tms-related-tournament-card {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) minmax(156px, 220px);
    grid-template-areas:
        "media body actions"
        "status status status";
    gap: 12px 14px;
    align-items: start;
    padding: 12px;
    background: #1b1c1e !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 0;
    overflow: visible;
}

.related-tournaments-container .tms-tournament-card.tms-related-tournament-card:hover {
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35) !important;
}

.related-tournaments-container .tms-tournament-card.tms-related-tournament-card:not(:has(.tms-moderator-card-status)) {
    grid-template-areas:
        "media body actions";
}

.related-tournaments-container .tms-tournament-media {
    grid-area: media;
    position: relative;
    flex: unset;
    width: 100px;
}

.related-tournaments-container .tms-media-link {
    display: block;
    border-radius: 0;
    overflow: hidden;
}

.related-tournaments-container .tms-media-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.related-tournaments-container .tms-prize-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #22c55e;
    color: #ffffff;
    font-weight: 800;
    font-size: 11px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.related-tournaments-container .tms-prize-badge__gem {
    font-size: 10px;
    line-height: 1;
    opacity: 0.95;
}

.related-tournaments-container .tms-tournament-body {
    grid-area: body;
    flex: unset;
    min-width: 0;
}

.related-tournaments-container .tms-tournament-actions {
    grid-area: actions;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
}

.related-tournaments-container .tms-tournament-actions__secondary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
}

.related-tournaments-container .tms-tournament-actions__secondary--rules-only {
    grid-template-columns: 1fr;
}

.related-tournaments-container .tms-rules-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    color: #ffffff !important;
    background: transparent !important;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.related-tournaments-container .tms-rules-btn:hover {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    text-decoration: none;
}

.related-tournaments-container .tms-actions-after {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.related-tournaments-container .tms-actions-footnote {
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.52);
    text-align: left;
}

.related-tournaments-container .tms-moderator-card-status {
    grid-area: status;
    margin: 0;
    padding: 8px 10px;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.88);
    font-size: 11px;
    line-height: 1.4;
}

.related-tournaments-container .tms-moderator-card-status p {
    margin: 3px 0;
}

.related-tournaments-container .tms-title {
    margin: 0 0 6px;
    font-size: 0.9375rem;
    font-weight: 800;
    line-height: 1.2;
}

.related-tournaments-container .tms-title a {
    color: #ffffff;
    text-decoration: none;
}

.related-tournaments-container .tms-title a:hover {
    color: #fbbf24;
}

.related-tournaments-container .tms-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.related-tournaments-container .tms-mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    padding: 3px 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
    flex-shrink: 0;
}

.related-tournaments-container .tms-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.3;
}

.related-tournaments-container .tms-subline__sep {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
    user-select: none;
}

.related-tournaments-container .tms-start-time {
    color: rgba(255, 255, 255, 0.52);
}

.related-tournaments-container .tms-starts-in {
    color: rgba(255, 255, 255, 0.52);
    font-weight: 500;
}

.related-tournaments-container .tms-starts-in .tms-countdown {
    color: #ff2e2e;
    font-weight: 800;
}

.related-tournaments-container .tms-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    overflow: hidden;
}

.related-tournaments-container .tms-meta {
    padding: 8px 10px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 0;
}

.related-tournaments-container .tms-meta:nth-child(3n) {
    border-right: none;
}

.related-tournaments-container .tms-meta:nth-child(n + 4) {
    border-bottom: none;
}

.related-tournaments-container .tms-meta-label {
    font-size: 9px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.related-tournaments-container .tms-meta-value {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.25;
}

/* Gold gradient CTAs — sharp corners, black label text (Stitch-style compact) */
.related-tournaments-container .tms-related-tournament-card .tms-view-btn,
.related-tournaments-container .tms-related-tournament-card .tms-moderator-apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 0px !important;
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    color: #0a0a0a !important;
    background: linear-gradient(135deg, #ffcc00 0%, #f0b000 28%, #e59e00 62%, #c67f00 100%) !important;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.related-tournaments-container .tms-related-tournament-card .tms-view-btn:hover,
.related-tournaments-container .tms-related-tournament-card .tms-moderator-apply-btn:hover:not(:disabled) {
    filter: brightness(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.28);
    text-decoration: none;
    color: #0a0a0a !important;
}

.related-tournaments-container .tms-related-tournament-card .tms-moderator-apply-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: none;
}

/* PC / tablet ≥641px: one card per row is handled by grid; hide Rules; View above Apply; gold ramp + white text */
@media (min-width: 641px) {
    .related-tournaments-container .tms-rules-btn {
        display: none !important;
    }

    .related-tournaments-container .tms-tournament-actions__secondary--rules-only {
        display: none !important;
    }

    .related-tournaments-container .tms-tournament-actions__secondary {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .related-tournaments-container .tms-tournament-actions > .tms-view-btn {
        order: -1;
    }

    .related-tournaments-container .tms-tournament-actions > .tms-actions-after {
        order: 1;
    }

    .related-tournaments-container .tms-related-tournament-card .tms-view-btn,
    .related-tournaments-container .tms-related-tournament-card .tms-moderator-apply-btn {
        border-radius: 10px !important;
        color: #ffffff !important;
        border: none !important;
        background: linear-gradient(90deg, #7e7228 0%, #9a7418 32%, #d9a20a 58%, #e59e00 78%, #f5c84a 100%) !important;
        box-shadow: 0 4px 16px rgba(229, 158, 0, 0.2);
    }

    .related-tournaments-container .tms-related-tournament-card .tms-view-btn:hover,
    .related-tournaments-container .tms-related-tournament-card .tms-moderator-apply-btn:hover:not(:disabled) {
        color: #ffffff !important;
        filter: brightness(1.07);
    }
}

.related-tournaments-container .tms-arrow {
    margin-left: 4px;
}

@media (max-width: 900px) {
    .related-tournaments-container .tms-tournament-card.tms-related-tournament-card {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto;
        grid-template-areas:
            "media"
            "body"
            "actions"
            "status";
    }

    /* Duel: flex column guarantees body + actions never share a row (fixes crushed meta grid). */
    .related-tournaments-container .tms-tournament-card.tms-related-tournament-card.tms-related-tournament-card--duel {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        box-sizing: border-box !important;
        grid-template-columns: unset !important;
        grid-template-rows: unset !important;
        grid-template-areas: unset !important;
    }

    .related-tournaments-container .tms-tournament-card.tms-related-tournament-card.tms-related-tournament-card--duel > .tms-tournament-media {
        order: 1;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        flex: 0 0 auto;
    }

    .related-tournaments-container .tms-tournament-card.tms-related-tournament-card.tms-related-tournament-card--duel > .tms-tournament-body {
        order: 2;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 0 1 auto;
    }

    .related-tournaments-container .tms-tournament-card.tms-related-tournament-card.tms-related-tournament-card--duel > .tms-tournament-actions {
        order: 3;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 auto;
    }

    .related-tournaments-container .tms-tournament-card.tms-related-tournament-card.tms-related-tournament-card--duel > .tms-moderator-card-status {
        order: 4;
    }

    .related-tournaments-container .tms-tournament-media,
    .related-tournaments-container .tms-media-img {
        width: 100%;
        max-width: 200px;
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto;
    }

    .related-tournaments-container .tms-tournament-media {
        justify-self: center;
    }

    /* Duel: full-width hero + centered header so prize chip never crosses title (641–900px gap) */
    .related-tournaments-container .tms-related-tournament-card--duel .tms-tournament-media {
        width: 100% !important;
        max-width: none !important;
        justify-self: stretch !important;
    }

    .related-tournaments-container .tms-related-tournament-card--duel .tms-media-link {
        display: block;
        position: relative;
        width: 100%;
        border-radius: 12px;
        overflow: hidden;
        background: rgba(0, 0, 0, 0.35);
    }

    .related-tournaments-container .tms-related-tournament-card--duel .tms-media-img {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
        max-height: 220px;
        object-fit: cover;
        margin: 0 !important;
        display: block;
    }

    .related-tournaments-container .tms-related-tournament-card--duel .tms-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
    }

    .related-tournaments-container .tms-related-tournament-card--duel .tms-title {
        text-align: center;
        padding: 0 4px;
    }

    .related-tournaments-container .tms-related-tournament-card--duel .tms-prize-badge {
        max-width: min(240px, calc(100% - 16px));
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        box-sizing: border-box;
    }

    .related-tournaments-container .tms-related-tournament-card--duel .tms-tournament-actions {
        width: 100%;
        max-width: 100%;
    }

    .related-tournaments-container .tms-related-tournament-card--duel .tms-view-btn {
        white-space: nowrap;
        font-size: clamp(11px, 3.2vw, 14px);
        padding-left: 10px;
        padding-right: 10px;
    }

    .related-tournaments-container .tms-related-tournament-card--duel .tms-meta-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .related-tournaments-container .tms-related-tournament-card--duel .tms-meta-grid .tms-meta {
        min-width: 0;
        word-break: normal;
        overflow-wrap: break-word;
    }
}

/* Mobile card layout (mockup): rounded shell, landscape hero, secondary CTAs, primary View */
@media (max-width: 640px) {
    .related-tournaments-container .tms-tournament-actions > .tms-view-btn,
    .related-tournaments-container .tms-tournament-actions > .tms-actions-after {
        order: 0;
    }

    .related-tournaments-container .tms-rules-btn {
        display: inline-flex !important;
    }

    .related-tournaments-container .tms-tournament-actions__secondary--rules-only {
        display: grid !important;
    }

    .related-tournaments-container .tms-tournament-card.tms-related-tournament-card,
    .related-tournaments-container .tms-tournament-card.tms-related-tournament-card:not(:has(.tms-moderator-card-status)) {
        border-radius: 14px !important;
        padding: 12px 14px 16px !important;
        gap: 14px !important;
        overflow: hidden;
    }

    .related-tournaments-container .tms-tournament-media {
        width: 100% !important;
        max-width: none !important;
        justify-self: stretch !important;
    }

    .related-tournaments-container .tms-media-link {
        border-radius: 12px;
        overflow: hidden;
    }

    .related-tournaments-container .tms-media-img {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
        max-height: 220px;
        object-fit: cover;
        border-radius: 12px;
        margin: 0 !important;
    }

    .related-tournaments-container .tms-prize-badge {
        background: #6dffc4;
        color: #0a0a0a;
        border-radius: 8px;
        font-size: 12px;
        padding: 6px 10px;
        top: 10px;
        left: 10px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    }

    .related-tournaments-container .tms-prize-badge__gem {
        color: #0a0a0a;
    }

    .related-tournaments-container .tms-card-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
    }

    .related-tournaments-container .tms-title {
        font-size: 1.25rem;
        margin-bottom: 4px;
        text-align: center;
    }

    .related-tournaments-container .tms-subline {
        justify-content: center;
        text-align: center;
        font-size: 11px;
        margin-bottom: 12px;
    }

    .related-tournaments-container .tms-meta-grid {
        border-radius: 10px;
    }

    .related-tournaments-container .tms-meta-label {
        text-transform: capitalize;
        letter-spacing: 0.04em;
        font-size: 10px;
    }

    .related-tournaments-container .tms-tournament-actions__secondary {
        gap: 10px;
    }

    .related-tournaments-container .tms-related-tournament-card .tms-moderator-apply-btn {
        background: #333333 !important;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 10px !important;
        box-shadow: none !important;
    }

    .related-tournaments-container .tms-related-tournament-card .tms-moderator-apply-btn:hover:not(:disabled) {
        background: #404040 !important;
        color: #ffffff !important;
        filter: none;
    }

    .related-tournaments-container .tms-rules-btn {
        border-radius: 10px !important;
        padding: 12px 10px;
        font-weight: 700;
    }

    .related-tournaments-container .tms-related-tournament-card .tms-view-btn {
        background: linear-gradient(90deg, #5c4f2a 0%, #7d6220 18%, #a67c12 40%, #d9a20a 62%, #e59e00 78%, #ffb32a 100%) !important;
        color: #ffffff !important;
        border: none !important;
        border-radius: 12px !important;
        padding: 14px 16px !important;
        font-size: 14px !important;
        font-weight: 800 !important;
        box-shadow: 0 6px 20px rgba(229, 158, 0, 0.22);
    }

    .related-tournaments-container .tms-related-tournament-card .tms-view-btn:hover {
        color: #ffffff !important;
        filter: brightness(1.06);
    }

    .related-tournaments-container .tms-related-tournament-card.tms-related-tournament-card--duel .tms-view-btn {
        white-space: nowrap;
        font-size: clamp(12px, 3.8vw, 15px);
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .related-tournaments-container .tms-related-tournament-card.tms-related-tournament-card--duel .tms-prize-badge {
        max-width: min(280px, calc(100% - 24px));
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .related-tournaments-container .tms-actions-after {
        margin-top: 14px;
        padding-top: 14px;
    }

    .related-tournaments-container .tms-actions-footnote {
        text-align: center;
        font-size: 12px;
    }

    .related-tournaments-container .tms-moderator-card-status {
        border-radius: 10px;
    }

    .related-tournaments-container .tms-mode-badge {
        border-radius: 999px;
    }
}

@media (max-width: 360px) {
    .related-tournaments-container .tms-meta-grid {
        grid-template-columns: 1fr;
    }

    .related-tournaments-container .tms-meta {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .related-tournaments-container .tms-meta:last-child {
        border-bottom: none;
    }
}

/* Mode badges (related list + global fallback) */
.related-tournaments-container .tms-mode-badge--duel {
    background: rgba(255, 214, 64, 0.2);
    color: #ffd84a;
    border-color: rgba(255, 214, 64, 0.42);
}

.tms-mode-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
}

.tms-mode-badge--duel {
    background: rgba(255, 214, 64, 0.2);
    color: #ffd84a;
    border-color: rgba(255, 214, 64, 0.42);
}

.related-tournaments-container .tms-mode-badge--normal,
.tms-mode-badge--normal {
    background: rgba(91, 138, 255, 0.18);
    color: #a8c2ff;
    border-color: rgba(91, 138, 255, 0.35);
}

.related-tournaments-container .tms-mode-badge--pro-series,
.related-tournaments-container .tms-mode-badge--proseries,
.tms-mode-badge--pro-series,
.tms-mode-badge--proseries {
    background: rgba(89, 211, 106, 0.16);
    color: #9cf0a8;
    border-color: rgba(89, 211, 106, 0.35);
}



.tms-timezone-banner {
    margin: 12px 0 18px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: 14px;
    line-height: 1.4;
}

.tms-utc-preview {
    margin-top: 8px;
    font-size: 12px;
    opacity: .85;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tms-utc-preview__sep {
    opacity: .5;
}


/* Invitations UI (private tournaments) */
.tms-invite-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 6px;
}

.tms-invite-input {
    flex: 1;
    min-width: 180px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .12);
    background: #fff;
    font-weight: 700;
}

.tms-invite-status {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 800;
}

.tms-invite-status.is-ok {
    color: #16a34a;
}

.tms-invite-status.is-err {
    color: #dc2626;
}

.tms-invited-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tms-invite-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 12px;
    background: rgba(255, 255, 255, .85);
}

.tms-invite-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tms-invite-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 auto;
}

.tms-invite-meta {
    min-width: 0;
}

.tms-invite-name {
    font-weight: 900;
    line-height: 1.1;
}

.tms-invite-email {
    font-size: 12px;
    opacity: .75;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 320px;
}

.tms-mini-btn {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .12);
    background: #fff;
    font-weight: 900;
    cursor: pointer;
}

.tms-mini-btn:hover {
    filter: brightness(.97);
}

.tms-mini-btn[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

/* End of Invitations UI (private tournaments) */

/* -------------------------------------------------------------------------- */
/* Team Enroll Modal                                                          */
/* -------------------------------------------------------------------------- */
.tms-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: none;
    /* toggled to flex via JS */
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 16px;
    box-sizing: border-box;
}

.tms-modal {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, .10);
    padding: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
    max-height: 100%;
    overflow: hidden;
}

.tms-modal-title {
    margin: 0 0 14px 0;
    font-size: 20px;
    font-weight: 900;
    color: #111827;
}

.tms-modal-body {
    display: grid;
    gap: 12px;
    max-height: calc(88vh - 120px);
    overflow-y: auto;
    padding-right: 4px;
}

.tms-modal-label {
    font-weight: 900;
    font-size: 12px;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.tms-modal-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d0d7e2;
    background: #ffffff;
    color: #111827;
    font-weight: 800;
    box-sizing: border-box;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.tms-modal-input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .14);
}

.tms-modal-input[readonly] {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-color: #d7dee8;
    color: #0f172a;
}

[data-player-slots] {
    display: grid;
    gap: 14px;
    margin-top: 2px;
}

.tms-modal-player {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background:
        linear-gradient(180deg, rgba(248, 250, 252, .96) 0%, rgba(241, 245, 249, .96) 100%);
}

.tms-modal-player .tms-modal-label {
    grid-column: 1 / -1;
    margin: 0;
    color: #0f172a;
}

.tms-modal-player .tms-modal-input:last-child {
    grid-column: 1 / -1;
}

.tms-modal-hint {
    font-size: 12px;
    font-weight: 800;
    color: #475569;
    line-height: 1.55;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
}

/* Team details popup (Teams tab) */
[data-team-detail-modal] .tms-modal {
    max-width: 620px;
}

[data-team-detail-modal] .tms-modal-body {
    gap: 0;
    padding-top: 4px;
}

.tms-team-detail__header {
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.tms-team-detail__eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #64748b;
}

.tms-team-detail__name {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.2;
}

[data-team-detail-modal] .tms-team-detail__name {
    display: none;
}

.tms-team-detail__meta {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.tms-team-detail__meta strong {
    color: #0f172a;
    font-weight: 800;
}

.tms-team-detail__notice {
    margin-bottom: 14px;
}

.tms-team-detail__section-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #475569;
}

.tms-team-detail__roster-list {
    display: grid;
    gap: 10px;
}

.tms-team-detail-player {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: linear-gradient(180deg, #fafbfd 0%, #f4f7fb 100%);
}

.tms-team-detail-player--captain {
    border-color: rgba(34, 197, 94, .22);
    background: linear-gradient(180deg, #f6fdf9 0%, #eefbf3 100%);
}

.tms-team-detail-player--empty {
    opacity: .72;
    background: #f8fafc;
}

.tms-team-detail-player__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.tms-team-detail-player__role {
    font-size: 14px;
    font-weight: 900;
    color: #0f172a;
}

.tms-team-detail-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .02em;
    white-space: nowrap;
}

.tms-team-detail-status--captain,
.tms-team-detail-status--member {
    color: #166534;
    background: rgba(34, 197, 94, .14);
}

.tms-team-detail-status--pending,
.tms-team-detail-status--join-requested {
    color: #9a3412;
    background: rgba(249, 115, 22, .14);
}

.tms-team-detail-status--open {
    color: #475569;
    background: rgba(148, 163, 184, .18);
}

.tms-team-detail-player__fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 0;
}

.tms-team-detail-field {
    min-width: 0;
}

.tms-team-detail-field dt {
    margin: 0 0 2px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.tms-team-detail-field dd {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    word-break: break-word;
}

.tms-team-detail-field--uid dd,
.tms-team-detail-field--account dd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
}

.tms-team-detail-field__masked {
    color: #94a3b8;
    font-style: italic;
    font-weight: 700;
}

.tms-team-detail-player__stream {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(15, 23, 42, .1);
}

.tms-team-detail-player__stream--edit {
    flex-direction: column;
    align-items: stretch;
}

.tms-team-detail-player__stream-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.tms-team-detail-stream-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #1d4ed8;
    background: rgba(59, 130, 246, .1);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tms-team-detail-stream-link:hover {
    background: rgba(59, 130, 246, .18);
}

.tms-team-detail-player__stream--edit .tms-player-stream-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    width: 100%;
}

.tms-team-detail-player__stream--edit .tms-player-stream-input {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
}

.tms-team-detail-player__actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, .06);
}

.tms-team-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

.tms-team-detail__empty {
    padding: 18px;
    text-align: center;
    border-radius: 12px;
    background: #f8fafc;
}

@media (max-width: 520px) {
    .tms-team-detail-player__fields {
        grid-template-columns: 1fr;
    }

    .tms-team-detail-player__stream--edit .tms-player-stream-row {
        flex-direction: column;
    }
}

.tms-modal-actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}

/* -------------------------------------------------------------------------- */
/* Match Score Modal (We won / We lost)                                       */
/* -------------------------------------------------------------------------- */
.tms-score-modal {
    max-width: 520px;
}

.tms-score-sub {
    font-size: 13px;
    font-weight: 900;
    color: #333;
    opacity: .92;
}

.tms-score-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tms-score-chip {
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .15);
    background: #fff;
    font-weight: 900;
    cursor: pointer;
    min-width: 90px;
    text-align: center;
}

.tms-score-chip:hover {
    filter: brightness(.97);
}

.tms-score-chip.is-selected {
    border-color: rgba(34, 197, 94, .55);
    background: rgba(34, 197, 94, .10);
}

.tms-score-custom-toggle {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.tms-score-custom-toggle:hover {
    text-decoration: underline;
}

.tms-score-custom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.tms-modal-overlay.is-bottom {
    align-items: flex-end;
}

@media (max-width: 520px) {
    .tms-modal {
        padding: 16px;
        border-radius: 16px;
    }

    .tms-modal-body {
        max-height: calc(86vh - 112px);
    }

    .tms-modal-player {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .tms-modal-player .tms-modal-input:last-child {
        grid-column: auto;
    }

    .tms-modal-actions {
        justify-content: stretch;
    }

    .tms-modal-actions .tms-mini-btn {
        flex: 1 1 0;
    }

    .tms-modal-overlay.is-bottom {
        padding: 10px;
    }

    .tms-modal-overlay.is-bottom .tms-score-modal {
        width: 100%;
        max-width: 560px;
        border-radius: 16px 16px 0 0;
    }

    .tms-toast-stack {
        bottom: 12px;
        left: 12px;
        right: 12px;
        top: auto;
        width: auto;
        max-height: calc(100vh - 24px);
        align-items: stretch;
    }
}

/* -------------------------------------------------------------------------- */
/* Bracket: winners + match actions                                           */
/* -------------------------------------------------------------------------- */
.tms-bracket-team.is-winner {
    background: rgba(34, 197, 94, .10);
    border-radius: 10px;
    padding-left: 10px;
    padding-right: 10px;
}

.tms-bracket-match.is-disputed {
    border-color: rgba(239, 68, 68, .35);
}

.tms-bracket-actions,
.tms-match-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.tms-match-report.is-selected {
    border-color: rgba(34, 197, 94, .55);
    background: rgba(34, 197, 94, .08);
}

.tms-duel-admin-actions {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(244, 247, 251, .96));
}

.tms-duel-admin-actions__header,
.tms-duel-admin-actions__team,
.tms-duel-admin-actions__player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tms-duel-admin-actions__title {
    margin: 0 0 4px;
    font-size: 18px;
}

.tms-duel-admin-actions__note,
.tms-duel-admin-actions__meta {
    margin: 0;
    color: #5b6472;
    font-size: 13px;
}

.tms-duel-admin-actions__grid {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.tms-duel-admin-actions__card {
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .9);
}

.tms-duel-admin-actions__player {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(15, 23, 42, .08);
}

/* ----------------------------- Pro-Series bracket shell ----------------------------- */
.tms-pro-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.tms-pro-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.tms-pro-label {
    font-size: 12px;
    opacity: 0.8;
}

.tms-pro-select {
    padding: 6px 10px;
    border-radius: 10px;
}

.tms-pro-stage {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.tms-pro-progress-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, .35);
    background: rgba(34, 197, 94, .12);
    color: #166534;
    font-size: 12px;
    font-weight: 800;
}

.tms-match-set-winner {
    border-color: rgba(239, 68, 68, .35);
}

/* Teams list extra meta */
.tms-team-meta {
    font-size: 12px;
    opacity: .75;
    font-weight: 800;
    margin-left: 6px;
}





/* Base button style */
.tms-score-chip {
    background-color: #e0e0e0;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

/* Hover effect for better UX */
.tms-score-chip:hover {
    background-color: #d0d0d0;
}

/* Active (while clicking) ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬ ÃƒÂ¢Ã¢â€šÂ¬Ã¢â€žÂ¢ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã¢â‚¬Â¦Ãƒâ€šÃ‚Â¡ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã…Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã†â€™Ãƒâ€ Ã¢â‚¬â„¢ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã†â€™Ãƒâ€šÃ‚Â¢ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã‚Â¡ÃƒÆ’Ã¢â‚¬Å¡Ãƒâ€šÃ‚Â¬ÃƒÆ’Ã†â€™ÃƒÂ¢Ã¢â€šÂ¬Ã‚Â¦ÃƒÆ’Ã‚Â¢ÃƒÂ¢Ã¢â‚¬Å¡Ã‚Â¬Ãƒâ€¦Ã¢â‚¬Å“ gives immediate feedback */
.tms-score-chip:active {
    background-color: #b0b0b0;
    transform: scale(0.98);
}

/* Selected state (class added by JavaScript) */
.tms-score-chip.is-selected {
    background-color: #007bff;
    color: #fff;
}

/* Optional: keep hover effect consistent for selected button */
.tms-score-chip.is-selected:hover {
    background-color: #0056b3;
}

/* Tournament page additions */
.tms-login-gate {
    max-width: 720px;
    margin: 24px auto;
    padding: 22px;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, .1);
    background: #fff;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .08);
}

.tms-login-gate h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.tms-login-gate p {
    margin: 0 0 14px;
    color: #4b5563;
    line-height: 1.55;
}

.tms-follow-btn.is-following {
    background: rgba(34, 197, 94, .16);
    border-color: rgba(34, 197, 94, .35);
}

.tms-team-stream {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid rgba(34, 197, 94, .22);
    background: rgba(34, 197, 94, .08);
    color: #166534;
}

.tms-team-stream:hover {
    background: rgba(34, 197, 94, .14);
}

@media (max-width: 980px) {
    .tms-hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tms-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .tms-hero-actions .tms-btn,
    .tms-hero-actions .tms-private-hint {
        width: 100%;
    }
}

body>div.elementor.elementor-149.elementor-location-single.post-664.tournament.type-tournament.status-publish.format-standard.hentry>div>div>div>div>div>div.tms-hero>div.tms-hero-inner>div.tms-hero-main>div:nth-child(6)>div>div.tms-modal-actions>button.tms-mini-btn.tms-mini-btn-danger {

    color: black;
}

body>div.elementor.elementor-149.elementor-location-single.post-672.tournament.type-tournament.status-publish.format-standard.hentry>div>div>div>div>div>div.tms-hero>div.tms-hero-inner>div.tms-hero-main>div:nth-child(6)>div>div.tms-modal-actions>button.tms-mini-btn.tms-mini-btn-danger {

    color: black;
}

.tms-mini-btn.tms-mini-btn-danger {
    color: black;
}

/* Bracket moderation + richer team cards */
.tms-bracket {
    display: grid;
    gap: 18px;
}

.tms-bracket-round {
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.tms-bracket-round-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 14px;
    color: #14213d;
}

.tms-bracket-match {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 14px;
    margin-bottom: 14px;
}

.tms-bracket-match:last-child {
    margin-bottom: 0;
}

.tms-bracket-match.is-disputed {
    border-color: #f59e0b;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.24);
}

.tms-bracket-team {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.tms-bracket-team:last-of-type {
    margin-bottom: 0;
}

.tms-bracket-team.is-winner {
    border-color: #16a34a;
    background: #f0fdf4;
}

.tms-bracket-team.is-banned {
    border-color: #dc2626;
    background: #fef2f2;
}

.tms-bracket-team-name {
    font-weight: 700;
    font-size: 15px;
    color: #111827;
    line-height: 1.35;
}

.tms-bracket-name-flag {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tms-bracket-name-flag.is-banned {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.tms-bracket-team-sub {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

.tms-bracket-team-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tms-bracket-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    border: 1px solid #c7d2fe;
}

.tms-bracket-meta {
    margin-top: 10px;
    font-size: 12px;
    color: #475569;
}

.tms-bracket-match-status {
    margin-top: 10px;
}

.tms-bracket-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.tms-bracket-status-badge.is-pending {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #475569;
}

.tms-bracket-status-badge.is-live {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.tms-bracket-status-badge.is-disputed {
    border-color: #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
}

.tms-bracket-status-badge.is-completed {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.tms-bracket-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

/* Read-only bracket policy:
   - gamer actions move to "Your Next Step"
   - staff actions live in Admin Dashboard > Details > Operations
   Scope to match cards only so duel Match tools modal / series dashboard keep .tms-match-moderate visible. */
.tms-single .tms-bracket-match .tms-bracket-actions,
.tms-single .tms-bracket-match .tms-match-report,
.tms-single .tms-bracket-match .tms-match-moderate {
    display: none !important;
}

/* Duel: bracket header admin strip stays hidden (modal is primary UI). */
.tms-single .tms-duel-admin-actions .tms-bracket-actions,
.tms-single .tms-duel-admin-actions .tms-match-moderate {
    display: none !important;
}

.tms-bracket-actions-staff {
    padding-top: 10px;
    margin-top: 12px;
    border-top: 1px dashed #d1d5db;
}

.tms-bracket-actions-staff .tms-mini-btn {
    background: #111827;
    color: #fff;
    border-color: #111827;
}

.tms-bracket-actions-staff .tms-mini-btn:hover {
    background: #1f2937;
    border-color: #1f2937;
}

.tms-mini-btn.processing {
    opacity: 0.65;
    pointer-events: none;
}

@media (max-width: 768px) {
    .tms-bracket-round {
        padding: 14px;
    }

    .tms-bracket-team {
        padding: 10px 12px;
    }

    .tms-bracket-actions,
    .tms-bracket-team-badges {
        gap: 6px;
    }

    .tms-bracket-actions .tms-mini-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Duel info layout */
.tms-single-duel [data-panel="info"] .tms-panel-grid-duel-info {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.tms-single-duel .tms-duel-pool-card .tms-card-subtitle {
    margin-top: 16px;
}

.tms-single-duel .tms-duel-pool-card .tms-kv li span:first-child,
.tms-single-duel .tms-duel-pool-card .tms-kv-compact li span:first-child {
    max-width: 58%;
}

.tms-single-duel .tms-duel-pool-card .tms-kv li span:last-child,
.tms-single-duel .tms-duel-pool-card .tms-kv-compact li span:last-child {
    max-width: 42%;
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .tms-single-duel [data-panel="info"] .tms-panel-grid-duel-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tms-single-duel [data-panel="info"] .tms-panel-grid-duel-info .tms-duel-pool-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .tms-single-duel [data-panel="info"] .tms-panel-grid-duel-info {
        grid-template-columns: 1fr;
    }
}

/* Duel-first match card refresh */
.tms-single-duel .tms-hero {
    margin-bottom: 18px;
}

.tms-single-duel .tms-hero-inner {
    gap: 20px;
}

.tms-single-duel .tms-hero-main {
    display: grid;
    gap: 14px;
}

.tms-single-duel .tms-hero-stats {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.tms-duel-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tms-duel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.tms-duel-badge.is-match-state,
.tms-duel-badge.is-side-state {
    background: #e2e8f0;
}

.tms-duel-badge.is-open {
    background: #e2e8f0;
}

.tms-duel-badge.is-waiting_for_opponent,
.tms-duel-badge.is-pending_roster,
.tms-duel-badge.is-pending_payments,
.tms-duel-badge.is-awaiting_team_completion {
    background: #fef3c7;
    color: #92400e;
}

.tms-duel-badge.is-ready,
.tms-duel-badge.is-live_ready,
.tms-duel-badge.is-confirmed {
    background: #dcfce7;
    color: #166534;
}

.tms-duel-badge.is-live {
    background: #dbeafe;
    color: #1d4ed8;
}

.tms-duel-badge.is-both_sides_joined,
.tms-duel-badge.is-awaiting_confirmation {
    background: #fef3c7;
    color: #92400e;
}

.tms-duel-badge.is-winner_decided {
    background: #dcfce7;
    color: #166534;
}

.tms-duel-badge.is-disputed,
.tms-duel-badge.is-admin_review {
    background: #fee2e2;
    color: #b91c1c;
}

.tms-duel-badge.is-completed {
    background: #ede9fe;
    color: #6d28d9;
}

.tms-duel-badge.is-banned,
.tms-duel-badge.is-withdrawn {
    background: #fee2e2;
    color: #991b1b;
}

.tms-duel-badge.is-pending_roster {
    white-space: nowrap !important;
}

.tms-duel-showcase {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
}

.tms-duel-match-card,
.tms-duel-lobby-card,
.tms-duel-timeline-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.tms-duel-match-card,
.tms-duel-lobby-card {
    padding: 22px;
}

.tms-duel-timeline-card {
    padding: 18px 22px;
}

.tms-duel-match-card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.tms-duel-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 6px;
}

.tms-series-next-step {
    margin-top: 12px;
    padding: 18px;
    border-radius: 16px;
    border: 1px solid #dbeafe;
    background: linear-gradient(145deg, #f8fbff 0%, #f1f7ff 100%);
    color: #0f172a;
    display: grid;
    gap: 12px;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.tms-next-step-above-tabs {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.tms-next-step-header__copy {
    flex: 1 1 auto;
    min-width: 0;
}

.tms-next-step-eyebrow,
.tms-series-next-step .tms-duel-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 6px;
}

.tms-next-step-title,
.tms-series-next-step .tms-duel-card-title {
    margin: 0;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 800;
    color: #0f172a;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tms-series-next-step .tms-muted {
    width: auto;
    display: inline;
    opacity: 0.7;
}

.tms-series-next-step--pinned {
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
}

/* Normal / Pro: next-step card below hero, above tab row (matches Duel placement) */
.tms-next-step-above-tabs {
    margin-top: 16px;
}

.tms-next-step-above-tabs .tms-series-next-step {
    margin-top: 0;
}

.tms-series-next-step[data-status="submit_required"] {
    border-color: #86efac;
    background: linear-gradient(145deg, #f0fdf4 0%, #ecfdf5 100%);
}

.tms-series-next-step[data-status="disputed"] {
    border-color: #fecaca;
    background: linear-gradient(145deg, #fef2f2 0%, #fff1f2 100%);
}

.tms-series-next-step[data-urgency="warning"] {
    border-color: #fcd34d;
}

.tms-series-next-step[data-urgency="urgent"] {
    border-color: #fca5a5;
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.12);
}

.tms-series-next-step.is-tms-next-step-hidden {
    display: none !important;
}

.tms-next-step-countdown {
    font-size: 13px;
    font-weight: 700;
    color: #1d4ed8;
    margin-top: 0;
}

.tms-next-step-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}

.tms-next-step-body-text {
    color: #334155;
    font-size: 14px;
    line-height: 1.55;
}

.tms-next-step-section {
    display: grid;
    gap: 7px;
}

.tms-next-step-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #ffffffd9;
    color: #334155;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tms-next-step-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tms-next-step-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.tms-next-step-chip-grid-muted .tms-next-step-chip {
    border-color: #dbeafe;
    background: #ffffffbf;
    color: #334155;
}

.tms-next-step-meta-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.tms-next-step-dispute-box,
.tms-next-step-blocker-list {
    display: grid;
    gap: 7px;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid #fca5a5;
    background: #ffffffcc;
}

.tms-next-step-dispute-line,
.tms-next-step-blocker-item {
    color: #7f1d1d;
    font-size: 13px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.tms-next-step-actions {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed #dbeafe;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tms-next-step-actions .tms-mini-btn,
.tms-series-next-step .tms-map-ladder__inputs .tms-mini-btn,
.tms-series-next-step .tms-map-ladder__slide-actions .tms-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
}

.tms-series-next-step .tms-bracket-actions .tms-mini-btn {
    padding: 9px 12px;
    border-radius: 10px;
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
    font-weight: 800;
}

.tms-series-next-step .tms-bracket-actions .tms-mini-btn:hover {
    background: #f8fafc;
}

.tms-series-next-step[data-status="disputed"] .tms-bracket-actions .tms-mini-btn {
    border-color: #fca5a5;
    background: #fff;
}

.tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="submit_score"],
.tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="confirm_score"],
.tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="join_team"],
.tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="create_team"] {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="submit_score"]:hover,
.tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="confirm_score"]:hover,
.tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="join_team"]:hover,
.tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="create_team"]:hover {
    background: #1f2937;
    border-color: #1f2937;
}

/* Map ladder inside light next-step card (Normal / Pro) */
.tms-series-next-step .tms-map-ladder__row {
    border-color: #dbeafe;
    background: #ffffff;
}

.tms-series-next-step .tms-map-ladder__pending-note,
.tms-series-next-step .tms-map-ladder__opp-note,
.tms-series-next-step .tms-map-ladder__badge,
.tms-series-next-step .tms-map-ladder__inp {
    color: #64748b;
}

.tms-series-next-step .tms-map-ladder__scoreline {
    color: #334155;
}

.tms-series-next-step .tms-map-ladder-nav {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
}

.tms-series-next-step .tms-map-ladder-nav:hover {
    background: #f1f5f9;
}

.tms-series-next-step .tms-map-ladder-dot {
    background: #cbd5e1;
}

.tms-series-next-step .tms-map-ladder-dot.is-active {
    background: #2563eb;
}

.tms-series-next-step .tms-map-ladder__inp input {
    border-color: #cbd5e1;
    background: #fff;
    color: #0f172a;
}

.tms-series-next-step .tms-chat-thread-pill {
    border-color: #cbd5e1;
    background: #fff;
    color: #0f172a;
}

.tms-series-next-step .tms-chat-thread-pill:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

/* ==========================================================================
   Normal / Pro tournament details — mobile layout
   (scoped: not Duel, which uses .tms-single-duel)
   ========================================================================== */

.tms-single:not(.tms-single-duel) {
    overflow-x: clip;
}

@media (max-width: 900px) {
    .tms-single:not(.tms-single-duel) {
        margin-top: 16px;
        padding: 0 12px 24px;
    }

    .tms-single:not(.tms-single-duel) .tms-hero-main {
        min-width: 0;
    }

    .tms-single:not(.tms-single-duel) .tms-next-step-above-tabs {
        margin-top: 12px;
    }

    .tms-single:not(.tms-single-duel) .tms-series-next-step {
        padding: 16px;
        border-radius: 14px;
    }

    .tms-single:not(.tms-single-duel) .tms-tabs {
        position: sticky;
        top: 0;
        z-index: 40;
        margin-left: -12px;
        margin-right: -12px;
        padding: 8px 12px 10px;
        background: linear-gradient(180deg, var(--tms-page-bg, rgb(26 26 26)) 72%, rgba(26, 26, 26, 0));
    }

    .tms-single:not(.tms-single-duel) .tms-results-toolbar .tms-results-filter,
    .tms-single:not(.tms-single-duel) .tms-teams-toolbar .tms-results-filter {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
    }

    .tms-single:not(.tms-single-duel) .tms-results-toolbar input[type="search"],
    .tms-single:not(.tms-single-duel) .tms-teams-toolbar input[type="search"] {
        flex: 1 1 100%;
    }

    .tms-single:not(.tms-single-duel) .tms-team-summary-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tms-single:not(.tms-single-duel) .tms-kv li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .tms-single:not(.tms-single-duel) .tms-kv li span:last-child {
        text-align: left;
        max-width: 100%;
    }

    .tms-single:not(.tms-single-duel) .tms-kv-value-location {
        max-width: 100%;
    }

    .tms-single:not(.tms-single-duel) .tms-card {
        padding: 14px;
    }
}

@media (max-width: 640px) {
    .tms-single:not(.tms-single-duel) {
        padding: 0 10px 28px;
    }

    .tms-single:not(.tms-single-duel) .tms-hero {
        min-height: 0;
        border-radius: 10px;
    }

    .tms-single:not(.tms-single-duel) .tms-hero-inner {
        padding: 14px;
        gap: 14px;
    }

    .tms-single:not(.tms-single-duel) .tms-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .tms-single:not(.tms-single-duel) .tms-stat {
        min-height: 48px;
        padding: 8px 10px;
    }

    .tms-single:not(.tms-single-duel) .tms-stat-value {
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .tms-single:not(.tms-single-duel) .tms-hero-pill.tms-hero-location {
        max-width: 100%;
    }

    .tms-single:not(.tms-single-duel) .tms-series-next-step {
        padding: 14px;
        gap: 10px;
    }

    .tms-single:not(.tms-single-duel) .tms-series-next-step .tms-duel-card-title {
        font-size: 18px;
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .tms-single:not(.tms-single-duel) .tms-next-step-body-text {
        font-size: 13px;
    }

    .tms-single:not(.tms-single-duel) .tms-next-step-chip-grid {
        gap: 6px;
    }

    .tms-single:not(.tms-single-duel) .tms-next-step-chip {
        max-width: 100%;
        flex: 1 1 100%;
        border-radius: 10px;
    }

    .tms-single:not(.tms-single-duel) .tms-next-step-actions,
    .tms-single:not(.tms-single-duel) .tms-series-next-step .tms-bracket-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .tms-single:not(.tms-single-duel) .tms-next-step-actions .tms-mini-btn,
    .tms-single:not(.tms-single-duel) .tms-series-next-step .tms-bracket-actions .tms-mini-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .tms-single:not(.tms-single-duel) .tms-map-ladder-carousel-bar {
        gap: 6px;
    }

    .tms-single:not(.tms-single-duel) .tms-map-ladder-nav {
        flex: 0 0 36px;
        min-width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .tms-single:not(.tms-single-duel) .tms-map-ladder__inputs {
        flex-direction: column;
        align-items: stretch;
    }

    .tms-single:not(.tms-single-duel) .tms-map-ladder__inp input {
        width: 100%;
        box-sizing: border-box;
    }

    .tms-single:not(.tms-single-duel) .tms-map-ladder__slide-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tms-single:not(.tms-single-duel) .tms-map-ladder__slide-actions .tms-mini-btn {
        width: 100%;
        justify-content: center;
    }

    .tms-single:not(.tms-single-duel) .tms-next-step-chats .tms-chat-summary-row {
        flex-direction: column;
        align-items: stretch;
    }

    .tms-single:not(.tms-single-duel) .tms-next-step-chats .tms-chat-thread-pill {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .tms-single:not(.tms-single-duel) .tms-tabs .tms-tab,
    .tms-single:not(.tms-single-duel) .tms-tabs button.tms-tab {
        min-height: 44px;
        padding: 10px 14px;
    }

    .tms-single:not(.tms-single-duel) .tms-results-toolbar .tms-results-filter,
    .tms-single:not(.tms-single-duel) .tms-teams-toolbar .tms-results-filter {
        flex: 1 1 100%;
    }

    .tms-single:not(.tms-single-duel) .tms-results-footer {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tms-single:not(.tms-single-duel) .tms-results-footer .tms-mini-btn {
        flex: 1 1 auto;
        min-width: 120px;
    }

    .tms-single:not(.tms-single-duel) .tms-team-view-btn {
        max-width: none;
        width: 100%;
    }

    .tms-single:not(.tms-single-duel) .tms-admins-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 400px) {
    .tms-single:not(.tms-single-duel) .tms-hero-stats {
        grid-template-columns: 1fr;
    }

    .tms-single:not(.tms-single-duel) .tms-team-summary-strip {
        grid-template-columns: 1fr;
    }

    .tms-single:not(.tms-single-duel) .tms-admins-grid {
        grid-template-columns: 1fr;
    }
}

.tms-map-ladder-wrap {
    margin-top: 10px;
}

.tms-map-ladder-carousel {
    margin-top: 6px;
}

.tms-map-ladder-carousel-bar {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.tms-map-ladder-nav {
    flex: 0 0 40px;
    min-width: 40px;
    align-self: center;
    height: 40px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.tms-map-ladder-nav:hover {
    background: rgba(255, 255, 255, 0.08);
}

.tms-map-ladder-viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.tms-map-ladder-track {
    display: flex;
    width: 100%;
    transition: transform 0.28s ease;
    --slide-count: 1;
}

.tms-map-ladder__slide {
    flex: 0 0 calc(100% / var(--slide-count, 1));
    max-width: calc(100% / var(--slide-count, 1));
    box-sizing: border-box;
    padding: 0 4px;
    min-width: 0;
}

.tms-map-ladder-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.tms-map-ladder-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.tms-map-ladder-dot.is-active {
    background: rgba(96, 165, 250, 0.95);
    transform: scale(1.15);
}

.tms-map-ladder__pending-note,
.tms-map-ladder__opp-note {
    font-size: 12px;
    line-height: 1.35;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.78);
}

.tms-map-ladder__slide-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tms-map-ladder__slide-actions--dispute {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tms-map-ladder__row {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
}

.tms-map-ladder__row--locked,
.tms-map-ladder__row--unused {
    opacity: 0.65;
}

.tms-map-ladder__row-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.tms-map-ladder__title {
    font-weight: 700;
}

.tms-map-ladder__badge {
    font-size: 11px;
    text-transform: capitalize;
    color: rgba(255, 255, 255, 0.65);
}

.tms-map-ladder__scoreline {
    font-size: 13px;
    margin-bottom: 8px;
}

.tms-map-ladder__inputs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.tms-map-ladder__inp {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
}

.tms-map-ladder__inp input {
    width: 72px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: #111;
    color: #fff;
}

.tms-map-ladder-submit,
.tms-map-ladder-dispute {
    margin-top: 4px;
}

.tms-bracket-team.tms-my-slot-highlight {
    outline: 2px solid #e59e00;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
    background: #eff6ff;
}

.tms-pro-round-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tms-duel-match-card-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
}

.tms-duel-money-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.tms-duel-money-pill {
    min-width: 132px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.tms-duel-money-pill span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.tms-duel-money-pill strong {
    font-size: 18px;
    color: #0f172a;
}

.tms-duel-versus-grid {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-direction: row;
    justify-content: space-evenly;
}

.tms-duel-side-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px;
    display: grid;
    gap: 14px;
    width: 40%;
}

.tms-duel-side-card.is-current {
    border-color: #93c5fd;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.tms-duel-side-card.is-placeholder {
    justify-content: center;
    align-content: center;
}

.tms-duel-side-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.tms-duel-side-head-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 45px;
    justify-content: flex-end;
    align-items: center;
}

.tms-duel-badge.is-pending-join {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
    font-weight: 600;
    flex-wrap: nowrap;
    font-size: x-small;
    padding: 6px;
}

.tms-duel-inline-note.is-pending-request {
    color: #92400e;
    font-size: 13px;
}

.tms-duel-side-name {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.15;
}

.tms-duel-side-progress {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tms-duel-side-progress div {
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.tms-duel-side-progress span {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.tms-duel-side-progress strong {
    font-size: 16px;
    color: #0f172a;
}

.tms-duel-side-roster {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.tms-duel-side-roster li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.tms-duel-showcase-roster {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.tms-duel-showcase-player {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    display: grid;
    gap: 4px;
}

.tms-duel-showcase-player-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.tms-duel-showcase-player-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}

.tms-duel-showcase-player-role {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tms-duel-showcase-player-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 12px;
    color: #64748b;
}

.tms-duel-side-empty {
    padding: 14px;
    border-radius: 14px;
    background: rgba(148, 163, 184, 0.12);
    color: #475569;
}

.tms-duel-side-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tms-duel-versus-center {
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 10px;
    text-align: center;
    padding-top: 24px;
}

.tms-duel-vs {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 900;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.2);
}

.tms-duel-scoreline {
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
}

.tms-duel-winner-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.tms-duel-inline-note {
    padding: 10px 12px;
    border-radius: 14px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
}

.tms-duel-inline-note.is-warning {
    background: #fef3c7;
    color: #92400e;
}

.tms-duel-primary-actions {
    display: grid;
    gap: 8px;
    width: 100%;
}

.tms-duel-primary-actions .tms-btn {
    width: 100%;
    justify-content: center;
}


.tms-duel-lobby-card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.tms-duel-lobby-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.tms-duel-lobby-room,
.tms-duel-ready-board {
    display: grid;
    gap: 14px;
}

.tms-duel-lobby-room-actions,
.tms-duel-lobby-status-strip,
.tms-duel-lobby-actions,
.tms-duel-ready-current-pills,
.tms-duel-ready-side-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tms-duel-lobby-meta {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.tms-duel-lobby-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tms-duel-lobby-field {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.tms-duel-lobby-field.is-wide {
    grid-column: 1 / -1;
}

.tms-duel-lobby-field-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.tms-duel-lobby-field-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.tms-duel-lobby-field-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tms-duel-lobby-field-value {
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tms-duel-lobby-copy {
    white-space: nowrap;
}

.tms-duel-lobby-copy.is-bundle {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.tms-duel-lobby-card.is-locked {
    border-color: #e2e8f0;
}

.tms-duel-lobby-card.is-shared {
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.08);
}

.tms-duel-lobby-card.is-both-ready {
    box-shadow: 0 14px 30px rgba(22, 163, 74, 0.1);
}

.tms-duel-lobby-card.is-live {
    border-color: #bfdbfe;
}

.tms-duel-lobby-editor {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
}

.tms-duel-lobby-editor-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.tms-duel-lobby-form {
    display: grid;
    gap: 14px;
}

.tms-duel-lobby-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tms-duel-lobby-form-field {
    display: grid;
    gap: 8px;
}

.tms-duel-lobby-form-field.is-wide {
    grid-column: 1 / -1;
}

.tms-duel-lobby-input {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border-radius: 14px;
    border: 1px solid #dbe3ee;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    box-sizing: border-box;
}

.tms-duel-lobby-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.22);
}

.tms-duel-lobby-textarea {
    min-height: 112px;
    resize: vertical;
    line-height: 1.5;
}

.tms-duel-lobby-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tms-duel-lobby-action.is-live {
    background: #e59e00;
    border-color: #e59e00;
    color: #fff;
}

.tms-duel-lobby-note {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}

.tms-duel-lobby-empty,
.tms-duel-lobby-locked,
.tms-duel-ready-current,
.tms-duel-ready-side {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 16px;
}

.tms-duel-lobby-empty,
.tms-duel-lobby-locked {
    min-height: 100%;
    align-content: center;
}

.tms-duel-lobby-empty.is-shared {
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
    border-color: #bfdbfe;
}

.tms-duel-lobby-locked {
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    border-style: dashed;
}

.tms-duel-lobby-locked-title,
.tms-duel-ready-current-title {
    font-size: 18px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 8px;
}

.tms-duel-lobby-locked p,
.tms-duel-lobby-empty p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}

.tms-duel-ready-board {
    gap: 12px;
}

.tms-duel-ready-sides {
    display: grid;
    gap: 12px;
}

.tms-duel-ready-side.is-current {
    border-color: #93c5fd;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.tms-duel-ready-side-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.tms-duel-ready-side-head strong {
    font-size: 16px;
    color: #0f172a;
}

.tms-duel-ready-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.tms-duel-ready-pill.is-ready {
    background: #dcfce7;
    color: #166534;
}

.tms-duel-ready-pill.is-pending {
    background: #fef3c7;
    color: #92400e;
}

.tms-duel-ready-pill.is-live {
    background: #dbeafe;
    color: #1d4ed8;
}

.tms-duel-ready-pill.is-neutral {
    background: rgba(15, 23, 42, 0.08);
    color: #334155;
}

.tms-duel-lobby-action.is-team {
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
}

.tms-duel-lobby-copy.processing,
.tms-duel-lobby-action.processing,
.tms-duel-lobby-editor-actions .tms-mini-btn.processing {
    opacity: 0.7;
}

.tms-duel-timeline {
    list-style: none;
    margin: -25px 0px 0px 0px;
    padding: 0;
    display: flex;
    gap: 25px;
    justify-content: center;
}

.tms-duel-timeline li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
    font-weight: 600;
}

.tms-duel-timeline li.is-complete {
    color: #0f172a;
}

.tms-duel-timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #cbd5e1;
    flex: none;
}

.tms-duel-timeline li.is-complete .tms-duel-timeline-dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

.tms-bracket-duel .tms-bracket-round {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
}

.tms-bracket-duel .tms-bracket-match {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
}

.tms-duel-staff-panel {
    margin-top: 14px;
    border-top: 1px dashed #cbd5e1;
    padding-top: 12px;
}

.tms-duel-staff-panel summary {
    cursor: pointer;
    list-style: none;
    font-weight: 800;
    color: #334155;
}

.tms-duel-staff-panel summary::-webkit-details-marker {
    display: none;
}

.tms-duel-staff-panel-body {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.tms-duel-staff-global {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.tms-duel-staff-sides {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tms-duel-staff-side {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
}

.tms-duel-staff-side-title {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

@media (max-width: 1100px) {
    .tms-duel-versus-grid {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .tms-duel-versus-grid .tms-duel-side-card {
        width: 100%;
        max-width: none;
        flex: 1 1 auto;
    }

    .tms-duel-versus-center {
        order: 2;
        width: 100%;
    }

    .tms-duel-side-card:first-child {
        order: 1;
    }

    .tms-duel-side-card:last-child {
        order: 3;
    }
}

@media (max-width: 900px) {

    .tms-duel-match-card-head,
    .tms-duel-lobby-card-head {
        flex-direction: column;
    }

    .tms-duel-money-strip {
        justify-content: flex-start;
    }

    .tms-duel-staff-sides {
        grid-template-columns: 1fr;
    }

    .tms-duel-lobby-grid {
        grid-template-columns: 1fr;
    }

    .tms-duel-lobby-fields,
    .tms-duel-lobby-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {

    .tms-duel-match-card,
    .tms-duel-lobby-card,
    .tms-duel-timeline-card {
        padding: 16px;
        border-radius: 18px;
    }

    .tms-duel-side-card {
        padding: 14px;
    }

    .tms-duel-side-progress {
        grid-template-columns: 1fr;
    }

    .tms-duel-side-roster li,
    .tms-duel-side-actions,
    .tms-duel-primary-actions {
        grid-auto-flow: row;
    }

    .tms-duel-lobby-field-head,
    .tms-duel-ready-side-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .tms-duel-lobby-room-actions,
    .tms-duel-lobby-status-strip,
    .tms-duel-lobby-actions,
    .tms-duel-ready-current-pills,
    .tms-duel-ready-side-pills {
        align-items: flex-start;
    }
}

.tms-duel-series-row.is-readonly {
    background: #f8fafc;
}

.tms-duel-series-row-grid.is-static {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tms-duel-series-static {
    min-height: 46px;
    padding: 11px 13px;
    border-radius: 14px;
    border: 1px solid #dbe3ee;
    background: #ffffff;
    color: #0f172a;
    font-size: 14px;
    font-weight: 600;
    box-sizing: border-box;
}

@media (max-width: 640px) {
    .tms-duel-series-row-grid.is-static {
        grid-template-columns: 1fr;
    }
}

.tms-single-duel .tms-duel-submit-loss {
    background: #ffffff;
    color: #111827;
    border-color: #d1d5db;
}

.tms-single-duel .tms-duel-submit-loss:hover {
    background: #f3f4f6;
    color: #111827;
}

.tms-single-duel .tms-duel-live-btn {
    background: #eef2ff;
    color: #3730a3;
    border-color: #c7d2fe;
}

.tms-single-duel .tms-duel-live-btn:hover {
    background: #e0e7ff;
    color: #312e81;
}

.tms-single-duel .tms-duel-primary-actions .tms-btn-ghost {
    background: #ffffff;
    color: #111827;
    border-color: #d1d5db;
}

.tms-single-duel .tms-duel-primary-actions .tms-btn-ghost:hover {
    background: #f3f4f6;
    color: #111827;
}

.tms-single-duel .tms-duel-primary-actions [data-duel-open-dispute] {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fecaca;
}

.tms-single-duel .tms-duel-primary-actions [data-duel-open-dispute]:hover {
    background: #fecaca;
    color: #991b1b;
}

.tms-duel-series-status.is-awaiting_map_correction {
    background: #fef3c7;
    color: #92400e;
}

/* Duel per-map reporting dashboard */
.tms-duel-series-dashboard {
    width: 100%;
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.tms-duel-series-dashboard-head {
    display: grid;
    gap: 4px;
    text-align: left;
}

.tms-duel-series-dashboard-title {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
}

.tms-duel-series-dashboard-sub {
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

.tms-duel-series-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.tms-duel-series-summary-card {
    padding: 12px 13px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.tms-duel-series-summary-card span {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.tms-duel-series-summary-card strong {
    font-size: 18px;
    color: #0f172a;
}

.tms-duel-series-history {
    display: grid;
    gap: 8px;
    width: 100%;
}

.tms-duel-series-history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 13px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.tms-duel-series-history-row.is-confirmed {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.tms-duel-series-history-row.is-awaiting_opponent_map_submission {
    background: #fffbeb;
    border-color: #fde68a;
}

.tms-duel-series-history-row.is-map_disputed {
    background: #fef2f2;
    border-color: #fecaca;
}

.tms-duel-series-history-row.is-active {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.tms-duel-series-history-main {
    display: grid;
    gap: 4px;
    min-width: 0;
    text-align: left;
}

.tms-duel-series-history-main strong {
    font-size: 14px;
    color: #0f172a;
}

.tms-duel-series-history-main span {
    font-size: 12px;
    line-height: 1.45;
    color: #475569;
    overflow-wrap: anywhere;
}

.tms-duel-series-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #e2e8f0;
    color: #334155;
}

.tms-duel-series-status.is-confirmed {
    background: #dcfce7;
    color: #166534;
}

.tms-duel-series-status.is-awaiting_opponent_map_submission {
    background: #fef3c7;
    color: #92400e;
}

.tms-duel-series-status.is-map_disputed {
    background: #fee2e2;
    color: #b91c1c;
}

.tms-duel-series-status.is-active {
    background: #dbeafe;
    color: #1d4ed8;
}

.tms-duel-series-footnote {
    display: grid;
    gap: 4px;
    padding: 12px 13px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
    text-align: left;
}

.tms-duel-series-grid {
    display: grid;
    gap: 12px;
}

.tms-duel-series-row {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.tms-duel-series-row-head {
    font-size: 13px;
    font-weight: 900;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tms-duel-series-row-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tms-duel-result-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tms-duel-result-chip.is-win {
    background: #dcfce7;
    color: #166534;
}

.tms-duel-result-chip.is-loss {
    background: #fee2e2;
    color: #b91c1c;
}

@media (max-width: 640px) {

    .tms-duel-series-summary-grid,
    .tms-duel-series-row-grid {
        grid-template-columns: 1fr;
    }

    .tms-duel-series-history-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .tms-duel-series-status {
        min-width: 0;
    }
}


.tms-duel-series-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 18px;
    margin-top: 18px;
    align-items: start;
}

.tms-duel-primary-actions {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    align-self: stretch;
}

.tms-duel-primary-actions-head {
    font-size: 14px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 4px;
}

@media (max-width: 1100px) {
    .tms-duel-series-panel {
        grid-template-columns: 1fr;
    }
}

.tms-duel-series-history-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.tms-duel-map-compare {
    display: grid;
    gap: 4px;
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px dashed #fdba74;
    font-size: 12px;
    color: #9a3412;
}

.tms-duel-proof-upload-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.tms-duel-proof-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.tms-duel-proof-thumb {
    display: inline-flex;
    width: 92px;
    height: 92px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #dbeafe;
    background: #eff6ff;
}

.tms-duel-proof-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tms-duel-proof-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 12px;
    text-decoration: none;
}

.tms-duel-tools-modal {
    max-width: 860px;
}

.tms-duel-tools-section {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
    text-align: left;
}

.tms-duel-tools-section:last-child {
    margin-bottom: 0;
}

.tms-duel-tools-section-title,
.tms-duel-tools-side-title {
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0f172a;
}

.tms-duel-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tms-duel-tools-card,
.tms-duel-tools-side-card {
    display: grid;
    gap: 6px;
    padding: 12px 13px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.tms-duel-tools-card span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.tms-duel-tools-card strong {
    font-size: 18px;
    color: #0f172a;
}

.tms-duel-tools-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tms-duel-tools-proof-note {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 12px;
    line-height: 1.5;
}

.tms-duel-tools-proof-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tms-duel-tools-proof-item {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 8px 10px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 12px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .tms-duel-tools-grid {
        grid-template-columns: 1fr;
    }

    .tms-duel-series-history-actions {
        justify-content: flex-start;
    }
}

.tms-duel-next-step-card,
.tms-duel-stage-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.tms-duel-next-step-card {
    padding: 22px;
    display: grid;
    gap: 16px;
    border-color: #bfdbfe;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.08);
}

.tms-duel-next-step-card .tms-chat-thread-pill {
    border-color: #cbd5e1;
    background: #fff;
    color: #0f172a;
}

.tms-duel-next-step-card .tms-chat-thread-pill:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.tms-duel-next-step-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.tms-duel-next-step-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
    color: #0f172a;
}

.tms-duel-next-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tms-duel-next-step-actions .tms-btn {
    width: auto;
    background-color: #0b0d10;
    color: #fff;
}

.tms-duel-next-step-dual-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tms-duel-next-step-score-preview {
    margin-top: 14px;
    display: grid;
    gap: 8px;
    max-width: 100%;
}

.tms-duel-next-step-score-preview-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.tms-duel-next-step-score-preview-panel {
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #c7d2fe;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.tms-duel-next-step-score-preview .tms-duel-next-step-map {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 12px;
}

.tms-duel-next-step-score-versus {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 12px 14px;
}

.tms-duel-score-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 14px;
    font-variant-numeric: tabular-nums;
    border: 1px solid transparent;
    min-width: 5.5rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.tms-duel-score-pill-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.tms-duel-score-pill-num {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.tms-duel-score-pill.tms-you {
    background: #fff;
    border-color: #93c5fd;
    color: #1e40af;
}

.tms-duel-score-pill.tms-you .tms-duel-score-pill-num {
    color: #1d4ed8;
}

.tms-duel-score-pill.tms-them {
    background: #fff;
    border-color: #e9d5ff;
    color: #6b21a8;
}

.tms-duel-score-pill.tms-them .tms-duel-score-pill-num {
    color: #86198f;
}

.tms-duel-score-vs {
    font-size: 13px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tms-duel-stage-card {
    overflow: hidden;
}

.tms-duel-stage-card>summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
}

.tms-duel-stage-card>summary::-webkit-details-marker {
    display: none;
}

.tms-duel-stage-card[open]>summary {
    border-bottom: 1px solid #e5e7eb;
}

.tms-duel-stage-summary-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.tms-duel-stage-body {
    padding: 18px 22px 22px;
}

.tms-duel-side-summary,
.tms-duel-team-manage-panel {
    display: grid;
    gap: 12px;
}

.tms-duel-side-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tms-duel-summary-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dbe3ee;
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.tms-duel-summary-chip.is-open {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.tms-duel-summary-chip.is-requested {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.tms-duel-summary-chip.is-invited {
    background: #f5f3ff;
    border-color: #ddd6fe;
    color: #6d28d9;
}

.tms-duel-team-manage-stack {
    display: grid;
    gap: 16px;
}

.tms-duel-team-manage-panel {
    padding: 18px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.tms-duel-team-manage-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.tms-duel-team-manage-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.15;
    color: #0f172a;
}

.tms-duel-team-manage-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.tms-duel-team-manage-section {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

#tms-duel-lobby-stage .tms-duel-stage-body,
#tms-duel-match-center .tms-duel-stage-body {
    background: #f8fafc;
}

#tms-duel-lobby-stage .tms-duel-lobby-card,
#tms-duel-match-center .tms-duel-series-dashboard,
#tms-duel-match-center .tms-duel-primary-actions {
    box-shadow: none;
}

@media (max-width: 900px) {
    .tms-duel-team-manage-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {

    .tms-next-step-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tms-next-step-status {
        white-space: normal;
    }

    .tms-series-next-step .tms-duel-card-title {
        font-size: 19px;
    }

    .tms-duel-next-step-head,
    .tms-duel-stage-card>summary,
    .tms-duel-team-manage-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .tms-duel-next-step-dual-cta {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .tms-duel-next-step-actions .tms-btn {
        width: 100%;
    }

    .tms-duel-next-step-score-versus {
        flex-direction: column;
        align-items: stretch;
    }

    .tms-duel-score-vs {
        text-align: center;
    }
}


/* ==========================================================================
   DUEL UI UPGRADE — Progress Bar, Result Recap, Dispute Banner, Mobile Bar
   ========================================================================== */

/* --- Progress Bar --- */
.tms-duel-progress-bar {
    padding: 16px 22px;
    margin-bottom: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    overflow-x: auto;
}

.tms-duel-progress-track {
    display: flex;
    align-items: flex-start;
    gap: 0;
    min-width: max-content;
}

.tms-duel-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    min-width: 64px;
}

.tms-duel-progress-dot {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #e2e8f0;
    color: #64748b;
    font-weight: 800;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
}

.tms-duel-progress-step.is-complete .tms-duel-progress-dot {
    background: #22c55e;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.tms-duel-progress-step.is-current .tms-duel-progress-dot {
    background: linear-gradient(135deg, #7e7228, #e59e00);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(229, 158, 0, 0.18);
    animation: tms-pulse-step 2s ease-in-out infinite;
}

@keyframes tms-pulse-step {

    0%,
    100% {
        box-shadow: 0 0 0 5px rgba(229, 158, 0, 0.18);
    }

    50% {
        box-shadow: 0 0 0 9px rgba(229, 158, 0, 0.08);
    }
}

.tms-duel-progress-number {
    font-variant-numeric: tabular-nums;
}

.tms-duel-progress-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    text-align: center;
    max-width: 80px;
    line-height: 1.2;
    white-space: nowrap;
}

.tms-duel-progress-step.is-complete .tms-duel-progress-label {
    color: #0f172a;
}

.tms-duel-progress-step.is-current .tms-duel-progress-label {
    color: #e59e00;
    font-weight: 800;
}

.tms-duel-progress-connector {
    flex: 1 1 auto;
    min-width: 24px;
    height: 3px;
    background: #e2e8f0;
    margin-top: 17px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.tms-duel-progress-connector.is-complete {
    background: #22c55e;
}


/* --- Result Recap Card --- */
.tms-duel-result-recap {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 22px;
    margin-bottom: 18px;
    border-radius: 22px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.tms-duel-result-recap.is-completed {
    background: linear-gradient(135deg, #f0fdf4 0%, #eff6ff 100%);
    border-color: #bbf7d0;
}

.tms-duel-result-recap.is-terminal {
    background: linear-gradient(135deg, #fef2f2 0%, #fefce8 100%);
    border-color: #fecaca;
}

.tms-duel-result-recap-icon {
    font-size: 40px;
    line-height: 1;
    flex: none;
}

.tms-duel-result-recap-body {
    flex: 1;
    min-width: 0;
}

.tms-duel-result-recap-title {
    margin: 4px 0 8px;
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.2;
}

.tms-duel-result-recap-score {
    font-size: 32px;
    font-weight: 900;
    color: #166534;
    margin-bottom: 14px;
    font-variant-numeric: tabular-nums;
}

.tms-duel-result-recap.is-terminal .tms-duel-result-recap-score {
    color: #991b1b;
}

.tms-duel-result-recap-maps {
    display: grid;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 4px;
}

.tms-duel-result-recap-maps-head {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 8px;
    padding: 10px 14px;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tms-duel-result-recap-maps-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #f1f5f9;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
}

.tms-duel-result-recap-maps-row .is-winner {
    color: #166534;
    font-weight: 900;
}


/* --- Dispute Banner --- */
.tms-duel-dispute-banner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 22px;
    margin-bottom: 18px;
    border-radius: 20px;
    border: 1px solid;
}

.tms-duel-dispute-banner.is-dispute {
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    border-color: #fecaca;
}

.tms-duel-dispute-banner.is-review {
    background: linear-gradient(135deg, #fefce8 0%, #eff6ff 100%);
    border-color: #fde68a;
}

.tms-duel-dispute-banner-icon {
    font-size: 28px;
    line-height: 1;
    flex: none;
}

.tms-duel-dispute-banner-body {
    flex: 1;
    min-width: 0;
}

.tms-duel-dispute-banner-title {
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 4px;
}

.tms-duel-dispute-banner.is-dispute .tms-duel-dispute-banner-title {
    color: #b91c1c;
}

.tms-duel-dispute-banner.is-review .tms-duel-dispute-banner-title {
    color: #92400e;
}

.tms-duel-dispute-banner-text {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    line-height: 1.5;
}

.tms-duel-dispute-banner-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}


/* --- Mobile Sticky Action Bar --- */
.tms-duel-mobile-bar {
    display: none;
}

@media (max-width: 768px) {
    .tms-duel-mobile-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid #e5e7eb;
        box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
    }

    .tms-duel-mobile-bar-inner {
        display: flex;
        gap: 10px;
    }

    .tms-duel-mobile-bar-inner .tms-btn {
        flex: 1;
        justify-content: center;
    }

    /* Add bottom padding to duel content so mobile bar doesn't overlap */
    .tms-single-duel {
        padding-bottom: 80px;
    }
}


/* --- Copy Button Feedback --- */
.tms-duel-lobby-copy.is-copied,
.tms-mini-btn.is-copied {
    background: #dcfce7 !important;
    border-color: #86efac !important;
    color: #166534 !important;
    transition: all 0.2s ease;
}


/* --- Lifecycle-Driven Section Visibility --- */
.tms-single-duel[data-lifecycle="completed"] .tms-duel-next-step-card,
.tms-single-duel[data-lifecycle="cancelled"] .tms-duel-next-step-card,
.tms-single-duel[data-lifecycle="voided"] .tms-duel-next-step-card {
    opacity: 0.6;
}

.tms-single-duel[data-lifecycle="completed"] .tms-duel-next-step-actions,
.tms-single-duel[data-lifecycle="cancelled"] .tms-duel-next-step-actions,
.tms-single-duel[data-lifecycle="voided"] .tms-duel-next-step-actions {
    display: none;
}


/* --- Enhanced stage card styling --- */
.tms-duel-stage-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    margin-bottom: 14px;
    transition: box-shadow 0.25s ease;
}

.tms-duel-stage-card[open] {
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.tms-duel-stage-card>summary {
    padding: 16px 22px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    list-style: none;
    user-select: none;
    border-radius: 22px;
    transition: background 0.2s ease;
}

.tms-duel-stage-card>summary:hover {
    background: #f8fafc;
}

.tms-duel-stage-card>summary::-webkit-details-marker {
    display: none;
}

.tms-duel-stage-card>summary::after {
    content: '';
    width: 10px;
    height: 10px;
    border-right: 2.5px solid #94a3b8;
    border-bottom: 2.5px solid #94a3b8;
    transform: rotate(45deg);
    transition: transform 0.25s ease;
    flex: none;
}

.tms-duel-stage-card[open]>summary::after {
    transform: rotate(-135deg);
}

.tms-duel-stage-summary-meta {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.tms-duel-stage-body {
    padding: 0 22px 22px;
}


/* --- Improved Responsive for Progress Bar --- */
@media (max-width: 640px) {
    .tms-duel-progress-bar {
        padding: 12px 14px;
        border-radius: 18px;
    }

    .tms-duel-progress-step {
        min-width: 50px;
    }

    .tms-duel-progress-dot {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .tms-duel-progress-connector {
        margin-top: 14px;
        min-width: 16px;
    }

    .tms-duel-progress-label {
        font-size: 9px;
        max-width: 56px;
    }

    .tms-duel-result-recap {
        flex-direction: column;
        padding: 16px;
        border-radius: 18px;
    }

    .tms-duel-result-recap-title {
        font-size: 20px;
    }

    .tms-duel-result-recap-score {
        font-size: 26px;
    }

    .tms-duel-result-recap-maps-head,
    .tms-duel-result-recap-maps-row {
        grid-template-columns: 60px 1fr 1fr;
        padding: 8px 10px;
        font-size: 12px;
    }

    .tms-duel-dispute-banner {
        flex-direction: column;
        padding: 14px;
        border-radius: 18px;
    }
}


/* ==========================================================================
   LOBBY STATUS GRID — Modern status indicators
   ========================================================================== */

.tms-duel-lobby-status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 6px;
}

.tms-duel-lobby-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.tms-duel-lobby-status-item.is-active {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.tms-duel-lobby-status-item.is-active.is-shared {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.tms-duel-lobby-status-item.is-active.is-ready {
    background: #f0fdf4;
    border-color: #86efac;
}

.tms-duel-lobby-status-item.is-active.is-live {
    background: #eff6ff;
    border-color: #93c5fd;
}

.tms-duel-lobby-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #cbd5e1;
    flex: none;
    transition: all 0.3s ease;
}

.tms-duel-lobby-status-item.is-active .tms-duel-lobby-status-dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.tms-duel-lobby-status-item.is-active.is-shared .tms-duel-lobby-status-dot {
    background: #d18700;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.tms-duel-lobby-status-item.is-active.is-live .tms-duel-lobby-status-dot {
    background: #e59e00;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    animation: tms-pulse-live 1.5s ease-in-out infinite;
}

@keyframes tms-pulse-live {

    0%,
    100% {
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.05);
    }
}

.tms-duel-lobby-status-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}

.tms-duel-lobby-status-item.is-active .tms-duel-lobby-status-label {
    color: #0f172a;
}


/* ==========================================================================
   MATCH TOOLS MODAL — Improved styling with badges
   ========================================================================== */

.tms-duel-tools-modal {
    max-width: 640px;
}

.tms-duel-tools-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.tms-duel-tools-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.tms-duel-tools-section-title {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}

.tms-duel-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tms-duel-tools-card {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.tms-duel-tools-card span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
}

.tms-duel-tools-card strong {
    display: block;
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
}

.tms-duel-tools-score {
    font-size: 22px !important;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.tms-duel-tools-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tms-duel-tools-side-card {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.tms-duel-tools-side-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}


/* Match tools button categorization by action type */
.tms-match-moderate {
    transition: all 0.2s ease;
    position: relative;
}

.tms-match-moderate[data-action="lock_match"],
.tms-match-moderate[data-action="unlock_match"] {
    border-color: #fde68a;
    background: #fefce8;
    color: #92400e;
}

.tms-match-moderate[data-action="lock_match"]:hover,
.tms-match-moderate[data-action="unlock_match"]:hover {
    background: #fef3c7;
}

.tms-match-moderate[data-action="mark_disputed"],
.tms-match-moderate[data-action="clear_dispute"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.tms-match-moderate[data-action="mark_disputed"]:hover,
.tms-match-moderate[data-action="clear_dispute"]:hover {
    background: #fee2e2;
}

.tms-match-moderate[data-action="reset_match"] {
    border-color: #fecaca;
    background: #fff;
    color: #dc2626;
}

.tms-match-moderate[data-action="reset_match"]:hover {
    background: #fef2f2;
}

.tms-match-moderate[data-action="set_winner"] {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.tms-match-moderate[data-action="set_winner"]:hover {
    background: #dcfce7;
}

.tms-match-moderate[data-action="resolve_current_map"] {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

.tms-match-moderate[data-action="resolve_current_map"]:hover {
    background: #dbeafe;
}

.tms-match-moderate[data-action="ban_user"],
.tms-match-moderate[data-action="ban_team"] {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.tms-match-moderate[data-action="ban_user"]:hover,
.tms-match-moderate[data-action="ban_team"]:hover {
    background: #fee2e2;
}

.tms-match-moderate[data-action="unban_user"],
.tms-match-moderate[data-action="unban_team"] {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.tms-match-moderate[data-action="unban_user"]:hover,
.tms-match-moderate[data-action="unban_team"]:hover {
    background: #dcfce7;
}

/* Processing state for moderation buttons */
.tms-match-moderate.processing {
    opacity: 0.6;
    pointer-events: none;
}

.tms-match-moderate.processing::after {
    content: '...';
    margin-left: 4px;
}


/* ==========================================================================
   LOBBY RESPONSIVE IMPROVEMENTS
   ========================================================================== */

@media (max-width: 900px) {
    .tms-duel-lobby-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .tms-duel-lobby-status-grid {
        grid-template-columns: 1fr;
    }

    .tms-duel-tools-grid {
        grid-template-columns: 1fr;
    }

    .tms-duel-tools-modal {
        max-width: 100%;
        margin: 12px;
    }
}

@media (max-width: 700px) {
    .tms-duel-admin-actions__header,
    .tms-duel-admin-actions__team,
    .tms-duel-admin-actions__player {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* TMS dark visual consistency for public tournament cards and shared dashboard fragments. */
.related-tournaments-container,
.tournament-grid,
.tms-related-tournament-card,
.tms-public-card-shell {
    --tms-bg: #0f1117;
    --tms-card-bg: #171a23;
    --tms-card-border: rgba(255,255,255,0.09);
    --tms-text: #f5f7fb;
    --tms-muted: #9ca3af;
    --tms-primary: #e59e00;
    --tms-success: #22c55e;
    --tms-warning: #f59e0b;
    --tms-danger: #ef4444;
    --tms-radius: 14px;
}

.related-tournaments-container,
.tms-related-tournament-card,
.tournament-grid,
.tms-public-card-shell {
    color-scheme: dark;
}

.tournament-filters-sidebar,
.tournament-item,
.tms-related-tournament-card,
.tms-public-card,
.tms-card-public,
.tms-tournament-card {
    background: #1b1c1e;
    border: 1px solid var(--tms-card-border) !important;
    color: var(--tms-text) !important;
    border-radius: var(--tms-radius) !important;
    box-shadow: 0 16px 40px rgba(0,0,0,0.28) !important;
}

.tournament-item:hover,
.tms-related-tournament-card:hover,
.tms-public-card:hover,
.tms-tournament-card:hover {
    border-color: rgba(229, 158, 0, 0.34) !important;
    box-shadow: 0 20px 56px rgba(0,0,0,0.34) !important;
}

.tournament-filter-form label,
.tournament-title,
.tournament-title a,
.meta-value,
.tms-related-tournament-card h1,
.tms-related-tournament-card h2,
.tms-related-tournament-card h3,
.tms-public-card h1,
.tms-public-card h2,
.tms-public-card h3 {
    color: var(--tms-text) !important;
}

.meta-label,
.tournament-meta,
.tms-public-card .tms-muted,
.tms-related-tournament-card .tms-muted {
    color: var(--tms-muted) !important;
}

.meta-item,
.tournament-pagination ul.page-numbers a,
.tournament-pagination ul.page-numbers span {
    border-color: rgba(255,255,255,0.10) !important;
}

.tournament-filter-form input[type="number"],
.tournament-filter-form input[type="text"],
.tournament-filter-form select,
.tms-public-card input,
.tms-public-card select,
.tms-public-card textarea,
.tms-related-tournament-card input,
.tms-related-tournament-card select,
.tms-related-tournament-card textarea {
    background: #111827 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: var(--tms-text) !important;
    border-radius: 12px !important;
}

.tournament-filter-form select option,
.tms-public-card select option,
.tms-related-tournament-card select option {
    background: #111827 !important;
    color: var(--tms-text) !important;
}

.filter-submit,
.tms-public-card .button,
.tms-related-tournament-card .button,
.tms-public-card button,
.tms-related-tournament-card button {
    background: var(--tms-btn-primary-gradient, linear-gradient(135deg, #7e7228, #e59e00)) !important;
    color: var(--tms-btn-primary-text, #0c0a06) !important;
    border: 1px solid rgba(255,255,255,0.16) !important;
    border-radius: 999px !important;
    text-decoration: none !important;
}

.filter-reset,
.tournament-pagination ul.page-numbers a,
.tournament-pagination ul.page-numbers span {
    background: #232938 !important;
    color: var(--tms-text) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 999px !important;
}

.filter-submit:hover,
.filter-reset:hover,
.tms-public-card .button:hover,
.tms-related-tournament-card .button:hover,
.tms-public-card button:hover,
.tms-related-tournament-card button:hover,
.tournament-pagination ul.page-numbers a:hover {
    background: linear-gradient(135deg, rgba(109,93,252,0.92), rgba(71,60,190,0.92)) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.22) !important;
    text-decoration: none !important;
}


.tms-form-intro
{
    display: none;
}

/* Floating tournament inbox (Duel / Normal / Pro details) */
.tms-tournament-inbox-float {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 99990;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.tms-tournament-inbox-toggle {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(145deg, rgba(35, 41, 56, 0.96), rgba(22, 26, 38, 0.98));
    color: #e8ecff;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.tms-tournament-inbox-toggle:hover {
    border-color: rgba(124, 108, 255, 0.55);
    color: #fff;
}
.tms-tournament-inbox-bell {
    font-size: 22px;
    line-height: 1;
}
.tms-tournament-inbox-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.tms-tournament-inbox-panel {
    position: absolute;
    right: 0;
    bottom: 60px;
    width: min(360px, calc(100vw - 40px));
    max-height: min(420px, 55vh);
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(18, 22, 32, 0.97);
    color: #e8ecff;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}
.tms-tournament-inbox-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-weight: 600;
    font-size: 14px;
}
.tms-tournament-inbox-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 10px;
}
.tms-tournament-inbox-clear-all {
    color: #fca5a5;
}
.tms-tournament-inbox-clear-all:hover {
    color: #fecaca;
}
.tms-tournament-inbox-clear-all:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
.tms-tournament-inbox-panel-body {
    padding: 8px 10px 12px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.45;
}
.tms-tournament-inbox-item {
    padding: 10px 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
}
.tms-tournament-inbox-item.is-read {
    opacity: 0.72;
}
.tms-tournament-inbox-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}
.tms-tournament-inbox-item-msg {
    color: rgba(232, 236, 255, 0.88);
    word-break: break-word;
}
.tms-tournament-inbox-item-mark {
    margin-top: 6px;
    padding: 0;
    background: none;
    border: 0;
    color: #a5b4fc;
    cursor: pointer;
    font-size: 12px;
}
.tms-tournament-inbox-close {
    font-size: 20px;
    line-height: 1;
    padding: 0 4px;
}
.tms-tournament-inbox-float .tms-txt-link {
    background: none;
    border: 0;
    color: #a5b4fc;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}
.tms-tournament-inbox-float .tms-txt-link:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* Tournament "Your next step" — dashboard colors + mobile layout             */
/* -------------------------------------------------------------------------- */

.tms-single .tms-next-step-above-tabs .tms-series-next-step {
    background: linear-gradient(145deg, var(--tms-card-bg-2, #202124) 0%, var(--tms-field-surface, #1b1c1e) 100%) !important;
    border: 1px solid var(--tms-card-border, rgba(255, 255, 255, 0.12)) !important;
    color: var(--tms-text-primary, #fafafa) !important;
    box-shadow: var(--tms-shadow, 0 8px 24px rgba(0, 0, 0, 0.35)) !important;
}

.tms-single .tms-next-step-above-tabs .tms-next-step-eyebrow,
.tms-single .tms-next-step-above-tabs .tms-duel-eyebrow {
    color: var(--tms-primary, #e59e00) !important;
}

.tms-single .tms-next-step-above-tabs .tms-next-step-title,
.tms-single .tms-next-step-above-tabs .tms-duel-card-title {
    color: var(--tms-text-primary, #fafafa) !important;
}

.tms-single .tms-next-step-above-tabs .tms-next-step-body-text {
    color: var(--tms-text-secondary, #a3a3a3) !important;
    margin-bottom: 0;
}

.tms-single .tms-next-step-above-tabs .tms-next-step-status {
    background: var(--tms-card-bg-3, #25262a) !important;
    color: var(--tms-text-secondary, #a3a3a3) !important;
    border-color: var(--tms-border, rgba(255, 255, 255, 0.12)) !important;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .tms-single .tms-next-step-above-tabs {
        margin-top: 12px;
        margin-bottom: 12px;
        padding: 0;
    }

    .tms-single .tms-next-step-above-tabs .tms-series-next-step {
        padding: 14px !important;
        gap: 12px;
        border-radius: 14px;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-header {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        align-items: start;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-header__copy {
        min-width: 0;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-status {
        justify-self: start;
        white-space: normal;
        text-align: left;
        line-height: 1.35;
        max-width: 100%;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-title,
    .tms-single .tms-next-step-above-tabs .tms-duel-card-title {
        font-size: 18px !important;
        line-height: 1.3 !important;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-body-text {
        font-size: 14px;
        line-height: 1.55;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-section {
        min-width: 0;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-chip-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-chip {
        display: block;
        width: 100%;
        max-width: none;
        border-radius: 10px;
        box-sizing: border-box;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-actions,
    .tms-single .tms-next-step-above-tabs .tms-bracket-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        align-items: stretch;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-actions .tms-mini-btn,
    .tms-single .tms-next-step-above-tabs .tms-bracket-actions .tms-mini-btn {
        width: 100% !important;
        max-width: none !important;
        min-height: 44px;
        margin: 0 !important;
    }

    .tms-single .tms-next-step-above-tabs .tms-map-ladder-carousel-bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .tms-single .tms-next-step-above-tabs .tms-map-ladder-viewport {
        order: 1;
        width: 100%;
        min-width: 0;
    }

    .tms-single .tms-next-step-above-tabs .tms-map-ladder-nav {
        flex: none;
        width: 100%;
        min-width: 0;
        height: 42px;
        order: 2;
    }

    .tms-single .tms-next-step-above-tabs .tms-map-ladder-nav--next {
        order: 3;
    }

    .tms-single .tms-next-step-above-tabs .tms-map-ladder__row-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .tms-single .tms-next-step-above-tabs .tms-map-ladder__inputs {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        align-items: stretch;
    }

    .tms-single .tms-next-step-above-tabs .tms-map-ladder__inp {
        width: 100%;
    }

    .tms-single .tms-next-step-above-tabs .tms-map-ladder__inp input {
        width: 100% !important;
        min-height: 42px;
        font-size: 16px;
    }

    .tms-single .tms-next-step-above-tabs .tms-map-ladder__inputs .tms-mini-btn,
    .tms-single .tms-next-step-above-tabs .tms-map-ladder__slide-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        width: 100%;
    }

    .tms-single .tms-next-step-above-tabs .tms-map-ladder__slide-actions .tms-mini-btn {
        width: 100% !important;
        min-height: 44px;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-chats .tms-chat-summary-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .tms-single .tms-next-step-above-tabs .tms-chat-thread-pill {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-dispute-box,
    .tms-single .tms-next-step-above-tabs .tms-next-step-blocker-list {
        min-width: 0;
    }

    .tms-single .tms-next-step-above-tabs .tms-next-step-countdown {
        overflow-wrap: anywhere;
    }
}

/* -------------------------------------------------------------------------- */
/* Duel tournament details — mobile layout                                    */
/* -------------------------------------------------------------------------- */

.tms-single-duel {
    overflow-x: clip;
}

@media (max-width: 900px) {
    .tms-single-duel {
        margin-top: 16px;
        padding: 0 12px 80px;
        box-sizing: border-box;
    }

    .tms-single-duel .tms-hero-main {
        min-width: 0;
    }

    .tms-single-duel .tms-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .tms-single-duel .tms-duel-badges {
        gap: 6px;
    }

    .tms-single-duel .tms-duel-badge {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .tms-single-duel .tms-tabs {
        position: sticky;
        top: 0;
        z-index: 40;
        margin-left: -12px;
        margin-right: -12px;
        padding: 8px 12px 10px;
        background: linear-gradient(180deg, var(--tms-page-bg, rgb(26 26 26)) 72%, rgba(26, 26, 26, 0));
    }

    .tms-single-duel .tms-tabs .tms-tab,
    .tms-single-duel .tms-tabs button.tms-tab {
        min-height: 44px;
    }

    .tms-single-duel .tms-duel-progress-bar {
        padding: 12px 14px;
        margin-bottom: 14px;
        border-radius: 16px;
    }

    .tms-single-duel .tms-duel-showcase {
        gap: 14px;
        margin-bottom: 16px;
    }

    .tms-single-duel #tms-duel-next-step.tms-duel-next-step-card,
    .tms-single-duel .tms-duel-next-step-card {
        padding: 16px;
        border-radius: 16px;
        gap: 12px;
    }

    .tms-single-duel .tms-duel-next-step-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tms-single-duel .tms-duel-next-step-head > div {
        min-width: 0;
        width: 100%;
    }

    .tms-single-duel .tms-duel-next-step-title {
        font-size: 22px;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .tms-single-duel .tms-duel-next-step-head .tms-muted {
        width: auto;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .tms-single-duel .tms-duel-next-step-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .tms-single-duel .tms-duel-next-step-actions .tms-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        box-sizing: border-box;
    }

    .tms-single-duel .tms-duel-next-step-dual-cta {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        width: 100%;
    }

    .tms-single-duel .tms-duel-next-step-dual-cta .tms-btn,
    .tms-single-duel .tms-duel-next-step-dual-cta .tms-mini-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
    }

    .tms-single-duel .tms-duel-next-step-score-versus {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .tms-single-duel .tms-duel-score-pill {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        justify-content: space-between;
    }

    .tms-single-duel .tms-duel-next-step-chats .tms-chat-summary-row,
    .tms-single-duel #tms-duel-next-step .tms-chat-summary-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .tms-single-duel .tms-duel-next-step-chats .tms-chat-thread-pill,
    .tms-single-duel #tms-duel-next-step .tms-chat-thread-pill {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }

    .tms-single-duel .tms-duel-match-card,
    .tms-single-duel .tms-duel-stage-card {
        border-radius: 16px;
    }

    .tms-single-duel .tms-duel-match-card {
        padding: 16px;
    }

    .tms-single-duel .tms-duel-match-card-title {
        font-size: 22px;
        line-height: 1.2;
    }

    .tms-single-duel .tms-duel-money-strip {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        width: 100%;
    }

    .tms-single-duel .tms-duel-money-pill {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .tms-single-duel .tms-duel-side-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .tms-single-duel .tms-duel-side-head-badges {
        gap: 6px;
        justify-content: flex-start;
        width: 100%;
    }

    .tms-single-duel .tms-duel-side-name {
        font-size: 18px;
        overflow-wrap: anywhere;
    }

    .tms-single-duel .tms-duel-series-history-actions {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        justify-content: stretch;
    }

    .tms-single-duel .tms-duel-series-history-actions .tms-mini-btn {
        width: 100%;
        justify-content: center;
        min-height: 40px;
        box-sizing: border-box;
    }

    .tms-single-duel .tms-duel-primary-actions {
        display: grid;
        gap: 8px;
    }

    .tms-single-duel .tms-duel-primary-actions .tms-btn,
    .tms-single-duel .tms-duel-primary-actions .tms-mini-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        box-sizing: border-box;
    }

    .tms-single-duel .tms-duel-stage-card > summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 14px 16px;
    }

    .tms-single-duel .tms-duel-stage-summary-meta {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .tms-single-duel .tms-duel-stage-body {
        padding: 12px 14px 16px;
    }

    .tms-single-duel .tms-duel-dispute-banner {
        padding: 14px 16px;
    }

    .tms-single-duel .tms-duel-dispute-banner-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .tms-single-duel .tms-duel-dispute-banner-actions .tms-btn,
    .tms-single-duel .tms-duel-dispute-banner-actions .tms-mini-btn {
        width: 100%;
        justify-content: center;
    }

    .tms-single-duel [data-panel="info"] .tms-panel-grid-duel-info {
        grid-template-columns: 1fr;
    }

    .tms-single-duel .tms-kv li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .tms-single-duel .tms-kv li span:last-child {
        text-align: left;
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .tms-single-duel {
        padding: 0 10px calc(88px + env(safe-area-inset-bottom, 0px));
    }

    .tms-single-duel .tms-hero {
        border-radius: 10px;
        min-height: 0;
    }

    .tms-single-duel .tms-hero-inner {
        padding: 14px;
        gap: 14px;
    }

    .tms-single-duel .tms-hero-stats {
        grid-template-columns: 1fr;
    }

    .tms-single-duel .tms-stat {
        min-height: 48px;
        padding: 8px 10px;
    }

    .tms-single-duel .tms-stat-value {
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .tms-single-duel .tms-hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tms-single-duel .tms-hero-actions .tms-btn {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        box-sizing: border-box;
    }

    .tms-single-duel .tms-hero-actions .tms-notice,
    .tms-single-duel .tms-hero-actions .tms-private-hint {
        width: 100%;
    }

    .tms-single-duel .tms-duel-next-step-title {
        font-size: 20px;
    }

    .tms-single-duel .tms-duel-showcase-player-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .tms-single-duel .tms-duel-showcase-player-head {
        flex-wrap: wrap;
        gap: 6px;
    }

    .tms-single-duel .tms-duel-map-compare {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .tms-single-duel .tms-duel-series-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Tournament details — dashboard theme (Normal / Pro / Duel)
   Matches gamer console: dark surfaces + gold primary accents.
   ========================================================================== */

:is(.tms-single, .tms-single-duel) {
    --tms-single-surface: var(--tms-field-surface, #1b1c1e);
    --tms-single-surface-2: var(--tms-card-bg-2, #202124);
    --tms-single-surface-3: var(--tms-card-bg-3, #25262a);
    --tms-single-border: var(--tms-card-border, rgba(255, 255, 255, 0.12));
    --tms-single-text: var(--tms-text-primary, #fafafa);
    --tms-single-muted: var(--tms-text-secondary, #a3a3a3);
    --tms-single-accent: var(--tms-primary, #e59e00);
    --tms-single-accent-soft: var(--tms-primary-soft, rgba(229, 158, 0, 0.16));
    color: var(--tms-single-text);
    color-scheme: dark;
    background:
        radial-gradient(circle at 10% 2%, rgba(229, 158, 0, 0.08), transparent 28rem),
        radial-gradient(circle at 92% 4%, rgba(229, 158, 0, 0.05), transparent 26rem),
        var(--tms-page-bg, rgb(26 26 26));
    border-radius: 0;
    box-sizing: border-box;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: max(16px, calc(50vw - 600px));
    padding-right: max(16px, calc(50vw - 600px));
}

:is(.tms-single, .tms-single-duel) .tms-stat {
    border-color: rgba(229, 158, 0, 0.45);
}

:is(.tms-single, .tms-single-duel) .tms-btn-primary:not(.is-enrolled) {
    background: var(--tms-btn-primary-gradient, linear-gradient(135deg, #7e7228, #e59e00));
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--tms-btn-primary-text, #0c0a06);
}

:is(.tms-single, .tms-single-duel) .tms-btn-primary:not(.is-enrolled):hover {
    filter: brightness(1.08);
}

:is(.tms-single, .tms-single-duel) .tms-tabs .tms-tab,
:is(.tms-single, .tms-single-duel) .tms-tabs button.tms-tab {
    background: var(--tms-single-surface);
    border-color: var(--tms-single-border);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-tabs .tms-tab.is-active,
:is(.tms-single, .tms-single-duel) .tms-tabs button.tms-tab.is-active {
    background: var(--tms-single-accent-soft);
    border-color: rgba(229, 158, 0, 0.45);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-card,
:is(.tms-single, .tms-single-duel) .tms-admin-card,
:is(.tms-single, .tms-single-duel) .tms-duel-match-card,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-card,
:is(.tms-single, .tms-single-duel) .tms-duel-timeline-card,
:is(.tms-single, .tms-single-duel) .tms-duel-next-step-card,
:is(.tms-single, .tms-single-duel) .tms-duel-stage-card,
:is(.tms-single, .tms-single-duel) .tms-duel-progress-bar {
    background: var(--tms-single-surface);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
    box-shadow: var(--tms-shadow, 0 8px 24px rgba(0, 0, 0, 0.35));
}

:is(.tms-single, .tms-single-duel) .tms-duel-next-step-card {
    border-color: rgba(229, 158, 0, 0.28);
    box-shadow: var(--tms-shadow-md, 0 12px 32px rgba(0, 0, 0, 0.4));
}

:is(.tms-single, .tms-single-duel) .tms-card-title,
:is(.tms-single, .tms-single-duel) .tms-duel-next-step-title,
:is(.tms-single, .tms-single-duel) .tms-duel-match-card-title,
:is(.tms-single, .tms-single-duel) .tms-team-name {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-card-subtitle {
    border-top-color: var(--tms-single-border);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-kv li {
    border-bottom-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-kv li span:first-child {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-kv li span:last-child {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-empty {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-richtext {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-prize-card {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-results-filter,
:is(.tms-single, .tms-single-duel) .tms-results-toolbar input[type="search"],
:is(.tms-single, .tms-single-duel) .tms-teams-toolbar input[type="search"] {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-results-table th,
:is(.tms-single, .tms-single-duel) .tms-results-table td {
    border-bottom-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-results-table th {
    background: var(--tms-single-surface-2);
}

:is(.tms-single, .tms-single-duel) .tms-results-table tr.tms-team-row--mine td {
    background: rgba(229, 158, 0, 0.1);
}

:is(.tms-single, .tms-single-duel) .tms-mini-btn {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-mini-btn:hover {
    border-color: rgba(229, 158, 0, 0.35);
    background: var(--tms-single-surface-3);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step {
    background: linear-gradient(145deg, var(--tms-single-surface-2) 0%, var(--tms-single-surface) 100%);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
    box-shadow: var(--tms-shadow, 0 8px 24px rgba(0, 0, 0, 0.35));
}

:is(.tms-single, .tms-single-duel) .tms-next-step-eyebrow,
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-duel-eyebrow,
:is(.tms-single, .tms-single-duel) .tms-duel-eyebrow {
    color: var(--tms-single-accent);
}

:is(.tms-single, .tms-single-duel) .tms-next-step-title,
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-duel-card-title {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-next-step-body-text,
:is(.tms-single, .tms-single-duel) .tms-next-step-meta-label {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-next-step-countdown {
    color: var(--tms-single-accent);
}

:is(.tms-single, .tms-single-duel) .tms-next-step-status {
    background: var(--tms-single-surface-3);
    border-color: var(--tms-single-border);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-next-step-chip {
    border-color: rgba(229, 158, 0, 0.28);
    background: var(--tms-single-accent-soft);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-next-step-chip-grid-muted .tms-next-step-chip {
    border-color: var(--tms-single-border);
    background: var(--tms-single-surface-3);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-next-step-dispute-box,
:is(.tms-single, .tms-single-duel) .tms-next-step-blocker-list {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.08);
}

:is(.tms-single, .tms-single-duel) .tms-next-step-dispute-line,
:is(.tms-single, .tms-single-duel) .tms-next-step-blocker-item {
    color: #fecaca;
}

:is(.tms-single, .tms-single-duel) .tms-next-step-actions {
    border-top-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step[data-status="submit_required"] {
    border-color: rgba(34, 197, 94, 0.45);
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.12) 0%, var(--tms-single-surface) 100%);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step[data-status="disputed"] {
    border-color: rgba(239, 68, 68, 0.45);
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.1) 0%, var(--tms-single-surface) 100%);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="submit_score"],
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="confirm_score"],
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="join_team"],
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="create_team"],
:is(.tms-single, .tms-single-duel) .tms-duel-next-step-actions .tms-btn {
    background: var(--tms-btn-primary-gradient, linear-gradient(135deg, #7e7228, #e59e00));
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--tms-btn-primary-text, #0c0a06);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-map-ladder__row {
    border-color: var(--tms-single-border);
    background: var(--tms-single-surface-2);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-map-ladder__pending-note,
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-map-ladder__opp-note,
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-map-ladder__badge,
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-map-ladder__inp {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-map-ladder__scoreline {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-map-ladder-nav {
    border-color: var(--tms-single-border);
    background: var(--tms-single-surface-3);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-map-ladder-nav:hover {
    background: var(--tms-single-surface-2);
    border-color: rgba(229, 158, 0, 0.35);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-map-ladder-dot {
    background: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-map-ladder-dot.is-active {
    background: var(--tms-single-accent);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-map-ladder__inp input {
    border-color: #e59e00;
    border-style: solid;
    border-width: 2px;
    background: var(--tms-single-surface);
    color: var(--tms-single-text);
    animation: blinkBorder 1s infinite;
}

/* Define the blinking effect */
@keyframes blinkBorder {
    0%, 100% {
        border-color: #e59e00; /* Original color */
    }
    50% {
        border-color: transparent; /* Blinks out (or use a dimmer color) */
    }
}




:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-chat-thread-pill,
:is(.tms-single, .tms-single-duel) .tms-duel-next-step-card .tms-chat-thread-pill {
    border-color: var(--tms-single-border);
    background: var(--tms-single-surface-2);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-chat-thread-pill:hover,
:is(.tms-single, .tms-single-duel) .tms-duel-next-step-card .tms-chat-thread-pill:hover {
    border-color: rgba(229, 158, 0, 0.35);
    background: var(--tms-single-surface-3);
}

:is(.tms-single, .tms-single-duel) .tms-duel-next-step-score-preview-panel {
    background: linear-gradient(145deg, var(--tms-single-surface-2) 0%, var(--tms-single-surface) 100%);
    border-color: var(--tms-single-border);
    box-shadow: none;
}

:is(.tms-single, .tms-single-duel) .tms-duel-next-step-score-preview-eyebrow,
:is(.tms-single, .tms-single-duel) .tms-duel-next-step-score-preview .tms-duel-next-step-map {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-duel-progress-label {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-duel-progress-step.is-current .tms-duel-progress-label {
    color: var(--tms-single-accent);
}

:is(.tms-single, .tms-single-duel) .tms-admin-card {
    border-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-admin-name {
    color: var(--tms-single-text);
}

/* —— Brackets, teams, groups —— */
:is(.tms-single, .tms-single-duel) .tms-bracket-round,
:is(.tms-single, .tms-single-duel) .tms-bracket-duel .tms-bracket-round {
    background: var(--tms-single-surface);
    border-color: var(--tms-single-border);
    box-shadow: var(--tms-shadow, 0 8px 24px rgba(0, 0, 0, 0.35));
}

:is(.tms-single, .tms-single-duel) .tms-bracket-round-title {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-bracket-round-gate-meta {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-bracket-match,
:is(.tms-single, .tms-single-duel) .tms-bracket-duel .tms-bracket-match {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-bracket-team {
    background: var(--tms-single-surface);
    border-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-bracket-team.is-winner {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
}

:is(.tms-single, .tms-single-duel) .tms-bracket-team.is-banned {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
}

:is(.tms-single, .tms-single-duel) .tms-bracket-team.tms-my-slot-highlight {
    background: var(--tms-single-accent-soft);
    outline-color: var(--tms-single-accent);
    box-shadow: 0 0 0 3px rgba(229, 158, 0, 0.2);
}

:is(.tms-single, .tms-single-duel) .tms-bracket-team-name {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-bracket-team-sub,
:is(.tms-single, .tms-single-duel) .tms-bracket-meta {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-bracket-status-badge {
    background: var(--tms-single-surface-3);
    border-color: var(--tms-single-border);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-bracket-status-badge.is-live {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.35);
    color: #86efac;
}

:is(.tms-single, .tms-single-duel) .tms-bracket-status-badge.is-disputed {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

:is(.tms-single, .tms-single-duel) .tms-bracket-status-badge.is-completed {
    background: rgba(229, 158, 0, 0.14);
    border-color: rgba(229, 158, 0, 0.35);
    color: #fcd34d;
}

:is(.tms-single, .tms-single-duel) .tms-team-card,
:is(.tms-single, .tms-single-duel) .tms-group,
:is(.tms-single, .tms-single-duel) .tms-sponsor-item {
    background: var(--tms-single-surface);
    border-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-group-members li {
    background: var(--tms-single-surface-2);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-group-title {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-invite-input,
:is(.tms-single, .tms-single-duel) .tms-invite-row {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-login-gate {
    background: var(--tms-single-surface);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-login-gate p {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-bracket-actions .tms-mini-btn {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-bracket-actions .tms-mini-btn:hover {
    background: var(--tms-single-surface-3);
    border-color: rgba(229, 158, 0, 0.35);
}

/* —— Modals (inside tournament page markup) —— */
:is(.tms-single, .tms-single-duel) .tms-modal {
    background: var(--tms-single-surface);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
    box-shadow: var(--tms-shadow-lg, 0 18px 48px rgba(0, 0, 0, 0.45));
}

:is(.tms-single, .tms-single-duel) .tms-modal-title,
:is(.tms-single, .tms-single-duel) .tms-modal-player .tms-modal-label,
:is(.tms-single, .tms-single-duel) .tms-team-detail__name,
:is(.tms-single, .tms-single-duel) .tms-team-detail__meta strong,
:is(.tms-single, .tms-single-duel) .tms-team-detail-player__role,
:is(.tms-single, .tms-single-duel) .tms-team-detail-field dd,
:is(.tms-single, .tms-single-duel) .tms-duel-tools-section-title,
:is(.tms-single, .tms-single-duel) .tms-duel-tools-card strong {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-modal-label,
:is(.tms-single, .tms-single-duel) .tms-modal-hint,
:is(.tms-single, .tms-single-duel) .tms-team-detail__eyebrow,
:is(.tms-single, .tms-single-duel) .tms-team-detail__meta,
:is(.tms-single, .tms-single-duel) .tms-team-detail__section-title,
:is(.tms-single, .tms-single-duel) .tms-team-detail-field dt,
:is(.tms-single, .tms-single-duel) .tms-duel-tools-card span {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-modal-input,
:is(.tms-single, .tms-single-duel) .tms-modal-player {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-modal-input[readonly] {
    background: var(--tms-single-surface-3);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-modal-hint,
:is(.tms-single, .tms-single-duel) .tms-team-detail-player,
:is(.tms-single, .tms-single-duel) .tms-team-detail-player--empty {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-team-detail-player--captain {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.28);
}

:is(.tms-single, .tms-single-duel) .tms-team-detail__header {
    border-bottom-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-team-detail-player__stream {
    border-top-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-duel-tools-section {
    border-bottom-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-duel-tools-card,
:is(.tms-single, .tms-single-duel) .tms-duel-tools-side-card {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
}

/* —— Duel matchup & lobby —— */
:is(.tms-single, .tms-single-duel) .tms-duel-money-pill,
:is(.tms-single, .tms-single-duel) .tms-duel-side-card,
:is(.tms-single, .tms-single-duel) .tms-duel-side-progress div,
:is(.tms-single, .tms-single-duel) .tms-duel-side-roster li,
:is(.tms-single, .tms-single-duel) .tms-duel-showcase-player,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-input,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-note,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-empty,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-locked,
:is(.tms-single, .tms-single-duel) .tms-duel-ready-current,
:is(.tms-single, .tms-single-duel) .tms-duel-ready-side,
:is(.tms-single, .tms-single-duel) .tms-duel-series-static,
:is(.tms-single, .tms-single-duel) .tms-duel-staff-side,
:is(.tms-single, .tms-single-duel) .tms-duel-team-manage-panel,
:is(.tms-single, .tms-single-duel) .tms-duel-team-manage-section,
:is(.tms-single, .tms-single-duel) .tms-duel-series-dashboard,
:is(.tms-single, .tms-single-duel) .tms-duel-series-summary-card,
:is(.tms-single, .tms-single-duel) .tms-duel-series-history-row,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-status-item {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-duel-lobby-empty.is-shared {
    background: linear-gradient(180deg, rgba(229, 158, 0, 0.1) 0%, var(--tms-single-surface-2) 100%);
    border-color: rgba(229, 158, 0, 0.28);
}

:is(.tms-single, .tms-single-duel) .tms-duel-lobby-locked {
    background: var(--tms-single-surface);
    border-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) #tms-duel-lobby-stage .tms-duel-stage-body,
:is(.tms-single, .tms-single-duel) #tms-duel-match-center .tms-duel-stage-body {
    background: var(--tms-single-surface);
}

:is(.tms-single, .tms-single-duel) .tms-duel-stage-card[open] > summary {
    border-bottom-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-duel-stage-card > summary:hover {
    background: var(--tms-single-surface-2);
}

:is(.tms-single, .tms-single-duel) .tms-duel-stage-summary-meta {
    background: var(--tms-single-surface-3);
    border-color: var(--tms-single-border);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-duel-side-card.is-current {
    border-color: rgba(229, 158, 0, 0.45);
    box-shadow: inset 0 0 0 1px rgba(229, 158, 0, 0.25);
}

:is(.tms-single, .tms-single-duel) .tms-duel-side-name,
:is(.tms-single, .tms-single-duel) .tms-duel-money-pill strong,
:is(.tms-single, .tms-single-duel) .tms-duel-side-progress strong,
:is(.tms-single, .tms-single-duel) .tms-duel-showcase-player-name,
:is(.tms-single, .tms-single-duel) .tms-duel-series-dashboard-title,
:is(.tms-single, .tms-single-duel) .tms-duel-series-summary-card strong,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-locked-title,
:is(.tms-single, .tms-single-duel) .tms-duel-ready-current-title,
:is(.tms-single, .tms-single-duel) .tms-duel-ready-side-head strong,
:is(.tms-single, .tms-single-duel) .tms-duel-team-manage-title {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-duel-money-pill span,
:is(.tms-single, .tms-single-duel) .tms-duel-side-progress span,
:is(.tms-single, .tms-single-duel) .tms-duel-series-dashboard-sub,
:is(.tms-single, .tms-single-duel) .tms-duel-series-summary-card span,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-note,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-locked p,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-empty p,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-status-label {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-duel-lobby-status-item.is-active .tms-duel-lobby-status-label {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-duel-summary-chip {
    background: var(--tms-single-surface-3);
    border-color: var(--tms-single-border);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-duel-score-pill.tms-you,
:is(.tms-single, .tms-single-duel) .tms-duel-score-pill.tms-them {
    background: var(--tms-single-surface-2);
}

:is(.tms-single, .tms-single-duel) .tms-duel-score-pill.tms-you {
    border-color: rgba(229, 158, 0, 0.45);
    color: #fcd34d;
}

:is(.tms-single, .tms-single-duel) .tms-duel-score-pill.tms-them {
    border-color: var(--tms-single-border);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-duel-series-row.is-readonly {
    background: var(--tms-single-surface);
}

:is(.tms-single, .tms-single-duel) .tms-duel-series-history-row.is-confirmed {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.35);
}

:is(.tms-single, .tms-single-duel) .tms-duel-series-history-row.is-awaiting_opponent_map_submission {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.35);
}

:is(.tms-single, .tms-single-duel) .tms-duel-series-history-row.is-map_disputed {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.35);
}

:is(.tms-single, .tms-single-duel) .tms-duel-series-history-row.is-active {
    background: rgba(229, 158, 0, 0.1);
    border-color: rgba(229, 158, 0, 0.35);
}

:is(.tms-single, .tms-single-duel) .tms-duel-result-recap {
    background: var(--tms-single-surface);
    border-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-duel-result-recap.is-completed {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12) 0%, var(--tms-single-surface) 100%);
    border-color: rgba(34, 197, 94, 0.35);
}

:is(.tms-single, .tms-single-duel) .tms-duel-result-recap.is-terminal {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, var(--tms-single-surface) 100%);
    border-color: rgba(239, 68, 68, 0.35);
}

:is(.tms-single, .tms-single-duel) .tms-duel-result-recap-title,
:is(.tms-single, .tms-single-duel) .tms-duel-result-recap-maps-row {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-duel-result-recap-maps-head {
    background: var(--tms-single-surface-2);
    color: var(--tms-single-muted);
    border-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-duel-result-recap-maps {
    border-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-duel-result-recap-maps-row {
    border-top-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-duel-dispute-banner.is-dispute {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, var(--tms-single-surface) 100%);
    border-color: rgba(239, 68, 68, 0.4);
}

:is(.tms-single, .tms-single-duel) .tms-duel-dispute-banner.is-review {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, var(--tms-single-surface) 100%);
    border-color: rgba(245, 158, 11, 0.4);
}

:is(.tms-single, .tms-single-duel) .tms-duel-dispute-banner-title {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-duel-dispute-banner-text {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-duel-submit-loss,
:is(.tms-single, .tms-single-duel) .tms-duel-primary-actions .tms-btn-ghost {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-duel-submit-loss:hover,
:is(.tms-single, .tms-single-duel) .tms-duel-primary-actions .tms-btn-ghost:hover {
    background: var(--tms-single-surface-3);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-duel-live-btn {
    background: var(--tms-single-accent-soft);
    border-color: rgba(229, 158, 0, 0.35);
    color: var(--tms-single-accent);
}

:is(.tms-single, .tms-single-duel) .tms-duel-live-btn:hover {
    background: rgba(229, 158, 0, 0.22);
    color: #fcd34d;
}

:is(.tms-single, .tms-single-duel) .tms-duel-lobby-action.is-team {
    background: var(--tms-single-surface-3);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-duel-staff-panel summary {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-duel-staff-side-title {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-toast {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-bracket-badge {
    background: var(--tms-single-accent-soft);
    border-color: rgba(229, 158, 0, 0.28);
    color: #fcd34d;
}

:is(.tms-single, .tms-single-duel) .tms-score-chip {
    background: var(--tms-single-surface-2);
    border-color: var(--tms-single-border);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-score-chip:hover {
    background: var(--tms-single-surface-3);
    filter: none;
}

:is(.tms-single, .tms-single-duel) .tms-score-chip.is-selected {
    background: var(--tms-btn-primary-gradient, linear-gradient(135deg, #7e7228, #e59e00));
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--tms-btn-primary-text, #0c0a06);
}

:is(.tms-single, .tms-single-duel) .tms-score-chip.is-selected:hover {
    filter: brightness(1.08);
    background: var(--tms-btn-primary-gradient, linear-gradient(135deg, #7e7228, #e59e00));
}

:is(.tms-single, .tms-single-duel) .tms-chat-summary-skeleton,
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-chat-summary-skeleton {
    background: linear-gradient(90deg, #2a2b2e 25%, #3a3b3f 50%, #2a2b2e 75%);
    background-size: 200% 100%;
}

:is(.tms-single, .tms-single-duel) .tms-pro-round-tabs .tms-tab,
:is(.tms-single, .tms-single-duel) .tms-pro-round-tabs button.tms-tab {
    background: var(--tms-single-surface);
    border-color: var(--tms-single-border);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-pro-round-tabs .tms-tab.is-active,
:is(.tms-single, .tms-single-duel) .tms-pro-round-tabs button.tms-tab.is-active {
    background: var(--tms-single-accent-soft);
    border-color: rgba(229, 158, 0, 0.45);
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-modal-actions {
    border-top-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-score-sub {
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-team-detail__empty {
    background: var(--tms-single-surface-2);
    color: var(--tms-single-muted);
}

:is(.tms-single, .tms-single-duel) .tms-team-detail__actions,
:is(.tms-single, .tms-single-duel) .tms-team-detail-player__actions {
    border-top-color: var(--tms-single-border);
}

:is(.tms-single, .tms-single-duel) .tms-team-detail-stream-link {
    background: #dc3545;
   
}

:is(.tms-single, .tms-single-duel) .tms-bracket-team {
    border-bottom-color: var(--tms-single-border);
}

/* Theme / Elementor column behind the tournament block */
.elementor-widget-shortcode:has(> .tms-single),
.elementor-widget-shortcode:has(> .tms-single-duel),
.elementor-element:has(.tms-single),
.elementor-element:has(.tms-single-duel) {
    background: var(--tms-page-bg, rgb(26 26 26));
}

@media (max-width: 768px) {
    :is(.tms-single-duel) .tms-duel-mobile-bar {
        background: rgba(27, 28, 30, 0.96);
        border-top-color: var(--tms-single-border);
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
    }
}

/* -------------------------------------------------------------------------- */
/* Tournament details — legible text on #1b1c1e (override legacy dark colors) */
/* -------------------------------------------------------------------------- */

:is(.tms-single, .tms-single-duel) [class*="tms-"] {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-panel :where(
    p, li, ol, ul, h1, h2, h3, h4, h5, h6,
    blockquote, td, th, caption, label, figcaption
) {
    color: var(--tms-single-text);
}

:is(.tms-single, .tms-single-duel) .tms-panel a,
:is(.tms-single, .tms-single-duel) .tms-richtext a {
    color: var(--tms-single-accent);
}

:is(.tms-single, .tms-single-duel) .tms-muted,
:is(.tms-single, .tms-single-duel) .tms-kv li span:first-child,
:is(.tms-single, .tms-single-duel) .tms-bracket-round-gate-meta,
:is(.tms-single, .tms-single-duel) .tms-bracket-meta,
:is(.tms-single, .tms-single-duel) .tms-bracket-team-sub,
:is(.tms-single, .tms-single-duel) .tms-modal-label,
:is(.tms-single, .tms-single-duel) .tms-modal-hint,
:is(.tms-single, .tms-single-duel) .tms-score-sub,
:is(.tms-single, .tms-single-duel) .tms-next-step-body-text,
:is(.tms-single, .tms-single-duel) .tms-next-step-meta-label,
:is(.tms-single, .tms-single-duel) .tms-duel-money-pill span,
:is(.tms-single, .tms-single-duel) .tms-duel-side-progress span,
:is(.tms-single, .tms-single-duel) .tms-duel-series-dashboard-sub,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-note,
:is(.tms-single, .tms-single-duel) .tms-duel-dispute-banner-text,
:is(.tms-single, .tms-single-duel) .tms-team-detail__eyebrow,
:is(.tms-single, .tms-single-duel) .tms-team-detail__meta,
:is(.tms-single, .tms-single-duel) .tms-team-detail-field dt {
    color: #e59e00 !important;
}

/* Hero — keep light text on cover image */
:is(.tms-single, .tms-single-duel) .tms-hero,
:is(.tms-single, .tms-single-duel) .tms-hero [class*="tms-"] {
    color: #fff;
}

:is(.tms-single, .tms-single-duel) .tms-hero .tms-hero-subtitle,
:is(.tms-single, .tms-single-duel) .tms-hero .tms-hero-subtitle a {
    color: rgba(255, 255, 255, 0.82);
}

:is(.tms-single, .tms-single-duel) .tms-hero .tms-hero-subtitle a {
    border-bottom-color: rgba(255, 255, 255, 0.25);
}

:is(.tms-single, .tms-single-duel) .tms-hero .tms-stat-label {
    color: rgba(255, 255, 255, 0.72);
}

:is(.tms-single, .tms-single-duel) .tms-hero .tms-stat-value {
    color: #fff;
}

/* Gold primary buttons — dark label on gradient */
:is(.tms-single, .tms-single-duel) .tms-btn-primary:not(.is-enrolled),
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="submit_score"],
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="confirm_score"],
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="join_team"],
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-bracket-actions .tms-mini-btn[data-next-step-action="create_team"],
:is(.tms-single, .tms-single-duel) .tms-duel-next-step-actions .tms-btn,
:is(.tms-single, .tms-single-duel) .tms-score-chip.is-selected,
:is(.tms-single, .tms-single-duel) .tms-duel-lobby-action.is-live {
    color: var(--tms-btn-primary-text, #0c0a06) !important;
}

:is(.tms-single, .tms-single-duel) .tms-btn-primary.is-enrolled {
    color: #fff !important;
}

:is(.tms-single, .tms-single-duel) .tms-mini-btn.tms-mini-btn-danger,
:is(.tms-single, .tms-single-duel) .tms-mini-btn--danger {
    color: #fecaca !important;
}

:is(.tms-single, .tms-single-duel) .tms-mini-btn--success {
    color: #bbf7d0 !important;
}

:is(.tms-single, .tms-single-duel) .tms-toast {
    color: var(--tms-single-text) !important;
}

/* Status / state chips — keep semantic hues */
:is(.tms-single, .tms-single-duel) .tms-results-status.is-pending {
    color: #cbd5e1 !important;
}

:is(.tms-single, .tms-single-duel) .tms-results-status.is-live {
    color: #86efac !important;
}

:is(.tms-single, .tms-single-duel) .tms-results-status.is-disputed {
    color: #fcd34d !important;
}

:is(.tms-single, .tms-single-duel) .tms-results-status.is-completed {
    color: #fcd34d !important;
}

:is(.tms-single, .tms-single-duel) .tms-results-dispute.is-disputed {
    color: #fdba74 !important;
}

:is(.tms-single, .tms-single-duel) .tms-results-dispute.is-resolved {
    color: #cbd5e1 !important;
}

:is(.tms-single, .tms-single-duel) .tms-bracket-status-badge.is-pending {
    color: var(--tms-single-muted) !important;
}

:is(.tms-single, .tms-single-duel) .tms-bracket-status-badge.is-live {
    color: #86efac !important;
}

:is(.tms-single, .tms-single-duel) .tms-bracket-status-badge.is-disputed {
    color: #fca5a5 !important;
}

:is(.tms-single, .tms-single-duel) .tms-bracket-status-badge.is-completed {
    color: #fcd34d !important;
}

:is(.tms-single, .tms-single-duel) .tms-next-step-eyebrow,
:is(.tms-single, .tms-single-duel) .tms-duel-eyebrow,
:is(.tms-single, .tms-single-duel) .tms-series-next-step .tms-duel-eyebrow {
    color: var(--tms-single-accent) !important;
}

:is(.tms-single, .tms-single-duel) .tms-next-step-countdown {
    color: var(--tms-single-accent) !important;
}

:is(.tms-single, .tms-single-duel) .tms-duel-summary-chip.is-open {
    color: #93c5fd !important;
}

:is(.tms-single, .tms-single-duel) .tms-duel-summary-chip.is-requested {
    color: #fcd34d !important;
}

:is(.tms-single, .tms-single-duel) .tms-duel-summary-chip.is-invited {
    color: #d8b4fe !important;
}

:is(.tms-single, .tms-single-duel) .tms-duel-score-pill.tms-you {
    color: #fcd34d !important;
}

:is(.tms-single, .tms-single-duel) .tms-duel-score-pill.tms-you .tms-duel-score-pill-num {
    color: #fde68a !important;
}

:is(.tms-single, .tms-single-duel) .tms-duel-result-recap-score {
    color: #86efac !important;
}

:is(.tms-single, .tms-single-duel) .tms-duel-result-recap.is-terminal .tms-duel-result-recap-score {
    color: #fca5a5 !important;
}

:is(.tms-single, .tms-single-duel) .tms-duel-result-recap-maps-row .is-winner {
    color: #86efac !important;
}

:is(.tms-single, .tms-single-duel) .tms-duel-dispute-banner.is-dispute .tms-duel-dispute-banner-title {
    color: #fca5a5 !important;
}

:is(.tms-single, .tms-single-duel) .tms-duel-dispute-banner.is-review .tms-duel-dispute-banner-title {
    color: #fcd34d !important;
}

:is(.tms-single, .tms-single-duel) .tms-team-detail-status--captain,
:is(.tms-single, .tms-single-duel) .tms-team-detail-status--member {
    color: #86efac !important;
}

:is(.tms-single, .tms-single-duel) .tms-team-detail-status--pending,
:is(.tms-single, .tms-single-duel) .tms-team-detail-status--join-requested {
    color: #fdba74 !important;
}

:is(.tms-single, .tms-single-duel) .tms-invite-status.is-ok {
    color: #86efac !important;
}

:is(.tms-single, .tms-single-duel) .tms-invite-status.is-err {
    color: #fca5a5 !important;
}

:is(.tms-single, .tms-single-duel) .tms-next-step-dispute-line,
:is(.tms-single, .tms-single-duel) .tms-next-step-blocker-item {
    color: #fecaca !important;
}

:is(.tms-single, .tms-single-duel) .tms-tabs .tms-tab,
:is(.tms-single, .tms-single-duel) .tms-tabs button.tms-tab {
    color: var(--tms-single-muted) !important;
}

:is(.tms-single, .tms-single-duel) .tms-tabs .tms-tab.is-active,
:is(.tms-single, .tms-single-duel) .tms-tabs button.tms-tab.is-active,
:is(.tms-single, .tms-single-duel) .tms-pro-round-tabs .tms-tab.is-active,
:is(.tms-single, .tms-single-duel) .tms-pro-round-tabs button.tms-tab.is-active {
    color: var(--tms-single-text) !important;
}

/* Moderator apply button: stays visible even when the viewer cannot apply yet. */
.tms-moderator-apply-btn--blocked {
    opacity: .65;
}
.tms-moderator-apply-feedback,
.tms-moderator-apply-blocked {
    margin: 6px 0 0;
    color: #b45309;
    font-size: .82rem;
    line-height: 1.35;
}

.tms-ddt-button--review {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.tms-duel-ticket-workspace {
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid rgba(59, 130, 246, .25);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(239, 246, 255, .95), #fff);
    color: #0f172a;
}

.tms-duel-ticket-workspace__head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.tms-duel-ticket-workspace__eyebrow {
    display: inline-flex;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2563eb;
}

.tms-duel-ticket-workspace h3 {
    margin: .25rem 0 .35rem;
    font-size: 1.15rem;
}

.tms-duel-ticket-workspace p {
    margin: 0;
    color: #475569;
    font-size: .92rem;
}

.tms-duel-ticket-workspace__reward {
    white-space: nowrap;
    font-weight: 700;
    color: #15803d;
    background: rgba(34, 197, 94, .12);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: .82rem;
}

.tms-duel-ticket-workspace__summary {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, .04);
    white-space: pre-wrap;
    font: inherit;
    font-size: .85rem;
    color: #334155;
}

.tms-duel-badge.is-side-state.is-confirmed,
.tms-duel-showcase-player-role,
.tms-duel-badge.is-match-state.is-completed,
.tms-duel-inline-note,
.tms-duel-series-status.is-active,
.tms-duel-primary-actions-head,
.tms-muted,
.tms-duel-lobby-status-item.is-active.is-shared,
.tms-duel-lobby-status-item.is-active.is-ready,
.tms-duel-lobby-status-item.is-active.is-live,
.tms-duel-ready-pill.is-ready,
.tms-duel-lobby-status-label

{
    color: black !important;
}

