:root {
  --green: #1f4d2b;
  --green-light: #2e6b3d;
  --gold: #c9a227;
  --bg: #f5f3ec;
  --card: #ffffff;
  --text: #1d231f;
  --muted: #5d6a61;
  --line: #e2ded2;
  --bad: #b23b3b;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
header {
  background: var(--green);
  color: #fff;
  border-bottom: 4px solid var(--gold);
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; font-weight: bold; color: #fff; text-decoration: none; letter-spacing: .5px; }
.brand span { color: var(--gold); }
.brand { display: inline-flex; align-items: center; white-space: pre; }
.brand .logo { height: 48px; width: auto; margin-right: 10px; }
nav a { color: #fff; text-decoration: none; margin-left: 18px; font-weight: 500; opacity: .85; }
nav a:first-child { margin-left: 0; }
nav a:hover, nav a.active { opacity: 1; border-bottom: 2px solid var(--gold); }
main.wrap { padding-top: 28px; padding-bottom: 48px; }
h1 { font-family: Georgia, serif; color: var(--green); margin: 0 0 4px; }
.sub { color: var(--muted); margin: 0 0 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.leader td { background: #fbf6e3; font-weight: 600; }
.pts { font-weight: 700; color: var(--green); }
form { display: flex; gap: 10px; flex-wrap: wrap; }
input[type=text], input[type=password] { flex: 1; min-width: 200px; padding: 10px 12px; font-size: 1rem; border: 1px solid var(--line); border-radius: 6px; }
button { background: var(--green); color: #fff; border: 0; border-radius: 6px; padding: 10px 18px; font-size: 1rem; cursor: pointer; }
button:hover { background: var(--green-light); }
button.danger { background: var(--bad); }
button.small { padding: 4px 10px; font-size: .85rem; }
.msg { margin-top: 10px; min-height: 1.5em; }
.msg.error { color: var(--bad); }
.msg.ok { color: var(--green-light); }
ol.players { margin: 0; padding-left: 1.5em; }
ol.players { list-style: decimal; }
ol.players li { padding: 4px 0; }
.cta { display: inline-block; background: var(--gold); color: var(--green); font-weight: 700; padding: 10px 18px; border-radius: 6px; text-decoration: none; }
.show-sm { display: none; }
@media (max-width: 560px) {
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  th { letter-spacing: 0; }
  .card { padding: 10px; }
  th, td { padding: 8px 3px; }
  th { font-size: .7rem; }
  nav a { margin-left: 12px; }
}
footer a { color: inherit; }
footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 20px 0; }
.week-picker { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.week-picker select { padding: 6px 10px; font-size: 1rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
button:disabled { opacity: .4; cursor: default; }
form select { flex: 1; min-width: 200px; padding: 10px 12px; font-size: 1rem; border: 1px solid var(--line); border-radius: 6px; background: var(--card); }
ol.players li span:first-child { display: inline-block; }
ol.players li .hcap { float: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.list-head { display: flex; justify-content: space-between; margin: 0 0 4px 1.5em; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.card.scroll { overflow-x: auto; padding: 12px; }
table.eclectic th, table.eclectic td { padding: 6px 6px; white-space: nowrap; }
table.eclectic .name { position: sticky; left: 0; background: var(--card); z-index: 1; }
table.eclectic .par-row td { font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--line); }
table.eclectic td.num, table.eclectic th.num { text-align: center; }
table.eclectic td.total { background: #b7b7b7; font-weight: 700; text-align: center; }
table.eclectic tfoot td { color: var(--muted); font-style: italic; border-bottom: 0; }
.eagle { background: #ea9999; }
.birdie { background: #ffff00; }
.par { background: #a4c2f4; }
.bogey { background: #d9d9d9; }
.bogey-plus { background: #666666; color: #fff; }
.key { display: flex; flex-wrap: wrap; gap: 6px; }
.key span { padding: 4px 12px; border-radius: 4px; font-size: .9rem; }
.next-game { display: inline-block; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 6px; padding: 8px 14px; margin: 0 0 16px; }
.next-game strong { color: var(--green); }
a.player { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
a.player:hover { color: var(--green); border-bottom-color: var(--green); }
.back { margin: 0 0 8px; }
.back a, td a { color: var(--green-light); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; margin-bottom: 20px; }
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; text-align: center; }
.stats span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.stats strong { font-size: 1.3rem; color: var(--green); }
.of { color: var(--muted); font-size: .8em; }
