:root {
  color-scheme: light;
  --green-950: #092218;
  --green-900: #123c2d;
  --green-800: #18543f;
  --green-700: #1f6b50;
  --fairway: #dbeed4;
  --rough: #f1f7eb;
  --sand: #f4dfad;
  --gold: #e3ae2b;
  --ink: #10231a;
  --muted: #5e7167;
  --white: #fffdf7;
  --line: rgba(16, 35, 26, 0.14);
  --shadow: 0 24px 80px rgba(9, 34, 24, 0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(227, 174, 43, 0.28), transparent 32rem),
    radial-gradient(circle at 84% 4%, rgba(255,255,255,0.72), transparent 8rem),
    radial-gradient(circle at 80% 0%, rgba(219, 238, 212, 0.95), transparent 34rem),
    linear-gradient(135deg, #fffdf7 0%, #eef7e9 48%, #cfe7c7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(18, 60, 45, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 60, 45, 0.045) 1px, transparent 1px),
    repeating-linear-gradient(112deg, transparent 0 34px, rgba(31,107,80,0.04) 34px 38px);
  background-size: 48px 48px, 48px 48px, 100% 100%;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.course-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.course-lines::before, .course-lines::after {
  content: "";
  position: absolute;
  border: 2px solid rgba(18,60,45,0.08);
  border-radius: 50%;
  transform: rotate(-16deg);
}
.course-lines::before { width: 620px; height: 250px; left: -180px; top: 170px; }
.course-lines::after { width: 780px; height: 310px; right: -260px; bottom: 70px; }

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0 18px;
  position: sticky;
  top: 0;
  z-index: 20;
  transition: padding 220ms ease, background 220ms ease, box-shadow 220ms ease, backdrop-filter 220ms ease;
}
/* Condense + frost the header once the page is scrolled (toggled by app.js). */
.site-header.scrolled {
  padding: 12px 16px;
  margin: 0 -16px;
  background: rgba(255, 253, 247, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(9, 34, 24, 0.12);
  border-bottom: 1px solid rgba(18, 60, 45, 0.08);
}
.site-header.scrolled .brand small { opacity: 0; }
.site-header.scrolled .brand-mark { transform: scale(0.86); }
.brand-mark { transition: transform 220ms ease; }
.brand small { transition: opacity 200ms ease; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--green-950);
  background:
    radial-gradient(circle at 35% 28%, #fff 0 16%, #f6f9f2 34%, #d6dfcf 100%);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  box-shadow: inset -8px -9px 18px rgba(9,34,24,0.12), inset 0 0 0 2px rgba(18,60,45,0.10), 0 10px 30px rgba(18,60,45,0.25);
  position: relative;
  overflow: hidden;
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background-image: radial-gradient(circle, rgba(126,142,116,0.75) 0 1.6px, transparent 1.8px);
  background-size: 11px 10px;
  opacity: .55;
}
.brand-mark { isolation: isolate; }
.brand-mark::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.brand-mark { text-shadow: 0 1px 0 rgba(255,255,255,.7); }

.brand strong { display: block; font-size: 1rem; }
.brand small { display: block; color: var(--muted); margin-top: 2px; }

nav { display: flex; gap: 10px; flex-wrap: wrap; }
nav a {
  color: var(--green-900);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 999px;
}
nav a:hover, nav a[aria-current="page"] { background: rgba(18,60,45,0.1); }

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.55fr);
  align-items: center;
  gap: 42px;
  padding: 54px 0 82px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--green-700);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 900;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: -0.075em;
  margin-bottom: 24px;
  max-width: 900px;
}
h2 { font-size: clamp(2rem, 5vw, 4rem); line-height: 0.95; letter-spacing: -0.055em; margin-bottom: 16px; }
h3 { font-size: 1.35rem; margin-bottom: 10px; }

