/* Nomads Golf: mobile-first styles. Tokens first; components below. */
:root {
  --fairway: #0c3a2c;
  --fairway-2: #135c44;
  --fairway-3: #1f7a58;
  --sand: #f6f1e7;
  --sand-2: #ece4d3;
  --paper: #fffdf8;
  --ink: #18201c;
  --muted: #5d6862;
  --line: #e0d8c6;
  --flag: #c8102e;
  --gold: #c99a2e;
  --gold-2: #e8c468;
  --ok: #1d7a46;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(12, 58, 44, .06), 0 6px 20px rgba(12, 58, 44, .07);
  --tabbar-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* beats display:flex on list rows, so type-to-filter can hide them */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--sand);
  min-height: 100vh; display: flex; flex-direction: column;
}
body.signed-in { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
img { max-width: 100%; }
a { color: var(--fairway-2); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; color: var(--fairway); letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 6vw, 2.6rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.mono { font-family: ui-monospace, Menlo, monospace; }
.pre { white-space: pre-wrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 20px; padding-bottom: 40px; position: relative; z-index: 1; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--fairway); color: var(--sand);
  padding-top: env(safe-area-inset-top); box-shadow: 0 1px 0 rgba(255,255,255,.06), 0 4px 18px rgba(0,0,0,.18);
}
.topbar-in { max-width: 1080px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 16px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--sand); text-decoration: none; margin-right: auto; }
.brand-badge { width: 40px; height: 40px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--gold); }
.brand-badge img { width: 28px; height: 28px; }
.brand-word { font-family: "Limelight", var(--display); font-size: 1.45rem; letter-spacing: .06em; text-transform: uppercase; color: var(--paper); }
.topnav { display: none; gap: 4px; }
.topnav a { color: rgba(246,241,231,.82); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.topnav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.topnav a[aria-current="page"] { color: var(--fairway); background: var(--gold-2); }
@media (min-width: 860px) { .topnav { display: flex; } }

.account { position: relative; }
.account summary { list-style: none; cursor: pointer; }
.account summary::-webkit-details-marker { display: none; }
.account .menu {
  position: absolute; right: 0; top: calc(100% + 10px); background: var(--paper); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow), 0 12px 40px rgba(0,0,0,.18); min-width: 220px; padding: 8px; z-index: 40;
}
.account .menu a, .account .menu button {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 10px; color: var(--ink);
  text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer;
}
.account .menu a:hover, .account .menu button:hover { background: var(--sand); }
.menu-who { padding: 8px 12px 10px; margin: 0 0 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.menu-who small { display: block; font-weight: 400; color: var(--muted); }

.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; flex: none; }
.avatar-i { background: var(--fairway-3); color: #fff; font-weight: 600; font-size: .85rem; letter-spacing: .02em; }
.topbar .avatar { box-shadow: 0 0 0 2px var(--gold-2); }

/* ---------- bottom tab bar (phones) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-around;
  background: rgba(255,253,248,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; }
.tabbar svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--fairway); }
.tabbar a[aria-current="page"] svg { color: var(--flag); }
@media (min-width: 860px) { .tabbar { display: none; } body.signed-in { padding-bottom: 0; } }

/* ---------- legend (golfer behind each page) ---------- */
.legend { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.legend-art {
  position: absolute; right: -4vw; bottom: 3vh; height: min(74vh, 660px); width: auto; max-width: 78vw; object-fit: contain; object-position: right bottom;
  opacity: .16; transform: translateY(var(--legend-shift, 0px)); will-change: transform; filter: saturate(.8);
}
.legend-tag { display: flex; flex-direction: column; align-items: flex-end; margin: 0 0 -6px; text-align: right; line-height: 1; }
.legend-name { color: var(--gold); line-height: 1.05; font-size: calc(1.7rem * var(--k, 1)); white-space: nowrap; margin-bottom: 5px; }
.legend-era { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
.section-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 28px; margin-bottom: 14px; }
.section-row .section-h { margin: 0; }
.section-row .legend-tag { margin: 0; }
@media (min-width: 860px) { .legend-art { right: 2vw; opacity: .2; max-width: 46vw; } .legend-name { font-size: calc(2.1rem * var(--k, 1)); } }

/* Era fonts, one per golfer's period */
.era-40s { font-family: "Pinyon Script", cursive; --k: 1.15; }
.era-60s { font-family: "Yellowtail", cursive; }
.era-70s { font-family: "Shrikhand", cursive; }
.era-80s { font-family: "Monoton", cursive; --k: .85; }
.era-90s { font-family: "Permanent Marker", cursive; }
.era-00s { font-family: "Orbitron", sans-serif; font-weight: 700; --k: .8; }
.era-10s { font-family: "Bebas Neue", sans-serif; letter-spacing: .04em; }
.era-50s { font-family: "Lobster", cursive; }
.era-film { font-family: "Bungee", sans-serif; --k: .75; }

/* ---------- hero (home banner) ---------- */
.hero { position: relative; color: var(--paper); overflow: hidden; isolation: isolate; z-index: 1; background: var(--fairway); }
.hero-art { position: relative; height: clamp(230px, 56vw, 560px); background: #1b2a44 url("/brand/banner.jpg") 55% 62% / cover no-repeat; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,58,44,0) 60%, var(--fairway) 100%); }
.hero-in { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-bottom: 84px; }
.hero-logo { width: 104px; margin-top: -92px; position: relative; background: rgba(255,253,248,.96); border-radius: 18px; padding: 10px 12px 8px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.hero h1 { color: var(--paper); font-size: clamp(2rem, 8.5vw, 3.2rem); margin: 0; }
.hero .lede { font-size: 1.08rem; max-width: 34ch; color: rgba(255,253,248,.88); margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
@media (min-width: 860px) {
  .hero-art { height: clamp(380px, 40vw, 560px); }
  .hero-in { display: grid; grid-template-columns: 200px 1fr; column-gap: 36px; align-items: start; padding-bottom: 110px; }
  .hero-logo { width: 200px; margin-top: -150px; padding: 16px 18px 12px; border-radius: 24px; }
  .hero-copy { padding-top: 18px; }
  .hero h1 { max-width: 22ch; }
}

/* ---------- building blocks ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; color: var(--flag); margin-bottom: .4em; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow.light { color: var(--gold-2); }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; border: 1px solid rgba(224,216,198,.6); }
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.page-head { margin: 4px 0 16px; }
.page-head h1 { margin-bottom: .2em; }
.section-h { font-size: 1.6rem; margin-top: 28px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--sand-2); color: var(--fairway); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.chip-hcp { background: var(--fairway); color: var(--paper); min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.chip-open { background: #d7f0df; color: var(--ok); }
.chip-cancelled { background: #f8dcdc; color: var(--flag); }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row form { margin: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 0; background: var(--fairway); color: var(--paper); font: 600 1rem var(--font);
  text-decoration: none; cursor: pointer; transition: transform .08s ease, background .15s ease; -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--fairway-2); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-light { background: var(--sand-2); color: var(--fairway); }
.btn-light:hover { background: #e3d9c3; }
.btn-gold { background: var(--gold-2); color: var(--fairway); }
.btn-gold:hover { background: #f0d27f; }
.btn-ghost { background: rgba(255,255,255,.12); color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.2); }
.btn-wa { background: #1fa855; color: #fff; }
.btn-wa:hover { background: #178a45; }
.btn-danger { background: transparent; color: var(--flag); box-shadow: inset 0 0 0 1.5px currentColor; }
.topbar .btn-light { background: var(--paper); }

.flash { background: #fff6dc; border: 1px solid #f0dc9c; color: #5b4a12; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; }
.flash.ok { background: #e3f4e8; border-color: #b6dfc3; color: #18532f; }
.flash.err { background: #fde8e8; border-color: #f2c2c2; color: #8a1a1a; }

/* forms: big touch targets, 16px inputs so iOS doesn't zoom */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--fairway); }
.form label small { font-weight: 400; }
input, select, textarea {
  font: 16px var(--font); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; min-height: 48px; width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--fairway-3); box-shadow: 0 0 0 4px rgba(31,122,88,.15); }
input[disabled] { background: var(--sand); }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.form .check input, .checklist input { width: 22px; height: 22px; min-height: 0; accent-color: var(--fairway-2); }
.hp { position: absolute !important; left: -9999px; }
.grid2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .span2 { grid-column: span 2; } }
.search { margin-top: 10px; border-radius: 999px; padding-left: 42px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%235d6862' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") 16px center no-repeat; }

/* ---------- home ---------- */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: -60px; position: relative; z-index: 2; }
.hl { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; border: 1px solid rgba(224,216,198,.6); }
.hl-next { grid-column: 1 / -1; border-top: 4px solid var(--flag); padding: 18px; }
.hl-next h2 { font-size: 1.4rem; margin-bottom: .35em; }
.hl-meta { color: var(--muted); line-height: 1.8; margin-bottom: .6em; }
.hl-meta svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; color: var(--fairway-3); }
.hl-stat { text-align: center; }
.hl-stat .big { font-family: var(--display); font-size: 1.9rem; color: var(--fairway); margin: 0; line-height: 1.1; }
.hl-stat p:last-child { margin: 0; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }
@media (min-width: 860px) { .highlights { grid-template-columns: 2fr 1fr 1fr 1fr; margin-top: -70px; } .hl-next { grid-column: auto; } .hl-stat { display: flex; flex-direction: column; justify-content: center; } }

