/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-dark: #14532d;
    --green-mid: #166534;
    --green-light: #22c55e;
    --green-pale: #f0fdf4;
    --green-accent: #059669;
    --gold: #d4a44c;
    --gold-dark: #b8860b;
    --cream: #faf8f2;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --red: #ef4444;
    --blue: #3b82f6;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'DM Serif Display', Georgia, serif;
    --radius: 12px;
    --shadow: 0 2px 8px rgba(20, 83, 45, 0.08);
    --shadow-lg: 0 8px 24px rgba(20, 83, 45, 0.12);
}

body {
    font-family: var(--font);
    background: var(--cream);
    color: var(--gray-900);
    min-height: 100vh;
}

/* ===== Header ===== */
header {
    background: linear-gradient(135deg, #0f3d1f, var(--green-dark), var(--green-mid));
    color: var(--white);
    padding: 1.75rem 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    box-shadow: 0 4px 16px rgba(20, 83, 45, 0.2);
}

.logo-mark {
    width: 46px;
    height: 46px;
    background: var(--gold);
    color: var(--green-dark);
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-text {
    text-align: left;
}

header h1 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.subtitle {
    opacity: 0.75;
    font-size: 0.9rem;
    margin-top: 0.2rem;
    font-style: italic;
    letter-spacing: 0.3px;
}

/* ===== Course Header ===== */
.course-header {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--green-dark);
}

.course-header h2 {
    margin-bottom: 0.25rem;
}

.course-header .section-desc {
    margin-bottom: 0.75rem;
}

.progress-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.progress-bar-container {
    background: var(--gray-200);
    border-radius: 20px;
    width: 200px;
    height: 22px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--green-mid), var(--green-light));
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease;
    min-width: 0;
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2), transparent);
    border-radius: 20px 20px 0 0;
}

.progress-text {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--green-dark);
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    background: var(--white);
    border-bottom: 2px solid var(--gray-200);
    overflow-x: auto;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tab {
    flex: 1;
    padding: 0.85rem 0.5rem;
    border: none;
    background: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab:hover {
    color: var(--green-accent);
    background: var(--green-pale);
}

.tab.active {
    color: var(--green-dark);
    border-bottom-color: var(--green-dark);
    font-weight: 600;
}

/* ===== Main Content ===== */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--green-dark);
    letter-spacing: 0.3px;
}

.section-desc {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ===== Hole Grid (BirdieBook) ===== */
.hole-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
}

.hole-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.75rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.hole-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--green-accent);
}

.hole-card.birdied {
    background: linear-gradient(135deg, var(--green-mid), var(--green-light));
    border-color: var(--green-dark);
    color: var(--white);
}

.hole-card.birdied .hole-number {
    color: var(--white);
}

.hole-card.birdied .hole-status {
    color: rgba(255,255,255,0.9);
}

.hole-number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--gray-700);
}

.hole-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin-bottom: 0.15rem;
}

.hole-card.birdied .hole-label {
    color: rgba(255,255,255,0.8);
}

.hole-status {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: var(--gray-500);
}

.birdie-count-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--gold);
    color: var(--green-dark);
    font-size: 0.65rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ===== All Birdies Section ===== */
.all-birdies-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.birdie-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-btn {
    padding: 0.4rem 0.9rem;
    border: 2px solid var(--gray-200);
    border-radius: 20px;
    background: var(--white);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--green-accent);
    color: var(--green-accent);
}

.filter-btn.active {
    background: var(--green-mid);
    border-color: var(--green-mid);
    color: var(--white);
}

.birdie-log-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.birdie-log-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.birdie-log-details {
    flex: 1;
}

.birdie-log-hole {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-900);
}

.birdie-log-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.1rem;
}

.birdie-log-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--green-dark);
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.95rem;
}

/* ===== Buttons ===== */
.btn {
    padding: 0.6rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--green-mid);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--green-dark);
}

.btn-birdie {
    background: var(--green-light);
    color: var(--white);
}

.btn-birdie:hover {
    background: var(--green-accent);
}