.lede {
  color: #34483d;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.55;
  max-width: 700px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 32px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  border: 1px solid transparent;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--white); background: var(--green-900); box-shadow: 0 16px 36px rgba(18,60,45,0.26); }
.button-secondary { color: var(--green-900); background: rgba(255,255,255,0.55); border-color: var(--line); }
.button.disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

.hero-badges, .signup-facts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.hero-badges span, .signup-facts div {
  border: 1px solid rgba(18,60,45,0.12);
  background: rgba(255,255,255,0.58);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 850;
  color: var(--green-900);
  box-shadow: 0 10px 24px rgba(9,34,24,0.06);
}
.signup-facts div { border-radius: 18px; min-width: 150px; }
.signup-facts span { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; }
.signup-facts strong { display: block; margin-top: 4px; }

.scorecard {
  border: 1px solid rgba(255,255,255,0.54);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 10%, rgba(255,255,255,0.8), transparent 11rem),
    linear-gradient(160deg, rgba(255,255,255,0.75), rgba(244,223,173,0.54));
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}
.scorecard::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: repeating-radial-gradient(circle, rgba(18,60,45,0.12) 0 2px, transparent 2px 12px);
  right: -84px;
  top: -76px;
}
.flag-stick {
  position: absolute;
  right: 42px;
  bottom: 26px;
  width: 4px;
  height: 170px;
  background: var(--green-900);
  border-radius: 999px;
  transform: rotate(7deg);
  opacity: .92;
}
.flag-stick::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 3px;
  width: 72px;
  height: 42px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 18%, 0 100%);
}
.flag-stick::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: -32px;
  width: 70px;
  height: 18px;
  border-radius: 50%;
  background: rgba(31,107,80,0.22);
}
.scorecard-topline { color: var(--muted); font-weight: 900; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; position: relative; }
.scorecard-main { font-size: 2.35rem; line-height: 1; letter-spacing: -0.04em; font-weight: 950; margin: 18px 0 28px; position: relative; max-width: 270px; }
.scorecard-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; position: relative; }
.scorecard-grid div { padding: 16px; border-radius: 18px; background: rgba(255,255,255,0.68); border: 1px solid var(--line); }
.scorecard-grid span { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 800; }
.scorecard-grid strong { display: block; margin-top: 5px; font-size: 1.05rem; }

.section { padding: 70px 0; }
.section-heading { max-width: 760px; margin-bottom: 28px; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; line-height: 1.6; }
.cards { display: grid; gap: 18px; }
.cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  padding: 26px;
  border-radius: 28px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 18px 46px rgba(9,34,24,0.08);
  position: relative;
  overflow: hidden;
}
.fairway-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 7px;
  background: repeating-linear-gradient(90deg, var(--green-700) 0 18px, var(--fairway) 18px 36px);
  opacity: .55;
}
.card p { color: var(--muted); line-height: 1.58; margin-bottom: 0; }
.card-icon { font-size: 2rem; display: inline-block; margin-bottom: 16px; }


.course-fact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.course-fact {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(18,60,45,0.12);
  box-shadow: 0 14px 34px rgba(9,34,24,0.07);
}
.course-fact span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.course-fact strong { font-size: 1.2rem; color: var(--green-900); }
.hole-pars {
  padding: 26px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(219,238,212,0.66), rgba(255,253,247,0.86));
  border: 1px solid rgba(18,60,45,0.12);
}
.hole-tee-note {
  margin: 10px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--green-900);
}
.hole-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 22px;
}
.hole-grid span {
  padding: 9px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
  color: var(--green-900);
  font-size: 0.88rem;
  font-weight: 850;
  text-align: center;
}
.hole-pars .button { margin-right: 10px; margin-top: 6px; }