.about-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .about-grid { grid-template-columns: repeat(3, 1fr); } }
.about-card { margin: 0; }
.about-ico { width: 34px; height: 34px; color: var(--paper); background: var(--fairway-2); border-radius: 10px; padding: 7px; margin-bottom: 10px; }
.about-card p { margin: 0; color: #36423c; }

.contact { margin-top: 28px; display: grid; gap: 10px; border-left: 4px solid var(--gold); }
@media (min-width: 860px) { .contact { grid-template-columns: 1fr 1.2fr; gap: 32px; padding: 28px; } }

/* ---------- auth ---------- */
.auth { margin-top: 12px; padding: 26px 22px; }
.auth h1 { font-size: 1.7rem; text-align: center; }
.auth-logo { display: block; width: 120px; margin: 0 auto 10px; }

/* ---------- lists ---------- */
.plist { list-style: none; margin: 0 0 16px; padding: 6px; }
.plist li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; }
.plist li + li { border-top: 1px solid var(--sand-2); }
.plist li.inactive { opacity: .5; }
.plist form { margin: 0; }
.plist-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plist-main .player { font-weight: 600; align-self: flex-start; }
.player { color: var(--ink); text-decoration: none; -webkit-touch-callout: none; }
.player:hover { color: var(--fairway-2); text-decoration: underline; text-decoration-color: var(--gold); }
.flag { font-size: 1.05em; }
.checklist { list-style: none; padding: 0; margin: 10px 0 14px; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.checklist li label { display: flex; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; }
.checklist li + li { border-top: 1px solid var(--sand-2); }
.elist { list-style: none; padding: 6px; }
.elist a { display: flex; gap: 14px; align-items: center; padding: 10px; color: inherit; text-decoration: none; border-radius: 12px; }
.elist a:hover { background: var(--sand); }
.elist-date { width: 52px; text-align: center; background: var(--fairway); color: var(--paper); border-radius: 10px; padding: 6px 0; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.elist-date b { display: block; font: 700 1.3rem/1 var(--display); letter-spacing: 0; }
.elist-date .elist-mon { display: block; font-weight: 700; letter-spacing: .1em; color: var(--gold-2); margin: 2px 0 1px; }
.elist-years { padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.elist-year { position: relative; overflow: hidden; border-radius: 12px; }
.elist-year.tone-0 { background: rgba(31, 122, 88, .07); }
.elist-year.tone-1 { background: rgba(201, 154, 46, .09); }
.elist-year.tone-2 { background: rgba(19, 92, 68, .12); }
.elist-year.tone-3 { background: rgba(200, 16, 46, .05); }
.elist-year-mark { position: absolute; right: 12px; top: -6px; font: 800 clamp(3.5rem, 14vw, 7rem)/1 var(--display); color: var(--fairway); opacity: .07; pointer-events: none; letter-spacing: -.02em; }
.elist-year .elist { position: relative; padding: 0; }
.elist-year .elist a:hover { background: rgba(255, 253, 248, .6); }
.elist-main { flex: 1; display: flex; flex-direction: column; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--sand-2); vertical-align: top; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }

.subnav { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 4px; scrollbar-width: none; }
.subnav a { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); text-decoration: none; color: var(--fairway); font-weight: 600; font-size: .9rem; }
.subnav a[aria-current="page"] { background: var(--fairway); color: var(--paper); border-color: var(--fairway); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(5, 1fr); } }
.tile { background: var(--paper); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); text-decoration: none; color: var(--muted); display: flex; flex-direction: column; font-size: .85rem; }
.tile strong { font: 700 2rem/1.1 var(--display); color: var(--fairway); }
details.add > summary { list-style: none; margin-bottom: 0; }
details.add > summary::-webkit-details-marker { display: none; }
details.add[open] > summary { margin-bottom: 16px; }
.msg.done { opacity: .6; }

