/* ==========================================================================
   Lil Golf Girl | Round Tracker & FairwayFeel Stylesheet
   Theme: Light & Crisp (Warm White #FAF9F6, Primary Pink #E7548E, Accent Gold #D4AF37, Slate #2C3E50)
   Matching the official Lil Golf Girl website aesthetics
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Open+Sans:wght@400;500;600;700&family=Dancing+Script:wght@600;700&display=swap');

:root {
    /* Brand Colors matching main site */
    --primary-pink: #E7548E;
    --primary-pink-hover: #C63F73;
    --primary-pink-soft: #F7A8C6;
    --primary-pink-light: #FFF0F5;
    --primary-pink-glow: rgba(231, 84, 142, 0.25);

    --accent-gold: #D4AF37;
    --accent-gold-hover: #BCA030;
    --accent-gold-light: #FCF7E6;
    --accent-gold-glow: rgba(212, 175, 55, 0.25);

    /* Backgrounds & Light Surfaces */
    --bg-color: #FAF9F6;
    --surface-color: #FFFFFF;
    --surface-card: #FFFFFF;
    --surface-hover: #FFF0F5;
    --surface-subtle: #F8FAFC;
    --surface-border: rgba(231, 84, 142, 0.22);
    --surface-border-gold: rgba(212, 175, 55, 0.3);
    --surface-border-subtle: rgba(0, 0, 0, 0.07);

    /* Typography Colors */
    --text-primary: #2C3E50;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-gold: #B48C14;
    --white: #FFFFFF;

    /* Compatibility Variables */
    --primary-color: #E7548E;
    --primary-active: #C63F73;
    --accent-color: #D4AF37;

    /* Feel Ratings (High contrast on light bg) */
    --rating-pure: #059669;
    --rating-good: #10B981;
    --rating-thin: #D97706;
    --rating-fat: #E11D48;
    --rating-shank: #9F1239;

    --danger-color: #EF4444;
    --good-color: #10B981;
    --meh-color: #F59E0B;
    --bad-color: #EF4444;

    /* Fonts */
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-script: 'Dancing Script', cursive;

    /* Shadows matching main site */
    --shadow-sm: 0 4px 6px -1px rgba(231, 84, 142, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 20px -3px rgba(231, 84, 142, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 20px 30px -5px rgba(231, 84, 142, 0.14), 0 8px 12px -4px rgba(0, 0, 0, 0.06);
    --shadow-btn: 0 8px 20px rgba(231, 84, 142, 0.35), 0 2px 6px rgba(212, 175, 55, 0.2);

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 10% 15%, rgba(231, 84, 142, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 90% 85%, rgba(212, 175, 55, 0.06) 0%, transparent 45%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: auto;
    padding: 14px 16px 48px 16px;
    max-width: 650px;
    margin: 0 auto;
    width: 100%;
}

/* ==========================================================================
   App Brand Top Bar
   ========================================================================== */
.app-brand-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 2px 14px 2px;
    border-bottom: 1px solid var(--surface-border);
    margin-bottom: 14px;
}

.app-brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.app-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(231, 84, 142, 0.2));
}

.app-logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.3px;
    line-height: 1;
}

.logo-lil { color: var(--primary-pink); }
.logo-golf { color: var(--text-primary); }
.logo-girl { color: var(--accent-gold); }
.logo-heart { color: var(--primary-pink); margin-left: 2px; font-size: 1.05rem; }

.app-brand-badge {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    background: var(--primary-pink-light);
    color: var(--primary-pink);
    border: 1px solid rgba(231, 84, 142, 0.3);
}

.app-brand-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: var(--radius-pill);
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.app-nav-btn:hover {
    background: var(--primary-pink-light);
    border-color: var(--primary-pink);
    color: var(--primary-pink);
    transform: translateY(-1px);
}

.app-nav-btn:active {
    transform: scale(0.96);
}

.app-nav-btn-danger {
    background: #FEF2F2;
    border-color: rgba(239, 68, 68, 0.25);
    color: #DC2626;
}

.app-nav-btn-danger:hover {
    background: #FEE2E2;
    border-color: #EF4444;
    color: #B91C1C;
}

/* ==========================================================================
   Header & Hole Info
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hole-info h1 {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    display: flex;
    align-items: center;
}

.stats {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 4px;
    display: flex;
    gap: 10px;
}

.stats span {
    background: var(--surface-card);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border-subtle);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.stats span span {
    color: var(--primary-pink);
    font-weight: 800;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

/* Buttons */
button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:active {
    transform: scale(0.96);
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--accent-gold) 100%);
    color: white;
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-btn);
}