.course-preview { padding-top: 30px; }
.green-card {
  min-height: 320px;
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: center;
  gap: 34px;
  padding: clamp(26px, 5vw, 48px);
  border-radius: 38px;
  color: var(--white);
  background:
    radial-gradient(ellipse at 24% 52%, rgba(255,255,255,0.22) 0 7%, transparent 7.5%),
    repeating-linear-gradient(110deg, rgba(255,255,255,0.05) 0 24px, transparent 24px 48px),
    linear-gradient(135deg, #0f3729, #1f6b50 70%, #2d8a65);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.green-card .eyebrow { color: #f6d675; }
.green-card p:not(.eyebrow) { color: rgba(255,255,255,0.82); line-height: 1.65; font-size: 1.1rem; }
.pin-graphic {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.24) 0 27%, transparent 28% 100%);
  border: 2px solid rgba(255,255,255,0.22);
  position: relative;
}
.pin-graphic::before { content:""; position:absolute; left:104px; top:28px; width:5px; height:155px; background:#fff; border-radius:999px; }
.pin-graphic::after { content:""; position:absolute; left:109px; top:28px; width:74px; height:42px; background:var(--gold); clip-path:polygon(0 0, 100% 20%, 0 100%); }
.pin-graphic span { position:absolute; left:74px; bottom:34px; width:72px; height:18px; background:rgba(255,255,255,0.28); border-radius:50%; }

.timeline { display: grid; gap: 14px; }
.timeline-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.58);
}
.timeline-item span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: #eaf4e3;
  color: var(--green-900);
  font-weight: 950;
}
.timeline-item.active span { background: var(--gold); color: var(--green-950); }
.timeline-item p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }

