:root {
    --page-bg: linear-gradient(180deg, #f2efe7 0%, #dde8dc 100%);
    --panel-bg: rgba(255, 255, 255, 0.9);
    --panel-border: rgba(15, 23, 42, 0.08);
    --text-main: #18222f;
    --text-muted: #5d6b78;
    --brand: #0d6e6e;
    --brand-strong: #094b4b;
    --accent: #ffb347;
    --success-soft: #d7f0e1;
    --warning-soft: #fff0d1;
    --danger-soft: #f8d7da;
    --shadow-soft: 0 22px 40px rgba(17, 24, 39, 0.08);
    --radius-xl: 1.5rem;
    --radius-lg: 1rem;
    --font-display: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
}

body {
    min-height: 100vh;
    background: var(--page-bg);
    color: var(--text-main);
    font-family: var(--font-display);
}

.landing-shell,
.app-shell {
    min-height: 100vh;
}

.hero-card,
.app-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.hero-card {
    padding: 2rem;
}

.app-panel {
    padding: 1.25rem;
}

.focused-panel {
    max-width: 760px;
    margin-inline: auto;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(13, 110, 110, 0.1);
    color: var(--brand-strong);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.course-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: var(--shadow-soft);
}

.course-logo {
    width: 72px;
    height: 72px;
    border-radius: 1.25rem;
    object-fit: cover;
    background: white;
    box-shadow: 0 12px 24px rgba(13, 110, 110, 0.12);
}

.course-link-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-height: 100%;
    padding: 1.1rem 1.15rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.course-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(17, 24, 39, 0.09);
    border-color: rgba(13, 110, 110, 0.2);
}

.location-link-head {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    width: 100%;
}

.location-link-logo {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    object-fit: cover;
    background: white;
    box-shadow: 0 10px 22px rgba(13, 110, 110, 0.12);
    flex-shrink: 0;
}

.location-link-copy {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.course-link-pill {
    align-self: flex-start;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 179, 71, 0.18);
    color: #8b5200;
    font-weight: 700;
    font-size: 0.85rem;
}

.course-link-label {
    font-size: 1.05rem;
    font-weight: 700;
}

.course-link-meta {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.course-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.course-select-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    width: 100%;
    min-height: 100%;
    padding: 1.1rem 1.15rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: rgba(255, 255, 255, 0.78);
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.course-select-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(17, 24, 39, 0.09);
    border-color: rgba(13, 110, 110, 0.2);
}

.course-select-title {
    font-size: 1.05rem;
    font-weight: 700;
}

.course-select-meta {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.course-select-badge {
    align-self: flex-start;
    padding: 0.28rem 0.6rem;
    border-radius: 999px;
    background: rgba(40, 167, 69, 0.16);
    color: #236640;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.player-summary-card {
    height: 100%;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(15, 23, 42, 0.07);
}

.player-summary-card h3 {
    font-size: 1rem;
}

.player-summary-total {
    font-size: 1.95rem;
    font-weight: 800;
    line-height: 1;
}

.player-summary-meta {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    gap: 0.75rem;
}

.track-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    min-height: 120px;
    padding: 0.95rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: white;
    color: inherit;
    text-align: left;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.track-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.07);
}

.track-button.is-selected {
    border-color: rgba(13, 110, 110, 0.45);
    box-shadow: 0 0 0 3px rgba(13, 110, 110, 0.12);
}

.track-button.is-complete {
    background: linear-gradient(180deg, #ffffff 0%, #edf8f1 100%);
}

.track-button.is-locked {
    opacity: 0.62;
}

.track-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    background: rgba(13, 110, 110, 0.12);
    color: var(--brand-strong);
    font-weight: 800;
}

.track-name {
    font-weight: 700;
}

.track-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.track-status {
    margin-top: auto;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.track-status.is-open {
    background: rgba(255, 179, 71, 0.22);
    color: #865100;
}

.track-status.is-complete {
    background: rgba(40, 167, 69, 0.16);
    color: #236640;
}

.track-status.is-playing {
    background: rgba(13, 110, 110, 0.16);
    color: var(--brand-strong);
}

.track-status.is-review {
    background: rgba(10, 85, 140, 0.14);
    color: #0a558c;
}

.play-progress {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.score-rows {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.score-row {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.07);
}

.score-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.score-row-title {
    font-size: 1rem;
    font-weight: 700;
}

.score-selector {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.score-chip {
    border-radius: 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: white;
    font-weight: 700;
    padding: 0.75rem 0.5rem;
}

.score-chip.is-active {
    border-color: rgba(13, 110, 110, 0.55);
    background: rgba(13, 110, 110, 0.11);
    color: var(--brand-strong);
}

.score-chip.clear-chip {
    color: #7a1c23;
    background: #fff4f4;
}

.verify-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.verify-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.07);
}

.verify-player {
    font-size: 1rem;
    font-weight: 700;
}

.verify-meta {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.verify-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    min-height: 3rem;
    padding: 0.5rem 0.8rem;
    border-radius: 1rem;
    background: rgba(13, 110, 110, 0.1);
    color: var(--brand-strong);
    font-size: 1.4rem;
    font-weight: 800;
}

.celebration-card {
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(237, 248, 241, 0.88) 100%);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: var(--shadow-soft);
}

.celebration-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.celebration-logo {
    width: 76px;
    height: 76px;
    border-radius: 1.2rem;
    object-fit: cover;
    background: white;
    box-shadow: 0 12px 24px rgba(13, 110, 110, 0.12);
    flex-shrink: 0;
}

.celebration-results {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.celebration-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.celebration-row.is-first {
    background: linear-gradient(180deg, rgba(255, 247, 229, 0.98) 0%, rgba(255, 255, 255, 0.92) 100%);
    border-color: rgba(255, 179, 71, 0.28);
}

.celebration-place {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    min-height: 3rem;
    padding: 0.5rem;
    border-radius: 999px;
    background: rgba(13, 110, 110, 0.12);
    color: var(--brand-strong);
    font-size: 1.1rem;
    font-weight: 800;
}

.celebration-row.is-first .celebration-place {
    background: rgba(255, 179, 71, 0.22);
    color: #8b5200;
}

.celebration-player {
    font-size: 1.05rem;
    font-weight: 700;
}

.celebration-player-meta {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.celebration-total {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-strong);
}

.celebration-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.score-table {
    min-width: 640px;
}

.score-table th,
.score-table td {
    white-space: nowrap;
}

.score-table tbody tr.is-selected {
    background: rgba(13, 110, 110, 0.08);
}

.score-cell.is-empty {
    color: var(--text-muted);
}

.score-cell.is-par {
    color: #236640;
    font-weight: 700;
}

.score-cell.is-over {
    color: #8b5200;
    font-weight: 700;
}

.score-cell.is-under {
    color: #0a558c;
    font-weight: 700;
}

@media (max-width: 767.98px) {
    .hero-card,
    .app-panel,
    .course-brand {
        padding: 1rem;
    }

    .course-brand {
        align-items: flex-start;
    }

    .course-logo {
        width: 60px;
        height: 60px;
    }

    .location-link-logo {
        width: 56px;
        height: 56px;
    }

    .celebration-card {
        padding: 1rem;
    }

    .celebration-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .celebration-logo {
        width: 64px;
        height: 64px;
    }

    .celebration-row {
        grid-template-columns: auto 1fr;
    }

    .celebration-total {
        grid-column: 1 / -1;
        justify-self: end;
    }

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

    .score-table .par-column {
        display: none;
    }
}
