/* ============================================
   COURSE SUMMARY — Core Styles
   Premium golf SaaS aesthetic
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --cs-accent: #2E8B57;
    --cs-accent-light: #3DA86A;
    --cs-accent-subtle: rgba(46, 139, 87, 0.08);
    --cs-accent-border: rgba(46, 139, 87, 0.25);
    --cs-header-bg: var(--bs-body-bg);
    --cs-text-primary: var(--bs-emphasis-color);
    --cs-text-secondary: var(--bs-body-color);
    --cs-text-muted: var(--bs-secondary-color);
    --cs-border: var(--bs-border-color);
    --cs-card-bg: var(--bs-body-bg);
    --cs-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --cs-card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --cs-radius: 10px;
    --cs-radius-sm: 6px;
    --cs-transition: 0.2s ease;
    /* Par colors */
    --cs-par3-color: #3b82f6;
    --cs-par4-color: #64748b;
    --cs-par5-color: #22c55e;
    /* RTP scoring colors */
    --cs-rtp-easy: #22c55e;
    --cs-rtp-easier: #4ade80;
    --cs-rtp-neutral: #94a3b8;
    --cs-rtp-harder: #f59e0b;
    --cs-rtp-hard: #ef4444;
    /* Correlation chart (theme-aware) */
    --cs-corr-track-bg: rgba(15, 23, 42, 0.07);
    --cs-corr-fill-start: 30;
    --cs-corr-fill-end: 70;
}

/* Dark mode overrides */
[data-bs-theme="dark"] {
    --cs-corr-track-bg: rgba(15, 23, 42, 0.4);
    --cs-corr-fill-start: 15;
    --cs-corr-fill-end: 50;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.cs-page-header {
    padding: 1.5rem 0 1.25rem;
    border-bottom: 1px solid var(--cs-border);
    background: var(--cs-header-bg);
    position: relative;
}

    .cs-page-header::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 180px;
        height: 2px;
        background: var(--cs-accent);
    }

.cs-header-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cs-header-left {
    flex: 1;
    min-width: 200px;
}

.cs-page-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cs-accent);
    background: var(--cs-accent-subtle);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    margin-bottom: 0.35rem;
}

.cs-course-name {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--cs-text-muted);
    transition: all 0.3s ease;
}

.cs-course-name--active {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--cs-text-primary);
}

.cs-page-subtitle {
    font-size: 0.825rem;
    color: var(--cs-text-secondary);
    margin: 0.25rem 0 0;
    letter-spacing: 0.01em;
}

.cs-header-right {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-shrink: 0;
}

/* ============================================
   COURSE SELECTOR
   ============================================ */
.cs-course-selector {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cs-selector-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--cs-text-secondary);
    text-transform: uppercase;
}

.cs-selector-wrapper {
    position: relative;
    min-width: 280px;
}

.cs-selector-input {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 0.5rem 2.25rem 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cs-text-primary);
    background: var(--cs-card-bg);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-sm);
    cursor: pointer;
    transition: border-color var(--cs-transition), box-shadow var(--cs-transition);
    line-height: 1.4;
}

    .cs-selector-input:hover {
        border-color: var(--cs-accent-border);
    }

    .cs-selector-input:focus {
        outline: none;
        border-color: var(--cs-accent);
        box-shadow: 0 0 0 3px var(--cs-accent-subtle);
    }

    .cs-selector-input:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.cs-selector-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--cs-text-muted);
    font-size: 0.75rem;
}

/* ============================================
   WEATHER LINK
   ============================================ */
.cs-weather-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--cs-accent);
    background: var(--cs-accent-subtle);
    border: 1px solid var(--cs-accent-border);
    border-radius: var(--cs-radius-sm);
    text-decoration: none;
    transition: all var(--cs-transition);
    white-space: nowrap;
}

    .cs-weather-link:hover {
        background: var(--cs-accent);
        color: #fff;
        border-color: var(--cs-accent);
        text-decoration: none;
    }

    .cs-weather-link i {
        font-size: 1rem;
    }

/* ============================================
   COURSE META LINE (par · yardage · architect)
   ============================================ */
.cs-course-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.cs-meta-item {
    font-size: 0.825rem;
    color: var(--cs-text-secondary);
}

.cs-meta-muted {
    font-size: 0.825rem;
    color: var(--cs-text-secondary);
}

.cs-meta-dot {
    color: var(--cs-border);
    font-size: 0.7rem;
    margin: 0 1px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.cs-main-content {
    padding-top: 0;
    padding-bottom: 2rem;
}

/* ============================================
   SECTION HEADERS (reusable pattern for upcoming sections)
   ============================================ */
.cs-section-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.cs-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--cs-text-primary);
    margin: 0;
    white-space: nowrap;
}

.cs-section-line {
    flex: 1;
    height: 1px;
    background: var(--cs-border);
}

/* ============================================
   CARD BASE (reusable for upcoming sections)
   ============================================ */