.signup-main { display: grid; place-items: center; min-height: calc(100vh - 112px); padding: 40px 0 80px; }
.signup-card {
  width: min(880px, 100%);
  padding: clamp(28px, 6vw, 54px);
  border-radius: 36px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(255,255,255,0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.signup-card::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -95px;
  top: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(18,60,45,0.10) 0 2px, transparent 2.5px);
  background-size: 18px 18px;
  opacity: .8;
}
.signup-card > * { position: relative; z-index: 1; }
.signup-card h1 { font-size: clamp(2.5rem, 8vw, 5.8rem); }
.form-placeholder {
  margin-top: 34px;
  padding: 26px;
  border-radius: 28px;
  border: 2px dashed rgba(18,60,45,0.24);
  background: linear-gradient(180deg, rgba(219,238,212,0.66), rgba(255,253,247,0.88));
}
.placeholder-badge {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(18,60,45,0.1);
  color: var(--green-900);
  font-weight: 900;
  font-size: 0.78rem;
  margin-bottom: 16px;
}
ul { color: #34483d; line-height: 1.7; }
.built-form label { display: grid; gap: 7px; color: var(--green-900); font-weight: 900; margin-bottom: 14px; }
.built-form input, .built-form select, .built-form textarea, .admin-table input, .admin-table select, .admin-table textarea, .score-input-grid input {
  width: 100%;
  border: 1px solid rgba(18,60,45,0.18);
  border-radius: 14px;
  background: rgba(255,255,255,0.82);
  color: var(--ink);
  padding: 12px 13px;
  font: inherit;
  font-weight: 700;
}
.built-form textarea, .admin-table textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-status { margin: 16px 0 0; font-weight: 900; }
.form-status.success { color: var(--green-700); }
.form-status.error, .admin-error { color: #9d2b1f; font-weight: 900; }
.admin-login { width: min(760px, calc(100% - 32px)); margin: 0 auto; min-height: 100vh; display: grid; place-items: center; position: relative; z-index: 1; }
.admin-shell .section { padding: 38px 0; }
.admin-message { margin: 16px 0; padding: 14px 18px; border-radius: 18px; background: rgba(219,238,212,0.9); color: var(--green-900); font-weight: 900; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.admin-stats article, .leaderboard-toolbar, .leaderboard-card, .admin-panel {
  padding: 22px;
  border-radius: 26px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(18,60,45,0.12);
  box-shadow: 0 14px 34px rgba(9,34,24,0.07);
}
.admin-stats span { display: block; color: var(--muted); text-transform: uppercase; font-size: .76rem; letter-spacing: .12em; font-weight: 900; }
.admin-stats strong { display: block; margin-top: 8px; font-size: 1.35rem; color: var(--green-900); }
.table-wrap { width: 100%; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.admin-table th, .admin-table td { text-align: left; vertical-align: top; padding: 12px; border-bottom: 1px solid rgba(18,60,45,0.12); }
.admin-table th { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; }
.admin-table small { display: block; color: var(--muted); margin-top: 4px; }
.admin-inline-form { display: contents; }
.score-entry { margin: 16px 0; padding: 18px; border-radius: 22px; border: 1px solid rgba(18,60,45,0.14); background: rgba(255,255,255,0.55); }
.score-entry summary { cursor: pointer; font-size: 1.25rem; font-weight: 950; color: var(--green-900); margin-bottom: 12px; }
.score-input-grid { display: grid; grid-template-columns: repeat(9, minmax(66px, 1fr)); gap: 10px; margin: 12px 0 18px; }
.score-input-grid label { display: grid; gap: 4px; font-weight: 900; color: var(--green-900); }
.score-input-grid small { color: var(--muted); font-size: .7rem; }
.leaderboard-hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.leaderboard-toolbar { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.team-board-card { padding: 22px; border-radius: 28px; background: rgba(255,255,255,0.72); border: 1px solid rgba(18,60,45,0.12); box-shadow: 0 14px 34px rgba(9,34,24,0.07); margin-bottom: 16px; }
.team-board-top { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; margin-bottom: 18px; }
.position { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; background: var(--gold); color: var(--green-950); font-weight: 950; }
.team-board-top h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin-bottom: 4px; }
.team-board-top p { color: var(--muted); margin: 0; font-weight: 800; }
.leader-score { text-align: right; }
.leader-score strong { display: block; font-size: 3rem; line-height: .9; color: var(--green-900); }
.leader-score span { display: block; color: var(--muted); font-weight: 900; margin-top: 6px; }
.hole-score-grid { display: grid; grid-template-columns: repeat(18, minmax(48px, 1fr)); gap: 7px; }
.hole-score-grid div { padding: 8px 5px; border-radius: 14px; background: rgba(244,223,173,0.32); text-align: center; }
.hole-score-grid small { display: block; color: var(--muted); font-size: .66rem; font-weight: 900; line-height: 1.25; margin-bottom: 6px; }
.hole-score, .empty-hole { display: grid; place-items: center; margin: 0 auto; width: 30px; height: 30px; border-radius: 999px; background: rgba(255,255,255,0.85); color: var(--green-900); font-weight: 950; }
.hole-score.under { background: #d9f6df; color: #17642b; }
.hole-score.over { background: #ffe2d7; color: #9d2b1f; }
.hole-score.even { background: #fff; color: var(--green-900); }
.next-note {
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(244,223,173,0.52);
  color: #4c3b15;
  line-height: 1.55;
}

.gallery-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 24px;
}
.gallery-drop-card {
  padding: 28px;
  border-radius: 30px;
  background: linear-gradient(160deg, rgba(255,255,255,0.76), rgba(244,223,173,0.62));
  border: 1px dashed rgba(18,60,45,0.28);
  box-shadow: var(--shadow);
}
.gallery-drop-card span { display: block; font-size: 3rem; margin-bottom: 12px; }
.gallery-drop-card strong { display: block; color: var(--green-900); font-size: 1.35rem; margin-bottom: 8px; }
.gallery-drop-card p { color: var(--muted); line-height: 1.55; margin: 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-top: 20px;
}
.gallery-tile {
  min-height: 260px;
  padding: 24px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 80% 12%, rgba(255,255,255,0.85), transparent 8rem),
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(219,238,212,0.72));
  border: 1px solid rgba(18,60,45,0.12);
  box-shadow: 0 14px 34px rgba(9,34,24,0.07);
}
.gallery-tile.champion { background: linear-gradient(160deg, rgba(244,223,173,0.92), rgba(255,253,247,0.78)); }
.gallery-emoji { font-size: 2.5rem; margin-bottom: 18px; }
.gallery-tile h2 { font-size: 1.6rem; letter-spacing: -0.03em; }
.gallery-tile p { color: var(--muted); line-height: 1.55; }
.gallery-callout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  gap: 24px;
  align-items: center;
  margin-top: 18px;
  padding: clamp(24px, 5vw, 40px);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(18,60,45,0.94), rgba(31,107,80,0.88));
  color: var(--white);
  box-shadow: var(--shadow);
}
.gallery-callout .eyebrow { color: #f6d675; }
.gallery-callout p:not(.eyebrow) { color: rgba(255,255,255,0.82); line-height: 1.6; }
.shot-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; color: var(--white); }
.shot-list li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,0.12); font-weight: 900; }
.shot-list span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; background: var(--gold); color: var(--green-950); }

