/* === Typografia dla gości === */
html {
    font-family: "Inter", "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
}

/* Kontener na szerokość headera */
.cycles-list-header-width {
    width: calc(100vw - 4rem);
    max-width: none;
    margin-left: calc(50% - 50vw + 2rem);
    margin-right: 0;
}

/* Boxy cykli jeszcze niższe */
.cycle-list-link {
    min-height: 110px !important;
    /* Jeszcze niższe, np. 50% oryginału */
}

/* Pasek postępu w tej samej linii co meta */
.cycle-list-meta-progress-row {
    display: flex;
    align-items: flex-end;
    gap: 1.2rem;
    flex-wrap: wrap;
    margin-bottom: 0.7rem;
}
.cycle-list-meta-with-progress {
    display: flex;
    gap: 0.7rem;
    width: 100%;
}

.cycle-list-meta-with-progress .tournament-list-meta-item {
    flex: 1 1 19%;
    min-width: 0;
    box-sizing: border-box;
    max-width: 19.5%;
}
.cycle-list-progress-inline {
    min-width: 180px;
    flex: 0 0 180px;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

/* Nazwa cyklu z mocnym kolorem */
.cycle-list-title-accent {
    color: #e85d04;
    font-weight: 800;
    letter-spacing: 0.01em;
    font-size: 1.25rem;
    margin-bottom: 0.1em;
}
/* === Public layout override (full-width main, zastępuje max-width z base.css) === */
main {
    width: calc(100vw - 4rem);
    max-width: none;
    margin-left: calc(50% - 50vw + 2rem);
    margin-right: 0;
}

/* === Kolory i tła - public wariant motywu === */
body {
    background: var(--theme-bg);
    color: var(--theme-text);
}

header {
    background: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
}

.card, .group-box, .modal-content {
    background: var(--theme-surface-glass);
    border: 1px solid var(--theme-surface-border);
}

table {
    background: var(--theme-surface);
}

thead {
    background: var(--theme-surface-muted);
}

tbody tr:nth-child(even) {
    background: var(--theme-surface-alt);
}

button,
.btn,
.btn-small {
    --public-btn-bg-from: var(--theme-accent);
    --public-btn-bg-to: var(--theme-accent-strong, var(--theme-accent));
    --public-btn-hover-from: var(--theme-accent-hover);
    --public-btn-hover-to: var(--theme-accent);
    --public-btn-border: var(--theme-border-strong);
    --public-btn-color: var(--theme-on-accent, #fff);
    --public-btn-shadow: color-mix(in srgb, var(--theme-focus-ring) 68%, transparent 32%);
}

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.56rem 1rem;
    border: 1px solid var(--public-btn-border);
    border-radius: 8px;
    background: linear-gradient(180deg, var(--public-btn-bg-from) 0%, var(--public-btn-bg-to) 100%);
    color: var(--public-btn-color);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.15;
    text-decoration: none;
    box-shadow: 0 4px 12px var(--public-btn-shadow);
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

button:hover,
.btn:hover {
    background: linear-gradient(180deg, var(--public-btn-hover-from) 0%, var(--public-btn-hover-to) 100%);
    color: var(--public-btn-color);
    transform: translateY(-1px);
}

button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--theme-accent);
    outline-offset: 2px;
}

button:disabled,
.btn[aria-disabled="true"],
.btn-small:disabled,
.btn-small[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.62;
    transform: none;
    box-shadow: none;
}

button:disabled:hover,
.btn[aria-disabled="true"]:hover,
.btn-small:disabled:hover,
.btn-small[aria-disabled="true"]:hover {
    background: linear-gradient(180deg, var(--public-btn-bg-from) 0%, var(--public-btn-bg-to) 100%);
    color: var(--public-btn-color);
    transform: none;
}

.btn-secondary,
.btn-admin-create {
    --public-btn-bg-from: var(--theme-accent);
    --public-btn-bg-to: var(--theme-accent-strong, var(--theme-accent));
    --public-btn-hover-from: var(--theme-accent-hover);
    --public-btn-hover-to: var(--theme-accent);
    --public-btn-border: var(--theme-border-strong);
    --public-btn-color: var(--theme-on-accent, #fff);
    --public-btn-shadow: color-mix(in srgb, var(--theme-focus-ring) 68%, transparent 32%);
}

.btn-warning {
    --public-btn-bg-from: color-mix(in srgb, var(--theme-warning-bg) 72%, #fff 28%);
    --public-btn-bg-to: color-mix(in srgb, var(--theme-warning-border) 78%, var(--theme-warning-bg) 22%);
    --public-btn-hover-from: color-mix(in srgb, var(--theme-warning-border) 86%, #fff 14%);
    --public-btn-hover-to: color-mix(in srgb, var(--theme-warning-border) 92%, var(--theme-warning-bg) 8%);
    --public-btn-border: var(--theme-warning-border);
    --public-btn-color: var(--theme-warning-text);
    --public-btn-shadow: color-mix(in srgb, var(--theme-warning-border) 34%, transparent 66%);
}

.btn-danger,
.btn-small-danger {
    --public-btn-bg-from: color-mix(in srgb, var(--theme-danger) 76%, #fff 24%);
    --public-btn-bg-to: var(--theme-danger);
    --public-btn-hover-from: color-mix(in srgb, var(--theme-danger) 88%, #fff 12%);
    --public-btn-hover-to: color-mix(in srgb, var(--theme-danger) 90%, #000 10%);
    --public-btn-border: color-mix(in srgb, var(--theme-danger) 82%, #000 18%);
    --public-btn-color: var(--theme-on-danger, #fff);
    --public-btn-shadow: color-mix(in srgb, var(--theme-danger) 34%, transparent 66%);
}

.btn-danger-soft {
    --public-btn-bg-from: color-mix(in srgb, var(--theme-surface-soft) 74%, var(--theme-danger) 26%);
    --public-btn-bg-to: color-mix(in srgb, var(--theme-surface) 82%, var(--theme-danger) 18%);
    --public-btn-hover-from: color-mix(in srgb, var(--theme-surface) 72%, var(--theme-danger) 28%);
    --public-btn-hover-to: color-mix(in srgb, var(--theme-surface-alt) 78%, var(--theme-danger) 22%);
    --public-btn-border: color-mix(in srgb, var(--theme-danger) 72%, var(--theme-border) 28%);
    --public-btn-color: var(--theme-danger);
    --public-btn-shadow: color-mix(in srgb, var(--theme-danger) 18%, transparent 82%);
}

.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.38rem 0.72rem;
    border: 1px solid var(--public-btn-border);
    border-radius: 7px;
    background: linear-gradient(180deg, var(--public-btn-bg-from) 0%, var(--public-btn-bg-to) 100%);
    color: var(--public-btn-color);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    box-shadow: 0 3px 10px var(--public-btn-shadow);
    transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.btn-small:hover {
    background: linear-gradient(180deg, var(--public-btn-hover-from) 0%, var(--public-btn-hover-to) 100%);
    color: var(--public-btn-color);
    transform: translateY(-1px);
}

.btn-small:focus-visible {
    outline: 2px solid var(--theme-accent);
    outline-offset: 2px;
}

.btn-small-link-danger {
    --public-btn-bg-from: color-mix(in srgb, var(--theme-surface) 80%, var(--theme-danger) 20%);
    --public-btn-bg-to: color-mix(in srgb, var(--theme-surface-soft) 68%, var(--theme-danger) 32%);
    --public-btn-hover-from: color-mix(in srgb, var(--theme-danger) 76%, #fff 24%);
    --public-btn-hover-to: var(--theme-danger);
    --public-btn-border: color-mix(in srgb, var(--theme-danger) 74%, var(--theme-border) 26%);
    --public-btn-color: var(--theme-danger);
    --public-btn-shadow: color-mix(in srgb, var(--theme-danger) 16%, transparent 84%);
}

.btn-small-link-danger:hover {
    color: var(--theme-on-danger, #fff);
}

a {
    color: var(--theme-accent);
}

a:hover {
    color: var(--theme-accent-hover);
}

/* Stylowy wybór motywu */
.theme-combo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.9rem;
    padding: 0.3rem 0.42rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-glass);
    backdrop-filter: blur(8px);
}

.theme-combo-label {
    margin-left: 0.3rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--theme-muted);
    white-space: nowrap;
}

.theme-combo-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.theme-combo-wrap::after {
    content: 'v';
    position: absolute;
    right: 0.66rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.66rem;
    color: var(--theme-muted);
    pointer-events: none;
}

.theme-combo-select {
    appearance: none;
    border: 1px solid var(--theme-border-strong);
    border-radius: 999px;
    background: var(--theme-surface);
    color: var(--theme-text);
    padding: 0.36rem 1.55rem 0.36rem 0.78rem;
    line-height: 1.1;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.theme-combo-select:hover {
    transform: translateY(-1px);
}

.theme-combo-select:focus {
    outline: none;
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 2px var(--theme-focus-ring);
}


/* Animacja kart (public-specific - base.css nie animuje .card) */
.card, .group-box {
    animation: fadeIn 0.5s ease-out;
}

/* Cały box jako link */
.full-box-link {
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

/* Styl boxa */
.link-box {
    display: block; /* <-- BEZWZGLĘDNIE WYMAGANE */
    padding: 1.2rem 1.4rem;
    border-radius: 12px;
    margin-top: 1rem;
    transition: 0.25s ease;
    cursor: pointer;
}

.link-box {
    background: var(--theme-link-box-bg);
    border: 1px solid var(--theme-link-box-border);
}

/* Hover efekt */
.link-box:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}

main.tournaments-page {
    max-width: 1880px;
}

.tournaments-list-card {
    border: 1px solid var(--theme-main-card-border, var(--theme-border-strong));
    background:
        linear-gradient(120deg, var(--theme-main-card-bg), var(--theme-sub-card-bg)),
        var(--theme-surface-glass);
}

.tournament-list-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
}

.tournament-list-head h2 {
    margin: 0;
}

.tournament-list-head p {
    margin: 0;
    opacity: 0.86;
    color: var(--theme-muted);
    font-size: 0.92rem;
}

.tournament-list-controls {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 0.65rem;
}

.tournament-searchbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
    align-items: end;
    padding: 0.58rem;
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    background: var(--theme-surface);
}

.tournament-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 0.6rem;
    align-items: end;
    margin-bottom: 0.65rem;
    padding: 0.58rem;
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    background: var(--theme-surface);
}

.tournament-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.tournament-filter-field label {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--theme-muted);
    font-weight: 700;
}

.tournament-filter-field input,
.tournament-filter-field select {
    width: 100%;
    border: 1px solid var(--theme-border-strong);
    border-radius: 9px;
    background: var(--theme-surface-alt);
    color: var(--theme-text);
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.42rem 0.56rem;
}

.tournament-filter-field input::placeholder {
    color: var(--theme-muted);
    opacity: 0.84;
}

.tournament-search-field input {
    min-height: 40px;
}

.tournament-filter-actions {
    display: inline-flex;
    gap: 0.46rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.tournament-filter-reset {
    background: var(--theme-surface-alt);
    color: var(--theme-text);
    border: 1px solid var(--theme-border-strong);
}

.tournament-filter-reset:hover {
    background: var(--theme-surface);
}

.tournament-filter-summary {
    margin: 0 0 0.72rem;
    font-size: 0.84rem;
    color: var(--theme-muted);
}

.tournament-list-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.tournament-list-item {
    margin: 0;
}

.tournament-list-link {
    margin-top: 0;
    min-height: 148px;
    display: flex;
    flex-direction: column;
    gap: 0.58rem;
    padding: 0.9rem 1.1rem;
    text-decoration: none;
    color: inherit;
    border-width: 1px 1px 1px 5px;
    border-style: solid;
    border-color: var(--theme-list-item-odd-border, var(--theme-main-card-border, var(--theme-border-strong)));
    box-shadow:
        0 14px 30px -22px var(--theme-overlay),
        0 2px 0 0 var(--theme-overlay-soft);
    background:
        linear-gradient(
            150deg,
            var(--theme-list-item-odd-bg-from, var(--theme-link-box-bg)),
            var(--theme-list-item-odd-bg-to, var(--theme-surface))
        );
}

.tournament-list-grid > .tournament-list-item:nth-child(odd) .tournament-list-link {
    border-color: var(--theme-list-item-odd-border, var(--theme-main-card-border, var(--theme-border-strong)));
    border-left-color: var(--theme-list-item-odd-border, var(--theme-main-card-border, var(--theme-border-strong)));
    box-shadow:
        0 14px 32px -22px var(--theme-focus-ring),
        inset 0 1px 0 0 var(--theme-focus-ring);
    background:
        linear-gradient(
            150deg,
            var(--theme-list-item-odd-bg-from, var(--theme-link-box-bg)),
            var(--theme-list-item-odd-bg-to, var(--theme-surface))
        );
}

.tournament-list-grid > .tournament-list-item:nth-child(even) .tournament-list-link {
    border-color: var(--theme-list-item-even-border, var(--theme-border-strong));
    border-left-color: var(--theme-list-item-even-border, var(--theme-border-strong));
    box-shadow:
        0 16px 34px -22px var(--theme-overlay),
        inset 0 1px 0 0 var(--theme-overlay-soft);
    background:
        linear-gradient(
            150deg,
            var(--theme-list-item-even-bg-from, var(--theme-surface-muted)),
            var(--theme-list-item-even-bg-to, var(--theme-sub-card-bg))
        );
}

.tournament-list-link:hover {
    border-color: var(--theme-list-item-even-border, var(--theme-border-strong));
    box-shadow:
        0 20px 38px -24px var(--theme-focus-glow),
        0 0 0 1px var(--theme-focus-ring);
}

.tournament-list-grid > .tournament-list-item:nth-child(even) .tournament-list-meta-item {
    border-color: var(--theme-list-item-meta-even-border, var(--theme-border-strong));
    background: var(--theme-list-item-meta-even-bg, var(--theme-surface-alt));
}

.tournament-list-grid > .tournament-list-item:nth-child(even) .cycle-top3-block {
    border-color: var(--theme-list-item-meta-even-border, var(--theme-border-strong));
    background: var(--theme-list-item-meta-even-bg, var(--theme-surface-alt));
}

.tournament-list-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tournament-list-top h3 {
    margin: 0;
    font-size: 1.06rem;
    line-height: 1.25;
}

.tournament-list-closed-at {
    margin: -0.1rem 0 0;
    font-size: 0.8rem;
    color: var(--theme-muted);
}

.tournament-list-meta {
    display: flex;
    gap: 0.44rem;
}

.tournament-list-meta-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.34rem 0.46rem;
    border-radius: 10px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface);
}

.tournament-list-meta-item span {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--theme-muted);
    white-space: nowrap;
}

.tournament-list-meta-item strong {
    font-size: 0.82rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tournament-list-systems {
    display: flex;
    flex-wrap: wrap;
    gap: 0.44rem;
}

.tournament-system-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--theme-border-strong);
    background: var(--theme-surface);
    padding: 0.18rem 0.58rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--theme-text);
}