.cs-card {
    background: var(--cs-card-bg);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    box-shadow: var(--cs-card-shadow);
    transition: box-shadow var(--cs-transition);
}

    .cs-card:hover {
        box-shadow: var(--cs-card-shadow-hover);
    }

.cs-card-body {
    padding: 1.25rem;
}

/* ============================================
   SECTION LABELS
   ============================================ */
.cs-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--cs-text-secondary);
    text-transform: uppercase;
}

/* ============================================
   RTP BADGE
   ============================================ */
.cs-rtp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--cs-radius-sm);
    background: var(--cs-accent-subtle);
    border: 1px solid var(--cs-accent-border);
}

.cs-rtp-badge-label {
    font-size: 0.7rem;
    color: var(--cs-text-secondary);
}

.cs-rtp-badge-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cs-accent);
}

/* ============================================
   LEGEND
   ============================================ */
.cs-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cs-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.cs-legend-text {
    font-size: 0.7rem;
    color: var(--cs-text-secondary);
}

/* ============================================
   FRONT 9 / BACK 9 TOGGLE (mobile only)
   ============================================ */
.cs-nine-toggle {
    display: none;
    background: var(--bs-tertiary-bg, #2b3035);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--cs-border);
    margin-bottom: 14px;
}

.cs-nine-toggle-btn {
    flex: 1;
    padding: 8px 0;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    color: var(--cs-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cs-nine-toggle-btn--active {
    background: var(--bs-body-bg);
    color: var(--cs-text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cs-nine-toggle-rtp {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
}

.cs-nine-toggle-rtp--easy {
    background: rgba(34, 197, 94, 0.12);
    color: var(--cs-rtp-easier);
}

.cs-nine-toggle-rtp--hard {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

/* ============================================
   HOLE-BY-HOLE RTP CHART
   ============================================ */
.cs-hole-chart {
    min-height: 200px;
}

.cs-rtp-chart {
    width: 100%;
}

/* Bars container */
.cs-rtp-bars {
    display: flex;
    align-items: stretch;
    height: 180px;
    position: relative;
}

.cs-rtp-parline {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--cs-border);
    z-index: 0;
}

.cs-rtp-parline-label {
    position: absolute;
    left: 0;
    top: -8px;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--cs-text-muted);
    letter-spacing: 0.05em;
}

.cs-rtp-bar-col {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.cs-rtp-bar {
    width: 55%;
    max-width: 24px;
    min-width: 6px;
    position: absolute;
    border-radius: 3px 3px 0 0;
    transition: height 0.4s ease;
}

.cs-rtp-bar--up {
    bottom: 50%;
}

.cs-rtp-bar--down {
    top: 50%;
    border-radius: 0 0 3px 3px;
}

/* Data rows below bars */
.cs-rtp-row {
    display: flex;
}

.cs-rtp-cell {
    flex: 1;
    text-align: center;
    padding: 1px 0;
}

.cs-rtp-val {
    font-size: 0.6rem;
    font-weight: 700;
}

.cs-rtp-holenum {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--cs-text-primary);
}

.cs-rtp-parlabel {
    font-size: 0.58rem;
    font-weight: 700;
}

.cs-rtp-yardage {
    font-size: 0.6rem;
    color: var(--cs-text-muted);
}

.cs-rtp-row--par-above {
    margin-bottom: 6px;
}

/* Visual break between front 9 and back 9 — inline summary columns */
.cs-rtp-nine-inline {
    width: 60px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-left: 1px solid var(--cs-border);
    gap: 1px;
}

.cs-rtp-nine-inline--out {
    border-right: 1px solid var(--cs-border);
}

.cs-rtp-nine-inline--total {
    background: rgba(46, 139, 87, 0.04);
}

.cs-rtp-nine-inline--bar {
    height: 100%;
    position: relative;
}

.cs-rtp-nine-inline-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--cs-text-secondary);
    text-transform: uppercase;
}

.cs-rtp-nine-inline-par {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--cs-text-secondary);
}

.cs-rtp-nine-summary-val {
    font-size: 0.75rem;
    font-weight: 800;
}

.cs-rtp-nine-summary-yds {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--cs-text-secondary);
}

/* Summary bars for OUT/IN columns */
.cs-rtp-summary-bar {
    position: absolute;
    width: 22px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
    transition: height 0.4s ease;
}

.cs-rtp-summary-bar--up {
    bottom: 50%;
    border-radius: 4px 4px 1px 1px;
}

.cs-rtp-summary-bar--down {
    top: 50%;
    border-radius: 1px 1px 4px 4px;
}

/* TOT column: side-by-side front/back comparison */
.cs-rtp-tot-compare {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
    width: 26px;
}

.cs-rtp-tot-bar {
    position: absolute;
    width: 10px;
    border-radius: 3px;
    transition: height 0.4s ease;
}

.cs-rtp-tot-compare > .cs-rtp-tot-bar:first-child {
    left: 0;
}

.cs-rtp-tot-compare > .cs-rtp-tot-bar:last-child {
    right: 0;
}