@media (max-width: 860px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 34px; }
  .cards.three, .course-fact-grid, .gallery-hero, .gallery-grid, .gallery-callout { grid-template-columns: 1fr; }
  .hole-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-input-grid { grid-template-columns: repeat(3, minmax(66px, 1fr)); }
  .leaderboard-hero { display: block; }
  .leaderboard-toolbar { margin-top: 18px; justify-content: space-between; }
  .hole-score-grid { grid-template-columns: repeat(6, minmax(44px, 1fr)); }
  .scorecard { order: -1; }
  .green-card { grid-template-columns: 1fr; }
  .pin-graphic { width: 180px; height: 180px; }
}

@media (max-width: 560px) {
  .page-shell { width: min(100% - 22px, 1180px); }
  .site-header { gap: 14px; padding-top: 18px; }
  nav { width: 100%; gap: 8px; }
  nav a { flex: 1 1 calc(50% - 8px); text-align: center; padding: 10px 8px; }
  h1 { font-size: clamp(2.35rem, 14vw, 3.7rem); letter-spacing: -0.065em; }
  h2 { font-size: clamp(1.9rem, 10vw, 3rem); }
  .hero { padding-bottom: 52px; }
  .section { padding: 48px 0; }
  .scorecard-grid, .hole-grid, .form-grid, .score-input-grid { grid-template-columns: 1fr; }
  /* Keep the 18-hole strip as a readable multi-column grid on phones
     instead of collapsing into 18 stacked rows. */
  .hole-score-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .hole-score-grid div { padding: 6px 3px; }
  .hole-score, .empty-hole { width: 28px; height: 28px; }
  .team-board-top { grid-template-columns: auto 1fr; row-gap: 10px; }
  .leader-score { grid-column: 1 / -1; text-align: left; }
  .hero-actions .button { width: 100%; }
  .hero-badges span, .signup-facts div { width: 100%; }
  .signup-card, .admin-panel, .gallery-drop-card { border-radius: 24px; }
}

/* Admin add-ons: checklist, announcement preview, live photo wall */
.checklist-form {
  display: grid;
  gap: 12px;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.62);
  border: 1px solid rgba(18,60,45,0.12);
  color: var(--green-900);
  font-weight: 850;
}
.checklist-item input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--green-900);
}
.announcement-preview {
  margin: 18px 0 0;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(244,223,173,0.86), rgba(255,255,255,0.78));
  border: 1px solid rgba(18,60,45,0.16);
  box-shadow: 0 14px 34px rgba(9,34,24,0.07);
}
.announcement-preview h3 {
  color: var(--green-900);
  font-size: 1.65rem;
}
.announcement-preview small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}
.compact-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}
.compact-form textarea,
.compact-form button { grid-column: 1 / -1; }
.photo-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 12px;
}
.photo-card {
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(18,60,45,0.12);
  box-shadow: 0 14px 34px rgba(9,34,24,0.07);
}
.photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: rgba(219,238,212,0.7);
}
.photo-card div { padding: 18px; }
.photo-card span {
  display: block;
  color: var(--green-700);
  text-transform: uppercase;
  letter-spacing: .11em;
  font-size: .72rem;
  font-weight: 900;
  margin-bottom: 8px;
}
.photo-card h2 {
  font-size: 1.45rem;
  margin-bottom: 8px;
  letter-spacing: -0.035em;
}
.photo-card p { color: var(--muted); line-height: 1.5; }
.photo-card small { color: var(--muted); font-weight: 800; }
@media (max-width: 860px) {
  .photo-wall, .compact-form { grid-template-columns: 1fr; }
}