.tournament-list-progress {
    margin-top: 0.16rem;
}

.tournament-list-progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    font-size: 0.84rem;
}

.tournament-list-progress-label span {
    color: var(--theme-muted);
}

.tournament-list-progress-label strong {
    font-size: 0.9rem;
}

.tournament-progress-bar {
    width: 100%;
    margin-top: 0.22rem;
    height: 8px;
    border-radius: 999px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface);
    overflow: hidden;
}

.tournament-progress-bar > span {
    display: block;
    height: 100%;
    width: var(--tournament-progress, 0%);
    max-width: 100%;
    background: linear-gradient(90deg, var(--theme-accent), var(--theme-accent-hover));
    transition: width 0.3s ease;
}

.cycles-list-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.cycle-list-link {
    min-height: 220px;
}

.cycle-list-badges {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.cycle-owner-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.44rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border-strong);
    background: var(--theme-surface);
    padding: 0.16rem 0.52rem 0.16rem 0.22rem;
    max-width: 100%;
}

.cycle-owner-logo-wrap {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 28px;
}

.cycle-owner-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cycle-owner-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5dd7e, #f0b429);
    color: #7a4b00;
    font-size: 0.9rem;
}

.cycle-owner-name {
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cycle-list-description {
    margin: 0;
    font-size: 0.84rem;
    color: var(--theme-muted);
    line-height: 1.35;
}

.cycle-top3-block {
    margin-top: 0.06rem;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    background: var(--theme-surface);
    padding: 0.44rem 0.56rem;
}

.cycle-top3-title {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--theme-muted);
    font-weight: 700;
}

.cycle-top3-list {
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
}

.cycle-top3-list li {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
    padding: 0.24rem 0.34rem;
    border-radius: 8px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-alt);
}

.cycle-top3-medal {
    line-height: 1;
    font-size: 0.9rem;
    flex: 0 0 auto;
}

.cycle-top3-name {
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cycle-top3-empty {
    margin: 0.34rem 0 0;
    font-size: 0.78rem;
    color: var(--theme-muted);
}

.cycle-detail-page {
    width: calc(100vw - 4rem);
    max-width: none;
    margin-left: calc(50% - 50vw + 2rem);
    margin-right: 0;
}

.cycle-detail-period {
    margin-top: 0.4rem;
    opacity: 0.84;
    color: var(--theme-muted);
}

.cycle-detail-description {
    margin-top: 0.65rem;
    line-height: 1.45;
}

.cycle-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
    gap: 0.9rem;
    align-items: start;
    margin-bottom: 1.15rem;
}

.cycle-detail-layout .card {
    margin-bottom: 0;
    min-width: 0;
}

.tournament-list-grid.cycle-detail-tournaments-grid {
    grid-template-columns: 1fr;
    width: 100%;
}

.cycle-detail-tournaments-card .tournament-list-link {
    min-height: 210px;
    width: 100%;
}

.cycle-detail-tournaments-grid .tournament-list-item {
    min-width: 0;
}

.cycle-detail-tournaments-card .tournament-list-meta {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.cycle-detail-header-top {
    margin-bottom: 0.4rem;
}

.cycle-detail-header-top .cycle-owner-badge {
    max-width: 100%;
}

.cycle-detail-header-meta {
    margin-top: 0.56rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cycle-detail-header-progress {
    margin-top: 0.56rem;
}

.cycle-detail-header-top3 {
    margin-top: 0.62rem;
}

.cycle-detail-tournaments-card .tournament-list-meta-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.14rem;
}

.cycle-detail-tournaments-card .tournament-list-meta-item strong {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.cycle-ranking-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
}

.cycle-ranking-head-top {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cycle-ranking-head-top h2 {
    margin: 0;
}

.cycle-ranking-head-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.cycle-ranking-head-copy p {
    margin: 0;
}

.cycle-ranking-card {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.cycle-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin-top: 0.7rem;
}

.cycle-ranking-table {
    width: max-content;
    min-width: 100%;
    margin: 0;
}

.cycle-ranking-export-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.24rem;
    padding: 0.14rem 0.28rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border);
    background: var(--theme-popover-bg);
    box-shadow: 0 6px 14px var(--theme-popover-shadow);
}

.cycle-ranking-export-option {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--theme-popover-border);
    background: var(--theme-score-option-bg);
    color: var(--theme-score-option-text);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.cycle-ranking-export-option img {
    width: 17px;
    height: 17px;
    object-fit: contain;
}

.cycle-ranking-export-option:hover {
    background: var(--theme-popover-hover-bg);
    border-color: var(--theme-popover-hover-border);
}