.primary-btn:hover {
    filter: brightness(1.05);
    box-shadow: 0 10px 24px rgba(231, 84, 142, 0.4);
}

.secondary-btn {
    background: var(--surface-card);
    color: var(--text-primary);
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
}

.secondary-btn:hover {
    background: var(--primary-pink-light);
    color: var(--primary-pink);
    border-color: var(--primary-pink);
}

.record-btn {
    background: linear-gradient(135deg, #E7548E 0%, #D4AF37 100%);
    color: white;
    width: 100%;
    padding: 18px;
    font-size: 1.25rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--radius-xl);
    margin-top: 22px;
    box-shadow: var(--shadow-btn);
    border: none;
    position: relative;
    overflow: hidden;
}

.record-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(231, 84, 142, 0.45), 0 4px 12px rgba(212, 175, 55, 0.3);
}

.record-btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 10px rgba(231, 84, 142, 0.3);
}

/* Sections */
section {
    margin-bottom: 20px;
}

h2, h3 {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 700;
}

/* Club & Feel Selectors (Wrap Naturally, No Inner Scroll) */
.scroll-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0 10px 0;
}

.chip-btn {
    background-color: var(--surface-card);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.92rem;
    font-weight: 700;
    border: 1.5px solid var(--surface-border-subtle);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    text-align: center;
    line-height: 1.2;
}

.chip-btn:hover {
    background-color: var(--primary-pink-light);
    border-color: var(--primary-pink);
    color: var(--primary-pink);
    transform: translateY(-1px);
}

.chip-btn.selected {
    background: var(--primary-pink-light);
    border-color: var(--primary-pink);
    color: var(--primary-pink);
    box-shadow: 0 0 12px rgba(231, 84, 142, 0.35);
    font-weight: 800;
}

.action-btn {
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 8px;
}

/* Bag Configuration in Initial Overlay */
#bag-setup-container {
    margin-bottom: 20px;
    max-height: 48vh;
    overflow-y: auto;
    padding-right: 4px;
}

#bag-setup-container::-webkit-scrollbar {
    width: 5px;
}

#bag-setup-container::-webkit-scrollbar-thumb {
    background: var(--primary-pink);
    border-radius: 4px;
}

.bag-config-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}

.config-btn {
    background: var(--surface-card);
    border: 1.5px solid var(--surface-border-subtle);
    color: var(--text-secondary);
    padding: 7px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.config-btn:hover {
    background: var(--primary-pink-light);
    border-color: var(--primary-pink);
    color: var(--primary-pink);
}

.config-btn.active {
    background: var(--primary-pink-light);
    border-color: var(--primary-pink);
    color: var(--primary-pink);
    box-shadow: 0 0 8px rgba(231, 84, 142, 0.25);
    font-weight: 800;
}

/* Feel Selector (Grid) */
.grid-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.feel-btn {
    background-color: var(--surface-card);
    color: var(--text-primary);
    padding: 14px 10px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1.5px solid var(--surface-border-subtle);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.feel-btn:hover {
    background-color: var(--primary-pink-light);
    border-color: var(--primary-pink);
    transform: translateY(-2px);
}

.feel-btn.selected {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--accent-gold) 100%);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-btn);
    transform: scale(1.02);
}

/* ==========================================================================
   Tab Navigation & Full-Screen Panes
   ========================================================================== */
.app-tab-bar {
    display: flex;
    background: #F1F5F9;
    padding: 4px;
    border-radius: var(--radius-pill);
    margin-bottom: 14px;
    border: 1px solid var(--surface-border-subtle);
    gap: 4px;
    width: 100%;
}

.app-tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-tab-btn:hover {
    color: var(--primary-pink);
    background: rgba(255, 255, 255, 0.6);
}

.app-tab-btn.active {
    background: #FFFFFF;
    color: var(--primary-pink);
    box-shadow: 0 2px 8px rgba(231, 84, 142, 0.18);
    border: 1px solid var(--surface-border);
}

.tab-badge {
    background: var(--primary-pink-light);
    color: var(--primary-pink);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(231, 84, 142, 0.3);
}

.app-tab-btn.active .tab-badge {
    background: var(--primary-pink);
    color: #FFFFFF;
    border-color: var(--primary-pink);
}

.content-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    overflow: visible;
}

.tab-pane {
    width: 100%;
    display: flex;
    flex-direction: column;
    height: auto;
    overflow: visible;
}

.tab-pane.hidden {
    display: none !important;
}

/* History */
.history {
    width: 100%;
    height: auto;
    overflow: visible;
    background: var(--surface-card);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--surface-border);
    box-sizing: border-box;
}