/* Players-only photo wall */
.gallery-upload {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.gallery-upload-button {
  cursor: pointer;
  font-size: 1.05rem;
  padding: 16px 30px;
}
.photo-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
}
.photo-tile {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(219,238,212,0.7);
  border: 1px solid rgba(18,60,45,0.12);
  box-shadow: 0 10px 26px rgba(9,34,24,0.08);
  aspect-ratio: 1 / 1;
}
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}
.photo-tile:hover img { transform: scale(1.05); }
@media (max-width: 860px) {
  .photo-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
}

/* ============================================================
   UI enhancements: entrance animations, scroll reveal,
   parallax hooks, micro-interactions. Progressive + safe:
   nothing here hides content unless JS is active.
   ============================================================ */

/* Decorative parallax layer keeps its base rotation while app.js
   layers a translate3d on top via the data-parallax transform. */
.course-lines { will-change: transform; }

/* --- Scroll reveal (only armed once app.js adds .reveal-ready) --- */
html.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
html.reveal-ready [data-reveal].in-view {
  opacity: 1;
  transform: none;
}

/* --- Pure-CSS load entrances (run with or without JS) --- */
@keyframes bb-rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes bb-pop {
  0%   { opacity: 0; transform: scale(0.9) translateY(14px); }
  100% { opacity: 1; transform: none; }
}
@keyframes bb-float {
  0%, 100% { transform: translateY(0) rotate(7deg); }
  50%      { transform: translateY(-9px) rotate(7deg); }
}
@keyframes bb-sway {
  0%, 100% { transform: rotate(7deg); }
  50%      { transform: rotate(3deg); }
}

.hero-copy > * { animation: bb-rise 760ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero-copy .eyebrow      { animation-delay: 40ms; }
.hero-copy h1            { animation-delay: 110ms; }
.hero-copy .lede         { animation-delay: 200ms; }
.hero-copy .hero-actions { animation-delay: 290ms; }
.hero-copy .hero-badges  { animation-delay: 370ms; }
.hero .scorecard { animation: bb-pop 820ms cubic-bezier(0.22, 1, 0.36, 1) 180ms both; }

/* Idle motion on the flag + golf-ball badge for a touch of life. */
.flag-stick { animation: bb-float 6s ease-in-out infinite; transform-origin: bottom center; }
.flag-stick::before { animation: bb-sway 4.5s ease-in-out infinite; transform-origin: left center; }

/* --- Micro-interactions --- */
.button { position: relative; overflow: hidden; }
.button::after {
  content: "";
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-18deg);
  transition: left 600ms ease;
}
.button:hover::after { left: 140%; }
.button:active { transform: translateY(0) scale(0.98); }

.card, .course-fact, .photo-card, .gallery-tile {
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 260ms ease;
}
.card:hover, .course-fact:hover, .gallery-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 60px rgba(9, 34, 24, 0.16);
}
.photo-card:hover { transform: translateY(-6px); box-shadow: 0 26px 60px rgba(9, 34, 24, 0.18); }
.photo-card img { transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1); }
.photo-card:hover img { transform: scale(1.05); }