.cycle-ranking-export-option:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--theme-focus-ring);
}

.cycle-player-cell {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.42rem;
    min-width: 0;
}

.cycle-player-delta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.26rem;
    height: 1.26rem;
    padding: 0 0.24rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border-strong);
    background: var(--theme-surface);
    color: var(--theme-text);
    font-size: 0.61rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1;
    box-shadow: 0 0 0 1px var(--theme-surface), 0 3px 9px -6px var(--theme-overlay);
    transform: translateY(-0.24rem);
}

.cycle-player-name {
    font-weight: 600;
    line-height: 1.2;
}

.player-profile-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.player-profile-link:hover {
    color: var(--theme-accent-hover);
    border-bottom-color: currentColor;
}

.player-profile-link:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
    border-bottom-color: currentColor;
}

.cycle-increment-up {
    color: var(--theme-success);
    border-color: var(--theme-success);
    background: var(--theme-status-green-bg);
}

.cycle-increment-down {
    color: var(--theme-danger);
    border-color: var(--theme-danger);
    background: rgba(231, 76, 60, 0.14);
}

.cycle-increment-flat {
    color: var(--theme-muted);
    border-color: var(--theme-border-strong);
}

.cycle-detail-backlink-card p {
    margin: 0;
}

@media (max-width: 980px) {
    .cycle-detail-page {
        width: calc(100vw - 1.6rem);
        margin-left: calc(50% - 50vw + 0.8rem);
        margin-right: 0;
    }

    .cycle-ranking-table {
        min-width: 640px;
    }

    .cycle-ranking-table th,
    .cycle-ranking-table td {
        padding: 0.62rem 0.54rem;
        font-size: 0.82rem;
    }

    .cycle-player-delta {
        min-width: 1.1rem;
        height: 1.1rem;
        padding: 0 0.2rem;
        font-size: 0.56rem;
        transform: translateY(-0.16rem);
    }

    .cycle-rank-medal {
        font-size: 0.9rem;
    }
}

@media (max-width: 1680px) {
    .tournament-list-grid {
        grid-template-columns: repeat(auto-fit, minmax(660px, 1fr));
    }

    .cycles-list-grid {
        grid-template-columns: repeat(auto-fit, minmax(620px, 1fr));
    }
}

@media (max-width: 1260px) {
    .cycle-detail-header-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cycle-detail-layout {
        grid-template-columns: 1fr;
    }

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

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

    .tournament-filter-actions {
        justify-content: flex-start;
    }

    .tournament-list-grid {
        grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
    }

    .cycles-list-grid {
        grid-template-columns: repeat(auto-fit, minmax(430px, 1fr));
    }

    .tournament-list-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .tournament-list-meta-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.14rem;
    }

    .tournament-list-meta-item strong {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .cycle-top3-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .cycle-detail-header-meta {
        grid-template-columns: 1fr;
    }

    .cycle-ranking-table {
        min-width: 540px;
    }

    .cycle-detail-tournaments-card .tournament-list-link {
        min-height: 0;
        padding: 1rem;
    }

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

    .cycle-filters {
        grid-template-columns: 1fr;
    }

    .tournament-filter-actions {
        width: 100%;
    }

    .cycle-list-badges {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .tournament-filter-actions .btn {
        flex: 1 1 auto;
        text-align: center;
    }

    main.tournaments-page {
        max-width: 100%;
    }

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

    .tournament-list-link {
        min-height: 0;
        padding: 1rem;
    }

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

    .cycle-owner-badge {
        width: 100%;
        justify-content: flex-start;
    }

    .cycle-ranking-export-actions {
        margin-left: 0;
    }
}

.tournament-summary-card .tournament-summary-meta {
    margin-top: 0.35rem;
    opacity: 0.9;
}

.tournament-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tournament-summary-head h2 {
    margin: 0;
}

.tournament-summary-side {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    margin-left: auto;
}

.tournament-summary-status {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
}

.tournament-refresh-panel {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    padding: 0.72rem 0.82rem;
    border: 1px solid var(--theme-surface-border);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--theme-surface-soft), var(--theme-surface-alt));
}

.tournament-refresh-label {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--theme-muted);
    font-weight: 700;
}

.tournament-refresh-note {
    margin: 0;
    font-size: 0.72rem;
    color: var(--theme-muted);
}

.tournament-refresh-controls {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.tournament-refresh-combo .theme-combo-select {
    min-width: 96px;
}

.tournament-refresh-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0.82rem 0.3rem 0.42rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border-strong);
    background: var(--theme-surface);
    color: var(--theme-text);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tournament-refresh-toggle:hover {
    background: var(--theme-surface-alt);
}

.tournament-refresh-toggle:focus-visible {
    outline: none;
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 2px var(--theme-focus-ring);
}

.tournament-refresh-toggle:disabled,
.tournament-refresh-combo .theme-combo-select:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    transform: none;
}

.tournament-refresh-toggle:disabled:hover,
.tournament-refresh-combo .theme-combo-select:disabled:hover {
    transform: none;
}

.tournament-refresh-toggle-track {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 42px;
    height: 24px;
    padding: 2px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-surface-border) 76%, var(--theme-surface) 24%);
    transition: background 0.2s ease;
}

.tournament-refresh-toggle-thumb {
    display: block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--theme-surface);
    box-shadow: 0 2px 6px -3px var(--theme-overlay);
    transition: transform 0.2s ease;
}

.tournament-refresh-toggle.is-enabled {
    border-color: color-mix(in srgb, var(--theme-accent) 42%, var(--theme-border-strong) 58%);
    background: color-mix(in srgb, var(--theme-accent) 12%, var(--theme-surface) 88%);
    color: var(--theme-accent-hover);
}

.tournament-refresh-toggle.is-enabled .tournament-refresh-toggle-track {
    background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-hover));
}

.tournament-refresh-toggle.is-enabled .tournament-refresh-toggle-thumb {
    transform: translateX(18px);
}

.tournament-refresh-toggle.is-disabled {
    color: var(--theme-muted);
}

.tournament-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    padding: 0.2rem 0.52rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.tournament-status-badge.is-open {
    background: var(--theme-status-blue-bg);
    border-color: var(--theme-accent-strong);
    color: var(--theme-accent-strong);
}

.tournament-status-badge.is-closed {
    background: var(--theme-status-green-bg);
    border-color: var(--theme-success);
    color: var(--theme-success);
}

.tournament-status-badge.is-upcoming {
    background: var(--theme-warning-bg);
    border-color: var(--theme-warning-border);
    color: var(--theme-warning-text);
}

.tournament-status-time {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.7rem;
    color: var(--theme-muted);
}

.tournament-group-card {
    overflow: hidden;
}

@media (max-width: 720px) {
    .tournament-summary-side,
    .tournament-summary-status,
    .tournament-refresh-panel {
        align-items: flex-start;
    }

    .tournament-summary-side {
        width: 100%;
        margin-left: 0;
    }

    .tournament-refresh-panel {
        width: 100%;
    }

    .tournament-refresh-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .tournament-refresh-combo {
        flex: 1 1 140px;
    }

    .tournament-refresh-combo .theme-combo-select {
        width: 100%;
    }

    .tournament-summary-status {
        align-items: flex-start;
    }
}

.tournament-group-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.tournament-group-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.tournament-group-progress {
    font-size: 0.84rem;
    color: var(--theme-muted);
}

.tournament-group-qualifier {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--theme-text);
    border: 1px solid var(--theme-border-strong);
    background: var(--theme-surface);
    border-radius: 999px;
    padding: 0.2rem 0.52rem;
    box-shadow: 0 0 14px -4px var(--theme-focus-ring);
}

.tournament-matrix-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 0.7rem;
}

.tournament-matrix-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.tournament-matrix-table th,
.tournament-matrix-table td {
    border: 1px solid var(--theme-border);
    padding: 0.48rem 0.56rem;
    text-align: center;
    font-size: 0.86rem;
}

.tournament-matrix-table .tm-player-col,
.tournament-matrix-table .tm-player-row {
    text-align: left;
    min-width: 180px;
    white-space: nowrap;
    font-weight: 700;
}

.tournament-matrix-table .tm-opponent-col {
    min-width: 106px;
    max-width: 138px;
    white-space: normal;
    line-height: 1.22;
    font-size: 0.78rem;
}

.tournament-matrix-table .tm-points-col,
.tournament-matrix-table .tm-place-col,
.tournament-matrix-table .tm-points-cell,
.tournament-matrix-table .tm-place-cell {
    min-width: 82px;
    font-weight: 700;
}

.tournament-matrix-table .tm-cell-diagonal {
    color: var(--theme-muted);
    font-weight: 700;
    background: var(--theme-surface-muted);
}

.tournament-matrix-table .tm-diagonal-icon {
    display: inline-flex;
    line-height: 1;
    font-size: 0.98rem;
}

.tournament-matrix-table .tm-cell-empty {
    color: var(--theme-muted);
    background: var(--theme-surface-alt);
}

.tournament-matrix-table .tm-cell-played {
    font-weight: 700;
}

.tournament-matrix-table tbody tr.tm-row-qualified {
    background: linear-gradient(90deg, var(--theme-focus-ring) 0%, transparent 75%);
}

.tournament-matrix-table .tm-place-cell {
    white-space: nowrap;
}

.tournament-matrix-table .tm-place-cell-qualified {
    box-shadow: inset 0 0 0 1px var(--theme-border-strong), 0 0 16px -6px var(--theme-focus-ring);
    background: var(--theme-surface);
}

.tournament-matrix-table .tm-place-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.24rem;
    font-size: 0.98rem;
    line-height: 1;
}

.tournament-matrix-table .tm-place-medal-gold {
    filter: drop-shadow(0 0 3px rgba(255, 190, 0, 0.65));
}