.profile-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-top .avatar { box-shadow: 0 0 0 3px var(--gold-2); }
.photo-form { margin: 0; flex: 1; min-width: 160px; }
.photo-form p { margin: 6px 0 0; }
.profile-hcp { display: flex; flex-direction: column; align-items: center; background: var(--fairway); color: var(--paper); border-radius: 12px; padding: 10px 16px; }
.profile-hcp .muted { color: rgba(255,253,248,.75); }
.profile-hcp a { color: inherit; text-decoration: none; }
.profile-hcp strong { font: 700 1.8rem/1 var(--display); }

.placeholder { border: 2px dashed var(--line); background: rgba(255,253,248,.7); box-shadow: none; }

/* ---------- player hover card ---------- */
.pcard {
  position: absolute; z-index: 50; width: 250px; background: var(--paper); border-radius: 16px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(12,58,44,.28), 0 2px 6px rgba(0,0,0,.08); border: 1px solid var(--line);
  animation: pcard-in .16s ease-out;
}
@keyframes pcard-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.pcard-top { height: 54px; background: linear-gradient(135deg, var(--fairway), var(--fairway-3)); position: relative; }
.pcard-top::after { content: ""; position: absolute; right: 14px; top: 10px; width: 6px; height: 34px; border-left: 2px solid rgba(255,255,255,.6); }
.pcard-photo { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; border: 4px solid var(--paper); margin: -40px auto 0; display: grid; place-items: center; background: var(--fairway-3); color: #fff; font: 700 1.6rem var(--display); position: relative; }
.pcard-body { padding: 8px 16px 16px; text-align: center; }
.pcard-name { font: 700 1.15rem/1.2 var(--display); color: var(--fairway); margin: 4px 0 2px; }
.pcard-nick { color: var(--muted); font-size: .85rem; margin: 0 0 10px; }
.pcard-facts { display: flex; justify-content: center; gap: 8px; }
.pcard-fact { flex: 1; background: var(--sand); border-radius: 10px; padding: 8px 6px; }
.pcard-fact b { display: block; font: 700 1.3rem/1.1 var(--display); color: var(--fairway); }
.pcard-fact span { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.pcard-flag { font-size: 1.4rem; line-height: 1.15; display: block; }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; border-top: 1px solid var(--line); background: rgba(246,241,231,.85); color: var(--muted); font-size: .85rem; }
.foot-in { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding-top: 18px; padding-bottom: 18px; }
.foot p { margin: 0; }
.foot-legend { flex-basis: 100%; font-size: .78rem; }
.foot-powered { flex-basis: 100%; font-size: .78rem; }
.foot-powered a { color: inherit; font-weight: 600; }
@media (min-width: 860px) { .foot-legend { flex-basis: auto; margin-left: auto !important; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } .legend-art, .legend-cap { transform: none !important; } }
.pcard-fact { text-decoration: none; }

/* ---- Admin two-step sign-in ---- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.auth .steps { padding-left: 1.2rem; display: grid; gap: .6rem; }
.auth .qr { margin: .6rem 0; }
.auth .qr svg { display: block; width: 220px; max-width: 100%; height: auto; border-radius: 6px; background: #fff; }
.auth .key-input { width: 100%; font: 600 .95rem/1.4 ui-monospace, Menlo, monospace; letter-spacing: .02em; margin: .4rem 0; }
.auth .key-groups { display: block; font-family: ui-monospace, Menlo, monospace; word-spacing: .3em; margin-top: .3rem; }
.code-input { font-size: 1.5rem !important; letter-spacing: .3em; text-align: center; }
.recovery { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; }
.recovery code { display: block; text-align: center; padding: .45rem; background: var(--sand-2); border-radius: 8px; font-size: 1rem; }

/* Admin card editor: hole-by-hole grid, scrolls sideways on a phone */
.hole-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hole-table th, .hole-table td { padding: 6px 4px; vertical-align: middle; }
.hole-table th[scope=row] { white-space: nowrap; }
.hole-table th[scope=row] small { display: block; font-weight: 400; letter-spacing: 0; text-transform: none; }
.hole-table input { width: 3.4em; min-height: 40px; font-size: 16px; text-align: center; padding: 4px; }
.hole-table select { min-height: 40px; font-size: 16px; padding: 4px; }

/* Committee notice (home page and members page) */
.committee-card h2 { margin-top: 0; }
.committee { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.committee li { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--sand); }
.committee li div { display: flex; flex-direction: column; min-width: 0; }
.committee li div span { font-size: .85rem; color: var(--fairway-3); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* Active / Retired choice: a compact two-option switch */
.status-field { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; align-content: start; }
.status-field legend { font-weight: 600; font-size: .9rem; color: var(--fairway); padding: 0; margin-bottom: 6px; }
.form .seg { display: inline-flex; width: max-content; padding: 3px; gap: 3px; background: var(--sand); border: 1px solid var(--line); border-radius: 999px; }
.form .seg label { display: block; cursor: pointer; }
.form .seg input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; margin: 0; pointer-events: none; }
.form .seg span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--muted); }
.form .seg input:checked + span { background: var(--fairway); color: var(--paper); }
.form .seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.form .seg label:last-child input:checked + span { background: var(--muted); }
/* Committee role fields appear only when Type is Committee */
.committee-fields { display: grid; gap: 14px; }
.form:has(#kind option[value="committee"]:not(:checked)) .committee-fields { display: none; }

/* Home highlights leaderboards (members only) */
.boards { margin-top: 18px; }
.boards-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.boards-head h2 { margin: 0; }
.boards-pick { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--sand); border: 1px solid var(--line); border-radius: 999px; max-width: 100%; }
.boards-pick a { flex: none; display: inline-flex; align-items: center; padding: 0 14px; min-height: 36px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .88rem; font-variant-numeric: tabular-nums; }
.boards-pick a:hover { color: var(--fairway); }
.boards-pick a[aria-current] { background: var(--fairway); color: var(--paper); box-shadow: 0 1px 3px rgba(12, 58, 44, .25); }
.boards-grid { display: grid; gap: 14px; }
@media (min-width: 820px) { .boards-grid { grid-template-columns: repeat(3, 1fr); } }
.board { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); display: flex; flex-direction: column; }
.board h3 { margin: 0; padding: 12px 16px; font-size: 1rem; color: var(--paper); background: var(--fairway); letter-spacing: .01em; }
.lb { width: 100%; border-collapse: collapse; font-size: .95rem; }
.lb th { text-align: left; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 8px 12px; background: var(--sand); border-bottom: 1px solid var(--line); }
.lb td { padding: 9px 12px; border-bottom: 1px solid var(--sand-2); vertical-align: middle; }
.lb tbody tr:last-child td { border-bottom: 0; }
.lb tbody tr:nth-child(even) td { background: rgba(246, 241, 231, .45); }
.lb .lb-pos { width: 52px; text-align: center; }
.lb .lb-n { width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.lb td.lb-n { font: 700 1.1rem/1 var(--display); color: var(--fairway); }
.lb-name { max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-first .lb-name { font-weight: 700; }
.lb-medal { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 700; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-medal.m1 { background: var(--gold); color: #fff; }
.lb-medal.m2 { background: #b8bfc4; color: #fff; }
.lb-medal.m3 { background: #b98353; color: #fff; }
.lb-more, .lb-empty { margin: 0; padding: 10px 16px; font-size: .85rem; color: var(--muted); }
.lb-more { border-top: 1px solid var(--sand-2); background: var(--sand); margin-top: auto; }
.lb-empty { padding: 18px 16px; }
.boards-note { margin: 14px 0 0; }
@media (max-width: 600px) {
  .boards-pick { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; }
  .boards-pick a { justify-content: center; padding: 0 4px; font-size: .82rem; white-space: nowrap; }
}

/* Back button to the page above (sub-pages only) */
.back-link { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; margin: 6px 0 -4px; padding: 0 14px 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--fairway); font-weight: 600; font-size: .9rem; text-decoration: none; position: relative; z-index: 2; }
.back-link:hover { background: var(--sand-2); }
.back-link svg { width: 18px; height: 18px; }

/* ---- Admin event day: open/close scoring, tee sheet grid ---- */
.scoring-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.scoring-switch.is-open { border-left: 4px solid var(--ok); }
.scoring-switch form { margin: 0; }
.ts-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 12px; }
.ts-slot { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px 10px; margin: 0; min-width: 0; display: grid; gap: 6px; }
.ts-slot legend { padding: 0 4px; }
.ts-slot select { width: 100%; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--paper); font: inherit; }
.ts-left { margin: 0 0 10px; }

/* Drop-down arrow under long lists (data-more): show the rest (Damien, 10 Nov 2026) */
.more-toggle { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin: 8px 0 0;
  padding: 8px 12px; border: 1px solid var(--line, #e3ded2); border-radius: 999px; background: transparent;
  color: var(--fairway-3, #1d3b2a); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; min-height: 40px; }
.more-toggle:hover { background: var(--surface-2, #f1efe9); }
.more-arrow { display: inline-block; transition: transform .2s ease; }
.more-toggle[aria-expanded="true"] .more-arrow { transform: rotate(180deg); }
[data-more] > [hidden] { display: none !important; }
