/* Live tables must remain readable even inside the desktop split layout. */
.fdc-live-container,
.fdc-live-content,
.fdc-live-content .fdc-gender-block,
.fdc-live-content .fdc-table-container-relative {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.fdc-live-content .fdc-table-wrapper {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border-radius: 8px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}
.fdc-live-content .fdc-podiums-section .fdc-podium-card {
    min-width: 0;
    box-sizing: border-box;
}
.fdc-live-content .fdc-podium-header {
    flex-wrap: wrap;
    gap: 8px;
}
.fdc-live-content .fdc-table {
    display: table;
    table-layout: auto;
    width: 100%;
    min-width: 780px;
}
.fdc-live-content .fdc-ranking-table {
    min-width: 520px;
}
.fdc-live-content .fdc-table th,
.fdc-live-content .fdc-table td {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
    font-variant-numeric: tabular-nums;
}
.fdc-live-content .fdc-athlete-cell {
    min-width: 280px;
}
.fdc-live-content .fdc-athlete-cell .fdc-live-athlete-name {
    min-width: 10ch;
    max-width: 24ch;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.5;
}
.fdc-live-content .fdc-athlete-cell .avatar,
.fdc-live-content .fdc-athlete-cell .fdc-flag,
.fdc-live-content .fdc-rank-badge,
.fdc-live-content .fdc-share-result-btn {
    flex-shrink: 0;
}
.fdc-live-content .fdc-rank-badge {
    min-width: 24px;
    width: auto;
    padding: 0 4px;
    box-sizing: border-box;
}
.fdc-live-content .fdc-table:not(.fdc-ranking-table) td:last-child {
    min-width: 150px;
    max-width: 320px;
    white-space: normal;
    overflow-wrap: anywhere;
}
.fdc-live-content .fdc-remark-badge {
    white-space: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
    box-sizing: border-box;
}
.fdc-live-content .fdc-live-metric-wrap,
.fdc-live-content .fdc-result-rp-with-video {
    white-space: nowrap;
    flex-shrink: 0;
}
.fdc-live-content .fdc-stat-card {
    min-width: 0;
    box-sizing: border-box;
}
.fdc-live-content .fdc-stat-label,
.fdc-live-content .fdc-stat-val,
.fdc-live-content .fdc-stat-sub,
.fdc-live-content .podium-athlete-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}
/* Reserve a line above the table; the hint never covers a result row. */
.fdc-live-content .fdc-table-scroll-hint {
    position: static;
    inset: auto;
    transform: none;
    display: none;
    width: fit-content;
    margin: 0 0 8px auto;
    min-height: 28px;
    align-items: center;
    gap: 8px;
    padding: 3px 10px;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--th-bg);
    color: var(--accent-color) !important;
    box-shadow: none;
    font-size: 11px;
    font-weight: 700;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.fdc-live-content .fdc-table-scroll-hint svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.fdc-live-content .fdc-table-scroll-controls {
    display: none;
}
@media (min-width: 1025px) {
    .fdc-live-content .fdc-scroll-enhanced {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .fdc-live-content .fdc-scroll-enhanced::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }
    .fdc-live-content .fdc-table-container-relative.has-horizontal-overflow > .fdc-table-scroll-hint {
        display: none;
    }
    .fdc-live-content .has-horizontal-overflow > .fdc-table-scroll-controls {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        margin: 0 0 10px;
        color: var(--meta-color);
        font-size: 11px;
        font-weight: 600;
    }
    .fdc-live-content .fdc-table-scroll-controls > span { margin-right: 5px; }
    .fdc-live-content .fdc-table-scroll-controls button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 32px;
        padding: 0;
        border: 1px solid var(--border-color);
        border-radius: 9px;
        color: var(--accent-color);
        background: var(--content-bg);
        cursor: pointer;
        transition: background 0.2s, border-color 0.2s;
    }
    .fdc-live-content .fdc-table-scroll-controls button:hover:not(:disabled) {
        background: var(--th-bg);
        border-color: var(--accent-color);
    }
    .fdc-live-content .fdc-table-scroll-controls button:disabled {
        opacity: 0.3;
        cursor: default;
    }
    .fdc-live-content .fdc-table-scroll-controls svg {
        width: 16px;
        height: 16px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
}
.fdc-live-content .has-horizontal-overflow > .fdc-table-scroll-hint {
    display: flex;
}
.fdc-live-content .has-scrolled > .fdc-table-scroll-hint {
    opacity: 0;
}
.fdc-live-content .fdc-table-container-relative::after {
    top: 36px;
    bottom: 17px;
    width: 20px;
}
.fdc-live-content .fdc-table-wrapper:focus-visible,
.fdc-live-content button:focus-visible,
.fdc-live-content a:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}
#fdc-live-connection-status {
    color: var(--meta-color);
    text-align: center;
    font-size: 13px;
}
#fdc-live-connection-status:empty {
    display: none;
}
@media (max-width: 1024px) {
    .fdc-live-content .fdc-layout-selector {
        display: none !important;
    }
}
@media (max-width: 1024px), (pointer: coarse) {
    .fdc-live-content .has-horizontal-overflow:not(.has-scrolled) > .fdc-table-scroll-hint .swipe-anim {
        animation: fdcLiveSwipe 2.4s ease-in-out infinite;
        margin: 0 8px;
    }
}
@keyframes fdcLiveSwipe {
    0%, 15% { transform: translateX(7px) rotate(8deg); opacity: 0.45; }
    30% { opacity: 1; }
    65%, 80% { transform: translateX(-7px) rotate(-8deg); opacity: 1; }
    100% { transform: translateX(7px) rotate(8deg); opacity: 0.45; }
}
@media (max-width: 480px) {
    .fdc-live-content .fdc-athlete-cell {
        min-width: 220px;
    }
    .fdc-live-content .fdc-athlete-cell > div {
        gap: 6px !important;
    }
    .fdc-live-content .fdc-athlete-cell .avatar {
        width: 24px;
        height: 24px;
    }
    .fdc-live-content .fdc-athlete-cell .fdc-flag {
        width: 16px;
    }
    .fdc-live-content .fdc-stat-best {
        flex-basis: 100%;
    }
    .fdc-live-content .fdc-stat-card:not(.fdc-stat-best) .fdc-stat-icon {
        display: none;
    }
}
@media (max-width: 768px) {
    .fdc-live-content .fdc-podiums-section {
        flex-direction: column;
    }
    .fdc-live-content .fdc-podiums-section .fdc-podium-card {
        flex: 1 1 auto;
        width: 100%;
        padding: 18px;
        border-radius: 18px;
    }
    .fdc-live-content .fdc-podium-header { padding-bottom: 14px; margin-bottom: 0; }
    .fdc-live-content .fdc-podium-visualization {
        flex-direction: column;
        gap: 10px;
        padding-top: 16px;
    }
    .fdc-live-content .fdc-podium-visualization .fdc-podium-step {
        --medal-color: #94a3b8;
        box-sizing: border-box;
        padding: 14px 12px;
        border: 1px solid var(--border-color);
        border-left: 3px solid var(--medal-color);
        border-radius: 12px;
        background: var(--th-bg);
        position: relative;
    }
    .fdc-live-content .fdc-podium-visualization .step-first {
        --medal-color: #eab308;
        background: linear-gradient(115deg, rgba(234,179,8,0.14), transparent 85%), var(--th-bg);
        padding-top: 18px;
        padding-bottom: 18px;
        border-color: rgba(234,179,8,0.35);
        box-shadow: 0 4px 16px rgba(234,179,8,0.06);
    }
    .fdc-live-content .fdc-podium-visualization .step-third {
        --medal-color: #d97706;
    }
    .fdc-live-content .fdc-podium-step.step-first { order: 0; }
    .fdc-live-content .fdc-podium-step.step-second { order: 1; }
    .fdc-live-content .fdc-podium-step.step-third { order: 2; }
    .fdc-live-content .podium-athlete-info {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        column-gap: 12px;
        text-align: left;
        margin: 0;
    }
    .fdc-live-content .podium-athlete-info > a {
        grid-row: 1 / 3;
    }
    .fdc-live-content .podium-avatar {
        width: 42px;
        height: 42px;
    }
    .fdc-live-content .podium-avatar-wrapper { margin-bottom: 0; }
    .fdc-live-content .podium-athlete-name { font-size: 13px; line-height: 1.5; font-weight: 700; }
    .fdc-live-content .step-first .podium-athlete-name { font-size: 14px; }
    .fdc-live-content .podium-athlete-meta > span { font-weight: 700; color: var(--text-color); }
    .fdc-live-content .podium-athlete-info.empty .podium-avatar-wrapper { grid-row: 1 / 3; }
    .fdc-live-content .podium-avatar-placeholder { width: 42px !important; height: 42px !important; }
    .fdc-live-content .podium-athlete-meta {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .fdc-live-content .podium-block,
    .fdc-live-content .podium-crown {
        display: none;
    }
}
@media (max-width: 480px) {
    .fdc-live-content .fdc-live-filters {
        flex-wrap: wrap;
    }
    .fdc-live-content .fdc-filter-group {
        flex-basis: 100% !important;
    }
    .fdc-live-content .fdc-filter-group select {
        max-width: none !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    .fdc-live-container *, .fdc-live-header * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