.history h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

#shot-history-list {
    list-style: none;
}

.history-hole-header {
    background: var(--primary-pink-light);
    color: var(--primary-pink);
    border: 1px solid rgba(231, 84, 142, 0.25);
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 800;
    border-radius: var(--radius-pill);
    margin: 16px auto 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: table;
    text-align: center;
}

.history-hole-header:first-child {
    margin-top: 4px;
}

.history-item {
    background: var(--surface-subtle);
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--surface-border-subtle);
    transition: all 0.2s ease;
}

.history-item:hover {
    border-color: var(--surface-border);
    background: var(--primary-pink-light);
}

.history-item .shot-detail {
    display: flex;
    gap: 10px;
    align-items: center;
}

.club-name {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.dist-tag {
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--accent-gold-light);
    color: var(--text-gold);
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.gps-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.history-item .rating-tag {
    font-weight: 800;
    font-size: 0.9rem;
}

/* Utilities */
.hidden {
    display: none !important;
}

#toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--accent-gold) 100%);
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    box-shadow: 0 10px 24px rgba(231, 84, 142, 0.35);
    animation: fadeUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    backdrop-filter: blur(6px);
    padding: 16px;
}

.modal-content {
    background: var(--surface-card);
    padding: 28px;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 2px solid var(--surface-border);
    box-shadow: var(--shadow-lg);
}

.modal-content h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button {
    flex: 1;
    padding: 14px;
    font-size: 0.95rem;
}

/* Putting Controls */
.putt-row {
    margin-bottom: 16px;
}

.putt-row label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.stepper {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface-subtle);
    border: 1px solid var(--surface-border-subtle);
    width: fit-content;
    padding: 4px;
    border-radius: var(--radius-pill);
}

.stepper button {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    color: var(--text-primary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.stepper button:hover {
    background: var(--primary-pink);
    color: white;
    border-color: var(--primary-pink);
}

.stepper span {
    font-size: 1.2rem;
    font-weight: 800;
    min-width: 24px;
    text-align: center;
    color: var(--primary-pink);
}

.toggle-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.toggle-btn {
    flex: 1;
    background: var(--surface-subtle);
    border: 1px solid var(--surface-border-subtle);
    color: var(--text-secondary);
    padding: 10px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    min-width: 75px;
    transition: all 0.2s;
}

.toggle-btn:hover {
    border-color: var(--primary-pink);
    color: var(--primary-pink);
    background: var(--primary-pink-light);
}

.toggle-btn.selected {
    background: var(--primary-pink-light);
    border-color: var(--primary-pink);
    color: var(--primary-pink);
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(231, 84, 142, 0.2);
}

/* Tee Button Style */
.icon-btn {
    background: var(--surface-card);
    border: 1.5px solid var(--surface-border);
    color: var(--primary-pink);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-left: 10px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.icon-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-1px);
}

.icon-btn.active {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--accent-gold) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 0 10px rgba(231, 84, 142, 0.35);
}

/* Next Hole Overlay */
#next-hole-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.7);
    z-index: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    padding: 20px;
}

.overlay-content {
    text-align: center;
    width: 100%;
    max-width: 420px;
    background: var(--surface-card);
    padding: 36px 28px;
    border-radius: var(--radius-xl);
    border: 2px solid var(--surface-border);
    box-shadow: var(--shadow-lg);
}

.overlay-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.overlay-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 24px;
}

.par-selector-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.par-label {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.par-toggles {
    display: flex;
    background: var(--surface-subtle);
    border: 1px solid var(--surface-border-subtle);
    border-radius: var(--radius-pill);
    padding: 4px;
    gap: 4px;
}

.par-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-pill);
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.par-btn.selected {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--accent-gold) 100%);
    color: white;
    box-shadow: var(--shadow-btn);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 84, 142, 0.4);
    }
    70% {
        box-shadow: 0 0 0 16px rgba(231, 84, 142, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 84, 142, 0);
    }
}

/* ==========================================================================
   Scorecard Grid & Golf Shapes (10 Columns Symmetrical + 2-Row Master TOT Card)
   ========================================================================== */
.scorecard-scroll-container {
    background: var(--surface-card);
    border: 1.5px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 10px 12px;
    width: 100%;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    min-height: 195px; /* Taller container */
    box-sizing: border-box;
}

.scorecard-layout-wrapper {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    height: 100%;
    align-items: stretch;
}