.cs-rtp-tot-bar--up {
    bottom: 50%;
    border-radius: 3px 3px 0 0;
}

.cs-rtp-tot-bar--down {
    top: 50%;
    border-radius: 0 0 3px 3px;
}

/* TOT legend (below chart) */
.cs-rtp-tot-legend {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 6px;
}

.cs-rtp-tot-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.55rem;
    color: var(--bs-tertiary-color, #6c757d);
}

.cs-rtp-tot-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    opacity: 0.6;
}

/* ============================================
   EASIEST / HARDEST EXTREMES
   ============================================ */
.cs-hole-extremes {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--cs-border);
    flex-wrap: wrap;
}

.cs-hole-extremes-side {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cs-hole-extremes-side--right {
    justify-content: flex-end;
}

.cs-hole-extremes-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cs-hole-extremes-label--easy {
    color: var(--cs-rtp-easy);
}

.cs-hole-extremes-label--hard {
    color: var(--cs-rtp-hard);
}

.cs-hole-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
}

.cs-hole-pill--easy {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.cs-hole-pill--hard {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.cs-hole-pill-num {
    font-weight: 700;
}

.cs-hole-pill--easy .cs-hole-pill-num {
    color: var(--cs-rtp-easier);
}

.cs-hole-pill--hard .cs-hole-pill-num {
    color: #f87171;
}

.cs-hole-pill-par {
    color: var(--cs-text-muted);
}

.cs-hole-pill-rtp {
    font-weight: 600;
}

.cs-hole-pill--easy .cs-hole-pill-rtp {
    color: var(--cs-rtp-easy);
}

.cs-hole-pill--hard .cs-hole-pill-rtp {
    color: var(--cs-rtp-hard);
}

/* ============================================
   SURFACE CONDITION CARDS
   ============================================ */
.cs-surface-card {
    flex: 1;
    min-width: 140px;
    background: var(--cs-card-bg);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    padding: 1rem 1.25rem;
    transition: border-color var(--cs-transition);
}

    .cs-surface-card:hover {
        border-color: var(--cs-accent-border);
    }

.cs-surface-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.5rem;
}

.cs-surface-card-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--cs-text-secondary);
    text-transform: uppercase;
}

.cs-surface-card-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cs-text-primary);
}

.cs-surface-card-sub {
    font-size: 0.75rem;
    color: var(--cs-text-muted);
    margin-top: 0.2rem;
}

/* ============================================
   PAR AVERAGE CARDS
   ============================================ */
.cs-par-avg-card {
    flex: 1;
    min-width: 90px;
    background: var(--cs-card-bg);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    padding: 0.875rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: border-color var(--cs-transition);
}

    .cs-par-avg-card:hover {
        border-color: var(--cs-accent-border);
    }

.cs-par-avg-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.cs-par-avg-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cs-text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.cs-par-avg-sub {
    font-size: 0.65rem;
    color: var(--cs-text-muted);
    margin-top: 0.15rem;
}

/* ============================================
   CORRELATIONS BAR CHART
   ============================================ */
.cs-corr-years {
    font-size: 0.65rem;
    color: var(--cs-text-secondary);
}

/* Window tabs */
.cs-corr-tabs {
    display: flex;
    background: var(--bs-tertiary-bg, #2b3035);
    border-radius: 7px;
    padding: 2px;
    border: 1px solid var(--cs-border);
    margin-bottom: 16px;
}

.cs-corr-tab {
    flex: 1;
    padding: 6px 0;
    font-size: 0.65rem;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    color: var(--cs-text-muted);
}

    .cs-corr-tab:hover {
        color: var(--cs-text-secondary);
    }

.cs-corr-tab--active {
    background: var(--bs-body-bg);
    color: var(--cs-text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cs-corr-tab--best-active {
    background: rgba(59, 155, 107, 0.2);
    color: var(--cs-rtp-easier);
}

/* Bar rows */
.cs-corr-bars {
    min-height: 80px;
}

.cs-corr-bar-row {
    display: flex;
    align-items: center;
    padding: 3px 0;
    margin-bottom: 1px;
}

.cs-corr-bar-rank {
    width: 18px;
    text-align: right;
    font-size: 0.65rem;
    font-weight: 700;
    margin-right: 8px;
    flex-shrink: 0;
    color: var(--cs-text-secondary);
}

.cs-corr-bar-rank--top {
    color: var(--cs-rtp-easier);
}

.cs-corr-bar-name {
    width: 120px;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--cs-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-corr-bar-name--top {
    font-weight: 700;
    color: var(--cs-text-primary);
}

.cs-corr-bar-track {
    flex: 1;
    height: 22px;
    background: var(--cs-corr-track-bg);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    margin-right: 8px;
}

.cs-corr-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.cs-corr-bar-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2.5px;
    border-radius: 3px 0 0 3px;
}

.cs-corr-bar-val {
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 44px;
    text-align: right;
    flex-shrink: 0;
}

.cs-corr-bar-win {
    font-size: 0.55rem;
    font-weight: 700;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--cs-accent-subtle);
    color: var(--cs-accent);
    flex-shrink: 0;
}

.cs-corr-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--cs-border);
    font-size: 0.6rem;
    color: var(--bs-tertiary-color, #6c757d);
}

/* Placeholder panel for future right column */
.cs-placeholder-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--cs-border);
    border-radius: var(--cs-radius-sm);
    min-height: 200px;
}