.tournament-matrix-table .tm-place-medal-silver {
    filter: drop-shadow(0 0 3px rgba(198, 205, 220, 0.72));
}

.tournament-matrix-table .tm-place-medal-bronze {
    filter: drop-shadow(0 0 3px rgba(196, 118, 64, 0.7));
}

.tournament-public-bracket-card {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    border: 1px solid var(--theme-main-card-border, var(--theme-border-strong));
    border-radius: 14px;
}

.tournament-public-bracket-box {
    --theme-bracket-bg: var(--theme-surface);
    --theme-bracket-text: var(--theme-text);
    --theme-bracket-round-bg: var(--theme-surface-alt);
    --theme-bracket-border: var(--theme-border-strong);
    --theme-bracket-card-bg: var(--theme-surface);
    --theme-bracket-card-shadow: var(--theme-overlay-soft);
    --theme-bracket-card-shadow-hover: var(--theme-overlay);
    --theme-bracket-accent: var(--theme-accent);
    --theme-bracket-success: var(--theme-success);
    --theme-bracket-finished-bg: var(--theme-surface-muted);
    --theme-bracket-muted: var(--theme-muted);
    --theme-bracket-italic: var(--theme-muted);
    --theme-bracket-score: var(--theme-text);
    --theme-bracket-score-strong: var(--theme-accent);
    --theme-bracket-score-alt: var(--theme-text-subtle, var(--theme-text));
    --theme-bracket-focus-glow: var(--theme-focus-glow);
    --theme-bracket-focus-ring: var(--theme-focus-ring);
    --theme-bracket-popover-bg: var(--theme-popover-bg);
    --theme-bracket-popover-border: var(--theme-popover-border);
    --theme-bracket-popover-hover-bg: var(--theme-popover-hover-bg);
    --theme-bracket-popover-hover-border: var(--theme-popover-hover-border);
    --theme-bracket-popover-shadow: var(--theme-popover-shadow);

    width: 100%;
    margin-top: 0.7rem;
    border: 2px solid var(--theme-border-strong, #6a7688);
    border-radius: 14px;
    overflow: hidden;
    background:
        linear-gradient(145deg, var(--theme-surface), var(--theme-surface-alt, var(--theme-surface))),
        var(--theme-surface-glass);
    box-shadow:
        inset 0 0 0 1px var(--theme-border),
        0 10px 24px -16px var(--theme-focus-ring, rgba(51, 102, 204, 0.22));
    padding: 0.28rem;
}

.tournament-public-bracket-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.18rem;
}

.tournament-public-bracket-box .bracket-wrapper {
    min-height: 520px;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    background: var(--theme-bracket-bg, var(--theme-surface));
}

.tournament-public-bracket-empty {
    margin-top: 0.35rem;
    color: var(--theme-muted);
}

.tournament-public-bracket-error {
    margin-top: 0.5rem;
    color: var(--theme-danger, #b00020);
    font-weight: 700;
}

.tournament-public-bracket-box .score-picker,
.tournament-public-bracket-box .match-table-wrap {
    display: none;
}

.tournament-public-bracket-box .bracket-match-box {
    border: 2px solid var(--theme-bracket-border, var(--theme-border-strong));
    padding-bottom: 8px;
}

.tournament-ranking-card {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.tournament-ranking-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 0.7rem;
}

.tournament-ranking-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.tournament-ranking-table th,
.tournament-ranking-table td {
    border: 1px solid var(--theme-border);
    padding: 0.48rem 0.56rem;
    text-align: left;
    font-size: 0.85rem;
    white-space: nowrap;
}

.tournament-ranking-table .tr-col-lp,
.tournament-ranking-table .tr-col-pts,
.tournament-ranking-table .tr-col-total,
.tournament-ranking-table .tr-col-win,
.tournament-ranking-table .tr-col-loss,
.tournament-ranking-table .tr-col-sets,
.tournament-ranking-table .tr-col-cycle,
.tournament-ranking-table .tr-cell-center {
    text-align: center;
}

.tournament-ranking-table .tr-col-first,
.tournament-ranking-table .tr-col-last {
    min-width: 150px;
}

.tournament-ranking-table .tr-col-cycle {
    min-width: 110px;
}

.tournament-ranking-table .tr-col-status {
    min-width: 220px;
}

.tournament-ranking-table .tr-last-name-cell {
    font-weight: 700;
}

.tournament-ranking-table .tr-status-cell {
    white-space: nowrap;
}

.tournament-ranking-table .tr-status-cell.is-active {
    color: var(--theme-accent-strong);
}

.tournament-ranking-table .tr-status-cell.is-finished {
    color: var(--theme-muted);
}

.tournament-ranking-table .tm-place-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.24rem;
    font-size: 0.98rem;
    line-height: 1;
}

.tournament-ranking-table .tm-place-medal-gold {
    filter: drop-shadow(0 0 3px rgba(255, 190, 0, 0.65));
}

.tournament-ranking-table .tm-place-medal-silver {
    filter: drop-shadow(0 0 3px rgba(198, 205, 220, 0.72));
}

.tournament-ranking-table .tm-place-medal-bronze {
    filter: drop-shadow(0 0 3px rgba(196, 118, 64, 0.7));
}

.player-ranking-page {
    max-width: 1880px;
}

.player-ranking-layout {
    display: grid;
    gap: 1rem;
}

.player-ranking-search-card {
    border: 1px solid var(--theme-main-card-border, var(--theme-border-strong));
    background:
        radial-gradient(circle at top right, rgba(232, 93, 4, 0.14), transparent 34%),
        linear-gradient(135deg, var(--theme-main-card-bg), var(--theme-sub-card-bg));
}

.player-ranking-search-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.95rem;
}

.player-ranking-search-head h2,
.player-ranking-search-head h3 {
    margin: 0;
}

.player-ranking-search-head p {
    margin: 0.28rem 0 0;
    color: var(--theme-muted);
}

.player-ranking-search-summary {
    display: grid;
    gap: 0.18rem;
    min-width: 170px;
    padding: 0.82rem 0.9rem;
    border-radius: 16px;
    border: 1px solid var(--theme-border-strong);
    background: var(--theme-surface-glass);
    text-align: center;
}

.player-ranking-search-summary strong {
    font-size: 1.6rem;
    line-height: 1;
}

.player-ranking-search-summary span {
    color: var(--theme-muted);
    font-size: 0.8rem;
}

.player-ranking-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.7rem;
}

.player-ranking-search-form input[type="search"] {
    min-width: 0;
    padding: 0.82rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--theme-border-strong);
    background: var(--theme-surface);
    color: var(--theme-text);
    font: inherit;
}

.player-ranking-search-form input[type="search"]:focus {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.player-ranking-search-form label {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.player-ranking-search-form label span {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--theme-muted);
}

.player-ranking-search-form select {
    min-width: 0;
    padding: 0.82rem 0.95rem;
    border-radius: 14px;
    border: 1px solid var(--theme-border-strong);
    background: var(--theme-surface);
    color: var(--theme-text);
    font: inherit;
}

.player-ranking-search-table-wrap {
    margin-top: 1rem;
    width: 100%;
    overflow-x: auto;
}

.player-ranking-search-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid var(--theme-surface-border);
}

.player-ranking-search-table thead th {
    padding: 0.82rem 0.9rem;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--theme-text);
    background: linear-gradient(135deg, var(--theme-surface-alt), var(--theme-surface-soft));
    border-bottom: 1px solid var(--theme-border-strong);
}

.player-ranking-search-table tbody td {
    padding: 0.9rem;
    border-bottom: 1px solid var(--theme-surface-border);
    vertical-align: middle;
}

.player-ranking-search-table tbody tr:nth-child(odd) {
    background: var(--theme-surface);
}

.player-ranking-search-table tbody tr:nth-child(even) {
    background: var(--theme-surface-alt);
}

.player-ranking-search-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(232, 93, 4, 0.08), transparent 78%);
}

.player-ranking-search-table tbody tr:last-child td {
    border-bottom: none;
}

.player-ranking-person-cell {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 0.7rem;
    align-items: center;
}

.player-ranking-mini-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--theme-border-strong);
    background: linear-gradient(160deg, var(--theme-surface-soft), var(--theme-surface-muted));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--theme-text);
}

.player-ranking-person-copy {
    min-width: 0;
}

.player-ranking-person-copy strong,
.player-ranking-person-copy small {
    display: block;
}

.player-ranking-person-copy small {
    margin-top: 0.18rem;
    color: var(--theme-muted);
}

.player-ranking-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border-strong);
    background: var(--theme-surface-glass);
    color: var(--theme-text);
    text-decoration: none;
    font-weight: 700;
}

.player-ranking-open-link:hover {
    background: var(--theme-surface-soft);
    color: var(--theme-accent-hover);
}

.player-ranking-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.player-ranking-pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.2rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--theme-border-strong);
    border-radius: 10px;
    background: var(--theme-surface);
    color: var(--theme-text);
    text-decoration: none;
    font-weight: 700;
}

.player-ranking-pagination-link:hover {
    border-color: var(--theme-accent);
    color: var(--theme-accent-hover);
}

.player-ranking-pagination-link.is-active {
    border-color: var(--theme-accent, var(--theme-border-strong));
    background: color-mix(in srgb, var(--theme-accent, #1f6feb) 14%, var(--theme-surface) 86%);
}

.player-ranking-empty-state {
    margin-top: 1rem;
    color: var(--theme-muted);
}

.player-profile-hero {
    border: 1px solid var(--theme-main-card-border, var(--theme-border-strong));
    background:
        radial-gradient(circle at top left, rgba(232, 93, 4, 0.14), transparent 30%),
        radial-gradient(circle at bottom right, rgba(12, 127, 88, 0.1), transparent 24%),
        linear-gradient(140deg, var(--theme-main-card-bg), var(--theme-sub-card-bg));
}

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

.player-profile-avatar {
    width: 112px;
    height: 112px;
    border-radius: 28px;
    border: 1px solid var(--theme-border-strong);
    background: linear-gradient(160deg, var(--theme-surface-soft), var(--theme-surface-alt));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.player-profile-avatar span {
    font-size: 3rem;
    line-height: 1;
}

.player-profile-title h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
}

.player-profile-subtitle {
    margin: 0.35rem 0 0;
    color: var(--theme-muted);
}

.player-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.95rem;
}

.player-profile-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.38rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface-glass);
    font-size: 0.85rem;
}

