/* Casual Tee styles. Theme colors are overridden from app/content/site.yaml
   via an inline :root block in base.html. */
:root {
  --green: #1f6f43;
  --green-dark: #174f31;
  --accent: #f2c94c;
  --bg: #f5f7f2;
  --surface: #ffffff;
  --text: #1d2a22;
  --muted: #333;            /* secondary copy: dark grey, not mid-grey (designer round 2) */
  --border: #d6ddd4;
  --err: #b3261e;
  --landing-bg: #0f3d26;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 40, 24, .06), 0 4px 16px rgba(16, 40, 24, .06);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  /* Logo is vertically centered in the bar (no overhang). */
  --header-h: 107px;
  --logo-h: 95px;
  --logo-overhang: 0px;
  --logo-top: calc((var(--header-h) - var(--logo-h)) / 2);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: var(--font-sans); font-size: 1rem; line-height: 1.55;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); }
h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); }
p { margin: 0 0 1em; }
a { color: var(--green); }
img { max-width: 100%; display: block; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: #fff; color: var(--green);
  padding: .5rem .9rem; border-radius: 8px; font-weight: 600; transition: top .15s; }
.skip-link:focus { top: .75rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- header ---------- */
.site-header { background: var(--green); color: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); position: relative; z-index: 10; }
.header-inner {
  max-width: 1200px; margin: 0 auto; height: var(--header-h);
  padding: 0 clamp(1rem, 3vw, 2rem);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  position: relative;
}
.header-left { justify-self: start; display: flex; align-items: center; }
.header-right { justify-self: end; display: flex; align-items: center; }
/* Logo image only (site.yaml theme.logo); height drives the size, width follows. */
/* The link box is exactly the bar height; the image is centered vertically via --logo-top. */
.brand {
  justify-self: center; align-self: start; display: block; height: var(--header-h);
  position: relative; z-index: 1; line-height: 0; border-radius: 6px; text-decoration: none;
}
.brand picture { display: contents; }
.brand-logo {
  display: block; height: var(--logo-h); width: auto;
  margin-top: var(--logo-top);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}
main.container { margin-top: max(clamp(1.5rem, 4vw, 2.75rem), calc(var(--logo-overhang) + 1rem)); }
main.landing { padding-top: var(--logo-overhang); }
.login-brand { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .75rem; }
.login-logo { display: block; height: 88px; width: auto; }
form.inline { display: inline; margin: 0; }
button.link { background: none; padding: .25rem 0; color: #fff; font-weight: 600; border-radius: 0; }
button.link:hover { text-decoration: underline; text-underline-offset: 6px; }

/* Hamburger menu (desktop and mobile) */
.menu-toggle {
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 10px;
  display: inline-grid; place-items: center; background: transparent; color: #fff; cursor: pointer;
}
.menu-toggle:hover { background: rgba(255,255,255,.12); }
.menu-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.menu-icon { position: relative; width: 26px; height: 18px; display: block; }
.menu-icon span {
  position: absolute; left: 0; width: 100%; height: 3px; border-radius: 2px; background: currentColor;
  transition: transform .2s ease, opacity .15s ease, top .2s ease;
}
.menu-icon span:nth-child(1) { top: 0; }
.menu-icon span:nth-child(2) { top: 7.5px; }
.menu-icon span:nth-child(3) { top: 15px; }
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) { top: 7.5px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) { top: 7.5px; transform: rotate(-45deg); }
.menu-panel {
  position: absolute; top: calc(100% - .25rem); left: clamp(1rem, 3vw, 2rem); z-index: 20;
  min-width: 230px; background: var(--surface); color: var(--text);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(10,30,18,.25), 0 2px 6px rgba(10,30,18,.12);
  padding: .4rem; animation: menu-in .16s ease-out;
}
.menu-panel[hidden] { display: none; }
.menu-panel ul { list-style: none; margin: 0; padding: 0; }
.menu-panel a, .menu-panel .menu-item-button {
  display: block; width: 100%; text-align: left; padding: .7rem .9rem; border-radius: 8px;
  color: var(--text); text-decoration: none; font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer;
}
.menu-panel a:hover, .menu-panel .menu-item-button:hover, .menu-panel a:focus-visible, .menu-panel .menu-item-button:focus-visible {
  background: color-mix(in srgb, var(--green) 10%, transparent);
}
.menu-panel a[aria-current="page"] { color: var(--green); box-shadow: inset 4px 0 0 var(--accent); }
.menu-panel li + li:has(form) { border-top: 1px solid rgba(0,0,0,.08); margin-top: .3rem; padding-top: .3rem; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* Without JS: the link opens the panel via :target; the button and close link swap roles. */
.menu-toggle-nojs, .menu-close-nojs { display: none; }
.no-js .menu-toggle:not(.menu-toggle-nojs) { display: none; }
.no-js .menu-toggle-nojs { display: inline-grid; }
.no-js .menu-close-nojs { display: block; }
.no-js #site-menu:target { display: block; }
#site-menu { scroll-margin-top: 100vh; } /* :target must not scroll the header away */

/* Golf-ball login/signup button */
.golf-ball {
  --size: 66px;
  flex: none;
  width: var(--size); height: var(--size); border-radius: 50%;
  display: grid; grid-template-rows: 1fr auto 1fr; align-items: center; justify-items: center;
  color: var(--green-dark); text-decoration: none; font-size: .68rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; line-height: 1;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.95) 0 10%, rgba(255,255,255,0) 32%),
    radial-gradient(circle, rgba(0,0,0,.09) 0 1.4px, transparent 1.9px) 0 0 / 7px 7px,
    radial-gradient(circle, rgba(0,0,0,.07) 0 1.4px, transparent 1.9px) 3.5px 3.5px / 7px 7px,
    radial-gradient(circle at 38% 32%, #ffffff 0%, #f3f4f1 45%, #d5d9d2 85%, #c4c9c1 100%);
  box-shadow: 0 3px 6px rgba(0,0,0,.25), inset -4px -6px 10px rgba(0,0,0,.12), inset 3px 3px 6px rgba(255,255,255,.8);
  transition: transform .18s ease, box-shadow .18s ease;
}
.golf-ball .ball-top { align-self: end; padding-bottom: 3px; }
.golf-ball .ball-bottom { align-self: start; padding-top: 3px; }
.golf-ball .ball-line { width: 82%; height: 2px; border-radius: 2px; background: var(--green); opacity: .85; }
.golf-ball:hover { transform: translateY(-2px) rotate(-6deg); box-shadow: 0 8px 14px rgba(0,0,0,.3), inset -4px -6px 10px rgba(0,0,0,.12), inset 3px 3px 6px rgba(255,255,255,.8); }
.golf-ball:active { transform: translateY(0) scale(.97); }
.golf-ball:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1040px; margin: clamp(1.5rem, 4vw, 2.75rem) auto; padding: 0 clamp(1rem, 3vw, 2rem); }
.page-intro { margin-bottom: 1.5rem; }
.page-intro p { color: var(--muted); font-size: 1.05rem; }
.grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.card { background: var(--surface); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 1.75rem); box-shadow: var(--shadow); }
.site-footer { text-align: center; padding: 1.5rem 1rem; color: var(--muted); font-size: .875rem; }
.site-footer p { margin: 0; }