.cs-placeholder-inner {
    text-align: center;
    color: var(--bs-tertiary-color, #6c757d);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* ============================================
   COURSE PROFILE (SVG Hole Diagram)
   ============================================ */
.cs-profile-chart {
    height: 420px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cs-profile-svg {
    width: 100%;
    height: 100%;
    transition: all 0.5s ease;
}

.cs-profile-fade {
    transition: opacity 0.4s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .cs-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cs-header-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .cs-selector-wrapper {
        min-width: 100%;
    }

    .cs-weather-link {
        justify-content: center;
    }

    /* Show Front 9 / Back 9 toggle on mobile */
    .cs-nine-toggle {
        display: flex;
    }

    .cs-rtp-bars {
        height: 140px;
    }

    .cs-rtp-val,
    .cs-rtp-parlabel,
    .cs-rtp-yardage {
        font-size: 0.55rem;
    }

    .cs-rtp-holenum {
        font-size: 0.7rem;
    }

    .cs-hole-extremes {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cs-hole-extremes-side--right {
        justify-content: flex-start;
    }

    .cs-surface-card {
        min-width: 100px;
    }

    .cs-hole-chart .cs-rtp-bar {
        max-width: 32px;
    }

    /* Hide inline summaries and TOT legend on mobile since toggle handles it */
    .cs-rtp-nine-inline {
        display: none;
    }

    .cs-rtp-tot-legend {
        display: none;
    }

    .cs-corr-bar-name {
        width: 100px;
        font-size: 0.65rem;
    }

    .cs-corr-bar-track {
        height: 18px;
    }

    .cs-corr-bar-val {
        font-size: 0.6rem;
        min-width: 38px;
    }

    .cs-corr-bar-win {
        display: none;
    }

    .cs-profile-chart {
        height: 320px;
    }
}

@media (max-width: 480px) {
    .cs-course-name--active {
        font-size: 1.3rem;
    }

    .cs-quick-stat-value {
        font-size: 0.875rem;
    }
}

/* ============================================
   SURFACE CONDITIONS — INLINE HEADER
   ============================================ */
.cs-surface-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.cs-surface-inline-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cs-surface-inline-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cs-surface-inline-label {
    font-size: 0.725rem;
    color: var(--cs-text-muted);
}

.cs-surface-inline-value {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--cs-text-primary);
}

.cs-surface-inline-sub {
    font-size: 0.675rem;
    color: var(--cs-text-muted);
}

/* ============================================
   PAR AVERAGE PILLS — INLINE IN CHART HEADER
   ============================================ */
.cs-par-avg-pills {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
}

.cs-par-avg-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: var(--cs-radius-sm);
    background: color-mix(in srgb, var(--pill-color) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--pill-color) 20%, transparent);
}

.cs-par-avg-pill-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--pill-color);
}

.cs-par-avg-pill-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--cs-text-primary);
    letter-spacing: -0.01em;
}

.cs-par-avg-pill-unit {
    font-size: 0.55rem;
    color: var(--cs-text-muted);
}

/* ---- Responsive: stack par pills below RTP on small screens ---- */
@media (max-width: 768px) {
    .cs-surface-inline {
        gap: 4px;
    }

    .cs-surface-inline-label {
        font-size: 0.65rem;
    }

    .cs-surface-inline-sub {
        display: none;
    }

    .cs-par-avg-pills {
        margin-left: 0;
    }

    .cs-par-avg-pill {
        padding: 2px 6px;
    }

    .cs-par-avg-pill-value {
        font-size: 0.7rem;
    }
}

/* ============================================
   COURSE SUMMARY — Core Styles
   Premium golf SaaS aesthetic
   ============================================ */

/* ---- CSS Variables ---- */
:root {
    --cs-accent: #2E8B57;
    --cs-accent-light: #3DA86A;
    --cs-accent-subtle: rgba(46, 139, 87, 0.08);
    --cs-accent-border: rgba(46, 139, 87, 0.25);
    --cs-header-bg: var(--bs-body-bg);
    --cs-text-primary: var(--bs-emphasis-color);
    --cs-text-secondary: var(--bs-body-color);
    --cs-text-muted: var(--bs-secondary-color);
    --cs-border: var(--bs-border-color);
    --cs-card-bg: var(--bs-body-bg);
    --cs-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --cs-card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --cs-radius: 10px;
    --cs-radius-sm: 6px;
    --cs-transition: 0.2s ease;
    /* Par colors */
    --cs-par3-color: #3b82f6;
    --cs-par4-color: #64748b;
    --cs-par5-color: #22c55e;
    /* RTP scoring colors */
    --cs-rtp-easy: #22c55e;
    --cs-rtp-easier: #4ade80;
    --cs-rtp-neutral: #94a3b8;
    --cs-rtp-harder: #f59e0b;
    --cs-rtp-hard: #ef4444;
}