.btn-danger {
    background: none;
    color: var(--red);
    border: 1px solid var(--red);
}

.btn-danger:hover {
    background: var(--red);
    color: var(--white);
}

/* ===== Stats Cards ===== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 3px solid var(--green-mid);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    color: var(--green-dark);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* ===== Charts ===== */
.chart-container {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.chart-container h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--gray-700);
}

canvas {
    width: 100% !important;
    height: auto !important;
}

/* ===== Milestones ===== */
.milestone-section {
    margin-bottom: 1.5rem;
}

.milestone-section-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-200);
}

.milestone {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.milestone.achieved {
    border-left: 5px solid var(--gold);
    background: linear-gradient(90deg, rgba(212, 164, 76, 0.06), var(--white));
}

.milestone.pending {
    border-left: 4px solid var(--gray-200);
    opacity: 0.65;
}

.milestone-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.milestone-info {
    flex: 1;
}

.milestone-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.milestone-desc {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.15rem;
}

.milestone-date {
    font-size: 0.75rem;
    color: var(--gold-dark);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(20, 83, 45, 0.4);
    z-index: 100;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--green-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    line-height: 1;
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 1rem;
    max-height: 250px;
    overflow-y: auto;
}

.modal-body .birdie-date-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-date-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-date-row label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    flex-shrink: 0;
}

.modal-date-row input[type="date"] {
    flex: 1;
    padding: 0.4rem 0.5rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.9rem;
}

.modal-date-row input[type="date"]:focus {
    outline: none;
    border-color: var(--green-accent);
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ===== Section Header Row ===== */
.section-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.25rem;
}

.section-header-row h2 {
    margin-bottom: 0.1rem;
}

.btn-log-other {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* ===== Other Course Modal Form Fields ===== */
.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.form-field label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="date"],
.form-field select {
    padding: 0.5rem 0.65rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font);
    background: var(--white);
    color: var(--gray-900);
    transition: border-color 0.15s;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--green-accent);
}

.form-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* ===== Rounds & Scorecard ===== */
.rounds-filter {
    margin-bottom: 1rem;
}

.rounds-select {
    padding: 0.5rem 0.65rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font);
    background: var(--white);
    color: var(--gray-900);
    width: 100%;
    max-width: 250px;
}

.rounds-select:focus {
    outline: none;
    border-color: var(--green-accent);
}

.round-card {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--green-mid);
    overflow: hidden;
}

.round-card-main {
    padding: 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.round-card-main:hover {
    background: var(--gray-50);
}

.round-card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.4rem;
}

.round-card-course {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-900);
}

.round-card-date {
    font-size: 0.85rem;
    color: var(--green-dark);
    font-weight: 600;
}

.round-card-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--gray-500);
    flex-wrap: wrap;
}

.round-detail {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--gray-200);
}

.round-sg-section {
    margin-top: 1rem;
}

.round-sg-section h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    margin-top: 0.75rem;
}

.round-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

/* ===== Scorecard Modal ===== */
.scorecard-modal {
    max-width: 500px;
}

.scorecard-body {
    max-height: 65vh;
    overflow-y: auto;
}

.sc-hole-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
}

.sc-hole-num {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--green-dark);
}

.sc-hole-par {
    font-weight: 600;
    color: var(--gray-500);
    font-size: 1rem;
}

.sc-hole-of {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.sc-progress-bar {
    display: flex;
    gap: 3px;
    margin-bottom: 1.25rem;
}

.sc-progress-dot {
    flex: 1;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    transition: background 0.2s;
}

.sc-progress-dot.done {
    background: var(--green-light);
}

.sc-progress-dot.current {
    background: var(--gold);
}

.sc-field {
    margin-bottom: 1rem;
}

.sc-field label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-700);
    margin-bottom: 0.4rem;
}