.player-profile-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 1rem;
}

.player-profile-kpi {
    min-width: 0;
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    border: 1px solid var(--theme-surface-border);
    background: var(--theme-surface-glass);
}

.player-profile-kpi span {
    display: block;
    color: var(--theme-muted);
    font-size: 0.8rem;
    margin-bottom: 0.26rem;
}

.player-profile-kpi strong {
    display: block;
    font-size: 1.25rem;
}

.player-profile-kpi small {
    display: block;
    margin-top: 0.22rem;
    color: var(--theme-text-subtle);
}

.player-profile-kpis-compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.player-profile-chart-card {
    margin-top: 1rem;
    padding: 0.95rem 1rem 1rem;
    border-radius: 22px;
    border: 1px solid var(--theme-surface-border);
    background: rgba(255, 255, 255, 0.03);
}

.player-profile-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.player-profile-chart-head h3 {
    margin: 0;
}

.player-profile-chart-head p {
    margin: 0.25rem 0 0;
    color: var(--theme-muted);
}

.player-profile-chart-legend {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    font-size: 0.84rem;
}

.player-profile-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.player-profile-chart-legend i {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.player-profile-chart-wrap {
    position: relative;
    width: 100%;
    overflow-x: auto;
}

.player-profile-chart-svg {
    width: 100%;
    min-width: 760px;
    height: auto;
    display: block;
}

.player-chart-point {
    cursor: pointer;
    transform-box: fill-box;
    transform-origin: center;
    transition: filter 0.24s ease, opacity 0.24s ease;
}

.player-chart-point:hover,
.player-chart-point.is-active,
.player-chart-point:focus-visible {
    filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.25));
}

.player-chart-point:focus-visible {
    outline: none;
}

.activity-chart-bar-front {
    fill: url(#activityBarFrontGradient);
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 1;
}

.activity-chart-bar-top {
    fill: rgba(118, 230, 201, 0.9);
}

.activity-chart-bar-side {
    fill: rgba(9, 84, 78, 0.95);
}

.activity-chart-bar-group {
    filter: drop-shadow(0 18px 28px rgba(4, 31, 29, 0.2));
}

.activity-chart-bar-group:hover .activity-chart-bar-front,
.activity-chart-bar-group.is-active .activity-chart-bar-front,
.activity-chart-bar-group:focus-visible .activity-chart-bar-front {
    fill: url(#activityBarFrontGradientActive);
}

.activity-chart-bar-group:hover .activity-chart-bar-top,
.activity-chart-bar-group.is-active .activity-chart-bar-top,
.activity-chart-bar-group:focus-visible .activity-chart-bar-top {
    fill: rgba(171, 250, 232, 0.98);
}

.activity-chart-bar-group:hover .activity-chart-bar-side,
.activity-chart-bar-group.is-active .activity-chart-bar-side,
.activity-chart-bar-group:focus-visible .activity-chart-bar-side {
    fill: rgba(7, 66, 62, 0.98);
}

.player-chart-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    min-width: 240px;
    max-width: 320px;
    padding: 0.82rem 0.9rem;
    border-radius: 16px;
    border: 1px solid var(--theme-border-strong);
    background: color-mix(in srgb, var(--theme-surface) 82%, black 18%);
    box-shadow: 0 22px 38px -26px var(--theme-overlay), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    color: var(--theme-text);
    pointer-events: none;
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.player-chart-tooltip.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.player-chart-tooltip strong,
.player-chart-tooltip span,
.player-chart-tooltip small {
    display: block;
}

.player-chart-tooltip strong {
    font-size: 0.98rem;
    margin-bottom: 0.25rem;
}

.player-chart-tooltip small {
    color: var(--theme-muted);
    margin-bottom: 0.55rem;
}

.player-chart-tooltip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.player-chart-tooltip-metric {
    padding: 0.48rem 0.56rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
}

.player-chart-tooltip-metric span {
    color: var(--theme-muted);
    font-size: 0.73rem;
    margin-bottom: 0.14rem;
}

.player-chart-tooltip-metric strong {
    margin: 0;
    font-size: 0.95rem;
}

.player-chart-tooltip-note {
    color: var(--theme-text-subtle);
    line-height: 1.35;
}

.player-profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1rem;
}

.player-profile-card h3 {
    margin-top: 0;
}

.player-profile-card {
    border: 1px solid var(--theme-main-card-border, var(--theme-border-strong));
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
        var(--theme-surface-glass);
}

.player-profile-chronology-box {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 22px;
    border: 2px solid color-mix(in srgb, var(--theme-accent, #e85d04) 68%, white 32%);
    background:
        radial-gradient(circle at top right, rgba(232, 93, 4, 0.16), transparent 30%),
        linear-gradient(135deg, rgba(232, 93, 4, 0.14), rgba(255, 255, 255, 0.04)),
        var(--theme-surface);
    box-shadow:
        0 0 0 3px rgba(232, 93, 4, 0.12),
        0 18px 34px -28px rgba(232, 93, 4, 0.72),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.player-profile-chronology-box .player-profile-history-table {
    border-color: color-mix(in srgb, var(--theme-accent, #e85d04) 28%, var(--theme-surface-border) 72%);
}

.player-profile-subsection-head {
    margin-bottom: 0.7rem;
}

.player-profile-insights {
    display: grid;
    gap: 0.7rem;
}

.player-profile-insight-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.72rem 0.85rem;
    border-radius: 14px;
    background: var(--theme-surface-alt);
}

.player-profile-insight-row span {
    color: var(--theme-muted);
}

.player-profile-cycles {
    display: grid;
    gap: 0.65rem;
}

.player-profile-cycle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.72rem 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--theme-surface-border);
    background: var(--theme-surface-glass);
}

.player-profile-cycle-row strong,
.player-profile-cycle-row span,
.player-profile-cycle-row small {
    display: block;
}

.player-profile-history-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.player-profile-history-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--theme-surface-border);
}

.player-profile-history-table th,
.player-profile-history-table td {
    white-space: nowrap;
}

.player-profile-history-table thead th {
    padding: 0.82rem 0.88rem;
    text-align: left;
    font-size: 0.81rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 800;
    background: linear-gradient(135deg, var(--theme-surface-alt), var(--theme-surface-soft));
    border-bottom: 1px solid var(--theme-border-strong);
}

.player-profile-history-table tbody td {
    padding: 0.82rem 0.88rem;
    border-bottom: 1px solid var(--theme-surface-border);
}

.player-profile-history-table tbody tr:nth-child(odd) {
    background: var(--theme-surface);
}

.player-profile-history-table tbody tr:nth-child(even) {
    background: var(--theme-surface-alt);
}

.player-profile-history-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(12, 127, 88, 0.08), transparent 78%);
}

.player-profile-history-table td strong {
    font-size: 0.95rem;
}

.player-profile-chronology-type-cell strong,
.player-profile-chronology-type-cell small {
    display: block;
}

.player-profile-chronology-type-cell small {
    margin-top: 0.18rem;
    color: var(--theme-muted);
    font-size: 0.77rem;
    line-height: 1.35;
}