/* ============================================
   PAGE HEADER
   ============================================ */
.cs-page-header {
    padding: 1.5rem 0 1.25rem;
    border-bottom: 1px solid var(--cs-border);
    background: var(--cs-header-bg);
    position: relative;
}

    .cs-page-header::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 180px;
        height: 2px;
        background: var(--cs-accent);
    }

.cs-header-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cs-header-left {
    flex: 1;
    min-width: 200px;
}

.cs-page-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cs-accent);
    background: var(--cs-accent-subtle);
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    margin-bottom: 0.35rem;
}

.cs-course-name {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
    color: var(--cs-text-muted);
    transition: all 0.3s ease;
}

.cs-course-name--active {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--cs-text-primary);
}

.cs-page-subtitle {
    font-size: 0.825rem;
    color: var(--cs-text-secondary);
    margin: 0.25rem 0 0;
    letter-spacing: 0.01em;
}

.cs-header-right {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-shrink: 0;
}

/* ============================================
   COURSE SELECTOR
   ============================================ */
.cs-course-selector {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cs-selector-label {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--cs-text-secondary);
    text-transform: uppercase;
}

.cs-selector-wrapper {
    position: relative;
    min-width: 280px;
}

.cs-selector-input {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 0.5rem 2.25rem 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--cs-text-primary);
    background: var(--cs-card-bg);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius-sm);
    cursor: pointer;
    transition: border-color var(--cs-transition), box-shadow var(--cs-transition);
    line-height: 1.4;
}

    .cs-selector-input:hover {
        border-color: var(--cs-accent-border);
    }

    .cs-selector-input:focus {
        outline: none;
        border-color: var(--cs-accent);
        box-shadow: 0 0 0 3px var(--cs-accent-subtle);
    }

    .cs-selector-input:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.cs-selector-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--cs-text-muted);
    font-size: 0.75rem;
}

/* ============================================
   WEATHER LINK
   ============================================ */
.cs-weather-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--cs-accent);
    background: var(--cs-accent-subtle);
    border: 1px solid var(--cs-accent-border);
    border-radius: var(--cs-radius-sm);
    text-decoration: none;
    transition: all var(--cs-transition);
    white-space: nowrap;
}

    .cs-weather-link:hover {
        background: var(--cs-accent);
        color: #fff;
        border-color: var(--cs-accent);
        text-decoration: none;
    }

    .cs-weather-link i {
        font-size: 1rem;
    }

/* ============================================
   COURSE META LINE (par · yardage · architect)
   ============================================ */
.cs-course-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.cs-meta-item {
    font-size: 0.825rem;
    color: var(--cs-text-secondary);
}

.cs-meta-muted {
    font-size: 0.825rem;
    color: var(--cs-text-secondary);
}

.cs-meta-dot {
    color: var(--cs-border);
    font-size: 0.7rem;
    margin: 0 1px;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.cs-main-content {
    padding-top: 0;
    padding-bottom: 2rem;
}

/* ============================================
   SECTION HEADERS (reusable pattern for upcoming sections)
   ============================================ */
.cs-section-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.cs-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--cs-text-primary);
    margin: 0;
    white-space: nowrap;
}

.cs-section-line {
    flex: 1;
    height: 1px;
    background: var(--cs-border);
}

/* ============================================
   CARD BASE (reusable for upcoming sections)
   ============================================ */
.cs-card {
    background: var(--cs-card-bg);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    box-shadow: var(--cs-card-shadow);
    transition: box-shadow var(--cs-transition);
}

    .cs-card:hover {
        box-shadow: var(--cs-card-shadow-hover);
    }

.cs-card-body {
    padding: 1.25rem;
}

/* ============================================
   SECTION LABELS
   ============================================ */
.cs-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--cs-text-secondary);
    text-transform: uppercase;
}

/* ============================================
   RTP BADGE
   ============================================ */
.cs-rtp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: var(--cs-radius-sm);
    background: var(--cs-accent-subtle);
    border: 1px solid var(--cs-accent-border);
}

.cs-rtp-badge-label {
    font-size: 0.7rem;
    color: var(--cs-text-secondary);
}

.cs-rtp-badge-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cs-accent);
}

/* ============================================
   LEGEND
   ============================================ */
.cs-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.cs-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

.cs-legend-text {
    font-size: 0.7rem;
    color: var(--cs-text-secondary);
}

/* ============================================
   FRONT 9 / BACK 9 TOGGLE (mobile only)
   ============================================ */