nav a { transition: background 180ms ease, color 180ms ease, transform 180ms ease; }
nav a:hover { transform: translateY(-1px); }

/* Live-generated leaderboard cards fade in as they render. */
.team-board-card { animation: bb-rise 600ms cubic-bezier(0.22, 1, 0.36, 1) both; }

/* ============================================================
   Admin dashboard + player portal refinements.
   Goal: more breathing room, neater tables/forms, clearer
   grouping. Layout-only — no markup restructuring required.
   ============================================================ */

/* Roomier panels with a clear card edge and consistent rhythm. */
.admin-shell .section { padding: 30px 0; }
/* Heading/stat sections aren't cards, so they had no side padding and ran
   flush to the edge. Inset their content to line up with panel text. */
.admin-shell .section:not(.admin-panel) {
  padding-left: clamp(20px, 3vw, 34px);
  padding-right: clamp(20px, 3vw, 34px);
}
.admin-shell .admin-message { margin-left: clamp(20px, 3vw, 34px); margin-right: clamp(20px, 3vw, 34px); }
.admin-panel {
  padding: clamp(26px, 3.4vw, 38px);
  margin-bottom: 4px;
}
.admin-panel > h2 {
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.admin-panel > h2 + .next-note { margin-top: 0; }
.admin-panel > .next-note:first-of-type { margin-bottom: 20px; }
.admin-panel .table-wrap { margin-top: 18px; }
.admin-panel ul { margin: 4px 0 0; padding-left: 22px; }
.admin-panel ul li { margin-bottom: 10px; line-height: 1.5; }

/* Stat cards: a touch more padding + a subtle accent. */
.admin-stats article { padding: 20px 22px; }
.admin-stats strong { font-size: 1.5rem; }

/* Filter button row was unstyled and ran together. */
.admin-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.admin-filter-buttons .button { min-height: 42px; padding: 0 18px; font-size: 0.9rem; }

/* --- Tables: open them up and calm the dense inputs --- */
.admin-table { min-width: 920px; }
.admin-table th {
  padding: 12px 14px 14px;
  border-bottom: 2px solid rgba(18, 60, 45, 0.16);
}
.admin-table td {
  padding: 16px 14px;
  vertical-align: middle;
}
.admin-table tbody tr { transition: background 160ms ease; }
.admin-table tbody tr:hover { background: rgba(219, 238, 212, 0.34); }
.admin-table small { margin-top: 6px; line-height: 1.45; }
.admin-table small + small { margin-top: 3px; }

/* Form controls inside tables: gentler, consistent, not touching. */
.admin-table input,
.admin-table select,
.admin-table textarea {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
}
.admin-table input:focus,
.admin-table select:focus,
.admin-table textarea:focus,
.built-form input:focus,
.built-form select:focus,
.built-form textarea:focus,
.score-input-grid input:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(31, 107, 80, 0.18);
}
/* The handicap cell stacks two inputs — give them a gap. */
.admin-table td input + input { margin-top: 8px; }

/* Compact, spaced action buttons so Save/Delete don't collide. */
.admin-table .button {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.84rem;
  margin: 3px 8px 3px 0;
  white-space: nowrap;
}

/* Score entry: cleaner per-hole inputs with more air. */
.score-entry { padding: 22px; }
.score-input-grid { gap: 12px; }
.score-input-grid label { gap: 6px; text-align: center; }
.score-input-grid input { padding: 8px; text-align: center; }
.score-entry .button { margin-top: 4px; }

/* Announcement action row spacing. */
.admin-panel .built-form .hero-actions { margin-top: 24px; }

@media (max-width: 560px) {
  .admin-panel > h2 { font-size: 1.35rem; }
  .admin-filter-buttons .button { flex: 1 1 calc(50% - 10px); }
}

/* Respect users who ask for less motion: kill animation + parallax. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html.reveal-ready [data-reveal] { opacity: 1; transform: none; }
  [data-parallax] { transform: none !important; }
}