.player-profile-chronology-table tbody tr.player-profile-chronology-row-date-start td {
    border-top: 2px solid color-mix(in srgb, var(--theme-success, #0c7f58) 46%, var(--theme-surface-border) 54%);
}

.player-profile-chronology-table tbody tr.player-profile-chronology-row-date-start td:first-child {
    box-shadow: inset 4px 0 0 0 var(--theme-success, #0c7f58);
    background:
        linear-gradient(90deg, rgba(12, 127, 88, 0.28), rgba(12, 127, 88, 0.1)),
        var(--theme-surface-soft);
    font-weight: 800;
    color: color-mix(in srgb, var(--theme-success, #0c7f58) 72%, white 28%);
}

.player-profile-chronology-table tbody tr.player-profile-chronology-row-date-start td:nth-child(2) {
    background: linear-gradient(90deg, rgba(12, 127, 88, 0.12), transparent 88%);
}

.player-profile-alert {
    color: var(--theme-danger);
    font-weight: 700;
}

.player-profile-h2h-form {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 1rem;
}

.player-profile-h2h-card {
    display: grid;
    gap: 0.9rem;
}

.player-profile-chart-card-tight {
    margin-top: 0;
}

.overall-ranking-layout {
    display: block;
}

.overall-ranking-hero-card {
    background:
        radial-gradient(circle at top left, rgba(12, 118, 110, 0.16), transparent 30%),
        radial-gradient(circle at top right, rgba(29, 78, 216, 0.14), transparent 28%),
        linear-gradient(145deg, var(--theme-main-card-bg), var(--theme-sub-card-bg));
}

.overall-ranking-search-head {
    margin-bottom: 1.15rem;
}

.overall-ranking-top-metrics,
.overall-ranking-max-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.overall-ranking-max-card {
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    border: 1px solid var(--theme-surface-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
        var(--theme-surface-glass);
}

.overall-ranking-max-card span,
.overall-ranking-max-card strong,
.overall-ranking-max-card small,
.overall-ranking-inline-detail {
    display: block;
}

.overall-ranking-max-card span,
.overall-ranking-inline-detail {
    color: var(--theme-muted);
}

.overall-ranking-max-card strong {
    font-size: 1.32rem;
    margin: 0.18rem 0 0.1rem;
}

.overall-ranking-multigamer-block {
    margin-top: 1.1rem;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid var(--theme-surface-border);
    background:
        radial-gradient(circle at top right, rgba(232, 93, 4, 0.09), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
        rgba(255, 255, 255, 0.02);
}

.overall-ranking-activity-block {
    margin-top: 1.1rem;
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid var(--theme-surface-border);
    background:
        radial-gradient(circle at top left, rgba(15, 118, 110, 0.12), transparent 30%),
        radial-gradient(circle at top right, rgba(29, 78, 216, 0.1), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
        rgba(255, 255, 255, 0.02);
    scroll-margin-top: 1rem;
}

.overall-ranking-alltime-panel {
    margin-top: 1.2rem;
    border: 1px solid var(--theme-main-card-border, var(--theme-border-strong));
    background:
        radial-gradient(circle at top left, rgba(29, 78, 216, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
        var(--theme-surface-glass);
}

.overall-ranking-system-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.overall-ranking-alltime-table-wrap {
    margin-top: 0.2rem;
}

.overall-ranking-max-grid-multigamers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overall-ranking-max-grid-activity {
    margin-bottom: 1.1rem;
}

.overall-ranking-multigamer-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 0.4rem;
}

.overall-ranking-activity-controls {
    margin-top: 0.95rem;
    grid-template-columns: minmax(280px, 1.45fr) minmax(210px, 0.9fr) minmax(210px, 0.88fr) minmax(140px, 0.55fr) auto;
    align-items: end;
}

.overall-ranking-activity-chart-card {
    margin-top: 0.2rem;
}

.overall-ranking-chart-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.overall-ranking-axis-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.24rem;
    border-radius: 999px;
    border: 1px solid var(--theme-surface-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        var(--theme-surface-glass);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.overall-ranking-axis-switch-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 0.48rem 0.85rem;
    border-radius: 999px;
    color: var(--theme-muted);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.overall-ranking-axis-switch-link:hover {
    color: var(--theme-text);
    background: rgba(255, 255, 255, 0.08);
}

.overall-ranking-axis-switch-link:focus-visible {
    outline: 2px solid var(--theme-focus-ring);
    outline-offset: 2px;
}

.overall-ranking-axis-switch-link.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, color-mix(in srgb, var(--theme-accent, #e85d04) 92%, white 8%), color-mix(in srgb, var(--theme-accent, #e85d04) 66%, #7c2d12 34%));
    box-shadow: 0 14px 24px -20px rgba(232, 93, 4, 0.8);
}

.overall-ranking-activity-stats-grid {
    margin-bottom: 0.95rem;
}

.overall-ranking-activity-insights {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.95rem;
}

.overall-ranking-activity-note {
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    border: 1px solid var(--theme-surface-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent),
        var(--theme-surface-glass);
    color: var(--theme-muted);
}

.overall-ranking-activity-note strong {
    color: var(--theme-text);
}

.overall-ranking-search-form-emphasis input[type="search"],
.overall-ranking-select-emphasis {
    border: 2px solid color-mix(in srgb, var(--theme-accent, #e85d04) 68%, white 32%);
    background:
        linear-gradient(135deg, rgba(232, 93, 4, 0.18), rgba(255, 255, 255, 0.08)),
        var(--theme-surface);
    box-shadow:
        0 0 0 3px rgba(232, 93, 4, 0.14),
        0 14px 28px -24px rgba(232, 93, 4, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.overall-ranking-search-form-emphasis input[type="search"]::placeholder {
    color: color-mix(in srgb, var(--theme-text) 68%, transparent 32%);
}

.overall-ranking-search-form-emphasis input[type="search"]:focus,
.overall-ranking-select-emphasis:focus {
    outline: 3px solid rgba(232, 93, 4, 0.24);
    outline-offset: 2px;
    border-color: color-mix(in srgb, var(--theme-accent, #e85d04) 82%, white 18%);
    box-shadow:
        0 0 0 4px rgba(232, 93, 4, 0.16),
        0 18px 34px -24px rgba(232, 93, 4, 0.72),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.overall-ranking-multigamer-meta {
    margin: 0 0 0.75rem;
    color: var(--theme-muted);
}

.overall-ranking-multigamer-table td:nth-child(3),
.overall-ranking-multigamer-table td:nth-child(4),
.overall-ranking-multigamer-table td:nth-child(5),
.overall-ranking-multigamer-table td:nth-child(6),
.overall-ranking-multigamer-table td:nth-child(7),
.overall-ranking-multigamer-table th:nth-child(3),
.overall-ranking-multigamer-table th:nth-child(4),
.overall-ranking-multigamer-table th:nth-child(5),
.overall-ranking-multigamer-table th:nth-child(6) {
    text-align: center;
}

.overall-ranking-multigamer-table th:nth-child(7) {
    text-align: center;
}

.overall-ranking-activity-table td:nth-child(3),
.overall-ranking-activity-table td:nth-child(4),
.overall-ranking-activity-table td:nth-child(5),
.overall-ranking-activity-table td:nth-child(6),
.overall-ranking-activity-table td:nth-child(7),
.overall-ranking-activity-table td:nth-child(8),
.overall-ranking-activity-table th:nth-child(3),
.overall-ranking-activity-table th:nth-child(4),
.overall-ranking-activity-table th:nth-child(5),
.overall-ranking-activity-table th:nth-child(6),
.overall-ranking-activity-table th:nth-child(7),
.overall-ranking-activity-table th:nth-child(8),
.overall-ranking-activity-table th:nth-child(9) {
    text-align: center;
}

.overall-ranking-table td {
    vertical-align: middle;
}

.overall-ranking-inline-detail {
    margin-top: 0.16rem;
    font-size: 0.78rem;
}

@media (max-width: 1260px) {
    .player-profile-kpis,
    .overall-ranking-top-metrics,
    .overall-ranking-max-grid,
    .overall-ranking-max-grid-multigamers,
    .overall-ranking-system-stats-grid,
    .overall-ranking-activity-insights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-profile-kpis-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .overall-ranking-activity-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .player-profile-grid {
        grid-template-columns: 1fr;
    }

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

    .player-profile-avatar {
        width: 88px;
        height: 88px;
        border-radius: 22px;
    }
}

@media (max-width: 760px) {
    .player-ranking-search-form,
    .player-profile-h2h-form {
        grid-template-columns: 1fr;
    }

    .overall-ranking-multigamer-controls {
        grid-template-columns: 1fr;
    }

    .overall-ranking-activity-controls {
        grid-template-columns: 1fr;
    }

    .overall-ranking-chart-toolbar {
        justify-content: flex-start;
    }

    .overall-ranking-axis-switch {
        width: 100%;
        justify-content: stretch;
    }

    .overall-ranking-axis-switch-link {
        flex: 1 1 0;
        min-width: 0;
    }

    .player-profile-kpis,
    .player-profile-kpis-compact,
    .overall-ranking-top-metrics,
    .overall-ranking-max-grid,
    .overall-ranking-max-grid-multigamers,
    .overall-ranking-system-stats-grid,
    .overall-ranking-activity-insights {
        grid-template-columns: 1fr;
    }

    .player-ranking-search-summary {
        width: 100%;
    }
}

.tournament-starting-card {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.tournament-starting-note {
    margin-top: 0.35rem;
    color: var(--theme-text-dim);
    font-size: 0.9rem;
}

.tournament-starting-wrap {
    width: 100%;
    overflow-x: auto;
    margin-top: 0.7rem;
}

.tournament-starting-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.tournament-starting-table th,
.tournament-starting-table td {
    border: 1px solid var(--theme-border);
    padding: 0.48rem 0.56rem;
    text-align: left;
    font-size: 0.85rem;
    white-space: nowrap;
}

.tournament-starting-table .ts-cell-center,
.tournament-starting-table .ts-col-center,
.tournament-starting-table .ts-col-rank,
.tournament-starting-table .ts-col-lp {
    text-align: center;
}

.tournament-starting-table .ts-col-last,
.tournament-starting-table .ts-col-first {
    min-width: 150px;
}

.tournament-starting-table tbody tr:nth-child(odd) {
    background: var(--tm-start-row-odd, var(--theme-surface));
}

.tournament-starting-table tbody tr:nth-child(even) {
    background: var(--tm-start-row-even, var(--theme-surface-alt));
}

.tournament-starting-table tbody tr:nth-child(odd) td:first-child {
    border-left: 4px solid var(--tm-start-row-odd-accent, var(--theme-accent));
}

.tournament-starting-table tbody tr:nth-child(even) td:first-child {
    border-left: 4px solid var(--tm-start-row-even-accent, var(--theme-border-strong));
}

.tournament-starting-table tbody tr.ts-top-1 td {
    background: var(--tm-start-top1, var(--theme-warning-bg));
}

.tournament-starting-table tbody tr.ts-top-2 td {
    background: var(--tm-start-top2, var(--theme-surface-soft));
}

.tournament-starting-table tbody tr.ts-top-3 td {
    background: var(--tm-start-top3, var(--theme-surface-muted));
}

.tournament-starting-table .ts-last-name {
    font-weight: 700;
}

.tournament-starting-table .ts-rank-points {
    display: inline-flex;
    align-items: baseline;
    gap: 0.34rem;
}

.tournament-starting-table .ts-rank-pos {
    font-size: 0.78rem;
    color: var(--theme-text-subtle);
    font-weight: 600;
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Klikalna karta główna */
.main-card {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1.5rem;
}

.main-card {
    background: var(--theme-main-card-bg);
    border: 1px solid var(--theme-main-card-border);
}

.main-card.is-disabled {
    opacity: 0.5;
    color: var(--theme-muted);
    cursor: not-allowed;
}

.main-card.is-disabled:hover {
    transform: none;
    filter: none;
}

/* Karta z listą (sub-card) */
.sub-card {
    padding: 1rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.sub-card {
    background: var(--theme-sub-card-bg);
    border: 1px solid var(--theme-sub-card-border);
}

/* Delikatny hover */
.hover-scale {
    transition: transform 0.18s ease, filter 0.18s ease;
}

.hover-scale:hover {
    transform: scale(1.015);
    filter: brightness(1.05);
}

/* Usunięcie pasków po lewej stronie */
.card, .sub-card, .main-card {
    border-left: none !important;
}

.home-live-ribbon {
    position: relative;
    overflow: hidden;
    width: calc(100vw - 4rem);
    max-width: none;
    margin-left: calc(50% - 50vw + 2rem);
    margin-right: 0;
    border: 1px solid var(--theme-border-strong);
    background:
        linear-gradient(120deg, var(--theme-main-card-bg), var(--theme-sub-card-bg)),
        var(--theme-surface-glass);
    box-shadow: 0 8px 24px -12px var(--theme-focus-ring);
}

.home-live-ribbon-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
}

.home-live-ribbon-head h2 {
    margin: 0;
    font-size: 1.1rem;
}

.home-live-ribbon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border-strong);
    background: var(--theme-surface);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--theme-text);
    white-space: nowrap;
}

.home-live-empty {
    opacity: 0.8;
    color: var(--theme-muted);
}

.home-live-marquee-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid var(--theme-border);
    background: var(--theme-surface);
}

.home-live-marquee-track {
    display: flex;
    align-items: stretch;
    gap: 0.7rem;
    width: max-content;
    padding: 0.55rem;
    animation: homeLiveTicker 420s linear infinite;
    will-change: transform;
}

.home-live-marquee-wrap:hover .home-live-marquee-track {
    animation-play-state: paused;
}

.home-live-marquee-track.is-static {
    animation: none;
    width: 100%;
}

.home-live-item {
    min-width: 320px;
    max-width: 360px;
    padding: 0.55rem 0.68rem;
    border-radius: 10px;
    border: 1px solid var(--theme-border);
    background: var(--theme-link-box-bg);
    box-shadow: 0 5px 14px -10px var(--theme-focus-ring);
}

.home-live-item--league {
    border-left: 3px solid var(--theme-accent);

.home-live-item--league-duel {
    border-left: 3px solid var(--theme-focus-ring);
}
}

.home-live-item-main {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-live-matchup {
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-live-player {
    color: var(--theme-text);
    font-weight: 700;
    opacity: 0.84;
    white-space: nowrap;
    transition: text-shadow 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

.home-live-player.is-winner {
    font-weight: 800;
    opacity: 1;
    filter: brightness(1.12);
    text-shadow: 0 0 10px var(--theme-focus-ring), 0 0 2px rgba(255, 255, 255, 0.35);
}

.home-live-vs {
    opacity: 0.75;
    font-weight: 700;
}

.home-live-item-main strong {
    margin-left: auto;
    padding: 0.16rem 0.45rem;
    border-radius: 999px;
    background: var(--theme-accent);
    color: #fff;
    font-size: 0.83rem;
}

.home-live-ball {
    line-height: 1;
}

.home-live-item-meta {
    margin-top: 0.3rem;
    font-size: 0.77rem;
    color: var(--theme-muted);
    display: grid;
    gap: 0.12rem;
}

.home-live-item-meta span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-scroll-section {
    padding-top: 1.1rem;
}

.home-bands-layout {
    width: calc(100vw - 4rem);
    max-width: none;
    margin-left: calc(50% - 50vw + 2rem);
    margin-right: 0;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(720px, 1200px) minmax(220px, 1fr);
    gap: 1rem;
    align-items: start;
}

.home-center-panel {
    min-width: 0;
}

.home-primary-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.home-primary-link.main-card {
    margin-bottom: 0;
}

.home-primary-link {
    position: relative;
    display: grid;
    grid-template-columns: 166px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 0.72rem;
    row-gap: 0.9rem;
    min-height: 188px;
    overflow: hidden;
}

.home-primary-link::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.9;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--theme-focus-ring) 38%, transparent 62%), transparent 48%),
        linear-gradient(135deg, transparent, color-mix(in srgb, var(--theme-surface-soft) 78%, transparent 22%));
}

.home-primary-link-title,
.home-primary-link-description,
.home-primary-link-media {
    position: relative;
    z-index: 1;
}

.home-primary-link-kicker {
    display: inline-block;
    margin-bottom: 0.3rem;
    padding: 0.18rem 0.48rem;
    border-radius: 999px;
    border: 1px solid var(--theme-border-strong);
    background: color-mix(in srgb, var(--theme-surface) 82%, transparent 18%);
    color: var(--theme-text-dim, var(--theme-muted));
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-primary-link-title {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    min-width: 0;
    align-self: center;
    font-size: 1.34rem;
    line-height: 1.08;
}

.home-primary-link-description {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    max-width: none;
}

.home-primary-link-media {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    justify-content: flex-start;
    align-self: center;
}

.home-primary-link-placeholder {
    width: 166px;
    aspect-ratio: 3 / 2;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--theme-surface-border) 64%, var(--theme-surface) 36%);
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--theme-surface) 90%, #fff 10%), var(--theme-surface-soft)),
        var(--theme-surface);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-surface-border) 54%, transparent 46%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.home-primary-link-image {
    display: block;
    width: 103%;
    max-width: none;
    height: auto;
    margin: 0;
    object-fit: initial;
}

.home-primary-link--cycles .home-primary-link-placeholder {
    border-color: color-mix(in srgb, var(--theme-accent) 24%, var(--theme-surface-border) 76%);
}

.home-primary-link--tournaments .home-primary-link-placeholder {
    border-color: color-mix(in srgb, var(--theme-warning-border) 24%, var(--theme-surface-border) 76%);
}

.home-primary-link--teams .home-primary-link-placeholder {
    border-color: color-mix(in srgb, var(--theme-success, #2e9d62) 24%, var(--theme-surface-border) 76%);
}

.home-side-band {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.home-side-box {
    padding: 0.9rem 0.95rem;
    border-radius: 12px;
    border: 1px solid var(--theme-sub-card-border);
    background: var(--theme-sub-card-bg);
    box-shadow: 0 8px 18px -14px var(--theme-focus-ring);
}

.home-side-box--about {
    display: grid;
    gap: 0.45rem;
}

.home-side-box-scroll {
    max-height: 7.4rem;
    overflow-y: auto;
    padding-right: 0.35rem;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--theme-border-strong) transparent;
}

.home-side-box-scroll::-webkit-scrollbar {
    width: 8px;
}

.home-side-box-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--theme-border-strong);
}

.home-side-box-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.home-side-box h3,
.home-side-box h4 {
    margin: 0 0 0.45rem;
    line-height: 1.25;
}

.home-side-box p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.42;
    color: var(--theme-text);
    opacity: 0.95;
}

.home-side-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.42rem;
}

.home-side-list li {
    font-size: 0.84rem;
    line-height: 1.35;
    color: var(--theme-text);
}

.home-side-results-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.home-side-results-head small {
    color: var(--theme-muted);
    font-size: 0.72rem;
}

.home-side-box--stats {
    border: 1px solid var(--theme-main-card-border, var(--theme-border-strong));
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(165deg, var(--theme-sub-card-bg), var(--theme-main-card-bg)),
        var(--theme-surface-glass);
}

.home-side-box--stats::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.2;
    background: repeating-linear-gradient(
        120deg,
        transparent 0,
        transparent 11px,
        var(--theme-border) 11px,
        var(--theme-border) 12px
    );
}

.home-side-stats-grid {
    margin-top: 0.58rem;
    display: grid;
    gap: 0.62rem;
    position: relative;
    z-index: 1;
}

.home-stat-card {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 0.66rem;
    align-items: center;
    height: 84px;
    padding: 0.62rem 0.72rem;
    border-radius: 11px;
    border: 1px solid var(--theme-border-strong);
    background:
        linear-gradient(140deg, var(--theme-surface), var(--theme-link-box-bg) 56%, var(--theme-surface-muted));
    box-shadow: 0 11px 20px -17px var(--theme-overlay), inset 0 0 0 1px var(--theme-border);
    overflow: hidden;
    container-type: inline-size;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-stat-card::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 38%;
    height: 100%;
    pointer-events: none;
    opacity: 0.3;
    background: linear-gradient(130deg, transparent 20%, var(--theme-focus-ring));
}

.home-stat-card:hover {
    transform: translateY(-1px);
    border-color: var(--theme-main-card-border, var(--theme-border-strong));
    box-shadow: 0 14px 24px -16px var(--theme-focus-ring), inset 0 0 0 1px var(--theme-border-strong);
}

.home-stat-target {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center,
            var(--theme-surface) 0 12%,
            var(--theme-accent) 12% 24%,
            var(--theme-surface-alt) 24% 40%,
            var(--theme-accent-hover) 40% 56%,
            var(--theme-surface-muted) 56% 74%,
            var(--theme-main-card-bg) 74% 100%
        );
    box-shadow:
        inset 0 0 0 1px var(--theme-border-strong),
        0 8px 16px -10px var(--theme-overlay);
}

.home-stat-target::before,
.home-stat-target::after {
    content: '';
    position: absolute;
    background: var(--theme-border-strong);
    opacity: 0.45;
}

.home-stat-target::before {
    top: 50%;
    left: 4px;
    right: 4px;
    height: 1px;
    transform: translateY(-50%);
}

.home-stat-target::after {
    left: 50%;
    top: 4px;
    bottom: 4px;
    width: 1px;
    transform: translateX(-50%);
}

.home-stat-metric {
    min-width: 0;
    min-height: 0;
    display: grid;
    align-content: center;
    gap: 0.12rem;
    overflow: hidden;
}

.home-stat-label {
    margin: 0;
    font-size: 0.58rem;
    font-size: clamp(0.58rem, 0.54rem + 0.24cqi, 0.7rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--theme-muted);
    line-height: 1.18;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-wrap: balance;
}

.home-stat-value {
    margin: 0;
    font-size: clamp(1.16rem, 1.18vw + 0.82rem, 1.6rem);
    font-size: clamp(1.16rem, 0.96rem + 1.45cqi, 1.6rem);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: 0.015em;
    color: var(--theme-text);
    text-shadow: 0 0 9px var(--theme-focus-ring);
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-wrap: balance;
}

.home-stat-card--compact .home-stat-label {
    font-size: clamp(0.54rem, 0.5rem + 0.18cqi, 0.64rem);
}

.home-stat-card--compact .home-stat-value {
    font-size: clamp(1.02rem, 0.84rem + 1.1cqi, 1.42rem);
}

.home-stat-card--tight .home-stat-label {
    font-size: clamp(0.5rem, 0.46rem + 0.14cqi, 0.58rem);
}

.home-stat-card--tight .home-stat-value {
    font-size: clamp(0.94rem, 0.78rem + 0.9cqi, 1.22rem);
}

.home-scroll-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
    flex-wrap: wrap;
}

.home-scroll-head h3 {
    margin: 0;
}

.home-scroll-head small {
    font-size: 0.77rem;
    color: var(--theme-muted);
}

.home-scroll-strip {
    display: flex;
    gap: 0.95rem;
    overflow-x: auto;
    padding: 0.2rem 0.2rem 0.7rem;
    scroll-snap-type: x mandatory;
}

.home-scroll-strip::-webkit-scrollbar {
    height: 10px;
}

.home-scroll-strip::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--theme-border-strong);
}

.home-scroll-box {
    flex: 0 0 min(360px, 86vw);
    scroll-snap-align: start;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--theme-link-box-border);
    background: var(--theme-link-box-bg);
    box-shadow: 0 10px 18px -16px var(--theme-focus-ring);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.home-scroll-box.hover-scale:hover {
    transform: translateY(-2px);
    filter: none;
    border-color: var(--theme-border-strong);
    box-shadow: 0 16px 28px -18px var(--theme-focus-ring);
}

.home-scroll-box h4 {
    margin: 0 0 0.55rem;
    font-size: 0.98rem;
    line-height: 1.25;
}

.home-scroll-box h4 a {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.home-mini-table {
    margin: 0;
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    overflow: hidden;
}

.home-mini-table th,
.home-mini-table td {
    padding: 0.45rem 0.6rem;
    border-top: 1px solid var(--theme-border);
    vertical-align: top;
    font-size: 0.84rem;
}

.home-mini-table tr:first-child th,
.home-mini-table tr:first-child td {
    border-top: none;
}

.home-mini-table tbody tr:hover {
    filter: none;
}

.home-mini-table th {
    width: 36%;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: var(--theme-muted);
    background: var(--theme-surface-muted);
}

@keyframes homeLiveTicker {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@keyframes homeLiveTickerVertical {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-50%);
    }
}

@media (max-width: 980px) {
    .home-live-ribbon {
        width: calc(100vw - 1.6rem);
        margin-left: calc(50% - 50vw + 0.8rem);
    }

    .tournament-public-bracket-card {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .tournament-public-bracket-box .bracket-wrapper {
        min-height: 480px;
    }

    .tournament-public-bracket-box {
        width: auto;
        min-width: 100%;
    }

    .tournament-public-bracket-box .match-team {
        font-size: 0.68em;
        gap: 4px;
    }

    .tournament-public-bracket-box .player-name,
    .tournament-public-bracket-box .player-name em,
    .tournament-public-bracket-box .player-name .player-bye,
    .tournament-public-bracket-box .player-name .player-awaiting {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 0.92em;
        line-height: 1.1;
    }

    .tournament-public-bracket-box .player-seed {
        min-width: 18px;
        font-size: 0.62em;
    }

    .tournament-public-bracket-box .match-result {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-right: 0;
        font-size: 0.58em;
        line-height: 1.1;
    }

    .home-bands-layout {
        width: calc(100vw - 1.6rem);
        margin-left: calc(50% - 50vw + 0.8rem);
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

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

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

@media (max-width: 700px) {
    main {
        padding: 1rem 0.8rem;
    }

    .home-live-ribbon-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-live-marquee-wrap {
        height: 232px;
    }

    .home-live-item {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .home-live-marquee-track {
        width: 100%;
        flex-direction: column;
        gap: 0.55rem;
        animation: homeLiveTickerVertical 42s linear infinite;
    }

    .home-scroll-box {
        flex-basis: 90vw;
    }

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

    .home-primary-link {
        grid-template-columns: 136px minmax(0, 1fr);
        column-gap: 0.66rem;
        row-gap: 0.8rem;
        min-height: 168px;
    }

    .home-primary-link-title {
        font-size: 1.16rem;
    }

    .home-primary-link-placeholder {
        width: 136px;
        border-radius: 14px;
    }

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

    .home-stat-card {
        grid-template-columns: 32px minmax(0, 1fr);
        height: 78px;
        padding: 0.56rem 0.62rem;
    }

    .home-stat-target {
        width: 25px;
        height: 25px;
    }

    .home-stat-value {
        font-size: 1.04rem;
    }

    main > section > table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    main > section > table th,
    main > section > table td {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    main {
        padding: 0.85rem 0.6rem;
    }

    .tournament-public-bracket-card {
        width: 100%;
        margin-left: 0;
        border-radius: 12px;
    }

    .tournament-public-bracket-box {
        border-radius: 12px;
        padding: 0.22rem;
        width: auto;
        min-width: 100%;
    }

    .tournament-public-bracket-box .match-team {
        font-size: 0.64em;
    }

    .tournament-public-bracket-box .player-seed {
        min-width: 16px;
        font-size: 0.58em;
    }

    .tournament-public-bracket-box .match-result {
        font-size: 0.54em;
    }

    .tournament-ranking-table th,
    .tournament-ranking-table td {
        font-size: 0.76rem;
        padding: 0.4rem 0.44rem;
    }

    .tournament-ranking-table .tr-col-first,
    .tournament-ranking-table .tr-col-last {
        min-width: 130px;
    }

    .tournament-ranking-table .tr-col-cycle {
        min-width: 94px;
    }

    .tournament-starting-table th,
    .tournament-starting-table td {
        font-size: 0.76rem;
        padding: 0.4rem 0.44rem;
    }

    .tournament-starting-table .ts-col-last,
    .tournament-starting-table .ts-col-first {
        min-width: 130px;
    }

    .tournament-public-bracket-box .bracket-wrapper {
        min-height: 420px;
        padding: 14px;
    }

    .card,
    .group-box,
    .sub-card {
        padding: 0.85rem;
        border-radius: 10px;
    }

    .link-box {
        padding: 0.9rem 1rem;
    }

    .home-live-ribbon {
        width: calc(100vw - 1rem);
        margin-left: calc(50% - 50vw + 0.5rem);
    }

    .home-live-ribbon-head h2 {
        font-size: 1rem;
    }

    .home-live-ribbon-badge {
        font-size: 0.64rem;
    }

    .home-live-item {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .home-live-item-main {
        font-size: 0.82rem;
    }

    .home-live-item-meta {
        font-size: 0.71rem;
    }

    .home-bands-layout {
        width: calc(100vw - 1rem);
        margin-left: calc(50% - 50vw + 0.5rem);
    }

    .home-scroll-box {
        flex-basis: 94vw;
        padding: 0.78rem 0.82rem;
    }

    .home-primary-links {
        margin-bottom: 1rem;
    }

    .home-primary-link {
        grid-template-columns: 98px minmax(0, 1fr);
        column-gap: 0.52rem;
        row-gap: 0.7rem;
        min-height: 152px;
    }

    .home-primary-link-kicker {
        margin-bottom: 0.24rem;
        font-size: 0.62rem;
    }

    .home-primary-link-title {
        font-size: 0.84rem;
    }

    .home-primary-link-description {
        font-size: 0.82rem;
    }

    .home-primary-link-placeholder {
        width: 98px;
        border-radius: 13px;
    }

    .home-mini-table th,
    .home-mini-table td {
        font-size: 0.78rem;
        padding: 0.4rem 0.48rem;
    }

    .home-stat-card {
        grid-template-columns: 31px minmax(0, 1fr);
        gap: 0.5rem;
        text-align: left;
        justify-items: stretch;
        height: 78px;
        padding: 0.58rem 0.5rem;
    }

    .home-stat-target {
        width: 25px;
        height: 25px;
    }

    .home-stat-label,
    .home-stat-value,
    .home-stat-metric {
        text-align: left;
    }

    .tournament-matrix-table th,
    .tournament-matrix-table td {
        font-size: 0.76rem;
        padding: 0.4rem 0.44rem;
    }

    .tournament-matrix-table .tm-player-col,
    .tournament-matrix-table .tm-player-row {
        min-width: 146px;
    }

    .tournament-matrix-table .tm-opponent-col {
        min-width: 88px;
        max-width: 110px;
        font-size: 0.71rem;
    }

    .tournament-matrix-table .tm-points-col,
    .tournament-matrix-table .tm-place-col,
    .tournament-matrix-table .tm-points-cell,
    .tournament-matrix-table .tm-place-cell {
        min-width: 70px;
    }
}

@media (max-width: 414px) {
    .home-live-marquee-wrap {
        height: 196px;
    }
}

@media (max-width: 375px) {
    .home-live-marquee-wrap {
        height: 172px;
    }
}

@media (max-width: 900px) {
    .player-profile-head,
    .player-profile-grid,
    .player-ranking-search-form {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .player-profile-kpis {
        grid-template-columns: 1fr;
    }

    .player-profile-avatar {
        width: 88px;
        height: 88px;
        border-radius: 22px;
    }

    .player-profile-avatar span {
        font-size: 2.45rem;
    }
}