.cs-nine-toggle {
    display: none;
    background: var(--bs-tertiary-bg, #2b3035);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--cs-border);
    margin-bottom: 14px;
}

.cs-nine-toggle-btn {
    flex: 1;
    padding: 8px 0;
    font-size: 0.75rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    color: var(--cs-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cs-nine-toggle-btn--active {
    background: var(--bs-body-bg);
    color: var(--cs-text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cs-nine-toggle-rtp {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
}

.cs-nine-toggle-rtp--easy {
    background: rgba(34, 197, 94, 0.12);
    color: var(--cs-rtp-easier);
}

.cs-nine-toggle-rtp--hard {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

/* ============================================
   HOLE-BY-HOLE RTP CHART
   ============================================ */
.cs-hole-chart {
    min-height: 200px;
}

.cs-rtp-chart {
    width: 100%;
}

/* Bars container */
.cs-rtp-bars {
    display: flex;
    align-items: stretch;
    height: 180px;
    position: relative;
}

.cs-rtp-parline {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--cs-border);
    z-index: 0;
}

.cs-rtp-parline-label {
    position: absolute;
    left: 0;
    top: -8px;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--cs-text-muted);
    letter-spacing: 0.05em;
}

.cs-rtp-bar-col {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.cs-rtp-bar {
    width: 55%;
    max-width: 24px;
    min-width: 6px;
    position: absolute;
    border-radius: 3px 3px 0 0;
    transition: height 0.4s ease;
}

.cs-rtp-bar--up {
    bottom: 50%;
}

.cs-rtp-bar--down {
    top: 50%;
    border-radius: 0 0 3px 3px;
}

/* Data rows below bars */
.cs-rtp-row {
    display: flex;
}

.cs-rtp-cell {
    flex: 1;
    text-align: center;
    padding: 1px 0;
}

.cs-rtp-val {
    font-size: 0.6rem;
    font-weight: 700;
}

.cs-rtp-holenum {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--cs-text-primary);
}

.cs-rtp-parlabel {
    font-size: 0.58rem;
    font-weight: 700;
}

.cs-rtp-yardage {
    font-size: 0.6rem;
    color: var(--cs-text-muted);
}

.cs-rtp-row--par-above {
    margin-bottom: 6px;
}

/* Visual break between front 9 and back 9 — inline summary columns */
.cs-rtp-nine-inline {
    width: 60px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-left: 1px solid var(--cs-border);
    gap: 1px;
}

.cs-rtp-nine-inline--out {
    border-right: 1px solid var(--cs-border);
}

.cs-rtp-nine-inline--total {
    background: rgba(46, 139, 87, 0.04);
}

.cs-rtp-nine-inline--bar {
    height: 100%;
    position: relative;
}

.cs-rtp-nine-inline-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--cs-text-secondary);
    text-transform: uppercase;
}

.cs-rtp-nine-inline-par {
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--cs-text-secondary);
}

.cs-rtp-nine-summary-val {
    font-size: 0.75rem;
    font-weight: 800;
}

.cs-rtp-nine-summary-yds {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--cs-text-secondary);
}

/* Summary bars for OUT/IN columns */
.cs-rtp-summary-bar {
    position: absolute;
    width: 22px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
    transition: height 0.4s ease;
}

.cs-rtp-summary-bar--up {
    bottom: 50%;
    border-radius: 4px 4px 1px 1px;
}

.cs-rtp-summary-bar--down {
    top: 50%;
    border-radius: 1px 1px 4px 4px;
}

/* TOT column: side-by-side front/back comparison */
.cs-rtp-tot-compare {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
    width: 26px;
}

.cs-rtp-tot-bar {
    position: absolute;
    width: 10px;
    border-radius: 3px;
    transition: height 0.4s ease;
}

.cs-rtp-tot-compare > .cs-rtp-tot-bar:first-child {
    left: 0;
}

.cs-rtp-tot-compare > .cs-rtp-tot-bar:last-child {
    right: 0;
}

.cs-rtp-tot-bar--up {
    bottom: 50%;
    border-radius: 3px 3px 0 0;
}

.cs-rtp-tot-bar--down {
    top: 50%;
    border-radius: 0 0 3px 3px;
}

/* TOT legend (below chart) */
.cs-rtp-tot-legend {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 6px;
}

.cs-rtp-tot-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.55rem;
    color: var(--bs-tertiary-color, #6c757d);
}

.cs-rtp-tot-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    opacity: 0.6;
}

/* ============================================
   EASIEST / HARDEST EXTREMES
   ============================================ */
.cs-hole-extremes {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--cs-border);
    flex-wrap: wrap;
}

.cs-hole-extremes-side {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cs-hole-extremes-side--right {
    justify-content: flex-end;
}

.cs-hole-extremes-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.cs-hole-extremes-label--easy {
    color: var(--cs-rtp-easy);
}

.cs-hole-extremes-label--hard {
    color: var(--cs-rtp-hard);
}

.cs-hole-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.65rem;
}