/* ---------- forms & buttons ---------- */
form label { display: block; margin-bottom: 1rem; font-weight: 600; font-size: .9rem; }
form input, form select {
  display: block; width: 100%; margin-top: .35rem; padding: .65rem .75rem;
  border: 1px solid var(--border); border-radius: 8px; font: inherit; font-weight: 400;
  background: #fff; color: var(--text);
}
form input:focus, form select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--err); }
.row { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }
button { background: var(--green); color: #fff; border: 0; border-radius: 8px; padding: .7rem 1.3rem; font: inherit; font-weight: 600; cursor: pointer; transition: background .15s; }
button:hover { background: var(--green-dark); }
button.secondary { background: #fff; color: var(--green-dark); box-shadow: inset 0 0 0 2px var(--green); }
button.secondary:hover { background: #e7f4ec; }
button[disabled] { opacity: .6; cursor: wait; }
.btn { display: inline-block; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; }
.btn-accent { background: var(--accent); color: #1d2a22; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.alert { background: #fdecea; color: var(--err); padding: .65rem .85rem; border-radius: 8px; }
.field-error { display: block; color: var(--err); font-weight: 400; margin-top: .25rem; }
.success { background: #e7f4ec; padding: 1rem; border-radius: 8px; }
.handle { color: var(--green); font-weight: 600; margin-top: -.5rem; }
small { font-size: .875rem; }
.coming-soon { color: var(--muted); font-size: .875rem; margin-top: 1.25rem; }
.coming-soon strong { color: var(--text); }
.placeholder-note { background: #fff8e1; border-left: 4px solid #e0b000; padding: .6rem .8rem; border-radius: 6px; }

/* ---------- MyAccount tabs ---------- */
.tablist { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 2px solid #e3e8e1; margin: 1rem 0; }
.tablist [role="tab"] { padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tablist [role="tab"][aria-selected="true"] { color: var(--green); border-bottom-color: var(--green); }
.tablist [role="tab"]:focus-visible, .tabpanel:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.tabpanel dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.5rem; }
.tabpanel dt { font-weight: 600; color: var(--muted); }
.tabpanel dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 480px) { .tabpanel dl { grid-template-columns: 1fr; gap: .1rem; } .tabpanel dd { margin-bottom: .6rem; } }

/* ---------- landing / carousel ---------- */
.landing-page { background: var(--landing-bg); background-attachment: fixed; }
.landing-page .site-footer { color: rgba(255,255,255,.75); }
.landing { width: 100%; }
.carousel { position: relative; width: 100%; }
.carousel-viewport { position: relative; }
.carousel-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
}
.js .carousel-track { scrollbar-width: none; }
.js .carousel-track::-webkit-scrollbar { display: none; }
.slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always;
  height: clamp(440px, 72vh, 720px); overflow: hidden; color: #fff;
}
.slide-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::after { /* legibility scrim behind the caption */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,28,17,.78) 0%, rgba(8,28,17,.45) 45%, rgba(8,28,17,0) 75%),
              linear-gradient(0deg, rgba(8,28,17,.55) 0%, rgba(8,28,17,0) 40%);
}
.slide-caption {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0;
  max-width: 1200px; margin: 0 auto; padding: 0 clamp(4.5rem, 8vw, 7rem) clamp(4.5rem, 9vh, 6rem);
}
.slide-caption > * { max-width: 36rem; }
.slide-title { font-family: var(--font-display); font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem); font-weight: 700; line-height: 1.08; margin-bottom: .9rem; text-wrap: balance; }
.slide-text { font-size: clamp(1rem, .95rem + .35vw, 1.2rem); color: rgba(255,255,255,.92); margin-bottom: 1.5rem; }
.slide-caption, .slide-caption * { text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.slide-caption .btn { text-shadow: none; }

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; padding: 0; border-radius: 50%;
  display: none; place-items: center;
  background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.45);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .15s, transform .15s;
}
.js .carousel-arrow { display: grid; }
.carousel-arrow:hover { background: rgba(255,255,255,.32); }
.carousel-arrow:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.carousel-prev { left: clamp(.5rem, 2vw, 1.5rem); }
.carousel-next { right: clamp(.5rem, 2vw, 1.5rem); }