.scorecard-grid-10cols {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.scorecard-row {
    display: grid;
    grid-template-columns: repeat(10, 1fr); /* Exactly 10 columns for BOTH rows! */
    gap: 5px;
    align-items: stretch;
    width: 100%;
}

.scorecard-hole {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    height: 84px; /* Taller hole cards */
    padding: 6px 2px;
    border-radius: var(--radius-sm);
    background: var(--surface-subtle);
    border: 1px solid var(--surface-border-subtle);
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    gap: 4px;
}

.scorecard-hole:hover {
    background: var(--primary-pink-light);
    border-color: var(--primary-pink);
    transform: translateY(-1px);
}

.scorecard-hole.active {
    background: var(--primary-pink-light);
    border-color: var(--primary-pink);
    box-shadow: 0 3px 10px rgba(231, 84, 142, 0.25);
    transform: translateY(-2px);
}

.scorecard-summary {
    background: var(--accent-gold-light);
    border-color: var(--surface-border-gold);
}

.scorecard-summary .scorecard-num {
    color: var(--text-gold);
    font-size: 0.7rem;
    font-weight: 900;
}

/* Master TOT card spanning both top & bottom rows */
.scorecard-total-span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 68px;
    min-width: 68px;
    background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--primary-pink-light) 100%);
    border: 1.5px solid var(--surface-border-gold);
    border-radius: var(--radius-md);
    padding: 8px 4px;
    box-sizing: border-box;
    gap: 3px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.scorecard-total-label {
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--text-gold);
    text-transform: uppercase;
}

.scorecard-total-par {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.scorecard-total-score {
    font-family: var(--font-heading);
    font-size: 1.65rem;
    font-weight: 900;
    color: var(--primary-pink);
    line-height: 1;
    margin: 4px 0;
}

.scorecard-total-sub {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-secondary);
}

.scorecard-num {
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 700;
    line-height: 1;
}

.scorecard-par {
    font-size: 0.75rem;
    color: var(--text-gold);
    font-weight: 800;
    line-height: 1;
}

.scorecard-score {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    position: relative;
    color: var(--text-primary);
    flex-shrink: 0;
    line-height: 1;
}

/* Golf Result Shapes */
.shape-circle {
    border-radius: 50%;
    border: 2px solid var(--primary-pink);
    color: var(--primary-pink);
    background: var(--primary-pink-light);
}

.shape-double-circle {
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 0 0 2px var(--surface-card), 0 0 0 4px var(--accent-gold);
    color: var(--text-gold);
    background: var(--accent-gold-light);
}

.shape-square {
    border: 2px solid #F59E0B;
    color: #B45309;
    background: #FEF3C7;
    border-radius: 4px;
}

.shape-double-square {
    border: 2px solid #EF4444;
    box-shadow: 0 0 0 2px var(--surface-card), 0 0 0 4px #EF4444;
    color: #B91C1C;
    background: #FEE2E2;
    border-radius: 4px;
}

.shape-triple-circle {
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
    box-shadow: 
        inset 0 0 0 2px var(--surface-card),
        inset 0 0 0 4px var(--accent-gold),
        inset 0 0 0 6px var(--surface-card),
        inset 0 0 0 8px var(--accent-gold);
    color: var(--text-gold);
}

.shape-triple-square {
    border: 2px solid #DC2626;
    box-shadow: 
        inset 0 0 0 2px var(--surface-card),
        inset 0 0 0 4px #DC2626,
        inset 0 0 0 6px var(--surface-card),
        inset 0 0 0 8px #DC2626;
    color: #DC2626;
}

.shape-star {
    background: linear-gradient(135deg, var(--primary-pink) 0%, var(--accent-gold) 100%);
    color: #FFFFFF;
    clip-path: polygon(50% 0%, 65% 40%, 100% 50%, 65% 60%, 50% 100%, 35% 60%, 0% 50%, 35% 40%);
    font-size: 0.9rem;
    font-weight: 900;
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 2px 6px rgba(231, 84, 142, 0.4));
}

/* ==========================================================================
   Tablet / Desktop Responsive Layout (Full-Width Tab Focus)
   ========================================================================== */
@media (min-width: 768px) {
    #app {
        max-width: 720px;
        padding: 24px 28px;
    }

    .content-container {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow-y: auto;
    }

    .tab-pane {
        width: 100%;
        flex: 1;
    }

    .history {
        width: 100%;
        border-radius: var(--radius-xl);
        padding: 24px;
    }

    .grid-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .feel-btn {
        padding: 18px 14px;
        font-size: 1.05rem;
    }

    .scroll-row {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .chip-btn {
        flex: 0 0 auto;
        margin-bottom: 6px;
    }
}