.cs-hole-pill--easy {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.cs-hole-pill--hard {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.cs-hole-pill-num {
    font-weight: 700;
}

.cs-hole-pill--easy .cs-hole-pill-num {
    color: var(--cs-rtp-easier);
}

.cs-hole-pill--hard .cs-hole-pill-num {
    color: #f87171;
}

.cs-hole-pill-par {
    color: var(--cs-text-muted);
}

.cs-hole-pill-rtp {
    font-weight: 600;
}

.cs-hole-pill--easy .cs-hole-pill-rtp {
    color: var(--cs-rtp-easy);
}

.cs-hole-pill--hard .cs-hole-pill-rtp {
    color: var(--cs-rtp-hard);
}

/* ============================================
   SURFACE CONDITION CARDS
   ============================================ */
.cs-surface-card {
    flex: 1;
    min-width: 140px;
    background: var(--cs-card-bg);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    padding: 1rem 1.25rem;
    transition: border-color var(--cs-transition);
}

    .cs-surface-card:hover {
        border-color: var(--cs-accent-border);
    }

.cs-surface-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.5rem;
}

.cs-surface-card-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--cs-text-secondary);
    text-transform: uppercase;
}

.cs-surface-card-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cs-text-primary);
}

.cs-surface-card-sub {
    font-size: 0.75rem;
    color: var(--cs-text-muted);
    margin-top: 0.2rem;
}

/* ============================================
   PAR AVERAGE CARDS
   ============================================ */
.cs-par-avg-card {
    flex: 1;
    min-width: 90px;
    background: var(--cs-card-bg);
    border: 1px solid var(--cs-border);
    border-radius: var(--cs-radius);
    padding: 0.875rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: border-color var(--cs-transition);
}

    .cs-par-avg-card:hover {
        border-color: var(--cs-accent-border);
    }

.cs-par-avg-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.cs-par-avg-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cs-text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.cs-par-avg-sub {
    font-size: 0.65rem;
    color: var(--cs-text-muted);
    margin-top: 0.15rem;
}

/* ============================================
   CORRELATIONS BAR CHART
   ============================================ */
.cs-corr-years {
    font-size: 0.65rem;
    color: var(--cs-text-secondary);
}

/* Window tabs */
.cs-corr-tabs {
    display: flex;
    background: var(--bs-tertiary-bg, #2b3035);
    border-radius: 7px;
    padding: 2px;
    border: 1px solid var(--cs-border);
    margin-bottom: 16px;
}

.cs-corr-tab {
    flex: 1;
    padding: 6px 0;
    font-size: 0.65rem;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    color: var(--cs-text-muted);
}

    .cs-corr-tab:hover {
        color: var(--cs-text-secondary);
    }

.cs-corr-tab--active {
    background: var(--bs-body-bg);
    color: var(--cs-text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cs-corr-tab--best-active {
    background: rgba(59, 155, 107, 0.2);
    color: var(--cs-rtp-easier);
}

/* Bar rows */
.cs-corr-bars {
    min-height: 80px;
}

.cs-corr-bar-row {
    display: flex;
    align-items: center;
    padding: 3px 0;
    margin-bottom: 1px;
}

.cs-corr-bar-rank {
    width: 18px;
    text-align: right;
    font-size: 0.65rem;
    font-weight: 700;
    margin-right: 8px;
    flex-shrink: 0;
    color: var(--cs-text-secondary);
}

.cs-corr-bar-rank--top {
    color: var(--cs-rtp-easier);
}

.cs-corr-bar-name {
    width: 120px;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--cs-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-corr-bar-name--top {
    font-weight: 700;
    color: var(--cs-text-primary);
}

.cs-corr-bar-track {
    flex: 1;
    height: 22px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    margin-right: 8px;
}

.cs-corr-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.cs-corr-bar-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2.5px;
    border-radius: 3px 0 0 3px;
}

.cs-corr-bar-val {
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 44px;
    text-align: right;
    flex-shrink: 0;
}

.cs-corr-bar-win {
    font-size: 0.55rem;
    font-weight: 700;
    margin-left: 6px;
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--cs-accent-subtle);
    color: var(--cs-accent);
    flex-shrink: 0;
}

.cs-corr-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--cs-border);
    font-size: 0.6rem;
    color: var(--bs-tertiary-color, #6c757d);
}

/* Placeholder panel for future right column */
.cs-placeholder-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--cs-border);
    border-radius: var(--cs-radius-sm);
    min-height: 200px;
}