.sc-btn-group {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.sc-btn {
    padding: 0.45rem 0.6rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    background: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.15s;
    min-width: 44px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}

.sc-btn:hover {
    border-color: var(--green-accent);
    color: var(--green-accent);
}

.sc-btn.selected {
    background: var(--green-mid);
    border-color: var(--green-mid);
    color: var(--white);
}

.sc-btn-num {
    font-size: 1rem;
    font-weight: 700;
}

.sc-btn-label {
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.85;
}

.sc-btn-group-binary {
    gap: 0.5rem;
}

.sc-btn-group-binary .sc-btn {
    flex: 1;
}

.sc-nav {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-small {
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* ===== Scorecard Summary ===== */
.sc-summary-header {
    margin-bottom: 0.75rem;
}

.sc-summary-header h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--green-dark);
}

.sc-summary-date {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.sc-summary-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sc-summary-stat {
    text-align: center;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.sc-summary-val {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--green-dark);
}

.sc-summary-diff {
    font-size: 0.85rem;
    font-weight: 600;
}

.sc-summary-diff.over {
    color: var(--red);
}

.sc-summary-diff.under {
    color: var(--green-light);
}

.sc-summary-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 0.15rem;
}

.sc-warning {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: #92400e;
    margin-bottom: 0.75rem;
}

/* ===== Scorecard Table ===== */
.scorecard-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 0.5rem;
}

.scorecard-table {
    border-collapse: collapse;
    min-width: 100%;
    font-size: 0.75rem;
}

.scorecard-table th,
.scorecard-table td {
    padding: 0.3rem 0.45rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    white-space: nowrap;
}

.scorecard-table .sc-table-header th {
    background: var(--green-dark);
    color: var(--white);
    font-weight: 600;
}

.scorecard-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

.scorecard-table .sc-total {
    font-weight: 700;
    background: var(--gray-100);
}

.score-eagle {
    background: #fef3c7;
    color: #92400e;
    font-weight: 700;
}

.score-birdie {
    background: var(--green-pale);
    color: var(--green-dark);
    font-weight: 700;
}

.score-bogey {
    background: #fef3c7;
    color: #92400e;
}

.score-dbl {
    background: #fee2e2;
    color: #991b1b;
}

/* ===== New Course Modal ===== */
#newCourseBody {
    max-height: 60vh;
    overflow-y: auto;
}

.nc-quick-fill {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.nc-quick-fill .btn {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.nc-quick-fill .btn:hover {
    background: var(--gray-200);
}

.nc-par-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(65px, 1fr));
    gap: 0.4rem;
}

.nc-par-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--gray-50);
    border-radius: 6px;
    padding: 0.25rem 0.4rem;
}

.nc-par-hole {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-500);
    min-width: 18px;
}

.nc-par-select {
    flex: 1;
    padding: 0.2rem;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    font-size: 0.85rem;
    background: var(--white);
}

/* ===== Strokes Gained Display ===== */
.sg-block {
    margin-bottom: 1.25rem;
}

.sg-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
    color: var(--gray-700);
}

.sg-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.sg-cards-inline {
    grid-template-columns: repeat(4, 1fr);
}

.sg-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 0.75rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.sg-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 400;
}

.sg-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.2rem;
}

.sg-positive {
    color: var(--green-light);
}

.sg-negative {
    color: var(--red);
}

.sg-neutral {
    color: var(--gray-500);
}

.sg-note {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-style: italic;
    margin-top: 0.5rem;
}

/* ===== Stats Toggle ===== */
.stats-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* ===== Responsive ===== */
@media (max-width: 500px) {
    header h1 {
        font-size: 1.5rem;
    }

    .logo-mark {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }

    .hole-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 0.5rem;
    }

    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .tab {
        font-size: 0.7rem;
        padding: 0.7rem 0.2rem;
    }

    .all-birdies-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .sc-summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .sg-cards-inline {
        grid-template-columns: repeat(2, 1fr);
    }

    .sg-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .round-card-stats {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .scorecard-modal {
        max-width: 100%;
    }

    .sc-btn {
        min-width: 38px;
        padding: 0.4rem 0.5rem;
        font-size: 0.85rem;
    }
}