.carousel-controls {
  position: absolute; left: 0; right: 0; bottom: clamp(1.25rem, 3vh, 2rem); z-index: 2;
  display: none; justify-content: center; align-items: center; gap: .75rem; pointer-events: none;
}
.js .carousel-controls { display: flex; }
.carousel-controls > * { pointer-events: auto; }
.carousel-dots { display: flex; gap: .25rem; }
.carousel-dot {
  width: 28px; height: 28px; padding: 0; border-radius: 50%; background: transparent; position: relative;
}
.carousel-dot::before {
  content: ""; position: absolute; inset: 9px; border-radius: 50%;
  background: rgba(255,255,255,.55); transition: background .2s, transform .2s;
}
.carousel-dot:hover { background: transparent; }
.carousel-dot:hover::before { background: #fff; }
.carousel-dot[aria-current="true"]::before { background: var(--accent); transform: scale(1.35); }
.carousel-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.carousel-play { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: rgba(0,0,0,.35); font-size: .75rem; }
.carousel-play[data-playing="true"] .icon-play, .carousel-play[data-playing="false"] .icon-pause { display: none; }

.landing-cta { color: #fff; text-align: center; padding: clamp(2.5rem, 7vw, 4.5rem) 1rem; }
.landing-cta-inner { max-width: 640px; margin: 0 auto; }
.landing-cta h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.landing-cta p { color: rgba(255,255,255,.85); font-size: 1.1rem; margin-bottom: 1.5rem; }

@media (max-width: 640px) {
  :root { --header-h: 90px; --logo-h: 74px; }
  .header-inner { gap: .5rem; padding-left: .6rem; padding-right: .75rem; }
  .menu-panel { left: .5rem; right: .5rem; min-width: 0; }
  .login-logo { height: 68px; }
  .golf-ball { --size: 56px; font-size: .58rem; }
  .slide { height: clamp(460px, 78vh, 640px); }
  .slide::after { background: linear-gradient(0deg, rgba(8,28,17,.88) 0%, rgba(8,28,17,.55) 55%, rgba(8,28,17,.1) 100%); }
  .slide-caption { padding: 0 1.25rem 4.5rem; }
  .carousel-arrow { width: 42px; height: 42px; top: 38%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .golf-ball:hover, .btn-accent:hover { transform: none; }
  .menu-icon span, .menu-panel { transition: none; animation: none; }
}

/* ---------- MyAccount > Calendars ---------- */
.muted { color: var(--muted); }
.cal { display: grid; gap: 1.75rem; }
.cal h2 { margin-bottom: .25rem; }
.cal h3 { font-size: 1.1rem; margin-bottom: .75rem; }
.cal h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1rem 0 .5rem; }
.cal-head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: flex-end; }
.cal-head p { margin: 0; }
.tz-form { margin: 0; min-width: min(100%, 300px); }
.tz-form label { margin-bottom: .35rem; }
.tz-row { display: flex; gap: .5rem; }
.tz-row select { margin-top: 0; }
.flash { margin: 0; background: #e7f4ec; color: var(--green-dark); border-left: 4px solid var(--green); padding: .6rem .85rem; border-radius: 6px; font-weight: 600; }

.cal-days { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-day { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .55rem .65rem; min-height: 112px; display: flex; flex-direction: column; gap: .4rem; }
.cal-day.is-empty { background: #fafbf9; }
.cal-day.is-today { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.cal-day-head { display: flex; align-items: baseline; gap: .3rem; font-size: .78rem; color: var(--muted); }
.cal-day-head .dow { font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cal-day-head .dom { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.cal-day.is-today .cal-day-head .dom { color: var(--green); }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.slot { border-radius: 6px; padding: .3rem .4rem; font-size: .76rem; line-height: 1.3; border-left: 3px solid; }
.slot-recurring { background: #e7f4ec; border-color: var(--green); }
.slot-one_time { background: #fff6d9; border-color: #d9a400; }
.slot-time { display: block; font-weight: 700; }
.slot-note { display: block; color: var(--muted); overflow-wrap: anywhere; }
.slot-none { margin: auto 0 0; font-size: .875rem; color: #5b6b5f; }
.legend { margin: .6rem 0 0; font-size: .875rem; color: var(--muted); display: flex; align-items: center; gap: .4rem; }
.key { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; border-left: 3px solid; }
.key-recurring { background: #e7f4ec; border-color: var(--green); }
.key-one_time { background: #fff6d9; border-color: #d9a400; margin-left: .6rem; }

.cal-forms { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.cal-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; background: #fcfdfb; }
.cal-card form > button { margin-top: .25rem; }
.weekday-picker { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.weekday-picker legend { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; padding: 0; }
.weekday-options { display: flex; flex-wrap: wrap; gap: .35rem; }
form label.weekday { margin: 0; font-weight: 600; position: relative; }
.weekday input { position: absolute; opacity: 0; width: 100%; height: 100%; inset: 0; margin: 0; cursor: pointer; }
.weekday span { display: inline-block; min-width: 3rem; text-align: center; padding: .45rem .55rem; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: .85rem; transition: background .15s, color .15s, border-color .15s; }
.weekday input:checked + span { background: var(--green); border-color: var(--green); color: #fff; }
.weekday input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.weekday-picker[aria-invalid="true"] .weekday span { border-color: var(--err); }

.entries { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.entry { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.entry.is-past { opacity: .6; }
.entry-meta { font-size: .875rem; color: var(--muted); }
.entry form { margin: 0; flex: none; }
button.danger { background: #fff; color: var(--err); border: 1px solid #e8b4b0; padding: .4rem .9rem; font-size: .85rem; }
button.danger:hover { background: #fdecea; }

@media (max-width: 900px) {
  .cal-days { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 520px) {
  .cal-days { grid-template-columns: 1fr; }
  .cal-day { min-height: 0; flex-direction: row; align-items: flex-start; gap: .75rem; }
  .cal-day-head { flex-direction: column; align-items: center; gap: 0; min-width: 2.75rem; }
  .slots { flex: 1; }
  .slot-none { margin: .2rem 0 0; }
  .entry { flex-direction: column; align-items: flex-start; }
}

/* ---------- groups, tee sheets, friends ---------- */
a.button, .button { display: inline-block; background: var(--green); color: #fff; border-radius: 8px; padding: .7rem 1.3rem; font-weight: 600; text-decoration: none; border: 0; line-height: 1.2; }
a.button:hover { background: var(--green-dark); }
a.button.secondary { background: #fff; color: var(--green-dark); box-shadow: inset 0 0 0 2px var(--green); }
button.secondary:hover { background: #e7f4ec; }
a.button.secondary:hover { background: #d5ddd2; }
button.small-btn { padding: .4rem .9rem; font-size: .875rem; }
.small { font-size: .875rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.page-head p { margin: 0; }
.crumbs { font-size: .875rem; margin-bottom: .9rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; font-weight: 700; color: var(--green); margin: 0 0 .35rem; }
.messages:empty { display: none; }
.messages { display: grid; gap: .5rem; margin: 1rem 0; }
.search-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 0 0 1.25rem; }
.search-bar input[type="search"] { flex: 1 1 260px; margin: 0; width: auto; }
form label.check, label.check { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; margin: 0 0 1rem; }
label.check input { width: auto; margin: 0; display: inline-block; accent-color: var(--green); }
.search-bar label.check { margin: 0; }
textarea { display: block; width: 100%; margin-top: .35rem; padding: .65rem .75rem; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-weight: 400; resize: vertical; }
textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap; background: #eef2ec; color: var(--muted); }
.badge-public { background: #e7f4ec; color: var(--green-dark); }
.badge-private { background: #fff3d6; color: #7a5600; }
.badge-status, .badge-you { background: var(--green); color: #fff; }
.badge-pending { background: #fff3d6; color: #7a5600; }
.badge-owner { background: #1d2a22; color: var(--accent); }
.badge-group { background: #e6eef9; color: #1f4f8f; }
.badge-personal { background: #f3e9f7; color: #6b2f86; }
.badge-past { background: #eceeea; color: var(--muted); margin-left: .4rem; }
.count { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .4em; border-radius: 999px; background: var(--accent); color: #1d2a22; font-size: .8rem; vertical-align: middle; }
.empty { text-align: center; padding: 2rem 1rem; }
.group-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.group-card { display: flex; flex-direction: column; gap: .35rem; border-top: 4px solid var(--green); transition: transform .15s, box-shadow .15s; }
.group-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,40,24,.08), 0 10px 24px rgba(16,40,24,.10); }
.group-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.group-card h2 { font-size: 1.15rem; margin: 0; }
.group-card h2 a { color: var(--text); text-decoration: none; }
.group-card h2 a::after { content: ""; position: absolute; inset: 0; }
.group-card { position: relative; }
.group-card h2 a:focus-visible { outline: none; }
.group-card:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.group-desc { margin: 0; color: var(--text); flex: 1; }
.group-meta { margin: 0; font-size: .875rem; }
.group-hero, .sheet-hero { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; align-items: flex-start;
  background: linear-gradient(135deg, color-mix(in srgb, var(--green) 9%, #fff) 0%, #fff 60%); }
.group-hero-main { flex: 1 1 380px; }
.group-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.group-title h1, .sheet-hero h1 { margin: 0; }
.group-description { white-space: pre-line; margin: .5rem 0 0; }
.group-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.group-actions form { margin: 0; }
.group-layout { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); align-items: start; margin-top: 1.25rem; }
.group-side { display: grid; gap: 1.5rem; }
@media (max-width: 860px) { .group-layout { grid-template-columns: 1fr; } }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-bottom: .5rem; }
.section-head h2 { margin: 0; }
h3.sub { font-size: 1rem; margin: 1rem 0 .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.subcard { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid #e3e8e1; }
.locked { margin-top: 1.25rem; text-align: center; }
.sheet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.sheet-link { display: grid; grid-template-columns: auto 1fr auto; gap: .9rem; align-items: center; padding: .65rem .8rem; border: 1px solid #e3e8e1; border-radius: 10px; text-decoration: none; color: var(--text); transition: border-color .15s, background .15s; }
.sheet-link:hover { border-color: var(--green); background: #f8fbf7; }
.sheet-info { display: grid; }
.sheet-date { display: grid; justify-items: center; width: 3.2rem; padding: .25rem 0; border-radius: 8px; background: var(--green); color: #fff; line-height: 1.1; }
.sheet-date .dow, .sheet-date .mon { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; opacity: .9; }
.sheet-date .dom { font-size: 1.3rem; font-weight: 800; }
.spots { font-size: .8rem; font-weight: 700; color: var(--green-dark); background: #e7f4ec; padding: .2rem .55rem; border-radius: 999px; white-space: nowrap; }
.spots.is-full { color: #7a5600; background: #fff3d6; }
.past summary { cursor: pointer; margin-top: 1rem; font-weight: 600; color: var(--muted); }
ul.plain { padding-left: 1.1rem; }
.people { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.people > li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem 0; border-bottom: 1px solid #eef1ec; }
.people > li:last-child { border-bottom: 0; }
.people form { margin: 0; }
.btn-row { display: flex; gap: .4rem; }
.player { display: inline-flex; align-items: center; gap: .55rem; min-width: 0; }
.player strong { overflow-wrap: anywhere; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: color-mix(in srgb, var(--green) 15%, #fff); color: var(--green-dark); font-weight: 800; font-size: .8rem; }
.times-picker { border: 0; padding: 0; margin: 0 0 1rem; }
.times-picker legend { font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.times-row { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.times-row label { margin: 0; }
.times-row input { margin: 0; }
fieldset.choice { border: 1px solid var(--border); border-radius: 10px; padding: .75rem 1rem; margin: 0 0 1rem; }
fieldset.choice legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
label.radio { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin: .4rem 0; }
label.radio input { width: auto; margin: .3rem 0 0; accent-color: var(--green); }
.form-card { max-width: 640px; margin: 0 auto; }
.form-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.sheet-when { margin: .35rem 0 0; }
.sheet-notes { margin: .5rem 0 0; white-space: pre-line; }
.tee-times { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.tee-time { border: 1px solid #e3e8e1; border-radius: 12px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .6rem; }
.tee-time.is-mine { border-color: var(--green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 20%, transparent); }
.tt-head { display: flex; justify-content: space-between; align-items: center; }
.tt-time { margin: 0; font-size: 1.3rem; }
.seats { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.seat { display: flex; justify-content: space-between; align-items: center; gap: .4rem; padding: .4rem .55rem; border-radius: 8px; background: #f6f8f5; flex-wrap: wrap; }
.seat.open { background: repeating-linear-gradient(45deg, #fafbf9, #fafbf9 6px, #f1f4ef 6px, #f1f4ef 12px); border: 1px dashed #cfd8cc; justify-content: center; font-size: .85rem; }
.seat form { margin: 0; }
.tt-actions { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-top: auto; }
.tt-actions form { margin: 0; }
.inline-form { display: flex; gap: .35rem; align-items: center; }
.inline-form select { margin: 0; width: auto; padding: .4rem .5rem; font-size: .9rem; }
.inline-form button { padding: .45rem .8rem; font-size: .85rem; }
.toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.toggle a { padding: .35rem .95rem; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .875rem; }
.toggle a.is-on { background: var(--green); color: #fff; }
.my-tee-times { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.my-tt { display: flex; gap: .9rem; align-items: flex-start; padding: .75rem; border: 1px solid #e3e8e1; border-radius: 12px; }
.my-tt.is-past { opacity: .8; }
.my-tt.is-past .sheet-date { background: #5f6d63; }
.my-tt-body p { margin: 0 0 .2rem; }
.my-tt-title a { color: var(--text); text-decoration: none; }
.my-tt-title a:hover { text-decoration: underline; }
.fr-section { margin-top: 1.5rem; }
.fr-section h3 { font-size: 1.05rem; }
.slot-teetime { background: #e6eef9; border-color: #1f4f8f; }
.slot-teetime a { color: inherit; text-decoration: none; display: grid; }
.slot-teetime a:hover .slot-time { text-decoration: underline; }
.slot-teetime .lock { font-size: .72rem; color: var(--muted); }
.key-teetime { background: #e6eef9; border-color: #1f4f8f; margin-left: .6rem; }  /* same swatch style as Weekly / One-time */
.error-page { max-width: 560px; margin: 2rem auto; text-align: center; }
.error-code { font-size: 3.5rem; font-weight: 800; color: var(--green); margin: 0; line-height: 1; }
.error-page .actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.people > li { flex-wrap: nowrap; }
.people > li > .player { flex: 1 1 auto; }
.people > li > form, .people > li > .btn-row, .people > li > .badge { flex: none; }
.player > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .people > li { flex-wrap: wrap; } }
.group-card > .badge-status { align-self: flex-start; }
.card + .grid, .card + .card { margin-top: 1.5rem; }
.people button { padding: .4rem .9rem; font-size: .85rem; }
.player > span:last-child { display: grid; line-height: 1.25; }
.player strong { overflow-wrap: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .muted { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
form label.check { display: flex; width: fit-content; }
.group-side > .card + .card { margin-top: 0; }

/* ---------- admin ---------- */
.table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid #eef1ec; vertical-align: middle; }
.data-table thead th { background: #f6f8f5; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.data-table tbody tr:hover { background: #fafcf9; }
.data-table tbody th { font-weight: 700; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.tier-cell { display: flex; align-items: center; gap: .5rem; }
.tier-cell form { margin: 0; }
.tier-cell button { padding: .3rem .65rem; font-size: .78rem; white-space: nowrap; }
.badge-tier-golfer { background: #eef2ec; color: var(--muted); }
.badge-tier-starter { background: #1d2a22; color: var(--accent); }
.compact-select { width: auto !important; margin: 0 !important; }
.pager { display: flex; justify-content: center; gap: 1rem; padding: .9rem; font-weight: 600; }
.audit { list-style: none; margin: 0; padding: 0; }
.audit li { display: flex; flex-wrap: wrap; gap: .25rem 1rem; padding: .5rem 0; border-bottom: 1px solid #eef1ec; font-size: .9rem; }
.audit time { color: var(--muted); min-width: 11rem; }
.table-card + .card { margin-top: 1.5rem; }
.container-wide { max-width: 1320px; }

/* ---------- golfers / public profile ---------- */
.handle-link { color: inherit; text-decoration: none; }
.handle-link:hover, .handle-link:focus-visible { text-decoration: underline; color: var(--green); }
.golfer-list a.player { text-decoration: none; color: inherit; padding: .2rem 0; }
.golfer-list a.player:hover strong, .golfer-list a.player:focus-visible strong { text-decoration: underline; color: var(--green); }
.golfer-list .muted { display: block; font-size: .85rem; }
.public-card { display: grid; gap: 1.25rem; }
.pp-head { display: flex; align-items: center; gap: .9rem; }
.pp-head h2 { margin: 0; overflow-wrap: anywhere; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }
.public-card dl.pp-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 0; }
@media (max-width: 560px) { .public-card dl.pp-fields { grid-template-columns: 1fr; } }
.pp-fields > div { background: #f6f8f5; border-radius: 10px; padding: .7rem .9rem; min-height: 4.2rem; }
.public-card .pp-fields dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.public-card .pp-fields dd { margin: .2rem 0 0; font-weight: 600; font-size: 1.05rem; }
.not-shared { color: var(--muted); font-weight: 400; font-style: italic; font-size: .95rem; }
.pp-calendar h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.cal-days-public { margin-top: .5rem; }
.pp-actions { display: flex; align-items: center; gap: .75rem; margin: .5rem 0 1rem; min-height: 2.25rem; }
.pp-actions form { display: flex; align-items: center; gap: .6rem; margin: 0; }
.pp-layout { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 760px) { .pp-layout { grid-template-columns: 1fr; } }
.pp-preview .public-card { box-shadow: none; border: 1px dashed #cfd8cc; }
.privacy-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .9rem; }
.privacy-form legend { font-weight: 700; margin-bottom: .6rem; }
.switch-row { display: grid; grid-template-columns: auto 1fr; gap: .1rem .75rem; align-items: center; }
.switch-row label { margin: 0; font-weight: 600; cursor: pointer; }
.switch-row small { grid-column: 2; }
input.switch {
  appearance: none; -webkit-appearance: none; width: 46px; height: 26px; margin: 0; border-radius: 999px;
  background: #c9d1c6; position: relative; cursor: pointer; transition: background .15s; border: 0; flex: none;
}
input.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s;
}
input.switch { background: #7b857a; box-shadow: inset 0 0 0 1px #5f685e; }  /* off: medium grey, white knob */
input.switch:checked { background: var(--green); box-shadow: none; }  /* on: solid green, white knob */
.switch-row:has(input.switch:checked) label::after { content: "On"; margin-left: .5rem; padding: .05rem .5rem; border-radius: 999px;
  background: var(--green); color: #fff; font-size: .875rem; font-weight: 700; vertical-align: middle; }
.switch-row:has(input.switch:not(:checked)) label::after { content: "Off"; margin-left: .5rem; padding: .05rem .5rem; border-radius: 999px;
  background: #e4e7e3; color: #333; font-size: .875rem; font-weight: 700; vertical-align: middle; }
input.switch:checked::after { transform: translateX(20px); }
input.switch:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (forced-colors: active) { input.switch { appearance: auto; -webkit-appearance: auto; width: auto; height: auto; } input.switch::after { display: none; } }
.js .nojs-only { display: none; }

/* ---------- locations ---------- */
.form-row { display: grid; grid-template-columns: 2fr 1fr; gap: 0 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form-hint { margin-top: -.4rem; }
.search-bar input.filter-city { flex: 0 1 180px; }
.search-bar select.filter-state { flex: 0 1 190px; max-width: 220px; }
.group-location { margin: .25rem 0 0; }
.search-hint { margin: -.6rem 0 1rem; font-size: .85rem; }
.golfer-list .badge { justify-self: start; margin: .1rem 0; }
.group-meta .group-location { white-space: nowrap; }

/* ---- Dependents, family, party bookings, no-shows ---- */
.badge-family { background: color-mix(in srgb, var(--accent, #e0b84a) 25%, #fff); color: var(--green-dark); }
.badge-no-show { background: #fde8e8; color: #8a1c1c; }
.no-show-record { color: #8a1c1c; font-size: .82rem; font-weight: 600; }
.is-guest .avatar, .avatar.is-guest { background: #e9efe9; color: var(--muted); border: 1px dashed var(--muted); }
.is-guest .guest-of { color: var(--muted); font-size: .9em; }
.party-form { display: grid; gap: .6rem; margin-top: .75rem; }
.party-form label.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.party-form label.check input { width: auto; }
.add-dependents { border: 1px solid #dfe6df; border-radius: 8px; padding: .5rem .75rem; }
.add-dependents > summary { cursor: pointer; font-weight: 600; color: var(--green); }
.add-dependents[open] > summary { margin-bottom: .5rem; }
.family-list { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .75rem; }
.family-list > li { display: grid; gap: .4rem; }
.card-inset { background: #f6f8f6; border-radius: 10px; padding: 1rem 1.1rem; border: 1px solid #e3e9e3; }
.callout { background: #fff7e0; border-left: 4px solid var(--accent, #e0b84a); border-radius: 8px; padding: .9rem 1rem; margin-bottom: 1rem; }
.note { color: var(--muted); font-size: .9rem; background: #eef4ff; border-radius: 6px; padding: .5rem .7rem; }
.hint { color: var(--muted); font-size: .875rem; margin: .25rem 0 0; }
.party-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; min-width: 0; }

/* ---- Admin: account status ---- */
.badge-status-active { background: #e7f4ec; color: var(--green-dark); }
.badge-status-inactive { background: #fff3d6; color: #7a5600; }
.badge-status-deleted { background: #eceeea; color: var(--muted); }
small.block { display: block; margin-top: .2rem; min-width: 9rem; max-width: 14rem; }
.account-actions { margin-top: .4rem; display: grid; gap: .3rem; justify-items: start; }
.account-actions details.deactivate > summary { cursor: pointer; list-style: none; }
.account-actions details.deactivate form { display: grid; gap: .35rem; margin: .4rem 0; }
.danger-link { color: #a3261d; font-weight: 600; font-size: .875rem; }
.danger-zone { border-top: 4px solid #a3261d; max-width: 46rem; margin: 0 auto; }
.danger-zone .checklist { padding-left: 1.2rem; display: grid; gap: .3rem; }
.danger-zone form.stack { display: grid; gap: .5rem; max-width: 28rem; }
.danger-zone .actions { display: flex; gap: .75rem; align-items: center; margin-top: .5rem; }
button.danger-solid { background: #a3261d; }
button.danger-solid:hover { background: #7d1c15; }
.player.is-gone strong { color: var(--muted); font-weight: 600; }
.account-actions details.deactivate { position: relative; }
.account-actions details.deactivate[open] form { width: 16rem;
  background: var(--surface, #fff); border: 1px solid #e3d6d4; border-radius: 10px; padding: .75rem; box-shadow: 0 8px 24px rgba(0,0,0,.12); }

/* ---- Admin: edit golfer ---- */
.admin-edit { max-width: 46rem; margin: 0 auto; }
.admin-edit form.stack { display: grid; gap: .6rem; }
.admin-edit .actions { display: flex; gap: .75rem; align-items: center; margin-top: .5rem; }
.admin-edit table.diff del { color: #8a1c1c; text-decoration: line-through; }
.admin-edit table.diff ins { color: var(--green-dark); text-decoration: none; font-weight: 600; }
.admin-edit .review h2 { margin-top: 0; }
.edit-link { font-weight: 600; }
.audit-changes { color: var(--ink, inherit); }

/* ---- Forgot / reset password ---- */
.auth-card { max-width: 30rem; margin: 2rem auto; }
.auth-card form.stack { display: grid; gap: .5rem; margin: 1rem 0; }
.forgot-link { display: inline-block; margin-top: .6rem; font-size: .9rem; }

/* ---- rounds / scoring / courses ---- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scorecard { border-collapse: collapse; font-variant-numeric: tabular-nums; min-width: 100%; }
.scorecard th, .scorecard td { border: 1px solid var(--line, #dfe5dc); padding: .3rem .35rem; text-align: center; white-space: nowrap; }
.scorecard tbody th, .scorecard thead th:first-child { text-align: left; white-space: normal; min-width: 9rem; }
.scorecard .par-row td, .scorecard .par-row th { background: #f3f7f1; font-weight: 600; }
.scorecard input.stroke { width: 2.6rem; padding: .25rem; text-align: center; margin: 0; }
.scorecard input.stroke.wide { width: 3.4rem; }
.scorecard input[aria-invalid="true"] { border-color: #b3261e; background: #fdecea; }
.results { border-collapse: collapse; width: 100%; max-width: 40rem; }
.results th, .results td { padding: .4rem .5rem; border-bottom: 1px solid var(--line, #dfe5dc); text-align: left; }
.results tbody tr:first-child td { font-weight: 700; }
.skins-log .skin.carried { color: #8a6d00; }
.team-picks { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .5rem; }
.round-format { border: 1px dashed var(--line, #cfd8cb); border-radius: .5rem; padding: .5rem .75rem; margin: .5rem 0; }
.badge-status-final { background: #1f6f43; color: #fff; }
.badge-status-scoring, .badge-status-in_progress { background: #fff3c4; color: #5b4500; }
.badge-status-cancelled { background: #eee; color: #4a4a4a; }
.admin-courses td, .admin-courses th, .rounds-history td, .rounds-history th, .tees td, .tees th { padding: .35rem .5rem; text-align: left; border-bottom: 1px solid var(--line, #dfe5dc); }
.admin-courses .row-actions { display: flex; gap: .35rem; align-items: center; }
.admin-courses .row-actions form { margin: 0; }
.tees input { max-width: 8rem; }
.button.small, button.small { padding: .25rem .6rem; font-size: .85rem; }

/* ---- invites / notifications ---- */
.menu-toggle { position: relative; }
.menu-badge { position: absolute; top: -4px; right: -6px; background: #d93025; color: #fff; border-radius: 999px; font-size: .7rem; line-height: 1; padding: .2rem .38rem; font-weight: 700; }
.notif-count { background: #d93025; color: #fff; border-radius: 999px; font-size: .75rem; padding: .05rem .45rem; margin-left: .25rem; }
.invite-details { margin: .35rem 0; }
.invite-details > summary { list-style: none; display: inline-block; cursor: pointer; }
.invite-details > summary::-webkit-details-marker { display: none; }
.invite-picker { margin-top: .5rem; padding: .6rem .75rem; border: 1px solid var(--line, #dfe5dc); border-radius: .5rem; background: #fafcf9; }
.invite-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.invite-list form { margin: 0; }
.invite-friend { display: flex; gap: .6rem; align-items: center; width: 100%; text-align: left; background: #fff; color: inherit; border: 1px solid var(--line, #dfe5dc); padding: .4rem .6rem; border-radius: .45rem; }
.invite-friend:hover { border-color: #1f6f43; }
.invite-friend .invite-cta { margin-left: auto; color: #1f6f43; font-weight: 700; }
.notifications { list-style: none; padding: 0; margin: 0; }
.notification form { margin: 0; }
.notification-open { display: flex; gap: .6rem; align-items: baseline; width: 100%; text-align: left; background: none; color: inherit; border: 0; border-bottom: 1px solid var(--line, #dfe5dc); padding: .65rem .25rem; border-radius: 0; font-weight: 400; }
.notification.is-unread .notification-msg { font-weight: 700; }
.notification .dot { width: .55rem; height: .55rem; border-radius: 50%; background: #1f6f43; flex: none; align-self: center; }
.notification time { margin-left: auto; white-space: nowrap; }
.badge-invited { background: #e7f1ff; color: #1b4b8f; }
.invite-banner a { font-weight: 700; }
.menu-notifications::before { content: "\1F514"; margin-right: .35rem; }

/* Admin · Recent Activity: fixed-height scroll box with a sticky header row. */
.activity-filter { display: flex; gap: .4rem; align-items: center; }
.activity-filter .chip { padding: .25rem .75rem; border-radius: 999px; border: 1px solid var(--border, #d6dccf);
  text-decoration: none; font-size: .85rem; color: inherit; }
.activity-filter .chip.is-active { background: var(--green, #1f6f43); border-color: transparent; color: #fff; }
.activity-scroll { max-height: 560px; overflow-y: auto; overflow-x: auto; border: 1px solid var(--border, #e3e7de);
  border-radius: 8px; }
.activity-table { width: 100%; margin: 0; }
.activity-table thead th { position: sticky; top: 0; z-index: 1; background: var(--surface, #fff);
  box-shadow: inset 0 -1px 0 var(--border, #e3e7de); }
.activity-table td { vertical-align: top; font-size: .88rem; }
.badge-cat-admin { background: #22302a; color: #ffd76a; }
.badge-cat-user { background: #e6f2ea; color: #1f6f43; }

/* Menu · Search disclosure (<details>): indented, smaller sub-items. */
.menu-search > summary {
  display: flex; align-items: center; justify-content: space-between; list-style: none; cursor: pointer;
  padding: .7rem .9rem; border-radius: 8px; font-weight: 600;
}
.menu-search > summary::-webkit-details-marker { display: none; }
.menu-search > summary::after { content: "▸"; font-size: .8em; transition: transform .15s; }
.menu-search[open] > summary::after { transform: rotate(90deg); }
.menu-search > summary:hover, .menu-search > summary:focus-visible { background: color-mix(in srgb, var(--green) 10%, transparent); }
.menu-panel .menu-sub { margin: 0 0 .2rem 1rem; border-left: 2px solid var(--border); }
.menu-panel .menu-sub a { padding: .45rem .8rem; font-size: .88rem; font-weight: 500; }

/* Search pages: type switcher + tee sheet results */
.search-types { display: flex; gap: .4rem; margin-bottom: .75rem; }
.search-types .chip { padding: .3rem .85rem; border-radius: 999px; border: 1px solid var(--border);
  text-decoration: none; font-size: .9rem; color: inherit; background: var(--surface); }
.search-types .chip.is-active { background: var(--green); border-color: transparent; color: #fff; }
.sheet-filters { flex-wrap: wrap; }
.sheet-filters .when { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; padding: 0; margin: 0; }
.sheet-filters .when label { display: flex; align-items: center; gap: .35rem; font-size: .9rem; }
.sheet-hits { list-style: none; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sheet-hit-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.sheet-hit-head h2 { font-size: 1.1rem; margin: 0; }
.tee-chips { list-style: none; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.tee-chip { border: 1px solid var(--border); border-radius: 8px; padding: .25rem .55rem; font-size: .85rem; display: flex; gap: .4rem; }
.tee-chip.is-full { opacity: .55; }

/* Admin stats tab */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .75rem; margin: 0 0 1.25rem; }
.stat-tiles > div { border: 1px solid var(--border, #d8dfd8); border-radius: 10px; padding: .75rem 1rem; }
.stat-tiles dt { font-size: .85rem; color: var(--muted, #5b6b5e); }
.stat-tiles dd { margin: .15rem 0 0; font-size: 1.6rem; font-weight: 700; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.data-table .num { text-align: right; }

/* Admin Email tab + contact */
.recipient-picker { position: relative; }
.recipient-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; }
.recipient-list { list-style: none; margin: .25rem 0 0; padding: .25rem 0; background: #fff; border: 1px solid #c9d4cb; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 18rem; overflow-y: auto; }
.recipient-list li { padding: .45rem .75rem; cursor: pointer; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.recipient-list li:hover, .recipient-list li.is-active { background: #e7f4ec; }
.recipient-empty { position: absolute; background: #fff; padding: .4rem .75rem; border: 1px solid #c9d4cb; border-radius: 8px; margin: .25rem 0 0; }
.recipient-chip { display: inline-flex; align-items: center; gap: .4rem; background: #e7f4ec; color: var(--green-dark, #1d5a36); border-radius: 999px; padding: .3rem .4rem .3rem .8rem; font-weight: 600; }
.recipient-chip[hidden] { display: none; }
.chip-remove { background: transparent; color: inherit; border: 0; padding: 0 .35rem; font-size: 1.1rem; line-height: 1; cursor: pointer; min-height: 0; }
.toast { margin: 0 0 1rem; padding: .65rem .9rem; border-radius: 8px; font-weight: 600; }
.toast-ok { background: #e7f4ec; color: var(--green-dark, #1d5a36); border-left: 4px solid var(--green, #2e7d4f); }
.toast-error { background: #fdecea; color: #8a1c12; border-left: 4px solid #c0392b; }
.badge-failed { background: #fdecea; color: #8a1c12; }
.msg-preview { max-width: 28rem; white-space: pre-line; }
.hp-field { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* invite a new golfer by email (MyAccount > Friends) + the /invite/<token> landing */
.ei-form { display: grid; gap: .6rem; max-width: 34rem; margin: .5rem 0 1rem; }
.ei-form label { margin: 0; }
.ei-form button { justify-self: start; }
#ei-sent-h { margin: 1.1rem 0 .3rem; font-size: .95rem; }
.invite-landing .lead { font-size: 1.1rem; }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 1rem 0; }
.detail-list dt { color: #5b6b5f; } .detail-list dd { margin: 0; font-weight: 600; }

/* Admin > Reminders */
.tabpanel dl.stat-row { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin: 0 0 1.25rem; max-width: none; width: 100%; grid-template-columns: none; }
.tabpanel .stat-row > div { flex: 0 0 auto; }
.tabpanel .stat-row dt { color: var(--muted, #5b6b5f); font-size: .875rem; }
.tabpanel .stat-row dd { margin: 0; font-size: 1.25rem; font-weight: 700; }
.reminder-form { max-width: 40rem; margin-bottom: 1.5rem; }
.reminder-slots { border: 1px solid var(--border, #d8dfd6); border-radius: 8px; padding: .75rem 1rem; }
.reminder-slot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .35rem 0; }
.reminder-slot label.check { margin: 0; min-width: 8rem; }
.reminder-slot input[type=number] { width: 5rem; }
.reminder-hour { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.reminder-hour select { width: auto; }

/* text message updates (profile) */
#sms-section fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .4rem; }
#sms-section legend { font-weight: 600; margin-bottom: .25rem; }
#sms-section .check span a { text-decoration: underline; }
#sms-code { width: 9ch; font-variant-numeric: tabular-nums; letter-spacing: .15em; }
#sms-stats { margin-top: 0; }
.prose .consent { font-weight: 600; }

/* Password fields with a show/hide button (static/password_toggle.js) */
.pw-field { display: flex; gap: .5rem; align-items: stretch; }
.pw-field input { flex: 1 1 auto; margin: 0; min-width: 0; }
.pw-toggle { flex: 0 0 auto; background: transparent; color: var(--green-dark, #1d5a36); border: 1px solid var(--border); padding: .35rem .8rem; min-width: 4.5rem; }
.pw-toggle:hover { background: #f0f3ee; }
.pw-form { max-width: 28rem; }
.pw-form label { margin-top: .6rem; }
.pw-form .hint { margin-bottom: .1rem; }
form.stack.pw-form { gap: .35rem; }
form.stack.pw-form label { margin-top: .75rem; }
form.stack.pw-form > div:last-child { margin-top: .9rem; }
.tier-request-form { display: inline-flex; margin: 0 0 0 .4rem; vertical-align: middle; }
.group-teams { padding-left: 1.4rem; margin: .5rem 0 .8rem; }
.group-teams li { margin-bottom: .5rem; }
.group-teams .inline-form input { margin: 0; padding: .35rem .5rem; font-size: .9rem; }
.team-actions { display: inline-flex; gap: .3rem; margin-top: .25rem; }
.team-actions form { margin: 0; }
.new-team input { max-width: 22rem; }
/* Home · How Casual Tee works */
.how-panel > summary { list-style: none; cursor: pointer; position: relative; padding-right: 2rem; }
.how-panel > summary::-webkit-details-marker { display: none; }
.how-panel > summary::after { content: "▾"; position: absolute; right: .25rem; top: 1.1rem; color: var(--green); transition: transform .15s; }
.how-panel:not([open]) > summary::after { transform: rotate(-90deg); }
.how-panel > summary h2 { font-family: var(--font-display); margin: 0; font-size: clamp(1.4rem, 3.2vw, 1.8rem); color: var(--green-dark); }
.how-intro { font-size: 1.05rem; color: var(--muted); max-width: 46rem; margin: .6rem 0 1.25rem; border-left: 3px solid var(--accent); padding-left: .85rem; }
.how-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.how-block { background: #f6f8f6; border: 1px solid #e3e9e3; border-radius: 10px; padding: 1rem 1.1rem; }
.how-block h3 { font-family: var(--font-display); margin: 0 0 .5rem; color: var(--green-dark); font-size: 1.15rem; }
.how-block ul { margin: 0; padding-left: 1.1rem; }
.how-block li { margin-bottom: .45rem; font-size: .95rem; }
.how-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.25rem 0 0; }
/* Signup clickwrap */
form label.check.terms-check { align-items: flex-start; font-weight: 500; width: auto; line-height: 1.4; }
form label.check.terms-check input { margin-top: .2rem; }
.legal-meta { color: var(--muted); font-size: .9rem; }

/* Tournaments */
.badge-tournament { background: #fff4d6; color: #6b4e00; border: 1px solid #e9cf7a; text-decoration: none; }
a.badge-tournament:hover { background: #ffeab0; }
.badge-t-active { background: #e3f3e8; color: #1f6b3a; }
.badge-t-upcoming { background: #e8eefc; color: #2b4a9a; }
.badge-t-completed { background: #eee; color: #4a4a4a; }
.placings { display: flex; flex-wrap: wrap; gap: .75rem; margin: .75rem 0 0; }
.placing { background: #f7f7f2; border-radius: 10px; padding: .5rem .8rem; min-width: 9rem; }
.placing dt { font-size: .8rem; color: #666; }
.placing dd { margin: 0; font-weight: 600; }
.tournament-prize { margin: .4rem 0; }
.stat-tiles { list-style: none; display: flex; gap: 1rem; padding: 0; margin: 0 0 1rem; }
.stat-tiles li { background: #f4f7f4; border-radius: 10px; padding: .6rem 1rem; display: flex; flex-direction: column; }
.stat-tiles strong { font-size: 1.4rem; }
.standings { width: 100%; border-collapse: collapse; }
.standings th, .standings td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid #e6e6e0; }
.tournament-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.team-roster { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .3rem; }
.roster-chip { display: inline-flex; align-items: center; gap: .2rem; background: #eef3ee; border-radius: 999px; padding: .1rem .55rem; font-size: .85rem; }
.roster-chip form { display: inline; }
.link-btn { background: none; border: 0; padding: 0 .1rem; color: #a33; cursor: pointer; }
.starter-tools summary { cursor: pointer; font-weight: 600; }
.starter-tools .stack { flex: 1; min-width: 16rem; }
.team-rosters { list-style: none; padding: 0; display: grid; gap: .5rem; }

/* Landing: visible H1 + "Two ways to play" */
.landing-hero { color: #fff; text-align: center; padding: clamp(1.5rem, 4vw, 2.75rem) 1rem 0; max-width: 820px; margin: 0 auto; }
.landing-h1 { font-family: var(--font-display); font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); line-height: 1.05; margin: 0 0 .5rem; text-wrap: balance; }
.landing-sub { color: rgba(255,255,255,.92); font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); margin: 0; text-wrap: balance; }
.landing-tiers { padding: clamp(2rem, 6vw, 3.5rem) 1rem 0; }
.landing-tiers-inner { max-width: 960px; margin: 0 auto; }
.landing-tiers h2 { color: #fff; text-align: center; font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
.landing-tiers .tier-note { color: rgba(255,255,255,.9); text-align: center; margin-top: 1rem; }
.tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.tier-card { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.35rem; box-shadow: var(--shadow); }
.tier-card.tier-starter { border-top: 4px solid var(--accent); }
.tier-card.tier-golfer { border-top: 4px solid var(--green); }
.tier-card.is-current { outline: 2px solid var(--green); }
.tier-name { margin: 0 0 .35rem; font-size: 1.3rem; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.tier-price { font-size: .9rem; font-weight: 700; color: var(--green-dark); background: #e7f4ec; padding: .1rem .55rem; border-radius: 999px; }
.tier-summary { font-weight: 600; margin: 0 0 .6rem; }
.tier-points { margin: 0; padding-left: 1.1rem; }
.tier-points li { margin: .2rem 0; }

/* Home */
.home-welcome { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.home-welcome h1 { margin: 0; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin: 1rem 0; }
.home-grid > .card { margin: 0; }
.next-round .tt-when { font-size: 1.25rem; font-weight: 700; margin: .25rem 0; }
.quick-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.quick-actions a.button { display: inline-block; }
a.button.solid, .quick-actions a.button { background: var(--green); color: #fff; border: 1px solid var(--green-dark); }
a.button.solid:hover, .quick-actions a.button:hover { background: var(--green-dark); }
.quick-actions a.button.outline { background: #fff; color: var(--green-dark); border: 2px solid var(--green); }
.nudge { border-left: 4px solid var(--accent); background: #fff8e1; padding: .75rem 1rem; border-radius: 8px; margin: 1rem 0; }
.nudge p { margin: 0 0 .5rem; }
.empty-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }

/* Login / signup switch */
.auth-wrap { max-width: 520px; margin: 0 auto; }
.auth-switch { text-align: center; margin: 1rem 0 0; font-weight: 600; }
.auth-tiers { margin-top: 1.5rem; }
.auth-tiers .tier-card { box-shadow: none; }

/* Groups: equal card heights */
.group-grid, .groups-list { align-items: stretch; }
.group-card { height: 100%; display: flex; flex-direction: column; }
.group-card .group-desc-prompt { color: var(--muted); font-style: italic; }

/* MyAccount grouped tabs */
.tab-groups { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; border-bottom: 2px solid var(--border); margin-bottom: 1rem; }
.tab-group { display: flex; flex-direction: column; }
.tab-group-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); padding: .25rem 1rem 0; }
.tab-group .tab-row { display: flex; flex-wrap: wrap; }
.tab-group .tab-row [role="tab"] { border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab-select { display: none; margin-bottom: 1rem; }
@media (max-width: 640px) {
  .js .tab-groups { display: none; }
  .js .tab-select { display: block; }
}
.inline-h { display: inline; font-size: 1rem; }
.badge-lg { font-size: .9rem; padding: .25rem .8rem; }
.tier-summary-box { margin-bottom: 1rem; }
.tier-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 1.25rem 0 0; }
.btn-outline { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.group-card .group-meta { margin-top: auto; }

/* --- Readability audit (designer round 2): helper and label text never below 14px. ---
   Exceptions on purpose: the logo golf ball, avatar initials and the tiny calendar slot cells. */
.badge, .eyebrow, .cal h4, .cal-day-head, .count, .spots, .slot-teetime .lock, .data-table thead th,
.public-card .pp-fields dt, .placing dt, .stat-tiles dt, .no-show-record, .inline-form button, .people button,
button.danger, .weekday span, .note, .legal-meta, .tabpanel .stat-row dt, .slot-none, .hint, small, .small,
.entry-meta, .crumbs, .site-footer, .legend, .weekday-picker legend, .times-picker legend, fieldset.choice legend { font-size: .875rem; }
.placing dt { color: var(--muted); }
.stat-tiles dt, .tabpanel .stat-row dt { color: var(--muted); }

/* Groups: even grid, equal heights, aligned tops. 3 across desktop, 2 tablet, 1 mobile. */
.group-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; align-content: start; }
@media (max-width: 1024px) { .group-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .group-grid { grid-template-columns: 1fr; } }
.group-grid > .group-card { margin: 0; height: 100%; }
.group-card .group-desc-prompt a { position: relative; z-index: 1; }

/* Calendars: "+ New tee sheet" toggle */
.new-sheet-toggle > summary { list-style: none; display: inline-block; cursor: pointer; }
.new-sheet-toggle > summary::-webkit-details-marker { display: none; }
.new-sheet-toggle[open] > summary { margin-bottom: .75rem; }
#add-one-time { scroll-margin-top: 1rem; }
.new-sheet-toggle > summary.button.secondary { background: #fff; color: var(--green-dark); box-shadow: inset 0 0 0 2px var(--green); }

/* Seat invites: a held seat shows yellow until the invitee accepts. */
.seat.invited { background: #fff6d9; border-left: 3px solid #d9a400; color: #333; }
.badge-invited { font-size: .875rem; background: #ffe9a8; color: #333; border: 1px solid #d9a400; }
.invite-actions { display: inline-flex; gap: .4rem; flex-wrap: wrap; }
.invite-actions form { margin: 0; }
.invite-banner { background: #fff6d9; border-left: 4px solid #d9a400; color: #333; }
.invite-banner p { font-size: 1rem; }
.seat-legend { margin: 0 0 .6rem; color: #333; }
.key-booked { background: #f6f8f5; border-color: var(--green); }
.key-invited { background: #fff6d9; border-color: #d9a400; margin-left: .6rem; }
.key-open { background: #fafbf9; border: 1px dashed #cfd8cc; margin-left: .6rem; }

/* MyAccount > Groups */
.groups-run-toggle { margin: .25rem 0 1rem; }
.groups-run-toggle.is-disabled label { color: #333; opacity: .6; cursor: not-allowed; }
.groups-run-toggle input.switch:disabled { background: #c9ccc8; box-shadow: inset 0 0 0 1px #aeb3ad; cursor: not-allowed; opacity: .7; }
.my-groups { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.my-group { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: #fcfdfb; color: #333; }
.my-group p { margin: 0; }
.my-group p.small, .my-group p.muted { font-size: .875rem; color: #333; }
.badge-owner { font-size: .875rem; background: #e7f4ec; color: #1f6b3f; }

/* Tee sheet: Starter "Notify" */
.sheet-notify { margin-top: .6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: #333; }
.sheet-notify small { font-size: .875rem; color: #333; }
.notify-details > summary { list-style: none; display: inline-block; cursor: pointer; }
.notify-details > summary::-webkit-details-marker { display: none; }
.notify-form { display: grid; gap: .4rem; margin-top: .6rem; max-width: 34rem; }
.notify-form textarea { font-size: 1rem; color: #333; }
.sheet-notify button:disabled { opacity: .55; cursor: not-allowed; }
