:root {
  --green-900: #0a2e21; --green-800: #0d3b2a; --green-700: #14553b; --green-600: #1c6e4b; --green-100: #e6f0ea; --green-50: #f3f8f5;
  --gold: #c5a24d; --gold-soft: #f4ecd5; --ink: #14201a; --muted: #5b6b62; --line: #dbe5df; --bg: #f7f9f7; --card: #ffffff;
  --birdie: #1c6e4b; --eagle: #c5a24d; --bogey: #b7791f; --double: #9b2c2c;
  --radius: 14px; --shadow: 0 1px 2px rgba(10,46,33,.06), 0 4px 14px rgba(10,46,33,.06);
  --display: 'Fraunces', Georgia, serif; --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px; }
a { color: var(--green-700); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main { padding-top: 20px; padding-bottom: 56px; outline: none; }
h1, h2, h3 { font-family: var(--display); color: var(--green-800); line-height: 1.15; margin: 0; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }

.sample-banner { background: var(--gold-soft); color: #5c4a14; text-align: center; padding: 8px 16px; font-size: .85rem; border-bottom: 1px solid #e6d9aa; }
.site-header { background: linear-gradient(180deg, var(--green-900), var(--green-800)); color: #fff; position: sticky; top: 0; z-index: 20; border-bottom: 3px solid var(--gold); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 1.6rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--display); font-size: 1.15rem; letter-spacing: .01em; }
.brand-text small { color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font-size: .62rem; font-weight: 600; margin-top: 3px; }
.menu-btn { background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; font-size: 1.2rem; border-radius: 10px; width: 44px; height: 40px; cursor: pointer; }
.nav { display: none; width: 100%; flex-direction: column; padding-bottom: 10px; }
.nav.open { display: flex; }
.nav a { color: #e8f1ec; padding: 12px 6px; border-top: 1px solid rgba(255,255,255,.12); font-weight: 500; font-size: .95rem; }
.nav a[aria-current="page"] { color: var(--gold); }
.nav a:hover { text-decoration: none; color: #fff; }
@media (min-width: 900px) {
  .menu-btn { display: none; }
  .nav { display: flex; flex-direction: row; width: auto; padding: 0; gap: 2px; }
  .nav a { border: 0; padding: 20px 11px 17px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 3px solid transparent; margin-bottom: -3px; }
  .nav a[aria-current="page"] { border-bottom-color: var(--gold); }
}
.site-footer { border-top: 1px solid var(--line); padding: 18px 0 28px; font-size: .8rem; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 12px; }

.page-head { margin-bottom: 18px; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: 1fr; }
.grid.cols-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid.cols-2 { grid-template-columns: 1fr 1fr; } .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.grid > .card + .card { margin-top: 0; }

.hero { background: linear-gradient(135deg, var(--green-800), var(--green-600)); color: #fff; border-radius: var(--radius); padding: 22px 18px; border: 0; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; border: 2px solid rgba(197,162,77,.5); }
.hero .eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .14em; font-size: .7rem; font-weight: 700; }
.hero h2 { color: #fff; font-size: clamp(1.6rem, 6vw, 2.2rem); margin: 4px 0 2px; }
.hero p { margin: 0; color: #d5e6dc; }
.stat-label { text-transform: uppercase; letter-spacing: .1em; font-size: .68rem; font-weight: 700; color: var(--muted); }
.stat-value { font-family: var(--display); font-size: 1.5rem; color: var(--green-800); font-weight: 700; }
.pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--green-100); color: var(--green-700); }
.pill.gold { background: var(--gold-soft); color: #7a5f10; }
.pill.grey { background: #eef1ef; color: var(--muted); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; background: var(--green-50); }
td.c, th.c { text-align: center; }
tbody tr:hover td { background: #fbfcfb; }
tr.lead td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
table.lb .sticky-pos, table.lb .sticky-player { position: sticky; background: #fff; z-index: 1; }
table.lb thead .sticky-pos, table.lb thead .sticky-player { background: var(--green-50); }
table.lb .sticky-pos { left: 0; min-width: 48px; }
table.lb .sticky-player { left: 48px; box-shadow: 1px 0 0 var(--line); font-weight: 600; }
table.lb:not(:has(.sticky-pos)) .sticky-player { left: 0; }
.rank { font-family: var(--display); font-weight: 700; color: var(--green-700); }

/* scorecard */
.scorecard { font-size: .84rem; }
.scorecard th, .scorecard td { padding: 7px 6px; text-align: center; min-width: 30px; }
.scorecard th:first-child, .scorecard td:first-child { text-align: left; position: sticky; left: 0; background: #fff; z-index: 1; min-width: 118px; padding-left: 10px; box-shadow: 1px 0 0 var(--line); }
.scorecard thead th:first-child { background: var(--green-50); }
.scorecard tr.par td { background: var(--green-50); font-weight: 600; color: var(--green-700); }
.scorecard tr.par td:first-child { background: var(--green-50); }
.scorecard .sum { background: var(--green-100); font-weight: 700; }
.scorecard td.sum { background: #f1f6f3; }
.scorecard .total { font-weight: 700; color: var(--green-800); }
.s { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; font-variant-numeric: tabular-nums; }
/* Text color is reserved for the sheet's red "counts toward the weekly score" numbers; scores vs par use shape only. */
.s.birdie { border: 1.5px solid var(--birdie); border-radius: 50%; font-weight: 600; }
.s.eagle { border: 1.5px solid var(--eagle); border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--eagle); font-weight: 700; }
.s.bogey { border: 1.5px solid var(--bogey); border-radius: 4px; }
.s.double { border: 3px double #55605a; border-radius: 4px; font-weight: 600; }
.cnt { color: #d11a2a; font-weight: 700; }
.scorecard td.skin-hole { background: #f4cccc; box-shadow: inset 0 0 0 1px #e8a9a9; }
.scorecard tbody tr:hover td.skin-hole { background: #f4cccc; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .78rem; color: var(--muted); margin-top: 10px; align-items: center; }
.legend .s { width: 22px; height: 22px; font-size: .75rem; }

.conditions { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.cond { background: var(--green-50); border-radius: 10px; padding: 10px 12px; }
.cond b { display: block; font-size: 1rem; color: var(--green-800); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.row-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: inherit; width: 100%; }
.row-link:hover { text-decoration: none; }
.btn { display: inline-block; background: var(--green-700); color: #fff; border: 0; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .88rem; cursor: pointer; font-family: inherit; }
.btn:hover { background: var(--green-800); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--green-700); border: 1px solid var(--line); }
.btn.gold { background: var(--gold); color: #2b2308; }
.btn.small { padding: 5px 11px; font-size: .78rem; }
.btn:disabled { opacity: .55; cursor: wait; }
.empty { text-align: center; padding: 26px 12px; color: var(--muted); }
.note { background: var(--gold-soft); border: 1px solid #e6d9aa; color: #5c4a14; border-radius: 10px; padding: 10px 12px; font-size: .86rem; }
.bar { height: 8px; background: var(--green-100); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-600), var(--gold)); }

/* week cards */
.week-card { display: block; color: inherit; }
.week-card:hover { text-decoration: none; }
.week-card .wk { font-family: var(--display); font-size: 1.9rem; color: var(--green-700); font-weight: 700; line-height: 1; }
.week-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }

/* charts */
.spark { width: 100%; height: auto; display: block; }
.chart-axis { font-size: 10px; fill: var(--muted); }

/* forms (admin) */
label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
input[type=text], input[type=password], input[type=date], select, textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff; color: var(--ink); }
textarea { min-height: 70px; font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }
.form-row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .form-row.two { grid-template-columns: 2fr 1fr; } .form-row.sched { grid-template-columns: 70px 1fr 2fr 1fr; align-items: center; } }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: #c4ccc7; }
.status-dot.ok { background: #2f9e61; } .status-dot.bad { background: #c0392b; } .status-dot.warn { background: var(--gold); }
details > summary { cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--green-700); padding: 6px 0; }
.issues { margin: 8px 0 0; padding-left: 18px; font-size: .84rem; }
.issues .error { color: #a12626; } .issues .warning { color: #7a5f10; } .issues .info { color: var(--muted); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--green-900); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: .88rem; z-index: 50; box-shadow: var(--shadow); max-width: 90vw; }
.back { display: inline-block; margin-bottom: 10px; font-size: .88rem; }

/* skins */
.skins-section { scroll-margin-top: 84px; }
.skins-section + .skins-section { margin-top: 14px; }
.jump { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; -webkit-overflow-scrolling: touch; }
.chip { flex: 0 0 auto; border: 1px solid var(--line); background: #fff; color: var(--green-700); border-radius: 999px; padding: 6px 12px; font: 600 .78rem var(--body); cursor: pointer; }
.chip:hover { background: var(--green-50); }
.chip-gold { background: var(--gold-soft); border-color: #e6d9aa; color: #6b5210; }
.skins-table th, .skins-table td { padding: 10px 12px; }
.skin-cell { font-weight: 700; font-variant-numeric: tabular-nums; }
.skin-in { background: #d7efdf; color: #14553b; }
.skin-out { background: #f6d5d5; color: #8a2424; }
.skin-unknown { background: #eef1ef; color: var(--muted); }
tbody tr:hover td.skin-in { background: #d7efdf; } tbody tr:hover td.skin-out { background: #f6d5d5; } tbody tr:hover td.skin-unknown { background: #eef1ef; }
.skin-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; vertical-align: -3px; margin-right: 4px; border: 1px solid rgba(0,0,0,.08); }
td.pos { color: #14553b; } td.neg { color: #8a2424; }
