/* ================= Scoring: leaderboard + scorecard ================= */

/* ---------- Live badge ---------- */
.il-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #7FD688;
}
.il-live::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5CC46A;
    animation: il-pulse 1.6s ease-in-out infinite;
}
@keyframes il-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(92,196,106,0.6); }
    50%      { box-shadow: 0 0 0 5px rgba(92,196,106,0); }
}

/* ---------- Leaderboard ---------- */
.il-lb-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.il-lb-table th {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--il-muted);
    padding: 0 6px 8px;
    text-align: center;
}
.il-lb-table th:nth-child(2) { text-align: left; }
.il-lb-table td {
    padding: 10px 6px;
    text-align: center;
    border-top: 1px solid var(--il-border);
    vertical-align: middle;
}
.il-lb-pos   { width: 38px; color: var(--il-muted); font-weight: 700; }
.il-lb-name  { text-align: left !important; font-weight: 600; width: 100%; max-width: 0; }
.il-lb-name-in  { display: flex; align-items: center; gap: 8px; min-width: 0; }
.il-lb-name-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.il-lb-topar {
    width: 64px;
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 22px;
    letter-spacing: .5px;
}
.il-lb-thru  { width: 44px; color: var(--il-muted); font-weight: 600; }
.il-lb-today { width: 54px; font-weight: 700; }

.il-lb-me td { background: rgba(46,125,50,0.16); }
.il-lb-me td:first-child { box-shadow: inset 3px 0 0 var(--il-gold); color: var(--il-gold); }

.il-lb-foot { margin-top: 10px; font-size: 12px; color: var(--il-muted); display: flex; gap: 6px; }

.il-avatar-sm { width: 26px; height: 26px; font-size: 12px; }

/* ---------- Scorecard ---------- */
.il-sc-top { display: flex; justify-content: space-between; margin-bottom: 12px; }
.il-sc-back { font-size: 14px; font-weight: 600; color: var(--il-muted); text-decoration: none; }
.il-sc-back:hover { color: var(--il-gold); }

.il-sc-hole {
    position: relative;
    overflow: hidden;
    border-radius: var(--il-radius);
    border: 1px solid var(--il-border);
    box-shadow: var(--il-shadow);
    min-height: 150px;
    display: flex;
    align-items: flex-end;
    margin-bottom: 14px;
    touch-action: pan-y;
}
.il-sc-photo {
    position: absolute;
    inset: 0;
    background: url("../img/course-hero.jpg") center 60% / cover no-repeat;
}
.il-sc-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.4) 55%, rgba(10,10,10,0.1) 100%);
}
.il-sc-holehead { position: relative; z-index: 1; padding: 18px 20px; }
.il-sc-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--il-gold);
}
.il-sc-holeno {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 58px;
    line-height: 1;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.il-sc-par { font-size: 16px; font-weight: 600; color: rgba(255,255,255,0.85); }

.il-sc-entry { text-align: center; touch-action: pan-y; }

.il-sc-counter {
    display: grid;
    grid-template-columns: 76px 1fr 76px;
    align-items: center;
    gap: 10px;
    margin: 4px 0 18px;
}
.il-sc-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 2px solid rgba(183,155,90,0.7);
    background: rgba(183,155,90,0.08);
    color: var(--il-gold);
    font-size: 40px;
    font-weight: 300;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background .15s ease, transform .1s ease;
}
.il-sc-btn:active   { background: rgba(183,155,90,0.25); transform: scale(0.96); }
.il-sc-btn:disabled { opacity: .3; }

.il-sc-strokes { display: flex; flex-direction: column; align-items: center; }
.il-sc-strokes span {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 104px;
    line-height: .9;
    color: #fff;
}
.il-sc-strokes small {
    min-height: 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--il-muted);
}
.il-sc-strokes.il-under span,
.il-sc-strokes.il-under small { color: #5CC46A; }
.il-sc-strokes.il-over span,
.il-sc-strokes.il-over small  { color: #E06A6A; }

.il-sc-nav { display: flex; gap: 10px; }
.il-sc-nav .btn { flex: 1; }

.il-sc-save { min-height: 18px; margin-top: 10px; font-size: 12px; color: var(--il-muted); }

.il-sc-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    padding: 14px;
}
.il-sc-total span {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--il-muted);
}
.il-sc-total strong {
    font-family: "Bebas Neue", Impact, sans-serif;
    font-size: 30px;
    font-weight: 400;
    color: #fff;
}
.il-sc-total strong.il-under { color: #5CC46A; }
.il-sc-total strong.il-over  { color: #E06A6A; }

/* hole strip */
.il-sc-strip { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; margin-top: 16px; }
.il-sc-chip {
    background: var(--il-surface);
    border: 1px solid var(--il-border);
    border-radius: 10px;
    padding: 6px 0 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--il-text);
    -webkit-tap-highlight-color: transparent;
}
.il-sc-chip.active { border-color: var(--il-gold); box-shadow: 0 0 0 1px var(--il-gold); }
.il-sc-chip-no  { font-size: 10px; font-weight: 600; color: var(--il-muted); }
.il-sc-chip-val {
    min-width: 22px;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

/* classic scorecard marks: circle = under, square = over */
.il-sc-chip.sc-birdie .il-sc-chip-val { border: 1.5px solid #5CC46A; border-radius: 50%; color: #5CC46A; }
.il-sc-chip.sc-eagle  .il-sc-chip-val {
    border: 1.5px solid #5CC46A;
    border-radius: 50%;
    color: #5CC46A;
    box-shadow: 0 0 0 2px var(--il-surface), 0 0 0 3.5px #5CC46A;
}
.il-sc-chip.sc-bogey  .il-sc-chip-val { border: 1.5px solid #E06A6A; border-radius: 3px; color: #E06A6A; }
.il-sc-chip.sc-double .il-sc-chip-val {
    border: 1.5px solid #E06A6A;
    border-radius: 3px;
    color: #E06A6A;
    box-shadow: 0 0 0 2px var(--il-surface), 0 0 0 3.5px #E06A6A;
}