.cs-placeholder-inner {
    text-align: center;
    color: var(--bs-tertiary-color, #6c757d);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* ============================================
   COURSE PROFILE (SVG Hole Diagram)
   ============================================ */
.cs-profile-chart {
    height: 420px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cs-profile-svg {
    width: 100%;
    height: 100%;
    transition: all 0.5s ease;
}

.cs-profile-fade {
    transition: opacity 0.4s ease;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .cs-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .cs-header-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .cs-selector-wrapper {
        min-width: 100%;
    }

    .cs-weather-link {
        justify-content: center;
    }

    /* Show Front 9 / Back 9 toggle on mobile */
    .cs-nine-toggle {
        display: flex;
    }

    .cs-rtp-bars {
        height: 140px;
    }

    .cs-rtp-val,
    .cs-rtp-parlabel,
    .cs-rtp-yardage {
        font-size: 0.55rem;
    }

    .cs-rtp-holenum {
        font-size: 0.7rem;
    }

    .cs-hole-extremes {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cs-hole-extremes-side--right {
        justify-content: flex-start;
    }

    .cs-surface-card {
        min-width: 100px;
    }

    .cs-hole-chart .cs-rtp-bar {
        max-width: 32px;
    }

    /* Hide inline summaries and TOT legend on mobile since toggle handles it */
    .cs-rtp-nine-inline {
        display: none;
    }

    .cs-rtp-tot-legend {
        display: none;
    }

    .cs-corr-bar-name {
        width: 100px;
        font-size: 0.65rem;
    }

    .cs-corr-bar-track {
        height: 18px;
    }

    .cs-corr-bar-val {
        font-size: 0.6rem;
        min-width: 38px;
    }

    .cs-corr-bar-win {
        display: none;
    }

    .cs-profile-chart {
        height: 320px;
    }
}

@media (max-width: 480px) {
    .cs-course-name--active {
        font-size: 1.3rem;
    }

    .cs-quick-stat-value {
        font-size: 0.875rem;
    }
}

/* ============================================
   PAST WINNERS — Column Groups Layout
   ============================================ */
.cs-winners-container {
    overflow-x: auto;
}

.cs-w-table {
    min-width: 820px;
}

.cs-w-row {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 12px 8px;
    border-bottom: 1px solid var(--bs-border-color-translucent);
    transition: background 0.15s;
}

    .cs-w-row:hover:not(.cs-w-row--header) {
        background: var(--bs-tertiary-bg);
    }

.cs-w-row--header {
    padding: 0 8px 10px;
    border-bottom: 1px solid var(--bs-border-color);
    align-items: flex-end;
}

/* Fixed left columns */
.cs-w-player {
    flex: 0 0 175px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cs-w-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.cs-w-pinfo {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cs-w-pname {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cs-w-pyear {
    font-size: 0.74rem;
    opacity: 0.4;
}

.cs-w-rtp {
    flex: 0 0 48px;
    text-align: center;
}

.cs-w-rtp-val {
    font-weight: 700;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

.cs-w-odds {
    flex: 0 0 72px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cs-w-odds-main {
    font-weight: 600;
    font-size: 0.84rem;
}

.cs-w-dk {
    font-size: 0.68rem;
    opacity: 0.4;
}

/* Column Groups */
.cs-w-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 10px;
    min-width: 0;
}

.cs-w-group--win {
    border-left: 2px solid rgba(34, 197, 94, 0.25);
    margin-left: 8px;
}

.cs-w-group--form {
    border-left: 2px solid rgba(59, 130, 246, 0.2);
}

/* Group headers */
.cs-w-group-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5px;
    white-space: nowrap;
}

.cs-w-group--win .cs-w-group-label {
    color: #22c55e;
    opacity: 0.7;
}

.cs-w-group--form .cs-w-group-label {
    color: #60a5fa;
    opacity: 0.7;
}

.cs-w-group-window {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    padding: 1px 5px;
    border-radius: 2px;
    font-size: 0.62rem;
    margin-left: 4px;
}

/* Column grid inside groups */
.cs-w-group-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr) 1.2fr;
    gap: 4px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    opacity: 0.45;
}

.cs-w-group-data {
    font-size: 0.86rem;
    font-variant-numeric: tabular-nums;
    opacity: 1;
    text-transform: none;
    letter-spacing: 0;
}

.cs-w-tot-hdr {
    font-weight: 700;
}

.cs-w-tot {
    font-weight: 700;
    font-size: 0.92rem;
}

/* Form meta line */
.cs-w-form-meta {
    font-size: 0.68rem;
    opacity: 0.4;
    text-align: center;
    margin-top: 3px;
}

/* SG Coloring */
.cs-w-pos {
    color: #22c55e;
}

.cs-w-neg {
    color: #ef4444;
}

.cs-w-neu {
    opacity: 0.5;
}

.cs-w-na {
    opacity: 0.25;
}

/* Header row */
.cs-w-row--header .cs-w-player,
.cs-w-row--header .cs-w-rtp,
.cs-w-row--header .cs-w-odds {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.45;
}

@media (max-width: 992px) {
    .cs-w-table {
        min-width: 740px;
    }

    .cs-w-player {
        flex: 0 0 150px;
    }

    .cs-w-odds {
        flex: 0 0 58px;
    }

    .cs-w-group-data {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .cs-w-table {
        min-width: 650px;
    }

    .cs-w-player {
        flex: 0 0 125px;
    }

    .cs-w-avatar {
        width: 28px;
        height: 28px;
    }

    .cs-w-pname {
        font-size: 0.78rem;
    }

    .cs-w-odds {
        display: none;
    }

    .cs-w-group-data {
        font-size: 0.76rem;
    }
}